DISPLAY
  The problem is the same as library case 230; but the 2-eqn
  k-omega model is used, the variable being OMEG, which is
  defined as KE/EPS, i.e. the frequency of the turbulence.
  ENDDIS
  PHOTON USE
  AUTOPLOT
    file
    phi 5
 
    d 1 ke;d 1 anke; Col3 1;blb4 2; Redr
    msg spatial decay of turbulence energy
    msg Press e to END
    text
    1
    3
    Predictions
     0.97408E+03 0.14786E+04 CR
    text
    1
 
    Analytical solution
     0.96768E+03 0.13548E+04 CR
    ENDUSE
    GROUP 1. Run title and other preliminaries
TEXT(X-Spatial Decay Of Turbu, K-Omega 
TITLE
REAL(XLEN,UIN,TKEIN,EPIN,OMIN,REYNO,WIDTH)
XLEN=1.0; REYNO=5.E5;WIDTH=0.25;UIN=10.0; TKEIN=1.0;EPIN=7.5
    GROUP 3. X-direction grid specification
GRDPWR(X,40,XLEN,1.0)
    GROUP 7. Variables stored, solved & named
STORE(U1,VIST)
    ** The next statement activates the Kolmogorov two-equation
    ** turbulence model
TURMOD(KOMODL); STORE(EP)
    GROUP 8. Terms (in differential equations) & devices
    ** cut out diffusion of ke and omeg
TERMS(KE,N,Y,N,N,N,N); TERMS(OMEG,N,Y,N,N,N,N)
DIFCUT=0.0;ENUL=UIN*WIDTH/REYNO
    GROUP 11. Initialization of variable or porosity fields
TKEIN=1.0; OMIN=EPIN/(0.09*TKEIN)
FIINIT(U1)=UIN; FIINIT(KE)=TKEIN; FIINIT(OMEG)=OMIN
  ** Analytical solution placed in ANKE store
STORE(ANKE); REAL(NN,BEE,ANTKE,C2F,CMUCD,GX); INTEGER(JJM1)
REAL(CON1,CON2,CON3)
C2F=3./40.; CMUCD=0.09; NN=C2F/CMUCD
BEE=OMIN/(TKEIN**NN); NN=-NN
CON2 = C2F*BEE/UIN ; CON1=TKEIN**NN
CON3 = XULAST/2.0; CON2=CON2 * CON3; NN=1./NN
DO JJ=1,NX
+ PATCH(IN:JJ:,INIVAL,JJ,JJ,1,NY,1,NZ,1,1)
+ GX=XFRAC(JJ)
+ IF(JJ.NE.1) THEN
+   JJM1=JJ-1; GX=(XFRAC(JJ) + XFRAC(JJM1))
+ ENDIF
+ ANTKE=(CON1+CON2*GX)**NN
+ INIT(IN:JJ:,ANKE,ZERO,ANTKE)
ENDDO
    GROUP 13. Boundary conditions and special sources
    ** Inlet Boundary
PATCH(INLET,WEST,1,1,1,1,1,1,1,1)
COVAL(INLET,KE,RHO1*UIN,TKEIN); COVAL(INLET,OMEG,RHO1*UIN,OMIN)
    GROUP 16. Termination of iterations
LSWEEP=10; SELREF=T; RESFAC=0.0001
    GROUP 21. Print-out of variables
OUTPUT(U1,N,N,N,N,N,N); OUTPUT(VIST,N,N,N,N,N,N)
    GROUP 22. Monitor print-out
IXMON=NX; ITABL=1; TSTSWP=LSWEEP/2
    GROUP 23. Field print-out and plot control
IPROF=1; NXPRIN=2; ORSIZ=0.4
PATCH(PROFILE,PROFIL,1,NX,1,1,1,1,1,1)
PLOT(PROFILE,KE,0.0,TKEIN); PLOT(PROFILE,OMEG,0.0,2.0*OMIN)
PLOT(PROFILE,VIST,0.0,0.0)