PHOTON USE
  P



  vi 1 0 0;gr ou x 1
  vec x 1 sh
  msg         Velocity distribution at the center plane
  msg  Press Enter to continue
  pause
  vec off;gr off;vi 0 0 1;gr ou z 1
  set vec ref 0.3
  vec z 4 sh
  msg         Velocity distribution upwind of canopy
  msg  Press Enter to continue
  pause
  vec off
  red
  vec z 6 sh
  msg         Velocity distribution in canopy cross-section
  msg  Press Enter to continue
  pause
  vec off
  red
  vec z 8 sh
  msg         Velocity distribution in canopy cross-section
  msg  Press Enter to continue
  pause
  vec off
  red
  vec z 11 sh
  msg         Velocity distribution downwind of canopy
  msg  Press Enter to continue
  pause
  vec off
  red
  vec z 12 sh
  msg         Velocity distribution downwind of canopy
  msg  Press Enter to continue
  pause
  vec off
  red
  vec z 13 sh
  msg         Velocity distribution downwind of canopy
  msg  Press Enter to continue
  pause
  vec off
  red
  vec z 14 sh
  msg         Velocity distribution downwind of canopy
  msg  Press Enter to continue
  pause
  vec off
  red
  vec z 15 sh
  msg         Velocity distribution downwind of canopy
  msg  Press Enter to continue
  ENDUSE
   *  GROUP 1. Run title and other preliminaries.
TEXT(CANOPY-GENERATED SECONDARY FLOW:137

  DISPLAY
   This run analyses the three dimensional secondary  flow  pattern
   generated  by  a  canopy.  The  Prandtl  mixing  length model in
   conjunction with the power-law  velocity  profile  in  a  stable
   athmosfere   are   used   to  evalute  the  turbulent  viscosity
   distribution. The latter, the non-uniform velocity inlet profile
   and  plant  airflow  interaction  are  introduced  through PLANT
   generated  GROUND  codings.  Interesting  variants  include  the
   comparison  with  the  K-E  model  simulations  presented  by U.
   Svensson and  K.  Haeggkvist  in  J.  of  Wind  Engineering  and
   Industrial Aerodynamics, 35, 1990, pp. 201-211
  ENDDIS

   *  GROUP 3. X-direction grid specification.
NX=10
SUBGRD(X,1,5, 2.000E+02, 1.000E+00)
INTEGER(NXF01,NXL01); NXF01=1; NXL01=5
SUBGRD(X,6,10, 2.000E+02, 1.000E+00)
INTEGER(NXF02,NXL02); NXF02=6; NXL02=10
   *  GROUP 4. Y-direction grid specification.
NY=10
SUBGRD(Y,1,5, 1.000E+01, 1.000E+00)
INTEGER(NYF01,NYL01); NYF01=1; NYL01=5
SUBGRD(Y,6,10, 8.000E+01, 2.000E+00)
INTEGER(NYF02,NYL02); NYF02=6; NYL02=10
   *  GROUP 5. Z-direction grid specification.
NZ=15
SUBGRD(Z,1,5, 1.500E+02, 1.000E+00)
INTEGER(NZF01,NZL01); NZF01=1; NZL01=5
SUBGRD(Z,6,10, 1.500E+02, 1.000E+00)
INTEGER(NZF02,NZL02); NZF02=6; NZL02=10
SUBGRD(Z,11,15, 1.500E+02, 1.000E+00)
INTEGER(NZF03,NZL03); NZF03=11; NZL03=15
   *  GROUP 7. Variables stored, solved & named.
SOLVE(U1,W1,V1,P1)
SOLUTN(P1,Y,Y,Y,N,N,N)
STORE(ENUT)
   *  GROUP 9. Properties of the medium (or media).
RHO1=1.22;ENUL=1.4650E-05
ENUT=GRND

   *  GROUP 11. Initialization of variable or porosity fields.
FIINIT(W1)=10.
   *  GROUP 13. Boundary conditions and special sources.

PATCH(SHOWINL,LOW,1,NX,1,NY,1,1,1,1)
   ** Wall function zero-slip
PATCH(GROUND,SWALL,1,NX,1,1,1,NZ,1,1)
COVAL(GROUND,W1,LOGLAW,0.0)
COVAL(GROUND,U1,LOGLAW,0.0)
       * Outlet boundary
PATCH(OUT,HIGH,1,NX,1,NY,NZ,NZ,1,1)
COVAL(OUT,P1,FIXP,0.0)
       * Free boundaries
PATCH(EAST,EAST,NX,NX,1,NY,1,NZ,1,1)
COVAL(EAST,P1,FIXP,0.0)
PATCH(NORTH,NORTH,1,NX,NY,NY,1,NZ,1,1)
COVAL(NORTH,P1,FIXP,0.0)
   *  GROUP 15. Termination of sweeps.
LSWEEP=50
RELAX(P1,LINRLX,0.4)
real(fac);fac=100.
REAL(SCALEL,SCALEU);SCALEL= 10.;SCALEU= 10.
RELAX(W1,FALSDT,fac*SCALEL/SCALEU)
RELAX(V1,FALSDT,fac*SCALEL/SCALEU)
RELAX(U1,FALSDT, fac*SCALEL/SCALEU)
   *  GROUP 19. Data communicated by satellite to GROUND.
NAMSAT=MOSG
   *  GROUP 20. Preliminary print-out.
   *  GROUP 22. Spot-value print-out.
IXMON=5;IYMON=6
IZMON=7;ITABL=3

   PLANTBEGIN
      *  Mixing-length theory: ENUT=L**2*dW1/dY
   VIST=1.6/7.*YG2D**1.142/100.**0.142
    ** Inlet velocity of 1/7 law
PATCH(INLET,LOW,1,NX,1,NY,1,1,1,1)
   VAL=1.22*10.*(YG2D/100.)**0.142
COVAL(INLET,P1,FIXFLU,GRND)
   VAL=10.*(YG2D/100.)**0.142
COVAL(INLET,W1,ONLYMS,GRND)
   ** Plant airflow interactions
     * form drag Cd=0.3, a=0.5
PATCH(DRAG,PHASEM,1,5,1,5,6,10,1,1)
    CO=0.075*(V1*V1+W1*W1+U1*U1)**0.5
COVAL(DRAG,U1,GRND,0.0)
    CO=0.075*(V1*V1+W1*W1+U1*U1)**0.5
COVAL(DRAG,V1,GRND,0.0)
    CO=0.075*(V1*V1+W1*W1+U1*U1)**0.5
COVAL(DRAG,W1,GRND,0.0)
   PLANTEND

tstswp=-1
dmpstk=t
DISTIL=T
EX(P1)=1.828E+00; EX(U1)=9.327E-02; EX(V1)=1.054E-01
EX(W1)=6.445E+00; EX(ENUT)=4.194E+00
 LIBREF=137
STOP