View source: R/06-contaminant-accumulation.R
| calculate_contaminant_accumulation | R Documentation |
Calculates daily contaminant dynamics (uptake, elimination, body burden) for a fish using one of three bioaccumulation models (CONTEQ 1-3).
calculate_contaminant_accumulation(
respiration_o2,
consumption,
weight,
temperature,
current_concentration,
processed_contaminant_params
)
respiration_o2 |
Respiration in g O2/g/day |
consumption |
Vector of consumption by prey type (g/day) |
weight |
Fish weight (g) |
temperature |
Water temperature (deg C) |
current_concentration |
Current concentration in predator (ug/g) |
processed_contaminant_params |
List with processed contaminant parameters |
A named list with at least six elements (all numeric scalars unless noted):
Daily elimination of contaminant (ug/day).
Total daily uptake from food (ug/day); for CONTEQ 3 this is the sum of water and food uptake.
Body burden at end of day (ug); floored at 0.
Whole-body concentration (ug/g wet weight); floored at 0.
Fish weight (g), as supplied.
Integer. CONTEQ equation used (1, 2, or 3).
CONTEQ 3 (Arnot & Gobas 2004) appends two additional elements:
uptake_water (ug/day from water) and uptake_food
(ug/day from food).
Contaminant modelling is an **experimental feature** under active development. This function can be called directly to compute daily bioaccumulation for a single time step, but it is **not yet integrated** into the main 'run_fb4()' simulation loop. Full integration (automatic contaminant tracking across all simulation days, inclusion in 'fb4_result' objects, and TMB backend support) is planned for a future release. The API may change.
# CONTEQ 1: food uptake only, no elimination
params <- list(
CONTEQ = 1,
prey_concentrations = c(0.05, 0.08),
transfer_efficiency = c(0.8, 0.8)
)
calculate_contaminant_accumulation(
respiration_o2 = 0.02, consumption = c(2.0, 1.0),
weight = 100, temperature = 15,
current_concentration = 0.1,
processed_contaminant_params = params
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.