GROUP 1. Run title and other preliminaries
TEXT(HYD. EQ. In XY Tank With Blockages
TITLE
  DISPLAY
  This run solves the hydrostatic pressure field resulting from
  the action of the gravitational force over a fluid enclosed in
  a container with some internal blockages. Note the use of type
  PHASEM in the PATCH used to prescribe the gravity sources; this
  ensures that the right volumes are used in calculating the
  sources.
  ENDDIS
             Density of the liquid ---------- DLIQ
REAL(DLIQ);DLIQ=1.0
 
    GROUP 2. Transience; time-step specification
STEADY=F;GRDPWR(T,1,0.1,1.0)
 
    GROUP 3. X-direction grid specification
GRDPWR(X,6,6.0,1.0)
 
    GROUP 4. Y-direction grid specification
GRDPWR(Y,7,8.0,1.0)
 
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1)
 
    GROUP 9. Properties of the medium (or media)
RHO1=DLIQ;ENUL=1.0E-06
 
    GROUP 11. Initialization of variable or porosity fields
FIINIT(U1)=0.0;FIINIT(V1)=0.0
PATCH(PINIT,LINVLY,1,NX,1,NY,1,1,1,1);INIT(PINIT,P1,9.81,0.0)
CONPOR(0.5,NORTH,1,1,4,4,1,1);CONPOR(0.5,NORTH,6,6,4,4,1,1)
CONPOR(0.75,VOLUME,1,1,4,4,1,1);CONPOR(0.75,VOLUME,6,6,4,4,1,1)
CONPOR(0.5,VOLUME,1,1,5,5,1,1);CONPOR(0.5,VOLUME,6,6,5,5,1,1)
 
    GROUP 13. Boundary conditions and special sources
   ** Reference pressure at the top of the tank (low-y)
PATCH(REFP,CELL,1,NX,1,1,1,1,1,LSTEP);COVAL(REFP,P1,FIXVAL,0.0)
COVAL(REFP,U1,ONLYMS,0.0);COVAL(REFP,V1,ONLYMS,0.0)
   ** Gravity
PATCH(GRAV,PHASEM,1,NX,1,NY,1,1,1,LSTEP)
COVAL(GRAV,V1,FIXFLU,9.81)
 
    GROUP 15. Termination of sweeps
LSWEEP=5
 
    GROUP 17. Under-relaxation devices
RELAX(U1,FALSDT,0.1);RELAX(V1,FALSDT,0.1)
SPEDAT(SET,GXMONI,TRANSIENT,L,F)
    GROUP 21. Print-out of variables
OUTPUT(VPOR,Y,N,N,N,N,N);OUTPUT(NPOR,Y,N,N,N,N,N)
 
    GROUP 22. Spot-value print-out
IXMON=5;IYMON=5