線形応力解析 ( Stress Analysis )

線形応力解析の例を以下に示す.

  • 線形問題なので、外力がかかった際の変位を、構造物の変形を考えずにどの程度曲がるか( 十分小さくないと線形近似が破綻する )を計算している.

  • 非線形問題では、変形により負荷のかかり方も異なってくることが考慮に入る.

問題設定

問題としては、以下に示すような片持ち梁にかかる応力変形を計算する.

../../../_images/beam_model.png
  • 手前側の側面を固定とし、奥側の面を -z方向に 1 (tF) で引っ張ることを考える (境界条件).

  • 構造物は、ヤング率 200 (GPa)、ポアソン比 0.3 の材質( 構造鉄を意識 )からなるとする(材料条件).

片持ち梁を生成する gmsh-API python プログラム

gmsh-API pythonを利用した片持ち梁モデルの生成プログラム. 自分で作成した箱生成用関数を内部で利用している. 中身については、 gmsh もしくは github で解説されているはず.たぶん.

モデル生成
$ python beam.py
$ ElmerGrid 14 2 model.msh

変換中の数字は、( 14 : gmshの.mshファイル、 2 : ElmerMeshファイル4つを含んだディレクトリ )である.同ディレクトリに model というディレクトリができて、その中に model.header / model.element / model.node / model.boundary が生成されているはず.

片持ち梁生成用プログラム( beam.py )
 1import numpy as np
 2import sys
 3import gmsh
 4
 5gmshlib = "/Users/kent/gmsh/pygmshLibrary/"
 6sys.path.append( gmshlib )
 7import generateRectangularBox as box
 8
 9# ------------------------------------------------- #
10# --- [1] initialization of the gmsh            --- #
11# ------------------------------------------------- #
12gmsh.initialize()
13gmsh.option.setNumber( "General.Terminal", 1 )
14gmsh.model.add( "model" )
15
16# ------------------------------------------------- #
17# --- [2] initialize settings                   --- #
18# ------------------------------------------------- #
19ptsDim , lineDim , surfDim , voluDim  =  0,  1,  2,  3
20pts    , line    , surf    , volu     = {}, {}, {}, {}
21ptsPhys, linePhys, surfPhys, voluPhys = {}, {}, {}, {}
22lc                                    = 0.01
23
24# ------------------------------------------------- #
25# --- [3] Modeling                              --- #
26# ------------------------------------------------- #
27v0  = [    0.0,   0.0,   0.0   ]
28v1  = [    1.0,   0.0,   0.0   ]
29v2  = [    0.0,   0.1,   0.0   ]
30v3  = [    0.0,   0.0,   0.030 ]
31ret = box.generateRectangularBox( origin=v0, v1=v1, v2=v2, v3=v3, lc=lc )
32lft = ret["surfs"]["side2"]
33rgt = ret["surfs"]["side4"]
34bot = ret["surfs"]["bottom"]
35box = ret["volus"]["box"]
36
37# ------------------------------------------------- #
38# --- [4] Physical Grouping                     --- #
39# ------------------------------------------------- #
40gmsh.model.occ.synchronize()
41surfPhys["fixed"] = gmsh.model.addPhysicalGroup( surfDim, [ lft ], tag=201 )
42surfPhys["free" ] = gmsh.model.addPhysicalGroup( surfDim, [ rgt ], tag=202 )
43surfPhys["bot"  ] = gmsh.model.addPhysicalGroup( surfDim, [ bot ], tag=203 )
44voluPhys["box"  ] = gmsh.model.addPhysicalGroup( voluDim, [ box ], tag=301 )
45
46# ------------------------------------------------- #
47# --- [5] post process                          --- #
48# ------------------------------------------------- #
49gmsh.model.occ.synchronize()
50gmsh.model.mesh.generate(3)
51gmsh.write( "model.geo_unrolled" )
52gmsh.write( "model.msh" )
53gmsh.finalize()
54
  • 201 / 202 : 手前、及び、奥側のSurface

  • 301 : 梁のVolume

