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. One half of
  each of the high and low walls are held at constant but different
  temperatures; the other walls are assumed to be adiabatic. The
  emissivities of the  walls are assumed to be equal.
  ENDDIS
    Locally-defined parameters additional to those introduced
  in case 550 are as follows:
               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
   ** Low wall
PATCH(HOTLR,LOW,1,NX/2,1,NY,1,1,1,1)
COVAL(HOTLR,RADZ,EMIC/(2.0-EMIC),GSIGMA*TWL**4)
PATCH(HOTLH,LWALL,1,NX/2,1,NY,1,1,1,1);COVAL(HOTLH,H1,RPR,TWL)
   ** High wall
PATCH(HOTHR,HIGH,1,NX/2,1,NY,NZ,NZ,1,1)
COVAL(HOTHR,RADZ,EMIH/(2.0-EMIH),GSIGMA*TWH**4)
PATCH(HOTHH,HWALL,1,NX/2,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)
selref=t; resfac=1.e-2
TSTSWP=-1