# thermo.electrochem module¶

thermo.electrochem.conductivity(CASRN=None, AvailableMethods=False, Method=None, full_info=True)[source]

This function handles the retrieval of a chemical’s conductivity. Lookup is based on CASRNs. Will automatically select a data source to use if no Method is provided; returns None if the data is not available.

Function has data for approximately 100 chemicals.

Parameters: Returns: CASRN : string CASRN [-] kappa : float Electrical conductivity of the fluid, [S/m] T : float, only returned if full_info == True Temperature at which conductivity measurement was made methods : list, only returned if AvailableMethods == True List of methods which can be used to obtain RI with the given inputs Method : string, optional A string for the method name to use, as defined by constants in conductivity_methods AvailableMethods : bool, optional If True, function will determine which methods can be used to obtain conductivity for the desired chemical, and will return methods instead of conductivity full_info : bool, optional If True, function will return the temperature at which the conductivity reading was made

Notes

Only one source is available in this function. It is:

• ‘LANGE_COND’ which is from Lange’s Handbook, Table 8.34 Electrical

Conductivity of Various Pure Liquids’, a compillation of data in [R235250].

References

 [R235250] (1, 2) Speight, James. Lange’s Handbook of Chemistry. 16 edition. McGraw-Hill Professional, 2005.

Examples

>>> conductivity('7732-18-5')
(4e-06, 291.15)

thermo.electrochem.Laliberte_density(T, ws, CASRNs)[source]

Calculate the density of an aqueous electrolyte mixture using the form proposed by [R236251]. Parameters are loaded by the function as needed. Units are Kelvin and Pa*s.

$\rho_m = \left(\frac{w_w}{\rho_w} + \sum_i \frac{w_i}{\rho_{app_i}}\right)^{-1}$
Parameters: T : float Temperature of fluid [K] ws : array Weight fractions of fluid components other than water CASRNs : array CAS numbers of the fluid components other than water rho_i : float Solution density, [kg/m^3]

Notes

Temperature range check is not used here.

References

 [R236251] (1, 2) Laliberte, Marc. “A Model for Calculating the Heat Capacity of Aqueous Solutions, with Updated Density and Viscosity Data.” Journal of Chemical & Engineering Data 54, no. 6 (June 11, 2009): 1725-60. doi:10.1021/je8008123

Examples

>>> Laliberte_density(273.15, [0.0037838838], ['7647-14-5'])
1002.6250120185854

thermo.electrochem.Laliberte_heat_capacity(T, ws, CASRNs)[source]

Calculate the heat capacity of an aqueous electrolyte mixture using the form proposed by [R237252]. Parameters are loaded by the function as needed.

$TODO$
Parameters: T : float Temperature of fluid [K] ws : array Weight fractions of fluid components other than water CASRNs : array CAS numbers of the fluid components other than water Cp : float Solution heat capacity, [J/kg/K]

Notes

Temperature range check is not implemented. Units are Kelvin and J/kg/K.

References

 [R237252] (1, 2) Laliberte, Marc. “A Model for Calculating the Heat Capacity of Aqueous Solutions, with Updated Density and Viscosity Data.” Journal of Chemical & Engineering Data 54, no. 6 (June 11, 2009): 1725-60. doi:10.1021/je8008123

Examples

>>> Laliberte_heat_capacity(273.15+1.5, [0.00398447], ['7647-14-5'])
4186.569908672113

thermo.electrochem.Laliberte_viscosity(T, ws, CASRNs)[source]

Calculate the viscosity of an aqueous mixture using the form proposed by [R238253]. Parameters are loaded by the function as needed. Units are Kelvin and Pa*s.

$\mu_m = \mu_w^{w_w} \Pi\mu_i^{w_i}$
Parameters: T : float Temperature of fluid [K] ws : array Weight fractions of fluid components other than water CASRNs : array CAS numbers of the fluid components other than water mu_i : float Solute partial viscosity, Pa*s

Notes

Temperature range check is not used here. Check is performed using NaCl at 5 degC from the first value in [R238253]‘s spreadsheet.

References

 [R238253] (1, 2, 3) Laliberte, Marc. “A Model for Calculating the Heat Capacity of Aqueous Solutions, with Updated Density and Viscosity Data.” Journal of Chemical & Engineering Data 54, no. 6 (June 11, 2009): 1725-60. doi:10.1021/je8008123

Examples

>>> Laliberte_viscosity(273.15+5, [0.005810], ['7647-14-5'])
0.0015285828581961414

