TALK=f;RUN(1,1) Pressurised cylinder with hole; S224

  DISPLAY
  A hollow, thick-walled cylinder, immersed in an outer fluid, 
  contains a second fluid having a different pressure.
  Recirculating square-wave cavity is made in internal surface of the cylinder.
     No analytical solution exists; but the computed displacements,
  strains and stresses are in close agreement with those computed
  by the finite-element code ELCUT.
  
  ENDDIS

  PHOTON USE
  p;;;;
  
  
  set prop off
  msg
  msg V1 contours
  msg
  cont V1 x 1 y 1 21 z 2 19 fil;.0001
  vec x 1 y 2 21 z 2 19 col 1
  
  pause
  
  cl
  msg
  msg W1 contours
  msg
  cont W1 x 1 y 2 21 y 1 19 fil;.0001
  vec x 1 y 2 21 z 2 19 col 1
  pause
   
  cl
  AUTOPLOT
  file                                                                            
  phi 5 
  EDZZ\S224_3.txt 2
  EDZZ\S224_8.txt 2
  EDZZ\S224_14.txt 2
 
  clear
  data 1                                                                          
  V1 Z 3 Y 1 21                                                                   
  col1 1          
  data 2                                                                          
  r dy 
  colA 2          
  scale
  msg V1(Y) for IY=3 (WHITE-Phoenics, YELLOW - Elcut) ...
  plot 1 2                                                                      
  pause 
   
  clear
  data 1                                                                          
  V1 Z 8 Y 1 21                                                                   
  col1 1          
  data 3                                                                          
  r dy 
  colA 2          
  scale
  msg V1(Y) for IY=8 (WHITE-Phoenics, YELLOW - Elcut) ...
  plot 1 2                                                                      
  pause 
   
  clear
  data 1                                                                          
  V1 Z 14 Y 1 21                                                                   
  col1 1          
  data 4                                                                          
  r dy 
  colA 2          
  scale
  msg V1(Y) for IY=14 (WHITE-Phoenics, YELLOW - Elcut) ...
  plot 1 2                                                                      
  pause 
   
   
  ENDUSE
  
   
 ************************************************************
  Group 1. Run Title and Number
 ************************************************************
READQ1=T
  begin_readq1 
 TEXT(Pressurised cylinder [R,Z] with Hole
 
  Declarations and settings
  
REAL(PI,PO,RI,RO,LZ,POISSON,YOUNG) 
PI=1.e7  ! inner pressure 
PO=1.e6 ! outer pressure 

RI=0.2   ! inner radius
RO=0.8   ! outer radius
LZ = 1
YOUNG   = 1/(0.5E-11) ! Young's modulus
POISSON=0.3           ! Poisson's ratio

integer(nycyl)

  Grid settings
NX=1
NYCYL=20 
NZ=20
  **** !!! ***
ISG59 = 1
  
 ************************************************************
 
 ************************************************************
  Group 2. Time dependence
 STEADY  =    T
 ************************************************************
  Group 3. X-Direction Grid Spacing
 CARTES  =    F
 XULAST  = 0.5
 GRDPWR(X,NX,XULAST,1)
 ************************************************************
  Group 4. Y-Direction Grid Spacing
 NREGY=3                              ! 3 regions
 IREGY=1;GRDPWR(Y,1,RI,1.0)           ! single inner fluid cell
 IREGY=2;GRDPWR(Y,NYCYL,RO-RI,1)      ! ncyl solid cells
 IREGY=3;GRDPWR(Y,1,0.01*RO,1.0)      ! single outer fluid cell 
 ************************************************************
  Group 5. Z-Direction Grid Spacing
 ZWLAST  = LZ
 GRDPWR(Z,NZ,LZ,1.0)
 
 ************************************************************
  Group 7. Variables: STOREd,SOLVEd,NAMEd
 ONEPHS  =    T
 SOLVE(P1,V1,W1)
 STORE(P1TH,PRPS,DEN1,ENUL,DVO1,DRH1)    ! TH means theoretical
 STORE(STRX,EPSX,STRY)
 STORE(EPSY,STRZ,EPSZ)

 ************************************************************
  GROUP 8. ITERATION NUMBERS ETC
 RESFAC=1.e-7 

 RESREF(V1)=0.0  ! to prevent premature exit
 LITER(V1) = 100 ! from solver
 RESREF(W1)=0.0; LITER(W1) = 100
 ************************************************************
  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 
  68     1.0       1.E+20    1000.0  0.0       0        0
 
 ************************************************************
  GROUP 11. INITIAL VALUES
FIINIT(PRPS)=160

PATCH(POUT,INIVAL,1,1,NY,NY,1,NZ,1,1)
INIT(POUT,PRPS,FIXVAL,0)
PATCH(PIN,INIVAL,1,1,1,1,1,NZ,1,1)
INIT(PIN,PRPS,FIXVAL,0)
PATCH(PHOLE,INIVAL,1,1,2,11,5,10,1,1)
INIT(PHOLE,PRPS,FIXVAL,0)


  -----------------------------------
PATCH(INNER1,CELL,1,1,1,1,1,NZ,1,1)
COVAL(INNER1,P1,FIXVAL,PI)
COVAL(INNER1,W1,FIXVAL,0)

PATCH(INNER2,CELL,1,1,2,11,5,9,1,1)
COVAL(INNER2,W1,FIXVAL,0)

PATCH(INNER3,CELL,1,1,1,10,5,10,1,1)
COVAL(INNER3,V1,FIXVAL,0)

PATCH(INNER,CELL,1,1,2,11,5,10,1,1)
COVAL(INNER,P1,FIXVAL,PI)
 
PATCH(OUTER,CELL,1,1,NY,NY,1,NZ,1,1)
COVAL(OUTER,P1,FIXVAL,PO)
COVAL(OUTER,W1,FIXVAL,0)

 ************************************************************
  GROUP 13. BOUNDARY & SPECIAL SOURCES
 
PATCH(Z01,LOW,1,1,2,NY-1,1,1,1,1)
COVAL(Z01,W1,FIXVAL,0.0)

PATCH(Z02,HIGH,1,1,2,NY-1,NZ-1,NZ-1,1,1)
COVAL(Z02,W1,FIXVAL,0.0)

 SPEDAT(BOUNDARY,XCONST,R,1.E20) ! because total angle is fixed

 ************************************************************
  GROUP 15. TERMINATE SWEEPS
 LSWEEP  =  400
 ISG21   =  LSWEEP
 ENDIT(V1) =0.0
 RESREF(V1)=0.0                                   
 ENDIT(u1) =0.0
 RESREF(u1)=0.0                                   
 ************************************************************
  GROUP 17. RELAXATION
#CONPROM
 ************************************************************
  GROUP 19. DATA TRANSMITTED TO GROUND
 STRA    =    T
 ************************************************************
  GROUP 23.FIELD PRINT-OUT & PLOT CONTROL
TSTSWP = - 1   ! graphic-mode
ISG52   =    3   !   probe & res



output(den1,n,n,n,n,n,n)  
output(drh1,n,n,n,n,n,n)  
output(dvo1,n,n,n,n,n,n)  
output(enul,n,n,n,n,n,n)  
  output(prps,n,n,n,n,n,n)  

NYPRIN=1
NZPRIN=1
IXMON = 1
IYMON = NY-1
IZMON = NZ/2

ISG52   =    3   !   probe & res
STOP