PHOTON USE
  p
  phi
 
 
  msg        BLUFF BODY AERODYNAMICS: FLOW AROUND A CHIMNEY
  msg
  view 1 -1 1
  norm
  msg   Pressure contours:
  con p1 y 1 fi;.01;gr ou y 1
  con p1 y 3 fi;.01;gr ou y 3
  con p1 y 5 fi;.01;gr ou y 5
  con p1 y 7 fi;.01;gr ou y 7
  msg
  msg Press  to continue
  pause
  cl
  msg        Velocity vectors:
  vec x 1 sh;gr ou x 1
  vec z 1 sh;gr ou z 1
  vec y max sh;gr ou y max
  msg
  msg Press  to continue
  pause
  view x
  norm
  msg A two-dimensional view of the streamwise velocity vectors:
  msg
  msg
  msg Press e to END
  enduse
 
    GROUP 1. Run title and other preliminaries
TEXT(Flow Around A Chimney             
TITLE
mesg(PC486/50 time last reported as 50.sec
  DISPLAY
  This run examines how the flow around a chimney intermingles
  with the effluent from it. A concentration equation is solved so
  as to determine the rate of dilution of the effluent.
    Interesting variants include:- changes to the chimney shape;
  changes to the flow rate through the chimney top; and changes
  to the wind velocity.
  ENDDIS
 
    GROUP 3. X-direction grid specification
  ** X-direction grid distances vary as IX**2.0
NREGX=2
IREGX=1;GRDPWR(X,1, 1.0,1.0)
IREGX=2;GRDPWR(X,9,49.0,2.0)
 
    GROUP 4. Y-direction grid specification
GRDPWR(Y,10,50.0,1.0)
 
    GROUP 5. Z-direction grid specification
  ** Z-direction grid distances vary as IZ**2.0
NREGZ=3
IREGZ=1;GRDPWR(Z,1, 1.0,1.0)
IREGZ=2;GRDPWR(Z,2, 2.0,1.0)
IREGZ=3;GRDPWR(Z,7,47.0,2.0)
 
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1,W1,C1)
 
    GROUP 9. Properties of the medium (or media)
ENUL=1.E-2
 
    GROUP 11. Initialization of variable or porosity fields
FIINIT(W1)=5.0

  ** Chimney resistance
CONPOR(CHIMNRES,0.0,CELL,#1,#1,1,NY/2,#2,#2)

    GROUP 13. Boundary conditions and special sources
  ** Upwind boundary
INLET(UPWIND,LOW,1,NX,1,NY,1,1,1,1)
VALUE(UPWIND,P1,5.0);VALUE(UPWIND,W1,5.0)
  ** Downwind boundary
PATCH(DOWNWIND,HIGH,1,NX,1,NY,NZ,NZ,1,1)
COVAL(DOWNWIND,P1,FIXP,0.0);COVAL(DOWNWIND,W1,ONLYMS,0.0)
COVAL(DOWNWIND,U1,ONLYMS,0.0);COVAL(DOWNWIND,V1,ONLYMS,0.0)
  ** Chimney top
PATCH(CHIMNTOP,CELL,#1,#1,NY/2+1,NY/2+1,#2,#2,1,1)
COVAL(CHIMNTOP,P1,FIXFLU,1.0); COVAL(CHIMNTOP,C1,ONLYMS,1.0)
COVAL(CHIMNTOP,U1,ONLYMS,1.0); COVAL(CHIMNTOP,V1,ONLYMS,1.0)
COVAL(CHIMNTOP,W1,ONLYMS,1.0)
 
    GROUP 15. Termination of sweeps
LSWEEP=20
 
    GROUP 16. Termination of iterations
LITER(P1)=20
 
    GROUP 17. Under-relaxation devices
RELAX(U1,FALSDT,0.1); RELAX(V1,FALSDT,0.1)
RELAX(W1,FALSDT,0.1)
 
    GROUP 22. Spot-value print-out
IXMON=1; IYMON=5; IZMON=5
 
    GROUP 23. Field print-out and plot control
  ** Print out flow field values in X-Z plane
XZPR=T
IYPRF=5; IYPRL=5
NXPRIN=3; NYPRIN=3; NZPRIN=3
PATCH(ZEQUS5,CONTUR,2,7,2,7,5,5,1,1)
PLOT(ZEQUS5,U1,0.0,20.0); PLOT(ZEQUS5,C1,0.0,20.0)
PLOT(ZEQUS5,W1,0.0,20.0); PLOT(ZEQUS5,V1,0.0,20.0)
PATCH(PLUME,PROFIL,1,1,NY/2,NY/2,1,NZ,1,1)
PLOT(PLUME,W1,0.0,6.0); PLOT(PLUME,C1,0.0,0.1)
PATCH(XEQUS1,CONTUR,1,1,1,NY,1,NZ,1,1)
PLOT(XEQUS1,U1,0.0,20.0); PLOT(XEQUS1,C1,0.0,20.0)
PLOT(XEQUS1,W1,0.0,20.0); PLOT(XEQUS1,V1,0.0,20.0)
PATCH(YEQUS5,CONTUR,1,NX,NY/2,NY/2,1,NZ,1,1)
PLOT(YEQUS5,U1,0.0,20.0); PLOT(YEQUS5,V1,0.0,20.0)
PLOT(YEQUS5,C1,0.0,50.0); PLOT(YEQUS5,W1,0.0,20.0)
 
selref=t; resfac=1.e-2
TSTSWP=-1