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;.1
  msg
  msg Type e to End
  ENDUSE
 
TEXT(PLANE FLOW IN TURNAROUND DUCT:      B527
TITLE
  DISPLAY
   This case concerns plane, two-dimensional, incompressible invscid
   flow through a 180 degree turnaround duct with two straight legs.
 
   Note the "parameterization" of the GSET commands, enabling the
   grid to be changed easily.
  ENDDIS
    GROUP 1. Run title
REAL(WIN,DIAM)
DIAM=30.0 ;WIN=1.0
    GROUP 6. Body-fitted coordinates or grid distortion
BFC=T; NONORT=T; SYMBFC=T
INTEGER(NXTOT, NYTOT, NZTOT, NZLEG, NZBEN)
NXTOT=1; NYTOT=20; NZLEG=24; NZBEN=24
NZTOT = NZLEG + NZBEN + NZLEG
  ** the dimensions (grid size, and geometrical lengths)
GSET(D,NXTOT,NYTOT,NZTOT,1.0,DIAM,100.0)       ! Dimensions of grid
GSET(C,K:NZTOT+1:,F,K:NZTOT+1:,+,0.0,110.0,0.0)
GSET(C,K:NZLEG+NZBEN+1:,F,K:NZTOT+1:,+,0.0,0.0,-100.0,INC,1.0)
GSET(C,K:NZLEG+1:,F,K:NZLEG+NZBEN+1:,RX,-3.14159,95.0,0.0,INC,1.0)
GSET(C,K1,F,K:NZLEG+1:,+,0.0,0.0,100.0,INC,1.0)
 
   ** Set wup=t to account better for the high curvature of
      the w resolute...
WUP=T
    GROUP 7. Variables stored, solved & named
SOLVE(P1,V1,W1);SOLUTN(P1,Y,Y,Y,N,N,N)
IF(NXTOT.GT.1) THEN
 SOLVE(U1)
ENDIF
    GROUP 9. Properties of the medium (or media)
ENUL=0.0;ENUT=0.0
    GROUP 11. Initialization of variable or porosity fields
FIINIT(P1)=1.E-10;FIINIT(W1)=WIN
    GROUP 13. Boundary conditions and special sources
INLET(BFCIN,LOW,#1,#1,#1,#NREGY,#1,#1,1,1)
VALUE(BFCIN,P1,GRND1);VALUE(BFCIN,W1,GRND1)
VALUE(BFCIN,WCRT,-WIN)
  *  Transfer density for GXBFC subroutine
BFCA=RHO1
PATCH(OUTLET,HIGH,#1,#1,#1,#NREGY,#NREGZ,#NREGZ,1,1)
COVAL(OUTLET,P1,1.E4,0.0)
COVAL(OUTLET,V1,ONLYMS,0.0);COVAL(OUTLET,W1,ONLYMS,0.0)
 
    GROUP 15. Termination of sweeps
LSWEEP=500
    GROUP 16. Termination of iterations
LITER(P1)=10
    GROUP 17. Under-relaxation devices
RELAX(P1,LINRLX,0.5); RELAX(V1,FALSDT,10.0);RELAX(W1,FALSDT,10.0)
IF(NXTOT.GT.1) THEN
 RELAX(U1,FALSDT,0.01)
ENDIF
    GROUP 22. Spot-value print-out
IYMON=NY/2;IZMON=NZ/2
NPRMON=LSWEEP;TSTSWP=-1
SELREF=T; RESFAC=0.001
    GROUP 23. Field print-out and plot control
NPRINT=LSWEEP;ITABL=2;NPLT=5
PATCH(YX,CONTUR,1,1,1,NY,1,NZ,1,1)
PLOT(YX,P1,0.0,20.0)
PATCH(INNER,PROFIL,1,1,1,1,1,NZ,1,1)
PLOT(INNER,P1,0.0,0.0);PLOT(INNER,W1,0.0,0.0)
PATCH(OUTER,PROFIL,1,1,NY,NY,1,NZ,1,1)
PLOT(OUTER,P1,0.0,0.0);PLOT(OUTER,W1,0.0,0.0)