thermo.permittivity module¶

thermo.permittivity.
permittivity_IAPWS
(T, rho)[source]¶ Calculate the relative permittivity of pure water as a function of. temperature and density. Assumes the 1997 IAPWS [R990991] formulation.
\[ \begin{align}\begin{aligned}\epsilon(\rho, T) =\frac{1 + A + 5B + (9 + 2A + 18B + A^2 + 10AB + 9B^2)^{0.5}}{4(1B)}\\A(\rho, T) = \frac{N_A\mu^2\rho g}{M\epsilon_0 kT}\\B(\rho) = \frac{N_A\alpha\rho}{3M\epsilon_0}\\g(\delta,\tau) = 1 + \sum_{i=1}^{11}n_i\delta^{I_i}\tau^{J_i} + n_{12}\delta\left(\frac{647.096}{228}\tau^{1}  1\right)^{1.2}\\\delta = \rho/(322 \text{ kg/m}^3)\\\tau = T/647.096\text{K}\end{aligned}\end{align} \]Parameters: T : float
Temperature of water [K]
rho : float
Mass density of water at T and P [kg/m^3]
Returns: epsilon : float
Relative permittivity of water at T and rho, []
Notes
Validity:
273.15 < T < 323.15 K for 0 < P < iceVI melting pressure at T or 1000 MPa, whichever is smaller.
323.15 < T < 873.15 K 0 < p < 600 MPa.
Coefficients:
ih = [1, 1, 1, 2, 3, 3, 4, 5, 6, 7, 10]; jh = [0.25, 1, 2.5, 1.5, 1.5, 2.5, 2, 2, 5, 0.5, 10]; Nh = [0.978224486826, 0.957771379375, 0.237511794148, 0.714692244396,
0.298217036956, 0.108863472196, 0.949327488264E1, .980469816509E2, 0.165167634970E4, 0.937359795772E4, 0.12317921872E9];polarizability = 1.636E40 dipole = 6.138E30
References
[R990991] (1, 2) IAPWS. 1997. Release on the Static Dielectric Constant of Ordinary Water Substance for Temperatures from 238 K to 873 K and Pressures up to 1000 MPa. Examples
>>> permittivity_IAPWS(373., 958.46) 55.56584297721836

class
thermo.permittivity.
Permittivity
(CASRN='')[source]¶ Bases:
thermo.utils.TDependentProperty
Class for dealing with liquid permittivity as a function of temperature. Consists of one temperaturedependent simple expression and one constant value source.
Parameters: CASRN : str, optional
The CAS number of the chemical
Notes
To iterate over all methods, use the list stored in
permittivity_methods
. CRC:
Simple polynomials for calculating permittivity over a specified temperature range only. The full expression is:
\[\epsilon_r = A + BT + CT^2 + DT^3\]Not all chemicals use all terms; in fact, few do. Data is available for 759 liquids, from [R991992].
 CRC_CONSTANT:
 Constant permittivity values at specified temperatures only. Data is from [R991992], and is available for 1303 liquids.
