-
Notifications
You must be signed in to change notification settings - Fork 40
Guiding Center Particle Tracing #1820
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
Conversation
f0uriest
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few minor points, otherwise looks fine
| x, eq_or_field, params, m, q, mu, **kwargs | ||
| ) | ||
| elif self.frame == "lab": | ||
| assert isinstance(eq_or_field, _MagneticField), ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this might break in the future, I think @ddudt and @maya-avida were planning on making Equilibrium subclass from MagneticField as part of #996 #
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
though depending on how efficient the implementation is maybe this would be fine since it would still avoid the rootfinding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on their API, I can adapt the check later.

This PR is a combination of #734 and #1410.
The main structure is under discussion in #1657.
desc.particlesmodule.desc.particles.trace_particlesfunction.ManualParticleInitializerLab: Initializes particles at given positions in lab coordinates.ManualParticleInitializerFlux: Initializes particles at given positions in flux coordinates.CurveParticleInitializer: Initializes N particles on a given curve.SurfaceParticleInitializer: Initializes N particles on a given surface.VacuumGuidingCenterTrajectory: Integrates the particle motion by vacuum guiding center ODEs, conserving energy and mu.desc.plotting.plot_particle_trajectoriesfunction.We can delete #734 and #1410 once this is merged.