The Solute Class¶
pyEQL Solute class
This file contains functions and methods for managing properties of individual solutes. The Solute class contains methods for accessing ONLY those properties that DO NOT depend on solution composition. Solute properties such as activity coefficient or concentration that do depend on compsition are accessed via Solution class methods.
copyright: | 2013-2016 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_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_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.
-