Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
enable fix rigid commands to add gravity to COM of rigid bodies #1801
Fix gravity works by adding a gravity force per particle. This is incorrect for rigid bodies with overlapping particles, e.g. a dense packing of spheriods. It results in gravity being too strong. And if the rigid body is asymmetric, could result in gravity applying a torque to the particle. This PR adds
If this addresses an open GitHub issue for this project, please mention the issue number here, and describe the relation. Use the phrases
Steve and Dan Bolintineanu (Sandia)
By submitting this pull request, I agree, that my contribution will be included in LAMMPS and redistributed under either the GNU General Public License version 2 (GPL v2) or the GNU Lesser General Public License version 2.1 (LGPL v2.1).
For rigid bodies with overlapping particles, this will change the effect of fix gravity, if used correctly.
Provide any relevant details about how the changes are implemented, how correctness was verified, how other features - if any - in LAMMPS are affected
Post Submission Checklist
Please check the fields below as they are completed after the pull request has been submitted. Delete lines that don't apply
Further Information, Files, and Links
Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. DOIs or webpages)
Added documentation for the new options on fix gravity and fix rigid. Also noticed that the fix rigid infile keyword was called inpfile in the code, but still infile in the doc page. Not sure when that change occurred. Kept the variable name inpfile in the code, but changed the input script option to infile to agree with the doc page.
@akohlmey @dsbollin Since Dan has already tested this works, I don't think an example is necessary. But if he has a small one that runs quickly, we could add it to examples/granular or examples/pour. It would be a nice addition since overlapped bodies with the infile option are not trivial to setup.
@sjplimp @akohlmey Sure thing, I have a short example here:
Want me to make a separate pull request? Sorry, I couldn't figure out how to make a pull request into the 'rigid-gravity' PR/branch.
This is still one of the major deficiencies in our (limited) regression testing for LAMMPS, that we don't have a good coverage of available features and that we too often assume that changes have no (unintended) side effects (which they do have occasionally). Having tested examples to document the status quo when new features are added should become as normal as insisting on documentation.