GROUP 1. Run title and other preliminaries
TEXT(Mixing At A T-Junction           
TITLE
  DISPLAY
     The system simulated is a short pipe with a uniform turbulent
  flow of hot air entering at one end.  A cooler flow enters
  through a rectangular port in the wall of the pipe and mixing
  takes place between the streams. This is a 3-dimensional flow
  with one plane of symmetry, represented in polar coordinates.
  The k-e turbulence model is used with standard wall functions
  and boundary conditions at the wall.
  ENDDIS
    GROUP 3. X-direction grid specification
   ** Semicircular section domain: polar coordinates.
CARTES=F
   *  Write objects
RSET(D,T-JN,3.14159,0.1,1.0,1,0)
RSET(B,IN,0,0,0,3.14159,0.1,0,7,0)
RSET(B,OUTLT,0,0,1.0,3.14159,0.1,0,5,0)
RSET(B,WALL,0,0.1,0,3.14159,0,1.0,11,0)
RSET(B,SIDIN,0,.1,0.2,3.14159/5,0,0.1,8,0)
 
NREGX=2
IREGX=1; GRDPWR(X,1,3.14159/5,1.0)
IREGX=2; GRDPWR(X,4,3.14159/5*4,1.0)
 
    GROUP 4. Y-direction grid specification
IREGY=1; GRDPWR(Y,5,0.1,1.0)
 
    GROUP 5. Z-direction grid specification
NREGZ=6
IREGZ=1; GRDPWR(Z,2,0.2,1.0)
IREGZ=2; GRDPWR(Z,2,0.1,1.0)
IREGZ=3; GRDPWR(Z,2,0.1,1.0)
IREGZ=4; GRDPWR(Z,2,0.15,1.0)
IREGZ=5; GRDPWR(Z,3,0.3,1.0)
IREGZ=6; GRDPWR(Z,1,0.15,1.0)
 
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1,W1,H1); STORE(ENUT); TURMOD(KEMODL)
SOLUTN(P1,Y,Y,Y,N,N,N)
 
    GROUP 9. Properties of the medium (or media)
ENUL=1.E-5
 
    GROUP 11. Initialization of variable or porosity fields
FIINIT(W1)=10.0;FIINIT(KE)=0.25; FIINIT(EP)=0.2
FIINIT(H1)=1000.0; FIINIT(VIST)=1.0E-03
 
    GROUP 13. Boundary conditions and special sources
   ** ENTRY TO PIPE
INLET(IN,LOW,#1,#NREGX,#1,#NREGY,#1,#1,1,1)
VALUE(IN,P1,10.0); VALUE(IN,H1,1000.0)
VALUE(IN,W1,10.); VALUE(IN,KE,0.25)
VALUE(IN,EP,0.2)
   ** DOWNSTREAM BOUNDARY
PATCH(OUTLET,HIGH,#1,#NREGX,#1,#NREGY,#NREGZ,#NREGZ,1,1)
COVAL(OUTLET,P1,1.E+05,0.0); COVAL(OUTLET,U1,ONLYMS,0.0)
COVAL(OUTLET,V1,ONLYMS,0.0); COVAL(OUTLET,W1,ONLYMS,0.0)
   ** PIPE WALL
WALL (WALL,NORTH,#1,#NREGX,#NREGY,#NREGY,#1,#NREGZ,1,1)
COVAL(WALL,KE,LOGLAW,LOGLAW); COVAL(WALL,EP,LOGLAW,LOGLAW)
   ** SIDE ENTRY
PATCH(SIDEIN,NORTH,#1,#1,#NREGY,#NREGY,#2,#2,1,1)
COVAL(SIDEIN,P1,FIXFLU,10.); COVAL(SIDEIN,H1,ONLYMS,300.0)
COVAL(SIDEIN,V1,ONLYMS,-10.); COVAL(SIDEIN,KE,ONLYMS,0.25)
COVAL(SIDEIN,EP,ONLYMS,.2)
 
    GROUP 15. Termination of sweeps
LSWEEP=60
 
    GROUP 16. Termination of iterations
LITER(P1)=-100; LITER(U1)=1; LITER(V1)=1; LITER(W1)=1
 
    GROUP 17. Under-relaxation devices
RELAX(U1,FALSDT,1.0); RELAX(V1,FALSDT,1.0); RELAX(W1,FALSDT,1.0)
RELAX(KE,FALSDT,0.01); RELAX(EP,FALSDT,0.01)
 
    GROUP 22. Spot-value print-out
IXMON=3; IYMON=3; IZMON=5
 
    GROUP 23. Field print-out and plot control
YZPR=T
PATCH(PROF,PROFIL,1,1,1,NY,NZ-1,NZ-1,1,1)
PLOT(PROF,W1,0.0,0.0); PLOT(PROF,H1,0.0,0.0)
PATCH(CONT,CONTUR,1,1,1,NY,2,10,1,1); PLOT(CONT,P1,0.0,10.0)
PLOT(CONT,H1,0.0,10.0)
PATCH(XEQNX1,CONTUR,1,1,1,NY,1,NZ,1,1)
PLOT(XEQNX1,P1,0.0,10.0)