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

Switch position and momentum updates to make particle push symplectic #30

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

adamslc
Copy link
Member

@adamslc adamslc commented Aug 30, 2024

The momentum update needs to use fields that are consistant with the
current particle locations. This requires updating the momentum first,
and then using this new momentum to push the particles.

Essentially, the update is now
p_(n - 1/2) -> p_(n + 1/2)
x_n -> x_(n + 1)

I am currently being pretty sloppy with the half timestep momentums, but
that should probably be fixed in the future.

The momentum update needs to use fields that are consistant with the
current particle locations. This requires updating the momentum first,
and then using this new momentum to push the particles.

Essentially, the update is now
p_(n - 1/2) -> p_(n + 1/2)
x_n -> x_(n + 1)

I am currently being pretty sloppy with the half timestep momentums, but
that should probably be fixed in the future.
@adamslc adamslc merged commit 71816f7 into main Aug 30, 2024
8 checks passed
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.

1 participant