more changes to new polygon/hedron docs and command names

This commit is contained in:
Steven J. Plimpton
2018-07-18 08:49:42 -06:00
parent de69e24551
commit 843b96e8dd
8 changed files with 81 additions and 92 deletions

View File

@ -664,6 +664,8 @@ USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT.
"vector"_fix_vector.html, "vector"_fix_vector.html,
"viscosity"_fix_viscosity.html, "viscosity"_fix_viscosity.html,
"viscous"_fix_viscous.html, "viscous"_fix_viscous.html,
"wall/body/polygon"_fix_wall_body_polygon.html,
"wall/body/polyhedron"_fix_wall_body_polyhedron.html,
"wall/colloid"_fix_wall.html, "wall/colloid"_fix_wall.html,
"wall/gran"_fix_wall_gran.html, "wall/gran"_fix_wall_gran.html,
"wall/gran/region"_fix_wall_gran_region.html, "wall/gran/region"_fix_wall_gran_region.html,
@ -914,7 +916,9 @@ KOKKOS, o = USER-OMP, t = OPT.
"airebo (oi)"_pair_airebo.html, "airebo (oi)"_pair_airebo.html,
"airebo/morse (oi)"_pair_airebo.html, "airebo/morse (oi)"_pair_airebo.html,
"beck (go)"_pair_beck.html, "beck (go)"_pair_beck.html,
"body"_pair_body.html, "body/nparticle"_pair_body_nparticle.html,
"body/rounded/polygon"_pair_body_rounded/polygon.html,
"body/rounded/polyhedron"_pair_body_rounded/polyhedron.html,
"bop"_pair_bop.html, "bop"_pair_bop.html,
"born (go)"_pair_born.html, "born (go)"_pair_born.html,
"born/coul/dsf"_pair_born.html, "born/coul/dsf"_pair_born.html,

View File

@ -286,12 +286,10 @@ polyhedron with a variable number of N vertices, E edges and F faces.
This style can only be used for 3d models; see the This style can only be used for 3d models; see the
"boundary"_boundary.html command. See the "pair_style "boundary"_boundary.html command. See the "pair_style
body/rounded/polygon" doc page for a diagram of a two 2d squares with body/rounded/polygon" doc page for a diagram of a two 2d squares with
rounded circles at the vertices. A 3d cube with rounded spheres rounded circles at the vertices. A 3d cube with rounded spheres at
at the 8 vertices and 12 rounded edges would be similar. the 8 vertices and 12 rounded edges would be similar. Special cases
for N = 1 (sphere) and N = 2 (rod with rounded ends) can also be
TRUNG: What are the special cases allowed for 3d, if any? Similar to specified.
the N=1 (sphere) and N=2 (rod) special cases for 2d, descibed in
previous section.
This body style is for 3d discrete element models, as described in This body style is for 3d discrete element models, as described in
"Wang"_#Wang. "Wang"_#Wang.

View File

@ -10,21 +10,21 @@ pair_style body command :h3
[Syntax:] [Syntax:]
pair_style body cutoff :pre pair_style body/nparticle cutoff :pre
cutoff = global cutoff for interactions (distance units) cutoff = global cutoff for interactions (distance units)
[Examples:] [Examples:]
pair_style body 3.0 pair_style body/nparticle 3.0
pair_coeff * * 1.0 1.0 pair_coeff * * 1.0 1.0
pair_coeff 1 1 1.0 1.5 2.5 :pre pair_coeff 1 1 1.0 1.5 2.5 :pre
[Description:] [Description:]
Style {body} is for use with body particles and calculates pairwise Style {body/nparticle} is for use with body particles and calculates
body/body interactions as well as interactions between body and pairwise body/body interactions as well as interactions between body
point-particles. See "Section 6.14"_Section_howto.html#howto_14 and point-particles. See "Section 6.14"_Section_howto.html#howto_14
of the manual and the "body"_body.html doc page for more details on of the manual and the "body"_body.html doc page for more details on
using body particles. using body particles.

