pybamm.
AlgebraicSolver
(method='lm', tol=1e-06)[source]¶Solve a discretised model which contains only (time independent) algebraic equations using a root finding algorithm. Note: this solver could be extended for quasi-static models, or models in which the time derivative is manually discretised and results in a (possibly nonlinear) algebaric system at each time level.
Parameters: |
---|
root
(algebraic, y0_guess, jacobian=None)[source]¶Calculate the solution of the algebraic equations through root-finding
Parameters: |
|
---|
set_up
(model)[source]¶Unpack model, perform checks, simplify and calculate jacobian.
Parameters: | model (pybamm.BaseModel ) – The model whose solution to calculate. Must have attributes rhs and
initial_conditions |
---|---|
Returns: |
|
Raises: | pybamm.SolverError – If the model contains any time derivatives, i.e. rhs equations (in
which case an ODE or DAE solver should be used instead) |
solve
(model)[source]¶Calculate the solution of the model.
Parameters: | model (pybamm.BaseModel ) – The model whose solution to calculate. Must only contain algebraic
equations. |
---|