Hello,
I am trying to simulate a system of rounded squares. I have a couple of confusions regarding the example of the same given in the LAMMPS documentation. (How to body?)
Given the edge length sort(2) and rounded diameter 1.0, izz =0.97. Is any value more than this is acceptable? izz is set as 4 in the example.
Also, should the value of M be exactly or at least greater than 6+3N+1 where N is the number of vertices.
Thanks in advance!
I_zz has to be the moment of inertia in z-direction (of the body coordinate system, IIRC). It has to be computed and provided explicitly, since it cannot be inferred from just the vertices and the edge diameter. It is impossible to make a statement about the value of a single component of the inertia vector by itself and without the context of the exact shape and orientation of the entire object.
Exact, of course. It would otherwise confuse the parser and it would try to read data that from the next body particle and then error out.
In retrospect, it might be helpful to revise the example of rounded square in the documentation that I was referring to. Just to avoid such confusions.
Please note that requests like this one are not very helpful either. If you are asking for changes to the documentation, you need - at the very least - propose specific changes or - even better - submit a pull request with changes to the LAMMPS github page.
The manual is precise and to the point in the section you refer to. We cannot anticipate any misinterpretation from users like you did. A modification may reduce your confusion, but may confuse others more.
For example, the following information would specify a square particle whose edge length is sqrt(2) and rounded diameter is 1.0. The orientation of the square is aligned with the xy coordinate axes which is consistent with the 6 moments of inertia: ixx iyy izz ixy ixz iyz = 1 1 4 0 0 0. Note that only Izz matters in 2D simulations.
3 1 27
4
1 1 4 0 0 0
-0.7071 -0.7071 0
-0.7071 0.7071 0
0.7071 0.7071 0
0.7071 -0.7071 0
1.0
I suppose the value of M and I_zz are not right in here. Or am I miscalculating?
Of course, they are there, but (rather obviously) the given value of M (=27) is not consistent with the example: 6 + 3*4 + 1 = 19
I will correct the manual.
Please also see the example file in examples/body/data.square. Unlike the text in the manual, the examples are run and thus must be consistent with the implementation.