Skip to contents

Calculates the flux \(J_i(w)\) (numbers/year) entering each size class from the one below it. This is composed of an advective flux from somatic growth and a diffusive flux from the redistribution of individuals.

Usage

getFlux(
  params,
  n = initialN(params),
  n_pp = initialNResource(params),
  n_other = initialNOther(params),
  t = 0,
  ...
)

Arguments

params

A MizerParams object

n

A matrix of species abundances (species x size).

n_pp

A vector of the resource abundance by size

n_other

A list of abundances for other dynamical components of the ecosystem

t

The time for which to do the calculation (Not used by standard mizer rate functions but useful for extensions with time-dependent parameters.)

...

Unused

Value

An ArraySpeciesBySize object (species x size) with the flux of individuals entering each size class (numbers/year).

Details

At the recruitment size, the flux is simply the recruitment rate \(R_{dd,i}\) (see getRDD()). For sizes below the recruitment size the flux is zero.

Examples

# \donttest{
params <- NS_params
# Project with constant fishing effort for all gears for 20 time steps
sim <- project(params, t_max = 20, effort = 0.5)
# Get the flux at a particular time step
flux <- getFlux(params, n = N(sim)[15, , ], n_pp = NResource(sim)[15, ], t = 15)
# Flux for Sprat of size 2g
flux["Sprat", "2"]
#> [1] 45461076783
# }