View File

@ -28,11 +28,11 @@ pair_coeff 1 1 100.0 1.0 :pre
Style {body/rounded/polygon} is for use with 2d models of body Style {body/rounded/polygon} is for use with 2d models of body
particles of style {rounded/polygon}. It calculates pairwise particles of style {rounded/polygon}. It calculates pairwise
body/body interactions as well as interactions between body and point body/body interactions which can include body particles modeled as
particles (modeled as disks with a specified diameter). 1-vertex circular disks with a specified diameter. See "Section
See "Section 6.14"_Section_howto.html#howto_14 of the 6.14"_Section_howto.html#howto_14 of the manual and the
manual and the "body"_body.html doc page for more details on using "body"_body.html doc page for more details on using body
body rounded/polygon particles. rounded/polygon particles.
This pairwise interaction between rounded polygons is described in This pairwise interaction between rounded polygons is described in
"Fraige"_#Fraige, where a polygon does not have sharp corners, but is "Fraige"_#Fraige, where a polygon does not have sharp corners, but is
@ -51,8 +51,21 @@ between two particles are defined with respect to the separation of
their respective rounded surfaces, not by the separation of the their respective rounded surfaces, not by the separation of the
vertices and edges themselves. vertices and edges themselves.
This means that the specified cutoff in the pair_style command is This means that the specified cutoff in the pair_style command is the
the cutoff distance, r_c, for the surface separation, \delta_n (see figure below). cutoff distance, r_c, for the surface separation, \delta_n (see figure
below). This is the distance at which two particles no longer
interact. If r_c is specified as 0.0, then it is a contact-only
interaction. I.e. the two particles must overlap in order to exert a
repulsive force on each other. If r_c > 0.0, then the force between
two particles will be attractive for surface separations from 0 to
r_c, and repulsive once the particles overlap.
Note that unlike for other pair styles, the specified cutoff is not
the distance between the centers of two particles at which they stop
interacting. This center-to-center distance depends on the shape and
size of the two particles and their relative orientation. LAMMPS
takes that into account when computing the surface separation distance
and applying the r_c cutoff.
The forces between vertex-vertex, vertex-edge, and edge-edge overlaps The forces between vertex-vertex, vertex-edge, and edge-edge overlaps
are given by: are given by:
@ -61,25 +74,10 @@ are given by:
:c,image(JPG/pair_body_rounded.jpg) :c,image(JPG/pair_body_rounded.jpg)
TRUNG: The diagram label "cohesive regions" confuses me. Are you Note that F_n and F_t are functions of the surface separation \delta_n
saying there is some distance d for which the force is attractive, = d - (R_i + R_j). In this model, when (R_i + R_j) < d < (R_i + R_j)
i.e. the particles are cohesive? I think when d > Ri + Rj, since Ri + + r_c, that is, 0 < \delta_n < r_c, the cohesive region of the two
Rj is the surface/surface overlap discussed above? If so, then the surfaces overlap and the two surfaces are attractive to each other.
discussion above about the specified cutoff is wrong? I.e. you can
specify a large cutoff than the surface/surface overlap to get
cohesive interactions? If so, this should be explained up above.
But an additional confusion is that the specied cutoff (Rc in diagram?)
is a single number, but depedning on the orientiation of the 2
particles they might have a suface/surface overlap at a much
smaller value of Ri + Rj. So what is Rc then? - I added
the following paragraph to address this.
Note that F_n and F_t are functions of the surface separation
\delta_n = d - (R_i + R_j).
In this model, when (R_i + R_j) < d < (R_i + R_j) + r_c, that is,
0 < \delta_n < r_c, the cohesive region of the two surfaces overlap
and the two surfaces are attractive to each other.
In "Fraige"_#Fraige, the tangential friction force between two In "Fraige"_#Fraige, the tangential friction force between two
particles that are in contact is modeled differently prior to gross particles that are in contact is modeled differently prior to gross
@ -92,7 +90,6 @@ contact nor calculate the tangential deformation. Instead, we assume
that gross sliding takes place as soon as two particles are in that gross sliding takes place as soon as two particles are in
contact. contact.
The following coefficients must be defined for each pair of atom types The following coefficients must be defined for each pair of atom types
via the "pair_coeff"_pair_coeff.html command as in the examples above, via the "pair_coeff"_pair_coeff.html command as in the examples above,
or in the data file read by the "read_data"_read_data.html command: or in the data file read by the "read_data"_read_data.html command:
@ -101,12 +98,8 @@ k_n (energy/distance^2 units)
k_na (energy/distance^2 units) :ul k_na (energy/distance^2 units) :ul
Effectively, k_n and k_na are the slopes of the red lines in the plot Effectively, k_n and k_na are the slopes of the red lines in the plot
above for force versus surface separation, for \delta_n < 0 and 0 < \delta_n < r_c above for force versus surface separation, for \delta_n < 0 and 0 <
respectively. (TRUNG: is this sentence correct? - it should read delta_n, \delta_n < r_c respectively.
instead of r)
TRUNG: reminder to copy any change in this file
to the pair polyhedron file as well (and vice versa)
[Mixing, shift, table, tail correction, restart, rRESPA info]: [Mixing, shift, table, tail correction, restart, rRESPA info]:

