PHOTON USE
  p
  n1
 
 
 
  up z
  gr x 1
  msg contours of vfol at time = 0.05s
  con vfol x 1 sh;0.45 0.55 40
  msg velocity vectors
  vec x 1
  pause
  p
  n2
 
 
 
  up z
  gr x 1
  msg contours of vfol at time = 0.10s
  con vfol x 1 sh;0.45 0.55 40
  msg velocity vectors
  vec x 1
  pause
  p
  n3
 
 
 
  up z
  gr x 1
  msg contours of vfol at time = 0.15s
  con vfol x 1 sh;0.45 0.55 40
  msg velocity vectors
  vec x 1
  pause
  p
  n4
 
 
 
  up z
  gr x 1
  msg contours of vfol at time = 0.20s
  con vfol x 1 sh;0.45 0.55 40
  msg velocity vectors
  vec x 1
  pause
  p
  n5
 
 
 
  up z
  gr x 1
  msg contours of vfol at time = 0.25s
  con vfol x 1 sh;0.45 0.55 40
  msg velocity vectors
  vec x 1
  pause
  p
  n6
 
 
 
  up z
  gr x 1
  msg contours of vfol at time = 0.30s
  con vfol x 1 sh;0.45 0.55 40
  msg velocity vectors
  vec x 1
  pause
  p
  n7
 
 
 
  up z
  gr x 1
  msg contours of vfol at time = 0.35s
  con vfol x 1 sh;0.45 0.55 40
  msg velocity vectors
  vec x 1
  pause
  p
  n8
 
 
 
  up z
  gr x 1
  msg contours of vfol at time = 0.40s
  con vfol x 1 sh;0.45 0.55 40
  msg velocity vectors
  vec x 1
  pause
  p
  n9
 
 
 
  up z
  gr x 1
  msg contours of vfol at time = 0.45s
  con vfol x 1 sh;0.45 0.55 40
  msg velocity vectors
  vec x 1
  pause
  p
  n10
 
 
 
  up z
  gr x 1
  msg contours of vfol at time = 0.50s
  con vfol x 1 sh;0.45 0.55 40
  msg velocity vectors
  vec x 1
  msg            -
  msg Press e to END
  enduse
 
    GROUP 1. Run title and other preliminaries
TEXT(SLUMPING OF A LIQUID COLUMN BY HOL:P102
TITLE
  DISPLAY
  FREE SURFACE EXAMPLES - Slumping of a column of liquid
                               HOL method
 
  2-dimensional (y-z), Cartesian, transient, elliptic simulation
 
  This case simulates the slumping of a  liquid column that
  may arise, for example, when container walls break down.
  In addition an obstacle can be errected in the path of the liquid.
 
               liquid
            |   column
            |------                   z ^
            | - - |                     |
            |  -  |                     +----->
            | --  |      | wall              y
            |  -- |      |
            |_____|______|___
            /////////////////
  enddis
 
    GROUP 2. Transience; time-step specification
STEADY=F;LSTEP=30;LSTEP=10;TFRAC(1)=-LSTEP;TFRAC(2)= 0.050
    GROUP 4. Y-direction grid specification
GRDPWR(Y,20,2.0,1.0);NY=10
    GROUP 5. Z-direction grid specification
GRDPWR(Z,16,0.5,1.0);NZ=10
    GROUP 7. Variables stored, solved & named
STORE(DEN1,PRPS);SOLVE(VFOL)
SOLUTN(P1,Y,Y,Y,N,N,N);SOLUTN(V1,Y,Y,N,N,N,N)
SOLUTN(W1,Y,Y,N,N,N,N)
    GROUP 8. Terms (in differential equations) & devices
  ** activate the "gas-and-liquid algorithm", ie volumetric
     continuity equation, and allow convection fluxes to be
     modified in GROUND
GALA=T;TERMS(VFOL,N,N,N,N,P,P)
    GROUP 9. Properties of the medium (or media)
  ** signal that density is to be computed by the HOL method
     and set the densities of the liquid and gas respectively

    GROUP 11. Initialization of variable or porosity fields
FIINIT(P1)=0.0;FIINIT(V1)=0.0;FIINIT(W1)=0.0;FIINIT(VFOL)=0.0
FIINIT(DEN1)=1.189;INIADD=F
  ** place the initial "pile" of liquid of which the slumping
     is to be simulated
PATCH(LIQUID,INIVAL,1,NX,1,4,1,NZ-4,1,1)
  ** redefine patch for reduced grid
PATCH(LIQUID,INIVAL,1,NX,1,NY/2,1,NZ/2,1,1)
COVAL(LIQUID,VFOL,ZERO,1.E0);COVAL(LIQUID,DEN1,ZERO,1000.5)
  ** Activate the next two lines to insert a containment wall
  PATCH(WALL,NORTH,1,1,3*NY/4,3*NY/4,1,NZ/4,1,LSTEP)
  COVAL(WALL,V1,FIXVAL,0.0)
    GROUP 13. Boundary conditions and special sources
  ** the pressure is held to zero along the open top boundary
PATCH(REFP,CELL,1,NX,1,NY,NZ,NZ,1,LSTEP);COVAL(REFP,P1,FIXP,ZERO)
  ** provide for the gravity-force source of w1
PATCH(GRAV,PHASEM,1,NX,1,NY,1,NZ,1,LSTEP)
COVAL(GRAV,W1,FIXFLU,-9.81)
    GROUP 15. Termination of sweeps
LSWEEP=10
    GROUP 16. Termination of iterations
RESREF(P1)=1.E-6;RESREF(V1)=1.E-6;RESREF(W1)=1.E-6
    GROUP 17. Under-relaxation devices
RELAX(V1,FALSDT,0.01);RELAX(W1,FALSDT,0.01)
    GROUP 19. Data communicated by satellite to GROUND
  ** provide for the dumping of field data at each time
     step, for us by PHOTON
IDISPB=1;IDISPC=LSTEP;IDISPA=1;CSG1=N;HOL=T;IHOLA=3
IPRPSA=67;IPRPSB=0
SPEDAT(SET,GXMONI,TRANSIENT,L,F)
    GROUP 22. Spot-value print-out
TSTSWP=-1;IYMON=NY/2;IZMON=NZ/2
    GROUP 23. Field print-out and plot control
NTPRIN=1
OUTPUT( P1 ,Y,Y,Y,Y,Y,Y);OUTPUT( V1 ,Y,Y,Y,Y,Y,Y)
OUTPUT( W1 ,Y,Y,Y,Y,Y,Y);OUTPUT(VFOL,Y,N,y,N,N,N)
OUTPUT(DEN1,Y,N,y,N,N,N)
  ** provide contour-plot output on the line printer
PATCH(MAP,CONTUR,1,1,1,NY,1,NZ,1,LSTEP);PLOT(MAP,VFOL,ZERO,1)