mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-21 06:25:30 -04:00
Clip negative atom densities that result from CRAM (#3879)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
a1df5842e0
commit
1f7ac4215f
2 changed files with 6 additions and 1 deletions
|
|
@ -738,6 +738,11 @@ class Integrator(ABC):
|
|||
results = deplete(
|
||||
self._solver, self.chain, n, rates, dt, i, matrix_func,
|
||||
self.transfer_rates, self.external_source_rates)
|
||||
|
||||
# Clip unphysical negative number densities
|
||||
for r in results:
|
||||
r.clip(min=0.0, out=r)
|
||||
|
||||
return time.time() - start, results
|
||||
|
||||
@abstractmethod
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ DepletionSolutionTuple = namedtuple(
|
|||
|
||||
predictor_solution = DepletionSolutionTuple(
|
||||
PredictorIntegrator, np.array([1.0, 2.46847546272295, 4.11525874568034]),
|
||||
np.array([1.0, 0.986431226850467, -0.0581692232513460]))
|
||||
np.array([1.0, 0.986431226850467, 0.0]))
|
||||
|
||||
|
||||
cecm_solution = DepletionSolutionTuple(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue