chempy.properties package¶
This package implements various parameterisations of properties from the litterature with relevance in chemistry.
Submodules¶
chempy.properties.debye_huckel_radii module¶
chempy.properties.sulfuric_acid_density_myhre_1998 module¶
This module implements the denisty parameterisation of aqueous sulfuric acid of Myhre et al. from 1998.
-
chempy.properties.sulfuric_acid_density_myhre_1998.
density_from_concentration
(conc, T=None, molar_mass=None, rho_cb=<function sulfuric_acid_density>, units=None, atol=None, maxiter=10, **kwargs)[source]¶ Calculates the density of a solution from its concentration
Given a function which calculates the density of a solution from the mass fraction of the solute, this function calculates (iteratively) the density of said solution for a given concentration.
Parameters: conc: float (optionally with units)
concentration (mol / m³)
T: float (optionally with units)
passed to
rho_cb
molar_mass: float (optionally with units)
Molar mass of solute
rho_cb: callback
callback with signature f(w, T, units=None) -> rho (default:
sulfuric_acid_density()
)units: object (optional)
object with attributes: meter, kilogram, mol
atol: float (optionally with units)
convergence criterion for fixed-point iteration (default: 1e-3 kg/m³)
maxiter: int
maximum number of iterations (when exceeded a NoConvergence excpetion is raised)
**kwargs:
keyword arguments passed onto
rho_cb
Returns: Density of sulfuric acid (float of kg/m³ if T is float and units is None)
Raises: chempy.util.NoConvergence:
When maxiter is exceeded
Examples
>>> print('%d' % density_from_concentration(400, 293)) 1021
-
chempy.properties.sulfuric_acid_density_myhre_1998.
sulfuric_acid_density
(w, T=None, T0=None, units=None, warn=True)[source]¶ Density of sulfuric acid (kg/m³) as function of temperature (K) and mass fraction acid (w).
Parameters: w: float
Acid mass fraction (0.1 <= w <= 0.9)
T: float
Temperature (in Kelvin) (273 <= T <= 323) (default: 298.15)
T0: float
Value of T for 0 degree Celsius (default: 273.15)
units: object (optional)
object with attributes: kelvin, meter, kilogram
warn: bool (default: True)
Emit UserWarning when outside T or w range.
Returns: Density of sulfuric acid (float of kg/m³ if T is float and units is None)
References
- Cathrine E. L. Myhre , Claus J. Nielsen ,* and Ole W. Saastad
- “Density and Surface Tension of Aqueous H2SO4 at Low Temperature” J. Chem. Eng. Data, 1998, 43 (4), pp 617–622 http://pubs.acs.org/doi/abs/10.1021/je980013g DOI: 10.1021/je980013g
Examples
>>> print('%d' % sulfuric_acid_density(.5, 293)) 1396
chempy.properties.water_density_tanaka_2001 module¶
-
chempy.properties.water_density_tanaka_2001.
water_density
(T=None, T0=None, units=None, a=None, just_return_a=False, warn=True)[source]¶ Density of water (kg/m3) as function of temperature (K) according to VSMOW model between 0 and 40 degree Celsius. Fitted using Thiesen’s equation.
Parameters: T: float
Temperature (in Kelvin) (default: 298.15)
T0: float
Value of T for 0 degree Celsius (default: 273.15)
units: object (optional)
object with attributes: Kelvin, meter, kilogram
a: array_like (optional)
5 parameters to the equation.
just_return_a: bool (optional, default: False)
Do not compute rho, just return the parameters
a
.warn: bool (default: True)
Emit UserWarning when outside temperature range.
Returns: Density of water (float of kg/m3 if T is float and units is None)
References
- TANAKA M., GIRARD G., DAVIS R., PEUTO A. and BIGNELL N.,
- “Recommanded table for the density of water between 0 °C and 40 °C based on recent experimental reports”, Metrologia, 2001, 38, 301-309. http://iopscience.iop.org/article/10.1088/0026-1394/38/4/3 doi:10.1088/0026-1394/38/4/3
Examples
>>> print('%.2f' % water_density(277.13)) 999.97
chempy.properties.water_diffusivity_holz_2000 module¶
-
chempy.properties.water_diffusivity_holz_2000.
water_self_diffusion_coefficient
(T=None, units=None, warn=True, err_mult=None)[source]¶ Temperature-dependent self-diffusion coefficient of water.
Parameters: T: float
Temperature (default: in Kelvin)
units: object (optional)
object with attributes: Kelvin, meter, kilogram
warn: bool (default: True)
Emit UserWarning when outside temperature range.
err_mult: length 2 array_like (default: None)
Perturb paramaters D0 and TS with err_mult[0]*dD0 and err_mult[1]*dTS respectively, where dD0 and dTS are the reported uncertainties in the fitted paramters. Useful for estimating error in diffusion coefficient.
References
- Temperature-dependent self-diffusion coefficients of water and six selected
- molecular liquids for calibration in accurate 1H NMR PFG measurements Manfred Holz, Stefan R. Heila, Antonio Saccob; Phys. Chem. Chem. Phys., 2000,2, 4740-4742 http://pubs.rsc.org/en/Content/ArticleLanding/2000/CP/b005319h DOI: 10.1039/B005319H
chempy.properties.water_permittivity_bradley_pitzer_1979 module¶
-
chempy.properties.water_permittivity_bradley_pitzer_1979.
water_permittivity
(T=None, P=None, units=None, U=None, just_return_U=False, warn=True, backend=None)[source]¶ Relative permittivity of water as function of temperature (K) and pressure (bar).
Parameters: T : float
Temperature (default: 298.15 Kelvin)
P : float
Pressure (default: 1 bar)
units : object (optional)
object with attributes: Kelvin, bar
U : array_like (optional)
9 parameters to the equation.
just_return_U : bool (optional, default: False)
Do not compute relative permittivity, just return the parameters
U
.warn : bool (default: True)
Emit UserWarning when outside temperature/pressure range.
backend : module (default: None)
modules which contains “exp”, default: numpy, math
Returns: Relative permittivity of water (dielectric constant)
References
- Bradley, D.J.; Pitzer, K.S. `Thermodynamics of electrolytes. 12. Dielectric
- properties of water and Debye–Hueckel parameters to 350/sup 0/C and 1 kbar`, J. Phys. Chem.; Journal Volume 83 (12) (1979), pp. 1599-1603, http://pubs.acs.org/doi/abs/10.1021/j100475a009 DOI: 10.1021/j100475a009