GROUP 1. Run title and other preliminaries
TEXT(LAM-BRE K-E_2D PARABOLIC PIPE FLOW :T211
TITLE
  DISPLAY
  The case considered is the two-dimensional parabolic solution of
  turbulent flow in a circular pipe at a Reynolds number of 1.E5
  (see PHOENICS input Library case 175 for a problem description).
  The marching integration is carried out until the flow is fully-
  developed. The turbulence is simulated by use of either the Lam-
  Bremhorst k-e low-Re model or the 2-layer k-e low-Re model. The
  calculation integrates down to the wall with a non-uniform radial
  grid so as to concentrate cells very close to the wall. For this
  purpose a grid is generated which is a geometric progression in
  which the ratio of any two adjacent cell lengths is constant.
 
  No grid optimisation studies have been conducted to discover the
  sensitivity of the solution to coarser meshes. In order to resolve
  the streamwise changes in the viscous sublayer, it is advised that
  the maximum forward step size be restricted to a sublayer
  thickness, i.e. DZ=ENUL/US where US is the friction velocity.
  ENDDIS
 
  This low-Reynolds number demonstration library case is set to run
  for 20 slabs only (NZ=20).  About 200 slabs are required for fully
  developed flow (NZ=200).
 
  AUTOPLOT USE
  file
  phi 5
 
  clear
  da 1 w1;col3;plot 1
  @
   0.10254E+03 0.26250E+04 CR
  W1(m/s)@
  @
   0.18969E+04 0.16284E+03 CR
  Distance from the Pipe Centre (m)@
  msg Press e to END
  ENDUSE
 
BOOLEAN(TWOL);TWOL=F
REAL(TIN,TWALL,GMIXL,CLEN,DIAM,WIN,RAD,REYNO)
REAL(TKEIN,EPIN,US,DELT1,FRIC,KFAC,DELY,AA);INTEGER(JJM)
REYNO=1.0E5;DIAM=0.1;WIN=1.;TIN=10.;TWALL=5.
FRIC=1./(1.82*LOG10(REYNO)-1.64)**2;US=WIN*(FRIC/8.)**0.5
REYNO
FRIC
US
    GROUP 3. X-direction grid specification
CARTES=F;XULAST=0.1
    GROUP 4. Y-direction grid specification
RAD=0.5*DIAM;ENUL=WIN*DIAM/REYNO
  ** define first dely from wall and the grid-expansion
     factor Kfac which defines a constant ratio of lengths of
     two adjacent cells.
DELT1=1.*ENUL/US;DELY=DELT1/RAD
IF(TWOL) THEN
+ KFAC=1.15
ELSE
+ KFAC=1.1
ENDIF
  ** calculate NY from dely & Kfac
AA=(YVLAST/DELY)*(KFAC-1.0)+1.0;AA=LOG(AA)/LOG(KFAC)+1.0001
NY=AA
  ** define uniform grid initially
IREGY=1;GRDPWR(Y,NY,YVLAST,1.0)
  ** compute expanding grid from north boundary
YFRAC(NY)=1.0
DO JJ=NY,2,-1
+ JJM=JJ-1
+ YFRAC(JJM)=YFRAC(JJ)-DELY
+ DELY=KFAC*DELY
ENDDO
YVLAST=RAD
    GROUP 5. Z-direction grid specification
PARAB=T;NZ=20;CLEN=70.*DIAM;GRDPWR(Z,NZ,CLEN*NZ/200.,1.0)
    GROUP 7. Variables stored, solved & named
SOLVE(P1,W1,V1,H1);STORE(ENUT);NAME(H1)=TEMP
STORE(LEN1)
IF(TWOL) THEN
+ TURMOD(KEMODL-2L)
+ TEXT(2-LAYER K-E_2D PARABOLIC PIPE FLOW :T211
ELSE
+ TURMOD(KEMODL-LOWRE)
ENDIF
    GROUP 8. Terms (in differential equations) & devices
DIFCUT=0.0;TERMS(TEMP,N,Y,Y,Y,Y,Y)
    GROUP 9. Properties of the medium (or media)
RHO1=1.0;ENUL=WIN*DIAM/REYNO;PRT(TEMP)=0.86;PRNDTL(TEMP)=0.71
    GROUP 11. Initialization of variable or porosity fields
FIINIT(W1)=WIN;FIINIT(TEMP)=TIN
TKEIN=0.25*WIN*WIN*FRIC;FIINIT(KE)=TKEIN
GMIXL=0.09*RAD;EPIN=0.1643*TKEIN**1.5/GMIXL;FIINIT(EP)=EPIN
    GROUP 13. Boundary conditions and special sources
  ** North-Wall Boundary - Laminar at wall for low-Re model
WALL(WFUN,NORTH,1,NX,NY,NY,1,NZ,1,1)
COVAL(WFUN,TEMP,1.0/PRNDTL(TEMP),TWALL)
  ** Inlet Boundary: uniform profiles assumed
PATCH(INLET,LOW,1,NX,1,NY,1,1,1,1);COVAL(INLET,P1,FIXFLU,WIN)
COVAL(INLET,W1,ONLYMS,WIN);COVAL(INLET,TEMP,ONLYMS,TIN)
COVAL(INLET,V1,ONLYMS,ZERO)
COVAL(INLET,KE,ONLYMS,TKEIN);COVAL(INLET,EP,ONLYMS,EPIN)
    GROUP 16. Termination of iterations
LITHYD=8
IF(TWOL) THEN
+ SELREF=F
ENDIF
REAL(MASIN);MASIN=RHO1*WIN*DIAM*DIAM/80.
RESREF(P1)=1.E-12*MASIN/RHO1; RESREF(W1)=RESREF(P1)*RHO1*WIN
RESREF(V1)=RESREF(W1); RESREF(KE)=RESREF(P1)*RHO1*TKEIN
RESREF(TEMP)=RESREF(P1)*RHO1*TIN; RESREF(EP)=RESREF(P1)*RHO1*EPIN
    GROUP 17. Under-relaxation devices
RELAX(W1,FALSDT,1.E3)
RELAX(KE,FALSDT,1.E3); RELAX(EP,FALSDT,1.E3)
    GROUP 18. Limits on variables or increments to them
VARMIN(W1)=1.E-10;VARMIN(KE)=1.E-10;VARMIN(EP)=1.E-10
    GROUP 22. Monitor print-out
IZMON=1;IYMON=NY-5;ITABL=2;IPLTL=30;NPLT=1;NPRMON=4
    GROUP 23. Field print-out and plot control
OUTPUT(LEN1,Y,N,N,Y,Y,Y);OUTPUT(ENUT,Y,N,N,Y,Y,Y)
TSTSWP=-1;NZPRIN=50;NUMCLS=5
    GROUP 24. Dumps for restarts