PHOTON USE
  p
 
 
 
  gr ou z 1
  gr ou z 1 x 5 9 y 4 6
  gr ou z 1 x 15 19 y 1 9
  gr ou z 1 x 6 6 y 5 5
  gr ou z 1 x 8 8 y 5 5
 
  gr ou z 1 x 6 6 y 1 3
  gr ou z 1 x 7 7 y 1 3
  gr ou z 1 x 8 8 y 1 3
 
  gr ou z 1 x 16 16 y 2 3
  gr ou z 1 x 16 16 y 5 5
  gr ou z 1 x 16 16 y 7 7
  gr ou z 1 x 18 18 y 2 3
  gr ou z 1 x 18 18 y 5 5
  gr ou z 1 x 18 18 y 7 7
  red
  set vec comp au1 cv1 -
  msg               VEHICULAR EXHAUST DISPERSION
  msg                   Air velocity vectors
  vec z 1 sh
  msg Press  to continue
  pause
  vec off;red
  con h1 z 1 fil;.5
  msg               VEHICULAR EXHAUST DISPERSION
  msg                     NOx concentration
  msg  Press Enter to continue
  pause
  con off;red
  set vec comp bu2 dv2 -
  msg                   SNOWFALL IN A CROSS-WIND with ROOF
  msg                      VELOCITY VECTORS OF SNOW
  vec z 1 sh
  msg  Press Enter to continue
  pause
  vec off;red
  msg                        SNOW VOLUME FRACTION
  con liq z 1 fil;0.1
  ENDUSE
   ***************************************************************
   *  GROUP 1. Run title and other preliminaries.
