olm.general.solution¶
- class olm.general.solution(constituents, concentrations, units, T=25.0, T_units='C', cond=None, pH=None)[source]¶
A solution class, that is used for calculations related to chemical solutions.
- Parameters:
- constituentsarray like
a list (or array) of strings with ion names
- concentrationsarray like
a list (or array) of ion concentrations
- unitsstring or list
a string or list of strings containing concentration units (‘mg/L’, ‘mol/L’, or ‘mmol/L’)
- Tfloat
temperature in degrees Celsius (default=25)
- T_unitsstr
temperature units ‘C’ or ‘K’ (default=’C’)
- condfloat
specific conductance (default=None)
- pHfloat
pH of solution (default=None)
- Attributes:
- ionsdict
A dictionary containing ion activities and concentrations. The values for a given ion are accessed using a the name of the ion as a key. Then, the additional keys ‘activity’, ‘conc_mg’, ‘conc_mol’, ‘conc_mmol’, and ‘meq’ access the ion activity (in units of mol/L), concentration in mg/L, concentration in mol/L, concentration in mmol/L and meq/L, respectively.
- T_Cfloat
temperature of solution in degrees C
- T_Kfloat
temperature of solution in degrees K
Methods
I
()Function to calculate ionic strength of the solution object from full equation using known ion properties.
__init__
(constituents, concentrations, units)activity
(ion)Retrieve the activity of a given ion in the solution in mol/L.
activity_coef
(ion[, I])Calculate activity coefficient, gamma, for a given ion in the solution.
approxI
()Function to calculate approximate ionic strength of solution metal concentration.
charge_balance
([units])Calculate the charge balance error for this solution.
meq
(ion)Retrieve meq for a given ion in the solution.
mg
(ion)Retrieve the concentration of a given ion in the solution in mg/L.
mmol
(ion)Retrieve the molar concentration of a given ion in the solution in mol/L.
mol
(ion)Retrieve the molar concentration of a given ion in the solution in mol/L.