PHOTON USE
  p
 
 
 
  set ve ref 20;ROT Y ANG 340
  gr ou y 4 z 15 16 col 11;gr ou z 17 y 1 3 col 11
  gr ou y 2 X 9 M z 7 9 col 11;gr ou z 10 y 1 1 col 11
  gr ou y 11 x 6 8 z 7 9 col 11;gr ou z 10 x 6 8 y 2 10 col 11
  GR OU X M Y 1 1 Z 7 9 col 11;GR OU X M Y 1 3 Z 15 16 col 11
  GR OU X 9 Y 2 10 Z 7 9 col 11
  GR OU x 1 1 y 1 1 z 8 9 col 11;rot y ang 355
  red
  msg                FLOW and DISPERSION NEAR TOWER BLOCK
  msg                           Geometry
  msg   Press Enter to continue
  PAUSE
  red
  msg                FLOW and DISPERSION NEAR TOWER BLOCK
  msg                NOx concentration at the road surface
  CON C1 y 1 z 10 14 fil;.001
  msg   Press Enter to continue
  PAUSE
  CON off;red
  set vec ref 40.
  VEc X 7 Z 1 1 sh
  VEc Y 1 sh
  msg                FLOW and DISPERSION NEAR TOWER BLOCK
  MSG                          Velocity field
  msg Press E to end
  ENDUSE
   *
   ************************************************************
   *
   *  GROUP 1.  Run identifiers and other preliminaries.
   *
