mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Add ResultsList.get_depletion_time method
Returns a numpy array with the time spent depleting materials between transport steps. This array has shape (N-1, 1), where N is the number of transport steps
This commit is contained in:
parent
d55c77a65f
commit
a31e6ced65
1 changed files with 15 additions and 0 deletions
|
|
@ -103,3 +103,18 @@ class ResultsList(list):
|
|||
eigenvalue[i] = result.k[0]
|
||||
|
||||
return time, eigenvalue
|
||||
|
||||
def get_depletion_time(self):
|
||||
"""Return an array of time spent depleting materials
|
||||
|
||||
..note::
|
||||
|
||||
Will have one fewer row than number of other methods,
|
||||
like :meth:`get_eigenvalues`, because no depletion
|
||||
is performed at the final transport stage
|
||||
|
||||
"""
|
||||
times = np.empty((len(self) - 1, 1))
|
||||
for ix, res in enumerate(self[:-1]):
|
||||
times[ix] = res.proc_time[0]
|
||||
return times
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue