TALK=f;RUN(1,1)
  DISPLAY
  This case is similar to s208, in that a two-material plate is held 
  at its north edge and subjected to a uniform force along its south
  edge; but in this case the edge beteween the two material is  a 
  line of constant x.
  Three cases are considered as follows ( with YM=Young's Modulus; 
                                           PR = Poisson;s Ratio ):
  caseno = 1: 
    z-surface free;  YM east = 0.1*YM west; PR east = PR west = 0.3
  caseno = 2: 
    z-surface fixed; YM east = 0.1*YM west; PR east = PR west = 0.3
  caseno = 3: 
    z-surface fixed; YM east = YM west; PR east = 0.1*PR west = 0.03
  The significance of caseno=3, with the ten-fold PR ratio, is that
  the plate should distort in such a way that v1 depends only
  on y while u1 depends only on x.
  The same effect can be achieved  for casenos 1 and 2 by making LX
  >> LY, e.g. LX=100.0*LY .
  ENDDIS
  PHOTON USE
  p;;;;
  
  

  set prop off
  cl
  msg PRPS field
  gr ou z 1
  con prps z 1  fi;.0001
  
  pause
  cl
  msg x-displacement field
  gr ou z 1
  con U1 z 1  fi;.0001
  vec z 1  col 0
  
  pause
  cl
  msg y-displacement field
  gr ou z 1
  con V1 z 1 fi;.0001
  vec z 1 col 0
  
  pause
  cl
  msg epsx field
  gr ou z 1
  con epsx z 1 fi;.0001
  
  pause
  msg epsy field
  gr ou z 1
  con epsy z 1 fi;.0001
  ENDUSE

 ************************************************************
  Group 1. Run Title and Number
 ************************************************************
 TEXT(2D xy plate in compression; two materials; s209
libref=209
TITLE
integer(caseno)     
mesg(caseno = 1 : z free; YM is variable
mesg(caseno = 2 : z fixed; YM is variable
mesg(caseno = 3 : z fixed; PR is variable
caseno=1
label ask
mesgm("Theoretical" values not provided
mesg(caseno=:caseno: Enter 1, 2, 3 or blank
readvdu(caseno,int,1)
if(caseno.lt.1) then
 goto ask
endif  
if(caseno.gt.3) then
 goto ask
endif 
caseno
libref=caseno 
  Declarations and settings
REAL(FY,LX,LY,POISSON,YOUNG) 
FY= 40.0e6  ! H/m^2 = 40 N/mm^2
LX=90.e-3
LY=120.e-3 
  LX=LY*1000.0
INTEGER(NXBODY,NYBODY)

 ************************************************************
  Group 2. Time dependence
 STEADY  =    T
 ************************************************************
  Group 3. X-Direction Grid Spacing
 CARTES  =    T
 NXBODY = 6
 NXBODY = 10
 GRDPWR(X,NXBODY,LX,1)  

 ************************************************************
  Group 4. Y-Direction Grid Spacing
 NYBODY = 4
 NYBODY = 10
 GRDPWR(Y,NYBODY,LY,1)  
 ************************************************************
  Group 5. Z-Direction Grid Spacing
 NZ=1
 ZWLAST  = 0.001
 ************************************************************
  Group 7. Variables: STOREd,SOLVEd,NAMEd
 ONEPHS  =    T
 SOLVE(P1,V1,U1)
 SOLUTN(P1  ,Y,Y,Y,N,N,N)
 SOLUTN(U1  ,Y,Y,Y,N,N,Y)
 SOLUTN(V1  ,Y,Y,Y,N,N,Y)
 
 STORE(PRPS)
 STORE(STRX,STRY,STRZ,STXY)
 STORE(EPSY,EPSX,EPSZ)
 ************************************************************
  GROUP 8. ITERATION NUMBERS ETC
RESFAC=1.e-7
RESREF(V1)=0.0 
RESREF(U1)=0.0
LITER(V1) = 50
LITER(U1) = 50 
LITER(P1) = 50 

 ************************************************************
  GROUP 9. PROPERTIES
  
 CSG10='Q1'                  ! material properties
  MATFLG=T;NMAT=3         
  160    7800.0    0.3       473.0   43.0      1.0e-5   0.5e-11 
  161    7800.0    0.3       473.0   43.0      1.0e-5   0.5e-10
  162    7800.0    0.03      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(PRPS)=160
 PATCH(BODY2,INIVAL,NX/2+1,NX,1,NY,1,1,1,1)
 INIT(BODY2,PRPS,FIXVAL,161)
 if(caseno.eq.3) then
 INIT(BODY2,PRPS,FIXVAL,162)
 endif
 ************************************************************
  GROUP 13. BOUNDARY & SPECIAL SOURCES
 
PATCH(UP,NWALL,1,NX,NY,NY,1,1,1,1) ! top - fixed V1
COVAL(UP,V1,1,0.0)
PATCH(POINTU,CELL,1,1,NY,NY,1,1,1,1)  !  top-left - fixed U1
COVAL(POINTU,U1,FIXVAL,0)

   *** bottom - upward force
PATCH(FORC01,NORTH,1,NX,1,1,1,1,1,1)
COVAL(FORC01,V1,FIXFLU,FY)

IF(CASENO.EQ.2) THEN
SPEDAT(BOUNDARY,ZCONST,R,1.e20)
ELSE
SPEDAT(BOUNDARY,ZCONST,R,0.0)
ENDIF 
 ************************************************************
  GROUP 15. TERMINATE SWEEPS
 LSWEEP  =      200
 ISG21=LSWEEP
 ************************************************************
  GROUP 17. RELAXATION
 RELAX(P1  ,LINRLX, 1.000000E+00)
 
 ************************************************************
  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
IXMON = NX-2
IYMON = 2
IZMON = 1
#$s003
#endpause
#maxmin
STOP