TEXT(EXHUAST DISPERSION NEAR TOWER BLOCK:142


  DISPLAY 
  Vehicle exhaust  dispesion in the street canyon with influence of
  traffic streams flowing in opposite directions is considered. The
  traffic  caused  momentum  sources/sinks  are introduced by PLANT
  options.  The similar problem with no traffic disturbed near road
  region  has  been  simulated  and succesfully compared with field
  observations by S.  Zhubrin et al.  in PHOENICS J. of CFD and its
  applications, v. 6, No 3, 1993
  ENDDIS
 
   * PARAMETERS:
   * ENUT=6.7, ISOTROP
   * trotuar= 4 m
REAL(YY,W1INL)
REAL(EMUEFF)
REAL(FUME,WIDTH,FINL,WAVER,CINL)
WIDTH=42
FUME=10.
FINL=130*150
WAVER=4.0
CINL=1.
   *
   ************************************************************
   *
   *  GROUP 3.  x-direction grid specification.
   *  Total length in X direction   130 M
   *
NX=9
XULAST=130.
XFRAC(1)=1.282E-01;XFRAC(2)=2.564E-01
XFRAC(3)=3.846E-01;XFRAC(4)=4.615E-01
XFRAC(5)=5.385E-01;XFRAC(6)=6.154E-01
XFRAC(7)=7.436E-01;XFRAC(8)=8.718E-01
XFRAC(9)=1.
        ************************************************************
   *
   *  GROUP 4.  y-direction grid specification.
   *
NY=11
YVLAST=150.
YFRAC(1)=6.667E-02;YFRAC(2)=1.333E-01
YFRAC(3)=2.000E-01;YFRAC(4)=2.933E-01
YFRAC(5)=3.867E-01;YFRAC(6)=4.800E-01
YFRAC(7)=5.733E-01;YFRAC(8)=6.667E-01
YFRAC(9)=7.778E-01;YFRAC(10)=8.889E-01
YFRAC(11)=1.
         ***********************************************************
   *
   *  GROUP 5.  z-direction grid specification.
   *
   *
NZ=17
ZWLAST=210.
ZFRAC(1)=5.714E-02;ZFRAC(2)=1.143E-01
ZFRAC(3)=1.714E-01;ZFRAC(4)=2.286E-01
ZFRAC(5)=2.857E-01;ZFRAC(6)=3.571E-01
ZFRAC(7)=4.286E-01;ZFRAC(8)=4.476E-01
ZFRAC(9)=5.476E-01;ZFRAC(10)=6.476E-01
ZFRAC(11)=6.667E-01;ZFRAC(12)=7.143E-01
ZFRAC(13)=7.619E-01;ZFRAC(14)=8.214E-01
ZFRAC(15)=8.810E-01;ZFRAC(16)=9.405E-01
ZFRAC(17)=1.
        ************************************************************
   *
   *  GROUP 7.  Variables (including porosities) named,
   *            stored & solved.
SOLVE(U1,V1,W1,C1)
SOLUTN(P1,Y,Y,Y,N,N,N)
STORE(VPOR,EPOR,NPOR,HPOR,PRPS)
DIFCUT=0.0
   *
   ************************************************************
   *
   *  GROUP 9.  Properties of the medium (or media).
   *
   *  Fluid/medium is USER_DEFINED
   *  Reference pressure (N/m^2)
PRESS0=1.0000E+05
   *  CONSTANT density formulation
   *  Density (kg/m^3)
RHO1=1.2930E+00
   *  Laminar kinematic viscosity (m^2/s)
ENUL=1.0E-05
   *  Turbulence treatment
   *  Turbulent kinematic viscosity (m^2/s)
ENUT=6.7
   *
   ************************************************************
   *
   *  GROUP 11. Initialization of fields of variables,
   *            porosities, etc.
   *
CONPOR(0,CELL,1,NX,1,1,7,9)
   * BLOCKAGE boundary condition, name TOWER
CONPOR(0,CELL,6,8,2,10,7,9)
   * BLOCKAGE boundary condition, name REST
CONPOR(0,CELL,1,NX,1,3,15,16)
FIINIT(W1)=10.
   *  GROUP 12.
   *  GROUP 13. Boundary conditions and special sources
   * INLET boundary condition, name INL
YY=5.
PATCH(INL1,LOW,1,NX,1,1,1,1,1,1)
COVAL(INL1,U1,0.0,0.0)
COVAL(INL1,V1,0.0,0.0)
W1INL=20.6*(YY/10)**.25
COVAL(INL1,W1,0.,W1INL)
COVAL(INL1,P1,FIXFLU,W1INL*RHO1)
COVAL(INL1,C1,0.,0.0)
YY=5.+10*(2-1)
PATCH(INL2,LOW,1,NX,2,2,1,1,1,1)
COVAL(INL2,U1,0.0,0.0)
COVAL(INL2,V1,0.0,0.0)
W1INL=20.6*(YY/10)**.25
COVAL(INL2,W1,0.0,W1INL)
COVAL(INL2,P1,FIXFLU,W1INL*RHO1)
COVAL(INL2,C1,0.,0.)
YY=5.+10*(3-1)
PATCH(INL3,LOW,1,NX,3,3,1,1,1,1)
COVAL(INL3,U1,0.0,0.0)
COVAL(INL3,V1,0.0,0.0)
W1INL=20.6*(YY/10)**.25
COVAL(INL3,W1,0.0,W1INL)
COVAL(INL3,P1,FIXFLU,W1INL*RHO1)
COVAL(INL3,C1,0.,0.)
YY=5.+10*(4-1)
PATCH(INL4,LOW,1,NX,4,4,1,1,1,1)
COVAL(INL4,U1,0.0,0.0)
COVAL(INL4,V1,0.0,0.0)
W1INL=20.6*(YY/10)**.25
COVAL(INL4,W1,0.0,W1INL)
COVAL(INL4,P1,FIXFLU,W1INL*RHO1)
COVAL(INL4,C1,0.0,0.)
YY=5.+10*(5-1)
PATCH(INL5,LOW,1,NX,5,5,1,1,1,1)
COVAL(INL5,U1,0.0,0.0)
COVAL(INL5,V1,0.0,0.0)
W1INL=20.6*(YY/10)**.25
COVAL(INL5,W1,0.0,W1INL)
COVAL(INL5,P1,FIXFLU,W1INL*RHO1)
COVAL(INL5,C1,0.0,0.)
YY=5.+10*(6-1)
PATCH(INL6,LOW,1,NX,6,6,1,1,1,1)
COVAL(INL6,U1,0.0,0.0)
COVAL(INL6,V1,0.0,0.0)
W1INL=20.6*(YY/10)**.25
COVAL(INL6,W1,0.0,W1INL)
COVAL(INL6,P1,FIXFLU,W1INL*RHO1)
COVAL(INL6,C1,0.,0.)
YY=5.+10*(7-1)
PATCH(INL7,LOW,1,NX,7,7,1,1,1,1)
COVAL(INL7,U1,0.0,0.0)
COVAL(INL7,V1,0.0,0.0)
W1INL=20.6*(YY/10)**.25
COVAL(INL7,W1,0.0,W1INL)
COVAL(INL7,P1,FIXFLU,W1INL*RHO1)
COVAL(INL7,C1,0.0,0.)
YY=5.+10*(8-1)
PATCH(INL8,LOW,1,NX,8,8,1,1,1,1)
COVAL(INL8,U1,0.0,0.0)
COVAL(INL8,V1,0.0,0.0)
W1INL=20.6*(YY/10)**.25
COVAL(INL8,W1,0.0,W1INL)
COVAL(INL8,P1,FIXFLU,W1INL*RHO1)
COVAL(INL8,C1,0.0,0.)
YY=5.+10*(9-1)
PATCH(INL9,LOW,1,NX,9,9,1,1,1,1)
COVAL(INL9,U1,0.0,0.0)
COVAL(INL9,V1,0.0,0.0)
W1INL=20.6*(YY/10)**.25
COVAL(INL9,W1,0.0,W1INL)
COVAL(INL9,P1,FIXFLU,W1INL*RHO1)
COVAL(INL9,C1,0.0,0.)
YY=5.+10*(10-1)
PATCH(INL10,LOW,1,NX,10,10,1,1,1,1)
COVAL(INL10,U1,0.0,0.0)
COVAL(INL10,V1,0.0,0.0)
W1INL=20.6*(YY/10)**.25
COVAL(INL10,W1,0.0,W1INL)
COVAL(INL10,P1,FIXFLU,W1INL*RHO1)
COVAL(INL10,C1,0.0,0.)
YY=5.+10*(11-1)
PATCH(INL11,LOW,1,NX,11,11,1,1,1,1)
COVAL(INL11,U1,0.0,0.0)
COVAL(INL11,V1,0.0,0.0)
W1INL=20.6*(YY/10)**.25
COVAL(INL11,W1,0.0,W1INL)
COVAL(INL11,P1,FIXFLU,W1INL*RHO1)
COVAL(INL11,C1,0.0,0.)
   * OUTLET boundary condition, name OUT
PATCH(OUT,HIGH,1,NX,1,NY,NZ,NZ,1,1)
COVAL(OUT,P1,FIXP,0.)
   *
PATCH(TOP,NORTH,1,NX,NY,NY,1,NZ,1,1)
COVAL(TOP,P1,FIXP,0.0)
   *
PATCH(LEFT,WEST,1,1,1,NY,1,NZ,1,1)
COVAL(LEFT,P1,FIXP,0.0)
   *
PATCH(RIGHT,EAST,NX,NX,1,NY,1,NZ,1,1)
COVAL(RIGHT,P1,FIXP,0.0)
   *
PATCH(SOURCE,SOUTH,1,NX,1,1,11,13,1,1)
COVAL(SOURCE,C1,FIXFLU,FUME)
   *
   PLANTBEGIN 
PATCH(CARSO1,CELL,1,NX,1,1,11,12,1,1)
    CO=.3*1./2.*4.*10*((20.-U1)**2+V1**2+W1**2)**0.5
COVAL(CARSO1,U1,GRND,20.)
    CO=.3*1./2.*4.*10.*((20.-U1)**2+V1**2+W1**2)**0.5
COVAL(CARSO1,V1,GRND,0.0)
    CO=.3*1./2.*4.*10.*((20.-U1)**2+V1**2+W1**2)**0.5
COVAL(CARSO1,W1,GRND,0.0)
   *
PATCH(CARSO2,CELL,1,NX,1,1,13,13,1,1)
    CO=.3*1./2.*4.*10.*((-20.-U1)**2+V1**2+W1**2)**0.5
COVAL(CARSO2,U1,GRND,-20.)
    CO=.3*1./2.*4.*10.*((-20.-U1)**2+V1**2+W1**2)**0.5
COVAL(CARSO2,V1,GRND,0.0)
    CO=.3*1./2.*4.*10.*((-20.-U1)**2+V1**2+W1**2)**0.5
COVAL(CARSO2,W1,GRND,0.0)
   PLANTEND   
   *   
PATCH(ABSORB,SOUTH,1,NX,1,1,1,NZ,1,1)
COVAL(ABSORB,C1,0.05,0.0)
   *  GROUP 15. Termination criteria for sweeps and
   *            outer iterations.
LSWEEP=250;ISWC1=20
   *  GROUP 17. Under-relaxation and related devices.
   *  Variable declarations
REAL(MAXV,MINL,RELX)
   *  Estimate of the maximum velocity within domain
MAXV=40.000E+00
   *  Estimate of the minimum cell dimension
MINL=4
   *  Level of relaxation (100 - weak, 0.1 - strong)
RELX=1
   *  AUTO Linear relaxation applied to P1
RELAX(P1,LINRLX,0.8)
   *  AUTO False time-step relaxation applied to U1
RELAX(U1,FALSDT,20.*MINL/MAXV*RELX)
   *  AUTO False time-step relaxation applied to V1
RELAX(V1,FALSDT,20.*MINL/MAXV*RELX)
   *  AUTO False time-step relaxation applied to W1
RELAX(W1,FALSDT,20.*MINL/MAXV*RELX)
   *  AUTO False time-step relaxation applied to C1
RELAX(C1,FALSDT,1000.*MINL/MAXV*RELX)
   *  GROUP 18. Limits on variables values or increments
   *            to them.
RESREF(P1)=FINL*WAVER*0.001
RESREF(U1)=FINL*WAVER*RHO1*2.0*0.001
RESREF(V1)=FINL*WAVER*RHO1*2.0*0.001
RESREF(W1)=FINL*WAVER*RHO1*WAVER*0.001
RESREF(C1)=30*130*WAVER*RHO1*FUME*0.001
   *
OUTPUT(NPOR,N,N,N,N,N,N)
OUTPUT(EPOR,N,N,N,N,N,N)
OUTPUT(HPOR,N,N,N,N,N,N)
OUTPUT(VPOR,N,N,N,N,N,N)
nzprin=10
   ************************************************************
   *
   *  GROUP 22. Location of spot-value & frequency of
   *            residual printout.
   *
   *  Assign cell-indicies of spot-point monitoring location
 
IXMON=6;IYMON=3;IZMON=10
   *
   ************************************************************
   *
   *  GROUP 24. Preparation for continuation runs.
   *
NAMSAT=MOSG
   *
   ************************************************************

tstswp=-1
dmpstk=t
DISTIL=T
EX(U1)=2.772E+00; EX(V1)=1.000E+00; EX(W1)=2.136E+01
EX(C1)=8.786E-02; EX(PRPS)=9.037E-01
 LIBREF=142
STOP