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

Create a class to represent an individual particle species #1008

Open
namurphy opened this issue Feb 10, 2021 · 5 comments · May be fixed by #1010
Open

Create a class to represent an individual particle species #1008

namurphy opened this issue Feb 10, 2021 · 5 comments · May be fixed by #1010
Assignees
Labels
plasmapy.plasma Related to the plasmapy.plasma subpackage

Comments

@namurphy
Copy link
Member

In order to create a representation of a multi-component plasma, we need to have a means of defining a single component. We could do this by creating a class called Species to describe the properties of a single particle species in a plasma. Instances of this class should have attributes like temperature, number_density, pressure, mass_density, and particle (which would contain the Particle instance).

Eventually we'll want to have a way to combine the different components:

>>> electrons = Species(n=..., T=..., particle="e-")
>>> protons = Species(n=..., T=..., particle="p+")
>>> neutrals = Species(n=..., T=..., particle="H-1 0+")
>>> partially_ionized_plasma = electrons | protons | neutrals  # union operator, or maybe we could use +

This would not be in the first pull request, though.

@namurphy
Copy link
Member Author

Oh, I should mention that this Species class would be different than the Species class that had been previously used in particle tracker functionality but then renamed.

@namurphy namurphy added the plasmapy.plasma Related to the plasmapy.plasma subpackage label Feb 10, 2021
@StanczakDominik
Copy link
Member

Grabbing this one for master thesis reasons!

@StanczakDominik StanczakDominik self-assigned this Feb 11, 2021
@StanczakDominik
Copy link
Member

I do wonder how, if at all, this should play with @particle_like...

@namurphy
Copy link
Member Author

namurphy commented Feb 11, 2021

That's a good question. In my mind, Particle and Species have pretty different responsibilities, so I don't think @particle_input interact with Species. On the other hand, there is the possibility of a @plasma_input decorator (#812), which might be a better fit.

And thanks!

@StanczakDominik StanczakDominik linked a pull request Feb 12, 2021 that will close this issue
3 tasks
@StanczakDominik
Copy link
Member

Oh, looks like discussions don't show up as linkbacks in here! #1020 is relevant

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

Successfully merging a pull request may close this issue.

2 participants