Skip to contents

Calculates the carrion biomass at the next timestep from the current carrion biomass.

Usage

carrion_dynamics(params, n, n_other, rates, dt, ...)

Arguments

params

A MizerParams object

n

A matrix of current species abundances (species x size)

n_other

Other dynamic components. Only n_other$carrion is used.

rates

A list of rates as returned by getRates()

dt

Time step size

...

Unused

Value

A single number giving the carrion biomass at next time step

Details

The time evolution of the carrion biomass \(B\) is described by $$dB/dt = \tt{production} - \tt{consumption} * B$$ where

  • consumption is the mass-specific rate of consumption due to consumption calculated with carrion_consumption_ms(),

  • production is the rate at which the rest of the system produces carrion biomass, calculated with getCarrionProduction().

The dynamical equation is solved analytically to $$B(t+dt) = B(t)\exp(-\tt{consumption} \cdot dt) +\frac{\tt{production}}{\tt{consumption}} (1-\exp(-\tt{consumption} \cdot dt)).$$ This avoids the stability problems that would arise if we used the Euler method to solve the equation numerically.