PHOTON USE
  p
 
 
 
  gr ou x 1
  vec x 1 sh
  msg(                Velocity distribution
  msg(Press Enter to continue
  pause
  vec off;red
  con temp x 1 sh;int 15
  msg(                Temperature distribution
  ENDUSE
    GROUP 1. Run title and other preliminaries

  DISPLAY 
     This example shows how to use PLANT to set the 
     linear inlet velocity profile for a simple laminar 
     flow in a duct.
  ENDDIS
 
TEXT(2D CHANNEL FLOW WITH LINEAR INLET PROFILE:107
    GROUP 4. Y-direction grid specification
GRDPWR(Y,20,1.0,1.0)
    GROUP 5. Z-direction grid specification
GRDPWR(Z,20,2.0,1.0)
    GROUP 7. Variables stored, solved & named
SOLVE(P1,V1,W1,H1)
NAME(14)=TEMP
    GROUP 8. Terms (in differential equations) & devices
TERMS(TEMP,N,Y,Y,Y,Y,Y)
    GROUP 9. Properties of the medium (or media)
ENUL=1.E-1
    GROUP 13. Boundary conditions and special sources
  ** Inlet
PATCH(LININL,LOW,1,NX,1,NY,1,1,1,1)

  PLANTBEGIN
PATCH(LININLET,LOW,1,NX,1,NY,1,1,1,1)
   VAL=1.*(1-YG2D)
COVAL(LININLET,P1,FIXFLU,GRND)
   VAL=1-YG2D
COVAL(LININLET,W1,ONLYMS,GRND)
COVAL(LININLET,TEMP,ONLYMS,1.)
  PLANTEND    

  ** Outlet
PATCH(OUTLET,HIGH,1,1,1,NY,NZ,NZ,1,1)
COVAL(OUTLET,P1,FIXVAL,0.0)
  ** North wall
PATCH(NORTH,NWALL,1,1,NY,NY,1,NZ,1,1)
COVAL(NORTH,W1,1.0,0.0)
COVAL(NORTH,TEMP,1.0,0.0)
    GROUP 15. Termination of sweeps
LSWEEP=300
RESREF(P1)=1.E-5;RESREF(V1)=1.E-5;RESREF(W1)=1.E-5
RESREF(TEMP)=1.E-5
    GROUP 19. Data communicated by satellite to GROUND
NAMSAT=MOSG
    GROUP 20. Preliminary print-out
    GROUP 22. Spot-value print-out
IYMON=3;IZMON=NZ-2
tstswp=-1
dmpstk=t
DISTIL=T
EX(P1)=1.268E-01; EX(V1)=1.098E-02
EX(W1)=5.000E-01; EX(TEMP)=5.221E-01
 LIBREF=107
STOP