GROUP 1. Run title and other preliminaries
TEXT(Backward-Facing Step KE Mod YZ Pos
TITLE
 
   See case 290 for explanation and diagram.
   This case has Enthalpy added
   It originally worked in v1.5.4 but gave a division by
   zero error in v1.6.
 
INTEGER(NYS,NZS)
REAL(HEIGHT,WIDTH,CLEN,SLEN,REYNO,GVISL,WIN,TKEIN,EPSIN,TIN,RHOIN)
     ** Calculation of domain specifications
REYNO=4.5E4;WIN=13.; TIN=300.
HEIGHT=0.0381;WIDTH=3.*HEIGHT
NZS=4; NYS=10; SLEN=4.*HEIGHT; CLEN=20.*HEIGHT
 
    GROUP 4. Y-direction grid specification
NY=15;YVLAST=1.0
     ** Full width of channel = 0.1143
YFRAC(1)=-10.0;YFRAC(2)=3.81E-3
YFRAC(3)=5.0;YFRAC(4)=1.524E-2
 
    GROUP 5. Z-direction grid specification
NZ=20;ZWLAST=1.0
     ** Full length of channel = 0.762
ZFRAC(1)=-4.0;ZFRAC(2)=3.81E-2
ZFRAC(3)=16.0;ZFRAC(4)=3.81E-2
 
    GROUP 7. Variables stored, solved & named
#solvel
STORE(ENUT); TURMOD(KEMODL)
SOLVE(H1); SOLUTN(H1,P,P,Y,P,P,P)
 
    GROUP 8. Terms (in differential equations) & devices
DIFCUT=0.0; ISOLY=1; ISOLZ=1
 
    GROUP 9. Properties of the medium (or media)
RHO1=IDEALGAS; GVISL=WIN*HEIGHT; GVISL=GVISL/REYNO;ENUL=GVISL
TMP1=LINH; STORE(TMP1)
RHO1B=1./296.; TMP1B=1./1005. ;CP1=1/TMP1B
PRESS0=1E5
 
    GROUP 11. Initialization of variable or porosity fields
CONPOR(0.0,VOLUME,1,1,1,-NYS,1,-NZS)
     ** Calculation of KE (where fric = 0.018)...
TKEIN=0.25*WIN; TKEIN=TKEIN*WIN; TKEIN=TKEIN*0.018
     ** Calculation of EP (where lmix=0.09 x h)...
EPSIN=TKEIN**1.5;EPSIN=EPSIN*0.1643;EPSIN=EPSIN/3.429E-3
     ** Initial values
FIINIT(W1)=WIN; FIINIT(P1)=1.3E-4; FIINIT(KE)=TKEIN
FIINIT(EP)=EPSIN; FIINIT(H1)=CP1*TIN
 
    GROUP 13. Boundary conditions and special sources
     ** Inlet
RHOIN=RHO1B*PRESS0/TIN
INLET(INLET,LOW,1,1,NYS+1,NY,1,1,1,1)
VALUE(INLET,P1,RHOIN*WIN); VALUE(INLET,W1,WIN)
VALUE(INLET,KE,TKEIN); VALUE(INLET,EP,EPSIN)
VALUE(INLET,EP,EPSIN); COVAL(INLET,H1,ONLYMS,CP1*TIN)
     ** Exit
PATCH(OUTLET,HIGH,1,1,1,NY,NZ,NZ,1,1); COVAL(OUTLET,P1,1.E+05,0.0)
COVAL(OUTLET,V1,ONLYMS,0.0); COVAL(OUTLET,W1,ONLYMS,0.0)
COVAL(OUTLET,KE,ONLYMS,0.0); COVAL(OUTLET,EP,ONLYMS,0.0)
COVAL(OUTLET,H1,ONLYMS,SAME)
     ** N-wall
WALL (WFUNNORT,NORTH,1,1,NY,NY,1,NZ,1,1)
     ** S2-wall
WALL (WFUNSOUT,SOUTH,1,1,1,1,NZS+1,NZ,1,1)
 
    GROUP 15. Termination of sweeps
LSWEEP=250
 
    GROUP 17. Under-relaxation devices
RELAX(P1,LINRLX,0.5); RELAX(W1,FALSDT,0.01); RELAX(V1,FALSDT,0.01)
RELAX(KE,FALSDT,0.01); RELAX(EP,FALSDT,0.01); RELAX(H1,LINRLX,0.1)
 
    GROUP 20. Preliminary print-out
IZMON=NZS+2; ITABL=3; IPLTL=1000; IYMON=NYS-2
NPLT=1; NPRMON=10000; IYMON=NYS-2
 
    GROUP 23. Field print-out and plot control
NXPRIN=NX/5; NYPRIN=NY/5; NZPRIN=NZ/5
TSTSWP=-1