```

PHOTON USE
p
n10

set vec ref
2.5
rot z
180
msg(    formation of water jet and vector field at t=0.1s
gr ou x 1
con den1 x 1 fi
0.01
vec x 1
pause
p
n20

set vec ref
2.5
rot z
180
msg(    formation of water jet and vector field at t=0.2s
gr ou x 1
con den1 x 1 fi
0.01
vec x 1
pause
p
n30

set vec ref
2.5
rot z
180
msg(    formation of water jet and vector field at t=0.3s
gr ou x 1
con den1 x 1 fi
0.01
vec x 1
pause
p
n40

set vec ref
2.5
rot z
180
msg(    formation of water jet and vector field at t=0.4s
gr ou x 1
con den1 x 1 fi
0.01
vec x 1
msg            -
msg Press e to END
enduse

GROUP 1. Run title and other preliminaries
TEXT(FALLING WATER JET - SEM METHOD)
TITLE
DISPLAY
FREE SURFACE EXAMPLES - Falling Water Jet
Scalar Equation Method (SEM)

2-dimensional (y-z), Cartesian, transient, elliptic simulation

This case models discharge of water through the hole at the bottom
of the tank. Sketch of the problem is given below.

water
|    |     |
symetry plane       v     |                  z
|    hole  |  tank        +---->
/      |              |
|   -------+              v y
|   air
|   |
|- water jet
|  |
enddis

GROUP 2. Transience; time-step specification
GROUP 4. Y-direction grid specification
NREGY=2
INTEGER(NY1,NY2);NY1=5;NY2=7
IREGY=1;GRDPWR(Y,NY1,0.30,0.7)
IREGY=2;GRDPWR(Y,NY2,0.20,1.0)
GROUP 5. Z-direction grid specification
NREGZ=2
INTEGER(NZ1,NZ2);NZ1=7;NZ2=5
IREGZ=1;GRDPWR(Z,NZ1,0.05,1.0)
IREGZ=2;GRDPWR(Z,NZ2,0.10,1.5)
GROUP 7. Variables stored, solved & named
STORE(DEN1,PRPS);SOLVE(VFOL,SURN)
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
GALA=T;TERMS(VFOL,N,N,N,N,P,P);TERMS(SURN,N,N,N,N,P,P)
GROUP 9. Properties of the medium (or media)

GROUP 11. Initialization of variable or porosity fields
REAL(UIN);UIN=0.2
FIINIT(P1)=0.0;FIINIT(V1)=UIN;FIINIT(W1)=0.0;FIINIT(SURN)=0.0
PATCH(LIQ1,INIVAL,1,NX,1,NY1,1,NZ,1,1)
COVAL(LIQ1,SURN,ZERO,1.0);COVAL(LIQ1,DEN1,ZERO,998)
PATCH(LIQ2,INIVAL,1,NX,NY1+1,NY,1,NZ1,1,1)
COVAL(LIQ2,SURN,ZERO,1.0);COVAL(LIQ2,DEN1,ZERO,998)
GROUP 13. Boundary conditions and special sources
** incoming water
PATCH(INLET,SOUTH,1,NX,1,1,1,NZ,1,LSTEP)
COVAL(INLET,P1,FIXFLU,UIN*998.0);COVAL(INLET,V1,ONLYMS,UIN)
COVAL(INLET,SURN,FIXFLU,UIN*1.0);COVAL(INLET,VFOL,ONLYMS,1.0/998.0)
** outgoing water and air
PATCH(EXIT,NORTH,1,NX,NY,NY,1,NZ,1,LSTEP)
COVAL(EXIT,P1,GRND1,0.0);COVAL(EXIT,SURN,FIXFLU,GRND1)
PATCH(SIDE,CELL,1,NX,NY1+1,NY,NZ,NZ,1,LSTEP)
COVAL(SIDE,P1,FIXP,0.0)
** tank bottom
PATCH(FIXV,NORTH,1,NX,NY1,NY1,NZ1+1,NZ,1,LSTEP)
COVAL(FIXV,V1,FIXVAL,0.0)
** tank side wall
PATCH(TWAL,HWALL,1,NX,1,NY1,NZ,NZ,1,LSTEP)
COVAL(TWAL,V1,1.0,0.0)
** gravity force
PATCH(GRAV,PHASEM,1,NX,1,NY,1,NZ,1,LSTEP)
COVAL(GRAV,V1,FIXFLU,9.81)
** time patch
PATCH(TCON,CELL,1,NX,1,NY,1,NZ,1,LSTEP)
COVAL(TCON,SURN,GRND,GRND)
GROUP 15. Termination of sweeps
LSWEEP=20;LITER(SURN)=1
GROUP 16. Termination of iterations
RESREF(P1)=1.E-8;RESREF(V1)=1.E-8;RESREF(W1)=1.E-8
GROUP 17. Under-relaxation devices
RELAX(V1,FALSDT,10.);RELAX(W1,FALSDT,10.)
GROUP 19. Data communicated by satellite to GROUND
VARMIN(SURN)=0.0;VARMAX(SURN)=1.0;IDISPA=LSTEP/4;CSG1=N
SURF=T;RLOLIM=0.4;RUPLIM=0.6;IPRPSA=67;IPRPSB=0
SPEDAT(SET,GXMONI,TRANSIENT,L,F)
GROUP 22. Spot-value print-out
TSTSWP=-1;NTPRIN=LSTEP/2;NPRMON=LSWEEP;IYMON=NY1;IZMON=NZ1
GROUP 23. Field print-out and plot control
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,N,N,y,N,N,N)
OUTPUT(SURN,Y,N,y,N,N,N)
```