The Solute Class¶
pyEQL solute class
This file contains functions and methods for managing properties of individual solutes
copyright: | 2013-2015 by Ryan S. Kingsbury |
---|---|
license: | LGPL, see LICENSE for more details. |
-
class
pyEQL.solute.
Solute
(formula, amount, volume, solvent_mass, parameters={})¶ represent each chemical species as an object containing its formal charge, transport numbers, concentration, activity, etc.
Methods
add_moles
(amount, volume, solvent_mass)Increase or decrease the amount of a substance present in the solution add_parameter
(name, magnitude[, units])Add a parameter to the parameters database for a solute get_formal_charge
()Return the formal charge of the solute get_mobility
([temperature])Calculate the ionic mobility of the solute get_molar_conductivity
([temperature])Calculate the molar (equivalent) conductivity for a solute get_molecular_weight
()Return the molecular weight of the solute get_moles
()Return the moles of solute in the solution get_name
()Return the name (formula) of the solute get_parameter
(parameter[, temperature, ...])Return the value of the parameter named ‘parameter’ set_moles
(amount, volume, solvent_mass)Set the amount of a substance present in the solution -
add_moles
(amount, volume, solvent_mass)¶ Increase or decrease the amount of a substance present in the solution
Parameters: amount: str quantity
Amount of substance to add. Must be in mass or substance units. Negative values indicate subtraction of material.
-
add_parameter
(name, magnitude, units='', **kwargs)¶ Add a parameter to the parameters database for a solute
See pyEQL.parameters documentation for a description of the arguments
-
get_formal_charge
()¶ Return the formal charge of the solute
Parameters: None
Returns: int
The formal charge of the solute
-
get_mobility
(temperature=<Quantity(25, 'degC')>)¶ Calculate the ionic mobility of the solute
Parameters: temperature : Quantity, optional
The temperature of the parent solution. Defaults to 25 degC if omitted.
Returns: float : the ionic mobility
Notes
This function uses the Einstein relation to convert a diffusion coefficient into an ionic mobility [1]
\[\mu_i = {F |z_i| D_i \over RT}\]References
[1] Smedley, Stuart I. The Interpretation of Ionic Conductivity in Liquids. Plenum Press, 1980.
-
get_molar_conductivity
(temperature=<Quantity(25, 'degC')>)¶ Calculate the molar (equivalent) conductivity for a solute
Parameters: temperature : Quantity, optional
The temperature of the parent solution. Defaults to 25 degC if omitted.
Returns: float
The molar or equivalent conductivity of the species at infinte dilution.
Notes
Molar conductivity is calculated from the Nernst-Einstein relation [2]
\[\kappa_i = {z_i^2 D_i F^2 \over RT}\]Note that the diffusion coefficient is strongly variable with temperature.
References
[2] Smedley, Stuart. The Interpretation of Ionic Conductivity in Liquids, pp 1-9. Plenum Press, 1980. Examples
TODO
-
get_molecular_weight
()¶ Return the molecular weight of the solute
Parameters: None
Returns: Quantity
The molecular weight of the solute, in g/mol
-
get_moles
()¶ Return the moles of solute in the solution
Parameters: None
Returns: Quantity
The number of moles of solute
-
get_name
()¶ Return the name (formula) of the solute
Parameters: None
Returns: str
The chemical formula of the solute
-
get_parameter
(parameter, temperature=None, pressure=None, ionic_strength=None)¶ Return the value of the parameter named ‘parameter’
-
set_moles
(amount, volume, solvent_mass)¶ Set the amount of a substance present in the solution
Parameters: amount: str quantity
Desired amount of substance. Must be greater than or equal to zero and given in mass or substance units.
-