mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Raise exception if timestep in [MWd/kg] is given with zero power
This commit is contained in:
parent
355ecd3747
commit
bc1ab31746
2 changed files with 4 additions and 1 deletions
|
|
@ -719,6 +719,9 @@ class Integrator(ABC):
|
|||
elif unit.lower() == 'mwd/kg':
|
||||
watt_days_per_kg = 1e6*timestep
|
||||
kilograms = 1e-3*operator.heavy_metal
|
||||
if rate == 0.0:
|
||||
raise ValueError("Cannot specify a timestep in [MWd/kg] when"
|
||||
" the power is zero.")
|
||||
days = watt_days_per_kg * kilograms / rate
|
||||
seconds.append(days*_SECONDS_PER_DAY)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ __all__ = ["StepResult"]
|
|||
|
||||
|
||||
class StepResult:
|
||||
"""Output of a depletion run
|
||||
"""Result of a single depletion timestep
|
||||
|
||||
Attributes
|
||||
----------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue