AFL.automation.mixing.Solution#
Functions
|
Ensure that a number has units and convert to the default_units |
|
|
|
|
|
Classes
|
Component of a mixture |
|
Inherited by Pipeline to allow for context manager abuse |
|
|
|
|
|
chain(*iterables) --> chain object |
Exceptions
|
Raised when a mixture runs out of mass or volume |
|
|
|
- class AFL.automation.mixing.Solution.Solution(name: str, total_mass: str | Quantity | None = None, total_volume: str | Quantity | None = None, masses: Dict | None = None, volumes: Dict | None = None, concentrations: Dict | None = None, mass_fractions: Dict | None = None, volume_fractions: Dict | None = None, molarities: Dict | None = None, molalities: Dict | None = None, location: str | None = None, solutes: List[str] | None = None, sanity_check: bool | None = True)[source]#
- __init__(name: str, total_mass: str | Quantity | None = None, total_volume: str | Quantity | None = None, masses: Dict | None = None, volumes: Dict | None = None, concentrations: Dict | None = None, mass_fractions: Dict | None = None, volume_fractions: Dict | None = None, molarities: Dict | None = None, molalities: Dict | None = None, location: str | None = None, solutes: List[str] | None = None, sanity_check: bool | None = True)[source]#
Initialize a Solution object.
- Parameters:
name (str) – The name of the solution.
total_mass (str or pint.Quantity, optional) – The total mass of the solution.
total_volume (str or pint.Quantity, optional) – The total volume of the solution.
masses (dict, optional) – A dictionary of component masses.
volumes (dict, optional) – A dictionary of component volumes.
concentrations (dict, optional) – A dictionary of component concentrations.
mass_fractions (dict, optional) – A dictionary of component mass fractions. A single component can have a value of None to indicate it should be calculated as the remainder (1.0 - sum of other fractions).
volume_fractions (dict, optional) – A dictionary of component volume fractions. A single component can have a value of None to indicate it should be calculated as the remainder (1.0 - sum of other fractions).
molarities (dict, optional) – A dictionary of component molarities (moles per liter of solution).
molalities (dict, optional) – A dictionary of component molalities (moles per kilogram of solvent).
location (str, optional) – The location of the solution on the robot. Usually a deck location e.g., ‘1A1’.
solutes (list of str, optional) – A list of solute names. If set, the components will be initialized as solutes and they won’t contribute to the volume of the solution
sanity_check (bool, optional) – Whether to perform a sanity check on the solution.
- Raises:
ValueError – If concentrations are set without specifying a component with volume. If mass fractions are set without specifying a component with mass or the total mass. If volume fractions are set without specifying a component with volume or the total volume. If molarities are set without specifying a component with volume. If molalities are set without specifying a solvent with mass.
- property size#
- property solutes#
- property solvents#
- property mass: Quantity#
Total mass of mixture.
- property volume: Quantity#
Total volume of mixture. Only solvents are included in volume calculation
- property solvent_sld: Quantity#
- property solvent_density#
- property solvent_volume#
- property solvent_mass#
- property mass_fraction#
Mass fraction of components in mixture
- Returns:
mass_fraction (dict)
Component mass fractions
- property volume_fraction#
Volume fraction of solvents in mixture
- Returns:
solvent_fraction (dict)
Component mass fractions
- property concentration#
- property molarity#
- property molality#
Molality of components in mixture (moles of solute per kilogram of solvent)
- Returns:
molality – Component molalities for components with chemical formulas defined
- Return type: