PHOTON USE
  p
 
 
 
 
  gr ou y 1
  MSG Velocity vectors
  vec y 1 sh
  msg
  msg Press return to plot pressure contours
  pause
  cont p1 y 1 fil;.01
  msg
  msg Type e to End
  ENDUSE
 
    GROUP 1. Run title
TEXT(POT. FLOW AROUND A HALF-CYL X-Z:    B520
TITLE
  DISPLAY
    This case defines a calculation of potential flow over a half-
  cylinder in a duct similar to case 514 but in the X-Z plane. The
  grid is constructed by linear interpolation
  ENDDIS
    GROUP 6. Body-fitted coordinates or grid distortion
BFC=T;NONORT=T
GSET(D,10,1,20,1.0,1.0,2.0)
INTEGER(IZ1,IZ2,DNZ);IZ1=6;IZ2=16;DNZ=5
REAL(AA,XLEN);AA=ZWLAST/3;XLEN=1.0
   ** Set corner points for frame
GSET(P,A,0.0,0.0,0.0)
GSET(P,B,XLEN,0.0,0.0)
GSET(P,E,XLEN,0.0,ZWLAST)
GSET(P,F,0.0,0.0,ZWLAST)
   ** Set corner points for cylinder
GSET(P,C,XLEN,0.0,AA)
GSET(P,D,XLEN,0.0,AA*2.0)
GSET(P,G,0.0,0.0,AA*2.0)
GSET(P,H,0.0,0.0,AA)
   ** Set HIGH and LOW boundaries of frame
GSET(L,L1,A,B,NX,1.0)
GSET(L,L5,E,F,NX,1.0)
   ** Set EAST and WEST boundaries of cylinder
GSET(L,L3,C,D,DNZ*2,1.0)
   -- The S0.57 term only approximates even division in Z-direction
GSET(L,L7,G,H,DNZ*2,S0.57,ARC,AA/2.0,0.0,ZWLAST/2.0)
   ** Set EAST and WEST boundaries of rest of frame
GSET(L,L2,B,C,DNZ,1.0)
GSET(L,L4,D,E,DNZ,1.0)
GSET(L,L6,F,G,DNZ,1.0)
GSET(L,L8,H,A,DNZ,1.0)
   ** Define frame
GSET(F,F1,A,-,B,C.D,E,-,F,G.H)
   ** Match frame onto J1
GSET(M,F1,+I+K,1,1,1,TRANS)
   ** Copy J1 to J2
GSET(C,J2,F,J1,+,0,1,0)
    GROUP 7. Variables stored, solved & named
   ** Solve for pressure (whole-field) and velocity.
SOLVE(P1,U1,W1);SOLUTN(P1,Y,Y,Y,N,N,N)
ISOLZ=1
    GROUP 9. Properties of the medium (or media)
RHO1=1.0;ENUL=1.0E-10
    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,FIXP,0.0)
COVAL(OUTLET,U1,ONLYMS,0.0);COVAL(OUTLET,W1,ONLYMS,0.0)
   ** Whole field flow-resistance
DARCY=T
    GROUP 15. Termination of sweeps
LSWEEP=10
    GROUP 22. Spot-value print-out
IXMON=3;IZMON=10;TSTSWP=-1
    GROUP 23. Field print-out and plot control
PATCH(XZ,CONTUR,1,NX,1,1,1,NZ,1,1)
PLOT(XZ,P1,0.0,20.0);PLOT(XZ,W1,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)
IZPRF=5;IZPRL=15