Calculate dissolved inorganic carbon (DIC) and individual carbonate species in an open or closes system at equilibrium.

• carbonic acid* = H2CO3* (aqueous CO2 + H2CO3)

• bicarbonate = HCO3(-)

• carbonate = CO3(2-)

calculate_DIC(pH, pCO2, H2CO3* = solubility * pCO2,
solubility = calculate_solubility("CO2", temperature),
temperature = qty(25, "C"), pKa1 = 6.3, pKa2 = 10.3)

calculate_carbonic_acid(pH, pCO2, DIC,
solubility = calculate_solubility("CO2", temperature),
temperature = qty(25, "C"), pKa1 = 6.3, pKa2 = 10.3)

calculate_bicarbonate(pH, pCO2, DIC,
solubility = calculate_solubility("CO2", temperature),
temperature = qty(25, "C"), pKa1 = 6.3, pKa2 = 10.3)

calculate_carbonate(pH, pCO2, DIC,
solubility = calculate_solubility("CO2", temperature),
temperature = qty(25, "C"), pKa1 = 6.3, pKa2 = 10.3)

## Arguments

pH the pH of the system the partial pressure of CO2 (a pressure quantity) the concentration of H2CO3* (a molarity quantity), by default is calculated automatically from pCO2 the solubility of CO2, by default is determined based on the temperature of the system the temperature of the system, used to calculate the solubility constant the acid dissociation constant for H2CO3* the acid dissociation constant for bicarbonate (HCO3-) dissolved inorganic carbon (a molarity quantity)

## Functions

• calculate_DIC: calculates the concentration of dissolved inorganic carbon based on pH and either pCO2 or H2CO3*. Returns DIC as a molarity quantity.

• calculate_carbonic_acid: calculates the concentration of carbonic acid (H2CO3*) based on pH and either pCO2 or DIC. Returns carbonic acid as a molarity quantity.

• calculate_bicarbonate: calculates the concentration of bicarbonate based on pH and either pCO2 or DIC. Returns bicarbonate concentration as a molarity quantity.

• calculate_carbonate: calculates the concentration of carbonate based on pH and either pCO2 or DIC. Returns carbonate concentration as a molarity quantity.

Other carbonate chemistry: closed_system, open_system
calculate_DIC(pH = 7.0, pCO2 = qty(0.4, "mbar"))#> Molarity [µM]
#>  165.8548calculate_DIC(pH = 7.0, H2CO3* = qty(1, "mM"))#> Molarity [mM]
#>  6.014384