fluidsim.solvers.models0d.predaprey.solver
Predator-prey solver (fluidsim.solvers.models0d.predaprey.solver
)
This module provides classes to solve the Lotka-Volterra equations.
- class fluidsim.solvers.models0d.predaprey.solver.InfoSolverPredaPrey(only_root=False, **kargs)[source]
Bases:
InfoSolverBase
Contain the information on the solver predaprey.
- class fluidsim.solvers.models0d.predaprey.solver.Simul(*args, **kargs)[source]
Bases:
SimulBase
Solve the Lotka-Volterra equations.
- InfoSolver
alias of
InfoSolverPredaPrey
- static _complete_params_with_default(params)[source]
Complete the params container (static method).
- tendencies_nonlin(state=None, old=None)[source]
Compute the nonlinear tendencies.
- Parameters:
- state
fluidsim.base.setofvariables.SetOfVariables
optional
Array containing the state. If state is not None, the variables are computed from it, otherwise, they are taken from the global state of the simulation, self.state.
These two possibilities are used during the Runge-Kutta time-stepping.
- state
- Returns:
- tendencies
fluidsim.base.setofvariables.SetOfVariables
An array containing the tendencies for the variables.
- tendencies
Notes
The Lotka-Volterra equations can be written
\[\dot X = AX - B XY, \dot Y = -CY + D XY.\]
Classes
|
Contain the information on the solver predaprey. |
|
Solve the Lotka-Volterra equations. |
|