thermo.electrochem.Laliberte_viscosity_w(T)[source]

Calculate the viscosity of a water using the form proposed by [R239254]. No parameters are needed, just a temperature. Units are Kelvin and Pa*s. t is temperature in degrees Celcius.

$\mu_w = \frac{t + 246}{(0.05594t+5.2842)t + 137.37}$
Parameters: T : float Temperature of fluid [K] mu_w : float Water viscosity, Pa*s

Notes

Original source or pure water viscosity is not cited. No temperature range is given for this equation.

References

 [R239254] (1, 2) Laliberte, Marc. “A Model for Calculating the Heat Capacity of Aqueous Solutions, with Updated Density and Viscosity Data.” Journal of Chemical & Engineering Data 54, no. 6 (June 11, 2009): 1725-60. doi:10.1021/je8008123

Examples

>>> Laliberte_viscosity_w(298)
0.0008932264487033279

thermo.electrochem.Laliberte_viscosity_i(T, w_w, v1, v2, v3, v4, v5, v6)[source]

Calculate the viscosity of a solute using the form proposed by [R240255] Parameters are needed, and a temperature. Units are Kelvin and Pa*s.

$\mu_i = \frac{\exp\left( \frac{v_1(1-w_w)^{v_2}+v_3}{v_4 t +1}\right)} {v_5(1-w_w)^{v_6}+1}$
Parameters: T : float Temperature of fluid [K] w_w : float Weight fraction of water in the solution v1-v6 : floats Function fit parameters mu_i : float Solute partial viscosity, Pa*s

Notes

Temperature range check is outside of this function. Check is performed using NaCl at 5 degC from the first value in [R240255]‘s spreadsheet.

References

 [R240255] (1, 2, 3) Laliberte, Marc. “A Model for Calculating the Heat Capacity of Aqueous Solutions, with Updated Density and Viscosity Data.” Journal of Chemical & Engineering Data 54, no. 6 (June 11, 2009): 1725-60. doi:10.1021/je8008123

Examples

>>> d =  _Laliberte_Viscosity_ParametersDict['7647-14-5']
>>> Laliberte_viscosity_i(273.15+5, 1-0.005810, d["V1"], d["V2"], d["V3"], d["V4"], d["V5"], d["V6"] )
0.004254025533308794

thermo.electrochem.Laliberte_density_w(T)[source]

Calculate the density of water using the form proposed by [R241256]. No parameters are needed, just a temperature. Units are Kelvin and kg/m^3h.

$\rho_w = \frac{\left\{\left([(-2.8054253\times 10^{-10}\cdot t + 1.0556302\times 10^{-7})t - 4.6170461\times 10^{-5}]t -0.0079870401\right)t + 16.945176 \right\}t + 999.83952} {1 + 0.01687985\cdot t}$
Parameters: T : float Temperature of fluid [K] rho_w : float Water density, [kg/m^3]

Notes

Original source not cited No temperature range is used.

References

 [R241256] (1, 2) Laliberte, Marc. “A Model for Calculating the Heat Capacity of Aqueous Solutions, with Updated Density and Viscosity Data.” Journal of Chemical & Engineering Data 54, no. 6 (June 11, 2009): 1725-60. doi:10.1021/je8008123

Examples

>>> Laliberte_density_w(298.15)
997.0448954179155
>>> Laliberte_density_w(273.15 + 50)
988.0362916114763

thermo.electrochem.Laliberte_density_i(T, w_w, c0, c1, c2, c3, c4)[source]

Calculate the density of a solute using the form proposed by Laliberte [R242257]. Parameters are needed, and a temperature, and water fraction. Units are Kelvin and Pa*s.

$\rho_{app,i} = \frac{(c_0[1-w_w]+c_1)\exp(10^{-6}[t+c_4]^2)} {(1-w_w) + c_2 + c_3 t}$
Parameters: T : float Temperature of fluid [K] w_w : float Weight fraction of water in the solution c0-c4 : floats Function fit parameters rho_i : float Solute partial density, [kg/m^3]

Notes

Temperature range check is TODO

References

 [R242257] (1, 2) Laliberte, Marc. “A Model for Calculating the Heat Capacity of Aqueous Solutions, with Updated Density and Viscosity Data.” Journal of Chemical & Engineering Data 54, no. 6 (June 11, 2009): 1725-60. doi:10.1021/je8008123

Examples

>>> d = _Laliberte_Density_ParametersDict['7647-14-5']
>>> Laliberte_density_i(273.15+0, 1-0.0037838838, d["C0"], d["C1"], d["C2"], d["C3"], d["C4"])
3761.8917585699983

