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

Improved energy distribution using NeSST #89

Closed
wants to merge 55 commits into from

Conversation

shimwell
Copy link
Member

@shimwell shimwell commented Jan 20, 2024

This PR is an attempt to make use of NeSST to define the neutron spectra. Closes #88

I have a bit more work to do before it is ready, for example I'm going to see if I can combined the Muir spectra for DD and DT neutrons with the openmc.stats.Discrete distribution for the TT neutrons.

going to try combining with this

shimwell and others added 28 commits January 20, 2024 22:35
…gy/openmc-plasma-source into improved_energy_distribution
…gy/openmc-plasma-source into improved_energy_distribution
…gy/openmc-plasma-source into improved_energy_distribution
…gy/openmc-plasma-source into improved_energy_distribution
@shimwell
Copy link
Member Author

shimwell commented Mar 8, 2024

This PR has turned into a bit of a big refactoring, sorry for the large diff

On the plus side it does now solve #80 and #37 and touches on addressing Liams comments in #47

Copy link

codecov bot commented Mar 8, 2024

Codecov Report

Attention: Patch coverage is 97.19626% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 95.74%. Comparing base (64e4aa1) to head (bbdb65c).
Report is 6 commits behind head on main.

❗ Current head bbdb65c differs from pull request most recent head e860a74. Consider uploading reports for the commit e860a74 to get more accurate results

Files Patch % Lines
src/openmc_plasma_source/fuel_types.py 95.12% 4 Missing ⚠️
src/openmc_plasma_source/__init__.py 83.33% 1 Missing ⚠️
src/openmc_plasma_source/tokamak_source.py 98.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #89      +/-   ##
==========================================
- Coverage   95.96%   95.74%   -0.23%     
==========================================
  Files           7        5       -2     
  Lines         347      235     -112     
==========================================
- Hits          333      225     -108     
+ Misses         14       10       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shimwell
Copy link
Member Author

shimwell commented Mar 8, 2024

tests are passing locally and on CI
the examples are running locally and on CI

only missing code coverage now

@shimwell
Copy link
Member Author

shimwell commented Mar 8, 2024

This PR is currently reducing the package by a reasonable amount of lines of code while also adding functionality.

I've redone the checking of values so that it is more concise as mentioned by @RemDelaporteMathurin

I'm keen to see if this issue can be fixed before we bring in nesst as a dependency

@shimwell
Copy link
Member Author

shimwell commented Mar 30, 2024

I just noticed another part of the code that will need changing to support DD and DT reactions. It looks like this part is only considering DT reactions

return ion_density**2 * DT_xs(ion_temperature)

So we might need to add DD reactions

Also I guess the ion_density for DD pairs is also half that of DT pairs

@RemDelaporteMathurin do you remember why this is ion_density**2 here in the code?

@shimwell
Copy link
Member Author

shimwell commented Aug 1, 2024

closing in favour of #95

@shimwell shimwell closed this Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improved neutron energy
2 participants