CalculiXの接触問題でマルチCPUの性能をテストする

接触解析サンプルのモデル図

こちらにある接触問題のサンプルで、CalculiXで使用しているSPOOLES(連立方程式ソルバ)の性能をテストしてみました。

CalculiXの並列計算に関する記述は以下です。
https://www.xsim.info/articles/CalculiX/ccx-doc/node3.html

1CPUで計算した結果と4CPUで計算した結果は以下のとおり。

1CPU4CPU
real0m21.924s0m13.749s
user0m19.113s0m28.569s
sys0m0.643s0m1.096s

実行時間で4CPUの方が1.6倍ほど速い結果となっています。
「user」が1CPUより4CPUの数値が大きくなっているのはCPU数分の数値を合算している為です。
「sys」は何故でしょう?
4CPUの方がDisk I/O が多いのでしょうか。

接触解析サンプルの結果図

◼️1CPU
Using up to 1 cpu(s) for the stress calculation.

Using up to 1 cpu(s) for the symmetric stiffness/mass contributions.

Factoring the system of equations using the symmetric spooles solver
Using up to 1 cpu(s) for spooles.

Using up to 1 cpu(s) for the stress calculation.
average force= 16.144929
time avg. forc= 12.096706
largest residual force= 0.000454 in node 1756 and dof 2
largest increment of disp= 1.282442e-01
largest correction to disp= 9.891491e-06 in node 609 and dof 2

convergence

the increment size exceeds the remainder of the step and is decreased to 0.000000e+00
Using up to 1 cpu(s) for the stress calculation.

Job finished

real 0m21.924s
user 0m19.113s
sys 0m0.643s

◼️4CPU
Using up to 4 cpu(s) for the stress calculation.

Using up to 4 cpu(s) for the symmetric stiffness/mass contributions.

Factoring the system of equations using the symmetric spooles solver
Using up to 4 cpu(s) for spooles.

Using up to 4 cpu(s) for the stress calculation.
average force= 16.144929 time avg. forc= 12.096706
largest residual force= 0.000454 in node 1756 and dof 2
largest increment of disp= 1.282442e-01
largest correction to disp= 9.891491e-06 in node 609 and dof 2

convergence

the increment size exceeds the remainder of the step and is decreased to 0.000000e+00
Using up to 4 cpu(s) for the stress calculation.

Job finished

real 0m13.749s
user 0m28.569s
sys 0m1.096s

AEiでCalculiXのBoltサンプルの荷重を変化させて歪みが一定値を超える荷重を得る

CalculiX は強力な非線形ソルバーなので、容易に静的な荷重を斬増させて非線形解析することができます。

解析コード本体で荷重を増加させていくことが可能なのですが、今回はAEi(Analysis Execution interpreter)を使って外部から静的な加力荷重を変化させて、歪みがある一定の数値を超える荷重値を調べます。

以下では、外力を0.1ずつ増加させ、歪み(Exx)が 5.0E-5 を超える荷重値を得るというデモです。

AEI and CalculiX Bolt Sample

上記は外力を線形に増加させただけですが、後処理に小さなプログラムを用意すれば、後段の解析に結果を受け渡しながら連続的に解析を実行することも可能です。

また、等価線形解析機能がないソルバーの結果を読み込んで前回解析との差分から後段解析の物性値を作成するプログラムを用意すれば、外部で等価線形解析を実施することも可能です。