PHOTON USE
p
GR OU X 1
MSG Velocity vectors
vec x 1 sh
msg
msg Press return to plot pressure contours
pause
cont p1 x 1 fil;.001
msg
msg Press return to plot enthalpy contours
pause
vec cl; cont cl; red
msg Enthalpy contours; note layer formation at the wall
cont h1 x 1 fil;.001
msg
msg Type e to End
ENDUSE
GROUP 1. Run title
TEXT(2-D DIFFUSER ;Y-Z CARTESIAN COORD.: B510
TITLE
DISPLAY
This case considers the flow in a plane two-dimensional
diffuser. The flow is analysed in the y-z plane: the inlet
is at low z and the outlet is at high z, with heated wall
and friction activated at high y.
As a consequence of wall friction, the actual pressure
rise with axial distance is less than the "ideal" rise, and
as a consequence of heating thermal boundary layer forms
along the wall.
ENDDIS
GROUP 6. Body-fitted coordinates or grid distortion
** BFC is set T to activate the body-fitted coordinate option,
and to set the default (rectangular) grid. Nonort is set T
to signify that a nonorthogonal grid is to be generated.
BFC=T;NONORT=T
GSET(D,1,5,5,1.0,0.05,0.2)
GSET(P,A,0,0,0); GSET(P,B,0,.05,0)
GSET(P,C,0,.08527,.2); GSET(P,D,0,0,.2)
GSET(L,L1,A,B,5,1.0); GSET(L,L2,B,C,5,1.0)
GSET(L,L3,C,D,5,1.0); GSET(L,L4,A,D,5,1.0)
GSET(F,ABCD,A,-,B,-,C,-,D,-)
GSET(M,ABCD,+J+K,1,1,1,TRANS)
GSET(C,I2,F,I1,+,1.,0.,0.)
A simpler way to generate the same grid is:
BFC=T;NONORT=T
GSET(D,1,5,5,1.0,0.05,0.2)
GSET(C,J6,F,J1,1,NX,NZ,NZ,+,0,.08527,0,INC,1.0)
GSET(T,K6,F,K1,1,NX,1,NY,1.0)
However, this will create two regions in J direction.
GROUP 7. Variables stored, solved & named
** Solve for pressure (whole-field), enthalpy and velocity.
SOLVE(P1,H1,V1,W1);SOLUTN(P1,Y,Y,Y,N,N,N)
ISOLX=1
GROUP 8. Terms (in differential equations) & devices
** Cut off the built-in source
TERMS(H1,N,Y,Y,Y,Y,Y)
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(BFCIN,LOW,#1,#NREGX,#1,#NREGY,#1,#1,1,1)
VALUE(BFCIN,P1,GRND1);VALUE(BFCIN,W1,GRND1)
VALUE(BFCIN,WCRT,1.0);VALUE(BFCIN,H1,0.0)
* Transfer density for GXBFC subroutine
BFCA=RHO1
** Outlet
PATCH(OUTLET,HIGH,#1,#NREGX,#1,#NREGY,#NREGZ,#NREGZ,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,#NREGX,#NREGY,#NREGY,#1,#NREGZ,1,1)
COVAL(WALL,W1,1.0,0.0)
COVAL(WALL,H1,1.0,1.0)
GROUP 15. Termination of sweeps
LSWEEP=20
GROUP 22. Spot-value print-out
NPLT=2;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)
GROUP 24. Dumps for restarts