photon use
  p
  parphi
  1 5 1
 
 
 
 
  gr ou x 1
  set ref vec 2.0
 
  msg velocity vectors. Press RETURN for prps contours
  vec x 1 sh
  pause
  msg prps contours. Press RETURN for wcrt contours
  con prps x 1 fi;0.001
  mgs and vectors again
  vec x 1
  pause;con off;vec off;red
  msg wcrt contours. Press RETURN for temperature contours
  con wcrt x 1 sh;int 25
  pause;con off;red
  msg tem1 contours. Press RETURN for moisture contours
  con tem1 x 1 sh;int 25
  pause;con off;red
  msg c1 contours
  con c1 x 1 sh;int 25
  enduse
 
    GROUP 1. Run title and other preliminaries
TEXT(2D Laminar Air-Water Bound. Layer 
TITLE
  DISPLAY
 
  Warm dry air flows over the surface of a water reservoir at
  rest, creating a laminar two-part boundary layer.
 
  In the upper boundary layer, the air is slowed down, cooled and
  moistened.
 
  In the lower boundary layer, water is set in motion and warmed.
 
  The density difference entails that the effects on the air are
  greater than those on the water.
 
  The parabolic option is used, with an expanding grid; and the
  division between the two layers is fixed by setting v1=0 at ny/5.
 
  A PHOTON USE file is supplied for displaying results.
 
  ENDDIS
NY=20;NZ=20
MESG(NY=:NY:   If NOT OK, insert required value, else RETURN
READVDU(NY,INT,NY)
MESG(NZ=:NZ:   If NOT OK, insert required value, else RETURN
READVDU(NZ,INT,NZ)
 
    GROUP 4. Y-direction grid specification
GRDPWR(Y,NY,5.0E-4,1.0)
  ** Grid width grows as (axial distance)**0.5
AZYV=0.5;ZWADD=5.0E-04
 
    GROUP 5. Z-direction grid specification
PARAB=T
  ** Z-direction distances vary as IZ**2.0
GRDPWR(Z,NZ,0.1,2.0)
 
    GROUP 7. Variables stored, solved & named
SOLVE(P1,V1,W1,TEM1,C1);STORE(PRPS,ENUL,RHO1)
 
    GROUP 8. Terms (in differential equations) & devices
TERMS(TEM1,N,Y,Y,Y,Y,Y)
 
    GROUP 9. Properties of the medium (or media)
#use_props
    GROUP 11. Initialization of variable or porosity fields
:fluid:=air20
REAL(WIN)
WIN=1.0
PATCH(LIQUID,INIVAL,1,1,1,NY/5,1,NZ,1,1)
COVAL(LIQUID,PRPS,0.0,67.0)
COVAL(LIQUID,W1,0.0,0.0)
 
PATCH(GAS,INIVAL,1,1,NY/2+1,NY,1,NZ,1,1)
COVAL(GAS,PRPS,0.0,0.0);COVAL(GAS,W1,0.0,WIN)
 
INIADD=F
 
    GROUP 13. Boundary conditions and special sources
 
  ** Open South boundary
PATCH(LIQUSOU,SOUTH,1,1,1,1,1,NZ,1,1)
COVAL(LIQUSOU,P1,FIXP,0.0);COVAL(LIQUSOU,W1,0.0,0.0)
COVAL(LIQUSOU,TEM1,0.0,0.0);COVAL(LIQUSOU,C1,0.0,0.01)
 
  ** Open North boundary
PATCH(HIGHY,CELL,1,1,NY,NY,1,NZ,1,1)
COVAL(HIGHY,P1,FIXP,0.0);COVAL(HIGHY,TEM1,ONLYMS,1.0)
COVAL(HIGHY,W1,ONLYMS,1.0);COVAL(HIGHY,V1,ONLYMS,0.0)
 
  ** Fix phase interface at ny/5
PATCH(INTRFACE,CELL,1,1,NY/5,NY/5,1,NZ,1,1)
COVAL(INTRFACE,V1,FIXVAL,0.0);COVAL(INTRFACE,C1,FIXVAL,0.01)
 
  ** Upstream boundary
PATCH(LIQUIN,LOW,1,1,1,NY/5,1,1,1,1)
COVAL(LIQUIN,P1,FIXFLU,1.0e-3*WIN);COVAL(LIQUIN,W1,ONLYMS,0.0)
COVAL(LIQUIN,TEM1,ONLYMS,0.0);COVAL(LIQUIN,C1,ONLYMS,0.01)
 
PATCH(GASIN,LOW,1,1,1+NY/5,NY,1,1,1,1)
COVAL(GASIN,P1,FIXFLU,1.189*WIN);COVAL(GASIN,W1,ONLYMS,WIN)
COVAL(GASIN,TEM1,ONLYMS,1.0)
 
    GROUP 14. Downstream pressure for PARAB=T
IPARAB=1
    GROUP 16. Termination of iterations
LITHYD=10
    GROUP 22. Spot-value print-out
IYMON=5
    GROUP 23. Field print-out and plot control
NPLT=5;TSTSWP=-LITHYD/2
  ** Cross-stream profiles
PATCH(FIXEDZ,PROFIL,1,1,1,NY,1,NZ,1,1)
PLOT(FIXEDZ,W1,0.0,0.0);PLOT(FIXEDZ,H1,0.0,0.0)
IDISPA=1;NZPRIN=1;NYPRIN=1