TALK=f;RUN(1,1)
  DISPLAY
  A rectangular plate with a centrally-placed square hole is
  extended by uniform equal forces on its upper and lower
  surfaces, which are allowed to distort.
  By reason of symmetry, only one quarter of the plate is analysed.
  
  Displacements in the third (z) dimension are prevented. The 
  problem is therefore one of plane strain.
  
  No analytical solution exists; but the computed displacements,
  strains and stresses are in close agreement with those computed
  by the finite-element code ELCUT.
  
  The boundary conditions are applied in two ways, namely:
  caseno=1: when the plate edges are at the domain boundaries;
  caseno=2: when the plate is separated from the boundaries,
            including the symmetry axis, by thin fluid layers. 

  ENDDIS
  
  PHOTON USE
  p;;;;
  
  
  set prop off
  msg
  msg V1 contours
  msg
  cont V1 z 1 fil;.0001
  pause
  
  cl
  msg
  msg U1 contours
  msg
  cont U1 z 1 fil;.0001
  pause

  cl
  msg
  msg EpsX contours
  msg
  cont EPSX z 1 fil;.0001
  pause
  
  cl
  msg
  msg EpsY contours
  msg
  cont EPSY z 1 fil;.0001
  pause

  cl
  msg
  msg STRZ contours
  msg
  cont STRZ z 1 fil;.0001
  pause

  cl
  msg
  msg STRX contours
  msg
  cont STRX z 1 fil;.0001
  pause
    
  cl
  msg
  msg STRY contours
  msg
  cont STRY z 1 fil;.0001
  pause

  cl
  msg
  msg STXY contours
  msg
  cont STXY z 1 fil;.0001
  pause

  cl
  msg Displacements fields
  gr ou z 1
  cont DELT z 1 fil;.0001
  vec z 1 col 0
  pause

  cl
  AUTOPLOT
  file                                                                            
  phi 5 
  EDZZ\S201_1.txt 2
  EDZZ\S201_2.txt 2
  EDZZ\S201_3.txt 2
  
  data 1                                                                          
  STRX X 11 Y 1 28                                                                   
  col1 1          
  data 2                                                                          
  y SXX 
  colA 2          
  scale
  msg STRX(Y) for X=45 mm (WHITE-Phoenics, YELLOW - Elcut) ...
  plot 1 2                                                                      
  pause 
  
  clear
  data 1                                                                          
  STRY X 11 Y 1 28                                                                   
  col1 1          
  data 2                                                                          
  y SYY 
  colA 2          
  scale
  msg STRY(Y) for X=45 mm (WHITE-Phoenics, YELLOW - Elcut) ...
  plot 1 2                                                                      
  pause 
  
  clear
  data 1                                                                          
  STXY X 11 Y 1 28                                                                   
  col1 1          
  data 2                                                                          
  y TXY 
  colA 2          
  scale
  msg STXY(Y) for X=45 mm (WHITE-Phoenics, YELLOW - Elcut) ...
  plot 1 2                                                                      
  pause 
  
  
  clear
  data 1                                                                          
  U1 X 11 Y 1 28                                                                  
  col1 1          
  data 3                                                                          
  y DX 
  colA 2          
  scale
  msg U1(Y) for X=45 mm (WHITE-Phoenics, YELLOW - Elcut) ...
  plot 1 2                                                                      
  pause
  
  
  clear
  data 1                                                                          
  V1 X 11 Y 1 28                                                                   
  col1 1          
  data 3                                                                          
  y DY 
  colA 2          
  scale
  msg V1(Y) for X=45 mm (WHITE-Phoenics, YELLOW - Elcut) ...
  plot 1 2                                                                      
  pause 
  
  clear
  data 1                                                                          
  EPSX X 11 Y 1 28                                                                   
  col1 1          
  data 3                                                                          
  y EXX 
  colA 2          
  scale
  msg EpsX(Y) for X=45 mm (WHITE-Phoenics, YELLOW - Elcut) ...
  plot 1 2                                                                      
  pause 
  
  clear
  data 1                                                                          
  EPSY X 11 Y 1 28                                                                   
  col1 1          
  data 3                                                                          
  y EYY 
  colA 2          
  scale
  msg EpsY(Y) for X=45 mm (WHITE-Phoenics, YELLOW - Elcut) ...
  plot 1 2                                                                      
  pause 
      
  
  clear
  data 1                                                                          
  EPSZ X 11 Y 1 28                                                                   
  col1 1          
  data 3                                                                          
  y EZZ 
  colA 2          
  scale
  msg EpsZ(Y) for X=45 mm (WHITE-Phoenics, YELLOW - Elcut) ...
  plot 1 2                                                                      
  pause 
  
  clear
  data 1                                                                          
  U1 Y 14 X 1 21                                                                   
  col1 1          
  data 4                                                                          
  x DX 
  colA 2          
  scale
  msg U1(X) for Y=59 mm (WHITE-Phoenics, YELLOW - Elcut) ...
  plot 1 2                                                                      
  pause 
  
  clear
  data 1                                                                          
  V1 Y 14 X 1 21                                                                   
  col1 1          
  data 4                                                                          
  x DY 
  colA 2          
  scale
  msg V1(X) for Y=59 mm (WHITE-Phoenics, YELLOW - Elcut) ...
  plot 1 2                                                                      
  pause 

  ENDUSE

  
 ************************************************************
  Group 1. Run Title and Number
 ************************************************************
 TEXT(2D xy Plate with square hole; s201
libref=201
TITLE 
 
  Declarations and settings
integer(caseno)
caseno=1
mesg(caseno=1: plate extends to the domain boundaries  
mesg(caseno=2: plate is surrounded by fluid 
mesg(caseno = :caseno: OK (Y/n) 
readvdu(ans,char,y)
if(:ans:.eq.n.or.:ans:.eq.N) then
caseno=2
endif
caseno
REAL(FY,LX,LY,R0,POISSON,YOUNG) 
FY=-40.0e6  ! H/m^2 = 40 N/mm^2
LX=90.e-3
LY=120.e-3 
R0=30.e-3
YOUNG   = 1/0.5E-11   ! Young's modulus
POISSON=0.3           ! Poisson's ratio
INTEGER(NXBODY,NYBODY)

 ************************************************************
  Group 2. Time dependence
 STEADY  =    T
 ************************************************************
  Group 3. X-Direction Grid Spacing
 CARTES  =    T
 NXBODY = 21
if(caseno.eq.1) then
 NREGX=2                             ! 3 regions
 IREGX=1;GRDPWR(X,7,R0,1)  
 IREGX=2;GRDPWR(X,NXBODY-7,LX-R0,1)  
else
 NREGX=4                             ! 4 regions
 IREGX=1;GRDPWR(X,1,0.01*LX,1.0)     ! single inner fluid cell
 IREGX=2;GRDPWR(X,7,R0,1)  
 IREGX=3;GRDPWR(X,NXBODY-7,LX-R0,1)  
 IREGX=4;GRDPWR(X,1,0.01*LX,1.0)     ! single outer fluid cell 
endif
 ************************************************************
  Group 4. Y-Direction Grid Spacing
 NYBODY = 28
if(caseno.eq.1) then
 NREGY=2                             ! 2 regions
 IREGY=1;GRDPWR(Y,NYBODY-7,LY-R0,1)  
 IREGY=2;GRDPWR(Y,7,R0,1)  
else
 NREGY=4                             ! 4 regions
 IREGY=1;GRDPWR(Y,1,0.01*LY,1.0)     ! single inner fluid cell
 IREGY=2;GRDPWR(Y,NYBODY-7,LY-R0,1)  
 IREGY=3;GRDPWR(Y,7,R0,1)  
 IREGY=4;GRDPWR(Y,1,0.01*LY,1.0)     ! single outer fluid cell 
endif
 ************************************************************
  Group 5. Z-Direction Grid Spacing
 NZ=1
 ZWLAST  = 0.001
 ************************************************************
  Group 7. Variables: STOREd,SOLVEd,NAMEd
 ONEPHS  =    T
 SOLVE(P1,V1,U1)
 STORE(PRPS)
 STORE(STRX,STRY,STRZ)
 STORE(EPSY,EPSX,EPSZ)

 STORE(STXY,DELX,DELY,DELT)

 ************************************************************
  GROUP 8. ITERATION NUMBERS ETC
RESFAC = 1.e-7    ! 
RESREF(U1)=-1 
RESREF(V1)=-1  ! to prevent premature exit from solver
RESREF(P1)=-1 

LITER(V1) = 50
LITER(U1) = 50 
LITER(P1) = 20 

 ************************************************************
  GROUP 9. PROPERTIES
  
 CSG10='Q1'                  ! material properties
  MATFLG=T;NMAT=1         
  160    7800.0    0.3       473.0   43.0      1.0e-5   0.5e-11 
 
 ************************************************************
  GROUP 11. INITIAL VALUES
 fiinit(p1)=0.0
 fiinit(u1)=0.0
 fiinit(v1)=0.0
 fiinit(Delt)=0.0

if(caseno.eq.1) then
 FIINIT(PRPS)=160
 PATCH(FLOW1,INIVAL,1,7,NY-6,NY,1,1,1,1)
 INIT(FLOW1,PRPS,FIXVAL,0)

else
 
 FIINIT(PRPS)=0
 PATCH(BODY1,INIVAL,2,NX-1,2,NY-8,1,1,1,1)
 INIT(BODY1,PRPS,FIXVAL,160)
 PATCH(BODY2,INIVAL,9,NX-1,NY-8,NY-1,1,1,1,1)
 INIT(BODY2,PRPS,FIXVAL,160)
endif
 ************************************************************
  GROUP 13. BOUNDARY & SPECIAL SOURCES
if(caseno.eq.1) then
PATCH(UP,NWALL,8,NX,NY,NY,1,1,1,1)         ! UP - fixed 
COVAL(UP,V1,1,0.0)

PATCH(FORZ01,NORTH,1,NX,1,1,1,1,1,1)           ! Down - compression
COVAL(FORZ01,V1,FIXFLU,FY)

PATCH(AXESZZ,WWALL,1,1,1,NY-7,1,1,1,1)         ! LEFT - fixed 
COVAL(AXESZZ,U1,1,0.0)

else

PATCH(UP,north,9,NX-1,NY-1,NY-1,1,1,1,1)       ! UP - fixed 
COVAL(UP,V1,FIXVAL,0.0)

PATCH(FORC01,NORTH,2,NX-1,1,1,1,1,1,1)         ! Down - compression
COVAL(FORC01,V1,FIXFLU,FY)

PATCH(AXESZZ,WEST,2,2,2,NY-8,1,1,1,1)          ! LEFT - fixed
  PATCH(AXESZZ,EAST,1,1,2,NY-8,1,1,1,1)    
COVAL(AXESZZ,U1,FIXVAL,0.0)

endif

     ! PLANE-STRAIN,   EPSZ = 0  

SPEDAT(BOUNDARY,ZCONST,R,1.e20)
 
 ************************************************************
  GROUP 15. TERMINATE SWEEPS
 LSWEEP  =   100
 ISG21=LSWEEP
 ************************************************************
  GROUP 17. RELAXATION
     #CONPROM
 RELAX(P1  ,LINRLX, 1.000000E+00)
 relax(U1,linrlx,1.0)  
 relax(V1,linrlx,1.0)  
 
 ************************************************************
  GROUP 19. DATA TRANSMITTED TO GROUND
 STRA    =    T

 ************************************************************
  GROUP 23.FIELD PRINT-OUT & PLOT CONTROL
TSTSWP = - 1   ! graphic-mode
IXMON = NX-2
IYMON = 2
IZMON = 1
#endpause
#maxmin
#$s003

  inform7begin

(STORED VAR DelX IS 0.5*(U1+U1[-1]) with imat>100)
(STORED VAR DelY IS 0.5*(V1+V1[&-1]) with imat>100)
(STORED VAR Delt IS SQRT(DELX^2+DELY^2) with imat>100)
  inform7end
STOP