TALK=T;RUN( 1, 1)
 ** LOAD(x106) from the x Input Library
TEXT(RNG KE-2D FLOW IN TURNAROUND DUCT :T106
TITLE
 
  DISPLAY
  This case concerns plane, two-dimensional, incompressible flow through
  a 180 degree turnaround duct, as studied experimentally by Monson & 
  Seegmiller (1988). The duct has a width W=0.0381m and an aspect ratio 
  of 10. The inlet and outlet planes are located 3.5W upstream and downsteam 
  of the bend, respectively. The inner radius of the bend is 0.01905m, which 
  corresponds to a curvature ratio of 0.5. The Reynolds number based on duct 
  width is 1.E5, and the Dean number is 7.071E4. The flow exhibits large 
  streamline curvature with flow relaminarisation along the inner convex wall 
  together with the fromation of a separation zone near the bend exit on the 
  inner (convex) surface of the duct. The turnaround duct is representative 
  of many flows of engineering interest, such as flow in the turnaround duct 
  of the Space-Shuttle-Main-Engine powerhead.
 
  Calculations are made with several high-Re forms k-e and k-w model, and the 
  calculation employs a relatively coarse non-uniform mesh of NY=25 and NZ=80. 
  The standard k-e and k-w models do not predict the occurence of separation 
  along the inner wall at the exit of the U-bend. The other variants of these 
  models do predict this feature, but with varying size of the separation bubble. 
  The current solutions remain sensitive to mesh numbers. Typically, depending
  on the turbulence model used, 450 to 900 sweeps are required for complete 
  convergence. Low-Reynolds-number modelling, as exemplified by Library Case 
  T214, is recommended to predict the important features of this flow.
  ENDDIS
 
  D.Monson, D. & Seegmiller, H. L., "Comparison of LDV measurements and 
  Navier-Stokes solutions in a two-dimensional 180 degree turn-around 
  duct." AIAA Paper AIAA 89-0275. (1988).
  
  D.J.Monson, H.L.Seegmiller, P.K.McConnaughey and Y.S.Chen, 'Comparison 
  of experiment with calculations using curvature-corrected zero and 
  two-equation turbulence models for a two-dimensional U-duct', AIAA 
  90-1484, (1990).
  
  J.L Yin, D.Z Wang, H Cheng & W.G.Gu,"Assessment of RANS to predict 
  flows with large streamline curvature", IOP Conference Series: 
  Materials Science and Engineering, Volume 52, Topic 2, (1990).
 
  V.A. Sandborn & J.C.Shin, "Water Flow Measurements in a 180 Degree 
  Turnaround Rectangular Duct", NASA Contractor Report No: 36354, 
  June (1989).



   PHOTON USE
   p
 
 
 
 
 
   view x
   gr ou x 1
   msg velocity vectors
   vec x 1 sh
   msg press  to continue
   pause
   vec off; redr
   msg contours of normalised w velocity resolutes
   con w1nr x 1 fi;0.1
   msg press  to continue
   pause
   con del; redr
   msg contours of turbulence intensities
   con tint x 1 fi;0.1
   msg Press  and then  to END
   pause
   con del; redr
      msg contours of pressure coefficients
   con cp x 1 fi;0.1
   msg press  to continue
   pause
 
   ENDUSE
 
 
    GROUP 1. Run title
BOOLEAN(KWMOD);KWMOD=F
CHAR(CTURB,TLSC)
REAL(REYNO,WIN,TKEIN,EPSIN,WIDTH,LENGTH,YAXIS,MASIN,DTF,DEAN)
REAL(RADBI,RADBO,RADC,CURVRT)
   ** Reynolds number
REYNO=1.E5
   ** Duct width & other dimensions
WIDTH=.0381;YAXIS=1.5*WIDTH;LENGTH=3.5*WIDTH
  ** Inlet values
WIN=26.25;TKEIN=(0.05*WIN)**2;EPSIN=TKEIN**1.5*0.1643/(0.09*WIDTH)
  ** Dean Number
RADBO=YAXIS;RADBI=YAXIS-WIDTH;RADC=YAXIS-0.5*WIDTH
CURVRT=0.5*WIDTH/RADC      ! Curvature ratio
DEAN =REYNO*(CURVRT)**0.5  ! Dean number
DEAN;CURVRT
    GROUP 6. Body-fitted coordinates or grid distortion
BFC=T;NONORT=T;NX=1

NY=25;NZ=80
GSET(D,NX,NY,NZ,1.0,WIDTH,LENGTH)
GSET(P,A,0.0,0.0,LENGTH);GSET(P,B,0.0,WIDTH,LENGTH)
GSET(P,C,1.0,0.0,LENGTH);GSET(P,D,1.0,WIDTH,LENGTH)
GSET(L,LAB,A,B,NY,S1.7);GSET(L,LBD,B,D,NX,1.0)
GSET(L,LCD,C,D,NY,S1.7);GSET(L,LCA,C,A,NX,1.0)
GSET(F,FABCD,A,-,B,-,D,-,C,-)
GSET(M,FABCD,+J+I,1,1,1,TRANS)
GSET(C,K81,F,K1,+,0.0,0.0,0.0)
GSET(C,K81,F,K81,+,0.0,(YAXIS+0.5*WIDTH),0.0)
  ** k71-k51 cells in the outlet length
GSET(C,K51,F,K81,+,0.0,0.0,-LENGTH,INC,0.8)
  ** k51-k21 cells in the bend
GSET(C,K21,F,K51,RX,-3.14159,YAXIS,0.0,INC,1.0)
  ** k21-k1 cells in the inlet length
GSET(C,K1,F,K21,+,0.0,0.0,LENGTH,INC,1.2)
   ** Set wup=t to account better for the high curvature of
      the w resolute...
WUP=T
    GROUP 7. Variables stored, solved & named
SOLVE(P1,V1,W1);SOLUTN(P1,Y,Y,Y,N,N,N);STORE(ENUT,LEN1,YPLS,STRS)
SOLUTN(V1,P,P,P,P,P,N);SOLUTN(W1,P,P,P,P,P,N)
MESG( Enter the required turbulence model:
MESG(  CK   - Chen-Kim k-e model
MESG(  KE   - Standard k-e model
MESG(  RNG  - RNG      k-e model (default)
MESG(  KW   - Wilcox   k-w model
MESG(  RKE  - Realisable k-e model
MESG(  KWR  - Wilcox 2008 k-w model
MESG(  KWS  - k-w SST model
MESG(
MESG(
READVDU(CTURB,CHAR,RNG)
CASE :CTURB: OF
WHEN CK,2
+ TEXT(CK KE-2D FLOW IN TURNAROUND DUCT :T106
+ MESG(Chen-Kim k-e model
+ TURMOD(KECHEN);TLSC=EP
WHEN KE,2
+ TEXT(KE-2D FLOW IN TURNAROUND DUCT :T106
+ MESG(Standard k-e model
+ TURMOD(KEMODL);TLSC=EP
WHEN KW,2
+ TEXT(KW-2D FLOW IN TURNAROUND DUCT :T106
+ MESG(Wilcox 1988 k-w model
+ TURMOD(KWMODL);TLSC=OMEG
+ STORE(EP);EPSIN=EPSIN/(0.09*TKEIN)
WHEN RNG,3
+ MESG(RNG k-e model (default)
+ TURMOD(KERNG);TLSC=EP
+ STORE(ETA,ALF,GEN1);KELIN=1
+ OUTPUT(ALF,Y,N,P,Y,Y,Y);OUTPUT(ETA,Y,N,P,Y,Y,Y)
WHEN RKE,3
+ TEXT(RKE-2D FLOW IN TURNAROUND DUCT :T106
+ MESG(Realisable k-e model
+ TURMOD(KEREAL);STORE(C1E);TLSC=EP
+ OUTPUT(CMU,P,P,P,P,Y,Y);OUTPUT(C1E,P,P,P,P,Y,Y)
+ STORE(DUDY,DUDZ) ! for 2D BFC cases UCRT is stored
WHEN KWR,3
+ TEXT(KWR-2D FLOW IN TURNAROUND DUCT :T106
+ MESG(Wilcox 2008 k-w model
+ TURMOD(KWMODLR);STORE(FBP);FIINIT(FBP)=1.0
+ KWMOD=T;TLSC=OMEG;EPSIN=EPSIN/(0.09*TKEIN)
+ STORE(DUDY,DUDZ) ! for 2D BFC cases UCRT is stored
WHEN KWS,3
+ TEXT(SST-2D FLOW IN TURNAROUND DUCT :T106
+ MESG(Menter k-w SST model
+ TURMOD(KWSST)
+ KWMOD=T;EPSIN=EPSIN/(0.09*TKEIN);TLSC=OMEG
+ STORE(BF1,BF2,GEN1,SIGK,SIGW,CDWS)
+ STORE(CWAL,CWBE)
+ FIINIT(BF1)=1.0;FIINIT(BF2)=1.0 
ENDCASE
STORE(CP) ! pressure coefficient
(stored of CP is 2.*P1/(RHO1*WIN*WIN))
STORE(TINT) ! turbulent intensity
(stored of TINT is KE^0.5/WIN)
STORE(W1NR) ! normalised streamwise velocity
(stored of W1NR is W1/WIN)
    GROUP 8. Terms (in differential equations) & devices
    GROUP 9. Properties of the medium (or media)
ENUL=WIN*WIDTH/REYNO
    GROUP 11. Initialization of variable or porosity fields
FIINIT(P1)=1.E-10;FIINIT(W1)=WIN
FIINIT(KE)=TKEIN;FIINIT(:TLSC:)=EPSIN
    GROUP 13. Boundary conditions and special sources
INLET(BFCIN,LOW,#1,#1,#1,#NREGY,#1,#1,1,1)
VALUE(BFCIN,P1,GRND1);VALUE(BFCIN,W1,GRND1)
VALUE(BFCIN,WCRT,-WIN);VALUE(BFCIN,KE,TKEIN)
VALUE(BFCIN,:TLSC:,EPSIN)
  *  Transfer density for GXBFC subroutine
BFCA=RHO1
PATCH(OUTLET,HIGH,#1,#1,#1,#NREGY,#NREGZ,#NREGZ,1,1)
COVAL(OUTLET,P1,1.E4,0.0)
COVAL(OUTLET,V1,ONLYMS,0.0);COVAL(OUTLET,W1,ONLYMS,0.0)
  **    N-wall
WALL (WFNN,NORTH,1,NX,NY,NY,1,NZ,1,1)
  **    S2-wall
WALL (WFNS,SOUTH,1,NX,1,1,1,NZ,1,1)
    GROUP 15. Termination of sweeps
LSWEEP=1000
MASIN=WIDTH*WIN*RHO1
RESREF(P1)=1.E-12*MASIN
RESREF(W1)=RESREF(P1)*WIN; RESREF(V1)=RESREF(W1)
RESREF(KE)=RESREF(P1)*TKEIN; RESREF(:TLSC:)=RESREF(P1)*EPSIN
    GROUP 16. Termination of iterations
LITER(P1)=20
    GROUP 17. Under-relaxation devices
RELAX(P1,LINRLX,1.0);DTF=ZWLAST/WIN/NZ
RELAX(W1,FALSDT,DTF); RELAX(V1,FALSDT,DTF)
RELAX(KE,FALSDT,DTF); RELAX(:TLSC:,FALSDT,DTF)
    GROUP 22. Spot-value print-out
IYMON=2;IZMON=56;NPRMON=LSWEEP
    GROUP 23. Field print-out and plot control
NPRINT=LSWEEP;ITABL=3;NPLT=2
NYPRIN=1;NZPRIN=1;IZPRF=18;IZPRL=24;TSTSWP=-1

SPEDAT(SET,GXMONI,PLOTALL,L,T)
SPEDAT(SET,OUTPUT,NOFIELD,L,T)
OUTPUT(ENUT,Y,N,Y,N,Y,Y)
DISTIL=T
CASE :CTURB: OF
WHEN KE,2
+EX(P1  )=1.232E+02;EX(V1  )=5.955E-01 
+EX(W1  )=2.546E+01;EX(KE  )=1.631E+01 
+EX(EP  )=1.237E+04;EX(STRS)=1.987E-01 
+EX(YPLS)=1.564E+00;EX(LEN1)=2.564E-03 
+EX(ENUT)=5.700E-03;EX(WCRT)=2.184E+01 
+EX(VCRT)=6.728E+00;EX(W1NR)=9.579E-01
+EX(TINT)=1.359E-01;EX(CP  )=3.575E-01
WHEN CK,2
+EX(P1  )=1.221E+02;EX(V1  )=6.210E-01
+EX(W1  )=2.506E+01;EX(KE  )=4.211E+00
+EX(EP  )=7.886E+03;EX(STRS)=1.590E-01
+EX(YPLS)=1.355E+00;EX(LEN1)=1.284E-03
+EX(ENUT)=1.199E-03;EX(WCRT)=2.143E+01
+EX(VCRT)=6.773E+00;EX(W1NR)=9.427E-01
+EX(TINT)=7.461E-02;EX(CP  )=3.543E-01
WHEN RNG,3
+EX(P1  )=1.218E+02;EX(V1  )=6.161E-01
+EX(W1  )=2.505E+01;EX(KE  )=4.140E+00
+EX(EP  )=7.562E+03;EX(GEN1)=1.497E+08
+EX(ALF )=6.735E-01;EX(ETA )=3.073E+00
+EX(STRS)=1.539E-01;EX(YPLS)=1.338E+00
+EX(LEN1)=1.178E-03;EX(ENUT)=1.076E-03
+EX(WCRT)=2.142E+01;EX(VCRT)=6.760E+00
+EX(W1NR)=9.425E-01;EX(TINT)=7.357E-02
+EX(CP  )=3.536E-01
WHEN RKE,3
+EX(P1  )=1.258E+02;EX(V1  )=6.976E-01
+EX(W1  )=2.512E+01;EX(KE  )=8.434E+00
+EX(EP  )=8.396E+03;EX(C1E )=5.088E-01
+EX(DWDZ)=5.544E+02;EX(DWDY)=1.911E+03
+EX(DVDZ)=7.194E+02;EX(DVDY)=5.628E+02
+EX(EPKE)=1.066E+03;EX(CMU )=1.149E-01
+EX(STRS)=1.593E-01;EX(YPLS)=1.371E+00
+EX(LEN1)=2.447E-03;EX(ENUT)=5.227E-03
+EX(WCRT)=2.148E+01;EX(VCRT)=6.811E+00
+EX(W1NR)=9.449E-01;EX(TINT)=1.005E-01
+EX(CP  )=3.653E-01
WHEN KW,2
+EX(P1  )=1.231E+02;EX(V1  )=6.186E-01
+EX(W1  )=2.525E+01;EX(KE  )=1.387E+01
+EX(EP  )=1.131E+04;EX(OMEG)=1.157E+04
+EX(STRS)=1.799E-01;EX(YPLS)=1.462E+00
+EX(LEN1)=2.294E-03;EX(ENUT)=4.601E-03
+EX(WCRT)=2.163E+01;EX(VCRT)=6.742E+00
+EX(W1NR)=9.499E-01;EX(TINT)=1.253E-01
+EX(CP  )=3.574E-01
WHEN KWR,3
+EX(P1  )=1.210E+02;EX(V1  )=6.148E-01
+EX(W1  )=2.507E+01;EX(KE  )=4.765E+00
+EX(EP  )=7.886E+03;EX(DWDZ)=4.612E+02
+EX(DWDY)=1.869E+03;EX(DVDZ)=6.264E+02
+EX(DVDY)=4.655E+02;EX(GEN1)=2.990E+08
+EX(FBP )=9.391E-01;EX(XWP )=1.359E-01
+EX(OMEG)=1.108E+04;EX(STRS)=1.586E-01
+EX(YPLS)=1.341E+00;EX(LEN1)=2.003E-03
+EX(ENUT)=1.625E-03;EX(WCRT)=2.144E+01
+EX(VCRT)=6.762E+00;EX(W1NR)=9.430E-01
+EX(TINT)=7.902E-02;EX(CP  )=3.513E-01
WHEN KWS,3
+EX(P1  )=1.324E+02;EX(V1  )=7.261E-01
+EX(W1  )=2.484E+01;EX(KE  )=3.674E+00
+EX(EP  )=7.458E+03;EX(CWBE)=7.745E-02
+EX(CWAL)=5.177E-01;EX(CDWS)=5.039E+06
+EX(SIGW)=1.738E+00;EX(SIGK)=1.686E+00
+EX(LTLS)=9.508E-05;EX(WDIS)=7.157E-03
+EX(GEN1)=3.512E+08;EX(BF2 )=9.517E-01
+EX(BF1 )=6.855E-01;EX(OMEG)=1.154E+04
+EX(STRS)=1.445E-01;EX(YPLS)=1.281E+00
+EX(LEN1)=1.319E-03;EX(ENUT)=9.093E-04
+EX(WCRT)=2.121E+01;EX(VCRT)=6.814E+00
+EX(W1NR)=9.346E-01;EX(TINT)=6.809E-02
+EX(CP  )=3.842E-01
ENDCASE
 LIBREF = 106
STOP