TALK=T;RUN(1,1) r209.htm "2D steady flow convection and radiation"

#immersol
#declare
#cls
TEXT(2D radiative heat exchange,TEM1 + T3:209
TITLE
libref
  DISPLAY


   IMMERSOL is used to simulate 2D radiative heat exchange in a
   duct flow with fixed wall temperatures. The flow may be laminar
   or turbulent. TEM1 and T3 are solved.

   Two solid plates (which may be of different materials and
   emissivities) are situated within the duct.

   The plates within the duct take up intermediate temperatures,
   being heated by radiation, but cooled by convection.


  ENDDIS
#pause   
  **************************************************************
BOOLEAN(LTURB); LTURB= T
  **************************************************************
  PHOTON USE
   p ; ; ; ; ;
 
   msg Computational Domain:
   gr k 1
   use patgeo
   set prop off
   msg Press Any Key to Continue...
   pause
   cl
   msg Velocity Vectors:
   vec k 1 sh
   msg Press Any Key to Continue...
   pause
   cl
   msg Contours of Pressure:
   con p1 k 1 fi;0.005
   pause
   cl
   msg Contours of TEM1:
   con tem1 k 1 fi;0.005
   pause
   cl
   msg Contours of T3:
   con t3 k 1 fi;0.005
   pause
   cl
   msg Contours of x-direction radiation flux
   con qrx k 1 fi;0.005
   pause
   cl
   msg Contours of y-direction radiation flux
   con qry k 1 fi;0.005
  ENDUSE
  **************************************************************
INTEGER(MAT1,MAT2)
LENG1= 0.2;   LENG2= 0.6;    GAP = 0.1;  WPLT= GAP/5.
    * Flow parameters:
ENUL  = 1.E-5
IF(LTURB) THEN
+ REYNO=20000
+ EGWF= T;    WALLCO= GRND2
ELSE
+ REYNO = 200.
+ WALLCO= 1.0
ENDIF
UIN = REYNO*ENUL/ GAP
TAIR= 300.
    * Define emissivities of the domain walls:
REAL(EMIW1,EMIW2,EMIP1,EMIP2)
EMIW1= 0.9;  EMIW2= 0.9
    * Define material and emissivity of its surface for the
    * 1st plate:
MAT1 = 111; EMIP1=0.8
    * Define material and emissivity of its surface for the
    * 2nd plate:
MAT2 = 112; EMIP2=0.2
    * Define optical thickness for the gap between plates:
OPTHI= 0.1;    KROSS= OPTHI/GAP;  SCATT= 0.0;  EMISS= KROSS-SCATT
#geom3
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1,TEM1); STORE(PRPS,SPH1,KOND,STAN,HTCO)
 (stored tdif is t3-tem1)
#radflux
IF(LTURB) THEN
+TURMOD(KEMODL); STORE(GEN1,ENUT)
ENDIF
    GROUP 8. Terms (in differential equations) & devices
TERMS(TEM1,N,Y,Y,N,Y,N)
    GROUP 9. Properties of the medium (or media)
    *** material is Air with constant properties
SETPRPS(1,0)
PRNDTL(T3)=PRNDTL(TEM1)
    GROUP 11. Initialization of variable or porosity fields
INIADD= F;  FIINIT(TEM1)= TAIR; FIINIT(U1)= UIN
FIINIT(T3)= TAIR
IF(LTURB) THEN
+ FIINIT(KE)= 0.1125*FIINIT(U1)*FIINIT(U1)
+ FIINIT(EP)= 0.1643*FIINIT(KE)**1.5/(0.27*YVLAST)
ENDIF
FIINIT(EMIS) = EMISS; FIINIT(SCAT) = SCATT
    *** Solid plates:
PATCH(PLT1,INIVAL,#2,#2,#2,#2,1,NZ,1,LSTEP)
 INIT(PLT1,PRPS,0.0,MAT1)
 INIT(PLT1,EMIS,0.0,EMIP1)
PATCH(PLT2,INIVAL,#2,#2,#4,#4,1,NZ,1,LSTEP)
 INIT(PLT2,PRPS,0.0,MAT2)
 INIT(PLT2,EMIS,0.0,EMIP2)
    
    GROUP 13. Boundary conditions and special sources
    *** Inlet:
PATCH(IN1,WEST,$1,$1,#1,#NREGY,1,NZ,1,LSTEP)
 COVAL(IN1,P1,FIXFLU,RHO1*UIN); COVAL(IN1,TEM1,ONLYMS,TAIR)
 COVAL(IN1,U1,ONLYMS,     UIN); COVAL(IN1,  V1,ONLYMS, 0.0)
    *** Outlet:
PATCH(OUT,EAST,%NREGX,%NREGX,#1,#NREGY,1,NZ,1,LSTEP)
 COVAL(OUT,P1,1000.,0.0)
    *** IMMERSOL-walls at the domain boundaries:
PATCH(IMSWL1,SWALL,#1,#NREGX,$1,$1,1,NZ,1,LSTEP)
TWALL=500
 COVAL(IMSWL1,TEM1,WALLCO,TWALL); COVAL(IMSWL1,T3,GRND4,TWALL)
 COVAL(IMSWL1,  U1,WALLCO,  0.0)
TWALL=400 
PATCH(IMSWL2,NWALL,#1,#NREGX,%NREGY,%NREGY,1,NZ,1,LSTEP)
 COVAL(IMSWL2,TEM1,WALLCO,TWALL); COVAL(IMSWL2,T3,GRND4,TWALL)
 COVAL(IMSWL2,  U1,WALLCO,  0.0)
    *** Set emissivity of wall surfaces:
SPEDAT(SET,EMISSIVITY,OF IMSWL1,R,:EMIW1:)
SPEDAT(SET,EMISSIVITY,OF IMSWL2,R,:EMIW2:)
IF(LTURB) THEN
+COVAL(IN1,KE,ONLYMS,FIINIT(KE)); COVAL(IN1,EP,ONLYMS,FIINIT(EP))
+COVAL(OUT,KE,ONLYMS,SAME); COVAL(OUT,EP,ONLYMS,SAME)
+COVAL(IMSWL1,KE,WALLCO,LOGLAW); COVAL(IMSWL1,EP,WALLCO,LOGLAW)
+COVAL(IMSWL2,KE,WALLCO,LOGLAW); COVAL(IMSWL2,EP,WALLCO,LOGLAW)
ENDIF
    GROUP 15. Termination of sweeps
LSWEEP= 250;  TSTSWP= -1
    GROUP 16. Termination of iterations
SELREF=T; RESFAC= 0.000001
RELAX(TEM1,LINRLX,0.5)
RELAX(T3,LINRLX,0.5)
    GROUP 18. Limits on variables or increments to them
   VARMIN(TEM1)= TAIR; VARMAX(TEM1)= TWALL
    GROUP 22. Spot-value print-out
IXMON= NX/2+1;  IYMON= NY/2+1;  IZMON= 1
LIBREF=209