AUTOPLOT USE
  file
  phi 5
 
  da 1
  au1
  screen
  msg 1st-phase velocity at t=1s
  pl 1
  msg press  to continue
  pause
  cl
  da 1
  bu2
  screen
  msg 2nd-phase velocity at t=1s
  pl 1
  msg press  to continue
  pause
  cl
  da 1
  gas
  screen
  msg 1st-phase volume fraction at t=1s
  pl 1
  msg press  to continue
  pause
  cl
  da 1
  dh2
  screen
  msg 2nd-phase enthalpy at t=1s
  pl 1
  msg press  to continue
  pause
  cl
  da 1
  p1
  screen
  msg pressure at t=1s
  pl 1
  msg press e to END
  enduse
    GROUP 1. Run title and other preliminaries
TEXT(1D TRANSIENT THERMOSYPHON :         W422
TITLE
  DISPLAY
  This run illustrates what happens in a 1D thermosyphon with a
  constant heat-flux boundary condition.
  Interesting variants include: changes to the boundary conditions;
  changes to the initial distributions of water and steam;and
  changes to the interphase processes constants.
  ENDDIS
    GROUP 2. Transience; time-step specification
STEADY=F;GRDPWR(T,100,1.E0,1.0)
    GROUP 3. X-direction grid specification
GRDPWR(X,10,0.5,1.0)
    GROUP 7. Variables stored, solved & named
ONEPHS=F;SOLVE(P1,U1,U2,R1,R2,H1,H2)
NAME(U1)=AU1;NAME(U2)=BU2;NAME(H1)=CH1;NAME(H2)=DH2
NAME(R1)=GAS;NAME(R2)=LIQ
  ** Provide storage for inter-phase mass transfer
STORE(MDOT,TMP1,TMP2)
    GROUP 9. Properties of the medium (or media)
  ** Set temperature to TMP1A+TMP1B*H1 for phase 1 and
     to TMP2A+TMP2B*H2 for phase 2.
TMP1=LINH;TMP1A=-1.15E3;CP1=1./5.0E-4
TMP2=LINH;TMP2A=0.0;CP2=1./2.5E-4
PRESS0=1.E5;RHO2=1000.0
    GROUP 10. Inter-phase-transfer processes and properties
  ** Set a constant inter-phase friction factor, activate
     the computation of inter-phase mass transfer by means
     of a heat balance and set the inter-phase heat transfer
     coefficient for both phases
CFIPS=1.E2;CMDOT=HEATBL;CINT(CH1)=1.E3;CINT(DH2)=1.E3
  ** Set the enthalpy values at the interface
PHINT(CH1)=2.5E6;PHINT(DH2)=4.0E5
    GROUP 11. Initialization of variable or porosity fields
FIINIT(GAS)=0.9;FIINIT(LIQ)=0.1;FIINIT(CH1)=2.5E6
FIINIT(DH2)=4.0E5
    GROUP 13. Boundary conditions and special sources
  ** Heat input to water at bottom
PATCH(HEATER,CELL,1,1,1,1,1,1,1,LSTEP)
COVAL(HEATER,DH2,FIXFLU,1.E7)
  ** Pressure held to zero at top, and water temperature fixed
PATCH(REFP,CELL,NX,NX,1,1,1,1,1,LSTEP)
COVAL(REFP,P1,FIXP,0.0);COVAL(REFP,DH2,FIXVAL,3.9E5)
COVAL(REFP,CH1,ONLYMS,2.5E6);COVAL(REFP,AU1,ONLYMS,0.0)
COVAL(REFP,BU2,ONLYMS,0.0)
  ** Gravity operating on both phases
PATCH(BUOYANCY,PHASEM,1,NX,1,1,1,1,1,LSTEP)
COVAL(BUOYANCY,AU1,FIXFLU,-9.81)
COVAL(BUOYANCY,BU2,FIXFLU,-9.81)
    GROUP 15. Termination of sweeps
LSWEEP=40
    GROUP 16. Termination of iterations
RESREF(GAS)=1.E-4;RESREF(LIQ)=1.E-4;RESREF(CH1)=1.E-4
RESREF(DH2)=1.E-4
    GROUP 17. Under-relaxation devices
RELAX(GAS,LINRLX,0.5);RELAX(LIQ,LINRLX,0.5)
SPEDAT(SET,GXMONI,TRANSIENT,L,F)
    GROUP 23. Field print-out and plot control
TSTSWP=-1;NPLT=1
PATCH(LONGPLOT,PROFIL,1,NX,1,1,1,1,1,LSTEP)
PLOT(LONGPLOT,LIQ,0.0,0.0);PLOT(LONGPLOT,AU1,0.0,0.0)
PATCH(TIMEPLOT,PROFIL,1,1,1,1,1,1,1,LSTEP)
PLOT(TIMEPLOT,LIQ,0.0,0.0)
PATCH(TIM1PLOT,PROFIL,NX,NX,1,1,1,1,1,LSTEP)
PLOT(TIM1PLOT,GAS,0.0,0.0)