*HEADING
ELBOW31 elements without ovalization modes
*restart,write
************************
*** PARAMETER DEFINITION
************************
*PARAMETER
a                 = 10.0   # length a of the straight sections
bend_radius       = 4.0    # radius of the curved section (bend)
outer_pipe_radius = 0.5    # outer radius of the pipe
wall_thick        = 0.08   # wall thickness of the pipe
num_elem_s        = 25     # number of elements along the straight sections of the pipe
num_elem_c        = 25     # number of elements around the bend
disp              = 1.0    # displacement at the end of the pipe
young             = 28.1E6 # Young's modulus
poisson           = 0.0    # Poisson's ratio 
nip_thru_thick    =  5     # number of integration points through the thickness
nip_around_pipe   = 20     # number of integration points around the pipe
numoval           =  0     # number of ovalization modes
#
#    total number of elements along the length of the pipe
#
num_elem = num_elem_c + 2*num_elem_s 
#
#####################################################################
#
#    geometrical properties of the problem: points along pipe c/l   
# 
x1 = a + bend_radius
y1 = 0.
x2 = a + bend_radius
y2 = a  
x3 = a
y3 = a + bend_radius
x4 = 0.
y4 = a + bend_radius
#
x1_plus_100 = x1 + 100.0
y4_plus_100 = y4 + 100.0
#
#    node control data
#
ninc          =  1
n1            =  1
n1_plus_inc   = n1 + ninc
n2            = n1 + num_elem_s*ninc
n3            = n2 + num_elem_c*ninc
n4            = n3 + num_elem_s*ninc
#
ndummy        = n4 + 1000
#
#    element control data
#
einc          =  1
e1            =  1
e2            = e1          + (num_elem_s-1)*einc 
e2_plus_inc   = e2          + einc
e3            = e2_plus_inc + (num_elem_c-1)*einc
e3_plus_inc   = e3          + einc
e4            = e3_plus_inc + (num_elem_s-1)*einc
#
# END OF PARAMETER SECTION
#
#*******************
#** Node definitions 
#*******************
*NODE
<ndummy>,<a>,<a>,0.
*NODE	
<n1>,<x1>,<y1>
<n2>,<x2>,<y2>
<n3>,<x3>,<y3>
<n4>,<x4>,<y4>
*NGEN,NSET=straight_1
<n1>,<n2>,<ninc>
****
*NGEN,line=c,nset=curved
<n2>,<n3>,<ninc>,<ndummy>,<a>,<a>,0.
****
*NGEN,NSET=straight_2
<n3>,<n4>,<ninc>
*NSET,NSET=all_nodes
straight_1,curved,straight_2
**
**********************
** Material definition
**********************
*MATERIAL,NAME=pipe
*ELASTIC
<young>,<poisson>
**************************
** Element data definition 
**************************
*ELEMENT,TYPE=elbow31                       
<e1>,<n1>,<n1_plus_inc>
*ELGEN,ELSET=all_elem
<e1>,<num_elem>,<ninc>,<einc>
*ELSET,ELSET=straight1,GENERATE
<e1>,<e2>,<einc>
*ELSET,ELSET=curved,GENERATE
<e2_plus_inc>,<e3>,<einc>
*ELSET,ELSET=straight2,GENERATE
<e3_plus_inc>,<e4>,<einc>
**************************
** Element definition
**************************
*BEAM SECTION,SECTION=elbow,ELSET=straight1,MATERIAL=PIPE
<outer_pipe_radius>, <wall_thick>, 0.
<x1_plus_100>,<y1>
<nip_thru_thick>,<nip_around_pipe>,<numoval>
*BEAM SECTION,SECTION=elbow,ELSET=straight2,MATERIAL=PIPE
<outer_pipe_radius>, <wall_thick>, 0.
<y4>,<y4_plus_100>
<nip_thru_thick>,<nip_around_pipe>,<numoval>
*BEAM SECTION,SECTION=elbow,ELSET=curved,MATERIAL=PIPE
<outer_pipe_radius>, <wall_thick>, <bend_radius>
<x1>,<y4>
<nip_thru_thick>,<nip_around_pipe>,<numoval>
**********************
** Boundary conditions
**********************
*BOUNDARY
<n1>,ysymm
<n1>,nowarp
<n1>,nooval
<n1>,3
<n4>,xsymm
<n4>,nowarp
<n4>,nooval
<n4>,3
**********************
*STEP,nlgeom
Apply displacements at the ends of the structure
*STATIC
1.,1.
*BOUNDARY
<n1>,1,1,<disp>
<n4>,2,2,<disp>
*NODE PRINT,NSET=all_nodes, FREQ=9999
u,
rf,
*NODE FILE,NSET=all_nodes, FREQ=9999
u,
rf,
*el file,elset=curved,f=999
coord,
*END STEP