TALK=f;RUN(1,1)
 ************************************************************
  Group 1. Run Title and Number
 ************************************************************
 
 TEXT(1/2/3D thermal stress in a cub; s702
 libref=702
 INTEGER(CASENO)       ! start of menu
mesg(Thermal stress in a cube (Boley and Weiner's test)
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
readvdu(caseno, int, 1)
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
 STEADY  =    T
 ************************************************************
  Group 3. X-Direction Grid Spacing
 CARTES  =    t
 XULAST  = 1.0
 ************************************************************
  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(DISX,DISY,DISZ)
 SOLUTN(DISZ,Y,Y,Y,N,N,Y)
 SOLUTN(DISY,Y,Y,Y,N,N,Y)
 SOLUTN(DISX,Y,Y,Y,N,N,Y)

 if(nx.eq.1) then
 solutn(disx,n,n,n,n,n,n)
 endif
 if(ny.eq.1) then
 solutn(disy,n,n,n,n,n,n)
 endif
 if(nz.eq.1) then
 solutn(disz,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(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)=160
 SPEDAT(SET,MATERIAL,160,L,T)
     
 PATCH (BLOCK,INIVAL,0,0,0,0,0,0,1,1)
      
  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:)
(initial of PRPS at BLOCK is 160)
  inform11end
 ************************************************************
  GROUP 13. BOUNDARY & SPECIAL SOURCES

 PATCH (FIXMOV,CELL,1,0,0,0,0,0,1,1)
 
  inform13begin
 
 if(nx.gt.1) then
 formu=:al:*((:aa:+:bb:*xg+:cc:*yg+:dd:*zg)*xg-$
.5*:bb:*(xg^2+yg^2+zg^2)) 
 (stored var u1th is :formu: with swps)
 (stored var u1/t is disx/u1th)
 endif
 
 if(ny.gt.1) then
 formv=:al:*((:aa:+:bb:*xg+:cc:*yg+:dd:*zg)*yg-$
.5*:cc:*(xg^2+yg^2+zg^2)) 
 (stored var v1th is :formv: with swps)
 (stored var v1/t is disy/v1th)
 endif
 
 if(nz.gt.1) then
 formw=:al:*((:aa:+:bb:*xg+:cc:*yg+:dd:*zg)*zg-$
.5*:dd:*(xg^2+yg^2+zg^2)) 
 (stored var w1th is :formw: with swps)
 (stored var w1/t is disz/w1th)
 endif

real(FIXX0,FIXDX,FIXY0,FIXDY,FIXZ0,FIXDZ)
FIXX0 = 0.0
FIXY0 = 0.0
FIXZ0 = 0.0
FIXDX = 1.0
FIXDY = 1.0
FIXDZ = 1.0

if(nx.gt.1) then
(source of disx at FIXMOV is COVAL(1.e4,:formU:))
FIXX0 = 0.4
FIXDX = 9.999999E-02
endif

if(ny.gt.1) then
(source of disy at FIXMOV is COVAL(1.e4,:formV:))
FIXY0 = 0.4
FIXDY = 9.999999E-02
endif                                             

if(nz.gt.1) then
(source of disz at FIXMOV is COVAL(1.e4,:formW:))
FIXZ0 = 0.4
FIXDZ = 9.999999E-02
endif


  inform13end
 
 ************************************************************
  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
 PARSOL = F 
 ************************************************************
  GROUP 23.FIELD PRINT-OUT & PLOT CONTROL
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)  
if(nx.eq.1) then
output(u1,n,n,n,n,n,n)
  output(u1th,n,n,n,n,n,n)
  output(u1/t,n,n,n,n,n,n)
endif  
if(nx=y.eq.1) then
output(v1,n,n,n,n,n,n)
  output(v1th,n,n,n,n,n,n)
  output(v1/t,n,n,n,n,n,n)
endif  
if(nz.eq.1) then
output(w1,n,n,n,n,n,n)
  output(w1th,n,n,n,n,n,n)
  output(w1/t,n,n,n,n,n,n)
endif  
  NYPRIN=1 
  NXPRIN=1 
TSTSWP=-1  
ISG52   =    3   !   probe & res
#ENDPAUSE
IXMON = NX-1
IYMON = NY-1
IZMON = NZ-1

 ************************************************************
  Group 24. Dumps For Restarts
 
 GVIEW(P,0.000000E+00,0.000000E+00,1.000000E+00)
 GVIEW(UP,0.000000E+00,1.000000E+00,0.000000E+00)
 
> DOM,    SIZE,        1.000000E+00, 1.000000E+00, 1.000000E+00
> DOM,    MONIT,       8.500000E-01, 8.500000E-01, 0.000000E+00
> DOM,    SCALE,       1.000000E+00, 1.000000E+00, 1.000000E+00
> DOM,    SNAPSIZE,    1.000000E-02
  > GRID,   RSET_X_1,     :NX:, 1.000000E+00
  > GRID,   RSET_Y_1,     :NY:, 1.000000E+00
  > GRID,   RSET_Z_1,     :NZ:, 1.000000E+00
 
> OBJ,    NAME,        FIXMOV
> OBJ,    POSITION,    :FIXX0:, :FIXY0:, :FIXZ0:
> OBJ,    SIZE,        :FIXDX:, :FIXDY:, :FIXDZ:
> OBJ,    GEOMETRY,    default
> OBJ,    ROTATION24,        1
> OBJ,    TYPE,        USER_DEFINED
 ************************************************************




STOP