thermo.electrochem.Laliberte_heat_capacity_w(T)[source]

Calculate the heat capacity of water using the interpolation proposed by [R243258]. No parameters are needed, just a temperature.

$Cp_w = Cp_1 + (Cp_2-Cp_1) \left( \frac{t-t_1}{t_2-t_1}\right) + \frac{(Cp_3 - 2Cp_2 + Cp_1)}{2}\left( \frac{t-t_1}{t_2-t_1}\right) \left( \frac{t-t_1}{t_2-t_1}-1\right)$
Parameters: T : float Temperature of fluid [K] Cp_w : float Water heat capacity, [J/kg/K]

Notes

Units are Kelvin and J/kg/K. Original source not cited No temperature range is used. The original equation is not used, but rather a cubic scipy interpolation routine.

References

 [R243258] (1, 2) Laliberte, Marc. “A Model for Calculating the Heat Capacity of Aqueous Solutions, with Updated Density and Viscosity Data.” Journal of Chemical & Engineering Data 54, no. 6 (June 11, 2009): 1725-60. doi:10.1021/je8008123

Examples

>>> Laliberte_heat_capacity_w(273.15+3.56)
4208.878020261102

thermo.electrochem.Laliberte_heat_capacity_i(T, w_w, a1, a2, a3, a4, a5, a6)[source]

Calculate the heat capacity of a solute using the form proposed by [R244259] Parameters are needed, and a temperature, and water fraction.

$Cp_i = a_1 e^\alpha + a_5(1-w_w)^{a_6} \alpha = a_2 t + a_3 \exp(0.01t) + a_4(1-w_w)$
Parameters: T : float Temperature of fluid [K] w_w : float Weight fraction of water in the solution a1-a6 : floats Function fit parameters Cp_i : float Solute partial heat capacity, [J/kg/K]

Notes

Units are Kelvin and J/kg/K. Temperature range check is TODO

References

 [R244259] (1, 2) Laliberte, Marc. “A Model for Calculating the Heat Capacity of Aqueous Solutions, with Updated Density and Viscosity Data.” Journal of Chemical & Engineering Data 54, no. 6 (June 11, 2009): 1725-60. doi:10.1021/je8008123

Examples

>>> d = _Laliberte_Heat_Capacity_ParametersDict['7647-14-5']
>>> Laliberte_heat_capacity_i(1.5+273.15, 1-0.00398447, d["A1"], d["A2"], d["A3"], d["A4"], d["A5"], d["A6"])
-2930.7353945880477

thermo.electrochem.thermal_conductivity_Magomedov(T, P, ws, CASRNs, k_w=None)[source]

Calculate the thermal conductivity of an aqueous mixture of electrolytes using the form proposed by Magomedov [R245260]. Parameters are loaded by the function as needed. Function will fail if an electrolyte is not in the database.

$\lambda = \lambda_w\left[ 1 - \sum_{i=1}^n A_i (w_i + 2\times10^{-4} w_i^3)\right] - 2\times10^{-8} PT\sum_{i=1}^n w_i$
Parameters: T : float Temperature of liquid [K] P : float Pressure of the liquid [Pa] ws : array Weight fractions of liquid components other than water CASRNs : array CAS numbers of the liquid components other than water k_w : float Liquid thermal condiuctivity or pure water at T and P, [W/m/K] kl : float Liquid thermal condiuctivity, [W/m/K]

Notes

Range from 273 K to 473 K, P from 0.1 MPa to 100 MPa. C from 0 to 25 mass%. Internal untis are MPa for pressure and weight percent.

An example is sought for this function. It is not possible to reproduce the author’s values consistently.

References

 [R245260] (1, 2) Magomedov, U. B. “The Thermal Conductivity of Binary and Multicomponent Aqueous Solutions of Inorganic Substances at High Parameters of State.” High Temperature 39, no. 2 (March 1, 2001): 221-26. doi:10.1023/A:1017518731726.

Examples

>>> thermal_conductivity_Magomedov(293., 1E6, [.25], ['7758-94-3'], k_w=0.59827)
0.548654049375

thermo.electrochem.ionic_strength(mis, zis)[source]

Calculate the ionic strength of a solution in one of two ways, depending on the inputs only. For Pitzer and Bromley models, mis should be molalities of each component. For eNRTL models, mis should be mole fractions of each electrolyte in the solution. This will sum to be much less than 1.