TEXT(VEHICULAR EXHAUST DISPERSION IN SNOW FALL:138

  DISPLAY
   This case is a part of the main project to predict turbulent and
   two-phase flows at the town scale. It is concerned with the snow
   fall  in the street canyon between one elevated building and its
   high-rise neighbour  block.  PLANT  is  used  to  introduce  the
   influences  of  gas and snow concentration near the road surface
   to the source of vehicular exhaust pollution.
  ENDDIS

real(windvl,liqfra,gravac,fallvl)
windvl=2.0;liqfra=1.e-5;fallvl=1.0;gravac=9.81
   *  GROUP 3. X-direction grid specification.
   *  Cartesian Grid Selected
CARTES=T
   *  Extent of the Domain in the X-Direction:  8.000E+01
   *  Number of Cells in the X-Direction
NX=23
   *  Equal Grid Spacing in Subregion 1
SUBGRD(X,1,4, 2.000E+01, 1.000E+00)
INTEGER(NXF01,NXL01); NXF01=1; NXL01=4
   *  Equal Grid Spacing in Subregion 2
SUBGRD(X,5,9, 1.000E+01, 1.000E+00)
INTEGER(NXF02,NXL02); NXF02=5; NXL02=9
   *  Equal Grid Spacing in Subregion 3
SUBGRD(X,10,14, 2.000E+01, 1.000E+00)
INTEGER(NXF03,NXL03); NXF03=10; NXL03=14
   *  Equal Grid Spacing in Subregion 4
SUBGRD(X,15,19, 1.000E+01, 1.000E+00)
INTEGER(NXF04,NXL04); NXF04=15; NXL04=19
   *  Equal Grid Spacing in Subregion 5
SUBGRD(X,20,23, 2.000E+01, 1.000E+00)
INTEGER(NXF05,NXL05); NXF05=20; NXL05=23
   *  GROUP 4. Y-direction grid specification.
   *  Extent of the Domain in the Y-Direction:  5.000E+01
   *  Number of Cells in the Y-Direction
NY=14
   *  Equal Grid Spacing in Subregion 1
SUBGRD(Y,1,3, 5.000E+00, 1.000E+00)
INTEGER(NYF01,NYL01); NYF01=1; NYL01=3
   *  Equal Grid Spacing in Subregion 2
SUBGRD(Y,4,6, 1.000E+01, 1.000E+00)
INTEGER(NYF02,NYL02); NYF02=4; NYL02=6
   *  Equal Grid Spacing in Subregion 3
SUBGRD(Y,7,9, 1.000E+01, 1.000E+00)
INTEGER(NYF03,NYL03); NYF03=7; NYL03=9
   *  Equal Grid Spacing in Subregion 4
SUBGRD(Y,10,14, 2.500E+01, 1.000E+00)
INTEGER(NYF04,NYL04); NYF04=10; NYL04=14
   *  GROUP 7. Variables stored, solved & named.
SOLVE(P1,U1,V1,H1,U2,V2,R1,R2)
   *
ONEPHS=F;SOLUTN(P1,Y,Y,N,N,P,P)
SOLUTN(U1,Y,Y,N,Y,P,P);SOLUTN(U2,Y,Y,N,Y,P,P)
SOLUTN(V1,Y,Y,N,Y,P,P);SOLUTN(V2,Y,Y,N,Y,P,P)
SOLUTN(R1,Y,n,N,Y,P,P);SOLUTN(R2,Y,Y,N,Y,P,P)
NAME(U1)=AU1;NAME(U2)=BU2;NAME(V1)=CV1;NAME(V2)=DV2
NAME(R1)=GAS;NAME(R2)=LIQ
STORE(PRPS)
   *  GROUP 8. Terms (in differential equations) & devices.
TERMS(H1,N,Y,Y,N,Y,N)
   *  GROUP 9. Properties of the medium (or media).
RHO1=1.0;rho2=100.0;fallvl=.5;liqfra=liqfra*100.0
ENUL= 1.5E-05
REAL(CAP); CAP= 1.000E+03
REAL(KCOND1); KCOND1= 1.000E-02
PRNDTL(H1)=CAP*ENUL*RHO1/KCOND1
ENUT= 6.700E+00
   *  GROUP 10. Inter-phase-transfer processes and properties.
  ** Set a constant inter-phase friction coefficient.
CFIPS=gravac*(rho2-rho1)/fallvl
   *  GROUP 11. Initialization of variable or porosity fields.
REAL(GAS0);gas0=1.0-liqfra
FIINIT(GAS)=GAS0;FIINIT(LIQ)=liqfra
FIINIT(P1)=windvl
FIINIT(AU1)=windvl;FIINIT(CV1)=0.0;FIINIT(BU2)=windvl
FIINIT(DV2)=-fallvl
FIINIT(H1)= 0.0
   *  Obstructed Region, Number 1
CONPOR(0.0,CELL,-NXF02,-NXL02,-NYF02,-NYL02,1,1)
   *  Obstructed Region, Number 2
CONPOR(0.0,CELL,-NXF04,-NXL04,-NYF01,-NYL03,1,1)
   *  GROUP 13. Boundary conditions and special sources.
  ** Inlet of air and water at low x
patch(INLET,WEST,1,1,1,NY,1,1,1,1)
coval(INLET,P1,fixflu,windvl*RHO1*GAS0)
COVAL(INLET,P2,fixflu,windvl*RHO2*liqfra)
COVAL(INLET,AU1,onlyms,windvl);COVAL(INLET,BU2,onlyms,windvl)
COVAL(INLET,H1,ONLYMS, 0.0)
  ** sky
patch(sky,north,1,nx,ny,ny,1,1,1,1)
coval(sky,p2,fixflu,rho2*liqfra*fallvl)
  ** Water or air exit
PATCH(OUTLET,EAST,NX,NX,1,NY,1,1,1,1)
REAL(OUTCO1);OUTCO1=.01
COVAL(OUTLET,P1,OUTCO1,0.0);COVAL(OUTLET,P2,RHO2*OUTCO1,0.0)
COVAL(OUTLET,AU1,ONLYMS,0.0);COVAL(OUTLET,BU2,ONLYMS,0.0)
COVAL(OUTLET,CV1,ONLYMS,0.0);COVAL(OUTLET,DV2,ONLYMS,0.0)
COVAL(OUTLET,H1,ONLYMS,SAME)
  ** Gravity on phase 2
patch(gravity,phasem,1,nx,1,ny,1,1,1,1)
coval(gravity,dv2,fixflu,-gravac)
  ** floor
patch(floor,south,1,nx,1,1,1,1,1,1)
coval(floor,p2,0.001*rho2,0.0)
  ** incline the roofs
patch(roof1,phasem,nxf02,nxl02,nyf03,nyf03,1,1,1,1)
coval(roof1,bu2,fixflu,0.1*gravac)
patch(roof2,phasem,nxf04,nxl04,nyf04,nyf04,1,1,1,1)
coval(roof2,bu2,fixflu,0.1*gravac)

  PLANTBEGIN
   *  POLLUTION SOURCE Boundary Condition, Named ROAD
PATCH(ROAD,SOUTH,10,14,1,3,1,1,1,1)
    VAL=0.01*GAS+10.*LIQ
COVAL(ROAD,H1,FIXFLU,GRND)
  PLANTEND

   *  GROUP 14. Downstream pressure for PARAB=.TRUE..
   *  GROUP 15. Termination of sweeps.
LSWEEP=150;RESREF(P1)=1.E-10
RESREF(GAS)=1.E-10;RESREF(LIQ)=1.E-10
RESREF(AU1)=1.E-10;RESREF(BU2)=1.E-10;RESREF(CV1)=1.E-10
RESREF(DV2)=1.E-10;ISWC1=100
   *  Reference Residual for the ENTHALPY
RESREF(H1)= 1.000E-06
   *  GROUP 16. Termination of iterations.
ENDIT(P1)=1.E-10
   *  GROUP 17. Under-relaxation devices.
RELAX(LIQ,LINRLX,0.25)
REAL(FALDT);FALDT=1.0
RELAX(AU1,FALSDT,FALDT);RELAX(CV1,FALSDT,FALDT)
RELAX(BU2,FALSDT,FALDT);RELAX(DV2,FALSDT,FALDT)
RELAX(H1,FALSDT, 1.000E+03)
   *  GROUP 18. Limits on variables or increments to them.
varmin(liq)=1.e-9
   *  GROUP 19. Data communicated by satellite to GROUND.
NAMSAT=MOSG
   *  GROUP 20. Preliminary print-out.
   *  GROUP 21. Print-out of variables.
OUTPUT(AU1,Y,N,N,Y,Y,Y);OUTPUT(BU2,Y,N,N,Y,Y,Y)
OUTPUT(CV1,N,N,Y,Y,Y,Y);OUTPUT(DV2,Y,N,N,Y,Y,Y)
OUTPUT(LIQ,N,N,Y,Y,Y,Y);OUTPUT(P1,Y,N,N,Y,Y,Y)
output(gas,n,n,n,n,n,n)
OUTPUT(H1,Y,N,N,Y,Y,Y)
IXMON=12
IYMON=3
ITABL=3

tstswp=-1
dmpstk=t
DISTIL=T
EX(P1)=1.705E+02; EX(AU1)=1.643E+00; EX(BU2)=1.636E+00
EX(DV2)=5.064E-01; EX(H1)=8.451E-03; EX(PRPS)=3.771E+01
EX(VPOR)=8.137E-01
 LIBREF=138
STOP