carrion_dynamics: Carrion dynamics

Description Usage Arguments Details Value See Also

View source: R/UR_dynamics.R

Description

Calculates the biomass of carrion (dead animals) at the next timestep from the current biomass.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
carrion_dynamics(
  params,
  n,
  n_pp,
  n_other,
  rates,
  t,
  dt,
  carrion_external = params@other_params$UR$carrion_external,
  ...
)

Arguments

params

A MizerParams object

n

A matrix of current species abundances (species x size)

n_pp

A vector of current plankton abundance by size

n_other

List of abundances of other dynamic components

rates

A list of rates as returned by getRates()

t

Current time

dt

Time step size

carrion_external

External inflow rate of carrion biomass

...

Unused

Details

The equation for the time evolution of the carrion biomass B is assumed to be of the form

dB/dt = inflow - consumption * B + external

where

This equation is solved analytically to

B(t+dt) = B(t) exp(-consumption * dt) +(inflow + external)/(consumption) * (1 - exp(-consumption * dt)).

This avoids the stability problems that would arise if we used the Euler method to solve the equation numerically.

Value

A single number giving the biomass of carrion at next time step

See Also

Other resource dynamics functions: detritus_dynamics()


gustavdelius/mizerUR documentation built on June 24, 2020, 6:28 p.m.