```

PHOTON USE
p
phi

msg         Potential flow past a perpendicular plate
msg
set ref vec 5
msg   Velocity vectors:
gr ou x 1;vec x 1 sh
msg
msg Press  to continue
pause
vec off;red
msg        Axial velocity contours:
con w1 x 1 fi;.01
msg
msg Press  to continue
pause
con off;red
msg        Streamlines and contours of velocity potential:
con pot x 1 sh; int 20
stre 2d x 1 sh; int 20
msg Press e to END
enduse
GROUP 1. Run title and other preliminaries
TEXT(Pot. Flow; Perpendicular Plate
#cls
TITLE
DISPLAY
An inviscid fluid flows steadily in a direction normal to a flat
plate. Since the potential-flow equation involves only diffusion-
type terms, sources, convection and transient terms are switched
off automatically within EARTH.

The geometry of the problem is as follows:

frictionless wall
-----------------------------------------------------

-------->
---->                  -------->              ---->

^  ---->                   Plate                 ---->
|                            |
y| ---------------------------|-------------------------
|                    frictionless wall
z--->
The plate is introduced by the setting of HPOR to zero for the
appropriate cells.

ENDDIS
#pause
GROUPs 3, 4 and 5: grid specification
nx=1; ny=40; nz=80
xulast=1.0; yvlast=4.0; zwlast=8.0
#unigrid

GROUP 7. Variables stored, solved & named
STORE(POT,HPOR,V1,W1); SOLUTN(POT,Y,Y,Y,N,N,N)

GROUP 11. Initialization of variable or porosity fields
FIINIT(HPOR)=1.0
**Plate
PATCH(PLATE,INIVAL,1,1,1,NY/4,NZ/2,NZ/2,1,1)
INIT(PLATE,HPOR,FIXVAL,0.0)

GROUP 13. Boundary conditions and special sources
**Upstream boundary
PATCH(UPSTRM,LOW,1,1,1,NY,1,1,1,1)
COVAL(UPSTRM,POT,FIXVAL,4.0)
**Downstream boundary
PATCH(DWNSTRM,HIGH,1,1,1,NY,NZ,NZ,1,1)
COVAL(DWNSTRM,POT,FIXVAL,-4.0)

GROUP 15. Termination of sweeps
LSWEEP = 2

GROUP 16. Termination of iterations
LITER(POT)=-500; OVRRLX=2.5; ISOLZ=1
GROUP 19. Data communicated by satellite to GROUND
POTVEL=T
GROUP 21. Print-out of variables
OUTPUT(POT,Y,Y,Y,Y,N,N); OUTPUT(HPOR,N,N,N,N,N,N)
GROUP 22. Spot-value print-out
UWATCH=T
GROUP 23. Field print-out and plot control
NYPRIN=NY/10;IZPRF=16;IZPRL=25
PATCH(CONT,CONTUR,1,1,1,NY,1,NZ,1,1);PLOT(CONT,POT,0.0,20.0)
GROUP 24. Dumps for restart
REAL(HEIGHT);INTEGER(IYTOP)
mesga(Plate height = 0.5 * domain height. OK?
mesg(If not, insert new factor