1 "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
3 :link(lws,http://lammps.sandia.gov)
5 :link(lc,Section_commands.html#comm)
13 This doc page is not about a LAMMPS input script command, but about
14 body particles, which are generalized finite-size particles.
15 Individual body particles can represent complex entities, such as
16 surface meshes of discrete points, collections of sub-particles,
17 deformable objects, etc. Note that other kinds of finite-size
18 spherical and aspherical particles are also supported by LAMMPS, such
19 as spheres, ellipsoids, line segments, and triangles, but they are
20 simpler entities that body particles. See "Section
21 6.14"_Section_howto.html#howto_14 for a general overview of all
24 Body particles are used via the "atom_style body"_atom_style.html
25 command. It takes a body style as an argument. The current body
26 styles supported by LAMMPS are as follows. The name in the first
27 column is used as the {bstyle} argument for the "atom_style
28 body"_atom_style.html command.
30 {nparticle} | rigid body with N sub-particles |
31 {rounded/polygon} | 2d convex polygon with N vertices :tb(c=2,s=|)
33 The body style determines what attributes are stored for each body and
34 thus how they can be used to compute pairwise body/body or
35 bond/non-body (point particle) interactions. More details of each
36 style are described below.
38 NOTE: The rounded/polygon style listed in the table above and
39 described below has not yet been relesed in LAMMPS. It will be soon.
41 We hope to add more styles in the future. See "Section
42 10.12"_Section_modify.html#mod_12 for details on how to add a new body
47 [When to use body particles:]
49 You should not use body particles to model a rigid body made of
50 simpler particles (e.g. point, sphere, ellipsoid, line segment,
51 triangular particles), if the interaction between pairs of rigid
52 bodies is just the summation of pairwise interactions between the
53 simpler particles. LAMMPS already supports this kind of model via the
54 "fix rigid"_fix_rigid.html command. Any of the numerous pair styles
55 that compute interactions between simpler particles can be used. The
56 "fix rigid"_fix_rigid.html command time integrates the motion of the
57 rigid bodies. All of the standard LAMMPS commands for thermostatting,
58 adding constraints, performing output, etc will operate as expected on
61 By contrast, when body particles are used, LAMMPS treats an entire
62 body as a single particle for purposes of computing pairwise
63 interactions, building neighbor lists, migrating particles between
64 processors, outputting particles to a dump file, etc. This means that
65 interactions between pairs of bodies or between a body and non-body
66 (point) particle need to be encoded in an appropriate pair style. If
67 such a pair style were to mimic the "fix rigid"_fix_rigid.html model,
68 it would need to loop over the entire collection of interactions
69 between pairs of simple particles within the two bodies, each time a
70 single body/body interaction was computed.
72 Thus it only makes sense to use body particles and develop such a pair
73 style, when particle/particle interactions are more complex than what
74 the "fix rigid"_fix_rigid.html command can already calculate. For
75 example, if particles have one or more of the following attributes:
77 represented by a surface mesh
78 represented by a collection of geometric entities (e.g. planes + spheres)
80 internal stress that induces fragmentation :ul
82 then the interaction between pairs of particles is likely to be more
83 complex than the summation of simple sub-particle interactions. An
84 example is contact or frictional forces between particles with planar
85 sufaces that inter-penetrate.
87 These are additional LAMMPS commands that can be used with body
88 particles of different styles
90 "fix nve/body"_fix_nve_body.html : integrate motion of a body particle in NVE ensemble
91 "fix nvt/body"_fix_nvt_body.html : ditto for NVT ensemble
92 "fix npt/body"_fix_npt_body.html : ditto for NPT ensemble
93 "fix nph/body"_fix_nph_body.html : ditto for NPH ensemble
94 "compute body/local"_compute_body_local.html : store sub-particle attributes of a body particle
95 "compute temp/body"_compute_temp_body.html : compute temperature of body particles
96 "dump local"_dump.html : output sub-particle attributes of a body particle
97 "dump image"_dump_image.html : output body particle attributes as an image :tb(s=:)
99 The pair styles defined for use with specific body styles are listed
100 in the sections below.
104 [Specifics of body style nparticle:]
106 The {nparticle} body style represents body particles as a rigid body
107 with a variable number N of sub-particles. It is provided as a
108 vanillia, prototypical example of a body particle, although as
109 mentioned above, the "fix rigid"_fix_rigid.html command already
110 duplicates its functionality.
112 The atom_style body command for this body style takes two additional
115 atom_style body nparticle Nmin Nmax
116 Nmin = minimum # of sub-particles in any body in the system
117 Nmax = maximum # of sub-particles in any body in the system :pre
119 The Nmin and Nmax arguments are used to bound the size of data
120 structures used internally by each particle.
122 When the "read_data"_read_data.html command reads a data file for this
123 body style, the following information must be provided for each entry
124 in the {Bodies} section of the data file:
128 ixx iyy izz ixy ixz iyz
133 N is the number of sub-particles in the body particle. M = 6 + 3*N.
134 The integer line has a single value N. The floating point line(s)
135 list 6 moments of inertia followed by the coordinates of the N
136 sub-particles (x1 to zN) as 3N values. These values can be listed on
137 as many lines as you wish; see the "read_data"_read_data.html command
140 The 6 moments of inertia (ixx,iyy,izz,ixy,ixz,iyz) should be the
141 values consistent with the current orientation of the rigid body
142 around its center of mass. The values are with respect to the
143 simulation box XYZ axes, not with respect to the prinicpal axes of the
144 rigid body itself. LAMMPS performs the latter calculation internally.
145 The coordinates of each sub-particle are specified as its x,y,z
146 displacement from the center-of-mass of the body particle. The
147 center-of-mass position of the particle is specified by the x,y,z
148 values in the {Atoms} section of the data file, as is the total mass
149 of the body particle.
151 The "pair_style body"_pair_body.html command can be used with this
152 body style to compute body/body and body/non-body interactions.
154 For output purposes via the "compute
155 body/local"_compute_body_local.html and "dump local"_dump.html
156 commands, this body style produces one datum for each of the N
157 sub-particles in a body particle. The datum has 3 values:
159 1 = x position of sub-particle
160 2 = y position of sub-particle
161 3 = z position of sub-particle :pre
163 These values are the current position of the sub-particle within the
164 simulation domain, not a displacement from the center-of-mass (COM) of
165 the body particle itself. These values are calculated using the
166 current COM and orientation of the body particle.
168 For images created by the "dump image"_dump_image.html command, if the
169 {body} keyword is set, then each body particle is drawn as a
170 collection of spheres, one for each sub-particle. The size of each
171 sphere is determined by the {bflag1} parameter for the {body} keyword.
172 The {bflag2} argument is ignored.
176 [Specifics of body style rounded/polygon:]
178 NOTE: Aug 2016 - This body style has not yet been added to LAMMPS.
179 The info below is a placeholder.
181 The {rounded/polygon} body style represents body particles as a convex
182 polygon with a variable number N > 2 of vertices, which can only be
183 used for 2d models. One example use of this body style is for 2d
184 discrete element models, as described in "Fraige"_#Fraige. Similar to
185 body style {nparticle}, the atom_style body command for this body
186 style takes two additional arguments:
188 atom_style body rounded/polygon Nmin Nmax
189 Nmin = minimum # of vertices in any body in the system
190 Nmax = maximum # of vertices in any body in the system :pre
192 The Nmin and Nmax arguments are used to bound the size of data
193 structures used internally by each particle.
195 When the "read_data"_read_data.html command reads a data file for this
196 body style, the following information must be provided for each entry
197 in the {Bodies} section of the data file:
201 ixx iyy izz ixy ixz iyz
208 N is the number of vertices in the body particle. M = 6 + 3*N + 2*N +
209 1. The integer line has a single value N. The floating point line(s)
210 list 6 moments of inertia followed by the coordinates of the N
211 vertices (x1 to zN) as 3N values, followed by 2N vertex indices
212 corresponding to the end points of the N edges, followed by a single
213 radius value = the smallest circle encompassing the polygon. That
214 last value is used to facilitate the body/body contact detection.
215 These floating-point values can be listed on as many lines as you
216 wish; see the "read_data"_read_data.html command for more details.
218 The 6 moments of inertia (ixx,iyy,izz,ixy,ixz,iyz) should be the
219 values consistent with the current orientation of the rigid body
220 around its center of mass. The values are with respect to the
221 simulation box XYZ axes, not with respect to the prinicpal axes of the
222 rigid body itself. LAMMPS performs the latter calculation internally.
223 The coordinates of each vertex are specified as its x,y,z displacement
224 from the center-of-mass of the body particle. The center-of-mass
225 position of the particle is specified by the x,y,z values in the
226 {Atoms} section of the data file.
228 For example, the following information would specify a square
229 particles whose edge length is sqrt(2):
241 The "pair_style body/rounded/polygon"_pair_body_rounded_polygon.html
242 command can be used with this body style to compute body/body
245 For output purposes via the "compute
246 body/local"_compute_body_local.html and "dump local"_dump.html
247 commands, this body style produces one datum for each of the N
248 sub-particles in a body particle. The datum has 3 values:
250 1 = x position of vertex
251 2 = y position of vertex
252 3 = z position of vertex :pre
254 These values are the current position of the vertex within the
255 simulation domain, not a displacement from the center-of-mass (COM) of
256 the body particle itself. These values are calculated using the
257 current COM and orientation of the body particle.
259 For images created by the "dump image"_dump_image.html command, if the
260 {body} keyword is set, then each body particle is drawn as a convex
261 polygon consisting of N line segments. Note that the line segments
262 are drawn between the N vertices, which does not correspond exactly to
263 the physical extent of the body (because the "pair_style
264 rounded/polygon"_pair_body_rounded_polygon.cpp defines finite-size
265 spheres at those point and the line segments between the spheres are
266 tangent to the spheres). The drawn diameter of each line segment is
267 determined by the {bflag1} parameter for the {body} keyword. The
268 {bflag2} argument is ignored.
273 [(Fraige)] F. Y. Fraige, P. A. Langston, A. J. Matchett, J. Dodds,
274 Particuology, 6, 455 (2008).