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
adding Spheromak solutions #2237
base: main
Are you sure you want to change the base?
adding Spheromak solutions #2237
Conversation
Thank you for submitting a pull request (PR) to PlasmaPy! ✨ The future of the project depends on contributors like you, so we deeply appreciate it! 🌱 Our contributor guide has information on:
The bottom of this page shows several checks that are run for every PR. Don't worry if something broke! We break stuff all the time. 😺 Click on "Details" to learn why a check didn't pass. Please also feel free to ask for help. We do that all the time as well. 🌸 You can find us in our chat room or weekly community meeting & office hours. Here are some tips:
If this PR is marked as ready for review, someone should stop by to provide a code review and offer suggestions soon. ✅ If you don't get a review within a few days, please feel free to send us a reminder. Please also use SI units within PlasmaPy, except when there is strong justification otherwise or in some examples. We thank you once again! |
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #2237 +/- ##
=======================================
Coverage 98.21% 98.21%
=======================================
Files 98 98
Lines 8568 8568
=======================================
Hits 8415 8415
Misses 153 153 ☔ View full report in Codecov by Sentry. |
Here's the link that describes how to add an |
|
||
""" | ||
|
||
return 2 * self.B0 * (self.a / r) * j1 * (self.lamb * r) * math.cos(theta) |
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.
Import & use the Bessel function from (I think) SciPy?
eigenvalue to make J cross B = 0. | ||
|
||
""" | ||
return -1 * B0 * (a / r) * Derivative[r * j1 * (lamb * r), r] * math.sin(theta) |
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.
Looks like SymPy has special functions for Bessel functions too.
|
||
class solution: | ||
""" | ||
Define Analytical solution for spheromak equilibria. |
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.
Define Analytical solution for spheromak equilibria. | |
Define Analytical solution for force-free spheromak equilibria. |
from sympy import Derivative | ||
|
||
|
||
class solution: |
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.
class solution: | |
class ForceFreeSpheromak: |
...since I'm thinking we want to emphasize that it's force-free.
Description
This will provide some functions to solve for values relevant to Spheromak equilibria.
Motivation and context
Related issues
Closes #1995