PHOTON USE
  p
 
 
 
 
 
 
  gr ou z 1;gr ou y 1 x 17 22 col 15;gr ou y m x 17 22 col 15
  msg red colour outlines the Heat Source
  msg Press RETURN to continue
  pause
  msg Velocity vectors for the steam
  vec z 1 sh
  msg Press  to continue
  pause
  vec cl;red
  set vec ph 2
  msg Velocity vectors for the water droplets
  vec z 1 sh
  msg Press  to continue
  pause
  vec cl;red
  msg Contours of pressure
  con p1 z 1 fi;.01
  msg Press  to continue
  pause
  con cl;red
  msg Contours of mass transfer rate
  con mdot z 1 fi;.01
  con mdot z 1;va;1;0
  msg Press  to continue
  pause
  con cl;red
  msg Volume fraction of water droplets
  con r2 z 1 fi;.001
  msg Press e to END
  enduse
    GROUP 1  Run title
TEXT(Boiling Droplets in a Duct
TITLE
mesg(PC486/50 time last reported as 2.5 min
  DISPLAY
  BOILING DROPLETS IN A DUCT
  2-dimensional (x-y), BFC, steady, elliptic simulation
 
  In this case the saturated water droplets enter the
  S-shaped duct, and then boil to produce steam.
             |  |
             |  |    heat source
             |  |    /
             |  \___|__
             \          \
              --------\  \
        sat.  ________/  /
           -->          /
        water ---------/
  enddis
 
REAL(REYNO,WIN,DIAM)
DIAM=.3;WIN=10.0
    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)
DIAM=0.03;L1=0.1;L2=0.1;L3=0.1
RAD1=.02;RAD2=.02
NZ1=6;NZ2=10;NZ3=6;NZ4=5;NZ5=6
NX=NZ1+NZ2+NZ3+NZ4+NZ5
GSET(D,NX,8,1,L1+L2+L3+RAD1+RAD2,DIAM,.1)
IZ2=NZ1+1
GSET(C,I:IZ2:,F,I1,+,L1,0,0,INC,-1.5)
IZ1=IZ2;IZ2=IZ1+NZ2
GSET(C,I:IZ2:,F,I:IZ1:,RZ,3.14159,L1,DIAM+RAD1,INC,1)
IZ1=IZ2;IZ2=IZ1+NZ3
GSET(C,I:IZ2:,F,I:IZ1:,+,-L2,0,0,INC,S1.5)
IZ1=IZ2;IZ2=IZ1+NZ4
GSET(C,I:IZ2:,F,I:IZ1:,RZ,-3.14159/2,L1-L2,2*(DIAM+RAD1)+RAD2,INC,1)
IZ1=IZ2;IZ2=IZ1+NZ5
GSET(C,I:IZ2:,F,I:IZ1:,+,0,L3,0,INC,1.5)
   ** Set uup=t to account better for the high curvature of
      the u resolute...
UUP=T
    GROUP 7. Variables stored, solved & named
SOLVE(P1,V1,U1);SOLUTN(P1,Y,Y,Y,N,N,N);ONEPHS=F;SOLVE(V2,U2,R2)
STORE(R1);SOLVE(H2,H1)
STORE(CFIPS,MDOT,TMP1,TMP2)
    GROUP 9. Properties of the medium (or media)
ENUL=1.25e-4
ENUL
REYNO=ENUL*WIN/DIAM
REYNO
ENUT=100*ENUL;RHO1=0.5;RHO2=950;PHINT(H2)=4E5;PHINT(H1)=2.5E6
PRNDTL(H2)=1.73;PRNDTL(H1)=0.97
TMP1=LINH;TMP1A=-273;CP1=6702
TMP2=LINH;TMP2A=-273;CP2=1072
    GROUP 11. Initialization of variable or porosity fields
REAL(R1IN,R2IN);R1IN=0.95;R2IN=1-R1IN
FIINIT(R1)=R1IN;FIINIT(R2)=R2IN;FIINIT(U1)=WIN;FIINIT(U2)=WIN
FIINIT(H2)=3.99E5;FIINIT(H1)=2.5E6
    Activate interphase drag law Cd = 24/Re for droplet diam .01mm
CFIPS=18*ENUL/(.01E-3**2)
    Heat transfer for Nu = 2
CINT(H2)=2/3 * (1/PRNDTL(H2));CINT(H1)=2/3 * (1/PRNDTL(H1))
    Mass transfer from heat balance
CMDOT=HEATBL
    GROUP 13. Boundary conditions and special sources
INLET(INLET,WEST,1,1,1,NY,1,1,1,1);VALUE(INLET,P1,R1IN*RHO1*WIN)
VALUE(INLET,U1,WIN);VALUE(INLET,H1,2.5E6)
VALUE(INLET,P2,R2IN*RHO2*WIN);VALUE(INLET,U2,WIN)
VALUE(INLET,H2,3.99E5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FAC*DTF)
RELAX(V2,FALSDT,FAC*DTF);RELAX(U2,FALSDT,FAC*DTF)
RELAX(H2,FALSDT,FAC*DTF);RELAX(H1,FALSDT,FAC*DTF)
RELAX(MDOT,LINRLX,0.1)
RELAX(R1,LINRLX,0.2);RELAX(R2,LINRLX,0.2)
    GROUP 22. Spot-value print-out
IYMON=NY/2;IXMON=NZ1+NZ2+NZ3+2
SELREF=T; RESFAC=1.E-2
TSTSWP=-1
    GROUP 23. Field print-out and plot control
+ do ii=1,5
+   mesg(
+ enddo
mesg( Initial data that can be changed:
+ mesga( Inlet velocity is set to :WIN: m/s
+ mesg( Droplet diameter is set to 1. e-5 m
+ mesg( Volume fraction of the first phase is :r1in:
mesga( Do you want to change settings (y/n)? (Default n)
readvdu(ans,char,n)
 
if(:ans:.eq.y) then
+ do ii=1,5
+   mesg(
+ enddo
+ mesga( Change inlet velocity (default :WIN: m/s)
+ readvdu(win,real,:WIN:)
 
+ do ii=1,5
+   mesg(
+ enddo
+ real(rt1)
+ mesga( Change droplet diameter (default 1. e-5 m)
+ readvdu(rt1,real,1.e-5)
 
+ do ii=1,5
+   mesg(
+ enddo
+ mesga( Change volume fraction of the first phase (default :r1in:)
+ readvdu(r1in,real,:r1in:)
+ r2in=1-r1in
+ FIINIT(u1)=WIN;FIINIT(u2)=WIN;fiinit(r1)=r1in;fiinit(r2)=r2in
+ VALUE(INLET,P1,r1in*RHO1*WIN);VALUE(INLET,u1,WIN)
+ VALUE(INLET,P2,r2in*RHO2*WIN);VALUE(INLET,u2,WIN)
+ cfips=18*enul/(rt1**2)
+ dtf=l1/win/nz1
+ RELAX(V1,FALSDT,fac*dtf);RELAX(u1,FALSDT,fac*dtf)
+ RELAX(V2,FALSDT,fac*dtf);RELAX(u2,FALSDT,fac*dtf)
+ relax(h2,falsdt,fac*dtf);relax(h1,falsdt,fac*dtf)
endif