Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALJ 2D energy conservation test #22

Merged
merged 5 commits into from
Nov 18, 2022
Merged

ALJ 2D energy conservation test #22

merged 5 commits into from
Nov 18, 2022

Conversation

joaander
Copy link
Member

@joaander joaander commented Nov 17, 2022

Description

Add long running NVE simulations for ALJ particles in 2D (hexagons).

Motivation and context

Replace the shorter version of this test previously housed in HOOMD-blue: glotzerlab/hoomd-blue#1428

How has this been tested?

Output:
alj_2d_conservation_kT1 0_density0 4_N1764

Data is available to Glotzer group members in /nfs/turbo/glotzer/hoomd-validation/alj-2d/2022-11-18.

Checklist:

@joaander
Copy link
Member Author

Energy conservation is good, momentum conservation could be better. However, this is in line with the results we got when writing the ALJ paper. There are inherent small discontinuities that cannot be avoided.

@joaander joaander marked this pull request as ready for review November 18, 2022 12:53
@joaander joaander requested review from a team and tommy-waltmann and removed request for a team November 18, 2022 12:53
Copy link
Collaborator

@tommy-waltmann tommy-waltmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have one comment that could make the code a bit cleaner. Also, why are the changes in linear momentum so discrete compared to the changes in energy?

hoomd_validation/alj_2d.py Outdated Show resolved Hide resolved
@joaander
Copy link
Member Author

I have one comment that could make the code a bit cleaner. Also, why are the changes in linear momentum so discrete compared to the changes in energy?

While the energy as a function of the relative positions and orientations of the particles is continuous, the torque and direction of the force are not. Discontinuities in the force violate the assumptions of the numerical integration method which leads to problems like this. From the jumps in the momentum, it seems that there are certain types of collisions that lead to large errors but the vast majority of particle collisions are fine. @vyasr and I worked a lot on this in the implementation and this is the best we could do.

@joaander joaander merged commit c5cde19 into main Nov 18, 2022
@joaander joaander deleted the alj-2d branch November 18, 2022 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants