TALK=T;RUN(1,1)
  PHOTON USE
  p;;;;;;

  *rot z ang 90
  set prop off
  do kk=1,4
  gr ou z kk
  gr ou z kk x 4 8 y 1 5
  enddo
  msg If temperature is not being computed in this case, enter /
  msg in answer to the next question about the required variable
  msg
  msg temperature
  do kk=1,4
  con tem1 z kk fi;0.001
  gr ou z kk
  gr ou z kk x 4 8 y 1 5
  enddo
  pause;con off
  cl;red
  msg y-direction strain
  do kk=1,4
  con epsy z kk fi;0.001
  gr ou z kk
  gr ou z kk x 4 8 y 1 5
  enddo
  pause;con off;red
  msg x-direction strain
  do kk=1,4
  con epsx z kk fi;0.001
  gr ou z kk
  gr ou z kk x 4 8 y 1 5
  enddo
  pause;con off;red
  msg y-direction stress
  do kk=1,4
  con stry z kk fi;0.001
  gr ou z kk
  gr ou z kk x 4 8 y 1 5
  enddo
  pause;con off;red
  msg x-direction stress
  do kk=1,4
  con strx z kk fi;0.001
  gr ou z kk
  gr ou z kk x 4 8 y 1 5
  enddo
  pause;con off;red
  msg displacement and velocity vectors
  set prop on
  * set vec ref 2
  do kk=1,4
  vec z kk sh
  set prop off
  * set vec ref 25
  vec z kk x 4 8 y 1 5 sh
  gr ou z kk
  gr ou z kk x 4 8 y 1 5
  enddo
  pause;vec cl
  red
  set prop on
  do kk=1,4
  * set vec ref 2
  vec z kk sh
  enddo
  set prop off
  do kk=1,4
  con p1 z kk 1 5 x 4 8 fil;  0.001
  enddo
  msg 'Pressure' variable in the solid
  ENDUSE
  DISPLAY
    STRESBOX :  a  collection  of examples of PLANT features
    for stress-in-solid option.

    This 3D domain comprises four variants (  one  for  each
    Z-slab)  of  the  problem  of thermal expansion of solid
    block placed in the cold stream:

    IZ=1 contains  simple rectangular block;
    IZ=2 as above but with automatic implementation of
         boundary conditions;
    IZ=3 staircase cutted piece of the above and
    IZ=4 has got the external pressure loaded block.

    Three first three problems  have  got  the  mathematical
    statements    and    analitical   solution   for   solid
    displacements shown below.
  ENDDIS
  begin

  Displacements of solid in x-direction should be:
  IX      3          4          5          6          7
  U1  0.000E+00  1.33333    2.66667     4.0000    5.33333
  Displacements of solid in y-direction should be:
  IY      1          2          3          4          5
  V1  1.33333    2.66667    4.00000   5.333333    6.666666
  end
    PLANTBEGIN
INTEGER(IYNORT,IXWES,IXEA,IXFIX)
IYNORT=5;IXWES=4;IXEA=NX-2;IXFIX=IXWES-1
   * north face of body
PATCH(NSISBC,NORTH,IXWES,NX,1,NY,2,2,1,LSTEP)
   CO =SISBC(FIXFLU)
   VAL=SISBC(0.0)
COVAL(NSISBC,V1,GRND,GRND)
   * east face of body
PATCH(ESISBC,EAST,IXWES,NX,1,NY,2,2,1,LSTEP)
   CO =SISBC(FIXFLU)
   VAL=SISBC(0.0)
