diff --git a/doc/src/Howto_bpm.rst b/doc/src/Howto_bpm.rst index af4c1d20a0..38ae021cc3 100644 --- a/doc/src/Howto_bpm.rst +++ b/doc/src/Howto_bpm.rst @@ -59,7 +59,7 @@ neighbors are included in the neighbor list. All bonded neighbors must be includ in neighbor lists as they could become unbonded at any timestep. Currently there are two types of bonds included in this package. The first -bond style, :doc:`bond bpm/simple `, only applies pairwise, +bond style, :doc:`bond bpm/spring `, only applies pairwise, central body forces. Point particles must have :doc:`bond atom style ` and may be thought of as nodes in a spring network. Alternatively, the second bond style, :doc:`bond bpm/rotational `, diff --git a/doc/src/Packages_details.rst b/doc/src/Packages_details.rst index e788da552d..2a2d9a2412 100644 --- a/doc/src/Packages_details.rst +++ b/doc/src/Packages_details.rst @@ -304,6 +304,7 @@ models for mesoscale simulations of solids and fracture. See the * :doc:`Howto_bpm ` * :doc:`atom_style sphere/bpm ` * :doc:`bond_style bpm/rotational ` +* :doc:`bond_style bpm/spring ` * :doc:`compute nbonds/atom ` * :doc:`fix nve/sphere/bpm ` * :doc:`fix update/special/bonds ` diff --git a/doc/src/bond_bpm_rotational.rst b/doc/src/bond_bpm_rotational.rst index 9ba2bb54c5..3fcc3d49ec 100644 --- a/doc/src/bond_bpm_rotational.rst +++ b/doc/src/bond_bpm_rotational.rst @@ -28,7 +28,7 @@ Examples .. code-block:: LAMMPS bond_style bpm/rotational - bond_coeff 1 + bond_coeff 1 1.0 0.2 0.02 0.02 0.20 0.04 0.04 0.04 0.1 0.02 0.002 0.002 bond_style bpm/rotational myfix time id1 id2 fix myfix all store/local 1000 3 diff --git a/doc/src/bond_bpm_spring.rst b/doc/src/bond_bpm_spring.rst new file mode 100644 index 0000000000..52954c4fd2 --- /dev/null +++ b/doc/src/bond_bpm_spring.rst @@ -0,0 +1,143 @@ +.. index:: bond_style bpm/spring + +bond_style bpm/spring command +========================== + +Syntax +"""""" + +.. code-block:: LAMMPS + + bond_style bpm/spring keyword value attribute1 attribute2 ... + +* optional keyword = *store/local* + + .. parsed-literal:: + + *store/local* values = ID of associated fix store/local followed by one or more attributes + + *id1, id2* = IDs of 2 atoms in the bond + *time* = the time the bond broke + *x, y, z* = the center of mass position of the 2 atoms when the bond broke + *x/ref, y/ref, z/ref* = the inintial center of mass position of the 2 atoms + + +Examples +"""""""" + +.. code-block:: LAMMPS + + bond_style bpm/spring + bond_coeff 1 1.0 0.05 0.1 + + bond_style bpm/spring myfix time id1 id2 + fix myfix all store/local 1000 3 + dump 1 all local 1000 dump.broken f_myfix[1] f_myfix[2] f_myfix[3] + dump_modify 1 write_header no + +Description +""""""""""" + +The *bpm/spring* bond style computes forces and torques based +on deviations from the initial reference state of the two atoms. +The reference state is stored by each bond when it is first computed +in the setup of a run. Data is then preserved across run commands and +is written to :doc:`binary restart files ` such that restarting +the system will not reset the reference state of a bond. + +This bond style only applies central-body forces which conserve the translational +and rotational degrees of freedom of a bonded set of particles. The force +has a magnitude of + +.. math:: + + f = k (r - r_0) w + +where :math:`k_r` is a stiffness, :math:`r` is the current distance and +:math:`r_0` is the initial distance between the two particles, and :math:`w` +is a smoothing factor. +Bonds will break at a strain of :math:`\epsilon_c`. +This is done by setting by setting its type to 0 such that forces are +no longer computed. +The smoothing factor :math:`w` is constructed such that forces smoothly +go to zero, avoiding discontinuities, as bonds approach the critical strain + +.. math:: + + w = 1.0 - \left( \frac{r - r_0}{r_0 \epsilon_c} \right^4 . + +Finally, additional damping forces and torques are applied to the two +particles. A force is applied proportional to the difference in the +normal velocity of particles using a similar construction as +dissipative particle dynamics (:ref:`(Groot) `): + +.. math:: + + F_D = - \gamma_n w (\hat{r} \bullet \vec{v}) + +where :math:`\gamma_n` is the damping strength, :math:`\hat{r}` is the +radial normal vector, and :math:`\vec{v}` is the velocity difference +between the two particles. + +The following coefficients must be defined for each bond type via the +:doc:`bond_coeff ` command as in the example above, or in +the data file or restart files read by the :doc:`read_data ` +or :doc:`read_restart ` commands: + +* :math:`k` (force/distance units) +* :math:`\epsilon_c` (unit less) +* :math:`\gamma` (force/velocity units) + +As bonds can be broken between neighbor list builds, particular +:doc:`special_bonds ` are required. See the `:doc: how to ` +page on BPMs or `:doc: fix update/special/bonds ` +for details. + +This bond style tracks broken bonds and can record them using an instance of +:doc:`fix store/local ` if the *store/local* keyword is +used followed by the ID of the fix and then a series of bond attributes. + +Note that when bonds are dumped to a file via the :doc:`dump local ` +command, bonds with type 0 (broken bonds) are not included. The +:doc:`delete_bonds ` command can also be used to query the +status of broken bonds or permanently delete them, e.g.: + +.. code-block:: LAMMPS + + delete_bonds all stats + delete_bonds all bond 0 remove + + +---------- + +Restart +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +This bond style writes the reference state of each bond to +:doc:`binary restart files `. Loading a restart +file will properly resume bonds. + +Restrictions +"""""""""""" + +This bond style can only be used if LAMMPS was built with the BPM +package. See the :doc:`Build package ` doc page for more +info. + +The *bpm/spring* style requires 1-3 and 1-4 :doc:`special_bonds ` +be turned off using the :doc:`special_bonds ` command. + +Related commands +"""""""""""""""" + +:doc:`bond_coeff `, :doc:`fix store/local ` + +Default +""""""" + +none + + +.. _Groot1: + +**(Groot)** Groot and Warren, J Chem Phys, 107, 4423-35 (1997). diff --git a/examples/bpm/impact/impact_bpm.lmp b/examples/bpm/impact/impact_rotational_bpm.lmp similarity index 89% rename from examples/bpm/impact/impact_bpm.lmp rename to examples/bpm/impact/impact_rotational_bpm.lmp index de975fb956..f79a72fd9f 100644 --- a/examples/bpm/impact/impact_bpm.lmp +++ b/examples/bpm/impact/impact_rotational_bpm.lmp @@ -1,12 +1,12 @@ units lj dimension 3 -boundary m m m +boundary f f f atom_style sphere/bpm special_bonds lj 0.0 1.0 1.0 coul 0.0 1.0 1.0 newton on off comm_modify vel yes cutoff 2.6 lattice fcc 1.0 -region box block -5 15 -20 20 -20 20 +region box block -25 15 -22 22 -22 22 create_box 1 box bond/types 2 extra/bond/per/atom 20 extra/special/per/atom 50 region disk cylinder x 0.0 0.0 20.0 -0.5 0.5 @@ -32,7 +32,6 @@ fix 3 all update/special/bonds create_bonds many plate plate 1 0.0 1.5 create_bonds many projectile projectile 2 0.0 1.5 -change_box all boundary s s s neighbor 0.3 bin special_bonds lj 0.0 1.0 1.0 coul 1.0 1.0 1.0 @@ -44,9 +43,10 @@ compute tbond all reduce sum c_nbond timestep 0.05 thermo_style custom step ke pe pxx pyy pzz c_tbond thermo 100 +thermo_modify lost ignore lost/bond ignore #dump 1 all custom 100 atomDump id radius x y z c_nbond dump 2 all local 100 brokenDump f_2[1] f_2[2] f_2[3] dump_modify 2 header no -run 10000 +run 7500 diff --git a/examples/bpm/impact/impact_spring_bpm.lmp b/examples/bpm/impact/impact_spring_bpm.lmp new file mode 100644 index 0000000000..09c474c61e --- /dev/null +++ b/examples/bpm/impact/impact_spring_bpm.lmp @@ -0,0 +1,54 @@ +units lj +dimension 3 +boundary f f f +atom_style bond +special_bonds lj 0.0 1.0 1.0 coul 0.0 1.0 1.0 +newton on off +comm_modify vel yes cutoff 2.6 +lattice fcc 1.0 +region box block -25 15 -22 22 -22 22 +create_box 1 box bond/types 2 extra/bond/per/atom 20 extra/special/per/atom 50 + +region disk cylinder x 0.0 0.0 20.0 -0.5 0.5 +create_atoms 1 region disk +group plate region disk + +region ball sphere 8.0 0.0 0.0 6.0 +create_atoms 1 region ball +group projectile region ball + +displace_atoms all random 0.1 0.1 0.1 134598738 + +mass 1 1.0 + +neighbor 1.0 bin +pair_style lj/cut 1.0 +bond_style bpm/spring store/local 2 time id1 id2 +pair_coeff 1 1 $(1/(18*PI)) $(2^(-1/6)) 1.0 +bond_coeff 1 1.0 0.04 1.0 +bond_coeff 2 1.0 0.20 1.0 + +fix 1 all nve +fix 2 all store/local 100 3 +fix 3 all update/special/bonds + +create_bonds many plate plate 1 0.0 1.5 +create_bonds many projectile projectile 2 0.0 1.5 + +neighbor 0.3 bin +special_bonds lj 0.0 1.0 1.0 coul 1.0 1.0 1.0 + +velocity projectile set -0.05 0.0 0.0 +compute nbond all nbond/atom +compute tbond all reduce sum c_nbond + +timestep 0.1 +thermo_style custom step ke pe pxx pyy pzz c_tbond +thermo 100 +thermo_modify lost ignore lost/bond ignore +#dump 1 all custom 100 atomDump id x y z c_nbond + +dump 2 all local 100 brokenDump f_2[1] f_2[2] f_2[3] +dump_modify 2 header no + +run 7500 diff --git a/examples/bpm/impact/log.30Jul2021.impact_rotational.g++1.4 b/examples/bpm/impact/log.30Jul2021.impact_rotational.g++1.4 new file mode 100644 index 0000000000..b81abac877 --- /dev/null +++ b/examples/bpm/impact/log.30Jul2021.impact_rotational.g++1.4 @@ -0,0 +1,215 @@ +LAMMPS (30 Jul 2021) +units lj +dimension 3 +boundary f f f +atom_style sphere/bpm +special_bonds lj 0.0 1.0 1.0 coul 0.0 1.0 1.0 +newton on off +comm_modify vel yes cutoff 2.6 +lattice fcc 1.0 +Lattice spacing in x,y,z = 1.5874011 1.5874011 1.5874011 +region box block -25 15 -22 22 -22 22 +create_box 1 box bond/types 2 extra/bond/per/atom 20 extra/special/per/atom 50 +Created orthogonal box = (-39.685026 -34.922823 -34.922823) to (23.811016 34.922823 34.922823) + 1 by 1 by 1 MPI processor grid + +region disk cylinder x 0.0 0.0 20.0 -0.5 0.5 +create_atoms 1 region disk +Created 7529 atoms + using lattice units in orthogonal box = (-39.685026 -34.922823 -34.922823) to (23.811016 34.922823 34.922823) + create_atoms CPU = 0.004 seconds +group plate region disk +7529 atoms in group plate + +region ball sphere 8.0 0.0 0.0 6.0 +create_atoms 1 region ball +Created 3589 atoms + using lattice units in orthogonal box = (-39.685026 -34.922823 -34.922823) to (23.811016 34.922823 34.922823) + create_atoms CPU = 0.002 seconds +group projectile region ball +3589 atoms in group projectile + +displace_atoms all random 0.1 0.1 0.1 134598738 +Displacing atoms ... + +neighbor 1.0 bin +pair_style gran/hooke/history 1.0 NULL 0.5 NULL 0.1 1 +bond_style bpm/rotational store/local 2 time id1 id2 +pair_coeff 1 1 +bond_coeff 1 1.0 0.2 0.02 0.02 0.05 0.01 0.01 0.01 0.1 0.02 0.002 0.002 +bond_coeff 2 1.0 0.2 0.02 0.02 0.20 0.04 0.04 0.04 0.1 0.02 0.002 0.002 + +fix 1 all nve/sphere/bpm +fix 2 all store/local 100 3 +fix 3 all update/special/bonds + +create_bonds many plate plate 1 0.0 1.5 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2 + ghost atom cutoff = 2.6 + binsize = 1, bins = 64 70 70 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command create_bonds, occasional + attributes: full, newton on + pair build: full/bin + stencil: full/bin/3d + bin: standard + (2) pair gran/hooke/history, perpetual + attributes: half, newton on, size, history + pair build: half/size/bin/newton + stencil: half/bin/3d + bin: standard +Added 38559 bonds, new total = 38559 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 1 1 + special bond factors coul: 0 1 1 + 15 = max # of 1-2 neighbors + 101 = max # of special neighbors + special bonds CPU = 0.007 seconds +create_bonds many projectile projectile 2 0.0 1.5 +Added 21869 bonds, new total = 60428 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 1 1 + special bond factors coul: 0 1 1 + 16 = max # of 1-2 neighbors + 101 = max # of special neighbors + special bonds CPU = 0.010 seconds + +neighbor 0.3 bin +special_bonds lj 0.0 1.0 1.0 coul 1.0 1.0 1.0 + +velocity projectile set -0.05 0.0 0.0 +compute nbond all nbond/atom +compute tbond all reduce sum c_nbond + +timestep 0.05 +thermo_style custom step ke pe pxx pyy pzz c_tbond +thermo 100 +thermo_modify lost ignore lost/bond ignore +#dump 1 all custom 100 atomDump id radius x y z c_nbond + +dump 2 all local 100 brokenDump f_2[1] f_2[2] f_2[3] +dump_modify 2 header no + +run 7500 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.3 + ghost atom cutoff = 2.6 + binsize = 0.65, bins = 98 108 108 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair gran/hooke/history, perpetual + attributes: half, newton on, size, history + pair build: half/size/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 39.18 | 39.18 | 39.18 Mbytes +Step KinEng PotEng Pxx Pyy Pzz c_tbond + 0 0.00053238861 0 3.8217307e-05 0 0 10.8703 + 100 0.00053238861 0 3.8217307e-05 3.7024766e-13 -2.6107956e-13 10.8703 + 200 0.00053238861 0 3.8217307e-05 -4.6764996e-13 5.7734804e-13 10.8703 + 300 0.00053238861 0 3.8217308e-05 -6.6404932e-13 -1.4463201e-13 10.8703 + 400 0.00053238861 0 3.8217307e-05 -1.5842255e-13 3.2646699e-14 10.8703 + 500 0.00053102307 0 3.6857657e-05 -5.0613842e-07 -4.5464639e-07 10.8703 + 600 0.00051549565 0 1.5836226e-05 -6.6250357e-06 -7.1458399e-06 10.868322 + 700 0.00050120381 0 -1.9467767e-05 -7.7209878e-06 -1.121158e-05 10.850333 + 800 0.00049861454 0 1.5365076e-05 5.214591e-06 2.7950985e-06 10.803742 + 900 0.00049582022 0 5.7445368e-05 -2.1846154e-05 -2.3927093e-05 10.738082 + 1000 0.00049342915 0 4.9596969e-05 -8.1907786e-06 -1.3269952e-05 10.688433 + 1100 0.00048639213 0 1.0822487e-05 3.9352339e-05 4.0409565e-05 10.667026 + 1200 0.000483091 0 3.8492853e-06 2.2015581e-05 3.1490077e-05 10.646159 + 1300 0.00047987023 0 5.8429983e-05 -7.8096854e-06 3.9318833e-06 10.631229 + 1400 0.00048104927 0 4.6603937e-05 -1.2320299e-05 -1.010841e-05 10.619536 + 1500 0.00047270384 0 -1.622772e-06 1.5996657e-05 1.5652658e-05 10.606944 + 1600 0.00045720595 0 1.64434e-06 1.0627449e-05 7.2901589e-06 10.597949 + 1700 0.00044826095 0 3.3113848e-05 -3.1886382e-05 -4.1076437e-05 10.584458 + 1800 0.00044859158 0 3.8589858e-05 -3.217135e-05 -4.4394932e-05 10.554236 + 1900 0.00044410417 0 1.6071124e-06 3.469787e-06 -1.172431e-05 10.528153 + 2000 0.00043690537 0 1.8298385e-05 3.2800463e-05 2.3766026e-05 10.49955 + 2100 0.00043113053 0 5.5169319e-05 1.0337577e-05 6.8334001e-06 10.449541 + 2200 0.00042795839 0 3.3555532e-05 -7.8682107e-06 1.4501739e-06 10.40277 + 2300 0.0004240013 0 8.8868452e-06 1.8196289e-06 2.755748e-05 10.362115 + 2400 0.00042426888 0 2.3953861e-05 1.7614888e-05 4.2827512e-05 10.340529 + 2500 0.00041903776 0 5.1969184e-05 2.5725967e-05 4.2229194e-05 10.324879 + 2600 0.00042070944 0 4.0633614e-05 2.6089786e-05 3.2212886e-05 10.313006 + 2700 0.00041907255 0 1.0826647e-05 2.7725133e-05 3.3535626e-05 10.301673 + 2800 0.00041823551 0 2.7757924e-05 1.462054e-05 1.629062e-05 10.288001 + 2900 0.00041833009 0 5.016926e-05 2.1116657e-06 -9.0474367e-06 10.276129 + 3000 0.0004200714 0 2.9312093e-05 8.0995894e-06 -1.427634e-05 10.266954 + 3100 0.00041930877 0 8.2905585e-06 2.5106255e-06 -6.0475079e-06 10.259039 + 3200 0.00042002824 0 2.7415565e-05 -2.5467008e-05 -1.1758229e-05 10.249146 + 3300 0.00041772304 0 4.7010143e-05 -3.2166248e-05 -2.3740064e-05 10.245728 + 3400 0.00041567147 0 2.265559e-05 -1.4994351e-05 -1.4387458e-05 10.244828 + 3500 0.00041264993 0 9.4675076e-06 -1.2940542e-05 -2.6164909e-06 10.243929 + 3600 0.00041296772 0 3.2135436e-05 -2.3723233e-05 -1.1358132e-05 10.243029 + 3700 0.00041218299 0 4.3546104e-05 -1.6744403e-05 -2.1466737e-05 10.240871 + 3800 0.00041196427 0 2.4626877e-05 8.2428335e-06 -9.6621514e-06 10.236913 + 3900 0.00041061174 0 1.5527454e-05 1.4796165e-05 8.5041818e-06 10.229718 + 4000 0.00041008163 0 3.6758236e-05 -4.1693239e-06 -2.3638032e-07 10.221083 + 4100 0.00040807476 0 4.2903311e-05 -8.7361319e-06 -9.2843568e-06 10.211909 + 4200 0.00040749974 0 2.1764542e-05 -1.5964475e-07 1.1116464e-06 10.205972 + 4300 0.00040585168 0 1.6398189e-05 -6.2081757e-07 1.4245018e-05 10.203454 + 4400 0.00040614156 0 3.8921994e-05 -1.0816449e-05 8.8070462e-06 10.198237 + 4500 0.00040550623 0 4.1195875e-05 -4.4468565e-06 -4.5109048e-06 10.19356 + 4600 0.00040471568 0 1.9924175e-05 8.0584659e-06 2.8014197e-06 10.186904 + 4700 0.00040443998 0 2.0848233e-05 7.2219213e-06 8.5736771e-06 10.182947 + 4800 0.00040411017 0 3.8995426e-05 -3.5139599e-06 -1.7346701e-06 10.17773 + 4900 0.00040369283 0 3.8616558e-05 -3.8837458e-07 -6.5227651e-06 10.174492 + 5000 0.00040347603 0 1.957792e-05 5.3591428e-06 5.0851337e-06 10.171074 + 5100 0.00040318 0 2.0628515e-05 -6.133528e-06 8.9227218e-06 10.166217 + 5200 0.00040396442 0 3.9097282e-05 -1.3317561e-05 -2.4599499e-06 10.158842 + 5300 0.00040420662 0 3.5316538e-05 -1.4346009e-06 -5.7802302e-06 10.154704 + 5400 0.00040419432 0 1.9706975e-05 6.6651292e-06 3.0821293e-06 10.148768 + 5500 0.00040500025 0 2.2492943e-05 -8.2260426e-06 4.6721228e-06 10.14463 + 5600 0.00040447185 0 3.8628198e-05 -8.844675e-06 -6.7043678e-07 10.143191 + 5700 0.00040435949 0 3.5236357e-05 5.3512632e-06 -2.9663861e-07 10.141752 + 5800 0.00040356839 0 1.8078404e-05 7.7468465e-06 4.1618489e-06 10.141045 + 5900 0.00040255066 0 2.5803838e-05 9.5521231e-07 3.4211797e-06 10.14251 + 6000 0.00040255799 0 3.8202776e-05 -3.5222942e-06 -7.4050996e-06 10.14233 + 6100 0.00040280742 0 3.0004475e-05 2.0612828e-06 -7.0155478e-06 10.14197 + 6200 0.00040180209 0 1.8453425e-05 2.5937959e-06 6.019204e-06 10.142703 + 6300 0.00040159364 0 2.6608078e-05 -3.4326767e-06 6.5089502e-06 10.142163 + 6400 0.00039963271 0 3.7746341e-05 -1.3954533e-06 -6.6816781e-06 10.143076 + 6500 0.0003995975 0 2.7758521e-05 6.370558e-06 -8.535581e-06 10.143076 + 6600 0.00039973428 0 1.8062746e-05 6.3493548e-06 1.2970441e-06 10.143076 + 6700 0.00039987367 0 2.7872598e-05 2.9794629e-07 3.1449123e-06 10.143988 + 6800 0.00039942046 0 3.6871697e-05 4.4181241e-07 -3.7266658e-06 10.146188 + 6900 0.00039937936 0 2.73304e-05 6.4090146e-06 1.1834424e-06 10.147835 + 7000 0.00039934517 0 2.0161434e-05 5.3875016e-06 1.141564e-05 10.147835 + 7100 0.00039884824 0 3.0603701e-05 7.327098e-07 5.1369462e-06 10.148402 + 7200 0.00039774709 0 3.5965545e-05 3.6906864e-06 -5.6506465e-06 10.148969 + 7300 0.00039642146 0 2.4883695e-05 7.2866197e-06 -8.2009411e-07 10.151379 + 7400 0.00039605388 0 2.0790699e-05 2.6616664e-06 1.1522615e-05 10.152321 + 7500 0.00039471805 0 3.0911798e-05 -4.6441697e-06 5.9470361e-06 10.154748 +Loop time of 114.934 on 1 procs for 7500 steps with 11089 atoms + +Performance: 281901.613 tau/day, 65.255 timesteps/s +99.7% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.2383 | 1.2383 | 1.2383 | 0.0 | 1.08 +Bond | 101.4 | 101.4 | 101.4 | 0.0 | 88.22 +Neigh | 2.7723 | 2.7723 | 2.7723 | 0.0 | 2.41 +Comm | 0.075342 | 0.075342 | 0.075342 | 0.0 | 0.07 +Output | 0.06732 | 0.06732 | 0.06732 | 0.0 | 0.06 +Modify | 9.1154 | 9.1154 | 9.1154 | 0.0 | 7.93 +Other | | 0.2695 | | | 0.23 + +Nlocal: 11089.0 ave 11089 max 11089 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 45554.0 ave 45554 max 45554 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 45554 +Ave neighs/atom = 4.1080350 +Ave special neighs/atom = 10.156101 +Neighbor list builds = 467 +Dangerous builds = 0 +Total wall time: 0:01:55 diff --git a/examples/bpm/impact/log.30Jul2021.impact_simple.g++1.4 b/examples/bpm/impact/log.30Jul2021.impact_simple.g++1.4 new file mode 100644 index 0000000000..adb843ba93 --- /dev/null +++ b/examples/bpm/impact/log.30Jul2021.impact_simple.g++1.4 @@ -0,0 +1,220 @@ +LAMMPS (30 Jul 2021) +units lj +dimension 3 +boundary f f f +atom_style bond +special_bonds lj 0.0 1.0 1.0 coul 0.0 1.0 1.0 +newton on off +comm_modify vel yes cutoff 2.6 +lattice fcc 1.0 +Lattice spacing in x,y,z = 1.5874011 1.5874011 1.5874011 +region box block -25 15 -22 22 -22 22 +create_box 1 box bond/types 2 extra/bond/per/atom 20 extra/special/per/atom 50 +Created orthogonal box = (-39.685026 -34.922823 -34.922823) to (23.811016 34.922823 34.922823) + 1 by 1 by 1 MPI processor grid + +region disk cylinder x 0.0 0.0 20.0 -0.5 0.5 +create_atoms 1 region disk +Created 7529 atoms + using lattice units in orthogonal box = (-39.685026 -34.922823 -34.922823) to (23.811016 34.922823 34.922823) + create_atoms CPU = 0.003 seconds +group plate region disk +7529 atoms in group plate + +region ball sphere 8.0 0.0 0.0 6.0 +create_atoms 1 region ball +Created 3589 atoms + using lattice units in orthogonal box = (-39.685026 -34.922823 -34.922823) to (23.811016 34.922823 34.922823) + create_atoms CPU = 0.002 seconds +group projectile region ball +3589 atoms in group projectile + +displace_atoms all random 0.1 0.1 0.1 134598738 +Displacing atoms ... + +mass 1 1.0 + +neighbor 1.0 bin +pair_style lj/cut 1.0 +bond_style bpm/spring store/local 2 time id1 id2 +pair_coeff 1 1 $(1/(18*PI)) $(2^(-1/6)) 1.0 +pair_coeff 1 1 0.017683882565766150669 $(2^(-1/6)) 1.0 +pair_coeff 1 1 0.017683882565766150669 0.89089871814033927411 1.0 +bond_coeff 1 1.0 0.04 1.0 +bond_coeff 2 1.0 0.20 1.0 + +fix 1 all nve +fix 2 all store/local 100 3 +fix 3 all update/special/bonds + +create_bonds many plate plate 1 0.0 1.5 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2 + ghost atom cutoff = 2.6 + binsize = 1, bins = 64 70 70 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) command create_bonds, occasional + attributes: full, newton on + pair build: full/bin + stencil: full/bin/3d + bin: standard + (2) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Added 38559 bonds, new total = 38559 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 1 1 + special bond factors coul: 0 1 1 + 15 = max # of 1-2 neighbors + 101 = max # of special neighbors + special bonds CPU = 0.006 seconds +create_bonds many projectile projectile 2 0.0 1.5 +WARNING: Communication cutoff 2.6 is shorter than a bond length based estimate of 2.799982026012842. This may lead to errors. (../comm.cpp:734) +Added 21869 bonds, new total = 60428 +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 1 1 + special bond factors coul: 0 1 1 + 16 = max # of 1-2 neighbors + 101 = max # of special neighbors + special bonds CPU = 0.008 seconds + +neighbor 0.3 bin +special_bonds lj 0.0 1.0 1.0 coul 1.0 1.0 1.0 + +velocity projectile set -0.05 0.0 0.0 +compute nbond all nbond/atom +compute tbond all reduce sum c_nbond + +timestep 0.1 +thermo_style custom step ke pe pxx pyy pzz c_tbond +thermo 100 +thermo_modify lost ignore lost/bond ignore +#dump 1 all custom 100 atomDump id x y z c_nbond + +dump 2 all local 100 brokenDump f_2[1] f_2[2] f_2[3] +dump_modify 2 header no + +run 7500 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.3 + ghost atom cutoff = 2.6 + binsize = 0.65, bins = 98 108 108 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 22.50 | 22.50 | 22.50 Mbytes +Step KinEng PotEng Pxx Pyy Pzz c_tbond + 0 0.0010167873 0 7.298968e-05 0 0 10.8703 + 100 0.0010167873 0 7.298968e-05 -8.7429897e-20 -8.8470837e-20 10.8703 + 200 0.0010167873 0 7.298968e-05 -7.2809565e-20 -8.0915788e-20 10.8703 + 300 0.0010019973 -5.3291343e-05 0.00010093361 8.6373038e-06 9.8886169e-06 10.862565 + 400 0.00096754254 -0.00013445443 0.00012114639 -1.0451037e-05 -1.3102312e-05 10.814535 + 500 0.00098230681 -0.0001559819 8.1573507e-05 1.0019714e-05 6.6044989e-06 10.765785 + 600 0.00099346016 -0.00021242987 7.8181991e-05 5.3246616e-06 6.7747639e-06 10.711999 + 700 0.00097743083 -0.00022519088 9.2593451e-05 -1.3368324e-05 -9.1024741e-06 10.683037 + 800 0.00097657062 -0.00025160598 7.6171833e-05 -3.6699488e-06 -3.156595e-06 10.648858 + 900 0.00096573642 -0.00030010781 7.221088e-05 2.7980135e-06 8.3953748e-06 10.602806 + 1000 0.00088967922 -0.00026225991 7.2273749e-05 -3.3180725e-06 1.7000133e-06 10.571429 + 1100 0.00086637472 -0.00028264644 6.1827699e-05 -2.5263518e-06 -8.804488e-07 10.550198 + 1200 0.00084322002 -0.00030067163 5.3193544e-05 -5.4186506e-06 -7.4414952e-07 10.528787 + 1300 0.00082546285 -0.00029621074 5.8387607e-05 -5.4986846e-07 2.1039469e-06 10.507017 + 1400 0.0008157657 -0.00031617563 5.8009972e-05 7.3256966e-06 4.560414e-06 10.481288 + 1500 0.00083393604 -0.00030638038 5.2255981e-05 1.4804765e-05 9.4914663e-06 10.451961 + 1600 0.00081285118 -0.00035496629 5.312358e-05 1.4502252e-05 1.3433953e-05 10.426849 + 1700 0.00078740406 -0.00034224637 5.0152957e-05 1.0822543e-05 1.1601587e-05 10.406767 + 1800 0.00076088167 -0.00039346684 5.0685628e-05 1.4591838e-05 6.8909935e-06 10.396831 + 1900 0.00073852613 -0.00040295897 4.9940437e-05 2.2598772e-06 -1.0055633e-05 10.381741 + 2000 0.00071844253 -0.00038465525 4.9242922e-05 -2.3157129e-05 -1.7381528e-05 10.36989 + 2100 0.00070212224 -0.00039396945 4.380536e-05 -3.3139297e-05 -2.5812742e-05 10.359806 + 2200 0.00068509947 -0.00038059464 4.1430464e-05 -2.8642858e-05 -3.0274798e-05 10.348131 + 2300 0.00066204726 -0.00037290268 4.0755035e-05 -2.4099531e-05 -2.31417e-05 10.341529 + 2400 0.00066390231 -0.00040132712 3.7909178e-05 -1.1313567e-05 -4.0596624e-06 10.325887 + 2500 0.00067466471 -0.00036822838 3.3769672e-05 8.9955187e-06 7.2249524e-06 10.307692 + 2600 0.00063522312 -0.00040169247 3.3473414e-05 1.7842262e-05 1.8667217e-05 10.294388 + 2700 0.00071914116 -0.00044796394 4.069137e-05 2.9483289e-05 4.2250507e-05 10.234934 + 2800 0.00070369013 -0.00044931969 3.1275752e-05 2.9033491e-05 3.9770684e-05 10.200721 + 2900 0.00070512114 -0.00042845959 3.0186471e-05 2.5771984e-05 2.4348678e-05 10.177838 + 3000 0.00069482317 -0.00044283829 3.3405984e-05 2.3415957e-05 2.2902999e-05 10.142896 + 3100 0.00066723285 -0.00047945243 3.209325e-05 1.0654925e-05 2.0497587e-05 10.122195 + 3200 0.00064836823 -0.00051480546 3.036046e-05 3.5029031e-06 1.1456758e-05 10.099135 + 3300 0.00062844846 -0.0005036651 2.8409131e-05 -9.8098376e-06 -4.684996e-06 10.090311 + 3400 0.00060808824 -0.00051335015 2.8585528e-05 -1.299304e-05 -1.042155e-05 10.085279 + 3500 0.00060141771 -0.00053944948 3.3073003e-05 -1.4007198e-05 -1.4890004e-05 10.076632 + 3600 0.00058955439 -0.00058831267 3.3193604e-05 -1.4717218e-05 -2.0169028e-05 10.067983 + 3700 0.00057562588 -0.00053594395 3.1855934e-05 -1.2759241e-05 -1.778831e-05 10.06007 + 3800 0.00056288488 -0.0005584841 3.0312862e-05 -9.7942798e-06 -1.5748733e-05 10.058818 + 3900 0.0005587151 -0.00057123887 3.0257207e-05 -7.8343432e-06 -1.1945945e-05 10.056117 + 4000 0.00055252357 -0.00056341012 3.0643644e-05 -3.5123196e-06 -7.6221264e-06 10.055766 + 4100 0.00054746835 -0.0006001176 3.0871838e-05 3.1185521e-06 -2.7579162e-06 10.053254 + 4200 0.00055406659 -0.00058858425 3.4129718e-05 1.0050578e-05 5.7346642e-06 10.040079 + 4300 0.00055197755 -0.00060160199 3.2641549e-05 1.5817736e-05 9.4864214e-06 10.035028 + 4400 0.00054566896 -0.00064016609 3.3944385e-05 2.157204e-05 6.1187523e-06 10.036121 + 4500 0.00054060111 -0.00065952834 3.3119093e-05 2.4172484e-05 4.9459325e-06 10.03685 + 4600 0.00054065729 -0.00066744113 3.223805e-05 2.3503537e-05 9.0427401e-06 10.035405 + 4700 0.00054098427 -0.00064504776 3.2037001e-05 1.926565e-05 1.0546415e-05 10.034501 + 4800 0.00054141253 -0.00068174982 3.1935667e-05 1.2727978e-05 8.8624733e-06 10.033418 + 4900 0.00054027919 -0.00064378606 3.1759404e-05 7.3709768e-06 8.0812107e-06 10.035601 + 5000 0.00053821803 -0.00064717177 3.1834908e-05 5.5119444e-06 5.2280812e-06 10.036692 + 5100 0.00053536579 -0.00066007859 3.2403937e-05 4.0857527e-06 -1.5295741e-07 10.037419 + 5200 0.00053648695 -0.00063942795 3.2383043e-05 1.6197156e-07 -4.7369656e-06 10.038326 + 5300 0.00053622807 -0.00064591007 3.329864e-05 -1.7924131e-06 -6.7951652e-06 10.039233 + 5400 0.00053960407 -0.0006173041 3.3993069e-05 -1.7932927e-06 -6.0531078e-06 10.03779 + 5500 0.00053796949 -0.00063172209 3.4211179e-05 -3.0279549e-06 -6.3779479e-06 10.036344 + 5600 0.00053754609 -0.00065574707 3.4750932e-05 -5.5906378e-06 -8.8682325e-06 10.03689 + 5700 0.00053800964 -0.00067017804 3.4577555e-05 -8.2489481e-06 -1.0448862e-05 10.036528 + 5800 0.00053783078 -0.00062551374 3.516311e-05 -9.7501091e-06 -1.0484624e-05 10.037074 + 5900 0.00053771802 -0.00063683303 3.536403e-05 -1.0978806e-05 -1.1331075e-05 10.038889 + 6000 0.00053818926 -0.0006480219 3.556216e-05 -1.1313579e-05 -1.2936664e-05 10.038889 + 6100 0.00053847422 -0.0006368473 3.5618731e-05 -9.846739e-06 -1.2685058e-05 10.038709 + 6200 0.00053845201 -0.00063840856 3.5837807e-05 -7.1875428e-06 -1.1762856e-05 10.038709 + 6300 0.00053667612 -0.00066242577 3.6073709e-05 -4.7480116e-06 -1.1847933e-05 10.039616 + 6400 0.00053622069 -0.00068157063 3.6102907e-05 -2.6083138e-06 -1.0659141e-05 10.039616 + 6500 0.00053523267 -0.00069280776 3.6305856e-05 6.3043373e-07 -7.1642325e-06 10.041433 + 6600 0.0005330839 -0.00066567528 3.6114434e-05 3.5272096e-06 -2.960556e-06 10.042888 + 6700 0.00053197306 -0.00066248792 3.6043626e-05 5.2775896e-06 2.4477165e-07 10.043254 + 6800 0.00053144495 -0.00069604723 3.6046963e-05 6.4421403e-06 5.1877078e-07 10.040901 + 6900 0.00053079408 -0.00068001276 3.5639415e-05 7.9689078e-06 -4.083361e-07 10.040177 + 7000 0.00053012176 -0.00068635527 3.5599595e-05 8.9040006e-06 -4.4296434e-07 10.039996 + 7100 0.00052958544 -0.00067840066 3.5846725e-05 8.6942859e-06 2.6834024e-06 10.040543 + 7200 0.00052858813 -0.00068968438 3.5554886e-05 6.0568352e-06 4.7776634e-06 10.041271 + 7300 0.00052845993 -0.00070888583 3.5468591e-05 1.4110758e-06 5.6592858e-06 10.040909 + 7400 0.00052678004 -0.00072652527 3.5417511e-05 -2.0145276e-06 6.3632678e-06 10.041818 + 7500 0.00052676205 -0.00072008847 3.5601092e-05 -4.5673532e-06 7.3467401e-06 10.041455 +Loop time of 17.1712 on 1 procs for 7500 steps with 11048 atoms + +Performance: 3773764.428 tau/day, 436.778 timesteps/s +99.5% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 2.3271 | 2.3271 | 2.3271 | 0.0 | 13.55 +Bond | 5.8378 | 5.8378 | 5.8378 | 0.0 | 34.00 +Neigh | 4.42 | 4.42 | 4.42 | 0.0 | 25.74 +Comm | 0.07213 | 0.07213 | 0.07213 | 0.0 | 0.42 +Output | 0.064105 | 0.064105 | 0.064105 | 0.0 | 0.37 +Modify | 4.3202 | 4.3202 | 4.3202 | 0.0 | 25.16 +Other | | 0.1298 | | | 0.76 + +Nlocal: 11048.0 ave 11048 max 11048 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 46555.0 ave 46555 max 46555 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 46555 +Ave neighs/atom = 4.2138849 +Ave special neighs/atom = 10.041455 +Neighbor list builds = 732 +Dangerous builds = 710 +Total wall time: 0:00:17 diff --git a/examples/bpm/impact/log.30Jul2021.pour.g++1.4 b/examples/bpm/impact/log.30Jul2021.pour.g++1.4 deleted file mode 100644 index 300ac271eb..0000000000 --- a/examples/bpm/impact/log.30Jul2021.pour.g++1.4 +++ /dev/null @@ -1,241 +0,0 @@ -LAMMPS (30 Jul 2021) -units lj -dimension 3 -boundary m m m -atom_style sphere/bpm -special_bonds lj 0.0 1.0 1.0 coul 0.0 1.0 1.0 -newton on off -comm_modify vel yes cutoff 2.6 -lattice fcc 1.0 -Lattice spacing in x,y,z = 1.5874011 1.5874011 1.5874011 -region box block -5 15 -20 20 -20 20 -create_box 1 box bond/types 2 extra/bond/per/atom 20 extra/special/per/atom 50 -Created orthogonal box = (-7.9370053 -31.748021 -31.748021) to (23.811016 31.748021 31.748021) - 1 by 2 by 2 MPI processor grid - -region disk cylinder x 0.0 0.0 20.0 -0.5 0.5 -create_atoms 1 region disk -Created 7527 atoms - using lattice units in orthogonal box = (-7.9370053 -31.748021 -31.748021) to (23.811016 31.748021 31.748021) - create_atoms CPU = 0.002 seconds -group plate region disk -7527 atoms in group plate - -region ball sphere 8.0 0.0 0.0 6.0 -create_atoms 1 region ball -Created 3589 atoms - using lattice units in orthogonal box = (-7.9370053 -31.748021 -31.748021) to (23.811016 31.748021 31.748021) - create_atoms CPU = 0.001 seconds -group projectile region ball -3589 atoms in group projectile - -displace_atoms all random 0.1 0.1 0.1 134598738 -Displacing atoms ... - -neighbor 1.0 bin -pair_style gran/hooke/history 1.0 NULL 0.5 NULL 0.1 1 -bond_style bpm/rotational store/local 2 time id1 id2 -pair_coeff 1 1 -bond_coeff 1 1.0 0.2 0.02 0.02 0.05 0.01 0.01 0.01 0.1 0.02 0.002 0.002 -bond_coeff 2 1.0 0.2 0.02 0.02 0.20 0.04 0.04 0.04 0.1 0.02 0.002 0.002 - -fix 1 all nve/sphere/bpm -fix 2 all store/local 100 3 -fix 3 all update/special/bonds - -create_bonds many plate plate 1 0.0 1.5 -Neighbor list info ... - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 2 - ghost atom cutoff = 2.6 - binsize = 1, bins = 32 64 64 - 2 neighbor lists, perpetual/occasional/extra = 1 1 0 - (1) command create_bonds, occasional - attributes: full, newton on - pair build: full/bin - stencil: full/bin/3d - bin: standard - (2) pair gran/hooke/history, perpetual - attributes: half, newton on, size, history - pair build: half/size/bin/newton - stencil: half/bin/3d - bin: standard -Added 38551 bonds, new total = 38551 -Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 1 1 - special bond factors coul: 0 1 1 - 15 = max # of 1-2 neighbors - 101 = max # of special neighbors - special bonds CPU = 0.002 seconds -create_bonds many projectile projectile 2 0.0 1.5 -Added 21869 bonds, new total = 60420 -Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 1 1 - special bond factors coul: 0 1 1 - 16 = max # of 1-2 neighbors - 101 = max # of special neighbors - special bonds CPU = 0.002 seconds -change_box all boundary s s s -Changing box ... - -neighbor 0.3 bin -special_bonds lj 0.0 1.0 1.0 coul 1.0 1.0 1.0 - -velocity projectile set -0.05 0.0 0.0 -compute nbond all nbond/atom -compute tbond all reduce sum c_nbond - -timestep 0.05 -thermo_style custom step ke pe pxx pyy pzz c_tbond -thermo 100 -dump 1 all custom 100 atomDump id radius x y z c_nbond - -dump 2 all local 100 brokenDump f_2[1] f_2[2] f_2[3] -dump_modify 2 header no - -run 10000 -Neighbor list info ... - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.3 - ghost atom cutoff = 2.6 - binsize = 0.65, bins = 36 97 97 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair gran/hooke/history, perpetual - attributes: half, newton on, size, history - pair build: half/size/bin/newton - stencil: half/bin/3d - bin: standard -Per MPI rank memory allocation (min/avg/max) = 34.27 | 34.28 | 34.28 Mbytes -Step KinEng PotEng Pxx Pyy Pzz c_tbond - 0 0.00053248439 -5.4354084 0.00012848545 -1.0639387e-19 1.5819554e-19 10.870817 - 100 0.00053248439 -5.4354084 0.00013017373 1.1334839e-12 1.784281e-12 10.870817 - 200 0.00053248439 -5.4354084 0.00013279102 1.6787387e-12 5.4953548e-13 10.870817 - 300 0.00053248439 -5.4354084 0.00013459514 3.0577302e-12 -1.2088316e-12 10.870817 - 400 0.00053248439 -5.4354084 0.00013739515 9.7326931e-13 1.1562543e-12 10.870817 - 500 0.00053111833 -5.4353812 0.00013532154 -1.8602155e-06 -1.6702711e-06 10.870817 - 600 0.00051558884 -5.4335908 5.8899364e-05 -2.4651157e-05 -2.6584555e-05 10.868838 - 700 0.0005013055 -5.4216397 -7.255462e-05 -2.8970044e-05 -4.1925574e-05 10.850846 - 800 0.00049878634 -5.3947446 5.6196335e-05 1.8649508e-05 8.9976433e-06 10.803706 - 900 0.00049589843 -5.3619596 0.00020821095 -7.7726675e-05 -8.6749853e-05 10.737855 - 1000 0.00049487709 -5.3376233 0.00017638288 -2.8676423e-05 -4.5487748e-05 10.683879 - 1100 0.00048720924 -5.3283688 4.0171402e-05 0.0001406456 0.00014483 10.662648 - 1200 0.00048274004 -5.3195134 7.4824656e-06 7.4411513e-05 0.00010365246 10.643397 - 1300 0.00047990668 -5.3127593 0.00018114159 -2.9205108e-05 1.1366149e-05 10.629723 - 1400 0.00048034109 -5.3084824 0.000147425 -6.2432251e-05 -3.8277687e-05 10.620187 - 1500 0.00047225373 -5.3024141 8.6252599e-07 2.4082822e-05 3.049023e-05 10.608492 - 1600 0.00045698513 -5.2972292 1.0763242e-05 4.1148987e-05 2.83019e-05 10.599676 - 1700 0.00044854655 -5.2896066 0.00010217014 -6.9430229e-05 -9.6661607e-05 10.587262 - 1800 0.00044929529 -5.2775304 0.00010981512 -8.0553726e-05 -0.00011931185 10.562972 - 1900 0.00044441992 -5.2650251 1.8882842e-05 1.0491309e-05 -3.879472e-05 10.540842 - 2000 0.00043947002 -5.2484561 4.4869915e-05 6.8824059e-05 3.5808833e-05 10.511155 - 2100 0.00043372382 -5.2265524 0.00013970367 1.6484426e-05 2.2785645e-05 10.469054 - 2200 0.00043174768 -5.2069377 9.4662371e-05 2.2278647e-06 3.5962708e-05 10.427852 - 2300 0.0004270123 -5.1924656 2.3188212e-05 6.1522399e-06 7.4262622e-05 10.396006 - 2400 0.00042569191 -5.1848751 5.7811979e-05 2.7124197e-05 0.0001072424 10.378733 - 2500 0.00042259717 -5.1758217 0.00013069307 3.3656662e-05 0.00010197635 10.359482 - 2600 0.00042271375 -5.1700793 9.5183077e-05 5.3232578e-05 8.9912385e-05 10.347787 - 2700 0.00042252395 -5.1628759 2.6305437e-05 6.7644983e-05 7.7095778e-05 10.332674 - 2800 0.00042123755 -5.1549973 6.5875753e-05 2.8392569e-05 2.8079356e-05 10.315941 - 2900 0.00042132346 -5.1508594 0.00011264272 6.3410829e-06 -2.1983564e-05 10.306405 - 3000 0.00042343054 -5.1495182 7.3503612e-05 3.8773748e-05 -9.519275e-06 10.301547 - 3100 0.00042220412 -5.1483831 2.5233575e-05 5.0076476e-05 3.938746e-06 10.299568 - 3200 0.00042303815 -5.1466902 6.1939664e-05 -9.1346169e-06 -2.5920911e-05 10.29651 - 3300 0.00042000178 -5.144782 9.8814555e-05 -4.04749e-05 -4.2876825e-05 10.292371 - 3400 0.00041874209 -5.1416065 5.1246647e-05 -2.7877246e-05 -3.225052e-05 10.286254 - 3500 0.00041582277 -5.1397016 2.0053694e-05 -3.5797833e-05 -1.536015e-05 10.282296 - 3600 0.00041607097 -5.139236 6.0675623e-05 -5.7232123e-05 -3.1162791e-05 10.281036 - 3700 0.00041445536 -5.1373913 8.7909083e-05 -4.1136114e-05 -5.2627526e-05 10.277978 - 3800 0.0004147342 -5.1323122 4.6324048e-05 7.0253754e-06 -3.3511914e-05 10.268442 - 3900 0.00041446917 -5.1294358 2.8646507e-05 1.5201733e-05 -1.13759e-05 10.262504 - 4000 0.00041346205 -5.1250314 6.540586e-05 -1.17595e-05 -2.8050171e-05 10.254948 - 4100 0.00041230785 -5.1219436 7.9364924e-05 -4.1504333e-06 -2.2530525e-05 10.248111 - 4200 0.00041198555 -5.1177883 4.3515184e-05 1.5227343e-05 -6.3707934e-06 10.240014 - 4300 0.0004111489 -5.1134893 2.8350236e-05 2.0718016e-06 1.2010375e-05 10.231558 - 4400 0.00041090623 -5.1104369 6.2460747e-05 -2.5959985e-05 7.8242641e-07 10.224901 - 4500 0.00040944466 -5.1085221 6.7135567e-05 -1.7699087e-05 -4.7022089e-06 10.220943 - 4600 0.00040810594 -5.1065034 3.5212952e-05 1.3568365e-05 1.3875486e-05 10.217704 - 4700 0.00040810646 -5.1039941 3.3409499e-05 1.7215022e-05 2.8204859e-05 10.212487 - 4800 0.0004074837 -5.1015741 5.5792503e-05 1.9563116e-06 1.823506e-06 10.207089 - 4900 0.00040677077 -5.0987121 5.6695901e-05 8.2729584e-06 -1.2713008e-05 10.201871 - 5000 0.00040636045 -5.0961728 3.0704198e-05 2.2141861e-05 8.2099332e-06 10.196474 - 5100 0.00040606831 -5.0947673 3.1281394e-05 7.0864149e-06 2.0262936e-05 10.193055 - 5200 0.00040652265 -5.0940213 5.2610835e-05 -1.2888854e-05 3.0894446e-06 10.191076 - 5300 0.00040642029 -5.0931407 4.6148958e-05 -9.5544284e-06 -6.047443e-06 10.189457 - 5400 0.00040642806 -5.0915733 2.59528e-05 -3.3035524e-06 1.026995e-05 10.186038 - 5500 0.00040686546 -5.0908 2.9026708e-05 -9.0382082e-06 1.4643294e-05 10.184059 - 5600 0.0004064361 -5.0908057 4.6731327e-05 -1.2664731e-05 -2.6232887e-06 10.183339 - 5700 0.00040629203 -5.0903044 4.0856223e-05 -1.2201759e-06 -1.3169401e-05 10.18262 - 5800 0.00040637688 -5.0890571 2.2625249e-05 8.7645385e-06 -6.2486963e-06 10.180281 - 5900 0.00040613721 -5.0874767 2.8382883e-05 2.4072343e-06 2.0419388e-07 10.176862 - 6000 0.00040668084 -5.0865465 4.3602089e-05 -5.4962058e-06 -4.5087421e-06 10.174523 - 6100 0.00040707325 -5.0865389 3.4958823e-05 -2.0750124e-06 -1.6708517e-06 10.174343 - 6200 0.00040691768 -5.0863974 2.1602821e-05 3.1566836e-06 1.0526645e-05 10.174343 - 6300 0.00040705673 -5.0862887 2.9412395e-05 9.2283412e-07 1.4273225e-05 10.173983 - 6400 0.00040648035 -5.0860509 3.9684464e-05 -1.663237e-06 3.9771927e-06 10.173624 - 6500 0.00040710623 -5.0861041 3.1078617e-05 1.732822e-06 3.4003409e-06 10.173624 - 6600 0.00040665879 -5.0857907 2.0693771e-05 3.3053846e-06 1.2181329e-05 10.173264 - 6700 0.00040650151 -5.0854203 2.8479998e-05 2.7244033e-06 9.7566436e-06 10.172364 - 6800 0.00040635649 -5.0851816 3.5150661e-05 1.6906684e-06 -6.155957e-06 10.171644 - 6900 0.00040670804 -5.0848974 2.4632227e-05 2.9367001e-06 -1.0691056e-05 10.171105 - 7000 0.00040693354 -5.0843039 1.8740741e-05 6.024808e-06 4.2065619e-07 10.169665 - 7100 0.00040728228 -5.0843393 2.7137965e-05 5.5506702e-06 5.5908974e-06 10.169665 - 7200 0.0004074084 -5.0842875 3.0307934e-05 2.0170793e-06 -2.4296651e-06 10.169485 - 7300 0.00040723509 -5.0843468 2.1465618e-05 1.9642493e-06 -3.6022271e-06 10.169485 - 7400 0.00040756027 -5.0843623 1.6801323e-05 -1.9748948e-06 1.4205345e-06 10.169306 - 7500 0.00040829979 -5.0843202 2.4772881e-05 -6.1251363e-06 2.0247483e-06 10.169126 - 7600 0.00040822994 -5.0843182 2.7272667e-05 -3.0357928e-06 4.894101e-07 10.169126 - 7700 0.00040831723 -5.0843052 1.9410405e-05 3.6094291e-06 1.5451381e-06 10.169126 - 7800 0.00040868149 -5.0843706 1.6484224e-05 3.3901782e-06 3.9911363e-06 10.169126 - 7900 0.00040872521 -5.0843735 2.2844838e-05 2.8813595e-06 1.4869802e-06 10.169126 - 8000 0.00040853749 -5.0843239 2.3537039e-05 5.1951501e-06 -1.2448734e-06 10.169126 - 8100 0.00040812899 -5.0842554 1.6947117e-05 7.5128919e-06 -1.0877933e-06 10.168946 - 8200 0.00040812313 -5.0842813 1.5639254e-05 3.6719094e-06 -9.3497783e-07 10.168946 - 8300 0.00040817027 -5.0842752 2.0634335e-05 2.5358492e-07 -3.2726598e-06 10.168946 - 8400 0.00040774138 -5.084215 2.0224447e-05 1.3696075e-06 -3.3568279e-06 10.168766 - 8500 0.00040760502 -5.0842 1.4541525e-05 9.3556598e-07 1.1823477e-06 10.168766 - 8600 0.00040756971 -5.0841463 1.4460781e-05 -2.7822738e-06 4.3070092e-06 10.168766 - 8700 0.00040706312 -5.0840255 1.8278276e-05 -5.20189e-06 1.0784628e-06 10.168766 - 8800 0.00040670111 -5.0839094 1.7116511e-05 -9.4769204e-07 -3.2089738e-06 10.168586 - 8900 0.00040617439 -5.0838164 1.3315166e-05 3.2313582e-06 -2.3144297e-06 10.168586 - 9000 0.00040576758 -5.0837468 1.3898828e-05 1.5947021e-06 -2.0719014e-06 10.168586 - 9100 0.00040577217 -5.0837244 1.6547097e-05 1.1667189e-06 -3.2056138e-06 10.168406 - 9200 0.00040615545 -5.0837984 1.4946269e-05 4.3601683e-06 -2.1585248e-06 10.168406 - 9300 0.00040638526 -5.083836 1.1737091e-05 5.1607613e-06 7.2161152e-07 10.168406 - 9400 0.0004062125 -5.0838558 1.2486756e-05 1.9996225e-06 1.6192477e-06 10.168406 - 9500 0.00040627984 -5.0839239 1.441806e-05 -6.6274154e-07 -2.9396969e-07 10.168406 - 9600 0.0004065461 -5.0839109 1.3189089e-05 -5.1486848e-07 4.6653236e-07 10.168406 - 9700 0.00040642188 -5.0838722 1.0626956e-05 -1.7580535e-06 2.8200944e-06 10.168226 - 9800 0.0004061705 -5.0838326 1.1280802e-05 -3.4868266e-06 2.7287279e-06 10.168226 - 9900 0.00040666798 -5.0835647 1.2432396e-05 -2.8727154e-06 1.4556152e-07 10.167686 - 10000 0.00040675506 -5.0831833 1.0832242e-05 4.3061564e-07 -4.1422229e-07 10.166967 -Loop time of 48.2068 on 4 procs for 10000 steps with 11116 atoms - -Performance: 896139.501 tau/day, 207.440 timesteps/s -97.7% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.39096 | 0.42232 | 0.45519 | 4.6 | 0.88 -Bond | 30.522 | 33.954 | 38.166 | 51.7 | 70.43 -Neigh | 1.1822 | 1.1872 | 1.1915 | 0.3 | 2.46 -Comm | 3.4201 | 7.9545 | 11.664 | 115.6 | 16.50 -Output | 1.0078 | 1.0085 | 1.0099 | 0.1 | 2.09 -Modify | 3.0972 | 3.3841 | 3.7307 | 14.3 | 7.02 -Other | | 0.2958 | | | 0.61 - -Nlocal: 2779.00 ave 4159 max 1635 min -Histogram: 2 0 0 0 0 0 0 1 0 1 -Nghost: 1002.00 ave 1229 max 800 min -Histogram: 1 1 0 0 0 0 0 1 0 1 -Neighs: 11431.8 ave 18381 max 6059 min -Histogram: 2 0 0 0 0 0 1 0 0 1 - -Total # of neighbors = 45727 -Ave neighs/atom = 4.1136200 -Ave special neighs/atom = 10.166967 -Neighbor list builds = 637 -Dangerous builds = 0 -Total wall time: 0:00:48 diff --git a/src/.gitignore b/src/.gitignore index 1ed30868ab..a9de0c355a 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -257,8 +257,8 @@ /bond_bpm.h /bond_bpm_rotational.cpp /bond_bpm_rotational.h -/bond_bpm_simple.cpp -/bond_bpm_simple.h +/bond_bpm_spring.cpp +/bond_bpm_spring.h /compute_nbond_atom.cpp /compute_nbond_atom.h /fix_bond_history.cpp diff --git a/src/BPM/bond_bpm_spring.cpp b/src/BPM/bond_bpm_spring.cpp new file mode 100644 index 0000000000..7effb8ae48 --- /dev/null +++ b/src/BPM/bond_bpm_spring.cpp @@ -0,0 +1,338 @@ +// clang-format off +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "bond_bpm_spring.h" + +#include "atom.h" +#include "comm.h" +#include "domain.h" +#include "error.h" +#include "fix_bond_history.h" +#include "force.h" +#include "math_const.h" +#include "math_extra.h" +#include "memory.h" +#include "modify.h" +#include "neighbor.h" +#include "pair.h" + +#include +#include +#include + +#define EPSILON 1e-10 + +using namespace LAMMPS_NS; +using namespace MathExtra; + +/* ---------------------------------------------------------------------- */ + +BondBPMSpring::BondBPMSpring(LAMMPS *lmp) : BondBPM(lmp) +{ + partial_flag = 1; +} + +/* ---------------------------------------------------------------------- */ + +BondBPMSpring::~BondBPMSpring() +{ + if (fix_bond_history) modify->delete_fix("BOND_HISTORY_BPM_SPRING"); + + if (allocated) { + memory->destroy(setflag); + memory->destroy(k); + memory->destroy(ecrit); + memory->destroy(gamma); + } +} + +/* ---------------------------------------------------------------------- + Store data for a single bond - if bond added after LAMMPS init (e.g. pour) +------------------------------------------------------------------------- */ + +double BondBPMSpring::store_bond(int n,int i,int j) +{ + int m,k; + double delx, dely, delz, r; + double **x = atom->x; + double **bondstore = fix_bond_history->bondstore; + tagint *tag = atom->tag; + + delx = x[i][0] - x[j][0]; + dely = x[i][1] - x[j][1]; + delz = x[i][2] - x[j][2]; + + r = sqrt(delx*delx + dely*dely + delz*delz); + bondstore[n][0] = r; + + if (i < atom->nlocal) { + for (m = 0; m < atom->num_bond[i]; m ++) { + if (atom->bond_atom[i][m] == tag[j]) { + fix_bond_history->update_atom_value(i, m, 0, r); + } + } + } + + if (j < atom->nlocal) { + for (m = 0; m < atom->num_bond[j]; m ++) { + if (atom->bond_atom[j][m] == tag[i]) { + fix_bond_history->update_atom_value(j, m, 0, r); + } + } + } + + return r; +} + +/* ---------------------------------------------------------------------- + Store data for all bonds called once +------------------------------------------------------------------------- */ + +void BondBPMSpring::store_data() +{ + int i, j, m, type; + double delx, dely, delz, r; + double **x = atom->x; + int **bond_type = atom->bond_type; + + for (i = 0; i < atom->nlocal; i ++) { + for (m = 0; m < atom->num_bond[i]; m ++) { + type = bond_type[i][m]; + + //Skip if bond was turned off + if(type < 0) + continue; + + // map to find index n + j = atom->map(atom->bond_atom[i][m]); + if(j == -1) error->one(FLERR, "Atom missing in BPM bond"); + + delx = x[i][0] - x[j][0]; + dely = x[i][1] - x[j][1]; + delz = x[i][2] - x[j][2]; + + // Get closest image in case bonded with ghost + domain->minimum_image(delx, dely, delz); + r = sqrt(delx*delx + dely*dely + delz*delz); + fix_bond_history->update_atom_value(i, m, 0, r); + } + } + + fix_bond_history->post_neighbor(); +} + +/* ---------------------------------------------------------------------- */ + +void BondBPMSpring::compute(int eflag, int vflag) +{ + + if (! fix_bond_history->stored_flag) { + fix_bond_history->stored_flag = true; + store_data(); + } + + int i1,i2,itmp,m,n,type,itype,jtype; + double delx, dely, delz, delvx, delvy, delvz; + double e, rsq, r, r0, rinv, smooth, fbond, dot; + + ev_init(eflag,vflag); + + if (vflag_global == 2) + force->pair->vflag_either = force->pair->vflag_global = 1; + + double **cutsq = force->pair->cutsq; + double **x = atom->x; + double **v = atom->v; + double **f = atom->f; + tagint *tag = atom->tag; + int **bondlist = neighbor->bondlist; + int nbondlist = neighbor->nbondlist; + int nlocal = atom->nlocal; + int newton_bond = force->newton_bond; + + double **bondstore = fix_bond_history->bondstore; + + for (n = 0; n < nbondlist; n++) { + + // skip bond if already broken + if (bondlist[n][2] <= 0) continue; + + i1 = bondlist[n][0]; + i2 = bondlist[n][1]; + type = bondlist[n][2]; + r0 = bondstore[n][0]; + + delx = x[i1][0] - x[i2][0]; + dely = x[i1][1] - x[i2][1]; + delz = x[i1][2] - x[i2][2]; + + rsq = delx*delx + dely*dely + delz*delz; + r = sqrt(rsq); + e = (r - r0)/r0; + + if (fabs(e) > ecrit[type]) { + bondlist[n][2] = 0; + process_broken(i1, i2); + continue; + } + + rinv = 1.0/r; + fbond = -k[type]*(r-r0); + + delvx = v[i1][0] - v[i2][0]; + delvy = v[i1][1] - v[i2][1]; + delvz = v[i1][2] - v[i2][2]; + dot = delx*delvx + dely*delvy + delz*delvz; + fbond -= gamma[type]*dot*rinv; + + smooth = (r-r0)/(r0*ecrit[type]); + smooth *= smooth; + smooth *= smooth; + smooth = 1 - smooth; + + fbond *= rinv*smooth; + + if (newton_bond || i1 < nlocal) { + f[i1][0] += delx*fbond; + f[i1][1] += dely*fbond; + f[i1][2] += delz*fbond; + } + + if (newton_bond || i2 < nlocal) { + f[i2][0] -= delx*fbond; + f[i2][1] -= dely*fbond; + f[i2][2] -= delz*fbond; + } + + if (evflag) ev_tally(i1,i2,nlocal,newton_bond,0.0,fbond,delx,dely,delz); + } +} + +/* ---------------------------------------------------------------------- */ + +void BondBPMSpring::allocate() +{ + allocated = 1; + int n = atom->nbondtypes; + + memory->create(k,n+1,"bond:k"); + memory->create(ecrit,n+1,"bond:ecrit"); + memory->create(gamma,n+1,"bond:gamma"); + + memory->create(setflag,n+1,"bond:setflag"); + for (int i = 1; i <= n; i++) setflag[i] = 0; +} + +/* ---------------------------------------------------------------------- + set coeffs for one or more types +------------------------------------------------------------------------- */ + +void BondBPMSpring::coeff(int narg, char **arg) +{ + if (narg != 4) error->all(FLERR,"Incorrect args for bond coefficients"); + if (!allocated) allocate(); + + int ilo,ihi; + utils::bounds(FLERR,arg[0],1,atom->nbondtypes,ilo,ihi,error); + + double k_one = utils::numeric(FLERR,arg[1],false,lmp); + double ecrit_one = utils::numeric(FLERR,arg[2],false,lmp); + double gamma_one = utils::numeric(FLERR,arg[3],false,lmp); + + int count = 0; + for (int i = ilo; i <= ihi; i++) { + k[i] = k_one; + ecrit[i] = ecrit_one; + gamma[i] = gamma_one; + setflag[i] = 1; + count++; + + if (1.0+ecrit[i] > max_stretch) max_stretch = 1.0+ecrit[i]; + } + + if (count == 0) error->all(FLERR,"Incorrect args for bond coefficients"); +} + +/* ---------------------------------------------------------------------- + check if pair defined and special_bond settings are valid +------------------------------------------------------------------------- */ + +void BondBPMSpring::init_style() +{ + BondBPM::init_style(); + + if (comm->ghost_velocity == 0) + error->all(FLERR,"Bond bpm/spring requires ghost atoms store velocity"); + + if (!fix_bond_history) + fix_bond_history = (FixBondHistory *) modify->add_fix( + "BOND_HISTORY_BPM_SPRING all BOND_HISTORY 0 1"); +} + +/* ---------------------------------------------------------------------- + proc 0 writes out coeffs to restart file +------------------------------------------------------------------------- */ + +void BondBPMSpring::write_restart(FILE *fp) +{ + fwrite(&k[1],sizeof(double),atom->nbondtypes,fp); + fwrite(&ecrit[1],sizeof(double),atom->nbondtypes,fp); + fwrite(&gamma[1],sizeof(double),atom->nbondtypes,fp); +} + +/* ---------------------------------------------------------------------- + proc 0 reads coeffs from restart file, bcasts them +------------------------------------------------------------------------- */ + +void BondBPMSpring::read_restart(FILE *fp) +{ + allocate(); + + if (comm->me == 0) { + utils::sfread(FLERR,&k[1],sizeof(double),atom->nbondtypes,fp,nullptr,error); + utils::sfread(FLERR,&ecrit[1],sizeof(double),atom->nbondtypes,fp,nullptr,error); + utils::sfread(FLERR,&gamma[1],sizeof(double),atom->nbondtypes,fp,nullptr,error); + } + MPI_Bcast(&k[1],atom->nbondtypes,MPI_DOUBLE,0,world); + MPI_Bcast(&ecrit[1],atom->nbondtypes,MPI_DOUBLE,0,world); + MPI_Bcast(&gamma[1],atom->nbondtypes,MPI_DOUBLE,0,world); + + for (int i = 1; i <= atom->nbondtypes; i++) setflag[i] = 1; +} + +/* ---------------------------------------------------------------------- + proc 0 writes to data file +------------------------------------------------------------------------- */ + +void BondBPMSpring::write_data(FILE *fp) +{ + for (int i = 1; i <= atom->nbondtypes; i++) + fprintf(fp,"%d %g %g %g\n", i,k[i],ecrit[i],gamma[i]); +} + +/* ---------------------------------------------------------------------- */ + +double BondBPMSpring::single(int type, double rsq, int i, int j, + double &fforce) +{ + // Not yet enabled + if (type <= 0) return 0.0; + + //double r0; + //for (int n = 0; n < atom->num_bond[i]; n ++) { + // if (atom->bond_atom[i][n] == atom->tag[j]) { + // r0 = fix_bond_history->get_atom_value(i, n, 0); + // } + //} +} diff --git a/src/BPM/bond_bpm_spring.h b/src/BPM/bond_bpm_spring.h new file mode 100644 index 0000000000..284e32dce1 --- /dev/null +++ b/src/BPM/bond_bpm_spring.h @@ -0,0 +1,74 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef BOND_CLASS +// clang-format off +BondStyle(bpm/spring,BondBPMSpring) +// clang-format on +#else + +#ifndef LMP_BOND_BPM_SPRING_H +#define LMP_BOND_BPM_SPRING_H + +#include "bond_bpm.h" + +namespace LAMMPS_NS { + +class BondBPMSpring : public BondBPM { + public: + BondBPMSpring(class LAMMPS *); + virtual ~BondBPMSpring(); + virtual void compute(int, int); + void coeff(int, char **); + void init_style(); + void write_restart(FILE *); + void read_restart(FILE *); + void write_data(FILE *); + double single(int, double, int, int, double &); + + protected: + double *k, *ecrit, *gamma; + + void allocate(); + void store_data(); + double store_bond(int, int, int); +}; + +} // namespace LAMMPS_NS + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Atom missing in BPM bond + +Bonded atom cannot be found + +E: Incorrect args for bond coefficients + +Self-explanatory. Check the input script or data file. + +E: Bond bpm/rotational requires atom style sphere/bpm + +Self-explanatory. + +E: Bond style bpm requires 1-3 and 1-4 special weights of 1.0 + +Self-explanatory. + +W: Bond style bpm/rotational not intended for 2d use, may be inefficient + +This bond style will perform a lot of unnecessary calculations in 2d + +*/