TEXT(Boiling 2-Phase Flow in S-bend Duct:W886
TITLE
  DISPLAY
  This case simulates the steady flow of a two-phase mixture in a
  2-D duct, with heated walls.
 
  The mixture has uniform composition at inlet; but the distribution
  changes with distance downstream, for two reasons, namely:-
 
  1. the denser fluid moves to the outside of the bends; and
  2. dense fluid changes into light, through boiling near the
     heated walls.
 
  You may determine whether the activate both effects by your answer
  the following question.
 
  This Q1 contains PHOTON USE commands.
  ENDDIS
    GROUP 1. Run title
REAL(REYNO,WIN,DIAM)
REYNO=3.E3;DIAM=.3;WIN=1.0
REYNO
    GROUP 6. Body-fitted coordinates or grid distortion
BFC=T;NONORT=T
REAL(L1,L2,L3,RAD1,RAD2);INTEGER(NZ1,NZ2,NZ3,NZ4,NZ5,IZ1,IZ2)
L1=1;L2=1;L3=1
RAD1=.2;RAD2=.2
NZ1=6;NZ2=10;NZ3=6;NZ4=10;NZ5=6
NZ=NZ1+NZ2+NZ3+NZ4+NZ5
 
GSET(D,1,10,NZ,0.1,DIAM,1)
IZ2=NZ1+1
 
GSET(C,K:IZ2:,F,K1,+,0,0,L1,INC,-1.5)
IZ1=IZ2;IZ2=IZ1+NZ2
 
GSET(C,K:IZ2:,F,K:IZ1:,RX,-3.14159,DIAM+RAD1,L1,INC,1)
IZ1=IZ2;IZ2=IZ1+NZ3
 
GSET(C,K:IZ2:,F,K:IZ1:,+,0,0,-L2,INC,S1.5)
IZ1=IZ2;IZ2=IZ1+NZ4
 
GSET(C,K:IZ2:,F,K:IZ1:,RX,3.14159,2*(DIAM+RAD1)+RAD2,L1-L2,INC,1)
IZ1=IZ2;IZ2=IZ1+NZ5
 
GSET(C,K:IZ2:,F,K:IZ1:,+,0,0,L3,INC,1.5)
   ** Set wup=t to account better for the high curvature of
      the w resolute...
WUP=T
    GROUP 7. Variables stored, solved & named
SOLVE(P1,V1,W1);SOLUTN(P1,Y,Y,Y,N,N,N)
SOLUTN(V1,P,P,P,P,P,N);SOLUTN(W1,P,P,P,P,P,N)
ONEPHS=F
SOLVE(V2,W2,R1,R2,H1,H2)
SOLUTN(V2,P,P,P,P,P,N);SOLUTN(W2,P,P,P,P,P,N)
SOLUTN(R1,P,P,P,P,P,N);SOLUTN(R2,P,P,P,P,P,N)
SOLUTN(H1,P,P,P,P,P,N);SOLUTN(H2,P,P,P,P,P,N)
STORE(MDOT)
    GROUP 9. Properties of the medium (or media)
ENUL=WIN*DIAM/REYNO;ENUT=500*ENUL
RHO1=750;RHO2=36
PHINT(H1)=4E5;PHINT(H2)=2.5E6
    GROUP 10. Inter-phase-transfer processes and properties
CINT(H1)=10;CINT(H2)=10;CMDOT=HEATBL;CFIPS=1E2
    GROUP 11. Initialization of variable or porosity fields
FIINIT(P1)=1.E-10;FIINIT(W1)=WIN;FIINIT(W2)=WIN
REAL(R1IN,R2IN)
R1IN=0.99;R2IN=1-R1IN
FIINIT(R1)=R1IN;FIINIT(R2)=R2IN
FIINIT(H2)=PHINT(H2);FIINIT(H1)=PHINT(H1)
    GROUP 13. Boundary conditions and special sources
    Inlet velocities and volume fractions are the same for
    both phases
INLET(INLET,LOW,1,1,1,NY,1,1,1,1)
VALUE(INLET,P1,R1IN*RHO1*WIN);VALUE(INLET,W1,WIN)
VALUE(INLET,H1,PHINT(H1));VALUE(INLET,P2,R2IN*RHO2*WIN)
VALUE(INLET,W2,WIN);VALUE(INLET,H2,PHINT(H2))
 
PATCH(OUTLET,HIGH,1,1,1,NY,NZ,NZ,1,1)
COVAL(OUTLET,P1,1.E3*RHO1,0.0);COVAL(OUTLET,P2,1.E3*RHO2,0.0)
COVAL(OUTLET,H1,ONLYMS,SAME);COVAL(OUTLET,H2,ONLYMS,SAME)
 
MESG(ACTIVATE HEAT TRANSFER?  (Y/N)
READVDU(ANS,CHAR,N)
IF(:ANS:.EQ.Y) THEN
+  WALL(TOP,NORTH,1,1,NY,NY,1,NZ,1,1)
+  COVAL(TOP,H1,LOGLAW,4.5E5)
 
+  WALL(BOT,SOUTH,1,1,1,1,1,NZ,1,1)
+  COVAL(BOT,H1,LOGLAW,4.5E5)
 
+  PATCH(HEATER,NORTH,1,1,NY,NY,NZ1+(NZ2/2)+1,NZ1+NZ2,1,1)
+  COVAL(HEATER,H1,FIXFLU,1E5)
ELSE
+  SOLUTN(H1,Y,N,N,N,N,N)
+  SOLUTN(H2,Y,N,N,N,N,N)
ENDIF
    GROUP 15. Termination of sweeps
LSWEEP=200;SELREF=T;RESFAC=0.1
    GROUP 17. Under-relaxation devices
RELAX(P1,LINRLX,0.5)
REAL(DTF,FAC)
DTF=(L1/NZ1)/WIN
FAC=10
RELAX(V1,FALSDT,0.1*DTF);RELAX(W1,FALSDT,FAC*DTF)
RELAX(V2,FALSDT,0.1*DTF);RELAX(W2,FALSDT,FAC*DTF)
RELAX(H1,FALSDT,FAC*DTF);RELAX(H2,FALSDT,FAC*DTF)
RELAX(MDOT,LINRLX,0.5)
    GROUP 22. Spot-value print-out
IYMON=5;IZMON=32
   Activate graphical convergence monitoring
TSTSWP=-1
    GROUP 23. Field print-out and plot control
  photon use
  p;;;
 
  gr x 1
  msg dense-phase volume-fraction contours
  con r1 x 1 fi;0.1
  msg press return for dense-phase ucrt
  pause; con off; red
  msg dense-phase ucrt
  con vcrt x 1 fi;0.1
  msg press return for dense-phase wcrt
  pause; con off; red
  msg dense-phase wcrt
  con wcrt x 1 fi;0.1
  msg press return for p1
  pause; con off; red
  msg pressure
  con p1 x 1 fi;0.1
  msg press return for dense-phase velocity vectors
  pause; con off; red; gr off;gr ou x 1; red;  vec x 1 sh
 
  enduse