Skip to content

Instantly share code, notes, and snippets.

View paulromano's full-sized avatar

Paul Romano paulromano

View GitHub Profile
@paulromano
paulromano / Speed calculation roundoff.ipynb
Created December 18, 2023 21:04
Notebook demonstrating roundoff error in calculation speed
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@paulromano
paulromano / totnu_develop.diff
Last active November 23, 2023 02:02
Changes in OpenMC to imitate MCNP's TOTNU option
diff --git a/src/nuclide.cpp b/src/nuclide.cpp
index ae3085aff2..13816f59a5 100644
--- a/src/nuclide.cpp
+++ b/src/nuclide.cpp
@@ -409,7 +409,7 @@ void Nuclide::create_derived(
for (int i = 0; i < n; ++i) {
double E = grid_[t].energy[i];
xs_[t](i, XS_NU_FISSION) =
- nu(E, EmissionMode::total) * xs_[t](i, XS_FISSION);
+ nu(E, EmissionMode::prompt) * xs_[t](i, XS_FISSION);
@paulromano
paulromano / Scattering distribution.ipynb
Created October 24, 2023 01:30
Example of looking at scattering angle distribution
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@paulromano
paulromano / Triangle region.ipynb
Created June 20, 2023 01:10
Creating a triangle region
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@paulromano
paulromano / Depletion changing material.ipynb
Created January 9, 2022 19:45
Example of running a depletion calculation while changing a material in the middle
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@paulromano
paulromano / Flux spectrum.ipynb
Created April 27, 2018 11:33
Example showing how to tally a flux spectrum
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@paulromano
paulromano / NJOY bug.ipynb
Last active July 23, 2022 17:28
Supporting plots for NJOY bug report
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@paulromano
paulromano / Plot source points.ipynb
Created June 7, 2021 10:17
Plot spatial distribution of source points from a source file
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@paulromano
paulromano / Rotating parallelepiped.ipynb
Created June 7, 2022 11:47
Demonstration of rotating a parallelepiped
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.