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:
statefluidsim.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.

Returns:
tendenciesfluidsim.base.setofvariables.SetOfVariables

An array containing the tendencies for the variables.

Notes

The Lotka-Volterra equations can be written

\[\dot X = AX - B XY, \dot Y = -CY + D XY.\]
class fluidsim.solvers.models0d.predaprey.solver.StatePredaPrey(sim, oper=None)[source]

Bases: StateBase

static _complete_info_solver(info_solver)[source]

Complete the info_solver container (static method).

Classes

InfoSolverPredaPrey([only_root])

Contain the information on the solver predaprey.

Simul(*args, **kargs)

Solve the Lotka-Volterra equations.

StatePredaPrey(sim[, oper])