2
! CalculiX - A 3-dimensional finite element program
3
! Copyright (C) 1998-2015 Guido Dhondt
5
! This program is free software; you can redistribute it and/or
6
! modify it under the terms of the GNU General Public License as
7
! published by the Free Software Foundation(version 2);
10
! This program is distributed in the hope that it will be useful,
11
! but WITHOUT ANY WARRANTY; without even the implied warranty of
12
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
! GNU General Public License for more details.
15
! You should have received a copy of the GNU General Public License
16
! along with this program; if not, write to the Free Software
17
! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
subroutine gaspipe_fanno(node1,node2,nodem,nelem,lakon,kon,
20
& ipkon,nactdog,identity,ielprop,prop,iflag,v,xflow,f,
21
& nodef,idirf,df,cp,r,physcon,dvi,numf,set,
22
& shcon,nshcon,rhcon,nrhcon,ntmat_,co,vold,mi,ttime,time,
25
! pipe with friction losses (Fanno Formulas) GAPF
27
! author: Yannick Muller
35
integer nelem,nactdog(0:3,*),node1,node2,nodem,numf,
36
& ielprop(*),nodef(5),idirf(5),index,iflag,
37
& inv,ipkon(*),kon(*),icase,kgas,k_oil
38
& ,nshcon(*),nrhcon(*),ntmat_,i,mi(*),nodea,nodeb,
41
real*8 prop(*),v(0:mi(2),*),xflow,f,df(5),kappa,R,a,d,l,
42
& p1,p2,T1,T2,Tt1,Tt2,pt1,pt2,cp,physcon(3),p2p1,km1,dvi,
43
& kp1,kdkm1,reynolds,pi,e,lambda,lld,kdkp1,T2dTt2,
44
& T1dTt1,X_t1dTt1,X_t2dTt2,X2_den,X1_den,
45
& X1,X2,B1,B2,C1,C2,tdkp1,ttime,time,
46
& pt2zpt1,ks,form_fact,xflow_oil,Tt1dT1,Tt2dT2,
47
& Pt2zPt1_c,qred_crit,l_neg,Qred,
48
& expon1,expon2,cte,term1,term2,term3,term4,term5,term6,
49
& term,phi,M1,M2,qred2,qred1,qred_max1,qred_crit_out,co(3,*),
50
& shcon(0:3,ntmat_,*),rhcon(0:1,ntmat_,*),vold(0:mi(2),*),
51
& radius,initial_radius,l_initial
56
if(nactdog(2,node1).ne.0)then
58
elseif(nactdog(2,node2).ne.0)then
60
elseif(nactdog(1,nodem).ne.0)then
64
elseif (iflag.eq.1)then
82
if(lakon(nelem)(2:6).eq.'GAPFA') then
84
elseif(lakon(nelem)(2:6).eq.'GAPFI') then
87
form_fact=prop(index+5)
88
xflow_oil=prop(index+6)
89
k_oil=nint(prop(index+7))
91
if((lakon(nelem)(2:6).eq.'GAPFF').and.
92
& (lakon(nelem)(2:7).ne.'GAPFF2')) then
95
nodea=nint(prop(index+1))
96
nodeb=nint(prop(index+2))
97
c iaxial=nint(prop(index+3))
98
radius=dsqrt((co(1,nodeb)+vold(1,nodeb)-
99
& co(1,nodea)-vold(1,nodea))**2)
101
initial_radius=dsqrt((co(1,nodeb)-co(1,nodea))**2)
103
c if(iaxial.ne.0) then
104
c A=pi*radius**2/iaxial
117
form_fact=prop(index+6)
118
xflow_oil=prop(index+7)
119
k_oil=nint(prop(index+8))
121
elseif (lakon(nelem)(2:7).eq.'GAPFF2') then
122
write(*,*) nelem,lakon(nelem)(1:6)
124
nodea=nint(prop(index+1))
125
nodeb=nint(prop(index+2))
126
nodec=nint(prop(index+3))
127
c iaxial=nint(prop(index+4))
128
radius=dsqrt((co(1,nodeb)+vold(1,nodeb)-
129
& co(1,nodea)-vold(1,nodea))**2)
130
initial_radius=dsqrt((co(1,nodeb)-co(1,nodea))**2)
132
c if(iaxial.ne.0) then
133
c A=pi*radius**2/iaxial
137
l_initial=dsqrt((co(2,nodec)-co(2,nodeb))**2)
138
l=dsqrt((co(2,nodec)+vold(2,nodec)-
139
& co(2,nodeb)-vold(2,nodeb))**2)
147
form_fact=prop(index+6)
148
xflow_oil=prop(index+7)
149
k_oil=nint(prop(index+8))
157
Tt1=v(0,node1)+physcon(1)
158
Tt2=v(0,node2)+physcon(1)
163
Tt1=v(0,node2)+physcon(1)
164
Tt2=v(0,node1)+physcon(1)
174
! incompressible flow
175
xflow=inv*A*dsqrt(d/l*2*Pt1/(R*Tt1)*(pt1-pt2))
177
xflow=inv*pt1*a*dsqrt(2.d0*kdkm1*p2p1**(2.d0/kappa)
178
& *(1.d0-p2p1**(1.d0/kdkm1))/r)/dsqrt(Tt1)
180
xflow=inv*pt1*a*dsqrt(kappa/r)*tdkp1**(kp1/(2.d0*km1))/
184
! calculation of the dynamic viscosity
186
if(dabs(dvi).lt.1E-30) then
188
call dynamic_viscosity(kgas,Tt1,dvi)
191
reynolds=dabs(xflow)*d/(dvi*a)
193
call friction_coefficient(l_neg,d,ks,reynolds,form_fact,lambda)
194
xflow=inv*A*dsqrt(d/(lambda*l)*2*Pt1/(R*Tt1)*(pt1-pt2))
196
call pt2zpt1_crit(pt2,pt1,Tt1,Tt2,lambda,kappa,r,l,d,A,iflag,
197
& inv,pt2zpt1_c,qred_crit,crit,qred_max1,icase)
199
Qred=dabs(xflow)*dsqrt(Tt1)/(A*pt1)
202
xflow=0.5*inv*Qred_crit*Pt1*A/dsqrt(Tt1)
205
call ts_calc(xflow,Tt1,pt1,kappa,r,a,T1,icase)
209
if(nactdog(0,node2).eq.1) then
210
v(0,node2)=T1*(1.d0+km1/(2*kappa))
215
if(nactdog(0,node1).eq.1) then
216
v(0,node1)=T1*(1.d0+km1/(2*kappa))
220
elseif(Qred.gt.Qred_crit) then
221
xflow=0.5*inv*Qred_crit*pt1*A/dsqrt(Tt1)
223
xflow=inv*Qred*pt1*A/dsqrt(Tt1)
226
elseif (iflag.eq.2)then
252
if(lakon(nelem)(2:6).eq.'GAPFA') then
254
elseif(lakon(nelem)(2:6).eq.'GAPFI') then
257
form_fact=prop(index+5)
258
xflow_oil=prop(index+6)
259
k_oil=nint(prop(index+7))
261
if((lakon(nelem)(2:6).eq.'GAPFF').and.
262
& (lakon(nelem)(2:7).ne.'GAPFF2')) then
264
nodea=nint(prop(index+1))
265
nodeb=nint(prop(index+2))
266
c iaxial=nint(prop(index+3))
267
radius=dsqrt((co(1,nodeb)+vold(1,nodeb)-
268
& co(1,nodea)-vold(1,nodea))**2)
269
initial_radius=dsqrt((co(1,nodeb)-co(1,nodea))**2)
271
c if(iaxial.ne.0) then
272
c A=pi*radius**2/iaxial
284
form_fact=prop(index+6)
285
xflow_oil=prop(index+7)
286
k_oil=nint(prop(index+8))
288
elseif (lakon(nelem)(2:7).eq.'GAPFF2') then
290
nodea=nint(prop(index+1))
291
nodeb=nint(prop(index+2))
292
nodec=nint(prop(index+3))
293
c iaxial=nint(prop(index+4))
294
radius=dsqrt((co(1,nodeb)+vold(1,nodeb)-
295
& co(1,nodea)-vold(1,nodea))**2)
296
initial_radius=dsqrt((co(1,nodeb)-co(1,nodea))**2)
298
c if(iaxial.ne.0) then
299
c A=pi*radius**2/iaxial
303
l_initial=dsqrt((co(2,nodec)-co(2,nodeb))**2)
304
l=-dsqrt((co(2,nodec)+vold(2,nodec)-
305
& co(2,nodeb)-vold(2,nodeb))**2)
313
form_fact=prop(index+6)
314
xflow_oil=prop(index+7)
315
k_oil=nint(prop(index+8))
320
xflow=v(1,nodem)*iaxial
322
if((pt1.gt.pt2).or.(xflow.ge.0d0)) then
324
Tt1=v(0,node1)+physcon(1)
325
call ts_calc(xflow,Tt1,Pt1,kappa,r,a,T1,icase)
328
call ts_calc(xflow,Tt2,Pt2,kappa,r,a,T2,icase)
331
Tt2=v(0,node2)+physcon(1)
343
xflow=-v(1,nodem)*iaxial
344
Tt1=v(0,node2)+physcon(1)
348
Tt2=v(0,node1)+physcon(1)
351
call ts_calc(xflow,Tt1,Pt1,kappa,r,a,T1,icase)
353
call ts_calc(xflow,Tt2,Pt2,kappa,r,a,T2,icase)
370
! calculation of the dynamic viscosity
372
if(dabs(dvi).lt.1E-30) then
374
call dynamic_viscosity(kgas,T1,dvi)
377
reynolds=dabs(xflow)*d/(dvi*a)
379
if(reynolds.lt.1) then
383
! definition of the friction coefficient for 2 phase flows and pure air
386
if(lakon(nelem)(7:7).eq.'F') then
388
if((k_oil.lt.0).or.(k_oil.gt.12)) then
389
write(*,*) '*ERROR:in gaspipe.f'
390
write(*,*) ' using two phase flow'
391
write(*,*) ' the type of oil is not defined'
392
write(*,*) ' check element ',nelem,' definition'
393
write(*,*) ' Current calculation stops here'
395
elseif(xflow_oil.eq.0.d0) then
396
write(*,*) '*WARNING:in gaspipe.f'
397
write(*,*) ' using two phase flow'
398
write(*,*) ' the oil mass flow rate is NULL'
399
write(*,*) ' check element ',nelem,' definition'
400
write(*,*) ' Only pure air is considered'
401
call friction_coefficient(l_neg,d,ks,reynolds,form_fact,
404
call two_phase_flow(Tt1,pt1,T1,Tt2,pt2,T2,xflow,
405
& xflow_oil,nelem,lakon,kon,ipkon,ielprop,prop,
406
& v,dvi,cp,r,k_oil,phi,lambda,nshcon,nrhcon,
407
& shcon,rhcon,ntmat_,mi)
415
elseif (lakon(nelem)(7:7).eq.'A') then
416
if((k_oil.lt.0).or.(k_oil.gt.12)) then
417
write(*,*) '*ERROR:in gaspipe_fanno.f'
418
write(*,*) ' using two phase flow'
419
write(*,*) ' the type of oil is not defined'
420
write(*,*) ' check element ',nelem,' definition'
421
write(*,*) ' Current calculation stops here'
423
elseif(xflow_oil.eq.0) then
424
write(*,*) '*WARNING:in gaspipe_fanno.f'
425
write(*,*) ' using two phase flow'
426
write(*,*) ' the oil mass flow rate is NULL'
427
write(*,*) ' check element ',nelem,' definition'
428
write(*,*) ' Only pure air is considered'
429
call friction_coefficient(l_neg,d,ks,reynolds,form_fact,
432
call two_phase_flow(Tt1,pt1,T1,Tt2,pt2,T2,xflow,
433
& xflow_oil,nelem,lakon,kon,ipkon,ielprop,prop,
434
& v,dvi,cp,r,k_oil,phi,lambda,nshcon,nrhcon,
435
& shcon,rhcon,ntmat_,mi)
437
call friction_coefficient(l_neg,d,ks,reynolds,form_fact,
449
call friction_coefficient(l_neg,d,ks,reynolds,form_fact,
453
call pt2zpt1_crit(pt2,pt1,Tt1,Tt2,lambda,kappa,r,l,d,A,iflag,
454
& inv,pt2zpt1_c,qred_crit,crit,qred_max1,icase)
456
Qred1=xflow*dsqrt(Tt1)/(A*Pt1)
458
if(dabs(xflow)*dsqrt(Tt1)/(A*Pt1).gt.qred_max1) then
462
Qred2=xflow*dsqrt(Tt2)/(A*Pt2)
464
qred_crit_out=dsqrt(kappa/R)*(2/(kappa+1))**(0.5d0*
465
& (kappa+1)/(kappa-1))
467
qred_crit_out=R**(-0.5d0)*(2/(kappa+1))**(0.5d0*
468
& (kappa+1)/(kappa-1))
471
! definition of the coefficients
475
M2=dsqrt(2/km1*((Tt2/T2)-1))
479
if((M2.ge.1.d0).or.(dabs(M2-1).lt.1E-5)) then
483
elseif (icase.eq.1) then
484
if(M2.lt.1/dsqrt(kappa)) then
497
X_T2dTt2=T2dTt2**(2*kdkm1)
500
X_T1dTt1=T1dTt1**(2*kdkm1)
502
X2_den=pt2**2*X_T2dTt2
504
X1_den=pt1**2*X_T1dTt1
507
! C1=2.d0*cp*A**2*X1_den*(-1.d0+2.d0*kdkm1*T1dTt1)
508
! & -2.d0*xflow**2*R**2*T1
509
C1=2.d0*cp*A**2*X1_den*(-1.d0+2.d0*kdkm1*(T1dTt1-1))
510
& -2.d0*xflow**2*R**2*T1
512
! C2=2.d0*cp*A**2*X2_den*(-1.d0+2.d0*kdkm1*T2dTt2)
513
! & -2.d0*xflow**2*R**2*T2
514
C2=2.d0*cp*A**2*X2_den*(-1.d0+2.d0*kdkm1*(T2dTt2-1))
515
& -2.d0*xflow**2*R**2*T2
520
cte=0.5d0*(kappa+1)/kappa
522
term1=pt1**2*T1**expon1*Tt1**(-expon2)*A**2
525
term1=pt1**2*T1**expon1*Tt1**(-expon2)*A**2
526
term2=pt2**2*T2**expon1*Tt2**(-expon2)*A**2
532
term5=T1**(expon1)*Tt1**(-expon2)*(pt1**2)
533
term6=T2**(expon1)*Tt2**(-expon2)*(pt2**2)
535
B1=1/(R*xflow**2)*term1*expon1/T1
536
& +cte*(-(2/km1)*1/T1)
538
B2=1/(R*xflow**2)*term2*(-expon1/T2)
545
f=1/(R*xflow**2)*(term1-term2)
546
& +cte*(log(term3)-log(term4)-log(term5)+log(term6))
548
& +b2/c2*(2*cp*A**2*(Tt2-T2)
549
& *X2_den-xflow**2*R**2*T2**2)
550
& +b1/c1*(2*cp*A**2*(Tt1-T1)
551
& *X1_den-xflow**2*R**2*T1**2)
555
df(1)=1/(R*xflow**2)*(term1*2/pt1)
557
& +B1/C1*(4.d0*cp*A**2*(Tt1-T1)*pt1*X_T1dTt1)
561
df(2)=1/(R*xflow**2)*term1*(-expon2)/Tt1
562
& +cte*(expon1*1/Tt1)
563
& +b1/c1*(2*cp*A**2*X1_den
564
& *(1.d0-2.d0*kdkm1*(Tt1-T1)/Tt1))
568
df(3)=-2.d0/(R*(inv*xflow)**3)*(term1-term2)
569
& +B2/C2*(-2.d0*inv*xflow*R*R*T2**2.d0)
570
& +B1/C1*(-2.d0*inv*xflow*R*R*T1**2.d0)
574
df(4)=1/(R*xflow**2)*(-term2*2/pt2)
576
& +B2/C2*(4.d0*cp*A**2*(Tt2-T2)*pt2*X_T2dTt2)
580
df(5)=1/(R*xflow**2)*term2*(expon2/Tt2)
581
& +cte*(-expon1*1/Tt2)
582
& +b2/c2*(2*cp*A**2*X2_den
583
& *(1.d0-2.d0*kdkm1*(Tt2-T2)/Tt2))
587
term=kappa*term1/(xflow**2*R)
588
B1=expon1*1/T1*(1/kappa*term-1)+cte*1/T1
589
! f=1/kappa*(term1-1)+cte*(log(T1dTt1)-log(2/kp1*term))
590
f=1/kappa*(term-1)+cte*(log(T1dTt1)-log(2/kp1*term))
592
& +b1/c1*(2*cp*A**2*(Tt1-T1)
593
& *X1_den-xflow**2*R**2*T1**2)
597
df(1)=2/pt1*(1/kappa*term-cte)
598
& +B1/C1*(4.d0*cp*A**2*(Tt1-T1)*pt1*X_T1dTt1)
602
df(2)=expon2*1/Tt1*(-1/kappa*term+1)-cte*1/Tt1
603
& +b1/c1*(2*cp*A**2*X1_den
604
& *(1.d0-2.d0*kdkm1*(Tt1-T1)/Tt1))
608
df(3)=2.d0/(inv*xflow)*(-term/kappa+cte)
609
& +B1/C1*(-2.d0*inv*xflow*R*R*T1**2.d0)
623
elseif(icase.eq.1) then
626
X_T2dTt2=T2dTt2**(2*kdkm1)
629
X_T1dTt1=T1dTt1**(2*kdkm1)
631
X2_den=pt2**2*X_T2dTt2
633
X1_den=pt1**2*X_T1dTt1
636
C1=2.d0*cp*A**2*X1_den*(1.d0-2.d0*kdkm1*(Tt1dT1-1.d0))
637
& +2.d0*xflow**2*R**2*T1
639
C2=2.d0*cp*A**2*X2_den*(1.d0-2.d0*kdkm1*(Tt2dT2-1.d0))
640
& +2.d0*xflow**2*R**2*T2
643
expon2=2*kappa/(kappa-1)
645
cte=0.5d0*(kappa+1)/kappa
647
term1=pt1**2*T1**expon1*Tt1**(-expon2)*A**2
648
term2=pt2**2*T2**expon1*Tt2**(-expon2)*A**2
650
term5=T1**(expon1)*Tt1**(-expon2)*(pt1**2*A**2)
651
term6=T2**(expon1)*Tt2**(-expon2)*(pt2**2*A**2)
654
B1=1/(R*xflow**2)*term1*expon1/T1
657
B2=1/(R*xflow**2)*term2*(-expon1/T2)
662
f=1/(R*xflow**2)*(term1-term2)
663
& +(-log(term5)+log(term6))
665
& +b2/c2*(2*cp*A**2*(Tt2-T2)
666
& *X2_den-xflow**2*R**2*T2**2)
667
& +b1/c1*(2*cp*A**2*(Tt1-T1)
668
& *X1_den-xflow**2*R**2*T1**2)
672
df(1)=1/(R*xflow**2)*(term1*2/pt1)
674
& +B1/C1*(4.d0*cp*A**2*(Tt1-T1)*pt1*X_T1dTt1)
678
df(2)=1/(R*xflow**2)*term1*(-expon2)/Tt1
680
& +b1/c1*(2*cp*A**2*X1_den
681
& *(1.d0-2.d0*kdkm1*(Tt1-T1)/Tt1))
685
df(3)=-2.d0/(R*xflow**3)*(term1-term2)
686
& +B2/C2*(-2.d0*inv*xflow*R*R*T2**2.d0)
687
& +B1/C1*(-2.d0*inv*xflow*R*R*T1**2.d0)
691
df(4)=1/(R*xflow**2)*(-term2*2/pt2)
693
& +B2/C2*(4.d0*cp*A**2*(Tt2-T2)*pt2*X_T2dTt2)
698
df(5)=1/(R*xflow**2)*term2*(expon2/Tt2)
700
& +b2/c2*(2*cp*A**2*X2_den
701
& *(1.d0-2.d0*kdkm1*(Tt2-T2)/Tt2))
704
term=term1/(xflow**2*R)
705
B1=expon1/T1*(term-1)
706
! alternate critical equation
710
& +b1/c1*(2*cp*A**2*(Tt1-T1)
711
& *X1_den-xflow**2*R**2*T1**2)
716
& +B1/C1*(4.d0*cp*A**2*(Tt1-T1)*pt1*X_T1dTt1)
720
df(2)=expon2/Tt1*(-term+1)
721
& +b1/c1*(2*cp*A**2*X1_den
722
& *(1.d0-2.d0*kdkm1*(Tt1-T1)/Tt1))
726
df(3)=2/xflow*(-term+1)
727
& +B1/C1*(-2.d0*inv*xflow*R*R*T1**2.d0)
742
elseif(iflag.eq.3) then
767
if(lakon(nelem)(2:6).eq.'GAPFA') then
769
elseif(lakon(nelem)(2:6).eq.'GAPFI') then
772
form_fact=prop(index+5)
773
xflow_oil=prop(index+6)
774
k_oil=nint(prop(index+7))
779
if(xflow.ge.0d0) then
781
xflow=v(1,nodem)*iaxial
782
Tt1=v(0,node1)+physcon(1)
783
call ts_calc(xflow,Tt1,Pt1,kappa,r,a,T1,icase)
786
call ts_calc(xflow,Tt2,Pt2,kappa,r,a,T2,icase)
789
Tt2=v(0,node2)+physcon(1)
790
call tt_calc(xflow,Tt2,Pt2,kappa,r,a,T2,icase,iflag)
793
! call ts_calc(xflow,Tt1,Pt1,kappa,r,a,T1,icase)
795
! call ts_calc(xflow,Tt2,Pt2,kappa,r,a,T2,icase)
801
xflow=v(1,nodem)*iaxial
803
Tt1=v(0,node2)+physcon(1)
807
Tt2=v(0,node1)+physcon(1)
810
call ts_calc(xflow,Tt1,Pt1,kappa,r,a,T1,icase)
811
call ts_calc(xflow,Tt2,Pt2,kappa,r,a,T2,icase)
817
! calculation of the dynamic viscosity
819
if(dabs(dvi).lt.1E-30) then
821
call dynamic_viscosity(kgas,T1,dvi)
824
reynolds=dabs(xflow)*d/(dvi*a)
826
if(reynolds.lt.1.d0) then
830
! definition of the friction coefficient for 2 phase flows and pure air
833
if(lakon(nelem)(7:7).eq.'F') then
835
if((k_oil.lt.0).or.(k_oil.gt.12)) then
836
write(*,*) '*ERROR:in gaspipe.f'
837
write(*,*) ' using two phase flow'
838
write(*,*) ' the type of oil is not defined'
839
write(*,*) ' check element ',nelem,' definition'
840
write(*,*) ' Current calculation stops here'
842
elseif(xflow_oil.eq.0) then
843
write(*,*) '*WARNING:in gaspipe.f'
844
write(*,*) ' using two phase flow'
845
write(*,*) ' the oil mass flow rate is NULL'
846
write(*,*) ' check element ',nelem,' definition'
847
write(*,*) ' Only pure air is considered'
848
call friction_coefficient(l_neg,d,ks,reynolds,form_fact,
851
call two_phase_flow(Tt1,pt1,T1,Tt2,pt2,T2,xflow,
852
& xflow_oil,nelem,lakon,kon,ipkon,ielprop,prop,
853
& v,dvi,cp,r,k_oil,phi,lambda,nshcon,nrhcon,
854
& shcon,rhcon,ntmat_,mi)
856
call friction_coefficient(l_neg,d,ks,reynolds,form_fact,
861
elseif (lakon(nelem)(7:7).eq.'A') then
862
if((k_oil.lt.0).or.(k_oil.gt.12)) then
863
write(*,*) '*ERROR:in gaspipe.f'
864
write(*,*) ' using two phase flow'
865
write(*,*) ' the type of oil is not defined'
866
write(*,*) ' check element ',nelem,' definition'
867
write(*,*) ' Current calculation stops here'
869
elseif(xflow_oil.eq.0) then
870
write(*,*) '*WARNING:in gaspipe.f'
871
write(*,*) ' using two phase flow'
872
write(*,*) ' the oil mass flow rate is NULL'
873
write(*,*) ' check element ',nelem,' definition'
874
write(*,*) ' Only pure air is considered'
875
call friction_coefficient(l_neg,d,ks,reynolds,form_fact,
878
call two_phase_flow(Tt1,pt1,T1,Tt2,pt2,T2,xflow,
879
& xflow_oil,nelem,lakon,kon,ipkon,ielprop,prop,
880
& v,dvi,cp,r,k_oil,phi,lambda,nshcon,nrhcon,
881
& shcon,rhcon,ntmat_,mi)
883
call friction_coefficient(l_neg,d,ks,reynolds,form_fact,
892
call friction_coefficient(l_neg,d,ks,reynolds,form_fact,
896
call pt2zpt1_crit(pt2,pt1,Tt1,Tt2,lambda,kappa,r,l,d,A,iflag,
897
& inv,pt2zpt1_c,qred_crit,crit,qred_max1,icase)
899
! definition of the coefficients
901
M1=dsqrt(2/km1*((Tt1/T1)-1))
902
M2=dsqrt(2/km1*((Tt2/T2)-1))
905
write(1,55) ' from node ',node1,
906
& ' to node ', node2,': air massflow rate = ',xflow,
907
& ' , oil massflow rate = ',xflow_oil
910
write(1,53)' Inlet node ',node1,' : Tt1 = ',Tt1,
911
& ' , Ts1 = ',T1,' , Pt1 = ',Pt1,
913
write(1,*)' Element ',nelem,lakon(nelem)
914
write(1,57)' eta = ',dvi,' kg/(m*s) , Re = '
916
write(1,58)' PHI = ',phi,' , LAMBDA = ',
918
& ', LAMBDA*l/d = ',lambda*l/d,' , ZETA_PHI = ',
920
write(1,53)' Outlet node ',node2,' : Tt2 = ',
922
& ' , Ts2 = ',T2,' , Pt2 = ',Pt2,
925
else if(inv.eq.-1) then
926
write(1,53)' Inlet node ',node2,': Tt1= ',Tt1,
927
& ' , Ts1= ',T1,' , Pt1= ',Pt1,
929
write(1,*)' Element ',nelem,lakon(nelem)
930
write(1,57)' eta = ',dvi,' kg/(m*s) , Re = '
932
write(1,58)' PHI = ',phi,' , LAMBDA = ',
934
& ', LAMBDA*l/d = ',lambda*l/d,' , ZETA_PHI = ',
936
write(1,53)' Outlet node ',node1,' : Tt2 = ',
938
& ' , Ts2 = ',T2,' , Pt2 =',Pt2,
943
55 format(1X,a,i6,a,i6,a,e11.4,a,a,e11.4,a)
944
53 format(1X,a,i6,a,e11.4,a,e11.4,a,e11.4,a,e11.4)
945
57 format(1X,a,e11.4,a,e11.4)
946
58 format(1X,a,e11.4,a,e11.4,a,e11.4,a,e11.4)
947
77 format(3x,a,e11.1,a,e11.4,a,e11.4,a,e11.4,a,e11.4,a,e11.4
949
78 format(a,i4,a,a,a)
950
79 format(3X,a,i4,a,i4,a,i4)
951
80 format(3x,a,e11.4,a,e11.4,a,e11.4)