mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
fix unit conversion in openmc.deplete.Results.get_mass (#2761)
Co-authored-by: Nicolas Linden <n.linden@naarea.fr>
This commit is contained in:
parent
7c14603312
commit
910d1df1c9
2 changed files with 2 additions and 2 deletions
|
|
@ -318,7 +318,7 @@ class Results(list):
|
|||
# Divide by volume to get density
|
||||
mass /= self[0].volume[mat_id]
|
||||
elif mass_units == "kg":
|
||||
mass *= 1e3
|
||||
mass /= 1e3
|
||||
|
||||
return times, mass
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ def test_get_mass(res):
|
|||
assert n_cm3 == pytest.approx(n_ref / volume)
|
||||
|
||||
t_min, n_bcm = res.get_mass("1", "Xe135", mass_units="kg", time_units="min")
|
||||
assert n_bcm == pytest.approx(n_ref * 1e3)
|
||||
assert n_bcm == pytest.approx(n_ref / 1e3)
|
||||
assert t_min == pytest.approx(t_ref / 60)
|
||||
|
||||
t_hour, _n = res.get_mass("1", "Xe135", time_units="h")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue