GROUP 1. Run title and other preliminaries
TEXT(LAM-BRE_2D Y-Z POROS CHANNEL TEST  :T216
TITLE
  DISPLAY
  This case provides a test of the Lam-Bremhorst low-Reynolds number
  k-e model for 2d steady developing flow in a channel. As a test of
  symmetry both halves of the channel are considered in the y-z
  plane. In addition the temperature equation is solved via the H1
  variable with a uniformly- distributed heat flux applied to the
  fluid at each wall. The correct representation of blockages via
  "porosities" is tested by inserting a solid region on either side
  of the channel. The results of this calculation may be compared
  calculations of the same case without blockages and also with
  blockages represented by the "conjugate-heat-transfer" facility.
  A relatively coarse grid is used so as to permit convergence in
  about 400 sweeps. The problem has been set up to perform 30
  sweeps only, so as to reduce execution times in performing
  routine testing procedures.
  ENDDIS
 
REAL(HGHT,REY,WIN,DHYDR,REYH,FRIC,US,TKEIN,EPIN,TIN,CPG)
HGHT=0.1; REY=1.E5;WIN=10.0;DHYDR=2.*HGHT; REYH=2.*REY
FRIC=1./(1.82*LOG10(REYH)-1.64)**2
US=WIN*(FRIC/8.)**0.5;ENUL=WIN*HGHT/REY;TIN=300.;CPG=1.E3
    GROUP 3. X-DIRECTION GRID SPECIFICATION
    GROUP 4. Y-DIRECTION GRID SPECIFICATION
INTEGER(NYG,NYS,NYGF,NYGL,NYG2,NYGH,JJM,JJJ)
REAL(LENGTH,DELT1,DELY,KFAC,AA,BB);NYS=4;NYGF=NYS+1
  ** define first dely from wall and the grid-expansion
     factor Kfac which defines a constant ratio of lengths of
     two adjacent cells.
DELT1=0.5*ENUL/US;KFAC=1.8;DELY=DELT1/(0.5*HGHT)
  ** calculate NYG from dely & Kfac
AA=(0.5/DELY)*(KFAC-1.0)+1.0;AA=LOG(AA)/LOG(KFAC)+1.0001
NYG2=AA;NYG=2*NYG2;NYGH=NYS+NYG2;NYGL=NYS+NYG;NY=2*NYS+NYG
  ** define uniform grid initially
IREGY=1;GRDPWR(Y,NY,YVLAST,1.0)
  ** define grid in the bottom solid
AA=NYS
DO JJ=1,NYS
+ YFRAC(JJ)=JJ*HGHT/NYS
ENDDO
  ** compute expanding grid from south boundary over one
     half of the channel width
ARRAY(ARR1,REAL,NYG)
ARR1(1)=DELY
DO JJ=2,NYG2
+ JJM=JJ-1
+ DELY=KFAC*DELY
+ ARR1(JJ)=ARR1(JJM)+DELY
+ BB=ARR1(JJ)
ENDDO
ARR1(NYG2)=0.5
  ** create symmetrical grid in the second half of the channel
JJJ=0
DO JJ=NYG-1,NYG2+1,-1
+ JJJ=JJJ+1
+ ARR1(JJ)=1.-ARR1(JJJ)
ENDDO
ARR1(NYG)=1.0
JJJ=0
DO JJ=NYGF,NYGL
+ JJJ=JJJ+1
+ YFRAC(JJ)=ARR1(JJJ)*HGHT+YFRAC(NYS)
ENDDO
JJJ=0
DO JJ=NYGL+1,NY
+ JJJ=JJJ+1
+ YFRAC(JJ)=YFRAC(NYGL)+JJJ*HGHT/NYS
ENDDO
    GROUP 5. Z-direction grid specification
LENGTH=5.*HGHT;NZ=10;GRDPWR(Z,NZ,LENGTH,1.0)
    GROUP 7. Variables stored, solved & named
SOLVE(P1,V1,W1,H1);SOLUTN(P1,Y,Y,Y,P,P,P)
TURMOD(KEMODL-LOWRE);STORE(ENUT);KELIN=1
    GROUP 8. TERMS (IN DIFFERENTIAL EQUATIONS) & DEVICES
  ** deactivate any built-in source terms
TERMS(H1,N,P,P,P,P,P)
    GROUP 11. INITIALIZATION OF VARIABLE OR POROSITY FIELDS
FIINIT(P1)=1.E-3;FIINIT(W1)=WIN;FIINIT(V1)=0.0
TKEIN=2.*US**2;EPIN=0.1643*TKEIN**1.5/(0.1*0.5*HGHT)
FIINIT(KE)=TKEIN;FIINIT(EP)=EPIN;FIINIT(H1)=TIN
CONPOR(BLOCKS,0.0,CELL,-1,-NX,-1,-NYS,-1,-NZ)
CONPOR(BLOCKN,0.0,CELL,-1,-NX,-(NYS+NYG+1),-NY,-1,-NZ)
    GROUP 13. BOUNDARY CONDITIONS AND SPECIAL SOURCES
  ** air inflow boundary
PATCH(INL,LOW,1,1,NYS+1,NYS+NYG,1,1,1,1)
COVAL(INL,P1,FIXFLU,RHO1*WIN);COVAL(INL,W1,ONLYMS,WIN)
COVAL(INL,KE,ONLYMS,TKEIN);COVAL(INL,EP,ONLYMS,EPIN)
COVAL(INL,H1,ONLYMS,TIN)
  ** outflow boundary
PATCH(OUTL,HIGH,1,1,NYS+1,NYS+NYG,NZ,NZ,1,1)
COVAL(OUTL,P1,1.E3,0.0)
  ** north wall with applied heat flux
PATCH(HEATNW,NWALL,1,NX,NYGL,NYGL,1,NZ,1,1)
COVAL(HEATNW,H1,FIXFLU,0.5E3/LENGTH/CPG)
  ** south wall with applied heat flux
PATCH(HEATSW,SWALL,1,NX,NYGF,NYGF,1,NZ,1,1)
COVAL(HEATSW,H1,FIXFLU,0.5E3/LENGTH/CPG)
    GROUP 15. TERMINATION OF SWEEPS
RESREF(P1)=1.E-12*WIN*HGHT
RESREF(W1)=RESREF(P1)*WIN*RHO1; RESREF(V1)=RESREF(W1)
RESREF(KE)=RESREF(P1)*RHO1*TKEIN; RESREF(EP)=RESREF(P1)*RHO1*EPIN
RESREF(H1)=RESREF(P1)*TIN
    GROUP 17. Under-relaxation devices
RELAX(P1,LINRLX,1.0); REAL(DTF);DTF=5.*ZWLAST/WIN/NZ
RELAX(V1,FALSDT,DTF); RELAX(W1,FALSDT,DTF)
RELAX(KE,FALSDT,DTF); RELAX(EP,FALSDT,DTF)
    GROUP 22. Monitor print-out
IZMON=NZ/2;IYMON=NYGL
    GROUP 24. DUMPS FOR RESTARTS
  ** activate printout of near-wall y+ values
YPLS=T;LSWEEP=30;TSTSWP=-1;NPRINT=LSWEEP;NYPRIN=1;NZPRIN=1