TALK=f;RUN( 1, 1)
  PHOTON USE
  p;;;;;
 
  set prop off
 
  vec z 1 x 1 24 y 1 24 sh
  vec z 1 x 49 72 y 1 24 sh
  vec z 1 x 25 48 y 1 12 sh
  msg displacement vectors in solid region only
  *dump dispvecs
  pause
 
  use patgeo
  vec z 1 sh
  msg velocity and displacement vectors
  pause;
  *dump allvecs;vec off;red
 
  vec z 1 x 1 72 y 25 36 sh
  vec z 1 x 25 48 y 13 m sh
  msg velocity vectors in fluid region only
  *dump vels
 
  pause ;
 
  vec off;red
  msg solid region
  con epst z 1 x 1 m y 1 12 fi;0.001
  con epst z 1 x 1 24 y 1 24 fi;0.001
  con epst z 1 x 49 m y 1 24 fi;0.001
  msg contours of thermal expansion
  pause;
  *dump epst;con off;red
 
  con epsx z 1 x 1 m y 1 12 fi;0.001
  con epsx z 1 x 1 24 y 1 24 fi;0.001
  con epsx z 1 x 49 m y 1 24 fi;0.001
  msg contours of horizontal-direction strain
  pause;
  *dump epsx;con off;red
 
  con epsy z 1 x 1 m y 1 12 fi;0.001
  con epsy z 1 x 1 24 y 1 24 fi;0.001
  con epsy z 1 x 49 m y 1 24 fi;0.001
  msg contours of vertical-direction strain
  pause;
  *dump epsy;con off;red
 
  con strx z 1 x 1 m y 1 12 fi;0.001
  con strx z 1 x 1 24 y 1 24 fi;0.001
  con strx z 1 x 49 m y 1 24 fi;0.001
  msg contours of horizontal-direction stress
  pause;
  *dump strx;con off;red
 
  con stry z 1 x 1 m y 1 12 fi;0.001
  con stry z 1 x 1 24 y 1 24 fi;0.001
  con stry z 1 x 49 m y 1 24 fi;0.001
  msg contours of vertical-direction stress
  pause;
  *dump stry;con off;red
 
 
 
  vec off;red
  con wdis z 1 x 1 72 y 25 36 fi;0.001
  con wdis z 1 x 25 48 y 13 36 fi;0.001
  msg contours of distance to the nearest wall
  pause;
  *dump wdis;con off;red
 
  con wgap z 1 x 1 72 y 25 36 fi;0.001
  con wgap z 1 x 25 48 y 13 36 fi;0.001
  msg contours of distance between walls
  pause;
  *dump wgap;con off;red
 
  con ltls z 1 x 1 72 y 25 36 fi;0.001
  con ltls z 1 x 25 48 y 13 36 fi;0.001
  msg contours of ltls, from which wdis and wgap are deduced
  pause;
  *dump ltls;con off;red
 
  con enut z 1 x 1 72 y 25 36 fi;0.001
  con enut z 1 x 25 48 y 13 36 fi;0.001
  msg contours of effective (laminar plus turbulent) velocity
  pause;
  *dump enut;con off;red
 
  con qrx z 1 x 1 72 y 25 36 fi;0.001
  con qrx z 1 x 25 48 y 13 36 fi;0.001
  msg horizontal-direction radiation flux
  pause;
  *dump qrx;con off;red
 
  con qry z 1 x 1 72 y 25 36 fi;0.001
  con qry z 1 x 25 48 y 13 36 fi;0.001
  msg vertical-direction radiation flux
  pause;
  *dump qry;con off;red
 
  msg whole domain
  con tem1 z 1 fi;0.001;use patgeo
  ** con tem1 z 1;int 50
  msg contours of "true" temperature
  pause;
  *dump tem1;con off;red
  con t3 z 1 fi;0.001; use patgeo
  msg contours of "radiant" temperature
  **con t3 z 1 ;int 50
  pause;
  *dump t3;con off;red
 
  ENDUSE
REAL(REYNO,UIN,TOXID,TWALL)
INTEGER(UNIT)
REYNO=1000; UNIT=12; TOXID=20.0; TWALL=80.0
    GROUP 1. Run title and other preliminaries
TEXT(Thermal Stress In  Heated/Cooled Blocks)
TITLE
  DISPLAY
 
  For the description of this "multi-physics example", see PHOENICS
  Encyclopaedia article on Stress and strain in solids.
  /phoenics/d_polis/d_enc/stress1.htm#multi
 
  In addition to illustrating the calculation of stresses in solids,
  this case exemplifies also the use of IMMERSOL and LVEL.
 
  ENDDIS
 
UIN=2.0
NX=6*UNIT; XULAST=0.03 ; NY= 3*UNIT ; YVLAST = 0.024
#UNIGRID
 
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1,TEM1,T3)
STORE(ENUT,PRPS,WDIS,WGAP,VISL,DRH1,DVO1)
STORE(EMIS,SCAT,QRX,QRY)
STORE(RHO1,EPST,EPSX,EPSY,EPSZ,STRX,STRY,STRZ)
TURMOD(LVEL)
 
    GROUP 8. Terms (in differential equations) & devices
TERMS(TEM1,N,P,P,P,P,P)
EGWF=T
  solid-stress-related settings
