PHOTON USE
  p
 
  10 1
 
  view -x
  msg velocity vectors
  vec x 1 sh;pause
  msg pressure contours
  con p1 x 1 fi;0.001
  ENDUSE
  ** L(292) from the PHOENICS Input Library
     ****** TO LOAD CASE: TYPE L(292) ******
 
  DISPLAY
    Two dimensional turbulent pipe flow
 
    This example may be used to compare GRND2 (Log-law) and
    GRND3 (Generalised) wall functions for KE and EP at a
    wall. The type of wall function required may be set by
    changing the value of WALLFN (2 for LOGLAW and 3 for GENLAW
    wall functions).
 
           ________________________________________
    z
    |__x   ------>
           ------>
           ________________________________________
           ////////////////////////////////////////
             Wall - WA1
  ENDDIS
 
    GROUP 1. Run title and other preliminaries
REAL(KEIN,EPIN,WIN,REYNO) ; WIN=10 ; KEIN=0.01*WIN**2
 RHO1=1.22 ; ENUL=1.4650E-05;yvlast=0.05
REYNO=WIN*RHO1*2.0*YVLAST/ENUL
 
TEXT(2D Pipe Flow K-E Model; Re=:reyno:        
TITLE
INTEGER(WALLFN);WALLFN=3
    GROUP 3. X-direction grid specification
CARTES=F;XULAST=0.01
    GROUP 4. Y-direction grid specification
GRDPWR(Y,20,YVLAST,1.5)
    GROUP 5. Z-direction grid specification
GRDPWR(Z,20,5,1)
    GROUP 7. Variables stored, solved & named
SOLVE(V1,W1,P1) ; STORE(ENUT) ; SOLUTN(P1,Y,Y,Y,N,N,N)
    GROUP 9. Properties of the medium (or media)
TURMOD(KEMODL)
    GROUP 11. Initialization of variable or porosity fields
EPIN=(0.09)**0.75*KEIN**1.5 / (0.1*YVLAST)
FIINIT(KE)=KEIN ; FIINIT(EP)=EPIN ; FIINIT(W1)=WIN
    GROUP 13. Boundary conditions and special sources
INLET(IN1,LOW,1,NX,1,NY,1,1,1,LSTEP) ; VALUE(IN1,P1,WIN*RHO1)
VALUE(IN1,KE,KEIN) ; VALUE(IN1,EP,EPIN) ; VALUE(IN1,W1,WIN)
 
OUTLET(OU1,HIGH,1,NX,1,NY,NZ,NZ,1,LSTEP)
VALUE(OU1,V1,0.0) ; VALUE(OU1,W1,0.0) ; VALUE(OU1,P1,0.0)
VALUE(OU1,KE,0.0) ; VALUE(OU1,EP,0.0)
 
PATCH(WA1,SWALL,1,NX,NY,NY,1,NZ,1,LSTEP)
CASE (WALLFN) OF
COVAL(WA1,W1,LOGLAW,0.0)
WHEN 2
+  COVAL(WA1,KE,LOGLAW,LOGLAW)
+  COVAL(WA1,EP,LOGLAW,LOGLAW)
WHEN 3
+  COVAL(WA1,EP,GENLAW,GENLAW)
+  COVAL(WA1,KE,GENLAW,GENLAW)
ENDCASE
    GROUP 15. Termination of sweeps
LSWEEP=100
    GROUP 17. Under-relaxation devices
SARAH=5.0
RELAX(KE,LINRLX,0.5) ; RELAX(EP,LINRLX,0.5);KELIN=3
    GROUP 21. Print-out of variables
IYMON=NY/2 ; IZMON=NZ/2
TSTSWP=-1
 LIBREF=292
DISTIL=T