Axisymmetric stress analysis in Python

Overview

I improved the 2D stress analysis program and made an axisymmetric stress analysis program. Axisymmetric stress analysis is often used as a simple method for stress analysis around the casing of hydroelectric power plants and barrel concrete. The simple method means that analysis by a three-dimensional solid model is now being performed with the improvement of computer performance and the development of analysis methods, so it is positioned as a simple method compared to that.

program

The program is shown by a link to Gist.

Input data format

npoin  nele  nsec  npfix  nlod #Basic amount
E  po  alpha  gamma  gkz     #Material property
..... (1~nsec) .....
node1  node2  node3  node4  isec     #element-Nodal relationship, material property number
..... (1~nele) .....
z  r  deltaT                         #Nodal coordinates, nodal temperature changes
..... (1~npoin) .....
node  koz  kor  rdisz  rdisr         #Displacement constraint conditions
..... (1~npfix) .....
node  fz  fr                         #External force
..... (1~nlod) .....
npoin, nele, nsec Number of nodes, number of elements, number of material characteristics
npfix, nlod Number of constrained nodes, number of loaded nodes
E, po, alpha Elastic modulus, Poisson's ratio, coefficient of linear expansion
gamma, gkz Unit volume weight, z-direction acceleration (ratio of g)
z, r, delta T Node z coordinate, node r coordinate, node temperature change
node, koz, kor Constrain node number, z and r direction Constrained (constraint: 1, freedom: 0)
rdisz, rdisr z and r displacement (enter 0 even if unconstrained)
node, fz, fr Load node number, z-direction load, r-direction load

Output data format

npoin  nele  nsec npfix  nlod
   10     4     1     7     0
  sec               E              po           alpha           gamma             gkz
    1   2.0000000e+06   3.0000000e-01   1.0000000e-05   0.0000000e+00   0.0000000e+00
 node               z               r              fz              fr          deltaT   koz   kor
    1   0.0000000e+00   0.0000000e+00   0.0000000e+00   0.0000000e+00  -1.0000000e+01     1     1
    2   1.0000000e+00   0.0000000e+00   0.0000000e+00   0.0000000e+00  -1.0000000e+01     0     1
    3   2.0000000e+00   0.0000000e+00   0.0000000e+00   0.0000000e+00  -1.0000000e+01     0     1
    4   3.0000000e+00   0.0000000e+00   0.0000000e+00   0.0000000e+00  -1.0000000e+01     0     1
    5   4.0000000e+00   0.0000000e+00   0.0000000e+00   0.0000000e+00  -1.0000000e+01     1     1
    6   0.0000000e+00   1.0000000e+00   0.0000000e+00   0.0000000e+00  -1.0000000e+01     1     0
    7   1.0000000e+00   1.0000000e+00   0.0000000e+00   0.0000000e+00  -1.0000000e+01     0     0
    8   2.0000000e+00   1.0000000e+00   0.0000000e+00   0.0000000e+00  -1.0000000e+01     0     0
    9   3.0000000e+00   1.0000000e+00   0.0000000e+00   0.0000000e+00  -1.0000000e+01     0     0
   10   4.0000000e+00   1.0000000e+00   0.0000000e+00   0.0000000e+00  -1.0000000e+01     1     0
 node   kox   koy          rdis_z          rdis_r
    1     1     1   0.0000000e+00   0.0000000e+00
    2     0     1   0.0000000e+00   0.0000000e+00
    3     0     1   0.0000000e+00   0.0000000e+00
    4     0     1   0.0000000e+00   0.0000000e+00
    5     1     1   0.0000000e+00   0.0000000e+00
    6     1     0   0.0000000e+00   0.0000000e+00
   10     1     0   0.0000000e+00   0.0000000e+00
 elem     i     j     k     l   sec
    1     1     2     7     6     1
    2     2     3     8     7     1
    3     3     4     9     8     1
    4     4     5    10     9     1
 node           dis-z           dis-r
    1   0.0000000e+00   0.0000000e+00
    2  -1.5079475e-21   0.0000000e+00
    3  -6.6349691e-21   0.0000000e+00
    4   1.6651950e-20   0.0000000e+00
    5   0.0000000e+00   0.0000000e+00
    6   0.0000000e+00  -1.3000000e-04
    7  -4.9830486e-21  -1.3000000e-04
    8   2.0274556e-20  -1.3000000e-04
    9   1.2150518e-20  -1.3000000e-04
   10   0.0000000e+00  -1.3000000e-04
 elem           sig_z           sig_r           sig_t          tau_zr              p1              p2             ang
    1   2.0000000e+02   5.6843419e-14   6.3948846e-14  -1.1672750e-15   2.0000000e+02   5.6843419e-14   5.6843419e-14
    2   2.0000000e+02  -2.1316282e-14   1.7763568e-15  -3.8487337e-15   2.0000000e+02  -2.8421709e-14  -2.8421709e-14
    3   2.0000000e+02  -1.0658141e-14  -8.8817842e-15   1.9212820e-14   2.0000000e+02   0.0000000e+00   0.0000000e+00
    4   2.0000000e+02   8.1712415e-14   9.2370556e-14   1.0166131e-14   2.0000000e+02   8.5265128e-14   8.5265128e-14
n=20  time=0.008 sec
node, dis-z, dis-r Node number, z-direction displacement, r-direction displacement
elme, sig_z, sig_r, sig_t, tau_zr Element number, z-direction direct stress, r-direction direct stress, rotational direction direct stress, shear stress
p1, p2, ang Direction of first principal stress, second principal stress, first principal stress in z-r plane
n, time total degrees of freedom, calculation time

that's all

Recommended Posts

Axisymmetric stress analysis in Python
Association analysis in Python
Regression analysis in Python
Simple regression analysis in Python
EEG analysis in Python: Python MNE tutorial
First simple regression analysis in Python
Planar skeleton analysis in Python (2) Hotfix
Axisymmetric stress analysis program by Python (square element) [revised edition]
Quadtree in Python --2
Python in optimization
CURL in python
Metaprogramming in Python
Python 3.3 in Anaconda
Geocoding in python
SendKeys in Python
Stress Test with Locust written in Python
Meta-analysis in Python
Unittest in python
Data analysis python
2D FEM stress analysis program with Python
Epoch in Python
Discord in Python
Sudoku in Python
DCI in Python
quicksort in python
nCr in python
N-Gram in Python
Programming in python
Plink in Python
Constant in python
Lifegame in Python.
FizzBuzz in Python
Sqlite in python
StepAIC in Python
N-gram in python
LINE-Bot [0] in Python
Csv in python
Disassemble in Python
Reflection in Python
Constant in python
nCr in Python.
format in python
Scons in Python3
Puyo Puyo in python
python in virtualenv
PPAP in Python
Residual analysis in Python (Supplement: Cochrane rules)
Quad-tree in Python
Reflection in Python
Chemistry in Python
Hashable in python
DirectLiNGAM in Python
LiNGAM in Python
Flatten in python
flatten in python
Survival time analysis learned in Python 2 -Kaplan-Meier estimator
Perform entity analysis using spaCy / GiNZA in Python
Data analysis in Python: A note about line_profiler
[Environment construction] Dependency analysis using CaboCha in Python 2.7
A well-prepared record of data analysis in Python
Sorted list in Python