AUTOPLOT USE
  file
  phi 5
 
  da 1
  p1
  screen
  msg pressure
  pl 1
  msg press  to continue
  pause
  cl
  da 1
  u1 x 1 79
  screen
  msg gas velocity
  pl 1
  msg press  to continue
  pause
  cl
  da 1
  vliq x 1 79
  screen
  msg liquid velocity
  pl 1
  msg press  to continue
  pause
  cl
  da 1
  liq
  screen
  msg liquid volume fraction
  pl 1
  msg press  to continue
  pause
  cl
  da 1
  iliq
  screen
  msg liquid enthalpy
  pl 1
  msg press e to END
  enduse
 
    GROUP 1. Run title
TEXT(BOILING , NO GRAVITY :              W887
TITLE
    NUMERICAL BENCHMARK PROBLEM 1.3   STEADY BOILING IN A PIPE
  DISPLAY
    Description of flow.
    Saturated water enters a pipe of 1 m length, the first
    0.25 m of which are unheated. Heat is supplied to the
    remainder of the pipe at a fixed rate (see group 13
    below). The processes considered are:-
    * heat transfer from the wall to the liquid;
    * heat transfer from the liquid to the steam-water
      interface;
    * mass transfer across the interface, at a rate determined
      by the heat balance;
    * heat transfer between the interface and the bulk of the
      steam;
    * momentum transfer (friction) between the water and the
      steam;
    * pressure-gradient and inertia effects on the water and the
      steam.
    The task is to calculate the steady-state distributions
    along the pipe of pressure, volume fractions, enthalpies,
    and velocities.
  ENDDIS
 
REAL(CHATIM,REFMAS,VELCTY,HEAT,XLEN,SIDE,AREA)
VELCTY=0.01;HEAT=1.E5;XLEN=1.0;SIDE=0.01;AREA=SIDE*SIDE
    GROUP 2. Transience; time-step specification
    GROUP 3. X-direction grid specification
GRDPWR(X,80,XLEN,1.0);YVLAST=SIDE;ZWLAST=SIDE
    GROUP 4. Y-direction grid specification
    GROUP 5. Z-direction grid specification
    GROUP 6. Body-fitted coordinates or grid distortion
    GROUP 7. Variables stored, solved & named
ONEPHS=F;SOLVE(P1,U1,U2,H1,H2,R1,R2)
NAME(R1)=GAS;NAME(R2)=LIQ;NAME(U2)=VLIQ;NAME(H2)=ILIQ
  ** Provide storage for inter-phase mass transfer
STORE(MDOT)
    GROUP 8. Terms (in differential equations) & devices
  ** Cut off built-in sources and diffusion terms
TERMS(H1,N,Y,N,Y,Y,Y);TERMS(ILIQ,N,Y,N,Y,N,Y)
TERMS(GAS,Y,Y,N,Y,Y,Y);TERMS(LIQ,Y,Y,N,Y,N,Y)
TERMS(U1,Y,Y,N,Y,Y,Y);TERMS(VLIQ,Y,Y,N,Y,N,Y)
    GROUP 9. Properties of the medium (or media)
RHO2=1.E3;ENUL=0.0
    GROUP 10. Inter-phase-transfer processes and properties
  ** Set constant inter-phase friction factor and activate
     the calculation of the inter-phase mass transfer by
     means of a heat balance between the two phases.
     Note that the minus sign is merely a signal to use the
     second-phase density.
CFIPS=-50.0;CMDOT=HEATBL
  ** Set the inter-phase heat transfer coefficients
CINT(H1)=1.E-2;CINT(ILIQ)=1.E0
MESG(Cut out inter-phase friction? (y/n)
READVDU(ANS,CHAR,N)
IF(:ANS:.EQ.Y) THEN
 CFIPS=CFIPS*1.E-5
 CINT(H1)=CINT(H1)*1.E5
 CINT(ILIQ)=CINT(ILIQ)*1.E5
ENDIF
  ** Set the values of the enthalpies at the interface
PHINT(H1)=2.5E6;PHINT(ILIQ)=4.0E5
    GROUP 11. Initialization of variable or porosity fields
FIINIT(GAS)=1.E-2;FIINIT(LIQ)=0.99
FIINIT(H1)=2.5E6;FIINIT(ILIQ)=4.0E5
FIINIT(U1)=VELCTY;FIINIT(VLIQ)=VELCTY;FIINIT(MDOT)=0.0
    GROUP 13. Boundary conditions and special sources
  ** Inlet at low-x (west) end
INLET(INLET,WEST,1,1,1,1,1,1,1,1)
VALUE(INLET,P2,VELCTY*RHO2)
VALUE(INLET,VLIQ,VELCTY)
VALUE(INLET,ILIQ,4.0E5)
  ** Outlet at high-x (east)
PATCH(OUTLET,CELL,NX,NX,1,1,1,1,1,1)
COVAL(OUTLET,P1,1.0,0.0);COVAL(OUTLET,P2,1.0*RHO2,0.0)
COVAL(OUTLET,U1,ONLYMS,0.0);COVAL(OUTLET,VLIQ,ONLYMS,0.0)
COVAL(OUTLET,H1,ONLYMS,SAME);COVAL(OUTLET,ILIQ,ONLYMS,SAME)
  ** Heated region
PATCH(HOTWALL,PHASEM,NX/4+1,NX,1,1,1,1,1,1)
COVAL(HOTWALL,ILIQ,FIXFLU,HEAT)
    GROUP 15. Termination of sweeps
LSWEEP=500;SELREF=T;RESFAC=0.01
    GROUP 16. Termination of iterations
    GROUP 17. Under-relaxation devices
CHATIM=0.01*XLEN/VELCTY
RELAX(P1,LINRLX,0.8)
RELAX(U1,FALSDT,CHATIM);RELAX(VLIQ,FALSDT,CHATIM)
RELAX(H1,FALSDT,0.1);RELAX(ILIQ,FALSDT,0.1)
RELAX(GAS,LINRLX,0.3);RELAX(LIQ,LINRLX,0.3)
    GROUP 22. Spot-value print-out
TSTSWP=-1;IXMON=NX/2
    GROUP 23. Field print-out and plot control
IPLTF=3;IPLTL=LSWEEP;NPLT=LSWEEP/20;ORSIZ=0.4;ITABL=1
PATCH(LONGPLOT,PROFIL,1,NX,1,1,1,1,1,1);PLOT(LONGPLOT,P1,0.0,0.0)
PLOT(LONGPLOT,LIQ,0.0,0.0);PLOT(LONGPLOT,U1,-1.0,-1.0)
PLOT(LONGPLOT,VLIQ,-1.0,-1.0);PLOT(LONGPLOT,MDOT,0.0,0.0)
    GROUP 24. Dumps for restarts