GROUP 1. Run title and other preliminaries
TEXT(VAN DRIEST_1D DEVELOPED PIPE FLOW  :T201
TITLE
  DISPLAY
  The case considered is the one-dimensional solution of fully-
  developed turbulent flow in a circular pipe at a Reynolds number
  of 1.E5. The turbulence is simulated by use of the Prandtl mixing
  length model with Nikuradse's prescription of the mixing length.
  The calculation integrates down to the wall by using van Driest's
  viscous- damping extension to the mixing length. The solution is
  performed by use of the single-slab solver with a prescribed
  pressure drop. A non-uniform grid is employed so as to concentrate
  cells very close to the wall. For this purpose a grid is generated
  which is a geometric progression with the property that the ratio
  of any two adjacent cell lengths is a constant. The calculations
  yield a friction factor of f=0.018 which is in excellent agreement
  with the experimental value.
  ENDDIS
 
   The following AUTOPLOT use file produces two plots;
   the first is the axial velocity profile; and the
   second is the turbulent viscosity profile.
 
   AUTOPLOT USE
   file
   phi 5
 
   da 1 w1;col3 1
   msg Velocity (W1) profile
   msg Press RETURN to continue
   pause
   clear;da 1 enut
   col3 1
   msg Press e to END
   ENDUSE
 
BOOLEAN(VARLAM);VARLAM=F
REAL(DIAM,WIN,REY,MIXL,FRIC,DPDZ,MASIN,DTF)
REAL(DELT1,DELT2,DELT3,US)
DIAM=0.1;WIN=1.0; REY=1.E5;FRIC=1./(1.82*LOG10(REY)-1.64)**2
REY
FRIC
DPDZ=FRIC*RHO1*WIN*WIN/(2.*DIAM);US=WIN*(FRIC/8.)**0.5
US
    GROUP 3. X-direction grid specification
CARTES=F;XULAST=0.1
    GROUP 4. Y-direction grid specification
ENULA=WIN*DIAM/REY
  ** define first dely from wall and the grid-expansion
     factor Kfac which defines a constant ratio of lengths of
     two adjacent cells.
DELT1=1.*ENULA/US
REAL(KFAC,DELY);KFAC=1.1;DELY=DELT1/(0.5*DIAM)
  ** calculate NY from dely & Kfac
REAL(AA)
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;INTEGER(JJM)
DO JJ=NY,2,-1
+ JJM=JJ-1
+ YFRAC(JJM)=YFRAC(JJ)-DELY
+ DELY=KFAC*DELY
ENDDO
YVLAST=0.5*DIAM
    GROUP 5. Z-direction grid specification
ZWLAST=0.1*DIAM
    GROUP 7. Variables stored, solved & named
SOLVE(W1);STORE(ENUT,LEN1)
    GROUP 8. Terms (in differential equations) & devices
TERMS(W1,N,N,P,P,P,P)
    GROUP 9. Properties of the medium (or media)
ENUL=ENULA;ENUT=MIXLEN;EL1=NIKURPIP;GENK=T
EL1A=0.14*YVLAST;EL1B=-0.08/YVLAST;EL1C=-0.06/YVLAST**3
   ** activate van Driest correction to the mixing length
IENUTA=5
   ** test for ground-set enul
IF(VARLAM) THEN
+ TMP1=CONST;TMP1A=0.0;ENUL=LINTEM
ENDIF
    GROUP 11. Initialization of variable or porosity fields
FIINIT(W1)=WIN
    GROUP 13. Boundary conditions and special sources
WALL(WALLN,NORTH,1,1,NY,NY,1,NZ,1,1)
PATCH(PFORW,VOLUME,1,1,1,NY,1,NZ,1,1);COVAL(PFORW,W1,FIXFLU,DPDZ)
    GROUP 15. Termination of sweeps
LSWEEP=40;TSTSWP=-1;LITHYD=6
    GROUP 16. Termination of iterations
MASIN=RHO1*WIN*DIAM*DIAM/80.; RESREF(W1)=1.E-12*MASIN*WIN
    GROUP 17. Under-relaxation devices
DTF=10.*ZWLAST/WIN;VARMIN(W1)=1.E-10;TSTSWP=-1
    GROUP 22. Spot-value print-out
IYMON=NY-2;NPLT=5;NZPRIN=1;NYPRIN=4;IYPRF=1
    GROUP 24. Dumps for restarts
RELAX(W1,FALSDT,DTF);WALPRN=T