View File

@ -28,28 +28,11 @@ pair_coeff 1 1 100.0 1.0 :pre
Style {body/rounded/polygon} is for use with 3d models of body Style {body/rounded/polygon} is for use with 3d models of body
particles of style {rounded/polyhedron}. It calculates pairwise particles of style {rounded/polyhedron}. It calculates pairwise
body/body interactions as well as interactions between body and body/body interactions which can include body particles modeled as
point-particles (modeled as spheres with a specified diameter). 1-vertex spheres with a specified diameter. See "Section
See "Section 6.14"_Section_howto.html#howto_14 of 6.14"_Section_howto.html#howto_14 of the manual and the
the manual and the "body"_body.html doc page for more details on using "body"_body.html doc page for more details on using body
body rounded/polyhedron particles. rounded/polyhedron particles.
TRUNG: I think we need a paragraph here about how body/sphere
interactions are handled. Does this pair style only do body/body but
allow for a body = sphere or rod or some other degenerate case? Or
does this pair style allow you to model a simulation of mixed body and
point particles, where point particles are spheroids. If so, does
this pair style do body/body and body/point, and you use one of the
other granular pair styles to do point/point? I.e. a pair hybrid
model? Or does everything have to be defined as bodies. Actually
this paragraph would make more sense in the body.txt file about how to
create a model that includes non-body particles (spheres). And in
this pair style file just a couple lines about which part of the
interactions this pair style computes. Ditto in the pair body polygon
file. - The pair style supports body/sphere and sphere/sphere
given that all the atoms should be of body rounded/polyhedron.
I updated the above paragraph and added examples in body.txt for
specifying the special objects (i.e. spheres and rods).
This pairwise interaction between the rounded polyhedra is described in This pairwise interaction between the rounded polyhedra is described in
"Wang"_#Wang, where a polyhedron does not have sharp corners and "Wang"_#Wang, where a polyhedron does not have sharp corners and
@ -61,7 +44,6 @@ in the data file read by the "read data"_read_data.html command. This
is a discrete element model (DEM) which allows for multiple contact is a discrete element model (DEM) which allows for multiple contact
points. points.
Note that when two particles interact, the effective surface of each Note that when two particles interact, the effective surface of each
polyhedron particle is displaced outward from each of its vertices, polyhedron particle is displaced outward from each of its vertices,
edges, and faces by half its sphere diameter. The interaction forces edges, and faces by half its sphere diameter. The interaction forces
@ -69,8 +51,21 @@ and energies between two particles are defined with respect to the
separation of their respective rounded surfaces, not by the separation separation of their respective rounded surfaces, not by the separation
of the vertices, edges, and faces themselves. of the vertices, edges, and faces themselves.
This means that the specified cutoff in the pair_style command is This means that the specified cutoff in the pair_style command is the
the cutoff distance, r_c, for the surface separation, \delta_n (see figure below). cutoff distance, r_c, for the surface separation, \delta_n (see figure
below). This is the distance at which two particles no longer
interact. If r_c is specified as 0.0, then it is a contact-only
interaction. I.e. the two particles must overlap in order to exert a
repulsive force on each other. If r_c > 0.0, then the force between
two particles will be attractive for surface separations from 0 to
r_c, and repulsive once the particles overlap.
Note that unlike for other pair styles, the specified cutoff is not
the distance between the centers of two particles at which they stop
interacting. This center-to-center distance depends on the shape and
size of the two particles and their relative orientation. LAMMPS
takes that into account when computing the surface separation distance
and applying the r_c cutoff.
The forces between vertex-vertex, vertex-edge, vertex-face, edge-edge, The forces between vertex-vertex, vertex-edge, vertex-face, edge-edge,
and edge-face overlaps are given by: and edge-face overlaps are given by:
@ -97,9 +92,8 @@ k_n (energy/distance^2 units)
k_na (energy/distance^2 units) :ul k_na (energy/distance^2 units) :ul
Effectively, k_n and k_na are the slopes of the red lines in the plot Effectively, k_n and k_na are the slopes of the red lines in the plot
above for force versus surface separation, for \delta_n < 0 and 0 < \delta_n < r_c above for force versus surface separation, for \delta_n < 0 and 0 <
respectively. (TRUNG: is this sentence correct? - it should read delta_n, \delta_n < r_c respectively.
instead of r)
[Mixing, shift, table, tail correction, restart, rRESPA info]: [Mixing, shift, table, tail correction, restart, rRESPA info]:

