olm Package

The olm package provides a chemical solution object along with a suite of functions for conducting geochemical calculations. The package is currently predominantly oriented toward calcium carbonate geochemistry and common calculations conducted for karst waters. The calcite module includes functions for creating solutions from a few chemical parameters (such as pCO2 and hardness), as well as functions for calculating equilibrium solutions and dissolution rates according to the PWP equation. Documentation and code development are still ongoing.

olm.calcite Module

solutionFromCaPCO2(Ca, PCO2[, T_C, per_tol, ...])

Creates a solution object from a given concentration of calcium and PCO2.

solutionFromCaPCO2Relaxed(Ca, PCO2[, T_C])

Creates a solution object from a given concentration of calcium, PCO2, and optional temperature.

solutionFrompHCaRelaxed(Ca, pH[, T_C])

Creates a solution object from a given concentration of calcium and pH.

H2CO3fromPCO2(PCO2[, T_K, T_C])

Calculate concentration of carbonic acid in equilibrium with a certain PCO2.

H2CO3sfromPCO2(PCO2[, T_K, T_C])

Calculate concentration of carbonic acid + aqueous CO2 in equilibrium with a certain PCO2.

PCO2FromSolution(sol)

Calculate partial pressure of CO2 from a solution object.

activityHFromPCO2(PCO2[, T_C, CaEq])

Calculates equilibrium activity of H+ given PCO2 using relaxed charge balance.

concCaEqFromPCO2(PCO2[, T_C])

Calculates the equilibrium concentration of calcium using PCO2 and temp.

PCO2EqFromCa(Ca[, T_C, I])

Calculates the equilibrium PCO2 for a given concentration of calcium and temp.

concCaEqFromSolution(sol)

Calculates the equilibrium concentration of calcium for a solution object.

concHFromCaPCO2Relaxed(Ca, PCO2[, T_C])

Calculates concentration of H+ from calcium concentration and PCO2 using relaxed charge balance.

pwpFromSolution(sol[, PCO2, method])

Calculates the PWP dissolution rate from a solution object.

pwpRateTheory([a_Ca, a_H2CO3s, a_H, a_HCO3, ...])

Calculates PWP rate using theoretical relation for kappa4 from PWP.

pwpRatePascal([a_Ca, a_H2CO3s, a_H, a_HCO3, ...])

Calculates PWP rate using relation for kappa4 found in PASCAL code.

pwpRateFranci([a_Ca, a_H2CO3s, a_H, a_HCO3, ...])

Calculates PWP rate using relation for kappa4 used in Franci Gabrovsek's code.

palmerRate(T_C, PCO2, Sat_Ratio[, rho, ...])

Calculates the calcite/limestone dissolution rate given temperature, PCO2, and a calcium saturation ratio using relationship from Palmer (1991).

palmerFromSolution(sol[, PCO2, rho, impure])

Calculates the calcite/limestone dissolution rate from a solution object using relationship from Palmer (1991).

createPalmerInterpolationFunctions([impure])

Creates interpolation functions for kinetic rate constants using linear interpolation from Table from Palmer (1991).

dissRateFromCaPCO2(Ca, PCO2, T_C[, rho, ...])

Calculates the calcite/limestone dissolution rate from given calcium concentration and PCO2.

pwp_to_mm_yr(R[, rho])

Converts the PWP dissolution rates from mmol/cm^2/s to mm/year.

calc_K_H(T_K)

Calculates Henry's law constant for CO2.

calc_K_W(T_K)

Calculates mass action constant for dissociation water.

calc_K_0(T_K)

Calculates mass action constant for conversion of CO2 to carbonic acid.

calc_K_1(T_K)

Calculates mass action constant for dissociation of carbonic acid.

calc_K_2(T_K)

Calculates mass action constant for dissociation of bicarbonate.

calc_K_c(T_K)

Calculates equilibrium constant for calcite.

calc_kappa1(T_K)

Calculates kappa1 in the PWP equation.

calc_kappa2(T_K)

Calculates kappa2 in the PWP equation.

calc_kappa3(T_K)

Calculates kappa3 in the PWP equation.

calc_kappa4Theory(T_K, PCO2, a_H2CO3s)

Calculates kappa4 in the PWP equation using the theoretical relation for kappa4 from Plummer, Wigley, and Parkhurst (1978) Equation 25 (as described in Dreybrodt [1988] equation 6.22b).

calc_kappa4Pascal(T_K, PCO2)

Calculates kappa4 in the PWP equation using fit from Buhmann and Dreybrodt (1985).

calc_kappa4Franci(T_K, a_H, a_H2CO3s)

Calculates kappa4 in the PWP equation using approach from Franci's code.

calc_k1(T_K)

Calculates k1+ kinetic constant from Table 1 of Kaufmann and Dreybrodt (2007).

calc_k2(T_K)

Calculates k2+ kinetic constant from Table 1 of Kaufmann and Dreybrodt (2007).

calc_k_neg1(T_K)

Calculates k1- kinetic constant from Table 1 of Kaufmann and Dreybrodt (2007).

calc_k_neg2(T_K)

Calculates k2- kinetic constant from Table 1 in Kaufmann and Dreybrodt (2007).

olm.general Module

solution(constituents, concentrations, units)

A solution class, that is used for calculations related to chemical solutions.

condTo25(cond, temp)

Converts given value of specific conductance to the value at 25 C.

HardnessFromCond(cond[, T_C])

Function to estimate total hardness as mg/L CaCO3 from solution specific conductance (microS/cm) using the empirical equation from Krawczyk and Ford (2006), Earth Surface Processes and Landforms.

CaFromCond(cond[, T_C, mol_L])

Function to estimate Ca mg/L from solution specific conductance (microS/cm) using the empirical equation from Krawczyk and Ford, (2006), Earth Surface Processes and Landforms.

CtoK(T_C)

Converts Celsius to Kelvin.

KtoC(T_K)

Converts Kelvin to Celsius.

DebyeHuckel(I, z, r[, T])

Calculates activity coefficient, gamma, using the Debye-Huckel equation.

neutralGamma(I)

Calculates the activity coefficient for neutral species.

gamma(ion, I[, T_C])

Calculates activity coefficient, gamma, for a given ion name.

approxI(metals_conc)

Calculates approximate ionic strength from the total concentration of metals.

molL_to_mgL(molL, ion)

Converts concentrations from mol/L to mg/L.

mgL_to_molL(mgL, ion)

Converts concentrations from mg/L to mol/L.

mmolL_to_meqL(mmolL, ion)

Calculates milliequivalents per liter from mmol concentration.

molL_to_meqL(molL, ion)

Calculates milliequivalents per liter from molar concentration.

getProperties()

Returns the dictionary containing ion properties.

Subpackages