Specify nonlinear solver maximum iterations in implicit tau
The MaxIterations
property specifies the
maximum number of iterations for the nonlinear solver in impltau
.
It is a property of the SolverOptions
object. SolverOptions
is
a property of the configset
object.
The implicit tau solver in SimBiology® software internally
uses a nonlinear solver to solve a set of algebraic nonlinear equations
at every simulation step. Starting with an initial guess at the solution,
the nonlinear solver iteratively tries to find the solution to the
algebraic equations. The closer the initial guess is to the solution,
the fewer the iterations the nonlinear solver will take before it
finds a solution. MaxIterations
specifies the maximum
number of iterations the nonlinear solver should take before it issues
a “failed to converge” error. If you get this error
during simulation, try increasing MaxIterations
.
The default value of MaxIterations
is 15
.
Applies to | Object: SolverOptions |
Data type | int |
Data values | >0. Default is 15 . |
Access | Read/write |
This example shows how to change MaxIterations
settings.
Retrieve the configset
object from
the modelObj
, and change the SolverType
to impltau
.
modelObj = sbiomodel('cell'); configsetObj = getconfigset(modelObj); set(configsetObj, 'SolverType', 'impltau');
Change the MaxIterations
to 25
.
set(configsetObj.SolverOptions, 'MaxIterations', 25); get(configsetObj.SolverOptions, 'MaxIterations') ans = 25