PHOTON USE
  p
  phi
  5 1
 
 
 
  msg grid
  gr z 1
  msg Press  to continue
  pause
  cl
  msg 1st-phase velocity vectors at t=5s
  set vec ref;1
  set vec comp
  au1 cv1 -
  vec z 1 sh
  gr ou z 1
  msg Press  to continue
  pause
  cl
  msg 2nd-phase velocity vectors at t=5s
  set vec ref;1
  set vec comp
  bu2 dv2 -
  vec z 1 sh
  gr ou z 1
  msg Press  to continue
  pause
  cl
  msg contour of pressure at t=5s
  con p1 z 1 fi;0.002
  gr ou z 1
  msg Press  to continue
  pause
  cl
  msg contour of 1st-phase volume fraction at t=5s
  con r1 z 1 fi;0.002
  gr ou z 1
  msg Press  to continue
  pause
  cl
  msg contour of 1st-phase volume fraction at t=5s
  con r2 z 1 fi;0.002
  gr ou z 1
  msg Press e to END
  enduse
    GROUP 1. Run title and other preliminaries
TEXT(THE TILTING OF A BOX :              W427
TITLE
  DISPLAY
  A light fluid lies above a heavy one in a box which is
  suddenly tilted, so that gravity acts along the diagonal.
  Friction at the walls is neglected.
 
  The donor-acceptor option is activated, in Group 8, so as
  to diminish the extent of the blurring of the interface, which
  it does not however eliminate entirely. That it does some good
  can be checked by re-running with DONACC=F.
  ENDDIS
    GROUP 2. Transience; time-step specification
STEADY=F;GRDPWR(T,10,0.1,1.0)
    GROUP 3. X-direction grid specification
GRDPWR(X,5,1.0,1.0)
    GROUP 4. Y-direction grid specification
GRDPWR(Y,5,1.0,1.0)
    GROUP 7. Variables stored, solved & named
ONEPHS=F;SOLVE(P1,U1,V1,U2,V2,R1,R2)
NAME(U1)=AU1;NAME(U2)=BU2;NAME(V1)=CV1;NAME(V2)=DV2
    GROUP 8. Terms (in differential equations) & devices
RLOLIM=0.01;RUPLIM=1.0-RLOLIM;DONACC=T
    GROUP 9. Properties of the medium (or media)
RHO2=1.E3;ENUL=1.E-3
    GROUP 10. Inter-phase-transfer processes and properties
CFIPS=1.E9
    GROUP 11. Initialization of variable or porosity fields
FIINIT(R1)=1.0;FIINIT(R2)=0.0;FIINIT(P1)=0.0
FIINIT(AU1)=0.;FIINIT(CV1)=0.;FIINIT(BU2)=0.;FIINIT(DV2)=0.
INIADD=T
PATCH(INIT,INIVAL,1,NX,1,2,1,1,1,1)
INIT(INIT,R1,0.0,-1.0);INIT(INIT,R2,0.0,1.0)
INIT(INIT,P1,0.0,1.0E3)
    GROUP 13. Boundary conditions and special sources
  ** Pressure relief
PATCH(REFP,CELL,NX,NX,NY,NY,1,1,1,LSTEP);COVAL(REFP,P1,FIXVAL,0.0)
  ** Gravity
PATCH(GRAVITY,PHASEM,1,NX,1,NY,1,1,1,LSTEP)
COVAL(GRAVITY,AU1,FIXFLU,-10.0);COVAL(GRAVITY,BU2,FIXFLU,-10.0)
COVAL(GRAVITY,CV1,FIXFLU,-10.0);COVAL(GRAVITY,DV2,FIXFLU,-10.0)
    GROUP 15. Termination of sweeps
LSWEEP=20;RESREF(P1)=1.E-5;RESREF(R1)=1.E-5;RESREF(R2)=1.E-5
    GROUP 17. Under-relaxation devices
RELAX(R1,LINRLX,0.25);RELAX(R2,LINRLX,0.25)
RELAX(AU1,FALSDT,0.01);RELAX(CV1,FALSDT,0.01)
RELAX(BU2,FALSDT,0.01);RELAX(DV2,FALSDT,0.01)
    GROUP 19. Data communicated by satellite to GROUND
USEGRX=F
SPEDAT(SET,GXMONI,TRANSIENT,L,F)
    GROUP 21. Print-out of variables
OUTPUT(R2,N,N,N,N,N,N)
    GROUP 22. Spot-value print-out
IXMON=4;IYMON=4;TSTSWP=-1
    GROUP 23. Field print-out and plot control
NTPRIN=LSTEP/5;ITABL=1;IPLTL=LSWEEP
PATCH(CONT,CONTUR,1,NX,1,NY,1,1,1,LSTEP);PLOT(CONT,R2,0.0,10)