TALK=f;RUN(1,1)
  DISPLAY
  Problem: The quarter of the square channel.
           Inner pressure = 4.0e8, outer pressure = 0
   1. 2D 'PLANE-STRAIN' : EpsZ = 0
   2. Comparison - a calculation on code ELCUT (www.tor.ru)
   3. CHANGE from case s240.htm: Add Flow Cells for IX=1 and IY=NY
  
  PHOTON USE
  p;;;;
  
  
  set prop off
  msg
  msg V1 contours
  msg
  cont DELY z 1 x 1 20 y 2 21 fil;.0001
  pause
  
  cl
  msg
  msg U1 contours
  msg
  cont DELX z 1 x 1 20 y 2 21 fil;.0001
  pause

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

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

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

  cl
  msg
  msg STXY contours
  msg
  cont STXY z 1 x 1 20 y 2 21 fil;.0001
  pause

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


  ENDUSE
  
 ************************************************************
  Group 1. Run Title and Number
 ************************************************************
 TEXT(square channel;2D[xy])
 
  Declarations and settings
REAL(PIN,LX,LY,R0,POISSON,YOUNG) 
PIN=4.0e8  ! H/m^2
LX=60.e-3
LY=60.e-3 
R0=30.e-3
YOUNG   = 1/0.5E-11   ! Young's modulus
POISSON=0.3           ! Poisson's ratio
INTEGER(NXC,NYC)
INTEGER(CASENO)       ! start of menu
mesg(caseno 1 or 2 : default settings
mesg(caseno 3 or 4 : Poisson's ratio = 0.0 ; should affect result
mesg(caseno 5 or 6 : zwlast = 1.0 m ; unlikely to affect result
mesg(caseno 7 or 8 : focus print-out on channel corner
mesg(caseno 9 or 10 : outside fluid pressure = inside pressure
mesga(caseno odd = StressModel, even = ModModel361
caseno=1
mesgm(caseno = :caseno: Enter another if not OK
readvdu(caseno, int, 1)
caseno 
libref=caseno     ! useful because this appears in graphical monitor
Integer(SolvMod)
  ! SolvMod =  1 for Stone Solver        (caseno = even) 
  !            2 for simultaneous Solver (caseno = odd )
  !
solvmod=1 + (caseno+1)/2-caseno/2
solvmod

 ************************************************************
  Group 2. Time dependence
 STEADY  =    T
 ************************************************************
  Group 3. X-Direction Grid Spacing
 CARTES  =    T
 NXC = 10
 NREGX=4
 IREGX=1;GRDPWR(X,1,0.001*LX,1.0)     ! 18.12.05 single outer fluid cell 
 IREGX=2;GRDPWR(X,NXC,R0,1.0)
 IREGX=3;GRDPWR(X,NXC,LX-R0,1)  
 IREGX=4;GRDPWR(X,1,0.001*LX,1.0)     ! single outer fluid cell 

 ************************************************************
  Group 4. Y-Direction Grid Spacing
 NYC = 10
 NREGY=4
 IREGY=1;GRDPWR(Y,1,0.001*LY,1.0)     ! single outer fluid cell 
 IREGY=2;GRDPWR(Y,NYC,LY-R0,1.0)
 IREGy=3;GRDPWR(Y,NYC,R0,1)  
 IREGY=4;GRDPWR(Y,1,0.001*LY,1.0)    ! 18.12.05 single outer fluid cell 
 ************************************************************
  Group 5. Z-Direction Grid Spacing
 NZ=1
 ZWLAST  = 0.001
 ZWLAST  = 0.001
 if(caseno.eq.5.or.caseno.eq.6) then
 ZWLAST  = 1.0
 endif
 zwlast
 ************************************************************
  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(Delt,DelX,DelY)

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

 ************************************************************
  GROUP 9. PROPERTIES
  
 CSG10='Q1'                  ! materials with various POISSON ratios
  MATFLG=T;NMAT=2         
  160    7800.0    0.3       473.0   43.0      1.0e-5   0.5e-11 
  161    7800.0    0.0       473.0   43.0      1.0e-5   0.5e-11 
INTEGER(IPRPS)
IPRPS=160         ! used in initial-condition setting below
IF(CASENO.EQ.3.OR.CASENO.EQ.4) THEN
 IPRPS=161
 POISSON=0.3      ! for use in exact-solution calculation
ENDIF
 
 ************************************************************
        ! FFFFFFFFFFFFF00000000000   ny = 2*nyc+2
        ! FFFFFFFFFFFFFuuuuuuuuuu0   ny-1
        ! FFFFFFFFFFFFFssssssssss0 
        ! FFFFFFFFFFFFFssssssssss0 
        ! FFFFFFFFFFFFFssssssssss0 
        ! FFFFFFFFFFFFFssssssssss0   nyc+2
        ! 0lsssssssssssssssssssss0   nyc+1
        ! 0lsssssssssssssssssssss0 
        ! 0lsssssssssssssssssssss0 
        ! 0lsssssssssssssssssssss0   2
        ! 000000000000000000000000   1 
        ! 1           nxc+1 
        !              nxc+2     nx = 2*nxc+2
        !              
        ! F : inner ( P1 = PIN)
        ! s : solid 
        ! u : solid + UP
        ! l : solid + Left
        ! 0 : FU,FD,FL,FR : P1 = 0             
  ********************************************************** 
  GROUP 11. INITIAL VALUES
fiinit(u1)=0.0
fiinit(v1)=0.0
fiinit(Delt)=0.0

  ==== Initial Value of PROP & P1 =======
 FIINIT(PRPS)=IPRPS
 FIINIT(P1)=0.0
 PATCH(INNER,INIVAL,1,NXC+1,NYC+2,NY,1,1,1,1)
 INIT(INNER,PRPS,FIXVAL,0)
 INIT(INNER,P1,FIXVAL,PIN)
 PATCH(FL,INIVAL,1,1,1,NY,1,1,1,1)
 INIT(FL,PRPS,FIXVAL,0)
 PATCH(FU,INIVAL,1,NX,NY,NY,1,1,1,1)
 INIT(FU,PRPS,FIXVAL,0)
 
 PATCH(FD,INIVAL,1,NX,1,1,1,1,1,1)
 INIT(FD,PRPS,FIXVAL,0)
 PATCH(FR,INIVAL,NX,NX,1,NY,1,1,1,1)
 INIT(FR,PRPS,FIXVAL,0)

 ************************************************************
  GROUP 13. BOUNDARY & SPECIAL SOURCES
 
PATCH(UP,north,NXC+2,NX-1,NY-1,NY-1,1,1,1,1)            ! UP - fixed V1
COVAL(UP,V1,FIXVAL,0.0)

PATCH(LEFT,WEST,1,1,2,NYC+1,1,1,1,1)            ! LEFT - fixed U1
COVAL(LEFT,U1,FIXVAL,0.0)

    Fixed P1 in inner-zone 
PATCH(PINNER,CELL,1,NXC+1,NYC+2,NY,1,1,1,1)       ! pressurizing inner
COVAL(PINNER,P1,FIXVAL,PIN)                       ! fluid

    Fixed U1 & V1 in inner-zone 
PATCH(UINNER,CELL,1,NXC,NYC+2,NY,1,1,1,1)
COVAL(UINNER,U1,FIXVAL,0.0)                 
PATCH(VINNER,CELL,1,NXC+1,NYC+2,NY,1,1,1,1)
COVAL(VINNER,V1,FIXVAL,0.0)                 

if(caseno.eq.9.or.caseno.eq.10) then
    Fixed P1 in FL/FD/FR/FU-zones 
PATCH(PFL,CELL,1,1,1,NYC+1,1,1,1,1)
INIT(PFL,P1,FIXVAL,pin)
PATCH(PFD,CELL,2,NX,1,1,1,1,1,1)
INIT(PFD,P1,FIXVAL,pin)
PATCH(PFR,CELL,NX,NX,2,NY,1,1,1,1)
INIT(PFR,P1,FIXVAL,pin)
PATCH(PFU,CELL,NXC+2,NX-1,NY,NY,1,1,1,1)
INIT(PFU,P1,FIXVAL,pin)
else
PATCH(PFL,CELL,1,1,1,NYC+1,1,1,1,1)
INIT(PFL,P1,FIXVAL,0)
PATCH(PFD,CELL,2,NX,1,1,1,1,1,1)
INIT(PFD,P1,FIXVAL,0)
PATCH(PFR,CELL,NX,NX,2,NY,1,1,1,1)
INIT(PFR,P1,FIXVAL,0)
PATCH(PFU,CELL,NXC+2,NX-1,NY,NY,1,1,1,1)
INIT(PFU,P1,FIXVAL,0)
endif 



    Fixed U1 in FL/FD/FR/FU-zones 
PATCH(PFD,CELL,1,NX,1,1,1,1,1,1)
INIT(PFD,U1,FIXVAL,0)
PATCH(PFU,CELL,NXC+1,NX-1,NY,NY,1,1,1,1)
INIT(PFU,U1,FIXVAL,0)

    Fixed V1 in FL/FD/FR/FU-zones 
PATCH(VFL,CELL,1,1,1,NYC+1,1,1,1,1)
INIT(VFL,V1,FIXVAL,0)
PATCH(VFR,CELL,NX,NX,2,NY-1,1,1,1,1)
INIT(VFR,V1,FIXVAL,0)

     ! EpsZ = 0

 SPEDAT(BOUNDARY,ZCONST,R,1.0e20)
 
 ************************************************************
  GROUP 15. TERMINATE SWEEPS
 LSWEEP  =       300
 ISG21=LSWEEP
if(solvmod.eq.2) then
 LG(40) = T
 spedat(rlxfac,rlxu1d,r,1)  
 spedat(rlxfac,rlxv1d,r,1)  
else
 lsweep=lsweep*2
 LG(40) = F 
 spedat(rlxfac,rlxu1d,r,0.5)  
 spedat(rlxfac,rlxv1d,r,0.5)  
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
  look at bottom right-hand corner of solid
nxprin=1;nyprin=1
   ixprf=nx-4;ixprl=nx
   iyprf=1;iyprl=5

if(caseno.eq.7.or.caseno.eq.8) then
 look at bottom right-hand corner of fluid
ixprf=nxc-2;ixprl=nxc+2                  
iyprf=nyc-3;iyprl=nyc+1      
endif  
  inform7begin
  cell-centre displacements, for comparison with ELCUT
real(R4)
(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