TALK=f;RUN(1,1)
  DISPLAY

  A rectangular plate of dimensions LY * LZ is 
  1. held fixed along its south and high edges
  2. subjected to uniform tension along its low edge
  3. allowed to contract freely along its north edge
  4. in case 1 (plane stress) allowed to contract freely in the 
     x-direction
  5. in case 2 (plane strain) prevented from contracting in the 
     x-direction.
  The distributions of displacement in the yz plane are computed,
  and also the corresponding stresses and strains in all three 
  directions.
  A uniform cartesian grid is used.
  The computed results are compared with the analytically-derived
  values.  
  
  ENDDIS
    
  PHOTON USE
  p;;;;
  
  

  set prop off
  cl
  msg y-displacement fields
  gr ou x 1
  cont V1 x 1 y 1 7 z 1 8 fil;.0001
  pause
  cl
  msg z-displacement fields
  gr ou x 1
  cont W1 x 1 y 1 8 z 1 7 fil;.0001
  ENDUSE


 ************************************************************
  Group 1. Run Title and Number
 ************************************************************
 TEXT(2D yz-plate in z-direction tension; s206
LIBREF=206
TITLE
integer(caseno)     
mesg(caseno = 1  : x free
mesg(caseno = 2  : x fixed
caseno=1
label ask
mesg(caseno=:caseno: Enter 1, 2 or blank
readvdu(caseno,int,1)
if(caseno.lt.1) then
 goto ask
endif  
if(caseno.gt.2) then
 goto ask
endif 
caseno
  Declarations and settings
REAL(FZ,LY,LZ,POISSON,YOUNG) 
FZ= -40.0e6  ! H/m^2 = 40 N/mm^2
LY=90.e-3
LZ=120.e-3 
YOUNG   = 1/0.5E-11   ! Young's modulus
POISSON=0.3           ! Poisson's ratio
INTEGER(NYBODY,NZBODY)

 ************************************************************
  Group 2. Time dependence
 STEADY  =    T
 ************************************************************
  Group 3. X-Direction Grid Spacing
 CARTES  =    T
 NYBODY = 10
 GRDPWR(Y,NYBODY,LY,1)  
 ************************************************************
  Group 4. Z-Direction Grid Spacing
 NZBODY = 10
 GRDPWR(Z,NZBODY,LZ,1)  
 ************************************************************
  Group 5. Z-Direction Grid Spacing
 NX=1
 XULAST  = 0.001
 ************************************************************
  Group 7. Variables: STOREd,SOLVEd,NAMEd
 ONEPHS  =    T
 SOLVE(P1,W1,V1)
 SOLUTN(P1  ,Y,Y,Y,N,N,N)
 SOLUTN(V1  ,Y,Y,Y,N,N,Y)
 SOLUTN(W1  ,Y,Y,Y,N,N,Y)
 
 STORE(PRPS,DRH1,VISL)     ! Necessary to save storage DRH1,VISL ??? 
 STORE(STRX,STRY,STRZ,STYZ)
 STORE(EPSY,EPSX,EPSZ)

 STORE(V1T,W1T,V1/T,W1/T)

 ************************************************************
  GROUP 8. ITERATION NUMBERS ETC
RESFAC=1.e-7
RESREF(W1)=0.0 
RESREF(V1)=0.0  ! to prevent premature exit
LITER(W1) = 20 ! from solver
LITER(V1) = 20 
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(v1)=0.0
fiinit(w1)=0.0
 
FIINIT(PRPS)=160

 ************************************************************
  GROUP 13. BOUNDARY & SPECIAL SOURCES
 
PATCH(UP,HWALL,1,1,1,NY,NZ,NZ,1,1)     ! high edge fixed 
COVAL(UP,W1,1,0.0)

PATCH(FORC01,HIGH,1,1,1,NY,1,1,1,1)    ! low edge in tension
COVAL(FORC01,W1,FIXFLU,FZ)

PATCH(AXESZZ,SWALL,1,1,1,1,1,NZ,1,1)   ! south  edge fixed
COVAL(AXESZZ,V1,1,0.0)

IF(CASENO.EQ.2) THEN
SPEDAT(BOUNDARY,XCONST,R,1.e20)
ELSE
SPEDAT(BOUNDARY,xCONST,R,0.0)
ENDIF 
 ************************************************************
  GROUP 15. TERMINATE SWEEPS
 LSWEEP  =      100
 ISG21=LSWEEP
 ************************************************************
  GROUP 17. RELAXATION
 RELAX(P1  ,LINRLX, 1.000000E+00)
       spedat(rlxfac,rlxv1d,r,0.5)  
       spedat(rlxfac,rlxw1d,r,0.5)  

 ************************************************************
  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
NZPRIN = 2
NYPRIN = 2
IXMON = 1
IYMON = NY/2
IZMON = NZ-2
     
#maxmin
#endpause
#$s003

  inform7begin
real(CEPSY,CEPSZ,CEPS)
IF(CASENO.EQ.2) THEN
 CEPSY = FZ/YOUNG*(1+POISSON)*POISSON
 CEPSZ =  -FZ/YOUNG*(1-POISSON**2)
ELSE
 CEPSY = FZ/YOUNG*POISSON
 CEPSZ =  -FZ/YOUNG
ENDIF
CEPS = CEPSY+CEPSZ
CEPSY
CEPSZ 
CEPS

   **** CALCULATE analytical solution ***
(STORED VAR V1T IS :CEPSY:*YV)
(STORED VAR W1T IS :CEPSZ:*(ZW -:LZ:))

(STORED VAR V1/T IS V1/(V1T+1.e-20))
(STORED VAR W1/T IS W1/(W1T+1.e-20))

  inform7end

STOP