DISPLAY
RADIATION AND CONVECTION FROM A HOT BLOCK
Patches representing external heat loss by radiation
(proportional to (Ts**4-Text**4))
and by free convection
(proportional to (Ts-Text)**n)
are placed on the external surfaces of the heat-conducting block
of case 100.
enddis
PHOTON USE
p
msg Temperature contours
con tem1 z m fi;0.001
con tem1 y m fi;0.001
con tem1 x m fi;0.001
msg Press e to END
ENDUSE
GROUP 1. Run title and other preliminaries
TEXT(3D Steady Heat Conduction In Cube
TITLE
mesg(PC486/50 time last reported as 5.sec
REAL(XLENGTH,YLENGTH,ZLENGTH)
XLENGTH=1.0;YLENGTH=1.0;ZLENGTH=1.0
NX=5;NY=5;NZ=5
GROUP 3. X-direction grid specification
GRDPWR(X,NX,XLENGTH,1.0)
GROUP 4. Y-direction grid specification
GRDPWR(Y,NY,YLENGTH,1.0)
GROUP 5. Z-direction grid specification
GRDPWR(Z,NZ,ZLENGTH,1.0)
GROUP 7. Variables stored, solved & named
solve(tem1)
SOLUTN(TEM1,Y,Y,Y,N,N,Y)
store(prps)
GROUP 8. Terms (in differential equations) & devices
**For pure conduction, cut out built-in source and convection
terms
TERMS(TEM1,N,N,Y,N,Y,Y)
GROUP 9. Properties of the medium (or media)
group 11. Initial values
fiinit(prps)=100.0
GROUP 12. Local adjustments of convection and diffusion
GROUP 13. Boundary conditions and special sources
**Corner at IX=IY=IZ=1
PATCH(COLD,CELL,1,1,1,1,1,1,1,1)
**Fix temperature to zero
COVAL(COLD,TEM1,1.E2,0.0)
**Corner at IX=NX, IY=NY, IZ=NZ
PATCH(HOT,CELL,NX,NX,NY,NY,NZ,NZ,1,1)
**Fix temperature to 1.0
COVAL(HOT,TEM1,1.E2,1.0)
MESG(
MESG(
MESG(
MESG(
external radiation patch
REAL(RADCO,emiss,TMPX)
radco=Stefan-Boltzmann constant in W M**2 K**4 * emissivity
emiss=0.9
mesga(Radiation patch is set at high-z surface of the cube.
mesga(Emissivity = :emiss: OK? If not, insert new value
READVDU(emiss,real,emiss)
RADCO=5.6697e-8*emiss
TMPX=100.
mesg(External temperature is :tmpx: degrees K
mesg(OK? If not, insert new value
readvdu(tmpx,real,tmpx)
PATCH(*RAD,HIGH,1,NX,1,NY,NZ,NZ,1,1)
COVAL(*RAD,TEM1,RADCO,TMPX)
RADCO
MESG(
MESG(
MESG(
MESG(
MESG(
external convection patch
REAL(CONVCO)
CONVCO=1.E3;TMPX=50
mesga(Convection patch is set at top y-surface of the cube.
mesga(Free-convection coeff is :convco: OK? If not, insert new value
READVDU(CONVCO,REAL,CONVCO)
mesg(External temperature is :tmpx: OK? If not, insert new value
READVDU(TMPX,REAL,TMPX)
PATCH(*-3,NORTH,1,NX,NY,NY,1,NZ,1,1)
COVAL(*-3,TEM1,CONVCO,TMPX)
TMPX
CONVCO
GROUP 15. Termination of sweeps
OUTPUT(PRPS,N,N,N,N,N,N);LSWEEP=100
GROUP 16. Termination of iterations
LITER(TEM1)=100
OVRRLX= 1.7
ISOLX=1;ISOLY=1;ISOLZ=1
GROUP 17. Under-relaxation devices
RELAX(TEM1,LINRLX,0.5)
GROUP 21. Print-out of variables
OUTPUT(TEM1,Y,Y,Y,Y,Y,Y)
OUTPUT(PRPS,N,N,N,N,N,N)
GROUP 22. Spot-value print-out
IXMON=NX/2+1;IYMON=NY/2+1;IZMON=NZ/2+1;UWATCH=T
GROUP 23. Field print-out and plot control
NXPRIN=NX/5;NYPRIN=NY/5;NZPRIN=NZ/5;nplt=1;uwatch=t
GROUP 24. Dumps for restarts