PHOTON USE
  p
  parphi
  10 1
 
  gr x 1
  msg y (radial) scale enlarged 10 times
  msg press return for the pressure distribution
  gr off
  gr ou x 1
  msg pressures. Press return for concentrations of A (Pr=1.0 )
  con p1 x 1 fi;0.01
  pause
  con off
  red
  msg A contours. Press return for concentrations of B (Pr=0.1 )
  con a x 1 fi;0.01
  pause
  con off
  red
  msg B contours. Press return for concentrations of C (Pr=10.0 )
  con B x 1 fi;0.01
  pause
  con off
  red
  msg C contours. Press return for contours of longitudinal velocity
  con C x 1 fi;0.01
  pause
  con off
  red
  msg W1 contours. Press return for velocity vectors
  con W1 x 1 fi;0.01
  pause
  con off
  red
  msg velocity vectors. Press E to end
  vec x 1 sh
  enduse
      GROUP 1. Run title and other preliminaries
TEXT(Pipe Flow; Effect Of Prandtl No.  
TITLE
  DISPLAY
  This run simulates developing laminar flow in a heated pipe of
  fixed wall temperature. The effect of Prandtl number is shown by
  solving for 4 different scalars, with Pr = 0.1, 0.7, 1.0 & 10.0 .
  heated pipe.
  Interesting parametric variations include:-
    Reynolds number; length-to-diameter ratio; and the use of
    fixed-flux rather than fixed-value boundary conditions.
  Case 604 explores the influence of varying pipe diameter with
  longitudinal distance.
 
  This Q1 contains PHOTON USE commands.
 
   ^       .-.-----------------------------.
   |r    /     \                             \
   |   -|-->    |   Heated pipe wall;         |->
       -|-->    |   also source of A,B+C.     |->
  Fixed  \     /                             /
  mass,    `-'-----------------------------'
  momentum and          z---->
  enthalpy fluxes
  enddis
 
REAL(WIN,REYNLDS)
REYNLDS=100.
REYNLDS
 
    GROUP 3. X-direction grid specification
CARTES=F;XULAST=0.01
 
    GROUP 4. Y-direction grid specification
IREGY=1; GRDPWR(Y,20,0.01,1.0)
 
    GROUP 5. Z-direction grid specification
PARAB=T; IREGZ=1; GRDPWR(Z,20,0.20,1.0)
 
    GROUP 7.Variables stored,solved & named
   **In addition to pressure, two velocities and enthalpy, three
  additional scalar quantities, A, B and C, are solved for. They
  can be regarded as concentrations of substances which dissolve
  in the fluid, differing only in their diffusion coefficient.
SOLVE(P1,V1,W1,H1,C1,C2,C3)
NAME(C1)=A; NAME(C2)=B; NAME(C3)=C
 
    GROUP 9. Properties of the medium (or media)
PRNDTL(H1)=0.7; PRNDTL(A)=1.0; PRNDTL(B)=0.1; PRNDTL(C)=10.0
WIN=REYNLDS*ENUL/YVLAST
 
    GROUP 13. Boundary conditions and special sources
WALL (PIPEWALL,NORTH,#1,#NREGX,#NREGY,#NREGY,#1,#NREGZ,1,1)
COVAL(PIPEWALL,W1,1.0,0.0);COVAL(PIPEWALL,H1,1.0,1.0)
COVAL(PIPEWALL,A,1.0,1.0);COVAL(PIPEWALL,B,1.0,1.0)
COVAL(PIPEWALL,C,1.0,1.0)
 
INLET(IN,LOW,#1,#1,#1,#NREGY,#1,#1,1,1)
VALUE(IN,P1,WIN);VALUE(IN,W1,WIN)
VALUE(IN,H1,0.0);VALUE(IN,A,0.0)
VALUE(IN,B,0.0); VALUE(IN,C,0.0)
 
    GROUP 16. Termination of iterations
   **Set the number of iterations to be performed at each forward
     step
LITHYD=30;SELREF=T;RESFAC=1.E-3
 
    GROUP 22. Spot-value print-out
NPRMON=LITHYD; IYMON=NY/4 ;UWATCH=T
 
    GROUP 23. Field print-out and plot control
TSTSWP=15;NYPRIN=2; NZPRIN=10
   **Settings to secure PHOTON-plottable print-out
IDISPA=1;IDISPB=2;IDISPC=NZ
   **Plot velocity and temperatures profiles at exit
PATCH(EXIT,PROFIL,1,1,1,NY,NZ,NZ,1,1)
PLOT(EXIT,W1,0.0,0.0);PLOT(EXIT,H1,0.0,0.0)
PLOT(EXIT,A,0.0,0.0);PLOT(EXIT,B,0.0,0.0)
PLOT(EXIT,C,0.0,0.0)