References
[R991992] (1, 2, 3) Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of Chemistry and Physics. [Boca Raton, FL]: CRC press, 2014. Attributes
T_cached interpolation_T interpolation_property interpolation_property_inv method Methods
T_dependent_property
(T)Method to calculate the property with sanity checking and without specifying a specific method. T_dependent_property_derivative
(T[, order])Method to obtain a derivative of a property with respect to temperature, of a given order. T_dependent_property_integral
(T1, T2)Method to calculate the integral of a property with respect to temperature, using a specified method. T_dependent_property_integral_over_T
(T1, T2)Method to calculate the integral of a property over temperature with respect to temperature, using a specified method. __call__
(T)Convenience method to calculate the property; calls T_dependent_property
.calculate
(T, method)Method to calculate permittivity of a liquid at temperature T with a given method. calculate_derivative
(T, method[, order])Method to calculate a derivative of a property with respect to temperature, of a given order using a specified method. calculate_integral
(T1, T2, method)Method to calculate the integral of a property with respect to temperature, using a specified method. calculate_integral_over_T
(T1, T2, method)Method to calculate the integral of a property over temperature with respect to temperature, using a specified method. extrapolate_tabular
(T)interpolate
(T, name)Method to perform interpolation on a given tabular data set previously added via set_tabular_data
.load_all_methods
()Method which picks out coefficients for the specified chemical from the various dictionaries and DataFrames storing it. plot_T_dependent_property
([Tmin, Tmax, ...])Method to create a plot of the property vs temperature according to either a specified list of methods, or user methods (if set), or all methods. select_valid_methods
(T)Method to obtain a sorted list of methods which are valid at T according to test_method_validity. set_tabular_data
(Ts, properties[, name, ...])Method to set tabular data to be used for interpolation. set_user_methods
(user_methods[, forced])Method used to select certain property methods as having a higher priority than were set by default. solve_prop
(goal[, reset_method])Method to solve for the temperature at which a property is at a specified value. test_method_validity
(T, method)Method to check the validity of a method. test_property_validity
(prop)Method to test the validity of a calculated property. 
Tmax
= None¶ Maximum temperature at which no method can calculate the permittivity above.

Tmin
= None¶ Minimum temperature at which no method can calculate the permittivity under.

all_methods
= None¶ Set of all methods available for a given CASRN and properties; filled by
load_all_methods
.

calculate
(T, method)[source]¶ Method to calculate permittivity of a liquid at temperature T with a given method.
This method has no exception handling; see T_dependent_property for that.
Parameters: T : float
Temperature at which to calculate relative permittivity, [K]
method : str
Name of the method to use
Returns: epsilon : float
Relative permittivity of the liquid at T, []

interpolation_T
= None¶ No interpolation transformation by default.

interpolation_property
= None¶ No interpolation transformation by default.

interpolation_property_inv
= None¶ No interpolation transformation by default.

load_all_methods
()[source]¶ Method which picks out coefficients for the specified chemical from the various dictionaries and DataFrames storing it. All data is stored as attributes. This method also sets
Tmin
,Tmax
, andall_methods
as a set of methods for which the data exists for.Called on initialization only. See the source code for the variables at which the coefficients are stored. The coefficients can safely be altered once the class is initialized. This method can be called again to reset the parameters.

name
= 'relative permittivity'¶

property_max
= 1000¶ Maximum valid of permittivity; highest in the data available is ~240.

property_min
= 1¶ Relative permittivity must always be larger than 1; nothing is better than a vacuum.

ranked_methods
= ['CRC', 'CRC_CONSTANT']¶ Default rankings of the available methods.

sorted_valid_methods
= None¶ sorted_valid_methods, list: Stored methods which were found valid at a specific temperature; set by T_dependent_property.

tabular_data
= None¶ tabular_data, dict: Stored (Ts, properties) for any tabular data; indexed by provided or autogenerated name.

tabular_data_interpolators
= None¶ tabular_data_interpolators, dict: Stored (extrapolator, spline) tuples which are interp1d instances for each set of tabular data; indexed by tuple of (name, interpolation_T, interpolation_property, interpolation_property_inv) to ensure that if an interpolation transform is altered, the old interpolator which had been created is no longer used.

tabular_extrapolation_permitted
= True¶ Allow tabular extrapolation by default.

test_method_validity
(T, method)[source]¶ Method to check the validity of a method. Follows the given ranges for all coefficientbased methods. For tabular data, extrapolation outside of the range is used if
tabular_extrapolation_permitted
is set; if it is, the extrapolation is considered valid for all temperatures.It is not guaranteed that a method will work or give an accurate prediction simply because this method considers the method valid.
Parameters: T : float
Temperature at which to test the method, [K]
method : str
Name of the method to test
Returns: validity : bool
Whether or not a method is valid

units
= ''¶

user_methods
= None¶ user_methods, list: Stored methods which were specified by the user in a ranked order of preference; set by T_dependent_property.