Concentrations and waters¶
Unit conversions and the water compositions of the app.
pourbase.convert_concentration ¶
convert_concentration(symbol: str, value: float, unit: str, *, solution_density_kg_L: float = 1.0) -> ConcentrationConversion
Convert log10(M), mol/L, ppm metal, or wt% metal to molarity.
pourbase.ConcentrationConversion
dataclass
¶
ConcentrationConversion(symbol: str, input_value: float, input_unit: str, molar_concentration: float, log10_standard_activity: float, solution_density_kg_L: float, assumptions: tuple[str, ...])
One user concentration expressed as molarity and log10 standard activity.
pourbase.express_concentration ¶
express_concentration(symbol: str, molar: float, unit: str, *, solution_density_kg_L: float = 1.0) -> float
A molar metal concentration expressed in unit; the inverse of convert_concentration.
pourbase.metal_molarity_from_mass ¶
Return molarity from grams of elemental metal and final solution volume.
pourbase.ATOMIC_WEIGHT_G_MOL
module-attribute
¶
ATOMIC_WEIGHT_G_MOL: dict[str, float] = {'Ag': 107.8682, 'Al': 26.9815385, 'As': 74.921595, 'Au': 196.96657, 'B': 10.81, 'Ba': 137.327, 'Be': 9.0121831, 'Bi': 208.9804, 'Br': 79.904, 'C': 12.011, 'Ca': 40.078, 'Cd': 112.414, 'Ce': 140.116, 'Cl': 35.45, 'Co': 58.933194, 'Cr': 51.9961, 'Cs': 132.90545196, 'Cu': 63.546, 'F': 18.998403163, 'Dy': 162.5, 'Er': 167.259, 'Eu': 151.964, 'Fe': 55.845, 'Ga': 69.723, 'Gd': 157.25, 'Ge': 72.63, 'Hf': 178.49, 'I': 126.90447, 'In': 114.818, 'Hg': 200.592, 'Ho': 164.93033, 'Ir': 192.217, 'K': 39.0983, 'La': 138.90547, 'Li': 6.94, 'Lu': 174.9668, 'Mg': 24.305, 'Mn': 54.938043, 'Mo': 95.95, 'N': 14.007, 'Na': 22.98976928, 'Nb': 92.90637, 'Nd': 144.242, 'Ni': 58.6934, 'P': 30.973761998, 'Pb': 207.2, 'Pd': 106.42, 'Pr': 140.90766, 'Pt': 195.084, 'Ra': 226.025, 'Rb': 85.4678, 'Os': 190.23, 'Re': 186.207, 'Rh': 102.90549, 'Ru': 101.07, 'S': 32.06, 'Sb': 121.76, 'Sc': 44.955908, 'Se': 78.971, 'Si': 28.085, 'Sn': 118.71, 'Sr': 87.62, 'Sm': 150.36, 'Ta': 180.94788, 'Tb': 158.92535, 'Te': 127.6, 'Ti': 47.867, 'Tl': 204.38, 'Tm': 168.93422, 'V': 50.9415, 'W': 183.84, 'Y': 88.90584, 'Yb': 173.045, 'Zn': 65.38, 'Zr': 91.224}
pourbase.WATER_PRESETS
module-attribute
¶
WATER_PRESETS: dict[str, WaterPreset] = {item.key: item for item in (WaterPreset('pure', 'Pure water', (), 0.0, None, 'No dissolved ligands.'), WaterPreset('seawater', 'Seawater (S = 35)', (('chloride-cl', 0.5459), ('sulfate-so4', 0.02824), ('bromide-br', 0.000842), ('carbonate-co3', 0.00197), ('fluoride-f', 6.8e-05)), 0.7227, 8.1, 'Millero, F. J., Feistel, R., Wright, D. G. and McDougall, T. J. (2008). The composition of Standard Seawater and the definition of the Reference-Composition Salinity Scale. Deep-Sea Research I 55, 50-72. Reference composition in mol/kg, read as mol/L; carbonate is the total dissolved inorganic carbon.'), WaterPreset('river', 'River water (world average)', (('carbonate-co3', 0.000957), ('sulfate-so4', 0.000117), ('chloride-cl', 0.00022), ('nitrate-no3', 1.6e-05)), 0.0021, None, 'Livingstone, D. A. (1963). Chemical composition of rivers and lakes. U.S. Geological Survey Professional Paper 440-G. Mean river water: HCO3- 58.4, SO4 2- 11.2, Cl- 7.8 and NO3- 1 mg/L; the ionic strength includes Ca, Mg, Na and K.'), WaterPreset('sbf', 'Simulated body fluid', (('chloride-cl', 0.1478), ('carbonate-co3', 0.0042), ('phosphate-po4', 0.001), ('sulfate-so4', 0.0005)), 0.1605, 7.4, 'Kokubo, T. and Takadama, H. (2006). How useful is SBF in predicting in vivo bone bioactivity? Biomaterials 27, 2907-2915. Ion concentrations in mmol/L: Cl- 147.8, HCO3- 4.2, HPO4 2- 1.0, SO4 2- 0.5.'), WaterPreset('saline', 'Saline, 0.9 % NaCl', (('chloride-cl', 0.154),), 0.154, None, '9 g/L NaCl (58.44 g/mol): 0.154 mol/L chloride.'))}
pourbase.WaterPreset
dataclass
¶
WaterPreset(key: str, name: str, concentrations_mol_L: tuple[tuple[str, float], ...], ionic_strength_mol_L: float, pH: float | None, citation: str)