```
TALK=f;RUN(1,1)
DISPLAY
A fluid flows steadily in a direction normal to a
flat plate in channel. The Reynolds Number (i.e. velocity times
channel width divided by kinematic viscosity) equals 100.0.
For calculation deformation of plate is use "Bent of Solid Plate" model.
ENDDIS

PHOTON USE
p;;;;

msg
msg P1 contours
msg
GR OU Z 1;
cont P1 z 1 fil;.0001
GR OU X 21 Y 1 10 Z 1 1 COL 1
pause

cl
msg
msg
msg Velocity vector
GR OU Z 1;
GR OU X 21 Y 1 10 Z 1 1 COL 1
vec z 1 SH DASH 0
pause

cl
msg
msg
msg Deflection plate vector
GR OU Z 1;
GR OU X 21 Y 1 10 Z 1 1 COL 1
SET VEC COMP - - -
SET VEC COMP STDP - -
SET VEC RE 0.02
VECT IZ 1 SH DASH 0
pause

ENDUSE

************************************************************
Group 1. Run Title and Number
************************************************************
TEXT(2D Flow Past A Bent Solid Plate; S401
TITLE
REAL(REYNO,U1IN); REYNO=100.0; U1IN=1.0

integer(caseNO)

mesg(:title:
mesg( Variant of calculation:
mesg( caseno=1 : fixed pressure & exact solution for STDP and STMO
mesg( caseno=2 : full solution
mesg(Enter 1, 2 or blank (default = 1)
if(caseno.lt.1) then
endif
if(caseno.gt.2) then
endif
caseno

real(PBENT)
PBENT = 3.0  ! Pa

real(HPLATE,YOUNG,POISSON)
HPLATE=2.e-3         !   h = 2 μμ, L = 2 m
YOUNG = 2.e11
POISSON = 0.3

************************************************************
Group 2. Time dependence
************************************************************

************************************************************
Group 3. X-Direction Grid Spacing
************************************************************
CARTES  =    T
GRDPWR(X,70,14.,1.)
************************************************************
Group 4. Y-Direction Grid Spacing
************************************************************
GRDPWR(Y,20,4.0,1.0)

************************************************************
Group 5. Z-Direction Grid Spacing
************************************************************
NZ=1
ZWLAST  = 1.0

************************************************************
Group 7. Variables: STOREd,SOLVEd,NAMEd
************************************************************
SOLVE(P1,V1,U1)
SOLUTN(P1,Y,Y,Y,N,N,N)
STORE(EPOR,NPOR,VPOR)

***** BSP *****
STORE(STDP,STMO)
SPEDAT(SET,HPLATE,PLT*1,R,HPLATE)
SPEDAT(SET,YOUNG,PLT*1,R,YOUNG)
SPEDAT(SET,POISSON,PLT*1,R,POISSON)
SPEDAT(SET,FIXEDEDGE,PLT*1,C,Beg)

if(caseNO.EQ.1) then
STORE(DPTH,MOTH,DP/T,MO/T)
FIINIT(DPTH)=0.0
FIINIT(MOTH)=0.0
FIINIT(DP/T)=0.0
FIINIT(MO/T)=0.0
endif
***** BSP *****

************************************************************
GROUP 9. Properties of the medium (or media)
************************************************************
ENUL=U1IN*YVLAST/REYNO

************************************************************
GROUP 11. Initialization of variable or porosity fields
************************************************************
FIINIT(U1)=U1IN
FIINIT(STDP)=0.0
FIINIT(STMO)=0.0

if(caseNO.EQ.1) then
FIINIT(P1)=0.0
patch(BEFORE1,INIVAL,1,20,1,NY,1,1,1,1)
INIT(BEFORE1,P1,FIXVAL,PBENT)

****** fixed P1 ******
patch(BEFORE,CELL,1,20,1,NY,1,1,1,1)
COVAL(BEFORE,P1,FIXVAL,PBENT)
patch(AFTER,CELL,21,NX,1,NY,1,1,1,1)
COVAL(AFTER,P1,FIXVAL,0.0)
endif

************************************************************
GROUP 13. Boundary conditions and special sources
************************************************************

**INLET boundary
INLET(IN,WEST,1,1,1,NY,1,1,1,1)
VALUE(IN,P1,RHO1*U1IN)
VALUE(IN,U1,U1IN)

**OUTLET boundary
PATCH(OUT,EAST,NX,NX,1,NY,1,1,1,1)
COVAL(OUT,P1,1.E5,0.0);
COVAL(OUT,U1,ONLYMS,U1IN)

**TOP/Bottom  boundary : WALL
PATCH(TOP,NWALL,1,NX,NY,NY,1,1,1,1)
COVAL(TOP,V1,1,0.)
COVAL(TOP,U1,1,0.)
PATCH(BOTTOM,SWALL,1,NX,1,1,1,1,1,1)
COVAL(BOTTOM,V1,1,0.)
COVAL(BOTTOM,U1,1,0.)

**Plate
PATCH(PLT*1,EWALL,20,20,1,NY/2,1,1,1,1)
SPEDAT(SET,POROSITY,PLT*1,R,0.0)

************************************************************
GROUP 15. Termination of sweeps
************************************************************
LSWEEP=600
RESREF(P1)=1.E-6*RHO1*U1IN*YVLAST
ISG52   =    3   !   probe & res
TSTSWP = - 1     ! graphic-mode

if(caseNO.EQ.1) then
LSWEEP=2
endif

************************************************************
GROUP 16. Termination of iterations
************************************************************
LITER(P1)=-50

************************************************************
GROUP 17. Under-relaxation devices
************************************************************
RELAX(V1,FALSDT,1.0); RELAX(U1,FALSDT,1.0)

************************************************************
GROUP 21. Print-out of variables
************************************************************

************************************************************
GROUP 22. Spot-value print-out
************************************************************
IYMON=10; IXMON=25

************************************************************
GROUP 23. Field print-out and plot control
************************************************************
NYPRIN=1; NXPRIN=1; IXPRL=22; IXPRF=18;

inform7begin

if(caseNO.EQ.1) then
real(DPLATE,CODD,LP,LP2,COMM)
DPLATE = YOUNG*HPLATE**3/12/(1-POISSON**2)
CODD = PBENT/DPLATE/24
LP=YVLAST/2
LP2=LP**2
char(formD,formM)
formD=(YG^4-4*YG^3*:LP:+6*YG^2*:LP2:)
COMM=-PBENT/2
formM=(LP-YG)^2
(STORED VAR DPTH AT PLT*1 IS :CODD:*:formD:)
(STORED VAR MOTH AT PLT*1 IS :COMM:*:formM:)
(STORED VAR DP/T AT PLT*1 IS STDP/(DPTH+1.e-20))
(STORED VAR MO/T AT PLT*1 IS STMO/(MOTH+1.e-20))
endif

inform7end
STOP
```