\begin{align}\begin{aligned}I = \frac{1}{2} \sum M_i z_i^2\\I = \frac{1}{2} \sum x_i z_i^2\end{aligned}\end{align}
Parameters: mis : list Molalities of each ion, or mole fractions of each ion [mol/kg or -] zis : list Charges of each ion [-] I : float ionic strength, [?]

References

 [R246261] Chen, Chau-Chyun, H. I. Britt, J. F. Boston, and L. B. Evans. “Local Composition Model for Excess Gibbs Energy of Electrolyte Systems. Part I: Single Solvent, Single Completely Dissociated Electrolyte Systems.” AIChE Journal 28, no. 4 (July 1, 1982): 588-96. doi:10.1002/aic.690280410
 [R247261] Gmehling, Jurgen. Chemical Thermodynamics: For Process Simulation. Weinheim, Germany: Wiley-VCH, 2012.

Examples

>>> ionic_strength([0.1393, 0.1393], [1, -1])
0.1393

thermo.electrochem.Kweq_1981(T, rho_w)[source]

Calculates equilibrium constant for OH- and H+ in water, according to [R248263]. Second most recent formulation.

$\log_{10} K_w= A + B/T + C/T^2 + D/T^3 + (E+F/T+G/T^2)\log_{10} \rho_w$
Parameters: T : float Temperature of fluid [K] rho_w : float Density of water, [kg/m^3] Kweq : float Ionization constant of water, [-]

Notes

Density is internally converted to units of g/cm^3.

A = -4.098; B = -3245.2; C = 2.2362E5; D = -3.984E7; E = 13.957; F = -1262.3; G = 8.5641E5

References

 [R248263] (1, 2) Marshall, William L., and E. U. Franck. “Ion Product of Water Substance, 0-1000 degree C, 1010,000 Bars New International Formulation and Its Background.” Journal of Physical and Chemical Reference Data 10, no. 2 (April 1, 1981): 295-304. doi:10.1063/1.555643.

Examples

>>> -1*log10(Kweq_1981(600, 700))
11.274522047458206

thermo.electrochem.Kweq_IAPWS_gas(T)[source]

Calculates equilibrium constant for OH- and H+ in water vapor, according to [R249264]. This is the most recent formulation available.

$-log_{10} K_w^G = \gamma_0 + \gamma_1 T^{-1} + \gamma_2 T^{-2} + \gamma_3 T^{-3}$
Parameters: T : float Temperature of H2O [K] K_w_G : float

Notes

gamma0 = 6.141500E-1; gamma1 = 4.825133E4; gamma2 = -6.770793E4; gamma3 = 1.010210E7

References

 [R249264] (1, 2) Bandura, Andrei V., and Serguei N. Lvov. “The Ionization Constant of Water over Wide Ranges of Temperature and Density.” Journal of Physical and Chemical Reference Data 35, no. 1 (March 1, 2006): 15-30. doi:10.1063/1.1928231

Examples

>>> Kweq_IAPWS_gas(800)
1.4379721554798815e-61

thermo.electrochem.Kweq_IAPWS(T, rho_w)[source]

Calculates equilibrium constant for OH- and H+ in water, according to [R250265]. This is the most recent formulation available.

\begin{align}\begin{aligned}Q = \rho \exp(\alpha_0 + \alpha_1 T^{-1} + \alpha_2 T^{-2} \rho^{2/3})\\- \log_{10} K_w = -2n \left[ \log_{10}(1+Q) - \frac{Q}{Q+1} \rho (\beta_0 + \beta_1 T^{-1} + \beta_2 \rho) \right] -\log_{10} K_w^G + 2 \log_{10} \frac{18.015268}{1000}\end{aligned}\end{align}
Parameters: T : float Temperature of water [K] rho_w : float Density of water at temperature and pressure [kg/m^3] Kweq : float Ionization constant of water, [-]

Notes

Formulation is in terms of density in g/cm^3; density is converted internally.

n = 6; alpha0 = -0.864671; alpha1 = 8659.19; alpha2 = -22786.2; beta0 = 0.642044; beta1 = -56.8534; beta2 = -0.375754

References

 [R250265] (1, 2) Bandura, Andrei V., and Serguei N. Lvov. “The Ionization Constant of Water over Wide Ranges of Temperature and Density.” Journal of Physical and Chemical Reference Data 35, no. 1 (March 1, 2006): 15-30. doi:10.1063/1.1928231

Examples

Example from IAPWS check:

>>> -1*log10(Kweq_IAPWS(600, 700))
11.203153057603775