Calculate nutrient balance (Mid-level - Main function)
Source:R/07-nutrient-regeneration.R
calculate_nutrient_balance.RdCalculates daily nitrogen and phosphorus fluxes (ingestion, retention, excretion) for a fish using prey and predator elemental concentrations.
Experimental
Nutrient regeneration modelling is an **experimental feature** under active development. This function can be called directly to compute daily N and P fluxes for a single time step, but it is **not yet integrated** into the main `run_fb4()` simulation loop. Full integration (automatic daily nutrient tracking, inclusion in `fb4_result` objects, and TMB backend support) is planned for a future release. The API may change.