```
GROUP 1. Run title and other preliminaries
TEXT(Case 1 AXI-Symmetric Piston Bowl
TITLE
DISPLAY
A piston with a flat crown having an open cavity with a
central cusp moves inside a flat topped cylinder. The solution
domain is represented by a 2-part moving grid, the first
part of which expands and contracts in the Z-direction.
The second part of the grid moves with the piston, but does
not change its size. This part of the grid includes the
piston cavity, which is represented by porosities. Since the
model simulates only the compression and expansion parts of the
four-stroke cycle, there are no inflow or outflow boundaries.
The flow is represented in two-dimensional axi-symmetric
polar coordinates in the Y-Z plane but with swirl velocity
in the X-direction. An initial field of U-velocity is set up
to represent 'solid body' rotation of the fluid. The density
varies isentropically with pressure. This is based on the
PHOENICS-81 PDR/CHAM UK/6.
ENDDIS
REAL(RPS,PI ,A1,AN,ANGLE,DEGS);RPS=24.0;PI=3.1416;A1=1.0
AN=291.;ANGLE=AN-A1;DEGS=RPS*360.

GROUP 2. Transience; time-step specification
TFRAC(1)=-7.;TFRAC(2)=10./ANGLE;TFRAC(3)=18.0;TFRAC(4)=5./ANGLE
TFRAC(5)=40.;TFRAC(6)=1./ANGLE;TFRAC(7)=4.;TFRAC(8)=5./ANGLE
TFRAC(9)=7.;TFRAC(10)=10.0/ANGLE

GROUP 3. X-direction grid specification
CARTES=F;XULAST=.1

GROUP 4. Y-direction grid specification
NY=11;YFRAC(1)=0.073;YFRAC(2)=0.145;YFRAC(3)=0.218;YFRAC(4)=0.29
YFRAC(5)=0.363;YFRAC(6)=0.421;YFRAC(7)=0.458;YFRAC(8)=0.508
YFRAC(9)=0.653;YFRAC(10)=0.753;YFRAC(11)=0.88632;YVLAST=0.0689

GROUP 5. Z-direction grid specification
** Grid specified at BDC.
NZ=11;ZWLAST=0.1707;ZFRAC(1)=0.227;ZFRAC(2)=0.518;ZFRAC(3)=0.673
ZFRAC(4)=0.776;ZFRAC(5)=0.825;ZFRAC(6)=0.853;ZFRAC(7)=0.882
ZFRAC(8)=0.926;ZFRAC(9)=0.953;ZFRAC(10)=0.982;ZFRAC(11)=1.0

GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1,W1);SOLUTN(P1,Y,Y,Y,N,N,N)

GROUP 9. Properties of the medium (or media)
ENUL=1.E-5;ENUT=1.E-1;RHO1=COMPRESS;DRH1DP=COMPRESS;RHO1A=1.4839E-4
RHO1B=0.765;PRESS0=1.03E5

GROUP 11. Initialization of variable or porosity fields
** Angular velocity for solid body rotation  U/R=CONST.
IURINI=-1;FIINIT(U1)=407.13
** Piston crown
CONPOR(0.0,VOLUME,1,1,-8,NY,-6,NZ)

GROUP 13. Boundary conditions and special sources
** Cylinder wall
WALL (WALL,NORTH,1,1,NY,NY,1,5,1,LSTEP)

GROUP 15. Termination of sweeps
LSWEEP=20

GROUP 16. Termination of iterations
LITER(P1)=10

GROUP 17. Under-relaxation devices
RELAX(V1,FALSDT,1.E-1);RELAX(W1,FALSDT,1.E-1)

GROUP 18. Limits on variables or increments to them
VARMIN(P1)=5.E4

GROUP 19. Special calls from EARTH to GROUND
** Specifications of moving grid
** Set 2nd part grid
IZW1=5
** Angular velocity
AZW1=150.796
BZW1=.06985
** Conrod centre distance/crank radius
CZW1=3.7265
SPEDAT(SET,GXMONI,TRANSIENT,L,F)
GROUP 22. Spot-value print-out
IXMON=1;IYMON=1;IZMON=5;ITABL=2

GROUP 23. Field print-out and plot control
SUBWGR=T
PATCH(PROF,PROFIL,1,1,1,NY,3,3,LSTEP,LSTEP)
PLOT(PROF,U1,0.,0.);PLOT(PROF,W1,0.0,0.0);PLOT(PROF,V1,0.0,0.0)
PATCH(CONT,CONTUR,1,1,1,NY,1,NZ,LSTEP,LSTEP)
PLOT(CONT,W1,0.,20.);PLOT(CONT,U1,0.,20.)
```