PHOTON USE
  p
  phi
  1 .25 .75
 
  msg         3D RADIATIVE HEAT  TRANSFER IN A BOX
  msg
  msg   Temperature distribution:
  gr ou x 1;gr ou y 1;gr ou z 1
  con h1 x 1 fi ;0.001
  con h1 y 1 fi ;0.001
  con h1 z 1 fi ;0.001
  msg
  msg Press  to continue
  pause
  con off;red
  msg        x-wise radiative flux:
  con radx x 1 fi;0.001
  con radx y 1 fi; 0.001
  con radx z 1 fi; 0.001
  msg
  msg Press  to continue
  pause
  con off;red
  msg        y-wise radiative flux:
  con rady x 1 fi;0.001
  con rady y 1 fi;0.001
  con rady z 1 fi;0.001
  msg
  msg Press  to continue
  pause
  con off;red
  msg        z-wise radiative flux:
  con radz x 1 fi;0.001
  con radz y 1 fi;0.001
  con radz z 1 fi;0.001
  msg
  msg Press e to END
  enduse
 
    GROUP 1. Run title and other preliminaries
TEXT(3D Radiant Heat Transfer In A Box
TITLE
  DISPLAY
    Radiative heat transfer in a 3D box is considered. Four of the
  walls are kept at constant but different temperatures; the other
  two walls are assumed to be adiabatic. The emissivities of the
  walls are assumed to be equal. Further background information is
  supplied in cases 550 and 551.
  ENDDIS
    Locally-defined parameters additional to those introduced
  in case 550 are as follows:
               TWW           low-X wall temperature
               TWN           high-Y wall temperature
               TWL           low-Z wall temperature
               TWH           high-Z wall temperature
REAL(GSIGMA,SCAT,ABSORB,EMIH,EMIC,TWW,TWN,TWL,TWH,TWA,EPA)
GSIGMA=5.6697E-8;SCAT=0.05;ABSORB=0.3;EMIH=0.9;EMIC=0.9
TWW=500.0;TWN=700.0;TWL=300.0;TWH=1200.0
    GROUP 3. X-direction grid specification
GRDPWR(X,8,1.0,1.0)
    GROUP 4. Y-direction grid specification
GRDPWR(Y,8,1.0,1.0)
    GROUP 5. Z-direction grid specification
GRDPWR(Z,8,1.0,1.0)
    GROUP 7. Variables stored, solved & named
RADIAT(FLUX,ABSORB,SCAT,H1)
    GROUP 8. Terms (in differential equations) & devices
TERMS(H1,N,N,Y,N,Y,N)
    GROUP 9. Properties of the medium (or media)
CP1=1.0;TMP1=LINH;TMP1B=1.0/CP1
PRNDTL(H1)=0.73;REAL(RPR);RPR=1.0/PRNDTL(H1)
    GROUP 11. Initialization of variable or porosity fields
TWA=0.5*(TWW+TWN);EPA=GSIGMA*(TWA)**4
FIINIT(RADX)=EPA;FIINIT(RADY)=EPA;FIINIT(RADZ)=EPA
FIINIT(H1)=TWA
    GROUP 13. Boundary conditions and special sources
   ** Radiation and enthalpy sources - West wall
PATCH(HOTWR,WEST,1,1,1,NY,1,NZ,1,1)
COVAL(HOTWR,RADX,EMIC/(2.0-EMIC),GSIGMA*TWW**4)
PATCH(HOTWH,WWALL,1,1,1,NY,1,NZ,1,1);COVAL(HOTWH,H1,RPR,TWW)
   ** North wall
PATCH(HOTNR,NORTH,1,NX,NY,NY,1,NZ,1,1)
COVAL(HOTNR,RADY,EMIC/(2.0-EMIC),GSIGMA*TWN**4)
PATCH(HOTNH,NWALL,1,NX,NY,NY,1,NZ,1,1);COVAL(HOTNH,H1,RPR,TWN)
   ** Low wall
PATCH(HOTLR,LOW,1,NX,1,NY,1,1,1,1)
COVAL(HOTLR,RADZ,EMIC/(2.0-EMIC),GSIGMA*TWL**4)
PATCH(HOTLH,LWALL,1,NX,1,NY,1,1,1,1);COVAL(HOTLH,H1,RPR,TWL)
   ** High wall
PATCH(HOTHR,HIGH,1,NX,1,NY,NZ,NZ,1,1)
COVAL(HOTHR,RADZ,EMIH/(2.0-EMIH),GSIGMA*TWH**4)
PATCH(HOTHH,HWALL,1,NX,1,NY,NZ,NZ,1,1);COVAL(HOTHH,H1,RPR,TWH)
    GROUP 15. Termination of sweeps
LSWEEP=30
    GROUP 16. Termination of iterations
    GROUP 17. Under-relaxation devices
RELAX(H1,FALSDT,0.01)
    GROUP 22. Spot-value print-out
IXMON=NX/2;IYMON=NY/2;IZMON=NZ/2
    GROUP 23. Field print-out and plot control
YZPR=T;IXPRF=NX/2;IXPRL=NX/2;NYPRIN=2;NZPRIN=2
PATCH(MIDPLANE,CONTUR,1,NX,1,NY,NZ/2,NZ/2,1,1)
PLOT(MIDPLANE,H1,0.0,10.0);PLOT(MIDPLANE,RADX,0.0,10.0)
PLOT(MIDPLANE,RADY,0.0,10.0);PLOT(MIDPLANE,RADZ,0.0,10.0)
  ***actdem***
+ do ii=1,5
+   mesg(
+ enddo
mesg( Initial data that can be changed:
+ mesga( Absorption coefficient is set to :ABSORB:
+ mesg( Scattering coefficient is set to :SCAT:
+ mesg( Emission coefficient is set to :EMIH:
mesga( Do you want to change settings (y/n)? (Default n)
readvdu(ans,char,n)
if(:ans:.eq.y) then
+ real(rt1)
+ do ii=1,5
+   mesg(
+ enddo
+ mesga( Change absorption coefficient (default :ABSORB:)
+ readvdu(ABSORB,real,:ABSORB:)
+ do ii=1,5
+   mesg(
+ enddo
+ mesga( Change scattering coefficient (default :SCAT:)
+ readvdu(SCAT,real,:SCAT:)
+ do ii=1,5
+   mesg(
+ enddo
+ mesga( Change emission coefficient (default :EMIH:)
+ readvdu(rt1,real,:EMIH:)
+ EMIH=RT1; EMIC=RT1
RADIA=ABSORB; RADIB=SCAT
+ COVAL(HOTHR,RADZ,EMIH/(2.0-EMIH),GSIGMA*TWH**4)
+ COVAL(HOTWR,RADX,EMIC/(2.0-EMIC),GSIGMA*TWW**4)
+ COVAL(HOTNR,RADY,EMIC/(2.0-EMIC),GSIGMA*TWN**4)
+ COVAL(HOTLR,RADZ,EMIC/(2.0-EMIC),GSIGMA*TWL**4)
endif
selref=t; resfac=1.e-2
TSTSWP=-1