mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
update doc of openmc.deplete and openmc.Model.deplete
This commit is contained in:
parent
87aef6dbab
commit
952bddb61e
2 changed files with 12 additions and 17 deletions
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
.. module:: openmc.deplete
|
||||
|
||||
Two functions are provided that implement different time-integration algorithms
|
||||
for depletion calculations.
|
||||
Several functions are provided that implement different time-integration
|
||||
algorithms for depletion calculations.
|
||||
|
||||
.. autosummary::
|
||||
:toctree: generated
|
||||
|
|
@ -16,6 +16,10 @@ for depletion calculations.
|
|||
|
||||
integrator.predictor
|
||||
integrator.cecm
|
||||
integrator.cf4
|
||||
integrator.epc_rk4
|
||||
integrator.si_celi
|
||||
integrator.si_leqi
|
||||
|
||||
Each of these functions expects a "transport operator" to be passed. An operator
|
||||
specific to OpenMC is available using the following class:
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ class Model(object):
|
|||
for plot in plots:
|
||||
self._plots.append(plot)
|
||||
|
||||
def deplete(self, timesteps, power, chain_file=None, method='cecm',
|
||||
def deplete(self, timesteps, chain_file=None, method='cecm',
|
||||
**kwargs):
|
||||
"""Deplete model using specified timesteps/power
|
||||
|
||||
|
|
@ -131,17 +131,11 @@ class Model(object):
|
|||
timesteps : iterable of float
|
||||
Array of timesteps in units of [s]. Note that values are not
|
||||
cumulative.
|
||||
power : float or iterable of float
|
||||
Power of the reactor in [W]. A single value indicates that the power
|
||||
is constant over all timesteps. An iterable indicates potentially
|
||||
different power levels for each timestep. For a 2D problem, the
|
||||
power can be given in [W/cm] as long as the "volume" assigned to a
|
||||
depletion material is actually an area in [cm^2].
|
||||
chain_file : str, optional
|
||||
Path to the depletion chain XML file. Defaults to the
|
||||
:envvar:`OPENMC_DEPLETE_CHAIN` environment variable if it exists.
|
||||
method : {'cecm', 'predictor'}
|
||||
Integration method used for depletion
|
||||
method : string
|
||||
Integration method used for depletion (e.g., 'cecm', 'predictor')
|
||||
**kwargs
|
||||
Keyword arguments passed to integration function (e.g.,
|
||||
:func:`openmc.deplete.integrator.cecm`)
|
||||
|
|
@ -156,12 +150,9 @@ class Model(object):
|
|||
op = dep.Operator(self.geometry, self.settings, chain_file)
|
||||
|
||||
# Perform depletion
|
||||
if method == 'predictor':
|
||||
dep.integrator.predictor(op, timesteps, power, **kwargs)
|
||||
elif method == 'cecm':
|
||||
dep.integrator.cecm(op, timesteps, power, **kwargs)
|
||||
else:
|
||||
check_value('method', method, ('cecm', 'predictor'))
|
||||
check_value('method', method, ('cecm', 'predictor', 'cf4', 'epc_rk4',
|
||||
'si_celi', 'si_leqi'))
|
||||
getattr(dep.integrator, method)(op, timesteps, **kwargs)
|
||||
|
||||
def export_to_xml(self):
|
||||
"""Export model to XML files."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue