Skip to content

Commit 8e5df37

Browse files
committed
more work
1 parent ddc28f5 commit 8e5df37

1 file changed

Lines changed: 28 additions & 12 deletions

File tree

Docs/source/burn_failures.rst

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ There are a few common reasons why the integrator might encounter trouble:
5555
Making the integration robust
5656
=============================
5757

58-
.. index:: integrator.atol_spec, integrator.species_failure_tolerance, integrator.use_jacobian_caching, integrator.do_corrector_validation, integrator.use_burn_retry
58+
.. index:: integrator.atol_spec, integrator.species_failure_tolerance, integrator.use_jacobian_caching, integrator.do_corrector_validation, integrator.use_burn_retry, integrator.X_reject_buffer
5959

6060
Some tips for helping the integrator:
6161

@@ -69,17 +69,33 @@ Some tips for helping the integrator:
6969
it to be larger that ``rtol_spec``. See :ref:`sec:tolerances`
7070
for some discussion.
7171

72-
* Reduce ``integrator.species_failure_tolerance``. This is used to
73-
determine whether a step should be rejected. If any of the mass
74-
fractions are more than ``integrator.species_failure_tolerance``
75-
outside of $[0, 1]$, then the integrator will reject the step and
76-
try again (this is implemented in ``VODE`` and ``BackwardEuler``).
77-
78-
If the value is too large (like ``0.01``), then this could allow the
79-
mass fractions to grow too much outside of $[0, 1]$, and then a
80-
single step rejection is not enough to recover. Setting this value to
81-
be close to the typical scale of a mass fraction that we care about
82-
(closer to ``integrator.atol_spec``) can help.
72+
* Adjust the step-rejection logic in the integrator. This is a
73+
check on the state after the step that rejects the advance
74+
if we find unphysical species. Not every integrator supports
75+
all of these options.
76+
77+
* Reduce ``integrator.species_failure_tolerance``. This is used to
78+
determine whether a step should be rejected. If any of the mass
79+
fractions are more than ``integrator.species_failure_tolerance``
80+
outside of $[0, 1]$, then the integrator will reject the step and
81+
try again (this is implemented in ``VODE`` and ``BackwardEuler``).
82+
83+
If the value is too large (like ``0.01``), then this could allow the
84+
mass fractions to grow too much outside of $[0, 1]$, and then a
85+
single step rejection is not enough to recover. Setting this value to
86+
be close to the typical scale of a mass fraction that we care about
87+
(closer to ``integrator.atol_spec``) can help.
88+
89+
* Increase ``integrator.X_reject_buffer``. This is used in the
90+
check on how much the species changed from one step to the next
91+
(inside of the integrator). We limit the change to a factor of 4
92+
per step. We only check the species that are larger than
93+
``X_reject_buffer * atol_spec``, so if trace species are causing
94+
problems, ``X_reject_buffer`` can be used to ignore them.
95+
96+
* Try the numerical Jacobian (``integrator.jacobian=2``). The
97+
analytic Jacobian is faster to evaluate, but it approximates some
98+
terms. The numerical Jacobian sometimes works better.
8399

84100
* Use the burn retry logic. By setting
85101
``integrator.use_burn_retry=1``, the burn will immediately be

0 commit comments

Comments
 (0)