```
TALK=f;RUN(1,1)
************************************************************
Group 1. Run Title and Number
************************************************************

TEXT(1/2/3D thermal stress in a cube; s352

mesg(thermal stress in a cube [Boley and Weiner's test]
mesg(case with Boundary Flow-layers
mesg(caseno 1 : 1D(X)
mesg(caseno 2 : 1D(Y)
mesg(caseno 3 : 1D(Z)
mesg(caseno 4 : 2D(x,y)
mesg(caseno 5 : 2D(x,z)
mesg(caseno 6 : 2D(y,z)
mesg(caseno 7 : 3D(x,y,z)
caseno=1
mesgm(caseno = :caseno: Enter another if not OK
caseno
NX =1
NY = 1
NZ = 1
if(caseno.eq.1.or.caseno.eq.4) then
NX = 10
endif
if(caseno.eq.5.or.caseno.eq.7) then
NX = 10
endif
if(caseno.eq.2.or.caseno.eq.4) then
NY = 10
endif
if(caseno.eq.6.or.caseno.eq.7) then
NY = 10
endif
if(caseno.eq.3.or.caseno.eq.5) then
NZ = 10
endif
if(caseno.eq.6.or.caseno.eq.7) then
NZ = 10
endif

************************************************************
Group 2. Time dependence
************************************************************
Group 3. X-Direction Grid Spacing
CARTES  =    t
XULAST  = 1.0
XFRAC (   1) =  1.000000E+00
************************************************************
Group 4. Y-Direction Grid Spacing
YVLAST  = 1.0
************************************************************
Group 5. Z-Direction Grid Spacing
ZWLAST  = 1.000000E+00
#UNIGRID
************************************************************
Group 7. Variables: STOREd,SOLVEd,NAMEd
ONEPHS  =    T
SOLVE(P1,U1,V1,W1)
if(nx.eq.1) then
solutn(u1,n,n,n,n,n,n)
endif
if(ny.eq.1) then
solutn(v1,n,n,n,n,n,n)
endif
if(nz.eq.1) then
solutn(w1,n,n,n,n,n,n)
endif

STORE(TEM1,u1/t,v1/t,w1/t)
STORE(PRPS,DEN1,ENUL,DVO1,DRH1)
STORE(EPST,STRX,EPSX,STRY,EPSY)
STORE(STRZ,EPSZ)
inform7begin
inform7end
GROUP 8. ITERATION NUMBERS ETC
RESREF(u1)=0.0
RESREF(V1)=0.0
RESREF(w1)=0.0
RESREF(TEM1)=0.0
************************************************************
GROUP 9. PROPERTIES
CSG10='Q1'
MATFLG=T;NMAT=1
160    7800.0    0.3       473.0   43.0      1.0e-5   0.5E-11
************************************************************
GROUP 11. INITIAL VALUES
FIINIT(PRPS)=0
PATCH(block,INIVAL,2,nx-1,2,NY-1,2,nz-1,1,1)
INIT (block,PRPS,FIXVAL,160)
inform11begin
char(formt,formu,formv,formw)
real(aa,bb,cc,dd,al)                ! Boley and Weiner's constants

al=1.0e-5               ! to conform with the matflg line

if(nx.gt.1) then
aa=-0.5*xulast
bb=1.0
endif

if(ny.gt.1) then
aa=-0.5*yvlast
cc=1.0
endif

if(nz.gt.1) then
aa=-0.5*zwlast
dd=1.0
endif

formt=:aa:+:bb:*xg+:cc:*yg+:dd:*zg
(initial of TEM1 at BLOCK is :formt:)
inform11end
************************************************************
GROUP 13. BOUNDARY & SPECIAL SOURCES

inform13begin

if(nx.gt.1) then
formu=:al:*((:aa:+:bb:*xu+:cc:*yg+:dd:*zg)*xu-\$
.5*:bb:*(xu^2+yg^2+zg^2))
(stored var u1th is :formu: with swps)
(stored var u1/t is u1/u1th)
endif

if(ny.gt.1) then
formv=:al:*((:aa:+:bb:*xg+:cc:*yv+:dd:*zg)*yv-\$
.5*:cc:*(xg^2+yv^2+zg^2))
(stored var v1th is :formv: with swps)
(stored var v1/t is v1/v1th)
endif

if(nz.gt.1) then
formw=:al:*((:aa:+:bb:*xg+:cc:*yg+:dd:*zw)*zw-\$
.5*:dd:*(xg^2+yg^2+zw^2))
(stored var w1th is :formw: with swps)
(stored var w1/t is w1/w1th)
endif

PATCH(FIXMOV,VOLUME,nx/2,nx/2,ny/2,ny/2,nz/2,nz/2,1,1)

if(nx.gt.1) then
(source of u1 at FIXMOV is COVAL(1.e4,:FormU:))
endif

if(ny.gt.1) then
(source of v1 at FIXMOV is COVAL(1.e4,:FormV:))
endif

if(nz.gt.1) then
(source of w1 at FIXMOV is COVAL(1.e4,:FormW:))
endif

PATCH(dmn,cell,1,NX,1,ny,1,nz,1,1)   ! via
COVAL(DMN,p1,FIXVAL,0)

inform13end

spedat(boundary,xconst,r,1.e20)   ! 1.e20 means surface is fixed
spedat(boundary,zconst,r,1.e20)
spedat(boundary,xconst,r,0)   ! 0 means surface is fixed
spedat(boundary,zconst,r,0)

************************************************************
GROUP 15. TERMINATE SWEEPS
LSWEEP  =       200
ISG21=LSWEEP
************************************************************
GROUP 17. RELAXATION
#CONPROM
relax(tem1,linrlx,1.0)
************************************************************
GROUP 19. DATA TRANSMITTED TO GROUND
STRA    =    T

************************************************************
GROUP 23.FIELD PRINT-OUT & PLOT CONTROL
NYPRIN=1
NXPRIN=1
TSTSWP=-1

output(drh1,n,n,n,n,n,n)
output(dvo1,n,n,n,n,n,n)
output(den1,n,n,n,n,n,n)
output(enul,n,n,n,n,n,n)
output(prps,n,n,n,n,n,n)
output(strz,n,n,n,n,n,n)
output(strx,n,n,n,n,n,n)
output(stry,n,n,n,n,n,n)
output(v1th,n,n,n,n,n,n)
output(u1th,n,n,n,n,n,n)
output(w1th,n,n,n,n,n,n)
output(epsx,n,n,n,n,n,n)
output(epsy,n,n,n,n,n,n)
output(epsz,n,n,n,n,n,n)

ISG52   =    3   !   probe & res
#ENDPAUSE
IXMON = NX-1
IYMON = NY-1
IZMON = NZ-1
STOP
```