```
photon use
p;;;;

view x
con pot x 1 fi;0.01
vec x 1
pause
con wcrt x 1 fi;0.001
con w1 x 1 fi;0.001
pause
view z
con wcrt z 5 fi;0.01
do kk=1,13
con w1 z kk fi;0.01
enddo

enduse
************************************************************
Group 1. Run TitLe
TEXT(Twisted-pipe grid; potential flow   :568
TITLE
************************************************************
Groups 3, 4, 5  Grid Information
REAL(TWIST)
TWIST=5
NX=8; NY=6; NZ=12
BFC=T
NCRT=1

mesg(create cylindrical grid? y/n
IF(:ANS:.EQ.Y) THEN
mesg(this q1 creates a twisted cylindrical grid
REAL(XX,YY,ZZ,ZFAC,SNXX,CSXX,LITTLER,BIGR)
REAL(TWOPI,XXC,YYC,ZZC,YYY,CSZZ,SNZZ)
LITTLER=1.0; BIGR=1.0; TWOPI=2.0*3.14157
GSET(D,NX,NY,NZ)
NX
NY
NZ
do KK=1,NZ+1
KK
ZFAC=TWIST*(KK-1)/NZ
do II=1,NX+1
XX=TWOPI*(II-1)/NX + ZFAC
SNXX=SIN(XX)
CSXX=COS(XX)
do JJ=1,NY+1
YY=LITTLER*(JJ-1)/NY
XXC=YY*CSXX
YYY=YY*SNXX
XC(II,JJ,KK)=XXC
YC(II,JJ,KK)=YYY
ZC(II,JJ,KK)=ZFAC
enddo
enddo
enddo
ELSE
IF(:ANS:.EQ.Y) THEN
+ NX=12; NY=6; NZ=24
ENDIF
ENDIF
XCYIZ(1,NZ,T)
VIEW(J,NY+1)
GVIEW(P,1,1,1);GDRAW
************************************************************
Group 7. Variables: STOREd,SOLVEd,NAMEd
SOLVE(POT); SOLUTN(POT,Y,Y,Y,P,P,P)
STORE(U1,V1,W1,UCRT,VCRT,WCRT)
************************************************************
Group 13. Boundary & Special Sources
PATCH(IN,LOW,1,NX,1,NY,1,1,1,1)
COVAL(IN,POT,1.E5,1.0)

PATCH(OUT,HIGH,1,NX,1,NY,NZ,NZ,1,1)
COVAL(OUT,POT,1.0,0)
************************************************************
Group 15. Terminate Sweeps
LSWEEP  =    100; RESFAC  = 1.000E-06
************************************************************
Group 16. Terminate Iterations
LITER(POT)=-200
************************************************************
Group 19. EARTH Calls To GROUND Station
POTVEL=T
************************************************************
Group 22. Monitor Print-Out
IZMON  =     NZ/2; TSTSWP  =      -1
PATCH(AXIS,PROFIL,1,1,1,1,1,NZ,1,1)
COVAL(AXIS,POT,0.0,0.0)
COVAL(AXIS,W1,0.0,0.0)
```