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 NuclearReaction class to support crosssection data #2535

Open
pheuer opened this issue Feb 26, 2024 · 3 comments
Open

Create NuclearReaction class to support crosssection data #2535

pheuer opened this issue Feb 26, 2024 · 3 comments
Labels
feature request Issues requesting a new feature or enhancement

Comments

@pheuer
Copy link
Member

pheuer commented Feb 26, 2024

Feature description

We need a way to incorporate more information about nuclear reactions in to the Particles module.

Motivation

We need crosssections for common fusion reactions to make notebooks on topics like the Lawson criteria.

Implementation strategy

  1. Refactor particles.nuclear.nuclear_reaction_energy into a NuclearReaction class. Most of the input parsing is already done, but should be updated to use Particle Lists! The total baryon number, charge, and mass energy methods should also be updated to be based on Particle Lists. reaction_energy would then be a property of that object. @namurphy Do you think you could tackle this?

  2. Add a method to the new NuclearReaction class that searches for a matching reaction in an h5 file of nuclear data and returns the relevant data arrays if the reaction is included in the file. I can add this.

Additional context

I've created an example h5 file with one cross-section coming from the ENDF database. I can collect these for a bunch of common reactions once we agree on a format etc.

The eventual goal for this issue would be to have the functionality in PlasmaPy to make a notebook that shows various crosssections and calculates reactivities from them, like this one: https://scipython.com/blog/nuclear-fusion-cross-sections/

@pheuer pheuer added the feature request Issues requesting a new feature or enhancement label Feb 26, 2024
@namurphy
Copy link
Member

Thank you for raising this! I can work on the first part.

Cross-references: #110, #1026, #1450

@pheuer
Copy link
Member Author

pheuer commented Feb 26, 2024

@namurphy Perfect, thank you! I would just start with a NuclearReaction class now, then we can take a step back and see what features are in common with other classes, like the collision classes, and see if a parent class makes sense? I don't immediately see lots of features shared between collisions and nuclear interactions.

@pheuer
Copy link
Member Author

pheuer commented Mar 12, 2024

@namurphy I've collected the cross-section data for the fusion reactions mentioned in #110 from ENDF, and created a draft h5 file in the PlasmaPy-data repository:

https://github.com/PlasmaPy/PlasmaPy-data/blob/main/nuclear_reactions.h5

We can easily add more later, but I think this is a good start. The most important convention for this file is how to label the reactions. To best match ENDF, I've gone with Projectile[Remnants] although what is considered a product vs. a remnant for different reactions sometimes seems a bit arbitrary? We'll have to figure out the best way to take search this file given a nuclear reaction.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues requesting a new feature or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants