Skip to contents

ok_retention() computes the fraction of incoming total phosphorus (TP) and total nitrogen (TN) that is retained within the reservoir. The retention coefficient is defined as $$R = 1 - C_{lake}/C_{in}$$ and is applied in ok_inlake() to predict in-lake nutrient concentrations.

Three retention model families are supported, selected via the coefficients argument to ok_load():

"walker_model1" (Walker BATHTUB Model 1, default)

Second-order available-phosphorus sedimentation (Walker 1985, 1996). The mass balance solution is $$C_{lake} = \frac{-1 + \sqrt{1 + 4 K A_1 C_{in} \tau}}{2 K A_1 \tau}$$ where \(A_1 = 0.17 \cdot Q_s/(Q_s + 13.3)\) for TP and \(B_1 = 0.0045 \cdot Q_s/(Q_s + 7.2)\) for TN, with \(Q_s = \max(Z/T,\,4)\).

"vollenweider" (Vollenweider 1976 / Larsen-Mercier 1976)

First-order hydraulic-residence model: $$R_{TP} = \frac{1}{1 + 1/\sqrt{\tau}}$$ Mathematically equivalent to Walker BATHTUB Model 5 (Northern Lakes). Single parameter (residence time), no ortho-P data required. Walker (1996) notes this form is not calibrated to Corps of Engineers reservoir data.

"settling_velocity" (used as TN companion to vollenweider)

$$R = v_s / (v_s + q_s)$$ where \(v_s\) is an apparent settling velocity (m/yr).

Usage

ok_retention(x, tp_retention_override = NULL, tn_retention_override = NULL)

Arguments

x

An okBATHTUB object produced by ok_hydraulics().

tp_retention_override

Numeric between 0 and 1. If supplied, bypasses the equation and uses this value directly. Useful when observed retention is available from paired inflow/outflow monitoring. Default NULL.

tn_retention_override

Numeric between 0 and 1. Same as above for TN. Default NULL.

Value

An okBATHTUB object at pipeline step "retention" with the following fields added to $data:

tp_retention_coeff

TP retention coefficient (0-1).

tn_retention_coeff

TN retention coefficient (0-1), or NULL if TN was not supplied.

tp_retention_form, tn_retention_form

Character. Which retention equation was applied.

Examples

result <- ok_load(
  inflow_m3yr   = 45e6,
  tp_inflow_ugl = 120,
  tn_inflow_ugl = 1800
) |>
  ok_hydraulics(surface_area_ha = 890, mean_depth_m = 4.2) |>
  ok_retention()
print(result)
#> -- okBATHTUB Result --
#>   Pipeline step : retention
#>   Segment       : main
#>   Coefficients  : walker
#> 
#>   inflow_m3yr                 : 4.5e+07
#>   tp_inflow_ugl               : 120
#>   tp_load_kgyr                : 5400
#>   tn_inflow_ugl               : 1800
#>   tn_load_kgyr                : 8.1e+04
#>   surface_area_ha             : 890
#>   surface_area_m2             : 8.9e+06
#>   mean_depth_m                : 4.2
#>   volume_m3                   : 3.738e+07
#>   outflow_m3yr                : 4.5e+07
#>   hydraulic_residence_time_yr : 0.8307
#>   areal_water_load_myr        : 5.056
#>   tp_retention_coeff          : 0.632
#>   tn_retention_coeff          : 0.5535
#>   tp_retention_form           : walker_model1
#>   tn_retention_form           : walker_model1

# Vollenweider / Larsen-Mercier retention
result_v <- ok_load(
  inflow_m3yr   = 45e6,
  tp_inflow_ugl = 120,
  coefficients  = "vollenweider"
) |>
  ok_hydraulics(surface_area_ha = 890, mean_depth_m = 4.2) |>
  ok_retention()

# Observed retention coefficient override
result_obs <- ok_load(inflow_m3yr = 45e6, tp_inflow_ugl = 120) |>
  ok_hydraulics(surface_area_ha = 890, mean_depth_m = 4.2) |>
  ok_retention(tp_retention_override = 0.42)