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
lturb=f
  **************************************************************
INTEGER(MAT1,MAT2)
LENG1= 0.2;   LENG2= 0.6;    GAP = 0.1;  WPLT= GAP
    * Flow parameters:
IF(LTURB) THEN
+ ENUL  = 1.E-5
+ UIN = REYNO*ENUL/ GAP
+ EGWF= T;    WALLCO= GRND2
ELSE
+ REYNO = 200.;  UIN= 1.0;  ENUL= UIN*GAP/REYNO
+ WALLCO= 1.0
ENDIF
 TAIR= 300.
REYNO=10
    * 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)
 (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)
    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,1.,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.0001
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
  PHOTON USE
   p ; ; ; ; ;
 
   window .3. .95 .2 .85
   msg Computational Domain:
   gr k 1
   dump imm1
   use patgeo
   set prop off
   msg Press Any Key to Continue...
   pause;con off;vec off;gr off;red
   cl
   msg Velocity Vectors:
   vec k 1 
   dump imm2
   msg Press Any Key to Continue...
   pause;con off;vec off;red
   cl
   msg Contours of Pressure:
   con p1 k 1 fi;0.005
   pause;con off;vec off;red
   cl
   msg Contours of wgap:
   con wgap k 1 fi;0.005
   dump imm3
   pause;con off;vec off;red
   cl
   msg Contours of Prps:
   con prps k 1 fi;0.005
   dump imm4
   pause;con off;vec off;red
   cl
   msg Contours of TEM1:
   con tem1 k 1 fi;0.005
   dump imm5
   pause;con off;vec off;red
   cl
   msg Contours of T3:
   con t3 k 1 fi;0.005
   dump imm6
   pause;con off;vec off;red
   cl
   msg Contours of TEM1=Tú:
   con tdif k 1 fi;0.005
   dump imm9
   pause;con off;vec off;red
   cl
   msg Contours of x-direction radiation flux:
   con qrx k 1 fi;0.005
   dump imm8
   pause;con off;vec off;red
   cl
   msg Contours of y-direction radiation flux:
   con qry k 1 fi;0.005
   dump imm7
  ENDUSE