線形応力解析用のElmer入力ファイル ( .sif ファイル)

以下にElmer入力ファイルのサンプルを示す.

Elmer 線形応力解析 ( elastic_linear.sif )
 1
 2CHECK KEYWORDS "Warn"
 3
 4Header
 5  Mesh DB "." "model"
 6  Include Path ""
 7  Results Directory ""
 8End
 9
10Simulation
11  coordinate system = "Cartesian 3D"
12  Coordinate Mapping(3) = 1 2 3
13
14  Simulation Type = "Steady State"
15  Steady State Max Iterations = 20
16  
17  Solver Input File = "elastic_linear.sif"
18  Output File = "elastic_linear.dat"
19  Post File = "elastic_linear.vtu"
20End
21
22
23Constants
24  Gravity(4) = 0 0 -1 9.82
25End
26
27
28Body 1
29  Target Bodies(1) = 301
30  Name = "beam"
31
32  Equation = 1
33  Material = 1
34  Body Force = 1
35End
36
37
38Solver 1
39  Exec Solver   = "Always"
40  Equation      = "Stress Analysis"
41  Variable      = "Displacement"
42  Variable Dofs = 3
43  Linear System Solver = "Iterative"
44  Linear System Iterative Method = "BiCGStab"
45  Linear System Max Iterations = 10000
46  Linear System Convergence Tolerance = 1.0e-5
47  Linear System Preconditioning = "ILU0"
48  Steady State Convergence Tolerance = 1.0e-5
49End
50
51
52Equation 1
53  Name = "StressAnalysis"
54  Stress Analysis   = True
55  Calculate Stresses = Logical False
56End
57
58
59Material 1
60  Name           = "Iron_SS400"
61  Youngs Modulus = 200.0e9
62  Poisson Ratio  = 0.3
63End
64
65
66Body Force 1
67  Pressure = 5.0e4
68End
69
70
71Boundary Condition 1
72  Name = "Fixed_Surface"
73  Target Boundaries(1) = 202
74
75  Displacement 1 = 0
76  Displacement 2 = 0
77  Displacement 3 = 0
78End
79
80
81Boundary Condition 2
82  Name = "Load_Surface"
83  Target Boundaries(1) = 201
84  Force 3 = -1.00e4
85
86End
  • 最も重要な箇所は Equation Section の "Stress Analysis = True" の指定

線形応力解析の結果

解析実行と結果の表示は以下の通り.

解析実行と結果の表示
1$ ElmerSolver elastic_linear.sif
2$ paraview model/elastic_linear_t0001.vtu

結果は次のようになった.

../../../_images/elastic_linear_1tF_case.png

1 (m) の梁に対して、 0.17 (mm) 程度曲がっているらしい.x正方向に進むほどより大きな変位がある.カラーバー上では正値となっているのは、絶対値をとっているからであって、本来はz方向負側に曲がるはずである.曲がっているのか、よく見えないので、加える外力を増やしてみる.試しに 10 倍の 10 (tF) をかけてみる.結果は次のようになった.

../../../_images/elastic_linear_10tF_case.png

カラーバーが示す変位量が10倍の 1.7 (mm) になった.ちょっとぐらい曲がっているのだろうか.変位しているのかが、まだはっきりとはわからないので、さらに10倍の 100 (tF) をかけてみる.結果は次のようになった.

../../../_images/elastic_linear_100tF_case.png

また10倍の変位量となり、17 (mm) 曲がることがわかった. 根性がひねくれている人でも曲がっていることがはっきりわかるように軸をつけている. ここでは、 1 (m) の片持ち梁に 100 (tF) かけた構造鉄の変位量が 17 (mm) であるという答えを得たが、 17 (mm) は線形解析にとって無視できない変位量かもしれない.線形解析の適用範囲から逸脱し、この値が正しくない可能性があることを付記しておく.