PHOTON USE
  p
 
 
 
  gr ou z 1
  gr ou z 1 x 5 9 y 1 6
  gr ou z 1 x 15 19 y 4 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 2 3
  gr ou z 1 x 8 8 y 2 3
 
  gr ou z 1 x 16 16 y 1 3
  gr ou z 1 x 17 17 y 1 3
  gr ou z 1 x 18 18 y 1 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 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 Enter to continue
  pause
  vec off;red
  con h1 z 1 fil;.5
  msg               VEHICULAR EXHAUST DISPERSION
  msg                  NOx concentration in air
  msg Press Enter to continue
  pause
  con off;red
  con h2 z 1 fil;.5
  msg               VEHICULAR EXHAUST DISPERSION
  msg              NOx concentration in rain water
  msg  Press Enter to continue
  pause
  con off;red
  set vec comp bu2 dv2 -
  msg                      VELOCITY VECTORS OF RAIN
  vec z 1 sh
  msg  Press Enter to continue
  pause
  vec off;red
  msg                       LIQUID VOLUME FRACTION
  con liq z 1 fil;0.1
  ENDUSE
   ***************************************************************
   *
   *  GROUP 1. Run title and other preliminaries.
   *
TEXT(VEHICULAR EXHAUST DISPERSION IN RAINFALL: Z102
title
  DISPLAY
   This case is a part of a project to predict turbulent and
   two-phase flows on an urban scale. It concerns rain-fall in a 
   street canyon between one elevated building and  its low -rise   
   neighbour block.
   
   The pollution is affected by inter-phase transport from gas to 
   liquid phase governed by specification of values of interphase 
   transfer coefficients and  PHI  differences  between  the  phases.  
   
   PLANT instructions are provided  in  Group  10  make  create
   special GROUND codings 
  ENDDIS
real(windvl,liqfra,gravac,fallvl)
windvl=2.0;liqfra=1.e-4;fallvl=1.0;gravac=9.81
   *  GROUP 3. X-direction grid specification.
CARTES=T
NX=23
SUBGRD(X,1,4, 2.000E+01, 1.000E+00)
INTEGER(NXF01,NXL01); NXF01=1; NXL01=4
SUBGRD(X,5,9, 1.000E+01, 1.000E+00)
INTEGER(NXF02,NXL02); NXF02=5; NXL02=9
SUBGRD(X,10,14, 2.000E+01, 1.000E+00)
INTEGER(NXF03,NXL03); NXF03=10; NXL03=14
SUBGRD(X,15,19, 1.000E+01, 1.000E+00)
INTEGER(NXF04,NXL04); NXF04=15; NXL04=19
SUBGRD(X,20,23, 2.000E+01, 1.000E+00)
INTEGER(NXF05,NXL05); NXF05=20; NXL05=23
   *  GROUP 4. Y-direction grid specification.
NY=14
SUBGRD(Y,1,3, 5.000E+00, 1.000E+00)
INTEGER(NYF01,NYL01); NYF01=1; NYL01=3
SUBGRD(Y,4,6, 1.000E+01, 1.000E+00)
INTEGER(NYF02,NYL02); NYF02=4; NYL02=6
SUBGRD(Y,7,9, 1.000E+01, 1.000E+00)
INTEGER(NYF03,NYL03); NYF03=7; NYL03=9
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,H2,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)
SOLUTN(H1,Y,Y,N,Y,P,P);SOLUTN(H2,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,Y)
TERMS(H2,N,Y,N,N,N,Y)
   *  GROUP 9. Properties of the medium (or media).
RHO1=1.0;RHO2=1.E3
ENUL= 1.500E-05
REAL(CPP); CPP= 1.000E+03
REAL(KCOND1); KCOND1= 1.000E-02
PRNDTL(H1)=CPP*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

    PLANTBEGIN
  ** Instruct PLANT to code the inter-phase  transfer  coefficients
     and PHI differences between the phases.
CINT(H1)=GRND
    COI1(H1)=10.*MASS2
CINT(H2)=1.e10
PHINT(H1)=GRND
    FII1(H1)=H2
PHINT(H2)=GRND
    FII2(H2)=H1
  PLANTEND

   *  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
CONPOR(0.0,CELL,-NXF02,-NXL02,-NYF01,-NYL02,1,1)
CONPOR(0.0,CELL,-NXF04,-NXL04,-NYF02,-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)
coval(sky,dv2,onlyms,-fallvl)
  ** Water or air exit 1
PATCH(OUTLET1,EAST,NX,NX,1,NY,1,1,1,1)
REAL(OUTCO1);OUTCO1=0.01
COVAL(OUTLET1,P1,OUTCO1,0.0);COVAL(OUTLET1,P2,RHO2*OUTCO1,0.0)
COVAL(OUTLET1,AU1,ONLYMS,0.0);COVAL(OUTLET1,BU2,ONLYMS,0.0)
COVAL(OUTLET1,CV1,ONLYMS,0.0);COVAL(OUTLET1,DV2,ONLYMS,0.0)
COVAL(OUTLET1,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)
   *  HEAT SOURCE Boundary Condition, Named ROAD
PATCH(ROAD,CELL,NXF03,NXL03,NYF01,NYL01,1,1,1,1)
COVAL(ROAD,H1,FIXFLU, 1.E-02)
   *  GROUP 15. Termination of sweeps.
LSWEEP=400;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
RESREF(H1)= 1.000E-06
ENDIT(P1)=1.E-10
   *  GROUP 17. Under-relaxation devices.
RELAX(LIQ,LINRLX,0.95)
REAL(FALDT);FALDT=10.0
RELAX(AU1,FALSDT,FALDT);RELAX(CV1,FALSDT,FALDT)
RELAX(BU2,FALSDT,FALDT);RELAX(DV2,FALSDT,FALDT)
RELAX(H1,FALSDT, FALDT*10.)
   *  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.694E+02; EX(AU1)=1.665E+00; EX(BU2)=1.649E+00
EX(DV2)=8.003E-01; EX(H1)=3.721E-05; EX(H2)=1.220E-05
EX(PRPS)=3.771E+01; EX(VPOR)=8.137E-01
 LIBREF=102
STOP