DISPLAY
This case concerns lid driven laminar flow in
a skewed 2D-cavern with non-orthogonal grid.
The Q1 contains PHOTON instructions.
ENDDIS
PHOTON USE
p ; ; ; ; ;
msg Computational Domain:
g k 1
msg Press Any Key to Continue...
pause
cl
set vec av off
msg Velocity Vectors:
gr out k 1
vec k 1 sh
msg Press Any Key to Continue...
pause
cl
ENDUSE
GROUP 1. Run title and other preliminaries
REAL(REYNU,UIN,DCAV,TET,PI,XCR,YCR,DTHYD)
** Problem definition:
REYNU= 1.E2; UIN= 1.0; DCAV= 0.1; TET = 30.0
PI = 3.1415
NX = 20; NY = 20; NZ = 1
MESG(Enter skew angle for cavity (30) (5 < THETA < 175)
READVDU(TET,REAL,30)
TET= PI*TET/180.
GROUP 3. X-direction grid specification
GROUP 4. Y-direction grid specification
GROUP 5. Z-direction grid specification
GROUP 6. Body-fitted coordinates or grid distortion
BFC = T; GSET(D,NX,NY,1,DCAV,DCAV,DCAV)
GSET(P,P1,0.0,0.0, 0.0); GSET(P,P2,DCAV, 0.0,0.0)
XCR = DCAV+DCAV*COS(TET); YCR = DCAV*SIN(TET)
GSET(P,P3,XCR,YCR,0.0); GSET(P,P4,XCR-DCAV,YCR,0.0)
GSET(L,L12,P1,P2,NX,S1.5); GSET(L,L23,P2,P3,NY,S1.5)
GSET(L,L34,P3,P4,NX,S1.5); GSET(L,L41,P4,P1,NY,S1.5)
GSET(F,F1,P1,-,P2,-,P3,-,P4,-); GSET(M,F1,+I+J,1,1,1)
GSET(C,K:NZ+1:,F,K1,1,NX,1,NY,+,0.0,0.0,DCAV,INC,1.0)
MESG(Show grid? (N/y)
READVDU(ANS,CHAR,N)
IF(:ANS:.EQ.Y) THEN
GVIEW(Z); GGRID(Z,1,1,NX+1,1,NY+1,3,0)
GDRAW
ENDIF
GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1)
GROUP 8. Terms (in differential equations) & devices
GROUP 9. Properties of the medium (or media)
ENUL = UIN*DCAV/REYNU; RHO1 = 1.0
GROUP 10. Inter-phase-transfer processes and properties
GROUP 11. Initialization of variable or porosity fields
INIADD=F
FIINIT(U1) = 1.E-3; FIINIT(V1) = 1.E-3
GROUP 12. Unused
GROUP 13. Boundary conditions and special sources
NONORT =T
** Walls.
PATCH(WS,SWALL,1, NX,1, 1, 1,1,1,1)
PATCH(WN,NWALL,1, NX,NY,NY,1,1,1,1)
PATCH(WW,WWALL,1, 1, 1, NY,1,1,1,1)
PATCH(WE,EWALL,NX,NX,1, NY,1,1,1,1)
COVAL(WS,U1, 1.0,0.0)
COVAL(WN,U1, 1.0,UIN)
COVAL(WW,V1, 1.0,0.0)
COVAL(WE,V1, 1.0,0.0)
** Pressure relief
PATCH(FIXPRS,CELL,NX/2,NX/2,NY/2,NY/2,1,1,1,1)
COVAL(FIXPRS,P1,FIXP,0.0)
GROUP 14. Downstream pressure for PARAB=.TRUE.
GROUP 15. Termination of sweeps
TSTSWP = -1
GROUP 16. Termination of iterations
SELREF = T; RESFAC = 1.E-3
GROUP 17. Under-relaxation devices
DTHYD = 10.0
MESG(Use GCV Solver? (Y/n)
READVDU(ANS,CHAR,Y)
GCV=:ANS:.EQ.Y
TET=TET*180/PI
IF(GCV) THEN
+ TEXT(Skewed Cavity, GCV Solver, Angle = :TET:
+ LSG5 = T; RELAX(P1,LINRLX,1)
+ LSWEEP=300
+ IF(TET.LE.15.OR.TET.GE.180-15) THEN
+ RSG1=0.25; LSWEEP=1000; LSG5=F
DTHYD=DTHYD*.01
+ ENDIF
ELSE
+ TEXT(Skewed Cavity, Staggered Solver, Angle = :TET:
+ DTHYD= DTHYD*1.0E-4
+ RELAX(P1,LINRLX,0.025)
+ SYMBFC=T
+ LSWEEP=1000
ENDIF
TITLE
RELAX(U1 ,FALSDT,DTHYD); RELAX(V1, FALSDT,DTHYD)
GROUP 18. Limits on variables or increments to them
GROUP 19. Data communicated by satellite to GROUND
GROUP 20. Preliminary print-out
ECHO=F
GROUP 21. Print-out of variables
GROUP 22. Spot-value print-out
IXMON = NX/2+1; IYMON = NY/2+1; IZMON = 1
GROUP 23. Field print-out and plot control
GROUP 24. Dumps for restarts