View File

@ -8,7 +8,7 @@ read_data data.body
velocity all create 1.44 87287 loop geom velocity all create 1.44 87287 loop geom
pair_style body 5.0 pair_style body/nparticle 5.0
pair_coeff * * 1.0 1.0 pair_coeff * * 1.0 1.0
neighbor 0.5 bin neighbor 0.5 bin

View File

@ -15,7 +15,7 @@
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include "pair_body.h" #include "pair_body_nparticle.h"
#include "math_extra.h" #include "math_extra.h"
#include "atom.h" #include "atom.h"
#include "atom_vec_body.h" #include "atom_vec_body.h"
@ -32,7 +32,7 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
PairBody::PairBody(LAMMPS *lmp) : Pair(lmp) PairBodyNparticle::PairBodyNparticle(LAMMPS *lmp) : Pair(lmp)
{ {
dmax = nmax = 0; dmax = nmax = 0;
discrete = NULL; discrete = NULL;
@ -44,7 +44,7 @@ PairBody::PairBody(LAMMPS *lmp) : Pair(lmp)
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
PairBody::~PairBody() PairBodyNparticle::~PairBodyNparticle()
{ {
memory->destroy(discrete); memory->destroy(discrete);
memory->destroy(dnum); memory->destroy(dnum);
@ -66,7 +66,7 @@ PairBody::~PairBody()
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
void PairBody::compute(int eflag, int vflag) void PairBodyNparticle::compute(int eflag, int vflag)
{ {
int i,j,ii,jj,inum,jnum,itype,jtype; int i,j,ii,jj,inum,jnum,itype,jtype;
int ni,nj,npi,npj,ifirst,jfirst; int ni,nj,npi,npj,ifirst,jfirst;
@ -336,7 +336,7 @@ void PairBody::compute(int eflag, int vflag)
allocate all arrays allocate all arrays
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
void PairBody::allocate() void PairBodyNparticle::allocate()
{ {
allocated = 1; allocated = 1;
int n = atom->ntypes; int n = atom->ntypes;
@ -361,7 +361,7 @@ void PairBody::allocate()
global settings global settings
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
void PairBody::settings(int narg, char **arg) void PairBodyNparticle::settings(int narg, char **arg)
{ {
if (narg != 1) error->all(FLERR,"Illegal pair_style command"); if (narg != 1) error->all(FLERR,"Illegal pair_style command");
@ -381,7 +381,7 @@ void PairBody::settings(int narg, char **arg)
set coeffs for one or more type pairs set coeffs for one or more type pairs
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
void PairBody::coeff(int narg, char **arg) void PairBodyNparticle::coeff(int narg, char **arg)
{ {
if (narg < 4 || narg > 5) if (narg < 4 || narg > 5)
error->all(FLERR,"Incorrect args for pair coefficients"); error->all(FLERR,"Incorrect args for pair coefficients");
@ -415,12 +415,12 @@ void PairBody::coeff(int narg, char **arg)
init specific to this pair style init specific to this pair style
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
void PairBody::init_style() void PairBodyNparticle::init_style()
{ {
avec = (AtomVecBody *) atom->style_match("body"); avec = (AtomVecBody *) atom->style_match("body");
if (!avec) error->all(FLERR,"Pair body requires atom style body"); if (!avec) error->all(FLERR,"Pair body/nparticle requires atom style body");
if (strcmp(avec->bptr->style,"nparticle") != 0) if (strcmp(avec->bptr->style,"nparticle") != 0)
error->all(FLERR,"Pair body requires body style nparticle"); error->all(FLERR,"Pair body/nparticle requires body style nparticle");
bptr = (BodyNparticle *) avec->bptr; bptr = (BodyNparticle *) avec->bptr;
neighbor->request(this,instance_me); neighbor->request(this,instance_me);
@ -430,7 +430,7 @@ void PairBody::init_style()
init for one type pair i,j and corresponding j,i init for one type pair i,j and corresponding j,i
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
double PairBody::init_one(int i, int j) double PairBodyNparticle::init_one(int i, int j)
{ {
if (setflag[i][j] == 0) { if (setflag[i][j] == 0) {
epsilon[i][j] = mix_energy(epsilon[i][i],epsilon[j][j], epsilon[i][j] = mix_energy(epsilon[i][i],epsilon[j][j],
@ -459,7 +459,7 @@ double PairBody::init_one(int i, int j)
store sub-particle space-frame displacements from COM in discrete list store sub-particle space-frame displacements from COM in discrete list
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
void PairBody::body2space(int i) void PairBodyNparticle::body2space(int i)
{ {
int ibonus = atom->body[i]; int ibonus = atom->body[i];
AtomVecBody::Bonus *bonus = &avec->bonus[ibonus]; AtomVecBody::Bonus *bonus = &avec->bonus[ibonus];

View File

@ -13,21 +13,21 @@
#ifdef PAIR_CLASS #ifdef PAIR_CLASS
PairStyle(body,PairBody) PairStyle(body/nparticle,PairBodyNparticle)
#else #else
#ifndef LMP_PAIR_BODY_H #ifndef LMP_PAIR_BODY_NPARTICLE_H
#define LMP_PAIR_BODY_H #define LMP_PAIR_BODY_NPARTICLE_H
#include "pair.h" #include "pair.h"
namespace LAMMPS_NS { namespace LAMMPS_NS {
class PairBody : public Pair { class PairBodyNparticle : public Pair {
public: public:
PairBody(class LAMMPS *); PairBodyNparticle(class LAMMPS *);
~PairBody(); ~PairBodyNparticle();
void compute(int, int); void compute(int, int);
void settings(int, char **); void settings(int, char **);
void coeff(int, char **); void coeff(int, char **);