⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⡋⢅⣂⣐⡨⠙⡻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⣩⣥⣬⢕⢰⣾⣿⣿⣿⣿⣷⣄⠊⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⢸⣳⣳⣻⣿⡆⣿⣿⣿⣿⣿⣿⣿⣮⠠⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡘⢜⢞⢮⢗⢡⣿⣿⣿⣿⣿⣿⣿⣿⣧⠂⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠐⣰⣴⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠊⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⡿⠟⡛⠫⠉⠍⠛⡛⢛⠻⠿⢿⣿⣿⡇⢂⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡐⢸⣿⣿⠿⠿⠛⡛⢋⠩⠉⠍⠩⢙⠛⢿⣿⣿ ⡿⠃⣬⣴⣾⣿⣿⣿⣿⣷⣶⣾⣤⣥⣠⠩⠠⠹⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⢃⠡⢁⣂⣬⣴⣷⣾⣿⣿⣿⣿⣿⣷⣾⣄⠌⢿ ⠅⢱⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢌⣶⣴⣠⢉⠛⠿⣿⣿⣿⡿⠟⠫⢑⣠⣬⣶⡐⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⢊ ⠄⣹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢁⢺⣿⣿⣿⣿⣾⣴⠀⠍⠩⢠⣵⣿⣿⣿⣿⣿⡇⠊⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢂ ⣇⠌⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢀⣾⣿⣿⣿⠿⠋⣡⣨⣾⣶⣄⡌⡙⠿⣿⣿⣿⣷⠁⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠠⣹ ⣿⡄⠜⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠄⣿⠿⢋⢡⣤⣿⣿⣿⣿⣿⣿⣿⣶⣴⡈⡙⠿⣿⠐⣸⣿⣿⣿⣿⣿⣿⣿⡿⢋⢅⢆⡬⡐⣿ ⣿⡿⢢⢴⣲⣶⣌⢻⣿⣿⣿⣿⣿⣿⡇⠌⢡⣨⣶⣿⣿⠟⡛⡩⡩⡍⡍⡛⡻⣿⣿⣶⣅⡌⢂⢸⣿⣿⣿⣿⣿⣿⣿⠡⡱⡱⡍⣿⣖⢸ ⣿⡇⢯⡻⡮⣟⣿⠀⣿⣿⣿⣿⠟⡋⡐⢸⣿⣿⣿⠟⡡⡪⡪⡪⡪⡪⡪⣪⣖⢌⠻⣿⣿⣿⡆⢂⠙⠻⣿⣿⣿⣿⣿⡆⠪⢪⢪⠪⢂⣾ ⣿⣷⡘⠎⢟⠵⠃⠼⣿⣿⠟⡁⣢⣾⢁⢺⣿⣿⠏⢔⢱⢱⢱⢱⢱⢱⢱⢙⣿⣷⡕⠹⣿⣿⡇⠌⣷⣅⠌⠻⣿⣿⠟⠡⣵⣶⣶⣶⣿⣿ ⣿⣿⣿⣷⣶⣾⣷⣔⠈⠅⣢⣾⣿⣿⠠⢸⣿⣿⠨⡢⠣⡣⡣⡣⡣⡣⡣⡣⡪⡻⡫⠅⣿⣿⡇⠂⣿⣿⣿⣮⠈⠅⢬⣾⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⠟⠡⣨⣆⠌⠻⣿⣿⠐⢸⣿⣿⡈⡪⡸⢸⢸⢸⢸⢸⢸⢸⢸⢸⢸⠁⣿⣿⡇⡁⣿⣿⠟⠡⣨⣦⡉⠻⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⡿⠡⣨⣾⣿⣿⣷⣅⡌⢛⠎⢸⣿⣿⣧⠨⡸⡐⢕⢱⢱⢱⢱⢱⢱⢱⠁⣾⣿⣿⡇⠰⢋⢑⣬⣾⣿⣿⣿⣔⢈⠻⣿⣿⣿⣿ ⣿⣿⣿⠏⢄⣵⣿⣿⣿⣿⣿⣿⣿⣦⡂⢙⠻⣿⣿⣷⣔⠘⢌⠆⡕⠜⡌⡪⢘⣠⣾⣿⣿⠟⡃⢅⣶⣿⣿⣿⣿⣿⣿⣿⣷⡈⡙⣿⣿⣿ ⣿⣿⠃⢬⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠂⣆⡌⡙⢿⣿⣿⣶⣶⣤⣥⣶⣶⣿⣿⠿⠋⢅⣢⠐⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠨⢿⣿ ⣿⠃⢬⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠁⣿⣿⣶⣄⡌⠛⠿⣿⣿⣿⣿⠿⠋⢅⣬⣾⣿⣿⠈⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠊⢿ ⡇⢌⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠐⢹⣿⣿⣿⣿⣾⣤⡊⢙⠋⢅⣬⣾⣿⣿⣿⣿⡏⠌⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡎⢘ ⡐⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡎⢸⣿⣿⣿⠿⢛⢉⣐⣴⣮⣄⡊⡙⠿⢿⣿⣿⠇⢢⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠂ ⡆⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⡂⠋⢍⣠⣬⣶⣿⣿⣿⣿⣿⣿⣶⣦⣆⡨⠙⠨⠸⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢃⢱ ⣿⣦⡂⡙⢛⠿⠿⠿⠿⡛⢛⠛⡉⢅⣂⣥⡠⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⣁⣮⣄⣂⡩⢉⠛⡛⢛⠻⢛⠛⡛⠍⣐⣴⣿ ⣿⣿⣿⣷⣶⣶⣵⣬⣶⣶⣶⣿⣿⣿⣿⣿⣧⠂⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠠⣼⣿⣿⣿⣿⣿⣷⣶⣶⣶⣶⣶⣶⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⡙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⢲⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠜⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⢥⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡔⠘⢿⣿⣿⣿⣿⣿⣿⡿⠃⢬⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣮⡀⠛⠿⣿⣿⠿⠋⣂⣵⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠿⠻⠿⠻⠿⠻⠿⠻⠿⠻⠿⠻⠟⠿⠻⠟⠿⠻⠟⠿⠻⠿⠺⠔⠄⠂⠦⠳⠟⠿⠻⠟⠿⠻⠟⠿⠻⠟⠿⠻⠟⠿⠻⠟⠿⠻⠿⠻⠿⠻
This solves the neutron transport equation for one-dimensional problems in both slab and sphere geometry. The discrete ordinates method is used to solve the equation and numba is used to accelerate the transport sweeps. This code can be used to solve fixed source, time dependent, and criticality problems.
- Spatial Discretization: Diamond Difference
- Temporal Discretization: Backward Euler, BDF2
- Multigroup Convergence: Source Iteration, DMD
- K-eigenvalue Convergence: Power Iteration
This is an experimental code that explores different acceleration and data saving techniques related to the neutron transport equation.
-
DJINN incorporates Deep Jointly-Informed Neural Networks into the SN code for Σs Φ and Σf Φ calculations1.
-
SVD-DJINN incorporates an SVD into the SN code for the Σs and Σf matrices1.
-
HYBRID separates the collided and uncollided terms to be used with different numbers of ordinates (N) and energy groups (G) for time-dependent problems2.
The documentation is built automatically using Sphinx and deployed to GitHub Pages. You can find the latest documentation at:
https://bwhewe-13.github.io/discrete1/
To build the documentation locally:
# Install dependencies
python -m pip install -r docs/requirements.txt
# Build HTML docs
cd docs
make html
# Output will be in docs/build/htmlTo set up the development environment:
# Clone the repository
git clone https://github.com/bwhewe-13/discrete1.git
cd discrete1
# Install package with development dependencies
python -m pip install -e ".[dev]"
# Install pre-commit hooks
pre-commit installTo run the tests with coverage reporting:
pytestCoverage reports will be generated in coverage_html/index.html and coverage.xml.
1 Ben Whewell and Ryan G. McClarren, (2022). Data Reduction in Deterministic Neutron Transport Calculations Using Machine Learning. Annals of Nuclear Energy, 176, p .109276. DOI: 10.1016/j.anucene.2022.109276.
2 Ben Whewell, Ryan G. McClarren, Cory D. Hauck, and Minwoo Shin, (2023). Multigroup Neutron Transport Using a Collision-Based Hybrid Method, Nuclear Science and Engineering, 197:7, 1386-1405, DOI: 10.1080/00295639.2022.2154119.