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

Add field methods that compute forces instead of fields #68

Open
leon-vv opened this issue Nov 26, 2023 · 0 comments
Open

Add field methods that compute forces instead of fields #68

leon-vv opened this issue Nov 26, 2023 · 0 comments
Labels
Milestone

Comments

@leon-vv
Copy link
Owner

leon-vv commented Nov 26, 2023

Problem statement

Current methods only return electromagnetic fields. It would be great to have a method that returns forces (with unit N) for a given position, charge and velocity. This would make it much easier for people to write their own particle tracers (for example to take into account space charge, or tracing 'weird' particles)

Proposed solution

Add a method Field.force_at_point(charge, position, velocity) which returns a Numpy array of shape (3,) representing the force

How to test

Add a new file tests/test_field.py with a few simple test cases to ensure the right answers are returned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant