This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this scrip makes a cadquery geometry, uses cadquery to imprint the surfaces, uses cadquery to mesh the faces of each solid | |
# then makes a moab core object by adding faces one at a time. | |
# if a face appears in two solids then the surface sense will be reversed | |
# work in progress | |
import cadquery as cq | |
import openmc | |
from typing import Tuple | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import openmc | |
import openmc_source_plotter # extends openmc.Source with plotting functions | |
import pint | |
total_energy = pint.Quantity(1, 'GJ') | |
energy_per_dd = pint.Quantity(12.5, 'MeV/particle') | |
energy_per_dt = pint.Quantity(17.6, 'MeV/particle') | |
energy_per_fission = pint.Quantity(200., 'MeV/particle') | |
my_dt_source = openmc.Source() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import openmc | |
from matplotlib.lines import Line2D | |
def plot_thresholds(nuclide="Fe56"): | |
plt.clf() | |
threshold_below_14 = 0 | |
threshold_below_2 = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# makes a sphere of Silver and irradiates it with a 14MeV neutron source. | |
# The activated material emits gammas and these are transported and tallied | |
# on a mesh tally. The resulting decay gamma flux is plotted as a series of | |
# images so that the variation over time can be observed. Note that silver | |
# activation results in Ag110 which has a half life of 24 seconds. The | |
# irradiation and decay timescales are set so that the buildup and decay can be | |
# observed | |
# Makes use of eepeterson branch of OpenMC https://github.com/eepeterson/openmc/tree/r2s_model_wrapper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from copy import deepcopy | |
import numpy as np | |
import openmc | |
import openmc.lib | |
from openmc.mpi import comm | |
from matplotlib import pyplot as plt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/env/python3 | |
""" | |
Script for converting OpenMC mesh in an OpenMC | |
statepoint file to other mesh formats for visualization | |
""" | |
import argparse | |
import sys | |
import math |