***********************************************************************73
** COPYRIGHT 2012 ANTON SHTERENLIKHT. ALL RIGHTS RESERVED.
**
** REDISTRIBUTION AND USE IN SOURCE AND BINARY FORMS, WITH OR
** WITHOUT MODIFICATION, ARE PERMITTED PROVIDED THAT THE FOLLOWING
** CONDITIONS ARE MET:
**  1. REDISTRIBUTIONS OF SOURCE CODE MUST RETAIN THE ABOVE COPYRIGHT
**     NOTICE, THIS LIST OF CONDITIONS AND THE FOLLOWING DISCLAIMER.
**  2. REDISTRIBUTIONS IN BINARY FORM MUST REPRODUCE THE ABOVE
**     COPYRIGHT NOTICE, THIS LIST OF CONDITIONS AND THE FOLLOWING
**     DISCLAIMER IN THE DOCUMENTATION AND/OR OTHER MATERIALS
**     PROVIDED WITH THE DISTRIBUTION.
**
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY
** EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
** THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
** GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
***********************************************************************73
**
** 3D CANTILEVER PILLAR SIMULATING JAMES' EXPERIMENT.
**
**    MAIN VIEW
**
**       L3F---LEN----L3         L3-LEN1--LEN1-R3       R3----LEN------R3F
**         |          |           |            |         |             |
**         |          |           |            |         |             |
**    HT2  |          |           |            |         |             |
**         |          |           |            |         |             |
**         |          |           |            |         |             |
**       L2F----------L2         L2            R2       R2-------------R2F
**        /           |          /              \        |              \
**  HT1  /            |         /                \       |               \
**      /             |        /                  \      |                \
**     /              |       /                    \     |                 \
**    /               |      /                      \    |                  \
** L1F-----LEN2-------L1   L1----LEN3---|----LEN3----R1 R1-----LEN2----------R1F
**
**       X3  ^                      X3 ^                           ^ X3
**           | -> X1                   | -> X2               X1 <- |
**
***********************************************************************73
*HEADING
JAMES' PILLAR
*PREPRINT,MODEL=YES,CONTACT=YES
***********************************************************************73
*PARAMETER
# THE COMMENT LINES IN PARAMETER SECTION START WITH #.
# ===>>> THE PYTHON FUNCTIONS (E.G. int()) MUST BE IN LOWERCASE <<<===
#**********************************************************************73
# MODEL PHYSICAL DIMENSIONS, MICROMETRE!!
# LEN IS THE LENGTH ACROSS THE TOP OF THE PILLAR
LEN=1.25
# EXTRA IS BY HOW MUCH THE BASE IS BIGGER THEN LEN
EXTRA=2.5
# HT1 IS THE HEIGHT OF THE BASE PART
HT1=10.0
# HT2 IS THE HEIGHT OF THE MAIN PILLAR PART
HT2=14.0
# TOTAL HEIGHT OF THE PILLAR
HT=HT1+HT2
# DERIVED LENGTHS:
LEN1=LEN/2.0
LEN2=LEN + EXTRA
LEN3=LEN/2.0 + EXTRA
#**********************************************************************73
# DIAMETER OF THE LOADING CYLINDER
CYLRAD=LEN/2.0
# Y COORDINATE OF THE CYLINDER AXIS
CYLY=-LEN1 - CYLRAD
# VERTICAL COORDINATE OF THE CYLINDER AXIS
CYLZ=HT-1
#**********************************************************************73
# I'LL MAKE THE SAME NUMBER OF NODES/ELEMENTS ON THE TOP
# AND THE BOTTOM SURFACES. THEN THE TOPOLOGY WILL BE
# VERY SIMPLE - RECTANGULAR 3D GRID.
#**********************************************************************73
# LOAD MAGNITUDE, 1 KN
#**********************************************************************73
# ELEMENTS PER MICROMETRE *AT THE TOP*.
# AT THE BOTTOM THERE WILL BE THE SAME NUMBER OF ELEMENTS, SO
# LOWER DENSITY.
ELDENS=4.0
# ELEMENTS ALONG 1 OR 2 IN 12 PLANE
NELH=int(ELDENS*LEN)
# ELEMENTS ALONG 3 IN THE BOTTOM PART
NELV1=int(ELDENS*HT1)
# ELEMENTS ALONG 3 IN THE TOP PART
NELV2=int(ELDENS*HT2)
# TOTAL ELEMENTS ALONG 3
NELV=NELV1+NELV2
# TOTAL ELEMENTS IN BASE
ELB=NELH*NELH*NELV1
# FIRST ELEMENT IN TOP PART
ELT1=ELB+1
# LAST ELEMENT IN THE CONTACT FACE
ELTLAST=ELB+NELH*NELH*NELV2 - NELH + 1
#**********************************************************************73
# NODES ALONG 1 OR 2 IN 12 PLANE
NODESH=1+NELH
#**********************************************************************73
#
# NODES ARE NUMBERED FIRST ALONG 2, THEN ALONG 1, THEN ALONG 3.
# ORIGIN IS ALWAYS AT (0,0), HALF WAY BETWEEN L1 AND R1.
#
# NODES ON THE BOTTOM PLANE
#
# L1 IS THE START NODE
L1=1
R1=L1+NELH
L1F=L1 + NELH*NODESH
R1F=L1F+NELH
#
# INCREMENT IN NODE NUMBERS BETWEEN LAYERS
#
NVINC=NODESH*NODESH
#
# INCREMENT IN ELEMENT NUMBERS BETWEEN LAYERS
#
ELVINC=NELH*NELH
#
# NODES ON THE MID PLANE
#
L2=L1 + NELV1*NVINC
R2=L2+NELH
L2F=L2 + NELH*NODESH
R2F=L2F+NELH
#
# NODES ON THE TOP PLANE
#
L3=L2 + NELV2*NVINC
R3=L3+NELH
L3F=L3 + NELH*NODESH
R3F=L3F+NELH
#**********************************************************************73
# MESH BIAS
MBIAS = 0.98
#**********************************************************************73
# DERIVED PARAMETERS
#**********************************************************************73
# MASTER ELEMENT NODES, BOTTOM
ME1 = L1
ME2 = ME1 + 1
ME4 = ME1 + NODESH
ME3 = ME4 + 1
ME5 = ME1 + NVINC
ME6 = ME5 + 1
ME8 = ME5 + NODESH
ME7 = ME8 + 1
#**********************************************************************73
# END OF PARAMETER SECTION
#**********************************************************************73
** NODES
**
** MAIN NODES
**
*NODE
<L1>  ,   0.0   , -<LEN3>  ,  0.0
<R1>  ,   0.0   ,  <LEN3>  ,  0.0
<L1F> , -<LEN2> , -<LEN3>  ,  0.0
<R1F> , -<LEN2> ,  <LEN3>  ,  0.0
<L2>  ,   0.0   , -<LEN1>  , <HT1>
<R2>  ,   0.0   ,  <LEN1>  , <HT1>
<L2F> , -<LEN>  , -<LEN1>  , <HT1>
<R2F> , -<LEN>  ,  <LEN1>  , <HT1>
<L3>  ,   0.0   , -<LEN1>  , <HT>
<R3>  ,   0.0   ,  <LEN1>  , <HT>
<L3F> , -<LEN>  , -<LEN1>  , <HT>
<R3F> , -<LEN>  ,  <LEN1>  , <HT>
99999 , -<LEN>  ,  <CYLY>  , <CYLZ>
**
** GENERATED NODES
**
** BOTTOM NODES
**
*NGEN,NSET=FRONT1
<L1>, <R1>, 1
*NGEN,NSET=BACK1
<L1F>, <R1F>, 1
*NFILL,NSET=NODES1
FRONT1,BACK1,<NELH>,<NODESH>
**
** MID NODES
**
*NGEN,NSET=FRONT2
<L2>, <R2>, 1
*NGEN,NSET=BACK2
<L2F>, <R2F>, 1
*NFILL,NSET=NODES2
FRONT2,BACK2,<NELH>,<NODESH>
**
** TOP NODES
**
*NGEN,NSET=FRONT3
<L3>, <R3>, 1
*NGEN,NSET=BACK3
<L3F>, <R3F>, 1
*NFILL,NSET=NODES3
FRONT3,BACK3,<NELH>,<NODESH>
**
** BASE INTERMEDIATE NODES
**
*NFILL,NSET=NBASE
NODES1,NODES2,<NELV1>,<NVINC>
*NFILL,NSET=NPIL
NODES2,NODES3,<NELV2>,<NVINC>
**
** REF NODE FOR THE ANALYTICAL CYLINDER
**
*NSET,NSET=CYLBASE
***********************************************************************73
** ELEMENTS
**
*ELEMENT,TYPE=C3D8
<L1>,<ME1>,<ME2>,<ME3>,<ME4>,<ME5>,<ME6>,<ME7>,<ME8>
*ELGEN,ELSET=ALL
<L1>,<NELH>,1,1,<NELH>,<NODESH>,<NELH>,<NELV>,<NVINC>,<ELVINC>
*ELSET,ELSET=ELCON,GENERATE
<ELT1>,<ELTLAST>,<NELH>
***********************************************************************73
*MATERIAL,NAME=WONDER
*ELASTIC
1.5E5, 0.3
*SOLID SECTION,ELSET=ALL,MATERIAL=WONDER
***********************************************************************73
** LOADING CYLINDER
*SURFACE,TYPE=REVOLUTION,NAME=CYLINDER
-<LEN>,<CYLY>,<CYLZ>,<LEN>,<CYLY>,<CYLZ>
START,<CYLRAD>,<LEN2>
LINE,<CYLRAD>,-<LEN2>
*RIGID BODY,ANALYTICAL SURFACE=CYLINDER,REF NODE=CYLBASE
***********************************************************************73
** PILLAR CONTACT SURFACE
*SURFACE,TYPE=ELEMENT,NAME=PILLAR
ELCON
***********************************************************************73
** CONTACT PAIR
*SURFACE INTERACTION,NAME=THEONLY
*FRICTION
0
*CONTACT PAIR,INTERACTION=THEONLY,ADJUST=0.0
PILLAR,CYLINDER
***********************************************************************73
*BOUNDARY,TYPE=DISPLACEMENT,OP=MOD
NODES1,1,3
CYLBASE,1
CYLBASE,3,6
***********************************************************************73
*STEP,NLGEOM=YES
*STATIC
,1.0,,1.0E-1
*AMPLITUDE,NAME=PUSH,DEFINITION=TABULAR,TIME=TOTAL TIME,VALUE=RELATIVE,SMOOTH=.05
0.0,0.0, 1.0,1.0
***********************************************************************73
*BOUNDARY,TYPE=DISPLACEMENT,AMPLITUDE=PUSH
CYLBASE,2,2,3.0
***********************************************************************73
*OUTPUT,HISTORY,FREQUENCY=1
*NODE OUTPUT,NSET=CYLBASE
RF,U
*NODE PRINT,NSET=CYLBASE,TOTALS=NO,SUMMARY=NO
U2,RF2
********************************
*OUTPUT,FIELD,NUMBER INTERVAL=5
*NODE OUTPUT
U
*ELEMENT OUTPUT
LE,S
*END STEP