TALK=f;RUN(1,1)
  DISPLAY
  Problem: The quarter of the plate with square hole.
           From down, the plate sprawls givenned force - FY
   1. 2D 'PLANE-STRESS' : StrZ = 0
   2. Comparison - a calculation on code ELCUT (www.tor.ru)

  ENDDIS
  
  PHOTON USE
  p;;;;
  
  
  set prop off
  msg
  msg V1 contours
  msg
  cont DELY z 1 x 2 22 y 2 29 fil;.0001
  pause
  
  cl
  msg
  msg U1 contours
  msg
  cont DELX z 1 x 2 22 y 2 29 fil;.0001
  pause

  cl
  msg
  msg EpsX contours
  msg
  cont EPSX z 1 x 2 22 y 2 29 fil;.0001
  pause
  
  cl
  msg
  msg EpsY contours
  msg
  cont EPSY z 1 x 2 22 y 2 29 fil;.0001
  pause

  cl
  msg
  msg EpsZ contours
  msg
  cont EPSZ z 1 x 2 22 y 2 29 fil;.0001
  pause

  cl
  msg
  msg STRX contours
  msg
  cont STRX z 1 x 2 22 y 2 29 fil;.0001
  pause
    
  cl
  msg
  msg STRY contours
  msg
  cont STRY z 1 x 2 22 y 2 29 fil;.0001
  pause

  cl
  msg
  msg STXY contours
  msg
  cont STXY z 1 x 2 22 y 2 29 fil;.0001
  pause

  cl
  msg Displacements fields
  gr ou z 1
  cont DELT z 1 x 2 22 y 2 29 fil;.0001
  vec z 1 x 2 22 y 2 29 col 0

  ENDUSE

  
 ************************************************************
  Group 1. Run Title and Number
 ************************************************************
 TEXT(Plate with square hole;2D[xy]
integer(SolvMod)     
mesg(SolvMod = 1 : ModModel361
mesg(SolvMod = 2 : StressModel
SolvMod=1
label ask
mesg(SolvMod=:SolvMod: Enter 1, 2 or blank
readvdu(SolvMod,int,1)
if(SolvMod.lt.1) then
 goto ask
endif  
if(SolvMod.gt.4) then
 goto ask
endif 
SolvMod
 
  Declarations and settings
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
 NREGX=4                             ! 3 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 

 ************************************************************
  Group 4. Y-Direction Grid Spacing
 NYBODY = 28
 NREGY=4                             ! 3 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 
 ************************************************************
  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)
 STORE(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'                  ! materials with various POISSON ratios
  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


 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)

 ************************************************************
  GROUP 13. BOUNDARY & SPECIAL SOURCES
 
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 - sprain
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)


     ! PLANE-STRAIN,   EPSZ = 0  

SPEDAT(BOUNDARY,ZCONST,R,1.e20)
 
 ************************************************************
  GROUP 15. TERMINATE SWEEPS
if(SolvMod.eq.1) then
 LSWEEP  =   200
 LG(40)  = F
 spedat(rlxfac,rlxu1d,r,0.5)  
 spedat(rlxfac,rlxv1d,r,0.5)  
else
 LSWEEP  =   60
 LG(40)  = T
endif
 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
 PARSOL  =    F
 ISG52   =    3   !   probe & res

 ************************************************************
  GROUP 23.FIELD PRINT-OUT & PLOT CONTROL
TSTSWP = - 1   ! graphic-mode
NYPRIN = 1
IXMON = NX-2
IYMON = 2
IZMON = 1
      #conprom 

  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