COVAL(ESISBC,U1,GRND,GRND)
    SISBC function  is  used to introduce zero-normal stress
    boundary conditions at the solid fluid interface.
  <<<<<<<<<<<<<<<<<<<<<<< Comment ends <<<<<<<<<<<<<<<<<<<<<

  ** Case 3 (IZ=3) : Thermal expansion of staircase block
     ----------------------------------------------------
   * Heat-source boundary conditions
 PATCH(SS111H,CELL,1,NX,1,NY,1,NZ,1,LSTEP)
     CO=1.e10
     VAL=:TBODY:
 COVAL(SS111H,TEM1,GRND,GRND)
   * direct-stress condition on east face of body
 PATCH(SS111NOR,NORTH,1,NX,1,NY,NZ,NZ,1,LSTEP)
   CO =SISBC(FIXFLU)
   VAL=SISBC(0.0/FIXFLU)
 COVAL(SS111NOR,V1,GRND,GRND)
   * direct-stress condition on east face of body
 PATCH(SS111EAS,EAST,1,NX,1,NY,NZ,NZ,1,LSTEP)
   CO =SISBC(FIXFLU)
   VAL=SISBC(0.0/FIXFLU)
 COVAL(SS111EAS,U1,GRND,GRND)
    SISBC function   is   used  to  introduce  automatically
    (guided  by  PRPS  distribition  )  zero-normal   stress
    boundary conditions at the solid 111 -fluid interface as
    indicated by the PATCH name SS111??.
  <<<<<<<<<<<<<<<<<<<<<<< Comment ends <<<<<<<<<<<<<<<<<<<<<

  ** Case 4 (IZ=4) : Pressure loaded block
     -------------------------------------
   * on west face of body
PATCH(WFACE,EAST,IXWES-1,IXWES-1,1,IYNORT,NZ,NZ,1,LSTEP)
    VAL=P1/:STIFFN:
COVAL(WFACE,U1,FIXFLU,GRND)
   * on north face of body
PATCH(NFACE,NORTH,IXWES,IXEA,IYNORT,IYNORT,NZ,NZ,1,LSTEP)
    VAL=-NORTH(P1)/:STIFFN:
COVAL(NFACE,V1,FIXFLU,GRND)
   * on east face of body
PATCH(EFACE,EAST,IXEA,IXEA,1,IYNORT,NZ,NZ,1,LSTEP)
    VAL=-P1[+1,,]/:STIFFN:
COVAL(EFACE,U1,FIXFLU,GRND)
    The external fluid pressures are used  above  as  normal
    stress conditons at the solid boundaries.
  <<<<<<<<<<<<<<<<<<<<<<< Comment ends <<<<<<<<<<<<<<<<<<<<<
      PLANTEND
 ************************************************************
  Group 1. Run Title and Number
 ************************************************************
 ************************************************************
 
 TEXT(2dxy uniform heating.                   )
 
 ************************************************************
 ************************************************************
 
 IRUNN = 1 ;LIBREF = 14
 ************************************************************
  Group 2. Time dependence
 STEADY = T
 ************************************************************
  Group 3. X-Direction Grid Spacing
 CARTES = T
 NX = 10
 XULAST =10.
 XFRAC(1)=0.1 ;XFRAC(2)=0.2
 XFRAC(3)=0.3 ;XFRAC(4)=0.4
 XFRAC(5)=0.5 ;XFRAC(6)=0.6
 XFRAC(7)=0.7 ;XFRAC(8)=0.8
 XFRAC(9)=0.9 ;XFRAC(10)=1.
 ************************************************************
  Group 4. Y-Direction Grid Spacing
 NY = 8
 YVLAST =8.
 YFRAC(1)=0.125 ;YFRAC(2)=0.25
 YFRAC(3)=0.375 ;YFRAC(4)=0.5
 YFRAC(5)=0.625 ;YFRAC(6)=0.75
 YFRAC(7)=0.875 ;YFRAC(8)=1.
 ************************************************************
  Group 5. Z-Direction Grid Spacing
 PARAB = F
 NZ = 4
 ZWLAST =4.
 ZFRAC(1)=0.25 ;ZFRAC(2)=0.5
 ZFRAC(3)=0.75 ;ZFRAC(4)=1.
 ************************************************************
  Group 6. Body-Fitted Coordinates
 ************************************************************
  Group 7. Variables: STOREd,SOLVEd,NAMEd
 ONEPHS = T
 NAME(1)=P1 ;NAME(3)=U1
 NAME(5)=V1 ;NAME(7)=W1
 NAME(142)=EPST ;NAME(143)=STRX
 NAME(144)=EPSX ;NAME(145)=STRY
 NAME(146)=EPSY ;NAME(147)=MARK
 NAME(148)=PRPS ;NAME(149)=HPOR
 NAME(150)=TEM1
    * Y in SOLUTN argument list denotes:
    * 1-stored 2-solved 3-whole-field
    * 4-point-by-point 5-explicit 6-harmonic averaging 
 SOLUTN(P1,Y,Y,Y,N,N,N)
 SOLUTN(U1,Y,Y,N,N,N,Y)
 SOLUTN(V1,Y,Y,N,N,N,Y)
 SOLUTN(W1,Y,N,N,N,N,Y)
 SOLUTN(EPST,Y,N,N,N,N,Y)
 SOLUTN(STRX,Y,N,N,N,N,Y)
 SOLUTN(EPSX,Y,N,N,N,N,Y)
 SOLUTN(STRY,Y,N,N,N,N,Y)
 SOLUTN(EPSY,Y,N,N,N,N,Y)
 SOLUTN(MARK,Y,N,N,N,N,Y)
 SOLUTN(PRPS,Y,N,N,N,N,Y)
 SOLUTN(HPOR,Y,N,N,N,N,Y)
 SOLUTN(TEM1,Y,Y,Y,N,N,Y)
 EPOR = 0 ;HPOR = 149 ;NPOR = 0 ;VPOR = 0
 PRPS = 148
 ************************************************************
  Group 8. Terms & Devices
    * Y in TERMS argument list denotes:
    * 1-built-in source 2-convection 3-diffusion 4-transient
    * 5-first phase variable 6-interphase transport         
 TERMS(P1,Y,Y,Y,N,Y,Y)
 TERMS(U1,Y,Y,Y,Y,Y,Y)
 TERMS(V1,Y,Y,Y,Y,Y,Y)
 TERMS(TEM1,N,Y,Y,Y,Y,Y)
 DIFCUT =0.5 ;ZDIFAC =1.
 GALA = F ;ADDDIF = F
 ISOLX = 0 ;ISOLY = 0 ;ISOLZ = 0
 ************************************************************
  Group 9. Properties used if PRPS is not
  stored, and where PRPS = -1.0 if it is!
 RHO1 =1. ;TMP1 =0. ;EL1 =0.
 TSURR =0. ;TEMP0 =0. ;PRESS0 =0.
 DVO1DT =0. ;DRH1DP =0.
 EMISS =0. ;SCATT =0.
 RADIA =0. ;RADIB =0.
 ENUL =1.0E-02 ;ENUT =0.
 PRNDTL(U1)=1. ;PRNDTL(V1)=1.
 PRNDTL(TEM1)=CONDFILE
 PRT(U1)=1. ;PRT(V1)=1.
 PRT(TEM1)=1.
 CP1 =1. ;CP2 =1.
 ************************************************************
  Group 10.Inter-Phase Transfer Processes
 ************************************************************
  Group 11.Initial field variables (PHIs)
 FIINIT(P1)=1. ;FIINIT(U1)=0.
 FIINIT(V1)=0. ;FIINIT(W1)=0.
 FIINIT(EPST)=0. ;FIINIT(STRX)=0.
 FIINIT(EPSX)=0. ;FIINIT(STRY)=0.
 FIINIT(EPSY)=0. ;FIINIT(MARK)=1.0E-10
 FIINIT(PRPS)=0. ;FIINIT(HPOR)=0.
 FIINIT(TEM1)=0.
 
 PATCH(BODZ12 ,INIVAL, 4, 8, 1, 5, 1, 2, 1, 1)
 INIT(BODZ12 ,PRPS,0. ,111. )
 
 PATCH(BODY1 ,INIVAL, 4, 8, 1, 1, 1, 4, 1, 1)
 INIT(BODY1 ,MARK,0. ,111. )
 INIT(BODY1 ,PRPS,0. ,111. )
 
 PATCH(BODY2 ,INIVAL, 4, 8, 2, 2, 1, 4, 1, 1)
 INIT(BODY2 ,MARK,0. ,111. )
 INIT(BODY2 ,PRPS,0. ,111. )
 
 PATCH(BODY3 ,INIVAL, 4, 6, 3, 3, 1, 4, 1, 1)
 INIT(BODY3 ,MARK,0. ,111. )
 INIT(BODY3 ,PRPS,0. ,111. )
 
 PATCH(BODY4 ,INIVAL, 4, 5, 4, 4, 1, 4, 1, 1)
 INIT(BODY4 ,MARK,0. ,111. )
 INIT(BODY4 ,PRPS,0. ,111. )
 
 PATCH(BODY5 ,INIVAL, 4, 5, 5, 5, 1, 4, 1, 1)
 INIT(BODY5 ,MARK,0. ,111. )
 INIT(BODY5 ,PRPS,0. ,111. )
 
 PATCH(BODZ4 ,INIVAL, 4, 8, 1, 5, 4, 4, 1, 1)
 INIT(BODZ4 ,PRPS,0. ,111. )
 INIADD = F
 FSWEEP = 1
 NAMFI =CHAM
 ************************************************************
  Group 12. Patchwise adjustment of terms
  Patches for this group are printed with those
  for Group 13.
  Their names begin either with GP12 or &
 ************************************************************
  Group 13. Boundary & Special Sources
 
 PATCH(INLET ,WEST , 1, 1, 1, 5, 1, 4, 1, 1)
 COVAL(INLET ,P1 , FIXFLU ,1.2 )
 COVAL(INLET ,U1 ,0. ,1. )
 COVAL(INLET ,TEM1,0. ,0. )
 
 PATCH(EXIT ,EAST , 10, 10, 1, 8, 1, 4, 1, 1)
 COVAL(EXIT ,P1 ,1. ,0. )
 COVAL(EXIT ,TEM1,0. , SAME )
 
 PATCH(NSIDE ,NWALL , 1, 10, 8, 8, 1, 4, 1, 1)
 COVAL(NSIDE ,U1 ,1. ,0. )
 
 PATCH(SSIDE ,SWALL , 4, 8, 6, 6, 1, 4, 1, 1)
 COVAL(SSIDE ,U1 ,1. ,0. )
 
 PATCH(ESIDE ,WWALL , 9, 9, 1, 5, 1, 4, 1, 1)
 COVAL(ESIDE ,V1 ,1. ,0. )
 
 PATCH(WSIDE ,EWALL , 3, 3, 1, 5, 1, 4, 1, 1)
 COVAL(WSIDE ,V1 ,1. ,0. )
 
 PATCH(HOT12 ,CELL , 4, 8, 1, 5, 1, 2, 1, 1)
 COVAL(HOT12 ,TEM1, FIXVAL ,1. )
 
 PATCH(HOT4 ,CELL , 4, 8, 1, 5, 4, 4, 1, 1)
 COVAL(HOT4 ,TEM1, FIXVAL ,1. )
 
 PATCH(FIXED ,EAST , 3, 3, 1, 5, 1, 3, 1, 1)
 COVAL(FIXED ,U1 , FIXVAL ,0. )
 
 PATCH(NDRSTR ,NORTH , 4, 8, 5, 5, 1, 1, 1, 1)
 COVAL(NDRSTR ,V1 , FIXFLU ,0. )
 
 PATCH(EDRSTR ,EAST , 8, 8, 1, 5, 1, 1, 1, 1)
 COVAL(EDRSTR ,U1 , FIXFLU ,0. )
 
 PATCH(NSISBC ,NORTH , 4, 10, 1, 8, 2, 2, 1, 1)
 COVAL(NSISBC ,V1 , GRND , GRND )
 
 PATCH(ESISBC ,EAST , 4, 10, 1, 8, 2, 2, 1, 1)
 COVAL(ESISBC ,U1 , GRND , GRND )
 
 PATCH(SS111H ,CELL , 1, 10, 1, 8, 1, 4, 1, 1)
 COVAL(SS111H ,TEM1, GRND , GRND )
 
 PATCH(SS111NOR,NORTH , 1, 10, 1, 8, 4, 4, 1, 1)
 COVAL(SS111NOR,V1 , GRND , GRND )
 
 PATCH(SS111EAS,EAST , 1, 10, 1, 8, 4, 4, 1, 1)
 COVAL(SS111EAS,U1 , GRND , GRND )
 
 PATCH(WFACE ,EAST , 3, 3, 1, 5, 4, 4, 1, 1)
 COVAL(WFACE ,U1 , FIXFLU , GRND )
 
 PATCH(NFACE ,NORTH , 4, 8, 5, 5, 4, 4, 1, 1)
 COVAL(NFACE ,V1 , FIXFLU , GRND )
 
 PATCH(EFACE ,EAST , 8, 8, 1, 5, 4, 4, 1, 1)
 COVAL(EFACE ,U1 , FIXFLU , GRND )
 
 PATCH(BASE ,EAST , 3, 8, 1, 1, 4, 4, 1, 1)
 COVAL(BASE ,U1 , FIXVAL ,0. )
 XCYCLE = F
 EGWF = T
 WALLCO = GRND2
 ************************************************************
  Group 14. Downstream Pressure For PARAB
 ************************************************************
  Group 15. Terminate Sweeps
 LSWEEP = 150 ;ISWC1 = 1
 LITHYD = 1 ;LITFLX = 1 ;LITC = 1 ;ITHC1 = 1
 SELREF = T
 RESFAC =1.0E-06
 ************************************************************
  Group 16. Terminate Iterations
 LITER(P1)=20 ;LITER(U1)=1
 LITER(V1)=1 ;LITER(TEM1)=10
 ENDIT(P1)=1.0E-03 ;ENDIT(U1)=1.0E-03
 ENDIT(V1)=1.0E-03 ;ENDIT(TEM1)=1.0E-20
 ************************************************************
  Group 17. Relaxation
 RELAX(P1,LINRLX,0.8)
 RELAX(U1,FALSDT,1.)
 RELAX(V1,FALSDT,1.)
 RELAX(W1,LINRLX,1.)
 RELAX(EPST,LINRLX,1.)
 RELAX(STRX,LINRLX,1.)
 RELAX(EPSX,LINRLX,1.)
 RELAX(STRY,LINRLX,1.)
 RELAX(EPSY,LINRLX,1.)
 RELAX(MARK,LINRLX,1.)
 RELAX(PRPS,LINRLX,1.)
 RELAX(TEM1,FALSDT,1.0E+09)
 OVRRLX =0.
 EXPERT = F ;NNORSL = F
 ************************************************************
  Group 18. Limits
 VARMAX(P1)=1.0E+10 ;VARMIN(P1)=-1.0E+10
 VARMAX(U1)=1.0E+06 ;VARMIN(U1)=-1.0E+06
 VARMAX(V1)=1.0E+06 ;VARMIN(V1)=-1.0E+06
 VARMAX(W1)=1.0E+06 ;VARMIN(W1)=-1.0E+06
 VARMAX(EPST)=1.0E+10 ;VARMIN(EPST)=-1.0E+10
 VARMAX(STRX)=1.0E+10 ;VARMIN(STRX)=-1.0E+10
 VARMAX(EPSX)=1.0E+10 ;VARMIN(EPSX)=-1.0E+10
 VARMAX(STRY)=1.0E+10 ;VARMIN(STRY)=-1.0E+10
 VARMAX(EPSY)=1.0E+10 ;VARMIN(EPSY)=-1.0E+10
 VARMAX(MARK)=1.0E+10 ;VARMIN(MARK)=-1.0E+10
 VARMAX(PRPS)=1.0E+10 ;VARMIN(PRPS)=-1.0E+10
 VARMAX(HPOR)=1.0E+10 ;VARMIN(HPOR)=-1.0E+10
 VARMAX(TEM1)=1.0E+10 ;VARMIN(TEM1)=-1.0E+10
 ************************************************************
  Group 19. Data transmitted to GROUND
 NAMSAT =MOSG
 READQ1 = T
 STRA = T
 PARSOL = F
 ISG62 = 1
 POISSN =0.3333
 SPEDAT(SET,STRAIN,CALSTR,L,T)
 SPEDAT(SET,STRAIN,POISSN,R,0.3333)
 SPEDAT(SET,STRAIN,EXCOLI,R,1.0E-05)
 SPEDAT(SET,STRAIN,STIFFN,R,1.0E+05)
 SPEDAT(SET,GXMONI,PLOTALL,L,T)
 SPEDAT(SET,MATERIAL,0,L,T)
 SPEDAT(SET,MATERIAL,111,L,T)
 ************************************************************
  Group 20. Preliminary Printout
 ************************************************************
  Group 21. Print-out of Variables
 INIFLD = F ;SUBWGR = F
    * Y in OUTPUT argument list denotes:
    * 1-field 2-correction-eq. monitor 3-selective dumping      
    * 4-whole-field residual 5-spot-value table 6-residual table
 OUTPUT(P1,Y,Y,Y,Y,Y,Y)
 OUTPUT(U1,Y,N,Y,Y,Y,Y)
 OUTPUT(V1,Y,N,Y,Y,Y,Y)
 OUTPUT(W1,Y,N,Y,N,N,N)
 OUTPUT(EPST,Y,N,N,N,N,N)
 OUTPUT(STRX,Y,N,N,N,N,N)
 OUTPUT(EPSX,Y,N,N,N,N,N)
 OUTPUT(STRY,Y,N,N,N,N,N)
 OUTPUT(EPSY,Y,N,N,N,N,N)
 OUTPUT(MARK,Y,N,Y,N,N,N)
 OUTPUT(PRPS,N,N,N,N,N,N)
 OUTPUT(HPOR,Y,N,Y,N,N,N)
 OUTPUT(TEM1,Y,N,Y,Y,Y,Y)
 ************************************************************
  Group 22. Monitor Print-Out
 IXMON = 6 ;IYMON = 4 ;IZMON = 1
 NPRMON = 100000 ;NPRMNT = 1 ;TSTSWP = -1
 UWATCH = T ;USTEER = T
 HIGHLO = F
 ************************************************************
  Group 23.Field Print-Out & Plot Control
 NPRINT = 150 ;NUMCLS = 5
 NXPRIN = 1 ;IXPRF = 3 ;IXPRL = 9
 NYPRIN = 1 ;IYPRF = 1 ;IYPRL = 6
 NZPRIN = 1 ;IZPRF = 1 ;IZPRL = 10000
 XZPR = F ;YZPR = F
 IPLTF = 1 ;IPLTL = -1 ;NPLT = -1
 ISWPRF = 1 ;ISWPRL = 100000
 ITABL = 3 ;IPROF = 1
 ABSIZ =0.5 ;ORSIZ =0.4
 NTZPRF = 1 ;NCOLPF = 50
 ICHR = 2 ;NCOLCO = 45 ;NROWCO = 20
   No PATCHes yet used for this Group
 ************************************************************
  Group 24. Dumps For Restarts
 SAVE = T ;NOWIPE = F
 NSAVE =CHAM
STOP