STRA=T
    GROUP 9. Properties of the medium (or media)
  TEXT(Choose Fluid Materials
#fluidmat
    GROUP 11. Initialization of variable or porosity fields
 
FIINIT(PRPS) = air20
FIINIT(EMIS)=0.0; FIINIT(SCAT)=0.0
 
UIN=REYNO * 1.E-5 /( 0.3333 * YVLAST )
FIINIT(V1)=0.0
FIINIT(u1)=0.0
(initial of u1 is :uin: with if(prps.eq.0))
#solidmat
 
FIINIT(EPST)=0.0
FIINIT(EPSX)=0.0
FIINIT(EPSY)=0.0
FIINIT(EPSZ)=0.0
FIINIT(STRX)=0.0
FIINIT(STRY)=0.0
FIINIT(STRZ)=0.0
FIINIT(TEM1)=TOXID;FIINIT(T3)=TWALL

PATCH(BLOCK1,INIVAL,1,2*UNIT,UNIT+1,UNIT*2,1,1,1,1)
COVAL(BLOCK1,PRPS,0.0,COPPER)
COVAL(BLOCK1,EMIS,0.0,0.9)

PATCH(BLOCK2,INIVAL,4*UNIT+1,6*UNIT,UNIT+1,UNIT*2,1,1,1,1)
COVAL(BLOCK2,PRPS,0.0,COPPER)
COVAL(BLOCK2,EMIS,0.0,0.9)

PATCH(BASE,INIVAL,1,UNIT*6,1,UNIT,1,1,1,1)
COVAL(BASE,PRPS,0.0,ALUMIN)
COVAL(BASE,EMIS,0.0,0.9)
 
 
    GROUP 13. Boundary conditions and special sources
 
PATCH(INLET,NORTH,1,UNIT/2,NY,NY,1,1,1,1)
COVAL(INLET,P1,FIXFLU,1.189*UIN); COVAL(INLET,V1,ONLYMS,-UIN)
COVAL(INLET,TEM1,ONLYMS,TOXID)
 
PATCH(OUTLET,EAST,NX,NX,2*UNIT+1,NY,1,1,1,1)
COVAL(OUTLET,P1,1.0E+05,0.0)
COVAL(OUTLET,U1,ONLYMS,0.0);COVAL(OUTLET,V1,ONLYMS,0.0)
COVAL(OUTLET,KE,ONLYMS,0.0);COVAL(OUTLET,EP,ONLYMS,0.0)
COVAL(OUTLET,tem1,ONLYMS,SAME)
 
PATCH(TOP,NWALL,UNIT/2+1,NX,NY,NY,1,1,1,1)
COVAL(TOP,U1,1.0,0.0)
 
PATCH(IMSWL1,NWALL,1,NX,NY,NY,1,NZ,1,LSTEP)
COVAL(IMSWL1,T3,GRND4,TWALL)
COVAL(IMSWL1,TEM1,WALLCO,TWALL)
 
COVAL(TOP,TEM1,FIXVAL,TWALL)
SPEDAT(SET,EMISSIVITY,OF IMSWL1,R,1.0)
COVAL(INLET, TEM1,ONLYMS,TOXID)
   
   represent the fixing of displacements to zero at domain
   boundaries by In-Form sources for displacements near boundaries
PATCH(WESTFIX,WEST,1,1,1,UNIT*2,1,1,1,1)
(SOURCE OF U1 AT WESTFIX IS -U1*DRH1/DXU WITH LINE)
 
PATCH(EASTFIX,EAST,NX-1,NX-1,1,UNIT*2,1,1,1,1)
(SOURCE OF U1 AT EASTFIX IS -U1*DRH1/DXU WITH LINE)
 
PATCH(SOUTHFIX,SOUTH,1,NX,1,1,1,1,1,1)
(SOURCE OF V1 AT SOUTHFIX IS -V1*DRH1/DYV WITH LINE)
 
 
    GROUP 15. Termination of sweeps
LSWEEP=1000;TSTSWP=-1
    GROUP 16. Termination of iterations
RESFAC=0.1
LITER(U1)=100
LITER(V1)=100
LITER(TEM1)=100
LITER(T3)=100
    
    GROUP 17. Under-relaxation devices
lsg57=t   ! for automatic settings
spedat(rlxfac,reftemp,r,twall)
spedat(rlxfac,reflen,r,xulast)
    
    GROUP 22. Monitor print-out
IXMON=-1  ! for display of absmax corrections
TEXT(Multi-Physics.  Reyno= :Reyno:   Unit=:Unit:
 
 
OUTPUT(STRZ,N,N,N,N,N,N)
OUTPUT(EPSZ,N,N,N,N,N,N)
 
  In-Form statements
  
(longname of p1 print as pressure_or_const1*dilatation-const2*epst)
(longname of enul print as viscosity_or_poisson)
(longname of drh1 print as compressibility_or_Young's_modulus*1.e11)
(longname of u1 print as x-direction_velocity_or_displacement)
(longname of v1 print as y-direction_velocity_or_displacement)
  (longname of w1 print as z-direction_velocity_or_displacement)

 LIBREF=227
relax(u1,falsdt,1.e-3) 
relax(v1,falsdt,1.e-3) 
  nprint=1;lsweep=1
  debug=t;dbgphi(p1)=t;dbsoda=t
dbgphi(r1)=t
store(imb1,pcor)  
#maxabs
#endpause
STOP