```
** Flow around cylinder - H grid
PHOTON USE
p ; ; ; ; ;

msg Computational Domain:
gr k 1
pause
cl
set vec av off
msg Velocity Vectors:
vec k 1 sh
msg Press Any Key to Continue...
pause
cl
msg Contours of UCRT-component:
con ucrt k 1 fi;0.02
msg Press Any Key to Continue...
pause
cl
msg Contours of p1
con p1 k 1 fi;0.02
msg Press E  to exit PHOTON ...
ENDUSE
DISPLAY

This case concerns the prediction of laminar flow over a
complete cylinder. The default Reynolds Number is 40.

The grid is composed of a single block, using a cartesian
H topology. The cylinder is represented by a blockage.

The Q1 contains PHOTON commands.

ENDDIS

BOOLEAN(LVISC); LVISC = T
REAL(RCYL,X0,X1,X2,X3,Y1,Y2,REYNO,UIN,TET,DTHYD)
INTEGER(NX1,NX2,NX3,NY1,NY2)
TET = 3.1415/4.0
MESG(Enter Reyolds Number in the range 0.1 - 2000 (40)
IF(REYNO.GT.2000) THEN
+ REYNO=2000
ELSE
+ IF(REYNO.LT..1) THEN
+   REYNO=0.1
+ ENDIF
ENDIF
TEXT(Flow around a Cylinder at Re = :REYNO:
TITLE
UIN = 1.0; RCYL = 1.0; NZ = 1
DTHYD = RCYL/UIN
NX1 = 16; NX2 = 12 ; NX3= 28; NX = NX1+NX2+NX3
NY1 = 6;  NY2 = 24;           NY = 2*(NY1+NY2)
X0 =-4*RCYL;        X3 = 10*RCYL
X1 =-RCYL*COS(TET); X2 = RCYL*COS(TET)
Y1 = RCYL*SIN(TET); Y2 = 6*RCYL
BFC= T; GSET(D,NX,NY,NZ,RCYL,RCYL,1.0)
GSET(P,P1 ,X1,-Y1,0.0); GSET(P,P2, X2,-Y1,0.0)
GSET(P,P3 ,X2, Y1,0.0); GSET(P,P4, X1, Y1,0.0)
GSET(P,P5 ,X0,-Y1,0.0); GSET(P,P10, X3,-Y1,0.0)
GSET(P,P16,X0, Y1,0.0); GSET(P,P11, X3, Y1,0.0)
GSET(P,P6 ,X0,-Y2,0.0); GSET(P,P7 ,X1,-Y2,0.0)
GSET(P,P8 ,X2,-Y2,0.0); GSET(P,P9 ,X3,-Y2,0.0)
GSET(P,P15,X0, Y2,0.0); GSET(P,P14,X1, Y2,0.0)
GSET(P,P13,X2, Y2,0.0); GSET(P,P12,X3, Y2,0.0)
** Center.
+ GSET(L,L12,P1 ,P2 ,  NX2,1.0,ARC,  0.0,-RCYL,0.0)
+ GSET(L,L23,P2 ,P3 ,2*NY1,1.0,ARC, RCYL,  0.0,0.0)
+ GSET(L,L34,P3 ,P4 ,  NX2,1.0,ARC,  0.0, RCYL,0.0)
+ GSET(L,L45,P4 ,P1 ,2*NY1,1.0,ARC,-RCYL,  0.0,0.0)
+ GSET(L,A51,P5 ,P16,2*NY1,1.0)
+ GSET(L,A11,P10,P11,2*NY1,1.0)
** Bottom.
+ GSET(L,L15,P1,P5 ,NX1,1.0)
+ GSET(L,L67,P6,P7 ,NX1,1.0)
+ GSET(L,L78,P7,P8 ,NX2,1.0)
+ GSET(L,L89,P8,P9 ,NX3,1.5)
+ GSET(L,A21,P2,P10,NX3,1.5)
+ GSET(L,A91,P10,P9,NY2,1.8)
+ GSET(L,L56,P5 ,P6,NY2,1.8)
** Top.
+ GSET(L,A64,P16,P4 ,NX1,1.0)
+ GSET(L,A54,P15,P14,NX1,1.0)
+ GSET(L,A43,P14,P13,NX2,1.0)
+ GSET(L,A32,P13,P12,NX3,1.5)
+ GSET(L,A31,P3 ,P11,NX3,1.5)
+ GSET(L,A12,P11,P12,NY2,1.8)
+ GSET(L,A56,P16,P15,NY2,1.8)
+ GSET(F,F1 ,P6 ,P7.P8,P9 ,-,P10,P2.P1  ,P5 ,-)
+ GSET(F,F21,P5 ,-    ,P1,- ,P4 ,-      ,P16,-)
+ GSET(F,F22,P1 ,-    ,P2, -,P3 ,-      ,P4 ,-)
+ GSET(F,F23,P2 ,-    ,P10,-,P11,-      ,P3 ,-)
+ GSET(F,F3 ,P16,P4.P3,P11,-,P12,P13.P14,P15,-)
+ GSET(M,F1 ,+I+J,        1,          1,1)
+ GSET(M,F21,+I+J,        1,      NY2+1,1)
+ GSET(M,F22,+I+J,    NX1+1,      NY2+1,1)
+ GSET(M,F23,+I+J,NX1+NX2+1,      NY2+1,1)
+ GSET(M,F3 ,+I+J,        1,NY2+2*NY1+1,1)
GSET(C,K:NZ+1:,F,K1,1,NX,1,NY,+,0.0,0.0,1.0,INC,1.0)
MESG(Show the grid? (N/y)
IF(:ANS:.EQ.Y) THEN
VIEW(K,1)
ENDIF
SOLVE(U1,V1,P1)
RHO1 = 1.0
IF(LVISC) THEN
+  ENUL=UIN*2*RCYL/REYNO
ELSE
+  ENUL = 0.0
ENDIF
CONPOR(CYL,0.0,CELL,NX1+1,NX1+NX2,NY2+1,NY2+2*NY1,1,NZ)
INLET( IN,WEST, 1, 1,1,NY,1,1,1,1)
VALUE(IN,P1,RHO1*UIN)
VALUE(IN,U1,UIN)
OUTLET(OUT,EAST,NX,NX,1,NY,1,1,1,1)
IF(LVISC) THEN
+ WALL(WN,NORTH,NX1+1,NX1+NX2,NY2        ,      NY2,1,1,1,1)
+ WALL(WS,SOUTH,NX1+1,NX1+NX2,NY2+2*NY1+1,NY2+2*NY1+1,1,1,1,1)
+ WALL(WW,WEST ,NX1+NX2,NX1+NX2,NY2+1,NY2+2*NY1,1,1,1,1)
+ WALL(WE,EAST ,    NX1,    NX1,NY2+1,NY2+2*NY1,1,1,1,1)
ENDIF
LSWEEP=250
NONORT = T
MESG(Use GCV solver? Y/n)
GCV=:ANS:.EQ.Y
IF(.NOT.GCV) THEN
RELAX(P1,LINRLX,0.1)
RELAX(U1,FALSDT,DTHYD/NX/10)
RELAX(V1,FALSDT,DTHYD/NX/10)
SYMBFC=T
ENDIF
TSTSWP = -1
IXMON=50; IYMON=NY/2
```