Skip to content

Commit

Permalink
Merge branch 'improved_energy_distribution' of github.com:fusion-ener…
Browse files Browse the repository at this point in the history
…gy/openmc-plasma-source into improved_energy_distribution
  • Loading branch information
shimwell committed Mar 5, 2024
2 parents 61112ad + 42ae6a5 commit 8bd1dbe
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/openmc_plasma_source/fuel_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def get_neutron_energy_distribution(
E_pspec = np.linspace(0, 12, num_of_vals) # E_pspec is exspected in MeV units

DTmean, DTvar = nst.DTprimspecmoments(ion_temperature_kev)
print('DTmean', DTmean)
print("DTmean", DTmean)
DDmean, DDvar = nst.DDprimspecmoments(ion_temperature_kev)

if ["D", "T"] == sorted(set(fuel.keys())):
Expand All @@ -67,7 +67,11 @@ def get_neutron_energy_distribution(
dd_source = openmc.stats.muir(e0=2.5e6, m_rat=4, kt=ion_temperature)
dt_source = openmc.stats.muir(e0=14.06e6, m_rat=5, kt=ion_temperature)
# todo look into combining distributions openmc.data.combine_distributions()
return [tt_source, dd_source, dt_source], [strength_TT, strength_DD, strength_DT]
return [tt_source, dd_source, dt_source], [
strength_TT,
strength_DD,
strength_DT,
]

elif ["D"] == sorted(set(fuel.keys())):

Expand All @@ -81,4 +85,3 @@ def get_neutron_energy_distribution(
dNdE_TT = strength_TT * nst.dNdE_TT(E_pspec, ion_temperature_kev)
tt_source = openmc.stats.Tabular(E_pspec * 1e6, dNdE_TT)
return [tt_source], [strength_TT]

0 comments on commit 8bd1dbe

Please sign in to comment.