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, 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, 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.
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.
- 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#