AUTOPLOT USE
  file
  phi 5
 
  da 1
  1u
  screen
  msg 1st-phase (gas) velocity at t=1s
  pl 1
  msg press  to continue
  pause
  cl
  da 1
  2u
  screen
  msg 2nd-phase (liquid) velocity at t=1s
  pl 1
  msg press  to continue
  pause
  cl
  da 1
  gas
  screen
  msg 1st-phase (gas) volume fraction at t=1s
  pl 1
  msg press  to continue
  pause
  cl
  da 1
  liq
  screen
  msg 2nd-phase (liquid) volume fraction 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
TEXT(STRATIFIED FLOW, CASE 1 CHANNEL :   W900
TITLE
  DISPLAY
    NUMERICAL BENCHMARK PROBLEM 2.7: STRATIFIED FLOW
    A horizontal duct is divided into two equal-length parts
    by a diaphragm, each of which contains both water and air,
    the former lying below the latter. The depth of the water
    is somewhat greater on the left of the diaphragm than it
    is on the right.
 
    The diaphragm is supposed suddenly to break; the task is
    then to calculate what happens during the next few
    seconds, during which the water and air are set in
    motion, in opposite direction, as gravity waves travel
    from the diaphragm-rupture point towards the two ends.
 
    Two cases are to be considered, differing in respect of
    the postulated cross-section of the duct. In case 1 it
    is square, whereas in case 2 it is circular.
      _________________________________________________
      i                        :--->diaphragm          i
      i                        :                       i
      i------------------------:                       i
      i =    =   =   =  =  =   :                       i
      i   =    =   =   =       :-----------------------i
      i =   =    water    =    :      air              i
      i   =  =    =     =    = :                       i
      _________________________________________________
      |                        |                       |
      |<------- 5 m ---------->|                       |
      |<---------------- 10 m ------------------------>|
  ENDDIS
 
    GROUP 2. Transience; time-step specification
STEADY=F
LSTEP=100;TFRAC(1)=-100.0;TFRAC(2)=0.01
    GROUP 3. X-direction grid specification
GRDPWR(X,100,10.0,1.0)
    GROUP 7. Variables stored, solved & named
ONEPHS=F;SOLVE(P1,U1,U2,R2,R1)
NAME(U1)=1U;NAME(U2)=2U
NAME(R1)=GAS;NAME(R2)=LIQ
    GROUP 8. Terms (in differential equations) & devices
  ** Cut off built-in sources and diffusion terms
TERMS(GAS,Y,Y,N,Y,Y,Y);TERMS(LIQ,Y,Y,N,Y,N,Y)
TERMS(1U,Y,Y,N,Y,Y,Y);TERMS(2U,Y,Y,N,Y,N,Y)
    GROUP 9. Properties of the medium (or media)
RHO2=1.0E3
    GROUP 11. Initialization of variable or porosity fields
FIINIT(LIQ)=0.51;FIINIT(GAS)=0.49
FIINIT(1U)=0.0;FIINIT(2U)=0.0
INIADD=T
PATCH(START,INIVAL,NX/2+1,NX,1,1,1,1,1,1)
INIT(START,LIQ,0.0,-0.02);INIT(START,GAS,0.0,0.02)
    GROUP 13. Boundary conditions and special sources
    Because the compressibility of the air is neglected in
    this calculation, it is necessary to introduce an imaginary
    aperture connecting the air space with a fixed-pressure
    region; for otherwise the pressure is not determined.
PATCH(RELIEF,CELL,NX/2,NX/2,1,1,1,1,1,LSTEP)
COVAL(RELIEF,P1,FIXP,0.0)
    The following two lines activate the momentum-source
    term which represents the effect of the gravitational
    acceleration lateral to the channel.
PATCH(LATG,RGRAD,1,NX,1,1,1,1,1,LSTEP)
COVAL(LATG,2U,0.0,9.81*(RHO2-RHO1))
    GROUP 15. Termination of sweeps
LSWEEP=30
    GROUP 16. Termination of iterations
RESREF(P1)=1.E-6;RESREF(1U)=1.E-4;RESREF(2U)=1.E-4
RESREF(GAS)=1.E-6;RESREF(LIQ)=1.E-6
    GROUP 17. Under-relaxation devices
RELAX(1U,FALSDT,0.01);RELAX(2U,FALSDT,0.01)
RELAX(GAS,LINRLX,0.3);RELAX(LIQ,LINRLX,0.3)
SPEDAT(SET,GXMONI,TRANSIENT,L,F)
    GROUP 21. Print-out of variables
NTPRIN=LSTEP/2;NXPRIN=NX/10
    GROUP 22. Spot-value print-out
IPLTL=LSWEEP;ITABL=1;NXPRIN=NX/20
TSTSWP=-1;IXMON=NX/2+1;NPLT=1
    GROUP 23. Field print-out and plot control
PATCH(LONGPLOT,PROFIL,1,NX,1,1,1,1,1,LSTEP)
COVAL(LONGPLOT,LIQ,0.0,0.0);COVAL(LONGPLOT,2U,-1.0,-1.0)
COVAL(LONGPLOT,1U,-1.0,-1.0)
PATCH(TIMEPLOT,PROFIL,NX/4,NX/4,1,1,1,1,1,LSTEP)
COVAL(TIMEPLOT,2U,-1.0,-1.0);COVAL(TIMEPLOT,LIQ,0.0,0.0)
COVAL(TIMEPLOT,1U,-1.0,-1.0)
ORSIZ=0.4
    GROUP 24. Dumps for restarts