solvedose_alk function

Calculate a desired chemical dose for a target alkalinity

Calculate a desired chemical dose for a target alkalinity

This function calculates the required amount of a chemical to dose based on a target alkalinity and existing water quality. Returns numeric value for dose in mg/L. Uses uniroot on the chemdose_ph function.

solvedose_alk(water, target_alk, chemical)

Arguments

  • water: Source water of class "water" created by define_water
  • target_alk: The final alkalinity in mg/L as CaCO3 to be achieved after the specified chemical is added.
  • chemical: The chemical to be added. Current supported chemicals include: acids: "hcl", "h2so4", "h3po4", "co2", bases: "naoh", "na2co3", "nahco3", "caoh2", "mgoh2"

Returns

A numeric value for the required chemical dose.

Examples

dose_required <- define_water(ph = 7.9, temp = 22, alk = 100, 80, 50) %>% solvedose_alk(target_alk = 150, "naoh")

See Also

define_water

  • Maintainer: Sierra Johnson
  • License: Apache License (>= 2) | MIT + file LICENSE
  • Last published: 2025-01-22