% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{deb_fluxes}
\alias{deb_fluxes}
\title{Compute DEB Energy Fluxes}
\usage{
deb_fluxes(E, V, f, p_Am, p_M, kappa, v, E_G, k_J = 0, E_Hp = 0)
}
\arguments{
\item{E}{Reserve energy (J).}

\item{V}{Structural volume (cm\eqn{^3}).}

\item{f}{Scaled functional response \eqn{f \in [0, 1]}.}

\item{p_Am}{Surface-area-specific maximum assimilation rate
\eqn{\{p_{Am}\}} (J d\eqn{^{-1}} cm\eqn{^{-2}}).}

\item{p_M}{Volume-specific somatic maintenance rate \eqn{[p_M]}
(J d\eqn{^{-1}} cm\eqn{^{-3}}).}

\item{kappa}{Allocation fraction to soma \eqn{\kappa \in (0, 1)}.}

\item{v}{Energy conductance (cm d\eqn{^{-1}}).}

\item{E_G}{Specific cost of structure \eqn{[E_G]} (J cm\eqn{^{-3}}).}

\item{k_J}{Maturity maintenance rate coefficient \eqn{k_J}
(d\eqn{^{-1}}).  Default 0.}

\item{E_Hp}{Maturity at puberty \eqn{E_H^p} (J).  Default 0.}
}
\value{
Named list with fluxes \code{p_A}, \code{p_C}, \code{p_M}, \code{p_G}, \code{p_J},
\code{p_R}, structural length \code{L} (\eqn{V^{1/3}}), and scaled reserve
density \code{e} (\eqn{E / ([E_m] V + 10^{-12})}).  The \eqn{10^{-12}}
stabilisation prevents division by zero when \eqn{V = 0}; in that
edge case \code{e} returns a small finite number rather than \code{Inf} or
\code{NA}.
}
\description{
Given current state \eqn{(E, V)} and the core DEB parameters, computes
all standard energy fluxes defined by the \eqn{\kappa}-rule
(Kooijman, 2010, Eqs. 2.3--2.12):
}
\details{
\describe{
\item{\eqn{\dot{p}_A}}{Assimilation: \eqn{f \{p_{Am}\} L^2}.}
\item{\eqn{\dot{p}_C}}{Mobilisation: \eqn{E v L / (E + [E_G] V)}.}
\item{\eqn{\dot{p}_M}}{Somatic maintenance: \eqn{[p_M] V}.}
\item{\eqn{\dot{p}_G}}{Growth: \eqn{\max(\kappa \dot{p}_C - \dot{p}_M, 0)}.}
\item{\eqn{\dot{p}_J}}{Maturity maintenance: \eqn{k_J E_H^p}.}
\item{\eqn{\dot{p}_R}}{Reproduction: \eqn{\max((1-\kappa)\dot{p}_C - \dot{p}_J, 0)}.}
}
}
\examples{
# Energy fluxes for a 1 cm^3 organism with typical Eisenia parameters
deb_fluxes(E = 1, V = 1, f = 1, p_Am = 5, p_M = 0.5,
  kappa = 0.75, v = 0.2, E_G = 4400)
}
\references{
Kooijman, S.A.L.M. (2010). \emph{Dynamic Energy Budget Theory for Metabolic
Organisation}. 3rd edition. Cambridge University Press, Ch. 2.
\doi{10.1017/CBO9780511805400}
}
