wall/gran은 아래와 같이 per atom array를 제공한다고 한다.
https://docs.lammps.org/fix_wall_gran.html
fix wall/gran command — LAMMPS documentation
Bound the simulation domain of a granular system with a frictional wall. All particles in the group interact with the wall when they are close enough to touch it. The nature of the wall/particle interactions are determined by the fstyle setting. It can be
docs.lammps.org
If the contacts option is used, this fix generates a per-atom array with at least 8 columns as output, containing the contact information for owned particles (nlocal on each processor). All columns in this per-atom array will be zero if no contact has occurred. The first 8 values of these columns are listed in the following table.
1 | 1.0 if particle is in contact with wall, 0.0 otherwise | |
2 | Force exerted by the wall | force units |
3 | Force exerted by the wall | force units |
4 | Force exerted by the wall | force units |
5 | -coordinate of contact point on wall | distance units |
6 | -coordinate of contact point on wall | distance units |
7 | -coordinate of contact point on wall | distance units |
8 | Radius of atom | distance units |
wall/gran은 fix style로 만들어 지니까, 출력 형태를 보기 위해 variable로 가서 봤는데,
https://docs.lammps.org/variable.html
variable command — LAMMPS documentation
Math operators (), -x, x+y, x-y, x*y, x/y, x^y, x%y, x == y, x != y, x < y, x <= y, x > y, x >= y, x && y, x || y, x |^ y, !x Math functions sqrt(x), exp(x), ln(x), log(x), abs(x), sin(x), cos(x), tan(x), asin(x), acos(x), atan(x), atan2(y,x), random(x,y,z
docs.lammps.org
The allowed fix references in variable formulas for equal-, vector-, and atom-style variables are listed in the following table:
equal | f_ID | global scalar |
equal | f_ID[I] | element of global vector |
equal | f_ID[I][J] | element of global array |
equal | F_ID[I] | element of per-atom vector (I = atom ID) |
equal | F_ID[I][J] | element of per-atom array (I = atom ID) |
vector | f_ID | global vector |
vector | f_ID[I] | column of global array |
atom | f_ID | per-atom vector |
atom | f_ID[I] | column of per-atom array |
Note that if an equal-style variable formula wishes to access per-atom data from a fix, it must use capital “F” as the ID prefix and not lower-case “f”.
per-atom array는 F_ID[][]라고 해서 했는데 안되더라.
그래서, lammps forum에서 찾은 예제를 해보니, 이런 스타일(f_ID[])을 추천함. 아 이거 뭐지?
fix bottom_plate all wall/gran hertz/history 4.98E10 6.4E10 50.0 30.0 0.5 1 &
zplane ${zmin} NULL contacts
dump 7 all custom 1000 dump*.contact f_bottom_plate[1] f_bottom_plate[2] f_bottom_plate[3] f_bottom_plate[4] &
f_bottom_plate[5] f_bottom_plate[6] f_bottom_plate[7] f_bottom_plate[8]
출력결과를 보면 또 array 이다.
ITEM: TIMESTEP
3998000
ITEM: NUMBER OF ATOMS
4
ITEM: BOX BOUNDS ff ff ff
-7.4999999999999997e-03 7.4999999999999997e-03
-7.4999999999999997e-03 7.4999999999999997e-03
-7.4999999999999997e-03 2.0000000000000000e-02
ITEM: ATOMS f_bottom_plate[1] f_bottom_plate[2] f_bottom_plate[3] f_bottom_plate[4] f_bottom_plate[5] f_bottom_plate[6] f_bottom_plate[7] f_bottom_plate[8]
1 -3.24063e-80 2.42896e-80 0.000277371 0.00176423 -0.00158717 -0.005 0.0015
1 -2.96449e-80 -8.34283e-80 0.000277371 -0.00107295 -0.00061227 -0.005 0.0015
1 0 0 0.000277371 -0.00257804 0.00285807 -0.005 0.0015
1 -2.68885e-80 -4.4491e-80 0.000277371 -0.00281007 -0.00309978 -0.005 0.0015
Atom은 4개이고 모두 바닥 wall에 닿아서 z 방향 힘이 발생하고 있다.
'LAMMPS' 카테고리의 다른 글
Local patch (0) | 2025.02.20 |
---|---|
NUMA Pinning with intelOneAPI (0) | 2025.02.19 |
특이한 에러 (0) | 2025.02.01 |
PyLAMMPS (0) | 2025.01.30 |
LAMMPS Intel build w/ Python module (0) | 2025.01.30 |