```

PHOTON USE
p

GR X 1
MSG Velocity vectors
vec x 1 sh
msg
pause
cont p1 x 1 fil;.001
msg
msg Type e to End
ENDUSE

GROUP 1. Run title
TEXT(2-D CURVED DUCT; Y-Z PLANE :        B512
TITLE
DISPLAY
The grid generated here is that of a curved duct, but again,the
flow topology is the same as in case 510.
Friction on the south wall is activated.
ENDDIS

GROUP 6. Body-fitted coordinates or grid distortion
BFC=T
GSET(D,1,5,5,1.0,0.05,0.2)

REAL(PI,YY0,ZZ0,ANG1,ANGD,RR1,RR2)
PI=3.14159;YY0=-.05*3**.5;ZZ0=.05
ANG1=-PI/6;ANGD=PI/3; RR1=.1; RR2=.15
GSET(P,A,0,YY0+RR1*COS(ANG1),ZZ0+RR1*SIN(ANG1))
GSET(P,B,0,YY0+RR2*COS(ANG1),ZZ0+RR2*SIN(ANG1))
GSET(P,C,1,YY0+RR2*COS(ANG1),ZZ0+RR2*SIN(ANG1))
GSET(P,D,1,YY0+RR1*COS(ANG1),ZZ0+RR1*SIN(ANG1))

GSET(L,L1,A,B,NY,1.0);   GSET(L,L2,C,D,NY,1.0)
GSET(L,L3,B,C,NX,1.0);   GSET(L,L4,A,D,NX,1.0)
GSET(F,F1,A,-,B,-,C,-,D,-)
GSET(M,F1,+J+I,1,1,1,TRANS)
GSET(C,K:NZ+1:,F,K1,RX,ANGD,YY0,ZZ0,INC,1.0)
A simpler way to generate the same grid is:
BFC=T
GSET(D,1,5,5,1.0,0.05,0.2)

REAL(PI,YY0,ZZ0,ANG1,ANGD,RR1,RR2)
PI=3.14159;YY0=-.05*3**.5;ZZ0=.05
ANG1=-PI/6;ANGD=PI/3; RR1=.1; RR2=.15
GSET(C,K1,F,K1,+,0,YY0+RR2,ZZ0)
GSET(C,K1,F,K1,RX,ANG1,YY0,ZZ0)
GSET(C,K:NZ+1:,F,K1,RX,ANGD,YY0,ZZ0,INC,1.0)
GROUP 7. Variables stored, solved & named
** Solve for pressure (whole-field) and velocity.
SOLVE(P1,V1,W1);SOLUTN(P1,Y,Y,Y,N,N,N)
GROUP 9. Properties of the medium (or media)
RHO1=1.0;ENUL=1.0E-04
GROUP 11. Initialization of variable or porosity fields
FIINIT(W1)=1.0
GROUP 13. Boundary conditions and special sources
** Inlet
INLET(INLET,LOW,1,NX,1,NY,1,1,1,1)
VALUE(INLET,P1,1.0);VALUE(INLET,W1,1.0)
** Outlet
PATCH(OUTLET,HIGH,1,NX,1,NY,NZ,NZ,1,1);COVAL(OUTLET,P1,1.0E5,0.0)
COVAL(OUTLET,V1,ONLYMS,0.0);COVAL(OUTLET,W1,ONLYMS,0.0)
** Wall function
WALL (WALL,NORTH,1,NX,NY,NY,1,NZ,1,1);COVAL(WALL,W1,1.0,0.0)
** Wall function - South wall
WALL (WALL1,SOUTH,1,NX,1,1,1,NZ,1,1);COVAL(WALL1,W1,1.0,0.0)
GROUP 15. Termination of sweeps
LSWEEP=20
GROUP 22. Spot-value print-out
IYMON=3;IZMON=3;TSTSWP=-1
GROUP 23. Field print-out and plot control
PATCH(YZ,CONTUR,1,1,1,NY,1,NZ,1,1)
PLOT(YZ,P1,0.0,20.0);PLOT(YZ,W1,0.0,20.0)
PLOT(YZ,WCRT,0.0,20.0)
```