% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate.R
\name{debtox_simulate}
\alias{debtox_simulate}
\title{Simulate DEBtox Growth Under Toxicant Exposure}
\usage{
debtox_simulate(
  t_max,
  p_Am,
  p_M,
  kappa,
  v,
  E_G,
  E0,
  L0,
  k_d,
  z_w,
  b_w,
  C_w,
  f = 1,
  dt = 0.5
)
}
\arguments{
\item{t_max}{End time (days).}

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

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

\item{kappa}{Allocation fraction to soma.}

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

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

\item{E0}{Initial reserve density (J cm\eqn{^{-3}}).}

\item{L0}{Initial structural length (cm).}

\item{k_d}{Damage recovery rate (d\eqn{^{-1}}).}

\item{z_w}{No-effect concentration (NEC).}

\item{b_w}{Effect intensity.}

\item{C_w}{External toxicant concentration.}

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

\item{dt}{Integration step size (days).  Default 0.5.}
}
\value{
Data frame with columns \code{time}, \code{E}, \code{V}, \code{L}, \code{R}
(reproduction buffer), \code{Dw} (scaled damage).
}
\description{
Forward-integrates the 4-state DEBtox ODE (\eqn{E}, \eqn{V},
\eqn{E_R}, \eqn{D_w}) with stress on assimilation.  Standalone
simulator independent of Stan.
}
\examples{
traj <- debtox_simulate(t_max = 42, p_Am = 5, p_M = 0.5,
  kappa = 0.75, v = 0.2, E_G = 400, E0 = 1, L0 = 0.1,
  k_d = 0.3, z_w = 15, b_w = 0.003, C_w = 80)
plot(traj$time, traj$L, type = "l")
}
