LIGGGHTS を使ってみる2012年1月6日 | |
はじめにDEM 解析ソルバー LIGGGHTS を使ってみる。 使用バージョンLIGGGHTS 1.5 ファイル入力ファイル入力ファイルのフォーマットLIGGGHTS は分子動力学ソルバー LAMMPS と下位互換性がある。したがって入力ファイルのフォーマットは LAMMPS に準じる。 入力はコマンド形式になっている。ファイルの上の行から順に実行される。したがって timestep 0.5 run 100 run 100と run 100 timestep 0.5 run 100では挙動が異なる。下はまずデフォルトの時間刻み幅で 100 ステップ計算が実行されることになる。 実行は以下のように行う。 $ mpirun -np 4 liggghts < in.box リダイレクトで入力するのでファイル名はなんでもよいが、"in.*" とする習慣があるらしい。 入力ファイルのコマンド例題の入力ファイルを 1 つずつ見て行こう (box.tar.gz の in.box)。 #box コメント。 atom_style granular 原子のタイプ。"atomic", "molecular" などが選べるが、DEM では "granular" を選ぶ。 atom_modify map array 原子の管理のしかた。 boundary m m m 境界タイプ。x, y, z 面それぞれに対して次のものが指定できる。
newton off Newton の第 3 法則の ON/OFF の切り替え。"off" だとプロセッサ間で原子の相互作用のやり取りをしないらしい。 echo both 入力コマンド出力の設定。スクリーンとログファイルに出力するかどうかの設定で、"none", "screen", "log", "both" が選べる。 communicate single vel yes プロセッサ間通信の設定。通信速度に関係するらしい。 units si 単位の設定。 region reg block -0.5 0.5 -0.5 0.5 -0.5 0.5 units box 箱領域の定義。 regin ID style args keyword value ...
create_box 1 reg 計算用箱の定義。 create_box N region-ID
neighbor 0.01 bin 隣接ペアリスト作成の設定。 neighbor skin style
neigh_modify delay 0 隣接ペアリスト作成のタイミングの設定。 delay N
fix m1 all property/global youngsModulus peratomtype 5e6 fix m2 all property/global poissonsRatio peratomtype 0.45 fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3 fix m4 all property/global coefficientFriction peratomtypepair 1 0.5 fix m5 all property/global characteristicVelocity scalar 2. 特性の設定。"peratomtype" は原子タイプごとに入れる指定らしい。原子タイプ数が 2 なら数値を 2 個入れる。 fix ID group-ID style args 各種設定。以降もいくつか出てくる。 pair_style gran/hooke/history 1 0 原子同士の作用の扱い方の設定。DEM の場合は "gran/hooke/history" を選ぶ。 pair_style gran/hooke/history friction_damp_flag cohesionflag pair_coeff * * 原子同士の力の係数の設定。パラメタ設定できるが、DEM の場合はこうしておく。 timestep 0.00001 時間刻み幅。 fix gravi all gravity 9.81 vector 0.0 0.0 -1.0 重力の設定。 fix boxwalls_x all wall/gran/hooke/history 1 0 xplane -0.5 0.5 1 fix boxwalls_y all wall/gran/hooke/history 1 0 yplane -0.5 0.5 1 fix boxwalls_z all wall/gran/hooke/history 1 0 zplane -0.5 0.5 1 壁の設定。 fix ID group-ID wall/gran/(*) friction_damp_flag cohesionflag wallstyle args kesyword values ...
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 2500 radius constant 0.015 fix pts2 all particletemplate/sphere 1 atom_type 1 density constant 2500 radius constant 0.025 粒子の設定。 fix ID group-ID particletemplate/sphere seed keyword values ...
fix pdd1 all particledistribution/discrete 1 2 pts1 0.3 pts2 0.7 粒子分布の設定。 fix ID group-ID particledistribution/discrete seed ntemp t_id t_m
上記の設定では pts1 と pts2 をそれぞれ質量分率で 3 : 7 の割合で入れる。 group nve_group region reg 原子のグループの作成。 group ID style args
region bc block -0.3 0.3 -0.3 0.3 0.4 0.5 units box 原子投入用の箱領域。 fix ins nve_group pour/dev mass 30. 1 distributiontemplate pdd1 vol 0.25 200 massflowrate 30. vel uniform 0. 0. 0. 0. 0.0 region bc 粒子投入設定。 fix ID group-ID pour/dev target_speficier target seed keyword values ...
fix integr nve_group nve/sphere 位置、速度、方向、各速度の更新のための積分実行の設定。 run 1 計算の実行。 run N
dump dmp all custom 500 post/dump.box id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius 出力設定。 dump ID group-ID style N file args
run 200000 upto run N upto
unfix ins fix の設定を無効にする。 計算結果。 ![]() STL ファイルの使用STL ファイルを使って壁条件を作ることもできる (box2.tar.gz の in.box)。 fix boxwalls all mesh/gran box.stl 1 1. 0. 0. 0. 0. 0. 0. STL を使う場合の壁の設定。 fix ID group-ID mesh/gran filename walltype scalarfactor xoff yoff zoff phix phiy phiz
fix wall all wall/gran/hooke/history 1 0 mesh/gran 1 boxwalls STL で用意した壁に対する条件の設定。 mesh/gran nfix fixi_d1 fix_id2 ...
壁の回転壁を回転させることもできる。 fix moveboxwalls all move/mesh/gran rotate 0. 0. 0. 0. 1. 0. 2. boxwalls 1. fix ID group-ID move/mesh/gran style args keyword values meshgran_id ssf rotate px py pz rx ry rz period
移動した壁を STL で出力させることができる。 dump dumpstl all stl 500 post/dump*.stl 計算結果。 ![]() | |
| PENGUINITIS | |