partition stringclasses 3
values | func_name stringlengths 1 134 | docstring stringlengths 1 46.9k | path stringlengths 4 223 | original_string stringlengths 75 104k | code stringlengths 75 104k | docstring_tokens listlengths 1 1.97k | repo stringlengths 7 55 | language stringclasses 1
value | url stringlengths 87 315 | code_tokens listlengths 19 28.4k | sha stringlengths 40 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|
valid | ionic_strength | r'''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.
.... | thermo/electrochem.py | def ionic_strength(mis, zis):
r'''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 ... | def ionic_strength(mis, zis):
r'''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 ... | [
"r",
"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",
"compone... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/electrochem.py#L826-L865 | [
"def",
"ionic_strength",
"(",
"mis",
",",
"zis",
")",
":",
"return",
"0.5",
"*",
"sum",
"(",
"[",
"mi",
"*",
"zi",
"*",
"zi",
"for",
"mi",
",",
"zi",
"in",
"zip",
"(",
"mis",
",",
"zis",
")",
"]",
")"
] | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Kweq_1981 | r'''Calculates equilibrium constant for OH- and H+ in water, according to
[1]_. Second most recent formulation.
.. math::
\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
Densit... | thermo/electrochem.py | def Kweq_1981(T, rho_w):
r'''Calculates equilibrium constant for OH- and H+ in water, according to
[1]_. Second most recent formulation.
.. math::
\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]
... | def Kweq_1981(T, rho_w):
r'''Calculates equilibrium constant for OH- and H+ in water, according to
[1]_. Second most recent formulation.
.. math::
\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]
... | [
"r",
"Calculates",
"equilibrium",
"constant",
"for",
"OH",
"-",
"and",
"H",
"+",
"in",
"water",
"according",
"to",
"[",
"1",
"]",
"_",
".",
"Second",
"most",
"recent",
"formulation",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/electrochem.py#L868-L919 | [
"def",
"Kweq_1981",
"(",
"T",
",",
"rho_w",
")",
":",
"rho_w",
"=",
"rho_w",
"/",
"1000.",
"A",
"=",
"-",
"4.098",
"B",
"=",
"-",
"3245.2",
"C",
"=",
"2.2362E5",
"D",
"=",
"-",
"3.984E7",
"E",
"=",
"13.957",
"F",
"=",
"-",
"1262.3",
"G",
"=",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Kweq_IAPWS_gas | r'''Calculates equilibrium constant for OH- and H+ in water vapor,
according to [1]_.
This is the most recent formulation available.
.. math::
-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... | thermo/electrochem.py | def Kweq_IAPWS_gas(T):
r'''Calculates equilibrium constant for OH- and H+ in water vapor,
according to [1]_.
This is the most recent formulation available.
.. math::
-log_{10} K_w^G = \gamma_0 + \gamma_1 T^{-1} + \gamma_2 T^{-2} + \gamma_3 T^{-3}
Parameters
----------
T : float
... | def Kweq_IAPWS_gas(T):
r'''Calculates equilibrium constant for OH- and H+ in water vapor,
according to [1]_.
This is the most recent formulation available.
.. math::
-log_{10} K_w^G = \gamma_0 + \gamma_1 T^{-1} + \gamma_2 T^{-2} + \gamma_3 T^{-3}
Parameters
----------
T : float
... | [
"r",
"Calculates",
"equilibrium",
"constant",
"for",
"OH",
"-",
"and",
"H",
"+",
"in",
"water",
"vapor",
"according",
"to",
"[",
"1",
"]",
"_",
".",
"This",
"is",
"the",
"most",
"recent",
"formulation",
"available",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/electrochem.py#L922-L963 | [
"def",
"Kweq_IAPWS_gas",
"(",
"T",
")",
":",
"gamma0",
"=",
"6.141500E-1",
"gamma1",
"=",
"4.825133E4",
"gamma2",
"=",
"-",
"6.770793E4",
"gamma3",
"=",
"1.010210E7",
"K_w_G",
"=",
"10",
"**",
"(",
"-",
"1",
"*",
"(",
"gamma0",
"+",
"gamma1",
"/",
"T",... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Kweq_IAPWS | r'''Calculates equilibrium constant for OH- and H+ in water, according to
[1]_.
This is the most recent formulation available.
.. math::
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
... | thermo/electrochem.py | def Kweq_IAPWS(T, rho_w):
r'''Calculates equilibrium constant for OH- and H+ in water, according to
[1]_.
This is the most recent formulation available.
.. math::
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) ... | def Kweq_IAPWS(T, rho_w):
r'''Calculates equilibrium constant for OH- and H+ in water, according to
[1]_.
This is the most recent formulation available.
.. math::
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) ... | [
"r",
"Calculates",
"equilibrium",
"constant",
"for",
"OH",
"-",
"and",
"H",
"+",
"in",
"water",
"according",
"to",
"[",
"1",
"]",
"_",
".",
"This",
"is",
"the",
"most",
"recent",
"formulation",
"available",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/electrochem.py#L966-L1030 | [
"def",
"Kweq_IAPWS",
"(",
"T",
",",
"rho_w",
")",
":",
"K_w_G",
"=",
"Kweq_IAPWS_gas",
"(",
"T",
")",
"rho_w",
"=",
"rho_w",
"/",
"1000.",
"n",
"=",
"6",
"alpha0",
"=",
"-",
"0.864671",
"alpha1",
"=",
"8659.19",
"alpha2",
"=",
"-",
"22786.2",
"beta0"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | ion_balance_proportional | Helper method for balance_ions for the proportional family of methods.
See balance_ions for a description of the methods; parameters are fairly
obvious. | thermo/electrochem.py | def ion_balance_proportional(anion_charges, cation_charges, zs, n_anions,
n_cations, balance_error, method):
'''Helper method for balance_ions for the proportional family of methods.
See balance_ions for a description of the methods; parameters are fairly
obvious.
'''
... | def ion_balance_proportional(anion_charges, cation_charges, zs, n_anions,
n_cations, balance_error, method):
'''Helper method for balance_ions for the proportional family of methods.
See balance_ions for a description of the methods; parameters are fairly
obvious.
'''
... | [
"Helper",
"method",
"for",
"balance_ions",
"for",
"the",
"proportional",
"family",
"of",
"methods",
".",
"See",
"balance_ions",
"for",
"a",
"description",
"of",
"the",
"methods",
";",
"parameters",
"are",
"fairly",
"obvious",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/electrochem.py#L1123-L1156 | [
"def",
"ion_balance_proportional",
"(",
"anion_charges",
",",
"cation_charges",
",",
"zs",
",",
"n_anions",
",",
"n_cations",
",",
"balance_error",
",",
"method",
")",
":",
"anion_zs",
"=",
"zs",
"[",
"0",
":",
"n_anions",
"]",
"cation_zs",
"=",
"zs",
"[",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | balance_ions | r'''Performs an ion balance to adjust measured experimental ion
compositions to electroneutrality. Can accept either the actual mole
fractions of the ions, or their concentrations in units of [mg/L] as well
for convinience.
The default method will locate the most prevalent ion in the type of
... | thermo/electrochem.py | def balance_ions(anions, cations, anion_zs=None, cation_zs=None,
anion_concs=None, cation_concs=None, rho_w=997.1,
method='increase dominant', selected_ion=None):
r'''Performs an ion balance to adjust measured experimental ion
compositions to electroneutrality. Can accept ei... | def balance_ions(anions, cations, anion_zs=None, cation_zs=None,
anion_concs=None, cation_concs=None, rho_w=997.1,
method='increase dominant', selected_ion=None):
r'''Performs an ion balance to adjust measured experimental ion
compositions to electroneutrality. Can accept ei... | [
"r",
"Performs",
"an",
"ion",
"balance",
"to",
"adjust",
"measured",
"experimental",
"ion",
"compositions",
"to",
"electroneutrality",
".",
"Can",
"accept",
"either",
"the",
"actual",
"mole",
"fractions",
"of",
"the",
"ions",
"or",
"their",
"concentrations",
"in... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/electrochem.py#L1159-L1378 | [
"def",
"balance_ions",
"(",
"anions",
",",
"cations",
",",
"anion_zs",
"=",
"None",
",",
"cation_zs",
"=",
"None",
",",
"anion_concs",
"=",
"None",
",",
"cation_concs",
"=",
"None",
",",
"rho_w",
"=",
"997.1",
",",
"method",
"=",
"'increase dominant'",
","... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | permittivity_IAPWS | r'''Calculate the relative permittivity of pure water as a function of.
temperature and density. Assumes the 1997 IAPWS [1]_ formulation.
.. math::
\epsilon(\rho, T) =\frac{1 + A + 5B + (9 + 2A + 18B + A^2 + 10AB +
9B^2)^{0.5}}{4(1-B)}
A(\rho, T) = \frac{N_A\mu^2\rho g}{M\epsi... | thermo/permittivity.py | def permittivity_IAPWS(T, rho):
r'''Calculate the relative permittivity of pure water as a function of.
temperature and density. Assumes the 1997 IAPWS [1]_ formulation.
.. math::
\epsilon(\rho, T) =\frac{1 + A + 5B + (9 + 2A + 18B + A^2 + 10AB +
9B^2)^{0.5}}{4(1-B)}
A(\rh... | def permittivity_IAPWS(T, rho):
r'''Calculate the relative permittivity of pure water as a function of.
temperature and density. Assumes the 1997 IAPWS [1]_ formulation.
.. math::
\epsilon(\rho, T) =\frac{1 + A + 5B + (9 + 2A + 18B + A^2 + 10AB +
9B^2)^{0.5}}{4(1-B)}
A(\rh... | [
"r",
"Calculate",
"the",
"relative",
"permittivity",
"of",
"pure",
"water",
"as",
"a",
"function",
"of",
".",
"temperature",
"and",
"density",
".",
"Assumes",
"the",
"1997",
"IAPWS",
"[",
"1",
"]",
"_",
"formulation",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/permittivity.py#L41-L123 | [
"def",
"permittivity_IAPWS",
"(",
"T",
",",
"rho",
")",
":",
"dipole",
"=",
"6.138E-30",
"# actual molecular dipole moment of water, in C*m",
"polarizability",
"=",
"1.636E-40",
"# actual mean molecular polarizability of water, C^2/J*m^2",
"MW",
"=",
"0.018015268",
"# molecular... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Permittivity.load_all_methods | r'''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 :obj:`Tmin`, :obj:`Tmax`,
and :obj:`all_methods` as a set of methods for which the data exists for.
Called ... | thermo/permittivity.py | def load_all_methods(self):
r'''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 :obj:`Tmin`, :obj:`Tmax`,
and :obj:`all_methods` as a set of methods for which t... | def load_all_methods(self):
r'''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 :obj:`Tmin`, :obj:`Tmax`,
and :obj:`all_methods` as a set of methods for which t... | [
"r",
"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"... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/permittivity.py#L219-L245 | [
"def",
"load_all_methods",
"(",
"self",
")",
":",
"methods",
"=",
"[",
"]",
"Tmins",
",",
"Tmaxs",
"=",
"[",
"]",
",",
"[",
"]",
"if",
"self",
".",
"CASRN",
"in",
"CRC_Permittivity_data",
".",
"index",
":",
"methods",
".",
"append",
"(",
"CRC_CONSTANT"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Permittivity.calculate | r'''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]
... | thermo/permittivity.py | def calculate(self, T, method):
r'''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 ... | def calculate(self, T, method):
r'''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 ... | [
"r",
"Method",
"to",
"calculate",
"permittivity",
"of",
"a",
"liquid",
"at",
"temperature",
"T",
"with",
"a",
"given",
"method",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/permittivity.py#L247-L273 | [
"def",
"calculate",
"(",
"self",
",",
"T",
",",
"method",
")",
":",
"if",
"method",
"==",
"CRC",
":",
"A",
",",
"B",
",",
"C",
",",
"D",
"=",
"self",
".",
"CRC_coeffs",
"epsilon",
"=",
"A",
"+",
"B",
"*",
"T",
"+",
"C",
"*",
"T",
"**",
"2",... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Hcombustion | Calculates the heat of combustion, in J/mol.
Value non-hydrocarbons is not correct, but still calculable.
Parameters
----------
atoms : dict
Dictionary of atoms and their counts, []
Hf : float
Heat of formation of given chemical, [J/mol]
HfH2O : float, optional
Heat of f... | thermo/combustion.py | def Hcombustion(atoms, Hf=None, HfH2O=-285825, HfCO2=-393474,
HfSO2=-296800, HfBr2=30880, HfI2=62417, HfHCl=-92173,
HfHF=-272711, HfP4O10=-3009940, HfO2=0, HfN2=0):
'''Calculates the heat of combustion, in J/mol.
Value non-hydrocarbons is not correct, but still calculable.
P... | def Hcombustion(atoms, Hf=None, HfH2O=-285825, HfCO2=-393474,
HfSO2=-296800, HfBr2=30880, HfI2=62417, HfHCl=-92173,
HfHF=-272711, HfP4O10=-3009940, HfO2=0, HfN2=0):
'''Calculates the heat of combustion, in J/mol.
Value non-hydrocarbons is not correct, but still calculable.
P... | [
"Calculates",
"the",
"heat",
"of",
"combustion",
"in",
"J",
"/",
"mol",
".",
"Value",
"non",
"-",
"hydrocarbons",
"is",
"not",
"correct",
"but",
"still",
"calculable",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/combustion.py#L28-L120 | [
"def",
"Hcombustion",
"(",
"atoms",
",",
"Hf",
"=",
"None",
",",
"HfH2O",
"=",
"-",
"285825",
",",
"HfCO2",
"=",
"-",
"393474",
",",
"HfSO2",
"=",
"-",
"296800",
",",
"HfBr2",
"=",
"30880",
",",
"HfI2",
"=",
"62417",
",",
"HfHCl",
"=",
"-",
"9217... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | REFPROP | r'''Calculates air-liquid surface tension using the REFPROP [1]_
regression-based method. Relatively recent, and most accurate.
.. math::
\sigma(T)=\sigma_0\left(1-\frac{T}{T_c}\right)^{n_0}+
\sigma_1\left(1-\frac{T}{T_c}\right)^{n_1}+
\sigma_2\left(1-\frac{T}{T_c}\right)^{n_2}
Pa... | thermo/interface.py | def REFPROP(T, Tc, sigma0, n0, sigma1=0, n1=0, sigma2=0, n2=0):
r'''Calculates air-liquid surface tension using the REFPROP [1]_
regression-based method. Relatively recent, and most accurate.
.. math::
\sigma(T)=\sigma_0\left(1-\frac{T}{T_c}\right)^{n_0}+
\sigma_1\left(1-\frac{T}{T_c}\righ... | def REFPROP(T, Tc, sigma0, n0, sigma1=0, n1=0, sigma2=0, n2=0):
r'''Calculates air-liquid surface tension using the REFPROP [1]_
regression-based method. Relatively recent, and most accurate.
.. math::
\sigma(T)=\sigma_0\left(1-\frac{T}{T_c}\right)^{n_0}+
\sigma_1\left(1-\frac{T}{T_c}\righ... | [
"r",
"Calculates",
"air",
"-",
"liquid",
"surface",
"tension",
"using",
"the",
"REFPROP",
"[",
"1",
"]",
"_",
"regression",
"-",
"based",
"method",
".",
"Relatively",
"recent",
"and",
"most",
"accurate",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/interface.py#L68-L126 | [
"def",
"REFPROP",
"(",
"T",
",",
"Tc",
",",
"sigma0",
",",
"n0",
",",
"sigma1",
"=",
"0",
",",
"n1",
"=",
"0",
",",
"sigma2",
"=",
"0",
",",
"n2",
"=",
"0",
")",
":",
"Tr",
"=",
"T",
"/",
"Tc",
"sigma",
"=",
"sigma0",
"*",
"(",
"1.",
"-",... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Somayajulu | r'''Calculates air-water surface tension using the [1]_
emperical (parameter-regressed) method. Well regressed, no recent data.
.. math::
\sigma=aX^{5/4}+bX^{9/4}+cX^{13/4}
X=(T_c-T)/T_c
Parameters
----------
T : float
Temperature of fluid [K]
Tc : float
Critic... | thermo/interface.py | def Somayajulu(T, Tc, A, B, C):
r'''Calculates air-water surface tension using the [1]_
emperical (parameter-regressed) method. Well regressed, no recent data.
.. math::
\sigma=aX^{5/4}+bX^{9/4}+cX^{13/4}
X=(T_c-T)/T_c
Parameters
----------
T : float
Temperature of flu... | def Somayajulu(T, Tc, A, B, C):
r'''Calculates air-water surface tension using the [1]_
emperical (parameter-regressed) method. Well regressed, no recent data.
.. math::
\sigma=aX^{5/4}+bX^{9/4}+cX^{13/4}
X=(T_c-T)/T_c
Parameters
----------
T : float
Temperature of flu... | [
"r",
"Calculates",
"air",
"-",
"water",
"surface",
"tension",
"using",
"the",
"[",
"1",
"]",
"_",
"emperical",
"(",
"parameter",
"-",
"regressed",
")",
"method",
".",
"Well",
"regressed",
"no",
"recent",
"data",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/interface.py#L129-L177 | [
"def",
"Somayajulu",
"(",
"T",
",",
"Tc",
",",
"A",
",",
"B",
",",
"C",
")",
":",
"X",
"=",
"(",
"Tc",
"-",
"T",
")",
"/",
"Tc",
"sigma",
"=",
"(",
"A",
"*",
"X",
"**",
"1.25",
"+",
"B",
"*",
"X",
"**",
"2.25",
"+",
"C",
"*",
"X",
"**... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Brock_Bird | r'''Calculates air-water surface tension using the [1]_
emperical method. Old and tested.
.. math::
\sigma = P_c^{2/3}T_c^{1/3}Q(1-T_r)^{11/9}
Q = 0.1196 \left[ 1 + \frac{T_{br}\ln (P_c/1.01325)}{1-T_{br}}\right]-0.279
Parameters
----------
T : float
Temperature of fluid ... | thermo/interface.py | def Brock_Bird(T, Tb, Tc, Pc):
r'''Calculates air-water surface tension using the [1]_
emperical method. Old and tested.
.. math::
\sigma = P_c^{2/3}T_c^{1/3}Q(1-T_r)^{11/9}
Q = 0.1196 \left[ 1 + \frac{T_{br}\ln (P_c/1.01325)}{1-T_{br}}\right]-0.279
Parameters
----------
T : ... | def Brock_Bird(T, Tb, Tc, Pc):
r'''Calculates air-water surface tension using the [1]_
emperical method. Old and tested.
.. math::
\sigma = P_c^{2/3}T_c^{1/3}Q(1-T_r)^{11/9}
Q = 0.1196 \left[ 1 + \frac{T_{br}\ln (P_c/1.01325)}{1-T_{br}}\right]-0.279
Parameters
----------
T : ... | [
"r",
"Calculates",
"air",
"-",
"water",
"surface",
"tension",
"using",
"the",
"[",
"1",
"]",
"_",
"emperical",
"method",
".",
"Old",
"and",
"tested",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/interface.py#L226-L284 | [
"def",
"Brock_Bird",
"(",
"T",
",",
"Tb",
",",
"Tc",
",",
"Pc",
")",
":",
"Tbr",
"=",
"Tb",
"/",
"Tc",
"Tr",
"=",
"T",
"/",
"Tc",
"Pc",
"=",
"Pc",
"/",
"1E5",
"# Convert to bar",
"Q",
"=",
"0.1196",
"*",
"(",
"1",
"+",
"Tbr",
"*",
"log",
"(... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Pitzer | r'''Calculates air-water surface tension using the correlation derived
by [1]_ from the works of [2]_ and [3]_. Based on critical property CSP
methods.
.. math::
\sigma = P_c^{2/3}T_c^{1/3}\frac{1.86 + 1.18\omega}{19.05}
\left[ \frac{3.75 + 0.91 \omega}{0.291 - 0.08 \omega}\right]^{2/3} (1-... | thermo/interface.py | def Pitzer(T, Tc, Pc, omega):
r'''Calculates air-water surface tension using the correlation derived
by [1]_ from the works of [2]_ and [3]_. Based on critical property CSP
methods.
.. math::
\sigma = P_c^{2/3}T_c^{1/3}\frac{1.86 + 1.18\omega}{19.05}
\left[ \frac{3.75 + 0.91 \omega}{0.2... | def Pitzer(T, Tc, Pc, omega):
r'''Calculates air-water surface tension using the correlation derived
by [1]_ from the works of [2]_ and [3]_. Based on critical property CSP
methods.
.. math::
\sigma = P_c^{2/3}T_c^{1/3}\frac{1.86 + 1.18\omega}{19.05}
\left[ \frac{3.75 + 0.91 \omega}{0.2... | [
"r",
"Calculates",
"air",
"-",
"water",
"surface",
"tension",
"using",
"the",
"correlation",
"derived",
"by",
"[",
"1",
"]",
"_",
"from",
"the",
"works",
"of",
"[",
"2",
"]",
"_",
"and",
"[",
"3",
"]",
"_",
".",
"Based",
"on",
"critical",
"property",... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/interface.py#L287-L340 | [
"def",
"Pitzer",
"(",
"T",
",",
"Tc",
",",
"Pc",
",",
"omega",
")",
":",
"Tr",
"=",
"T",
"/",
"Tc",
"Pc",
"=",
"Pc",
"/",
"1E5",
"# Convert to bar",
"sigma",
"=",
"Pc",
"**",
"(",
"2",
"/",
"3.0",
")",
"*",
"Tc",
"**",
"(",
"1",
"/",
"3.0",... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Sastri_Rao | r'''Calculates air-water surface tension using the correlation derived by
[1]_ based on critical property CSP methods and chemical classes.
.. math::
\sigma = K P_c^xT_b^y T_c^z\left[\frac{1-T_r}{1-T_{br}}\right]^m
Parameters
----------
T : float
Temperature of fluid [K]
Tb : f... | thermo/interface.py | def Sastri_Rao(T, Tb, Tc, Pc, chemicaltype=None):
r'''Calculates air-water surface tension using the correlation derived by
[1]_ based on critical property CSP methods and chemical classes.
.. math::
\sigma = K P_c^xT_b^y T_c^z\left[\frac{1-T_r}{1-T_{br}}\right]^m
Parameters
----------
... | def Sastri_Rao(T, Tb, Tc, Pc, chemicaltype=None):
r'''Calculates air-water surface tension using the correlation derived by
[1]_ based on critical property CSP methods and chemical classes.
.. math::
\sigma = K P_c^xT_b^y T_c^z\left[\frac{1-T_r}{1-T_{br}}\right]^m
Parameters
----------
... | [
"r",
"Calculates",
"air",
"-",
"water",
"surface",
"tension",
"using",
"the",
"correlation",
"derived",
"by",
"[",
"1",
"]",
"_",
"based",
"on",
"critical",
"property",
"CSP",
"methods",
"and",
"chemical",
"classes",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/interface.py#L343-L396 | [
"def",
"Sastri_Rao",
"(",
"T",
",",
"Tb",
",",
"Tc",
",",
"Pc",
",",
"chemicaltype",
"=",
"None",
")",
":",
"if",
"chemicaltype",
"==",
"'alcohol'",
":",
"k",
",",
"x",
",",
"y",
",",
"z",
",",
"m",
"=",
"2.28",
",",
"0.25",
",",
"0.175",
",",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Zuo_Stenby | r'''Calculates air-water surface tension using the reference fluids
methods of [1]_.
.. math::
\sigma^{(1)} = 40.520(1-T_r)^{1.287}
\sigma^{(2)} = 52.095(1-T_r)^{1.21548}
\sigma_r = \sigma_r^{(1)}+ \frac{\omega - \omega^{(1)}}
{\omega^{(2)}-\omega^{(1)}} (\sigma_r^{(2)}-\sigma_r... | thermo/interface.py | def Zuo_Stenby(T, Tc, Pc, omega):
r'''Calculates air-water surface tension using the reference fluids
methods of [1]_.
.. math::
\sigma^{(1)} = 40.520(1-T_r)^{1.287}
\sigma^{(2)} = 52.095(1-T_r)^{1.21548}
\sigma_r = \sigma_r^{(1)}+ \frac{\omega - \omega^{(1)}}
{\omega^{(2)}-... | def Zuo_Stenby(T, Tc, Pc, omega):
r'''Calculates air-water surface tension using the reference fluids
methods of [1]_.
.. math::
\sigma^{(1)} = 40.520(1-T_r)^{1.287}
\sigma^{(2)} = 52.095(1-T_r)^{1.21548}
\sigma_r = \sigma_r^{(1)}+ \frac{\omega - \omega^{(1)}}
{\omega^{(2)}-... | [
"r",
"Calculates",
"air",
"-",
"water",
"surface",
"tension",
"using",
"the",
"reference",
"fluids",
"methods",
"of",
"[",
"1",
"]",
"_",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/interface.py#L399-L461 | [
"def",
"Zuo_Stenby",
"(",
"T",
",",
"Tc",
",",
"Pc",
",",
"omega",
")",
":",
"Tc_1",
",",
"Pc_1",
",",
"omega_1",
"=",
"190.56",
",",
"4599000.0",
"/",
"1E5",
",",
"0.012",
"Tc_2",
",",
"Pc_2",
",",
"omega_2",
"=",
"568.7",
",",
"2490000.0",
"/",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Hakim_Steinberg_Stiel | r'''Calculates air-water surface tension using the reference fluids methods
of [1]_.
.. math::
\sigma = 4.60104\times 10^{-7} P_c^{2/3}T_c^{1/3}Q_p \left(\frac{1-T_r}{0.4}\right)^m
Q_p = 0.1574+0.359\omega-1.769\chi-13.69\chi^2-0.51\omega^2+1.298\omega\chi
m = 1.21+0.5385\omega-14.61\... | thermo/interface.py | def Hakim_Steinberg_Stiel(T, Tc, Pc, omega, StielPolar=0):
r'''Calculates air-water surface tension using the reference fluids methods
of [1]_.
.. math::
\sigma = 4.60104\times 10^{-7} P_c^{2/3}T_c^{1/3}Q_p \left(\frac{1-T_r}{0.4}\right)^m
Q_p = 0.1574+0.359\omega-1.769\chi-13.69\chi^2-0.5... | def Hakim_Steinberg_Stiel(T, Tc, Pc, omega, StielPolar=0):
r'''Calculates air-water surface tension using the reference fluids methods
of [1]_.
.. math::
\sigma = 4.60104\times 10^{-7} P_c^{2/3}T_c^{1/3}Q_p \left(\frac{1-T_r}{0.4}\right)^m
Q_p = 0.1574+0.359\omega-1.769\chi-13.69\chi^2-0.5... | [
"r",
"Calculates",
"air",
"-",
"water",
"surface",
"tension",
"using",
"the",
"reference",
"fluids",
"methods",
"of",
"[",
"1",
"]",
"_",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/interface.py#L464-L519 | [
"def",
"Hakim_Steinberg_Stiel",
"(",
"T",
",",
"Tc",
",",
"Pc",
",",
"omega",
",",
"StielPolar",
"=",
"0",
")",
":",
"Q",
"=",
"(",
"0.1574",
"+",
"0.359",
"*",
"omega",
"-",
"1.769",
"*",
"StielPolar",
"-",
"13.69",
"*",
"StielPolar",
"**",
"2",
"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Miqueu | r'''Calculates air-water surface tension using the methods of [1]_.
.. math::
\sigma = k T_c \left( \frac{N_a}{V_c}\right)^{2/3}
(4.35 + 4.14 \omega)t^{1.26}(1+0.19t^{0.5} - 0.487t)
Parameters
----------
T : float
Temperature of fluid [K]
Tc : float
Critical tempera... | thermo/interface.py | def Miqueu(T, Tc, Vc, omega):
r'''Calculates air-water surface tension using the methods of [1]_.
.. math::
\sigma = k T_c \left( \frac{N_a}{V_c}\right)^{2/3}
(4.35 + 4.14 \omega)t^{1.26}(1+0.19t^{0.5} - 0.487t)
Parameters
----------
T : float
Temperature of fluid [K]
T... | def Miqueu(T, Tc, Vc, omega):
r'''Calculates air-water surface tension using the methods of [1]_.
.. math::
\sigma = k T_c \left( \frac{N_a}{V_c}\right)^{2/3}
(4.35 + 4.14 \omega)t^{1.26}(1+0.19t^{0.5} - 0.487t)
Parameters
----------
T : float
Temperature of fluid [K]
T... | [
"r",
"Calculates",
"air",
"-",
"water",
"surface",
"tension",
"using",
"the",
"methods",
"of",
"[",
"1",
"]",
"_",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/interface.py#L522-L572 | [
"def",
"Miqueu",
"(",
"T",
",",
"Tc",
",",
"Vc",
",",
"omega",
")",
":",
"Vc",
"=",
"Vc",
"*",
"1E6",
"t",
"=",
"1.",
"-",
"T",
"/",
"Tc",
"sigma",
"=",
"k",
"*",
"Tc",
"*",
"(",
"N_A",
"/",
"Vc",
")",
"**",
"(",
"2",
"/",
"3.",
")",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Aleem | r'''Calculates vapor-liquid surface tension using the correlation derived by
[1]_ based on critical property CSP methods.
.. math::
\sigma = \phi \frac{MW^{1/3}} {6N_A^{1/3}}\rho_l^{2/3}\left[H_{vap}
+ C_{p,l}(T_b-T)\right]
\phi = 1 - 0.0047MW + 6.8\times 10^{-6} MW^2
... | thermo/interface.py | def Aleem(T, MW, Tb, rhol, Hvap_Tb, Cpl):
r'''Calculates vapor-liquid surface tension using the correlation derived by
[1]_ based on critical property CSP methods.
.. math::
\sigma = \phi \frac{MW^{1/3}} {6N_A^{1/3}}\rho_l^{2/3}\left[H_{vap}
+ C_{p,l}(T_b-T)\right]
\phi = 1 - 0.004... | def Aleem(T, MW, Tb, rhol, Hvap_Tb, Cpl):
r'''Calculates vapor-liquid surface tension using the correlation derived by
[1]_ based on critical property CSP methods.
.. math::
\sigma = \phi \frac{MW^{1/3}} {6N_A^{1/3}}\rho_l^{2/3}\left[H_{vap}
+ C_{p,l}(T_b-T)\right]
\phi = 1 - 0.004... | [
"r",
"Calculates",
"vapor",
"-",
"liquid",
"surface",
"tension",
"using",
"the",
"correlation",
"derived",
"by",
"[",
"1",
"]",
"_",
"based",
"on",
"critical",
"property",
"CSP",
"methods",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/interface.py#L575-L641 | [
"def",
"Aleem",
"(",
"T",
",",
"MW",
",",
"Tb",
",",
"rhol",
",",
"Hvap_Tb",
",",
"Cpl",
")",
":",
"MW",
"=",
"MW",
"/",
"1000.",
"# Use kg/mol for consistency with the other units",
"sphericity",
"=",
"1.",
"-",
"0.0047",
"*",
"MW",
"+",
"6.8E-6",
"*",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Mersmann_Kind_surface_tension | r'''Estimates the surface tension of organic liquid substances
according to the method of [1]_.
.. math::
\sigma^* = \frac{\sigma n_{ass}^{1/3}} {(kT_c)^{1/3} T_{rm}P_c^{2/3}}
\sigma^* = \left(\frac{T_b - T_m}{T_m}\right)^{1/3}
\left[6.25(1-T_r) + 31.3(1-T_r)^{4/3}\right]
... | thermo/interface.py | def Mersmann_Kind_surface_tension(T, Tm, Tb, Tc, Pc, n_associated=1):
r'''Estimates the surface tension of organic liquid substances
according to the method of [1]_.
.. math::
\sigma^* = \frac{\sigma n_{ass}^{1/3}} {(kT_c)^{1/3} T_{rm}P_c^{2/3}}
\sigma^* = \left(\frac{T_b - T_m}{T_... | def Mersmann_Kind_surface_tension(T, Tm, Tb, Tc, Pc, n_associated=1):
r'''Estimates the surface tension of organic liquid substances
according to the method of [1]_.
.. math::
\sigma^* = \frac{\sigma n_{ass}^{1/3}} {(kT_c)^{1/3} T_{rm}P_c^{2/3}}
\sigma^* = \left(\frac{T_b - T_m}{T_... | [
"r",
"Estimates",
"the",
"surface",
"tension",
"of",
"organic",
"liquid",
"substances",
"according",
"to",
"the",
"method",
"of",
"[",
"1",
"]",
"_",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/interface.py#L644-L697 | [
"def",
"Mersmann_Kind_surface_tension",
"(",
"T",
",",
"Tm",
",",
"Tb",
",",
"Tc",
",",
"Pc",
",",
"n_associated",
"=",
"1",
")",
":",
"Tr",
"=",
"T",
"/",
"Tc",
"sigma_star",
"=",
"(",
"(",
"Tb",
"-",
"Tm",
")",
"/",
"Tm",
")",
"**",
"(",
"1",... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Winterfeld_Scriven_Davis | r'''Calculates surface tension of a liquid mixture according to
mixing rules in [1]_ and also in [2]_.
.. math::
\sigma_M = \sum_i \sum_j \frac{1}{V_L^{L2}}\left(x_i V_i \right)
\left( x_jV_j\right)\sqrt{\sigma_i\cdot \sigma_j}
Parameters
----------
xs : array-like
Mole fra... | thermo/interface.py | def Winterfeld_Scriven_Davis(xs, sigmas, rhoms):
r'''Calculates surface tension of a liquid mixture according to
mixing rules in [1]_ and also in [2]_.
.. math::
\sigma_M = \sum_i \sum_j \frac{1}{V_L^{L2}}\left(x_i V_i \right)
\left( x_jV_j\right)\sqrt{\sigma_i\cdot \sigma_j}
Parameter... | def Winterfeld_Scriven_Davis(xs, sigmas, rhoms):
r'''Calculates surface tension of a liquid mixture according to
mixing rules in [1]_ and also in [2]_.
.. math::
\sigma_M = \sum_i \sum_j \frac{1}{V_L^{L2}}\left(x_i V_i \right)
\left( x_jV_j\right)\sqrt{\sigma_i\cdot \sigma_j}
Parameter... | [
"r",
"Calculates",
"surface",
"tension",
"of",
"a",
"liquid",
"mixture",
"according",
"to",
"mixing",
"rules",
"in",
"[",
"1",
"]",
"_",
"and",
"also",
"in",
"[",
"2",
"]",
"_",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/interface.py#L1082-L1140 | [
"def",
"Winterfeld_Scriven_Davis",
"(",
"xs",
",",
"sigmas",
",",
"rhoms",
")",
":",
"if",
"not",
"none_and_length_check",
"(",
"[",
"xs",
",",
"sigmas",
",",
"rhoms",
"]",
")",
":",
"raise",
"Exception",
"(",
"'Function inputs are incorrect format'",
")",
"rh... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Diguilio_Teja | r'''Calculates surface tension of a liquid mixture according to
mixing rules in [1]_.
.. math::
\sigma = 1.002855(T^*)^{1.118091} \frac{T}{T_b} \sigma_r
T^* = \frac{(T_c/T)-1}{(T_c/T_b)-1}
\sigma_r = \sum x_i \sigma_i
T_b = \sum x_i T_{b,i}
T_c = \sum x_i T_{c,i}
... | thermo/interface.py | def Diguilio_Teja(T, xs, sigmas_Tb, Tbs, Tcs):
r'''Calculates surface tension of a liquid mixture according to
mixing rules in [1]_.
.. math::
\sigma = 1.002855(T^*)^{1.118091} \frac{T}{T_b} \sigma_r
T^* = \frac{(T_c/T)-1}{(T_c/T_b)-1}
\sigma_r = \sum x_i \sigma_i
T_b = ... | def Diguilio_Teja(T, xs, sigmas_Tb, Tbs, Tcs):
r'''Calculates surface tension of a liquid mixture according to
mixing rules in [1]_.
.. math::
\sigma = 1.002855(T^*)^{1.118091} \frac{T}{T_b} \sigma_r
T^* = \frac{(T_c/T)-1}{(T_c/T_b)-1}
\sigma_r = \sum x_i \sigma_i
T_b = ... | [
"r",
"Calculates",
"surface",
"tension",
"of",
"a",
"liquid",
"mixture",
"according",
"to",
"mixing",
"rules",
"in",
"[",
"1",
"]",
"_",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/interface.py#L1143-L1210 | [
"def",
"Diguilio_Teja",
"(",
"T",
",",
"xs",
",",
"sigmas_Tb",
",",
"Tbs",
",",
"Tcs",
")",
":",
"if",
"not",
"none_and_length_check",
"(",
"[",
"xs",
",",
"sigmas_Tb",
",",
"Tbs",
",",
"Tcs",
"]",
")",
":",
"raise",
"Exception",
"(",
"'Function inputs... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | SurfaceTension.load_all_methods | r'''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 :obj:`Tmin`, :obj:`Tmax`,
and :obj:`all_methods` as a set of methods for which the data exists for.
Called ... | thermo/interface.py | def load_all_methods(self):
r'''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 :obj:`Tmin`, :obj:`Tmax`,
and :obj:`all_methods` as a set of methods for which t... | def load_all_methods(self):
r'''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 :obj:`Tmin`, :obj:`Tmax`,
and :obj:`all_methods` as a set of methods for which t... | [
"r",
"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"... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/interface.py#L895-L969 | [
"def",
"load_all_methods",
"(",
"self",
")",
":",
"methods",
"=",
"[",
"]",
"Tmins",
",",
"Tmaxs",
"=",
"[",
"]",
",",
"[",
"]",
"if",
"self",
".",
"CASRN",
"in",
"Mulero_Cachadina_data",
".",
"index",
":",
"methods",
".",
"append",
"(",
"STREFPROP",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | SurfaceTension.calculate | r'''Method to calculate surface tension 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 surface tension, [K]
... | thermo/interface.py | def calculate(self, T, method):
r'''Method to calculate surface tension 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 whi... | def calculate(self, T, method):
r'''Method to calculate surface tension 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 whi... | [
"r",
"Method",
"to",
"calculate",
"surface",
"tension",
"of",
"a",
"liquid",
"at",
"temperature",
"T",
"with",
"a",
"given",
"method",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/interface.py#L971-L1021 | [
"def",
"calculate",
"(",
"self",
",",
"T",
",",
"method",
")",
":",
"if",
"method",
"==",
"STREFPROP",
":",
"sigma0",
",",
"n0",
",",
"sigma1",
",",
"n1",
",",
"sigma2",
",",
"n2",
",",
"Tc",
"=",
"self",
".",
"STREFPROP_coeffs",
"sigma",
"=",
"REF... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | SurfaceTensionMixture.load_all_methods | r'''Method to initialize the object by precomputing any values which
may be used repeatedly and by retrieving mixture-specific variables.
All data are stored as attributes. This method also sets :obj:`Tmin`,
:obj:`Tmax`, and :obj:`all_methods` as a set of methods which should
work to c... | thermo/interface.py | def load_all_methods(self):
r'''Method to initialize the object by precomputing any values which
may be used repeatedly and by retrieving mixture-specific variables.
All data are stored as attributes. This method also sets :obj:`Tmin`,
:obj:`Tmax`, and :obj:`all_methods` as a set of met... | def load_all_methods(self):
r'''Method to initialize the object by precomputing any values which
may be used repeatedly and by retrieving mixture-specific variables.
All data are stored as attributes. This method also sets :obj:`Tmin`,
:obj:`Tmax`, and :obj:`all_methods` as a set of met... | [
"r",
"Method",
"to",
"initialize",
"the",
"object",
"by",
"precomputing",
"any",
"values",
"which",
"may",
"be",
"used",
"repeatedly",
"and",
"by",
"retrieving",
"mixture",
"-",
"specific",
"variables",
".",
"All",
"data",
"are",
"stored",
"as",
"attributes",
... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/interface.py#L1313-L1332 | [
"def",
"load_all_methods",
"(",
"self",
")",
":",
"methods",
"=",
"[",
"]",
"methods",
".",
"append",
"(",
"SIMPLE",
")",
"# Needs sigma",
"methods",
".",
"append",
"(",
"WINTERFELDSCRIVENDAVIS",
")",
"# Nothing to load, needs rhoms, sigma",
"if",
"none_and_length_c... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | SurfaceTensionMixture.calculate | r'''Method to calculate surface tension of a liquid mixture at
temperature `T`, pressure `P`, mole fractions `zs` and weight fractions
`ws` with a given method.
This method has no exception handling; see `mixture_property`
for that.
Parameters
----------
T : fl... | thermo/interface.py | def calculate(self, T, P, zs, ws, method):
r'''Method to calculate surface tension of a liquid mixture at
temperature `T`, pressure `P`, mole fractions `zs` and weight fractions
`ws` with a given method.
This method has no exception handling; see `mixture_property`
for that.
... | def calculate(self, T, P, zs, ws, method):
r'''Method to calculate surface tension of a liquid mixture at
temperature `T`, pressure `P`, mole fractions `zs` and weight fractions
`ws` with a given method.
This method has no exception handling; see `mixture_property`
for that.
... | [
"r",
"Method",
"to",
"calculate",
"surface",
"tension",
"of",
"a",
"liquid",
"mixture",
"at",
"temperature",
"T",
"pressure",
"P",
"mole",
"fractions",
"zs",
"and",
"weight",
"fractions",
"ws",
"with",
"a",
"given",
"method",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/interface.py#L1334-L1371 | [
"def",
"calculate",
"(",
"self",
",",
"T",
",",
"P",
",",
"zs",
",",
"ws",
",",
"method",
")",
":",
"if",
"method",
"==",
"SIMPLE",
":",
"sigmas",
"=",
"[",
"i",
"(",
"T",
")",
"for",
"i",
"in",
"self",
".",
"SurfaceTensions",
"]",
"return",
"m... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | load_group_assignments_DDBST | Data is stored in the format
InChI key\tbool bool bool \tsubgroup count ...\tsubgroup count \tsubgroup count...
where the bools refer to whether or not the original UNIFAC, modified
UNIFAC, and PSRK group assignments were completed correctly.
The subgroups and their count have an indefinite length. | thermo/unifac.py | def load_group_assignments_DDBST():
'''Data is stored in the format
InChI key\tbool bool bool \tsubgroup count ...\tsubgroup count \tsubgroup count...
where the bools refer to whether or not the original UNIFAC, modified
UNIFAC, and PSRK group assignments were completed correctly.
The subgroups and ... | def load_group_assignments_DDBST():
'''Data is stored in the format
InChI key\tbool bool bool \tsubgroup count ...\tsubgroup count \tsubgroup count...
where the bools refer to whether or not the original UNIFAC, modified
UNIFAC, and PSRK group assignments were completed correctly.
The subgroups and ... | [
"Data",
"is",
"stored",
"in",
"the",
"format",
"InChI",
"key",
"\\",
"tbool",
"bool",
"bool",
"\\",
"tsubgroup",
"count",
"...",
"\\",
"tsubgroup",
"count",
"\\",
"tsubgroup",
"count",
"...",
"where",
"the",
"bools",
"refer",
"to",
"whether",
"or",
"not",
... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/unifac.py#L877-L899 | [
"def",
"load_group_assignments_DDBST",
"(",
")",
":",
"# Do not allow running multiple times",
"if",
"DDBST_UNIFAC_assignments",
":",
"return",
"None",
"with",
"open",
"(",
"os",
".",
"path",
".",
"join",
"(",
"folder",
",",
"'DDBST UNIFAC assignments.tsv'",
")",
")",... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | UNIFAC_RQ | r'''Calculates UNIFAC parameters R and Q for a chemical, given a dictionary
of its groups, as shown in [1]_. Most UNIFAC methods use the same subgroup
values; however, a dictionary of `UNIFAC_subgroup` instances may be
specified as an optional second parameter.
.. math::
r_i = \sum_{k=1}^{n} \... | thermo/unifac.py | def UNIFAC_RQ(groups, subgroup_data=None):
r'''Calculates UNIFAC parameters R and Q for a chemical, given a dictionary
of its groups, as shown in [1]_. Most UNIFAC methods use the same subgroup
values; however, a dictionary of `UNIFAC_subgroup` instances may be
specified as an optional second parameter... | def UNIFAC_RQ(groups, subgroup_data=None):
r'''Calculates UNIFAC parameters R and Q for a chemical, given a dictionary
of its groups, as shown in [1]_. Most UNIFAC methods use the same subgroup
values; however, a dictionary of `UNIFAC_subgroup` instances may be
specified as an optional second parameter... | [
"r",
"Calculates",
"UNIFAC",
"parameters",
"R",
"and",
"Q",
"for",
"a",
"chemical",
"given",
"a",
"dictionary",
"of",
"its",
"groups",
"as",
"shown",
"in",
"[",
"1",
"]",
"_",
".",
"Most",
"UNIFAC",
"methods",
"use",
"the",
"same",
"subgroup",
"values",
... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/unifac.py#L902-L953 | [
"def",
"UNIFAC_RQ",
"(",
"groups",
",",
"subgroup_data",
"=",
"None",
")",
":",
"if",
"subgroup_data",
"is",
"not",
"None",
":",
"subgroups",
"=",
"subgroup_data",
"else",
":",
"subgroups",
"=",
"UFSG",
"ri",
"=",
"0.",
"qi",
"=",
"0.",
"for",
"group",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | UNIFAC_psi | r'''Calculates the interaction parameter psi(m, n) for two UNIFAC
subgroups, given the system temperature, the UNIFAC subgroups considered
for the variant of UNIFAC used, the interaction parameters for the
variant of UNIFAC used, and whether or not the temperature dependence is
modified from the ori... | thermo/unifac.py | def UNIFAC_psi(T, subgroup1, subgroup2, subgroup_data, interaction_data,
modified=False):
r'''Calculates the interaction parameter psi(m, n) for two UNIFAC
subgroups, given the system temperature, the UNIFAC subgroups considered
for the variant of UNIFAC used, the interaction parameters fo... | def UNIFAC_psi(T, subgroup1, subgroup2, subgroup_data, interaction_data,
modified=False):
r'''Calculates the interaction parameter psi(m, n) for two UNIFAC
subgroups, given the system temperature, the UNIFAC subgroups considered
for the variant of UNIFAC used, the interaction parameters fo... | [
"r",
"Calculates",
"the",
"interaction",
"parameter",
"psi",
"(",
"m",
"n",
")",
"for",
"two",
"UNIFAC",
"subgroups",
"given",
"the",
"system",
"temperature",
"the",
"UNIFAC",
"subgroups",
"considered",
"for",
"the",
"variant",
"of",
"UNIFAC",
"used",
"the",
... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/unifac.py#L1026-L1101 | [
"def",
"UNIFAC_psi",
"(",
"T",
",",
"subgroup1",
",",
"subgroup2",
",",
"subgroup_data",
",",
"interaction_data",
",",
"modified",
"=",
"False",
")",
":",
"main1",
"=",
"subgroup_data",
"[",
"subgroup1",
"]",
".",
"main_group_id",
"main2",
"=",
"subgroup_data"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | UNIFAC | r'''Calculates activity coefficients using the UNIFAC model (optionally
modified), given a mixture's temperature, liquid mole fractions,
and optionally the subgroup data and interaction parameter data of your
choice. The default is to use the original UNIFAC model, with the latest
parameters publish... | thermo/unifac.py | def UNIFAC(T, xs, chemgroups, cached=None, subgroup_data=None,
interaction_data=None, modified=False):
r'''Calculates activity coefficients using the UNIFAC model (optionally
modified), given a mixture's temperature, liquid mole fractions,
and optionally the subgroup data and interaction param... | def UNIFAC(T, xs, chemgroups, cached=None, subgroup_data=None,
interaction_data=None, modified=False):
r'''Calculates activity coefficients using the UNIFAC model (optionally
modified), given a mixture's temperature, liquid mole fractions,
and optionally the subgroup data and interaction param... | [
"r",
"Calculates",
"activity",
"coefficients",
"using",
"the",
"UNIFAC",
"model",
"(",
"optionally",
"modified",
")",
"given",
"a",
"mixture",
"s",
"temperature",
"liquid",
"mole",
"fractions",
"and",
"optionally",
"the",
"subgroup",
"data",
"and",
"interaction",
... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/unifac.py#L1104-L1319 | [
"def",
"UNIFAC",
"(",
"T",
",",
"xs",
",",
"chemgroups",
",",
"cached",
"=",
"None",
",",
"subgroup_data",
"=",
"None",
",",
"interaction_data",
"=",
"None",
",",
"modified",
"=",
"False",
")",
":",
"cmps",
"=",
"range",
"(",
"len",
"(",
"xs",
")",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | dipole_moment | r'''This function handles the retrieval of a chemical's dipole moment.
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.
Prefered source is 'CCCBDB'. Considerable variation in reported data has
found.
Para... | thermo/dipole.py | def dipole_moment(CASRN, AvailableMethods=False, Method=None):
r'''This function handles the retrieval of a chemical's dipole moment.
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.
Prefered source is 'CCCBDB... | def dipole_moment(CASRN, AvailableMethods=False, Method=None):
r'''This function handles the retrieval of a chemical's dipole moment.
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.
Prefered source is 'CCCBDB... | [
"r",
"This",
"function",
"handles",
"the",
"retrieval",
"of",
"a",
"chemical",
"s",
"dipole",
"moment",
".",
"Lookup",
"is",
"based",
"on",
"CASRNs",
".",
"Will",
"automatically",
"select",
"a",
"data",
"source",
"to",
"use",
"if",
"no",
"Method",
"is",
... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/dipole.py#L51-L140 | [
"def",
"dipole_moment",
"(",
"CASRN",
",",
"AvailableMethods",
"=",
"False",
",",
"Method",
"=",
"None",
")",
":",
"def",
"list_methods",
"(",
")",
":",
"methods",
"=",
"[",
"]",
"if",
"CASRN",
"in",
"_dipole_CCDB",
".",
"index",
"and",
"not",
"np",
".... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Pc | r'''This function handles the retrieval of a chemical's critical
pressure. 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.
Prefered sources are 'IUPAC' for organic chemicals, and 'MATTHEWS' for
inorganic... | thermo/critical.py | def Pc(CASRN, AvailableMethods=False, Method=None, IgnoreMethods=[SURF]):
r'''This function handles the retrieval of a chemical's critical
pressure. 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.
Prefere... | def Pc(CASRN, AvailableMethods=False, Method=None, IgnoreMethods=[SURF]):
r'''This function handles the retrieval of a chemical's critical
pressure. 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.
Prefere... | [
"r",
"This",
"function",
"handles",
"the",
"retrieval",
"of",
"a",
"chemical",
"s",
"critical",
"pressure",
".",
"Lookup",
"is",
"based",
"on",
"CASRNs",
".",
"Will",
"automatically",
"select",
"a",
"data",
"source",
"to",
"use",
"if",
"no",
"Method",
"is"... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/critical.py#L278-L456 | [
"def",
"Pc",
"(",
"CASRN",
",",
"AvailableMethods",
"=",
"False",
",",
"Method",
"=",
"None",
",",
"IgnoreMethods",
"=",
"[",
"SURF",
"]",
")",
":",
"def",
"list_methods",
"(",
")",
":",
"methods",
"=",
"[",
"]",
"if",
"CASRN",
"in",
"_crit_IUPAC",
"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Vc | r'''This function handles the retrieval of a chemical's critical
volume. 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.
Prefered sources are 'IUPAC' for organic chemicals, and 'MATTHEWS' for
inorganic c... | thermo/critical.py | def Vc(CASRN, AvailableMethods=False, Method=None, IgnoreMethods=[SURF]):
r'''This function handles the retrieval of a chemical's critical
volume. 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.
Prefered ... | def Vc(CASRN, AvailableMethods=False, Method=None, IgnoreMethods=[SURF]):
r'''This function handles the retrieval of a chemical's critical
volume. 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.
Prefered ... | [
"r",
"This",
"function",
"handles",
"the",
"retrieval",
"of",
"a",
"chemical",
"s",
"critical",
"volume",
".",
"Lookup",
"is",
"based",
"on",
"CASRNs",
".",
"Will",
"automatically",
"select",
"a",
"data",
"source",
"to",
"use",
"if",
"no",
"Method",
"is",
... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/critical.py#L462-L630 | [
"def",
"Vc",
"(",
"CASRN",
",",
"AvailableMethods",
"=",
"False",
",",
"Method",
"=",
"None",
",",
"IgnoreMethods",
"=",
"[",
"SURF",
"]",
")",
":",
"def",
"list_methods",
"(",
")",
":",
"methods",
"=",
"[",
"]",
"if",
"CASRN",
"in",
"_crit_IUPAC",
"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Zc | r'''This function handles the retrieval of a chemical's critical
compressibility. 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.
Prefered sources are 'IUPAC' for organic chemicals, and 'MATTHEWS' for
in... | thermo/critical.py | def Zc(CASRN, AvailableMethods=False, Method=None, IgnoreMethods=[COMBINED]):
r'''This function handles the retrieval of a chemical's critical
compressibility. 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.
... | def Zc(CASRN, AvailableMethods=False, Method=None, IgnoreMethods=[COMBINED]):
r'''This function handles the retrieval of a chemical's critical
compressibility. 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.
... | [
"r",
"This",
"function",
"handles",
"the",
"retrieval",
"of",
"a",
"chemical",
"s",
"critical",
"compressibility",
".",
"Lookup",
"is",
"based",
"on",
"CASRNs",
".",
"Will",
"automatically",
"select",
"a",
"data",
"source",
"to",
"use",
"if",
"no",
"Method",... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/critical.py#L637-L802 | [
"def",
"Zc",
"(",
"CASRN",
",",
"AvailableMethods",
"=",
"False",
",",
"Method",
"=",
"None",
",",
"IgnoreMethods",
"=",
"[",
"COMBINED",
"]",
")",
":",
"def",
"list_methods",
"(",
")",
":",
"methods",
"=",
"[",
"]",
"if",
"CASRN",
"in",
"_crit_IUPAC",... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Mersmann_Kind_predictor | r'''Predicts the critical molar volume of a chemical based only on its
atomic composition according to [1]_ and [2]_. This is a crude approach,
but provides very reasonable
estimates in practice. Optionally, the `coeff` used and the `power` in the
fraction as well as the atomic contributions can be adju... | thermo/critical.py | def Mersmann_Kind_predictor(atoms, coeff=3.645, power=0.5,
covalent_radii=rcovs_Mersmann_Kind):
r'''Predicts the critical molar volume of a chemical based only on its
atomic composition according to [1]_ and [2]_. This is a crude approach,
but provides very reasonable
estima... | def Mersmann_Kind_predictor(atoms, coeff=3.645, power=0.5,
covalent_radii=rcovs_Mersmann_Kind):
r'''Predicts the critical molar volume of a chemical based only on its
atomic composition according to [1]_ and [2]_. This is a crude approach,
but provides very reasonable
estima... | [
"r",
"Predicts",
"the",
"critical",
"molar",
"volume",
"of",
"a",
"chemical",
"based",
"only",
"on",
"its",
"atomic",
"composition",
"according",
"to",
"[",
"1",
"]",
"_",
"and",
"[",
"2",
"]",
"_",
".",
"This",
"is",
"a",
"crude",
"approach",
"but",
... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/critical.py#L849-L938 | [
"def",
"Mersmann_Kind_predictor",
"(",
"atoms",
",",
"coeff",
"=",
"3.645",
",",
"power",
"=",
"0.5",
",",
"covalent_radii",
"=",
"rcovs_Mersmann_Kind",
")",
":",
"H_RADIUS_COV",
"=",
"covalent_radii",
"[",
"'H'",
"]",
"tot",
"=",
"0",
"atom_count",
"=",
"0"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Ihmels | r'''Most recent, and most recommended method of estimating critical
properties from each other. Two of the three properties are required.
This model uses the "critical surface", a general plot of Tc vs Pc vs Vc.
The model used 421 organic compounds to derive equation.
The general equation is in [1]_:
... | thermo/critical.py | def Ihmels(Tc=None, Pc=None, Vc=None):
r'''Most recent, and most recommended method of estimating critical
properties from each other. Two of the three properties are required.
This model uses the "critical surface", a general plot of Tc vs Pc vs Vc.
The model used 421 organic compounds to derive equati... | def Ihmels(Tc=None, Pc=None, Vc=None):
r'''Most recent, and most recommended method of estimating critical
properties from each other. Two of the three properties are required.
This model uses the "critical surface", a general plot of Tc vs Pc vs Vc.
The model used 421 organic compounds to derive equati... | [
"r",
"Most",
"recent",
"and",
"most",
"recommended",
"method",
"of",
"estimating",
"critical",
"properties",
"from",
"each",
"other",
".",
"Two",
"of",
"the",
"three",
"properties",
"are",
"required",
".",
"This",
"model",
"uses",
"the",
"critical",
"surface",... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/critical.py#L944-L1006 | [
"def",
"Ihmels",
"(",
"Tc",
"=",
"None",
",",
"Pc",
"=",
"None",
",",
"Vc",
"=",
"None",
")",
":",
"if",
"Tc",
"and",
"Vc",
":",
"Vc",
"=",
"Vc",
"*",
"1E6",
"# m^3/mol to cm^3/mol",
"Pc",
"=",
"-",
"0.025",
"+",
"2.215",
"*",
"Tc",
"/",
"Vc",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Meissner | r'''Old (1942) relationship for estimating critical
properties from each other. Two of the three properties are required.
This model uses the "critical surface", a general plot of Tc vs Pc vs Vc.
The model used 42 organic and inorganic compounds to derive the equation.
The general equation is in [1]_:
... | thermo/critical.py | def Meissner(Tc=None, Pc=None, Vc=None):
r'''Old (1942) relationship for estimating critical
properties from each other. Two of the three properties are required.
This model uses the "critical surface", a general plot of Tc vs Pc vs Vc.
The model used 42 organic and inorganic compounds to derive the equ... | def Meissner(Tc=None, Pc=None, Vc=None):
r'''Old (1942) relationship for estimating critical
properties from each other. Two of the three properties are required.
This model uses the "critical surface", a general plot of Tc vs Pc vs Vc.
The model used 42 organic and inorganic compounds to derive the equ... | [
"r",
"Old",
"(",
"1942",
")",
"relationship",
"for",
"estimating",
"critical",
"properties",
"from",
"each",
"other",
".",
"Two",
"of",
"the",
"three",
"properties",
"are",
"required",
".",
"This",
"model",
"uses",
"the",
"critical",
"surface",
"a",
"general... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/critical.py#L1009-L1071 | [
"def",
"Meissner",
"(",
"Tc",
"=",
"None",
",",
"Pc",
"=",
"None",
",",
"Vc",
"=",
"None",
")",
":",
"if",
"Tc",
"and",
"Vc",
":",
"Vc",
"=",
"Vc",
"*",
"1E6",
"Pc",
"=",
"20.8",
"*",
"Tc",
"/",
"(",
"Vc",
"-",
"8",
")",
"Pc",
"=",
"10132... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Grigoras | r'''Relatively recent (1990) relationship for estimating critical
properties from each other. Two of the three properties are required.
This model uses the "critical surface", a general plot of Tc vs Pc vs Vc.
The model used 137 organic and inorganic compounds to derive the equation.
The general equatio... | thermo/critical.py | def Grigoras(Tc=None, Pc=None, Vc=None):
r'''Relatively recent (1990) relationship for estimating critical
properties from each other. Two of the three properties are required.
This model uses the "critical surface", a general plot of Tc vs Pc vs Vc.
The model used 137 organic and inorganic compounds to... | def Grigoras(Tc=None, Pc=None, Vc=None):
r'''Relatively recent (1990) relationship for estimating critical
properties from each other. Two of the three properties are required.
This model uses the "critical surface", a general plot of Tc vs Pc vs Vc.
The model used 137 organic and inorganic compounds to... | [
"r",
"Relatively",
"recent",
"(",
"1990",
")",
"relationship",
"for",
"estimating",
"critical",
"properties",
"from",
"each",
"other",
".",
"Two",
"of",
"the",
"three",
"properties",
"are",
"required",
".",
"This",
"model",
"uses",
"the",
"critical",
"surface"... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/critical.py#L1074-L1138 | [
"def",
"Grigoras",
"(",
"Tc",
"=",
"None",
",",
"Pc",
"=",
"None",
",",
"Vc",
"=",
"None",
")",
":",
"if",
"Tc",
"and",
"Vc",
":",
"Vc",
"=",
"Vc",
"*",
"1E6",
"# m^3/mol to cm^3/mol",
"Pc",
"=",
"2.9",
"+",
"20.2",
"*",
"Tc",
"/",
"Vc",
"Pc",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | critical_surface | r'''Function for calculating a critical property of a substance from its
other two critical properties. Calls functions Ihmels, Meissner, and
Grigoras, each of which use a general 'Critical surface' type of equation.
Limited accuracy is expected due to very limited theoretical backing.
Parameters
-... | thermo/critical.py | def critical_surface(Tc=None, Pc=None, Vc=None, AvailableMethods=False,
Method=None):
r'''Function for calculating a critical property of a substance from its
other two critical properties. Calls functions Ihmels, Meissner, and
Grigoras, each of which use a general 'Critical surface' ty... | def critical_surface(Tc=None, Pc=None, Vc=None, AvailableMethods=False,
Method=None):
r'''Function for calculating a critical property of a substance from its
other two critical properties. Calls functions Ihmels, Meissner, and
Grigoras, each of which use a general 'Critical surface' ty... | [
"r",
"Function",
"for",
"calculating",
"a",
"critical",
"property",
"of",
"a",
"substance",
"from",
"its",
"other",
"two",
"critical",
"properties",
".",
"Calls",
"functions",
"Ihmels",
"Meissner",
"and",
"Grigoras",
"each",
"of",
"which",
"use",
"a",
"general... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/critical.py#L1147-L1205 | [
"def",
"critical_surface",
"(",
"Tc",
"=",
"None",
",",
"Pc",
"=",
"None",
",",
"Vc",
"=",
"None",
",",
"AvailableMethods",
"=",
"False",
",",
"Method",
"=",
"None",
")",
":",
"def",
"list_methods",
"(",
")",
":",
"methods",
"=",
"[",
"]",
"if",
"(... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | third_property | r'''Function for calculating a critical property of a substance from its
other two critical properties, but retrieving the actual other critical
values for convenient calculation.
Calls functions Ihmels, Meissner, and
Grigoras, each of which use a general 'Critical surface' type of equation.
Limited... | thermo/critical.py | def third_property(CASRN=None, T=False, P=False, V=False):
r'''Function for calculating a critical property of a substance from its
other two critical properties, but retrieving the actual other critical
values for convenient calculation.
Calls functions Ihmels, Meissner, and
Grigoras, each of which... | def third_property(CASRN=None, T=False, P=False, V=False):
r'''Function for calculating a critical property of a substance from its
other two critical properties, but retrieving the actual other critical
values for convenient calculation.
Calls functions Ihmels, Meissner, and
Grigoras, each of which... | [
"r",
"Function",
"for",
"calculating",
"a",
"critical",
"property",
"of",
"a",
"substance",
"from",
"its",
"other",
"two",
"critical",
"properties",
"but",
"retrieving",
"the",
"actual",
"other",
"critical",
"values",
"for",
"convenient",
"calculation",
".",
"Ca... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/critical.py#L1208-L1275 | [
"def",
"third_property",
"(",
"CASRN",
"=",
"None",
",",
"T",
"=",
"False",
",",
"P",
"=",
"False",
",",
"V",
"=",
"False",
")",
":",
"Third",
"=",
"None",
"if",
"V",
":",
"Tc_methods",
"=",
"Tc",
"(",
"CASRN",
",",
"AvailableMethods",
"=",
"True",... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Li | r'''Calculates critical temperature of a mixture according to
mixing rules in [1]_. Better than simple mixing rules.
.. math::
T_{cm} = \sum_{i=1}^n \Phi_i T_{ci}\\
\Phi = \frac{x_i V_{ci}}{\sum_{j=1}^n x_j V_{cj}}
Parameters
----------
zs : array-like
Mole fractions of all... | thermo/critical.py | def Li(zs, Tcs, Vcs):
r'''Calculates critical temperature of a mixture according to
mixing rules in [1]_. Better than simple mixing rules.
.. math::
T_{cm} = \sum_{i=1}^n \Phi_i T_{ci}\\
\Phi = \frac{x_i V_{ci}}{\sum_{j=1}^n x_j V_{cj}}
Parameters
----------
zs : array-like
... | def Li(zs, Tcs, Vcs):
r'''Calculates critical temperature of a mixture according to
mixing rules in [1]_. Better than simple mixing rules.
.. math::
T_{cm} = \sum_{i=1}^n \Phi_i T_{ci}\\
\Phi = \frac{x_i V_{ci}}{\sum_{j=1}^n x_j V_{cj}}
Parameters
----------
zs : array-like
... | [
"r",
"Calculates",
"critical",
"temperature",
"of",
"a",
"mixture",
"according",
"to",
"mixing",
"rules",
"in",
"[",
"1",
"]",
"_",
".",
"Better",
"than",
"simple",
"mixing",
"rules",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/critical.py#L1284-L1344 | [
"def",
"Li",
"(",
"zs",
",",
"Tcs",
",",
"Vcs",
")",
":",
"if",
"not",
"none_and_length_check",
"(",
"[",
"zs",
",",
"Tcs",
",",
"Vcs",
"]",
")",
":",
"raise",
"Exception",
"(",
"'Function inputs are incorrect format'",
")",
"denominator",
"=",
"sum",
"(... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Chueh_Prausnitz_Tc | r'''Calculates critical temperature of a mixture according to
mixing rules in [1]_.
.. math::
T_{cm} = \sum_i^n \theta_i Tc_i + \sum_i^n\sum_j^n(\theta_i \theta_j
\tau_{ij})T_{ref}
\theta = \frac{x_i V_{ci}^{2/3}}{\sum_{j=1}^n x_j V_{cj}^{2/3}}
For a binary mxiture, this simplifie... | thermo/critical.py | def Chueh_Prausnitz_Tc(zs, Tcs, Vcs, taus):
r'''Calculates critical temperature of a mixture according to
mixing rules in [1]_.
.. math::
T_{cm} = \sum_i^n \theta_i Tc_i + \sum_i^n\sum_j^n(\theta_i \theta_j
\tau_{ij})T_{ref}
\theta = \frac{x_i V_{ci}^{2/3}}{\sum_{j=1}^n x_j V_{cj}^... | def Chueh_Prausnitz_Tc(zs, Tcs, Vcs, taus):
r'''Calculates critical temperature of a mixture according to
mixing rules in [1]_.
.. math::
T_{cm} = \sum_i^n \theta_i Tc_i + \sum_i^n\sum_j^n(\theta_i \theta_j
\tau_{ij})T_{ref}
\theta = \frac{x_i V_{ci}^{2/3}}{\sum_{j=1}^n x_j V_{cj}^... | [
"r",
"Calculates",
"critical",
"temperature",
"of",
"a",
"mixture",
"according",
"to",
"mixing",
"rules",
"in",
"[",
"1",
"]",
"_",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/critical.py#L1347-L1411 | [
"def",
"Chueh_Prausnitz_Tc",
"(",
"zs",
",",
"Tcs",
",",
"Vcs",
",",
"taus",
")",
":",
"if",
"not",
"none_and_length_check",
"(",
"[",
"zs",
",",
"Tcs",
",",
"Vcs",
"]",
")",
":",
"raise",
"Exception",
"(",
"'Function inputs are incorrect format'",
")",
"d... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Grieves_Thodos | r'''Calculates critical temperature of a mixture according to
mixing rules in [1]_.
.. math::
T_{cm} = \sum_{i} \frac{T_{ci}}{1 + (1/x_i)\sum_j A_{ij} x_j}
For a binary mxiture, this simplifies to:
.. math::
T_{cm} = \frac{T_{c1}}{1 + (x_2/x_1)A_{12}} + \frac{T_{c2}}
{1 + (x_... | thermo/critical.py | def Grieves_Thodos(zs, Tcs, Aijs):
r'''Calculates critical temperature of a mixture according to
mixing rules in [1]_.
.. math::
T_{cm} = \sum_{i} \frac{T_{ci}}{1 + (1/x_i)\sum_j A_{ij} x_j}
For a binary mxiture, this simplifies to:
.. math::
T_{cm} = \frac{T_{c1}}{1 + (x_2/x_1)A_... | def Grieves_Thodos(zs, Tcs, Aijs):
r'''Calculates critical temperature of a mixture according to
mixing rules in [1]_.
.. math::
T_{cm} = \sum_{i} \frac{T_{ci}}{1 + (1/x_i)\sum_j A_{ij} x_j}
For a binary mxiture, this simplifies to:
.. math::
T_{cm} = \frac{T_{c1}}{1 + (x_2/x_1)A_... | [
"r",
"Calculates",
"critical",
"temperature",
"of",
"a",
"mixture",
"according",
"to",
"mixing",
"rules",
"in",
"[",
"1",
"]",
"_",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/critical.py#L1436-L1490 | [
"def",
"Grieves_Thodos",
"(",
"zs",
",",
"Tcs",
",",
"Aijs",
")",
":",
"if",
"not",
"none_and_length_check",
"(",
"[",
"zs",
",",
"Tcs",
"]",
")",
":",
"raise",
"Exception",
"(",
"'Function inputs are incorrect format'",
")",
"Tcm",
"=",
"0",
"for",
"i",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | modified_Wilson_Tc | r'''Calculates critical temperature of a mixture according to
mixing rules in [1]_. Equation
.. math::
T_{cm} = \sum_i x_i T_{ci} + C\sum_i x_i \ln \left(x_i + \sum_j x_j A_{ij}\right)T_{ref}
For a binary mxiture, this simplifies to:
.. math::
T_{cm} = x_1 T_{c1} + x_2 T_{c2} + C[x_1 ... | thermo/critical.py | def modified_Wilson_Tc(zs, Tcs, Aijs):
r'''Calculates critical temperature of a mixture according to
mixing rules in [1]_. Equation
.. math::
T_{cm} = \sum_i x_i T_{ci} + C\sum_i x_i \ln \left(x_i + \sum_j x_j A_{ij}\right)T_{ref}
For a binary mxiture, this simplifies to:
.. math::
... | def modified_Wilson_Tc(zs, Tcs, Aijs):
r'''Calculates critical temperature of a mixture according to
mixing rules in [1]_. Equation
.. math::
T_{cm} = \sum_i x_i T_{ci} + C\sum_i x_i \ln \left(x_i + \sum_j x_j A_{ij}\right)T_{ref}
For a binary mxiture, this simplifies to:
.. math::
... | [
"r",
"Calculates",
"critical",
"temperature",
"of",
"a",
"mixture",
"according",
"to",
"mixing",
"rules",
"in",
"[",
"1",
"]",
"_",
".",
"Equation"
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/critical.py#L1510-L1570 | [
"def",
"modified_Wilson_Tc",
"(",
"zs",
",",
"Tcs",
",",
"Aijs",
")",
":",
"if",
"not",
"none_and_length_check",
"(",
"[",
"zs",
",",
"Tcs",
"]",
")",
":",
"raise",
"Exception",
"(",
"'Function inputs are incorrect format'",
")",
"C",
"=",
"-",
"2500",
"Tc... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Tc_mixture | This function handles the retrival of a mixture's critical temperature.
This API is considered experimental, and is expected to be removed in a
future release in favor of a more complete object-oriented interface.
>>> Tc_mixture([400, 550], [0.3, 0.7])
505.0 | thermo/critical.py | def Tc_mixture(Tcs=None, zs=None, CASRNs=None, AvailableMethods=False, Method=None): # pragma: no cover
'''This function handles the retrival of a mixture's critical temperature.
This API is considered experimental, and is expected to be removed in a
future release in favor of a more complete object-orien... | def Tc_mixture(Tcs=None, zs=None, CASRNs=None, AvailableMethods=False, Method=None): # pragma: no cover
'''This function handles the retrival of a mixture's critical temperature.
This API is considered experimental, and is expected to be removed in a
future release in favor of a more complete object-orien... | [
"This",
"function",
"handles",
"the",
"retrival",
"of",
"a",
"mixture",
"s",
"critical",
"temperature",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/critical.py#L1596-L1621 | [
"def",
"Tc_mixture",
"(",
"Tcs",
"=",
"None",
",",
"zs",
"=",
"None",
",",
"CASRNs",
"=",
"None",
",",
"AvailableMethods",
"=",
"False",
",",
"Method",
"=",
"None",
")",
":",
"# pragma: no cover",
"def",
"list_methods",
"(",
")",
":",
"methods",
"=",
"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Pc_mixture | This function handles the retrival of a mixture's critical temperature.
This API is considered experimental, and is expected to be removed in a
future release in favor of a more complete object-oriented interface.
>>> Pc_mixture([2.2E7, 1.1E7], [0.3, 0.7])
14300000.0 | thermo/critical.py | def Pc_mixture(Pcs=None, zs=None, CASRNs=None, AvailableMethods=False, Method=None): # pragma: no cover
'''This function handles the retrival of a mixture's critical temperature.
This API is considered experimental, and is expected to be removed in a
future release in favor of a more complete object-orien... | def Pc_mixture(Pcs=None, zs=None, CASRNs=None, AvailableMethods=False, Method=None): # pragma: no cover
'''This function handles the retrival of a mixture's critical temperature.
This API is considered experimental, and is expected to be removed in a
future release in favor of a more complete object-orien... | [
"This",
"function",
"handles",
"the",
"retrival",
"of",
"a",
"mixture",
"s",
"critical",
"temperature",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/critical.py#L1626-L1651 | [
"def",
"Pc_mixture",
"(",
"Pcs",
"=",
"None",
",",
"zs",
"=",
"None",
",",
"CASRNs",
"=",
"None",
",",
"AvailableMethods",
"=",
"False",
",",
"Method",
"=",
"None",
")",
":",
"# pragma: no cover",
"def",
"list_methods",
"(",
")",
":",
"methods",
"=",
"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Chueh_Prausnitz_Vc | r'''Calculates critical volume of a mixture according to
mixing rules in [1]_ with an interaction parameter.
.. math::
V_{cm} = \sum_i^n \theta_i V_{ci} + \sum_i^n\sum_j^n(\theta_i \theta_j \nu_{ij})V_{ref}
\theta = \frac{x_i V_{ci}^{2/3}}{\sum_{j=1}^n x_j V_{cj}^{2/3}}
Parameters
----... | thermo/critical.py | def Chueh_Prausnitz_Vc(zs, Vcs, nus):
r'''Calculates critical volume of a mixture according to
mixing rules in [1]_ with an interaction parameter.
.. math::
V_{cm} = \sum_i^n \theta_i V_{ci} + \sum_i^n\sum_j^n(\theta_i \theta_j \nu_{ij})V_{ref}
\theta = \frac{x_i V_{ci}^{2/3}}{\sum_{j=1}^n ... | def Chueh_Prausnitz_Vc(zs, Vcs, nus):
r'''Calculates critical volume of a mixture according to
mixing rules in [1]_ with an interaction parameter.
.. math::
V_{cm} = \sum_i^n \theta_i V_{ci} + \sum_i^n\sum_j^n(\theta_i \theta_j \nu_{ij})V_{ref}
\theta = \frac{x_i V_{ci}^{2/3}}{\sum_{j=1}^n ... | [
"r",
"Calculates",
"critical",
"volume",
"of",
"a",
"mixture",
"according",
"to",
"mixing",
"rules",
"in",
"[",
"1",
"]",
"_",
"with",
"an",
"interaction",
"parameter",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/critical.py#L1655-L1710 | [
"def",
"Chueh_Prausnitz_Vc",
"(",
"zs",
",",
"Vcs",
",",
"nus",
")",
":",
"if",
"not",
"none_and_length_check",
"(",
"[",
"zs",
",",
"Vcs",
"]",
")",
":",
"# check same-length inputs",
"raise",
"Exception",
"(",
"'Function inputs are incorrect format'",
")",
"de... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | modified_Wilson_Vc | r'''Calculates critical volume of a mixture according to
mixing rules in [1]_ with parameters. Equation
.. math::
V_{cm} = \sum_i x_i V_{ci} + C\sum_i x_i \ln \left(x_i + \sum_j x_j A_{ij}\right)V_{ref}
For a binary mxiture, this simplifies to:
.. math::
V_{cm} = x_1 V_{c1} + x_2 V_{c... | thermo/critical.py | def modified_Wilson_Vc(zs, Vcs, Aijs):
r'''Calculates critical volume of a mixture according to
mixing rules in [1]_ with parameters. Equation
.. math::
V_{cm} = \sum_i x_i V_{ci} + C\sum_i x_i \ln \left(x_i + \sum_j x_j A_{ij}\right)V_{ref}
For a binary mxiture, this simplifies to:
.. ma... | def modified_Wilson_Vc(zs, Vcs, Aijs):
r'''Calculates critical volume of a mixture according to
mixing rules in [1]_ with parameters. Equation
.. math::
V_{cm} = \sum_i x_i V_{ci} + C\sum_i x_i \ln \left(x_i + \sum_j x_j A_{ij}\right)V_{ref}
For a binary mxiture, this simplifies to:
.. ma... | [
"r",
"Calculates",
"critical",
"volume",
"of",
"a",
"mixture",
"according",
"to",
"mixing",
"rules",
"in",
"[",
"1",
"]",
"_",
"with",
"parameters",
".",
"Equation"
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/critical.py#L1716-L1777 | [
"def",
"modified_Wilson_Vc",
"(",
"zs",
",",
"Vcs",
",",
"Aijs",
")",
":",
"if",
"not",
"none_and_length_check",
"(",
"[",
"zs",
",",
"Vcs",
"]",
")",
":",
"# check same-length inputs",
"raise",
"Exception",
"(",
"'Function inputs are incorrect format'",
")",
"C... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Vc_mixture | This function handles the retrival of a mixture's critical temperature.
This API is considered experimental, and is expected to be removed in a
future release in favor of a more complete object-oriented interface.
>>> Vc_mixture([5.6E-5, 2E-4], [0.3, 0.7])
0.0001568 | thermo/critical.py | def Vc_mixture(Vcs=None, zs=None, CASRNs=None, AvailableMethods=False, Method=None): # pragma: no cover
'''This function handles the retrival of a mixture's critical temperature.
This API is considered experimental, and is expected to be removed in a
future release in favor of a more complete object-orien... | def Vc_mixture(Vcs=None, zs=None, CASRNs=None, AvailableMethods=False, Method=None): # pragma: no cover
'''This function handles the retrival of a mixture's critical temperature.
This API is considered experimental, and is expected to be removed in a
future release in favor of a more complete object-orien... | [
"This",
"function",
"handles",
"the",
"retrival",
"of",
"a",
"mixture",
"s",
"critical",
"temperature",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/critical.py#L1781-L1806 | [
"def",
"Vc_mixture",
"(",
"Vcs",
"=",
"None",
",",
"zs",
"=",
"None",
",",
"CASRNs",
"=",
"None",
",",
"AvailableMethods",
"=",
"False",
",",
"Method",
"=",
"None",
")",
":",
"# pragma: no cover",
"def",
"list_methods",
"(",
")",
":",
"methods",
"=",
"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | checkCAS | Checks if a CAS number is valid. Returns False if the parser cannot
parse the given string..
Parameters
----------
CASRN : string
A three-piece, dash-separated set of numbers
Returns
-------
result : bool
Boolean value if CASRN was valid. If parsing fails, return False als... | thermo/identifiers.py | def checkCAS(CASRN):
'''Checks if a CAS number is valid. Returns False if the parser cannot
parse the given string..
Parameters
----------
CASRN : string
A three-piece, dash-separated set of numbers
Returns
-------
result : bool
Boolean value if CASRN was valid. If par... | def checkCAS(CASRN):
'''Checks if a CAS number is valid. Returns False if the parser cannot
parse the given string..
Parameters
----------
CASRN : string
A three-piece, dash-separated set of numbers
Returns
-------
result : bool
Boolean value if CASRN was valid. If par... | [
"Checks",
"if",
"a",
"CAS",
"number",
"is",
"valid",
".",
"Returns",
"False",
"if",
"the",
"parser",
"cannot",
"parse",
"the",
"given",
"string",
".."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/identifiers.py#L35-L81 | [
"def",
"checkCAS",
"(",
"CASRN",
")",
":",
"try",
":",
"check",
"=",
"CASRN",
"[",
"-",
"1",
"]",
"CASRN",
"=",
"CASRN",
"[",
":",
":",
"-",
"1",
"]",
"[",
"1",
":",
"]",
"productsum",
"=",
"0",
"i",
"=",
"1",
"for",
"num",
"in",
"CASRN",
"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | CAS_from_any | Looks up the CAS number of a chemical by searching and testing for the
string being any of the following types of chemical identifiers:
* Name, in IUPAC form or common form or a synonym registered in PubChem
* InChI name, prefixed by 'InChI=1S/' or 'InChI=1/'
* InChI key, prefixed by 'InChIKey='
... | thermo/identifiers.py | def CAS_from_any(ID, autoload=False):
'''Looks up the CAS number of a chemical by searching and testing for the
string being any of the following types of chemical identifiers:
* Name, in IUPAC form or common form or a synonym registered in PubChem
* InChI name, prefixed by 'InChI=1S/' or 'InChI=1/... | def CAS_from_any(ID, autoload=False):
'''Looks up the CAS number of a chemical by searching and testing for the
string being any of the following types of chemical identifiers:
* Name, in IUPAC form or common form or a synonym registered in PubChem
* InChI name, prefixed by 'InChI=1S/' or 'InChI=1/... | [
"Looks",
"up",
"the",
"CAS",
"number",
"of",
"a",
"chemical",
"by",
"searching",
"and",
"testing",
"for",
"the",
"string",
"being",
"any",
"of",
"the",
"following",
"types",
"of",
"chemical",
"identifiers",
":",
"*",
"Name",
"in",
"IUPAC",
"form",
"or",
... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/identifiers.py#L359-L528 | [
"def",
"CAS_from_any",
"(",
"ID",
",",
"autoload",
"=",
"False",
")",
":",
"ID",
"=",
"ID",
".",
"strip",
"(",
")",
"ID_lower",
"=",
"ID",
".",
"lower",
"(",
")",
"if",
"ID",
"in",
"periodic_table",
":",
"if",
"periodic_table",
"[",
"ID",
"]",
".",... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | mixture_from_any | Looks up a string which may represent a mixture in the database of
thermo to determine the key by which the composition of that mixture can
be obtained in the dictionary `_MixtureDict`.
Parameters
----------
ID : str
A string or 1-element list containing the name which may represent a
... | thermo/identifiers.py | def mixture_from_any(ID):
'''Looks up a string which may represent a mixture in the database of
thermo to determine the key by which the composition of that mixture can
be obtained in the dictionary `_MixtureDict`.
Parameters
----------
ID : str
A string or 1-element list containing th... | def mixture_from_any(ID):
'''Looks up a string which may represent a mixture in the database of
thermo to determine the key by which the composition of that mixture can
be obtained in the dictionary `_MixtureDict`.
Parameters
----------
ID : str
A string or 1-element list containing th... | [
"Looks",
"up",
"a",
"string",
"which",
"may",
"represent",
"a",
"mixture",
"in",
"the",
"database",
"of",
"thermo",
"to",
"determine",
"the",
"key",
"by",
"which",
"the",
"composition",
"of",
"that",
"mixture",
"can",
"be",
"obtained",
"in",
"the",
"dictio... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/identifiers.py#L685-L723 | [
"def",
"mixture_from_any",
"(",
"ID",
")",
":",
"if",
"type",
"(",
"ID",
")",
"==",
"list",
":",
"if",
"len",
"(",
"ID",
")",
"==",
"1",
":",
"ID",
"=",
"ID",
"[",
"0",
"]",
"else",
":",
"raise",
"Exception",
"(",
"'If the input is a list, the list m... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | ChemicalMetadata.charge | Charge of the species as an integer. Computed as a property as most
species do not have a charge and so storing it would be a waste of
memory. | thermo/identifiers.py | def charge(self):
'''Charge of the species as an integer. Computed as a property as most
species do not have a charge and so storing it would be a waste of
memory.
'''
try:
return self._charge
except AttributeError:
self._charge = charge_from_form... | def charge(self):
'''Charge of the species as an integer. Computed as a property as most
species do not have a charge and so storing it would be a waste of
memory.
'''
try:
return self._charge
except AttributeError:
self._charge = charge_from_form... | [
"Charge",
"of",
"the",
"species",
"as",
"an",
"integer",
".",
"Computed",
"as",
"a",
"property",
"as",
"most",
"species",
"do",
"not",
"have",
"a",
"charge",
"and",
"so",
"storing",
"it",
"would",
"be",
"a",
"waste",
"of",
"memory",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/identifiers.py#L92-L101 | [
"def",
"charge",
"(",
"self",
")",
":",
"try",
":",
"return",
"self",
".",
"_charge",
"except",
"AttributeError",
":",
"self",
".",
"_charge",
"=",
"charge_from_formula",
"(",
"self",
".",
"formula",
")",
"return",
"self",
".",
"_charge"
] | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | ChemicalMetadataDB.load_included_indentifiers | Loads a file with newline-separated integers representing which
chemical should be kept in memory; ones not included are ignored. | thermo/identifiers.py | def load_included_indentifiers(self, file_name):
'''Loads a file with newline-separated integers representing which
chemical should be kept in memory; ones not included are ignored.
'''
self.restrict_identifiers = True
included_identifiers = set()
with open(file_n... | def load_included_indentifiers(self, file_name):
'''Loads a file with newline-separated integers representing which
chemical should be kept in memory; ones not included are ignored.
'''
self.restrict_identifiers = True
included_identifiers = set()
with open(file_n... | [
"Loads",
"a",
"file",
"with",
"newline",
"-",
"separated",
"integers",
"representing",
"which",
"chemical",
"should",
"be",
"kept",
"in",
"memory",
";",
"ones",
"not",
"included",
"are",
"ignored",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/identifiers.py#L280-L288 | [
"def",
"load_included_indentifiers",
"(",
"self",
",",
"file_name",
")",
":",
"self",
".",
"restrict_identifiers",
"=",
"True",
"included_identifiers",
"=",
"set",
"(",
")",
"with",
"open",
"(",
"file_name",
")",
"as",
"f",
":",
"[",
"included_identifiers",
".... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | EQ100 | r'''DIPPR Equation # 100. Used in calculating the molar heat capacities
of liquids and solids, liquid thermal conductivity, and solid density.
All parameters default to zero. As this is a straightforward polynomial,
no restrictions on parameters apply. Note that high-order polynomials like
this may need... | thermo/dippr.py | def EQ100(T, A=0, B=0, C=0, D=0, E=0, F=0, G=0, order=0):
r'''DIPPR Equation # 100. Used in calculating the molar heat capacities
of liquids and solids, liquid thermal conductivity, and solid density.
All parameters default to zero. As this is a straightforward polynomial,
no restrictions on parameters ... | def EQ100(T, A=0, B=0, C=0, D=0, E=0, F=0, G=0, order=0):
r'''DIPPR Equation # 100. Used in calculating the molar heat capacities
of liquids and solids, liquid thermal conductivity, and solid density.
All parameters default to zero. As this is a straightforward polynomial,
no restrictions on parameters ... | [
"r",
"DIPPR",
"Equation",
"#",
"100",
".",
"Used",
"in",
"calculating",
"the",
"molar",
"heat",
"capacities",
"of",
"liquids",
"and",
"solids",
"liquid",
"thermal",
"conductivity",
"and",
"solid",
"density",
".",
"All",
"parameters",
"default",
"to",
"zero",
... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/dippr.py#L39-L110 | [
"def",
"EQ100",
"(",
"T",
",",
"A",
"=",
"0",
",",
"B",
"=",
"0",
",",
"C",
"=",
"0",
",",
"D",
"=",
"0",
",",
"E",
"=",
"0",
",",
"F",
"=",
"0",
",",
"G",
"=",
"0",
",",
"order",
"=",
"0",
")",
":",
"if",
"order",
"==",
"0",
":",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | EQ102 | r'''DIPPR Equation # 102. Used in calculating vapor viscosity, vapor
thermal conductivity, and sometimes solid heat capacity. High values of B
raise an OverflowError.
All 4 parameters are required. C and D are often 0.
.. math::
Y = \frac{A\cdot T^B}{1 + \frac{C}{T} + \frac{D}{T^2}}
Parame... | thermo/dippr.py | def EQ102(T, A, B, C, D, order=0):
r'''DIPPR Equation # 102. Used in calculating vapor viscosity, vapor
thermal conductivity, and sometimes solid heat capacity. High values of B
raise an OverflowError.
All 4 parameters are required. C and D are often 0.
.. math::
Y = \frac{A\cdot T^B}{1 + \... | def EQ102(T, A, B, C, D, order=0):
r'''DIPPR Equation # 102. Used in calculating vapor viscosity, vapor
thermal conductivity, and sometimes solid heat capacity. High values of B
raise an OverflowError.
All 4 parameters are required. C and D are often 0.
.. math::
Y = \frac{A\cdot T^B}{1 + \... | [
"r",
"DIPPR",
"Equation",
"#",
"102",
".",
"Used",
"in",
"calculating",
"vapor",
"viscosity",
"vapor",
"thermal",
"conductivity",
"and",
"sometimes",
"solid",
"heat",
"capacity",
".",
"High",
"values",
"of",
"B",
"raise",
"an",
"OverflowError",
".",
"All",
"... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/dippr.py#L155-L241 | [
"def",
"EQ102",
"(",
"T",
",",
"A",
",",
"B",
",",
"C",
",",
"D",
",",
"order",
"=",
"0",
")",
":",
"if",
"order",
"==",
"0",
":",
"return",
"A",
"*",
"T",
"**",
"B",
"/",
"(",
"1.",
"+",
"C",
"/",
"T",
"+",
"D",
"/",
"(",
"T",
"*",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | EQ104 | r'''DIPPR Equation #104. Often used in calculating second virial
coefficients of gases. All 5 parameters are required.
C, D, and E are normally large values.
.. math::
Y = A + \frac{B}{T} + \frac{C}{T^3} + \frac{D}{T^8} + \frac{E}{T^9}
Parameters
----------
T : float
Temperatur... | thermo/dippr.py | def EQ104(T, A, B, C, D, E, order=0):
r'''DIPPR Equation #104. Often used in calculating second virial
coefficients of gases. All 5 parameters are required.
C, D, and E are normally large values.
.. math::
Y = A + \frac{B}{T} + \frac{C}{T^3} + \frac{D}{T^8} + \frac{E}{T^9}
Parameters
-... | def EQ104(T, A, B, C, D, E, order=0):
r'''DIPPR Equation #104. Often used in calculating second virial
coefficients of gases. All 5 parameters are required.
C, D, and E are normally large values.
.. math::
Y = A + \frac{B}{T} + \frac{C}{T^3} + \frac{D}{T^8} + \frac{E}{T^9}
Parameters
-... | [
"r",
"DIPPR",
"Equation",
"#104",
".",
"Often",
"used",
"in",
"calculating",
"second",
"virial",
"coefficients",
"of",
"gases",
".",
"All",
"5",
"parameters",
"are",
"required",
".",
"C",
"D",
"and",
"E",
"are",
"normally",
"large",
"values",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/dippr.py#L244-L315 | [
"def",
"EQ104",
"(",
"T",
",",
"A",
",",
"B",
",",
"C",
",",
"D",
",",
"E",
",",
"order",
"=",
"0",
")",
":",
"if",
"order",
"==",
"0",
":",
"T2",
"=",
"T",
"*",
"T",
"return",
"A",
"+",
"(",
"B",
"+",
"(",
"C",
"+",
"(",
"D",
"+",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | EQ105 | r'''DIPPR Equation #105. Often used in calculating liquid molar density.
All 4 parameters are required. C is sometimes the fluid's critical
temperature.
.. math::
Y = \frac{A}{B^{1 + (1-\frac{T}{C})^D}}
Parameters
----------
T : float
Temperature, [K]
A-D : float
Pa... | thermo/dippr.py | def EQ105(T, A, B, C, D):
r'''DIPPR Equation #105. Often used in calculating liquid molar density.
All 4 parameters are required. C is sometimes the fluid's critical
temperature.
.. math::
Y = \frac{A}{B^{1 + (1-\frac{T}{C})^D}}
Parameters
----------
T : float
Temperature, ... | def EQ105(T, A, B, C, D):
r'''DIPPR Equation #105. Often used in calculating liquid molar density.
All 4 parameters are required. C is sometimes the fluid's critical
temperature.
.. math::
Y = \frac{A}{B^{1 + (1-\frac{T}{C})^D}}
Parameters
----------
T : float
Temperature, ... | [
"r",
"DIPPR",
"Equation",
"#105",
".",
"Often",
"used",
"in",
"calculating",
"liquid",
"molar",
"density",
".",
"All",
"4",
"parameters",
"are",
"required",
".",
"C",
"is",
"sometimes",
"the",
"fluid",
"s",
"critical",
"temperature",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/dippr.py#L318-L355 | [
"def",
"EQ105",
"(",
"T",
",",
"A",
",",
"B",
",",
"C",
",",
"D",
")",
":",
"return",
"A",
"/",
"B",
"**",
"(",
"1.",
"+",
"(",
"1.",
"-",
"T",
"/",
"C",
")",
"**",
"D",
")"
] | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | EQ106 | r'''DIPPR Equation #106. Often used in calculating liquid surface tension,
and heat of vaporization.
Only parameters A and B parameters are required; many fits include no
further parameters. Critical temperature is also required.
.. math::
Y = A(1-T_r)^{B + C T_r + D T_r^2 + E T_r^3}
T... | thermo/dippr.py | def EQ106(T, Tc, A, B, C=0, D=0, E=0):
r'''DIPPR Equation #106. Often used in calculating liquid surface tension,
and heat of vaporization.
Only parameters A and B parameters are required; many fits include no
further parameters. Critical temperature is also required.
.. math::
Y = A(1-T_r)... | def EQ106(T, Tc, A, B, C=0, D=0, E=0):
r'''DIPPR Equation #106. Often used in calculating liquid surface tension,
and heat of vaporization.
Only parameters A and B parameters are required; many fits include no
further parameters. Critical temperature is also required.
.. math::
Y = A(1-T_r)... | [
"r",
"DIPPR",
"Equation",
"#106",
".",
"Often",
"used",
"in",
"calculating",
"liquid",
"surface",
"tension",
"and",
"heat",
"of",
"vaporization",
".",
"Only",
"parameters",
"A",
"and",
"B",
"parameters",
"are",
"required",
";",
"many",
"fits",
"include",
"no... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/dippr.py#L358-L401 | [
"def",
"EQ106",
"(",
"T",
",",
"Tc",
",",
"A",
",",
"B",
",",
"C",
"=",
"0",
",",
"D",
"=",
"0",
",",
"E",
"=",
"0",
")",
":",
"Tr",
"=",
"T",
"/",
"Tc",
"return",
"A",
"*",
"(",
"1.",
"-",
"Tr",
")",
"**",
"(",
"B",
"+",
"Tr",
"*",... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | EQ107 | r'''DIPPR Equation #107. Often used in calculating ideal-gas heat capacity.
All 5 parameters are required.
Also called the Aly-Lee equation.
.. math::
Y = A + B\left[\frac{C/T}{\sinh(C/T)}\right]^2 + D\left[\frac{E/T}{
\cosh(E/T)}\right]^2
Parameters
----------
T : float
... | thermo/dippr.py | def EQ107(T, A=0, B=0, C=0, D=0, E=0, order=0):
r'''DIPPR Equation #107. Often used in calculating ideal-gas heat capacity.
All 5 parameters are required.
Also called the Aly-Lee equation.
.. math::
Y = A + B\left[\frac{C/T}{\sinh(C/T)}\right]^2 + D\left[\frac{E/T}{
\cosh(E/T)}\right]^2... | def EQ107(T, A=0, B=0, C=0, D=0, E=0, order=0):
r'''DIPPR Equation #107. Often used in calculating ideal-gas heat capacity.
All 5 parameters are required.
Also called the Aly-Lee equation.
.. math::
Y = A + B\left[\frac{C/T}{\sinh(C/T)}\right]^2 + D\left[\frac{E/T}{
\cosh(E/T)}\right]^2... | [
"r",
"DIPPR",
"Equation",
"#107",
".",
"Often",
"used",
"in",
"calculating",
"ideal",
"-",
"gas",
"heat",
"capacity",
".",
"All",
"5",
"parameters",
"are",
"required",
".",
"Also",
"called",
"the",
"Aly",
"-",
"Lee",
"equation",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/dippr.py#L404-L487 | [
"def",
"EQ107",
"(",
"T",
",",
"A",
"=",
"0",
",",
"B",
"=",
"0",
",",
"C",
"=",
"0",
",",
"D",
"=",
"0",
",",
"E",
"=",
"0",
",",
"order",
"=",
"0",
")",
":",
"if",
"order",
"==",
"0",
":",
"return",
"A",
"+",
"B",
"*",
"(",
"(",
"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | EQ114 | r'''DIPPR Equation #114. Rarely used, normally as an alternate liquid
heat capacity expression. All 4 parameters are required, as well as
critical temperature.
.. math::
Y = \frac{A^2}{\tau} + B - 2AC\tau - AD\tau^2 - \frac{1}{3}C^2\tau^3
- \frac{1}{2}CD\tau^4 - \frac{1}{5}D^2\tau^5
... | thermo/dippr.py | def EQ114(T, Tc, A, B, C, D, order=0):
r'''DIPPR Equation #114. Rarely used, normally as an alternate liquid
heat capacity expression. All 4 parameters are required, as well as
critical temperature.
.. math::
Y = \frac{A^2}{\tau} + B - 2AC\tau - AD\tau^2 - \frac{1}{3}C^2\tau^3
- \frac{1... | def EQ114(T, Tc, A, B, C, D, order=0):
r'''DIPPR Equation #114. Rarely used, normally as an alternate liquid
heat capacity expression. All 4 parameters are required, as well as
critical temperature.
.. math::
Y = \frac{A^2}{\tau} + B - 2AC\tau - AD\tau^2 - \frac{1}{3}C^2\tau^3
- \frac{1... | [
"r",
"DIPPR",
"Equation",
"#114",
".",
"Rarely",
"used",
"normally",
"as",
"an",
"alternate",
"liquid",
"heat",
"capacity",
"expression",
".",
"All",
"4",
"parameters",
"are",
"required",
"as",
"well",
"as",
"critical",
"temperature",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/dippr.py#L490-L607 | [
"def",
"EQ114",
"(",
"T",
",",
"Tc",
",",
"A",
",",
"B",
",",
"C",
",",
"D",
",",
"order",
"=",
"0",
")",
":",
"if",
"order",
"==",
"0",
":",
"t",
"=",
"1.",
"-",
"T",
"/",
"Tc",
"return",
"(",
"A",
"**",
"2.",
"/",
"t",
"+",
"B",
"-"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | EQ115 | r'''DIPPR Equation #115. No major uses; has been used as an alternate
liquid viscosity expression, and as a model for vapor pressure.
Only parameters A and B are required.
.. math::
Y = \exp\left(A + \frac{B}{T} + C\log T + D T^2 + \frac{E}{T^2}\right)
Parameters
----------
T : float
... | thermo/dippr.py | def EQ115(T, A, B, C=0, D=0, E=0):
r'''DIPPR Equation #115. No major uses; has been used as an alternate
liquid viscosity expression, and as a model for vapor pressure.
Only parameters A and B are required.
.. math::
Y = \exp\left(A + \frac{B}{T} + C\log T + D T^2 + \frac{E}{T^2}\right)
Pa... | def EQ115(T, A, B, C=0, D=0, E=0):
r'''DIPPR Equation #115. No major uses; has been used as an alternate
liquid viscosity expression, and as a model for vapor pressure.
Only parameters A and B are required.
.. math::
Y = \exp\left(A + \frac{B}{T} + C\log T + D T^2 + \frac{E}{T^2}\right)
Pa... | [
"r",
"DIPPR",
"Equation",
"#115",
".",
"No",
"major",
"uses",
";",
"has",
"been",
"used",
"as",
"an",
"alternate",
"liquid",
"viscosity",
"expression",
"and",
"as",
"a",
"model",
"for",
"vapor",
"pressure",
".",
"Only",
"parameters",
"A",
"and",
"B",
"ar... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/dippr.py#L610-L640 | [
"def",
"EQ115",
"(",
"T",
",",
"A",
",",
"B",
",",
"C",
"=",
"0",
",",
"D",
"=",
"0",
",",
"E",
"=",
"0",
")",
":",
"return",
"exp",
"(",
"A",
"+",
"B",
"/",
"T",
"+",
"C",
"*",
"log",
"(",
"T",
")",
"+",
"D",
"*",
"T",
"**",
"2",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | EQ116 | r'''DIPPR Equation #116. Used to describe the molar density of water fairly
precisely; no other uses listed. All 5 parameters are needed, as well as
the critical temperature.
.. math::
Y = A + B\tau^{0.35} + C\tau^{2/3} + D\tau + E\tau^{4/3}
\tau = 1 - \frac{T}{T_c}
Parameters
---... | thermo/dippr.py | def EQ116(T, Tc, A, B, C, D, E, order=0):
r'''DIPPR Equation #116. Used to describe the molar density of water fairly
precisely; no other uses listed. All 5 parameters are needed, as well as
the critical temperature.
.. math::
Y = A + B\tau^{0.35} + C\tau^{2/3} + D\tau + E\tau^{4/3}
\t... | def EQ116(T, Tc, A, B, C, D, E, order=0):
r'''DIPPR Equation #116. Used to describe the molar density of water fairly
precisely; no other uses listed. All 5 parameters are needed, as well as
the critical temperature.
.. math::
Y = A + B\tau^{0.35} + C\tau^{2/3} + D\tau + E\tau^{4/3}
\t... | [
"r",
"DIPPR",
"Equation",
"#116",
".",
"Used",
"to",
"describe",
"the",
"molar",
"density",
"of",
"water",
"fairly",
"precisely",
";",
"no",
"other",
"uses",
"listed",
".",
"All",
"5",
"parameters",
"are",
"needed",
"as",
"well",
"as",
"the",
"critical",
... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/dippr.py#L643-L770 | [
"def",
"EQ116",
"(",
"T",
",",
"Tc",
",",
"A",
",",
"B",
",",
"C",
",",
"D",
",",
"E",
",",
"order",
"=",
"0",
")",
":",
"if",
"order",
"==",
"0",
":",
"tau",
"=",
"1",
"-",
"T",
"/",
"Tc",
"return",
"A",
"+",
"B",
"*",
"tau",
"**",
"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | EQ127 | r'''DIPPR Equation #127. Rarely used, and then only in calculating
ideal-gas heat capacity. All 7 parameters are required.
.. math::
Y = A+B\left[\frac{\left(\frac{C}{T}\right)^2\exp\left(\frac{C}{T}
\right)}{\left(\exp\frac{C}{T}-1 \right)^2}\right]
+D\left[\frac{\left(\frac{E}{T}\righ... | thermo/dippr.py | def EQ127(T, A, B, C, D, E, F, G, order=0):
r'''DIPPR Equation #127. Rarely used, and then only in calculating
ideal-gas heat capacity. All 7 parameters are required.
.. math::
Y = A+B\left[\frac{\left(\frac{C}{T}\right)^2\exp\left(\frac{C}{T}
\right)}{\left(\exp\frac{C}{T}-1 \right)^2}\rig... | def EQ127(T, A, B, C, D, E, F, G, order=0):
r'''DIPPR Equation #127. Rarely used, and then only in calculating
ideal-gas heat capacity. All 7 parameters are required.
.. math::
Y = A+B\left[\frac{\left(\frac{C}{T}\right)^2\exp\left(\frac{C}{T}
\right)}{\left(\exp\frac{C}{T}-1 \right)^2}\rig... | [
"r",
"DIPPR",
"Equation",
"#127",
".",
"Rarely",
"used",
"and",
"then",
"only",
"in",
"calculating",
"ideal",
"-",
"gas",
"heat",
"capacity",
".",
"All",
"7",
"parameters",
"are",
"required",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/dippr.py#L773-L878 | [
"def",
"EQ127",
"(",
"T",
",",
"A",
",",
"B",
",",
"C",
",",
"D",
",",
"E",
",",
"F",
",",
"G",
",",
"order",
"=",
"0",
")",
":",
"if",
"order",
"==",
"0",
":",
"return",
"(",
"A",
"+",
"B",
"*",
"(",
"(",
"C",
"/",
"T",
")",
"**",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | CoolProp_T_dependent_property | r'''Calculates a property of a chemical in either the liquid or gas phase
as a function of temperature only. This means that the property is
either at 1 atm or along the saturation curve.
Parameters
----------
T : float
Temperature of the fluid [K]
CASRN : str
CAS number of the ... | thermo/coolprop.py | def CoolProp_T_dependent_property(T, CASRN, prop, phase):
r'''Calculates a property of a chemical in either the liquid or gas phase
as a function of temperature only. This means that the property is
either at 1 atm or along the saturation curve.
Parameters
----------
T : float
Temperatu... | def CoolProp_T_dependent_property(T, CASRN, prop, phase):
r'''Calculates a property of a chemical in either the liquid or gas phase
as a function of temperature only. This means that the property is
either at 1 atm or along the saturation curve.
Parameters
----------
T : float
Temperatu... | [
"r",
"Calculates",
"a",
"property",
"of",
"a",
"chemical",
"in",
"either",
"the",
"liquid",
"or",
"gas",
"phase",
"as",
"a",
"function",
"of",
"temperature",
"only",
".",
"This",
"means",
"that",
"the",
"property",
"is",
"either",
"at",
"1",
"atm",
"or",... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/coolprop.py#L213-L290 | [
"def",
"CoolProp_T_dependent_property",
"(",
"T",
",",
"CASRN",
",",
"prop",
",",
"phase",
")",
":",
"if",
"not",
"has_CoolProp",
":",
"# pragma: no cover",
"raise",
"Exception",
"(",
"'CoolProp library is not installed'",
")",
"if",
"CASRN",
"not",
"in",
"coolpro... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Stockmayer | r'''This function handles the retrieval or calculation a chemical's
Stockmayer parameter. Values are available from one source with lookup
based on CASRNs, or can be estimated from 7 CSP methods.
Will automatically select a data source to use if no Method is provided;
returns None if the data is not ava... | thermo/lennard_jones.py | def Stockmayer(Tm=None, Tb=None, Tc=None, Zc=None, omega=None,
CASRN='', AvailableMethods=False, Method=None):
r'''This function handles the retrieval or calculation a chemical's
Stockmayer parameter. Values are available from one source with lookup
based on CASRNs, or can be estimated from 7... | def Stockmayer(Tm=None, Tb=None, Tc=None, Zc=None, omega=None,
CASRN='', AvailableMethods=False, Method=None):
r'''This function handles the retrieval or calculation a chemical's
Stockmayer parameter. Values are available from one source with lookup
based on CASRNs, or can be estimated from 7... | [
"r",
"This",
"function",
"handles",
"the",
"retrieval",
"or",
"calculation",
"a",
"chemical",
"s",
"Stockmayer",
"parameter",
".",
"Values",
"are",
"available",
"from",
"one",
"source",
"with",
"lookup",
"based",
"on",
"CASRNs",
"or",
"can",
"be",
"estimated",... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/lennard_jones.py#L63-L176 | [
"def",
"Stockmayer",
"(",
"Tm",
"=",
"None",
",",
"Tb",
"=",
"None",
",",
"Tc",
"=",
"None",
",",
"Zc",
"=",
"None",
",",
"omega",
"=",
"None",
",",
"CASRN",
"=",
"''",
",",
"AvailableMethods",
"=",
"False",
",",
"Method",
"=",
"None",
")",
":",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | molecular_diameter | r'''This function handles the retrieval or calculation a chemical's
L-J molecular diameter. Values are available from one source with lookup
based on CASRNs, or can be estimated from 9 CSP methods.
Will automatically select a data source to use if no Method is provided;
returns None if the data is not a... | thermo/lennard_jones.py | def molecular_diameter(Tc=None, Pc=None, Vc=None, Zc=None, omega=None,
Vm=None, Vb=None, CASRN='', AvailableMethods=False, Method=None):
r'''This function handles the retrieval or calculation a chemical's
L-J molecular diameter. Values are available from one source with lookup
based on CASRNs, or ... | def molecular_diameter(Tc=None, Pc=None, Vc=None, Zc=None, omega=None,
Vm=None, Vb=None, CASRN='', AvailableMethods=False, Method=None):
r'''This function handles the retrieval or calculation a chemical's
L-J molecular diameter. Values are available from one source with lookup
based on CASRNs, or ... | [
"r",
"This",
"function",
"handles",
"the",
"retrieval",
"or",
"calculation",
"a",
"chemical",
"s",
"L",
"-",
"J",
"molecular",
"diameter",
".",
"Values",
"are",
"available",
"from",
"one",
"source",
"with",
"lookup",
"based",
"on",
"CASRNs",
"or",
"can",
"... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/lennard_jones.py#L191-L314 | [
"def",
"molecular_diameter",
"(",
"Tc",
"=",
"None",
",",
"Pc",
"=",
"None",
",",
"Vc",
"=",
"None",
",",
"Zc",
"=",
"None",
",",
"omega",
"=",
"None",
",",
"Vm",
"=",
"None",
",",
"Vb",
"=",
"None",
",",
"CASRN",
"=",
"''",
",",
"AvailableMethod... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | sigma_Tee_Gotoh_Steward_2 | r'''Calculates Lennard-Jones molecular diameter.
Uses critical temperature, pressure, and acentric factor. CSP method by
[1]_.
.. math::
\sigma = (2.3551 - 0.0874\omega)\left(\frac{T_c}{P_c}\right)^{1/3}
Parameters
----------
Tc : float
Critical temperature of fluid [K]
Pc ... | thermo/lennard_jones.py | def sigma_Tee_Gotoh_Steward_2(Tc, Pc, omega):
r'''Calculates Lennard-Jones molecular diameter.
Uses critical temperature, pressure, and acentric factor. CSP method by
[1]_.
.. math::
\sigma = (2.3551 - 0.0874\omega)\left(\frac{T_c}{P_c}\right)^{1/3}
Parameters
----------
Tc : float... | def sigma_Tee_Gotoh_Steward_2(Tc, Pc, omega):
r'''Calculates Lennard-Jones molecular diameter.
Uses critical temperature, pressure, and acentric factor. CSP method by
[1]_.
.. math::
\sigma = (2.3551 - 0.0874\omega)\left(\frac{T_c}{P_c}\right)^{1/3}
Parameters
----------
Tc : float... | [
"r",
"Calculates",
"Lennard",
"-",
"Jones",
"molecular",
"diameter",
".",
"Uses",
"critical",
"temperature",
"pressure",
"and",
"acentric",
"factor",
".",
"CSP",
"method",
"by",
"[",
"1",
"]",
"_",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/lennard_jones.py#L590-L632 | [
"def",
"sigma_Tee_Gotoh_Steward_2",
"(",
"Tc",
",",
"Pc",
",",
"omega",
")",
":",
"Pc",
"=",
"Pc",
"/",
"101325.",
"sigma",
"=",
"(",
"2.3551",
"-",
"0.0874",
"*",
"omega",
")",
"*",
"(",
"Tc",
"/",
"Pc",
")",
"**",
"(",
"1",
"/",
"3.",
")",
"r... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | sigma_Silva_Liu_Macedo | r'''Calculates Lennard-Jones molecular diameter.
Uses critical temperature and pressure. CSP method by [1]_.
.. math::
\sigma_{LJ}^3 = 0.17791 + 11.779 \left( \frac{T_c}{P_c}\right)
- 0.049029\left( \frac{T_c}{P_c}\right)^2
Parameters
----------
Tc : float
Critical temperat... | thermo/lennard_jones.py | def sigma_Silva_Liu_Macedo(Tc, Pc):
r'''Calculates Lennard-Jones molecular diameter.
Uses critical temperature and pressure. CSP method by [1]_.
.. math::
\sigma_{LJ}^3 = 0.17791 + 11.779 \left( \frac{T_c}{P_c}\right)
- 0.049029\left( \frac{T_c}{P_c}\right)^2
Parameters
----------
... | def sigma_Silva_Liu_Macedo(Tc, Pc):
r'''Calculates Lennard-Jones molecular diameter.
Uses critical temperature and pressure. CSP method by [1]_.
.. math::
\sigma_{LJ}^3 = 0.17791 + 11.779 \left( \frac{T_c}{P_c}\right)
- 0.049029\left( \frac{T_c}{P_c}\right)^2
Parameters
----------
... | [
"r",
"Calculates",
"Lennard",
"-",
"Jones",
"molecular",
"diameter",
".",
"Uses",
"critical",
"temperature",
"and",
"pressure",
".",
"CSP",
"method",
"by",
"[",
"1",
"]",
"_",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/lennard_jones.py#L635-L679 | [
"def",
"sigma_Silva_Liu_Macedo",
"(",
"Tc",
",",
"Pc",
")",
":",
"Pc",
"=",
"Pc",
"/",
"1E5",
"# Pa to bar",
"term",
"=",
"0.17791",
"+",
"11.779",
"*",
"(",
"Tc",
"/",
"Pc",
")",
"-",
"0.049029",
"*",
"(",
"Tc",
"/",
"Pc",
")",
"**",
"2",
"if",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | collision_integral_Neufeld_Janzen_Aziz | r'''Calculates Lennard-Jones collision integral for any of 16 values of
(l,j) for the wide range of 0.3 < Tstar < 100. Values are accurate to
0.1 % of actual values, but the calculation of actual values is
computationally intensive and so these simplifications are used, developed
in [1]_.
.. math::... | thermo/lennard_jones.py | def collision_integral_Neufeld_Janzen_Aziz(Tstar, l=1, s=1):
r'''Calculates Lennard-Jones collision integral for any of 16 values of
(l,j) for the wide range of 0.3 < Tstar < 100. Values are accurate to
0.1 % of actual values, but the calculation of actual values is
computationally intensive and so thes... | def collision_integral_Neufeld_Janzen_Aziz(Tstar, l=1, s=1):
r'''Calculates Lennard-Jones collision integral for any of 16 values of
(l,j) for the wide range of 0.3 < Tstar < 100. Values are accurate to
0.1 % of actual values, but the calculation of actual values is
computationally intensive and so thes... | [
"r",
"Calculates",
"Lennard",
"-",
"Jones",
"collision",
"integral",
"for",
"any",
"of",
"16",
"values",
"of",
"(",
"l",
"j",
")",
"for",
"the",
"wide",
"range",
"of",
"0",
".",
"3",
"<",
"Tstar",
"<",
"100",
".",
"Values",
"are",
"accurate",
"to",
... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/lennard_jones.py#L965-L1026 | [
"def",
"collision_integral_Neufeld_Janzen_Aziz",
"(",
"Tstar",
",",
"l",
"=",
"1",
",",
"s",
"=",
"1",
")",
":",
"if",
"(",
"l",
",",
"s",
")",
"not",
"in",
"Neufeld_collision",
":",
"raise",
"Exception",
"(",
"'Input values of l and s are not supported'",
")"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | collision_integral_Kim_Monroe | r'''Calculates Lennard-Jones collision integral for any of 16 values of
(l,j) for the wide range of 0.3 < Tstar < 400. Values are accurate to
0.007 % of actual values, but the calculation of actual values is
computationally intensive and so these simplifications are used, developed
in [1]_.
.. math... | thermo/lennard_jones.py | def collision_integral_Kim_Monroe(Tstar, l=1, s=1):
r'''Calculates Lennard-Jones collision integral for any of 16 values of
(l,j) for the wide range of 0.3 < Tstar < 400. Values are accurate to
0.007 % of actual values, but the calculation of actual values is
computationally intensive and so these simpl... | def collision_integral_Kim_Monroe(Tstar, l=1, s=1):
r'''Calculates Lennard-Jones collision integral for any of 16 values of
(l,j) for the wide range of 0.3 < Tstar < 400. Values are accurate to
0.007 % of actual values, but the calculation of actual values is
computationally intensive and so these simpl... | [
"r",
"Calculates",
"Lennard",
"-",
"Jones",
"collision",
"integral",
"for",
"any",
"of",
"16",
"values",
"of",
"(",
"l",
"j",
")",
"for",
"the",
"wide",
"range",
"of",
"0",
".",
"3",
"<",
"Tstar",
"<",
"400",
".",
"Values",
"are",
"accurate",
"to",
... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/lennard_jones.py#L1088-L1143 | [
"def",
"collision_integral_Kim_Monroe",
"(",
"Tstar",
",",
"l",
"=",
"1",
",",
"s",
"=",
"1",
")",
":",
"if",
"(",
"l",
",",
"s",
")",
"not",
"in",
"As_collision",
":",
"raise",
"Exception",
"(",
"'Input values of l and s are not supported'",
")",
"omega",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Tstar | r'''This function calculates the parameter `Tstar` as needed in performing
collision integral calculations.
.. math::
T^* = \frac{kT}{\epsilon}
Examples
--------
>>> Tstar(T=318.2, epsilon_k=308.43)
1.0316765554582887
Parameters
----------
epsilon_k : float, optional
... | thermo/lennard_jones.py | def Tstar(T, epsilon_k=None, epsilon=None):
r'''This function calculates the parameter `Tstar` as needed in performing
collision integral calculations.
.. math::
T^* = \frac{kT}{\epsilon}
Examples
--------
>>> Tstar(T=318.2, epsilon_k=308.43)
1.0316765554582887
Parameters
... | def Tstar(T, epsilon_k=None, epsilon=None):
r'''This function calculates the parameter `Tstar` as needed in performing
collision integral calculations.
.. math::
T^* = \frac{kT}{\epsilon}
Examples
--------
>>> Tstar(T=318.2, epsilon_k=308.43)
1.0316765554582887
Parameters
... | [
"r",
"This",
"function",
"calculates",
"the",
"parameter",
"Tstar",
"as",
"needed",
"in",
"performing",
"collision",
"integral",
"calculations",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/lennard_jones.py#L1149-L1190 | [
"def",
"Tstar",
"(",
"T",
",",
"epsilon_k",
"=",
"None",
",",
"epsilon",
"=",
"None",
")",
":",
"if",
"epsilon_k",
":",
"_Tstar",
"=",
"T",
"/",
"(",
"epsilon_k",
")",
"elif",
"epsilon",
":",
"_Tstar",
"=",
"k",
"*",
"T",
"/",
"epsilon",
"else",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Hf | r'''This function handles the retrieval of a chemical's standard-phase
heat of formation. The lookup is based on CASRNs. Selects the only
data source available ('API TDB') if the chemical is in it.
Returns None if the data is not available.
Function has data for 571 chemicals.
Parameters
-----... | thermo/reaction.py | def Hf(CASRN, AvailableMethods=False, Method=None):
r'''This function handles the retrieval of a chemical's standard-phase
heat of formation. The lookup is based on CASRNs. Selects the only
data source available ('API TDB') if the chemical is in it.
Returns None if the data is not available.
Functi... | def Hf(CASRN, AvailableMethods=False, Method=None):
r'''This function handles the retrieval of a chemical's standard-phase
heat of formation. The lookup is based on CASRNs. Selects the only
data source available ('API TDB') if the chemical is in it.
Returns None if the data is not available.
Functi... | [
"r",
"This",
"function",
"handles",
"the",
"retrieval",
"of",
"a",
"chemical",
"s",
"standard",
"-",
"phase",
"heat",
"of",
"formation",
".",
"The",
"lookup",
"is",
"based",
"on",
"CASRNs",
".",
"Selects",
"the",
"only",
"data",
"source",
"available",
"(",... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/reaction.py#L51-L117 | [
"def",
"Hf",
"(",
"CASRN",
",",
"AvailableMethods",
"=",
"False",
",",
"Method",
"=",
"None",
")",
":",
"def",
"list_methods",
"(",
")",
":",
"methods",
"=",
"[",
"]",
"if",
"CASRN",
"in",
"API_TDB_data",
".",
"index",
":",
"methods",
".",
"append",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Hf_l | r'''This function handles the retrieval of a chemical's liquid standard
phase heat of formation. The lookup is based on CASRNs. Selects the only
data source available, Active Thermochemical Tables (l), if the chemical is
in it. Returns None if the data is not available.
Function has data for 34 chemica... | thermo/reaction.py | def Hf_l(CASRN, AvailableMethods=False, Method=None):
r'''This function handles the retrieval of a chemical's liquid standard
phase heat of formation. The lookup is based on CASRNs. Selects the only
data source available, Active Thermochemical Tables (l), if the chemical is
in it. Returns None if the da... | def Hf_l(CASRN, AvailableMethods=False, Method=None):
r'''This function handles the retrieval of a chemical's liquid standard
phase heat of formation. The lookup is based on CASRNs. Selects the only
data source available, Active Thermochemical Tables (l), if the chemical is
in it. Returns None if the da... | [
"r",
"This",
"function",
"handles",
"the",
"retrieval",
"of",
"a",
"chemical",
"s",
"liquid",
"standard",
"phase",
"heat",
"of",
"formation",
".",
"The",
"lookup",
"is",
"based",
"on",
"CASRNs",
".",
"Selects",
"the",
"only",
"data",
"source",
"available",
... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/reaction.py#L126-L191 | [
"def",
"Hf_l",
"(",
"CASRN",
",",
"AvailableMethods",
"=",
"False",
",",
"Method",
"=",
"None",
")",
":",
"def",
"list_methods",
"(",
")",
":",
"methods",
"=",
"[",
"]",
"if",
"CASRN",
"in",
"ATcT_l",
".",
"index",
":",
"methods",
".",
"append",
"(",... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Hf_g | r'''This function handles the retrieval of a chemical's gas heat of
formation. 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.
Prefered sources are 'Active Thermochemical Tables (g)' for high accuracy,
an... | thermo/reaction.py | def Hf_g(CASRN, AvailableMethods=False, Method=None):
r'''This function handles the retrieval of a chemical's gas heat of
formation. 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.
Prefered sources are 'A... | def Hf_g(CASRN, AvailableMethods=False, Method=None):
r'''This function handles the retrieval of a chemical's gas heat of
formation. 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.
Prefered sources are 'A... | [
"r",
"This",
"function",
"handles",
"the",
"retrieval",
"of",
"a",
"chemical",
"s",
"gas",
"heat",
"of",
"formation",
".",
"Lookup",
"is",
"based",
"on",
"CASRNs",
".",
"Will",
"automatically",
"select",
"a",
"data",
"source",
"to",
"use",
"if",
"no",
"M... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/reaction.py#L198-L274 | [
"def",
"Hf_g",
"(",
"CASRN",
",",
"AvailableMethods",
"=",
"False",
",",
"Method",
"=",
"None",
")",
":",
"def",
"list_methods",
"(",
")",
":",
"methods",
"=",
"[",
"]",
"if",
"CASRN",
"in",
"ATcT_g",
".",
"index",
":",
"methods",
".",
"append",
"(",... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | omega | r'''This function handles the retrieval of a chemical's acentric factor,
`omega`, or its calculation from correlations or directly through the
definition of acentric factor if possible. Requires a known boiling point,
critical temperature and pressure for use of the correlations. Requires
accurate vapor... | thermo/acentric.py | def omega(CASRN, AvailableMethods=False, Method=None, IgnoreMethods=['LK', 'DEFINITION']):
r'''This function handles the retrieval of a chemical's acentric factor,
`omega`, or its calculation from correlations or directly through the
definition of acentric factor if possible. Requires a known boiling point,... | def omega(CASRN, AvailableMethods=False, Method=None, IgnoreMethods=['LK', 'DEFINITION']):
r'''This function handles the retrieval of a chemical's acentric factor,
`omega`, or its calculation from correlations or directly through the
definition of acentric factor if possible. Requires a known boiling point,... | [
"r",
"This",
"function",
"handles",
"the",
"retrieval",
"of",
"a",
"chemical",
"s",
"acentric",
"factor",
"omega",
"or",
"its",
"calculation",
"from",
"correlations",
"or",
"directly",
"through",
"the",
"definition",
"of",
"acentric",
"factor",
"if",
"possible",... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/acentric.py#L41-L158 | [
"def",
"omega",
"(",
"CASRN",
",",
"AvailableMethods",
"=",
"False",
",",
"Method",
"=",
"None",
",",
"IgnoreMethods",
"=",
"[",
"'LK'",
",",
"'DEFINITION'",
"]",
")",
":",
"def",
"list_methods",
"(",
")",
":",
"methods",
"=",
"[",
"]",
"if",
"CASRN",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | LK_omega | r'''Estimates the acentric factor of a fluid using a correlation in [1]_.
.. math::
\omega = \frac{\ln P_{br}^{sat} - 5.92714 + 6.09648/T_{br} + 1.28862
\ln T_{br} -0.169347T_{br}^6}
{15.2518 - 15.6875/T_{br} - 13.4721 \ln T_{br} + 0.43577 T_{br}^6}
Parameters
----------
Tb : f... | thermo/acentric.py | def LK_omega(Tb, Tc, Pc):
r'''Estimates the acentric factor of a fluid using a correlation in [1]_.
.. math::
\omega = \frac{\ln P_{br}^{sat} - 5.92714 + 6.09648/T_{br} + 1.28862
\ln T_{br} -0.169347T_{br}^6}
{15.2518 - 15.6875/T_{br} - 13.4721 \ln T_{br} + 0.43577 T_{br}^6}
Parame... | def LK_omega(Tb, Tc, Pc):
r'''Estimates the acentric factor of a fluid using a correlation in [1]_.
.. math::
\omega = \frac{\ln P_{br}^{sat} - 5.92714 + 6.09648/T_{br} + 1.28862
\ln T_{br} -0.169347T_{br}^6}
{15.2518 - 15.6875/T_{br} - 13.4721 \ln T_{br} + 0.43577 T_{br}^6}
Parame... | [
"r",
"Estimates",
"the",
"acentric",
"factor",
"of",
"a",
"fluid",
"using",
"a",
"correlation",
"in",
"[",
"1",
"]",
"_",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/acentric.py#L161-L205 | [
"def",
"LK_omega",
"(",
"Tb",
",",
"Tc",
",",
"Pc",
")",
":",
"T_br",
"=",
"Tb",
"/",
"Tc",
"omega",
"=",
"(",
"log",
"(",
"101325.0",
"/",
"Pc",
")",
"-",
"5.92714",
"+",
"6.09648",
"/",
"T_br",
"+",
"1.28862",
"*",
"log",
"(",
"T_br",
")",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | omega_mixture | r'''This function handles the calculation of a mixture's acentric factor.
Calculation is based on the omegas provided for each pure component. Will
automatically select a method to use if no Method is provided;
returns None if insufficient data is available.
Examples
--------
>>> omega_mixture(... | thermo/acentric.py | def omega_mixture(omegas, zs, CASRNs=None, Method=None,
AvailableMethods=False):
r'''This function handles the calculation of a mixture's acentric factor.
Calculation is based on the omegas provided for each pure component. Will
automatically select a method to use if no Method is provided... | def omega_mixture(omegas, zs, CASRNs=None, Method=None,
AvailableMethods=False):
r'''This function handles the calculation of a mixture's acentric factor.
Calculation is based on the omegas provided for each pure component. Will
automatically select a method to use if no Method is provided... | [
"r",
"This",
"function",
"handles",
"the",
"calculation",
"of",
"a",
"mixture",
"s",
"acentric",
"factor",
".",
"Calculation",
"is",
"based",
"on",
"the",
"omegas",
"provided",
"for",
"each",
"pure",
"component",
".",
"Will",
"automatically",
"select",
"a",
... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/acentric.py#L211-L278 | [
"def",
"omega_mixture",
"(",
"omegas",
",",
"zs",
",",
"CASRNs",
"=",
"None",
",",
"Method",
"=",
"None",
",",
"AvailableMethods",
"=",
"False",
")",
":",
"def",
"list_methods",
"(",
")",
":",
"methods",
"=",
"[",
"]",
"if",
"none_and_length_check",
"(",... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | StielPolar | r'''This function handles the calculation of a chemical's Stiel Polar
factor, directly through the definition of Stiel-polar factor if possible.
Requires Tc, Pc, acentric factor, and a vapor pressure datum at Tr=0.6.
Will automatically select a method to use if no Method is provided;
returns None if th... | thermo/acentric.py | def StielPolar(Tc=None, Pc=None, omega=None, CASRN='', Method=None,
AvailableMethods=False):
r'''This function handles the calculation of a chemical's Stiel Polar
factor, directly through the definition of Stiel-polar factor if possible.
Requires Tc, Pc, acentric factor, and a vapor pressure ... | def StielPolar(Tc=None, Pc=None, omega=None, CASRN='', Method=None,
AvailableMethods=False):
r'''This function handles the calculation of a chemical's Stiel Polar
factor, directly through the definition of Stiel-polar factor if possible.
Requires Tc, Pc, acentric factor, and a vapor pressure ... | [
"r",
"This",
"function",
"handles",
"the",
"calculation",
"of",
"a",
"chemical",
"s",
"Stiel",
"Polar",
"factor",
"directly",
"through",
"the",
"definition",
"of",
"Stiel",
"-",
"polar",
"factor",
"if",
"possible",
".",
"Requires",
"Tc",
"Pc",
"acentric",
"f... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/acentric.py#L284-L370 | [
"def",
"StielPolar",
"(",
"Tc",
"=",
"None",
",",
"Pc",
"=",
"None",
",",
"omega",
"=",
"None",
",",
"CASRN",
"=",
"''",
",",
"Method",
"=",
"None",
",",
"AvailableMethods",
"=",
"False",
")",
":",
"def",
"list_methods",
"(",
")",
":",
"methods",
"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | VDI_tabular_data | r'''This function retrieves the tabular data available for a given chemical
and a given property. Lookup is based on CASRNs. Length of data returned
varies between chemicals. All data is at saturation condition from [1]_.
Function has data for 58 chemicals.
Parameters
----------
CASRN : string... | thermo/miscdata.py | def VDI_tabular_data(CASRN, prop):
r'''This function retrieves the tabular data available for a given chemical
and a given property. Lookup is based on CASRNs. Length of data returned
varies between chemicals. All data is at saturation condition from [1]_.
Function has data for 58 chemicals.
Param... | def VDI_tabular_data(CASRN, prop):
r'''This function retrieves the tabular data available for a given chemical
and a given property. Lookup is based on CASRNs. Length of data returned
varies between chemicals. All data is at saturation condition from [1]_.
Function has data for 58 chemicals.
Param... | [
"r",
"This",
"function",
"retrieves",
"the",
"tabular",
"data",
"available",
"for",
"a",
"given",
"chemical",
"and",
"a",
"given",
"property",
".",
"Lookup",
"is",
"based",
"on",
"CASRNs",
".",
"Length",
"of",
"data",
"returned",
"varies",
"between",
"chemic... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/miscdata.py#L90-L145 | [
"def",
"VDI_tabular_data",
"(",
"CASRN",
",",
"prop",
")",
":",
"try",
":",
"d",
"=",
"_VDISaturationDict",
"[",
"CASRN",
"]",
"except",
"KeyError",
":",
"raise",
"Exception",
"(",
"'CASRN not in VDI tabulation'",
")",
"try",
":",
"props",
",",
"Ts",
"=",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | ViswanathNatarajan2 | This function is known to produce values 10 times too low.
The author's data must have an error.
I have adjusted it to fix this.
# DDBST has 0.0004580 as a value at this temperature
>>> ViswanathNatarajan2(348.15, -5.9719, 1007.0)
0.00045983686956829517 | thermo/viscosity.py | def ViswanathNatarajan2(T, A, B):
'''
This function is known to produce values 10 times too low.
The author's data must have an error.
I have adjusted it to fix this.
# DDBST has 0.0004580 as a value at this temperature
>>> ViswanathNatarajan2(348.15, -5.9719, 1007.0)
0.00045983686956829517... | def ViswanathNatarajan2(T, A, B):
'''
This function is known to produce values 10 times too low.
The author's data must have an error.
I have adjusted it to fix this.
# DDBST has 0.0004580 as a value at this temperature
>>> ViswanathNatarajan2(348.15, -5.9719, 1007.0)
0.00045983686956829517... | [
"This",
"function",
"is",
"known",
"to",
"produce",
"values",
"10",
"times",
"too",
"low",
".",
"The",
"author",
"s",
"data",
"must",
"have",
"an",
"error",
".",
"I",
"have",
"adjusted",
"it",
"to",
"fix",
"this",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L84-L97 | [
"def",
"ViswanathNatarajan2",
"(",
"T",
",",
"A",
",",
"B",
")",
":",
"mu",
"=",
"exp",
"(",
"A",
"+",
"B",
"/",
"T",
")",
"mu",
"=",
"mu",
"/",
"1000.",
"mu",
"=",
"mu",
"*",
"10",
"return",
"mu"
] | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | ViswanathNatarajan3 | r'''Calculate the viscosity of a liquid using the 3-term Antoine form
representation developed in [1]_. Requires input coefficients. The `A`
coefficient is assumed to yield coefficients in centipoise, as all
coefficients found so far have been.
.. math::
\log_{10} \mu = A + B/(T + C)
Para... | thermo/viscosity.py | def ViswanathNatarajan3(T, A, B, C):
r'''Calculate the viscosity of a liquid using the 3-term Antoine form
representation developed in [1]_. Requires input coefficients. The `A`
coefficient is assumed to yield coefficients in centipoise, as all
coefficients found so far have been.
.. math::
... | def ViswanathNatarajan3(T, A, B, C):
r'''Calculate the viscosity of a liquid using the 3-term Antoine form
representation developed in [1]_. Requires input coefficients. The `A`
coefficient is assumed to yield coefficients in centipoise, as all
coefficients found so far have been.
.. math::
... | [
"r",
"Calculate",
"the",
"viscosity",
"of",
"a",
"liquid",
"using",
"the",
"3",
"-",
"term",
"Antoine",
"form",
"representation",
"developed",
"in",
"[",
"1",
"]",
"_",
".",
"Requires",
"input",
"coefficients",
".",
"The",
"A",
"coefficient",
"is",
"assume... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L113-L147 | [
"def",
"ViswanathNatarajan3",
"(",
"T",
",",
"A",
",",
"B",
",",
"C",
")",
":",
"mu",
"=",
"10",
"**",
"(",
"A",
"+",
"B",
"/",
"(",
"C",
"-",
"T",
")",
")",
"return",
"mu",
"/",
"1000."
] | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Letsou_Stiel | r'''Calculates the viscosity of a liquid using an emperical model
developed in [1]_. However. the fitting parameters for tabulated values
in the original article are found in ChemSep.
.. math::
\xi = \frac{2173.424 T_c^{1/6}}{\sqrt{MW} P_c^{2/3}}
\xi^{(0)} = (1.5174 - 2.135T_r + 0.75T_r^2)... | thermo/viscosity.py | def Letsou_Stiel(T, MW, Tc, Pc, omega):
r'''Calculates the viscosity of a liquid using an emperical model
developed in [1]_. However. the fitting parameters for tabulated values
in the original article are found in ChemSep.
.. math::
\xi = \frac{2173.424 T_c^{1/6}}{\sqrt{MW} P_c^{2/3}}
... | def Letsou_Stiel(T, MW, Tc, Pc, omega):
r'''Calculates the viscosity of a liquid using an emperical model
developed in [1]_. However. the fitting parameters for tabulated values
in the original article are found in ChemSep.
.. math::
\xi = \frac{2173.424 T_c^{1/6}}{\sqrt{MW} P_c^{2/3}}
... | [
"r",
"Calculates",
"the",
"viscosity",
"of",
"a",
"liquid",
"using",
"an",
"emperical",
"model",
"developed",
"in",
"[",
"1",
"]",
"_",
".",
"However",
".",
"the",
"fitting",
"parameters",
"for",
"tabulated",
"values",
"in",
"the",
"original",
"article",
"... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L150-L207 | [
"def",
"Letsou_Stiel",
"(",
"T",
",",
"MW",
",",
"Tc",
",",
"Pc",
",",
"omega",
")",
":",
"Tr",
"=",
"T",
"/",
"Tc",
"xi0",
"=",
"(",
"1.5174",
"-",
"2.135",
"*",
"Tr",
"+",
"0.75",
"*",
"Tr",
"**",
"2",
")",
"*",
"1E-5",
"xi1",
"=",
"(",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Przedziecki_Sridhar | r'''Calculates the viscosity of a liquid using an emperical formula
developed in [1]_.
.. math::
\mu=\frac{V_o}{E(V-V_o)}
E=-1.12+\frac{V_c}{12.94+0.10MW-0.23P_c+0.0424T_{m}-11.58(T_{m}/T_c)}
V_o = 0.0085\omega T_c-2.02+\frac{V_{m}}{0.342(T_m/T_c)+0.894}
Parameters
----------... | thermo/viscosity.py | def Przedziecki_Sridhar(T, Tm, Tc, Pc, Vc, Vm, omega, MW):
r'''Calculates the viscosity of a liquid using an emperical formula
developed in [1]_.
.. math::
\mu=\frac{V_o}{E(V-V_o)}
E=-1.12+\frac{V_c}{12.94+0.10MW-0.23P_c+0.0424T_{m}-11.58(T_{m}/T_c)}
V_o = 0.0085\omega T_c-2.02+\f... | def Przedziecki_Sridhar(T, Tm, Tc, Pc, Vc, Vm, omega, MW):
r'''Calculates the viscosity of a liquid using an emperical formula
developed in [1]_.
.. math::
\mu=\frac{V_o}{E(V-V_o)}
E=-1.12+\frac{V_c}{12.94+0.10MW-0.23P_c+0.0424T_{m}-11.58(T_{m}/T_c)}
V_o = 0.0085\omega T_c-2.02+\f... | [
"r",
"Calculates",
"the",
"viscosity",
"of",
"a",
"liquid",
"using",
"an",
"emperical",
"formula",
"developed",
"in",
"[",
"1",
"]",
"_",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L210-L272 | [
"def",
"Przedziecki_Sridhar",
"(",
"T",
",",
"Tm",
",",
"Tc",
",",
"Pc",
",",
"Vc",
",",
"Vm",
",",
"omega",
",",
"MW",
")",
":",
"Pc",
"=",
"Pc",
"/",
"1E5",
"# Pa to atm",
"Vm",
",",
"Vc",
"=",
"Vm",
"*",
"1E6",
",",
"Vc",
"*",
"1E6",
"# m^... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Lucas | r'''Adjustes for pressure the viscosity of a liquid using an emperical
formula developed in [1]_, but as discussed in [2]_ as the original source
is in German.
.. math::
\frac{\mu}{\mu_{sat}}=\frac{1+D(\Delta P_r/2.118)^A}{1+C\omega \Delta P_r}
\Delta P_r = \frac{P-P^{sat}}{P_c}
A... | thermo/viscosity.py | def Lucas(T, P, Tc, Pc, omega, P_sat, mu_l):
r'''Adjustes for pressure the viscosity of a liquid using an emperical
formula developed in [1]_, but as discussed in [2]_ as the original source
is in German.
.. math::
\frac{\mu}{\mu_{sat}}=\frac{1+D(\Delta P_r/2.118)^A}{1+C\omega \Delta P_r}
... | def Lucas(T, P, Tc, Pc, omega, P_sat, mu_l):
r'''Adjustes for pressure the viscosity of a liquid using an emperical
formula developed in [1]_, but as discussed in [2]_ as the original source
is in German.
.. math::
\frac{\mu}{\mu_{sat}}=\frac{1+D(\Delta P_r/2.118)^A}{1+C\omega \Delta P_r}
... | [
"r",
"Adjustes",
"for",
"pressure",
"the",
"viscosity",
"of",
"a",
"liquid",
"using",
"an",
"emperical",
"formula",
"developed",
"in",
"[",
"1",
"]",
"_",
"but",
"as",
"discussed",
"in",
"[",
"2",
"]",
"_",
"as",
"the",
"original",
"source",
"is",
"in"... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L764-L831 | [
"def",
"Lucas",
"(",
"T",
",",
"P",
",",
"Tc",
",",
"Pc",
",",
"omega",
",",
"P_sat",
",",
"mu_l",
")",
":",
"Tr",
"=",
"T",
"/",
"Tc",
"C",
"=",
"-",
"0.07921",
"+",
"2.1616",
"*",
"Tr",
"-",
"13.4040",
"*",
"Tr",
"**",
"2",
"+",
"44.1706"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Yoon_Thodos | r'''Calculates the viscosity of a gas using an emperical formula
developed in [1]_.
.. math::
\eta \xi \times 10^8 = 46.10 T_r^{0.618} - 20.40 \exp(-0.449T_r) + 1
9.40\exp(-4.058T_r)+1
\xi = 2173.424 T_c^{1/6} MW^{-1/2} P_c^{-2/3}
Parameters
----------
T : float
Te... | thermo/viscosity.py | def Yoon_Thodos(T, Tc, Pc, MW):
r'''Calculates the viscosity of a gas using an emperical formula
developed in [1]_.
.. math::
\eta \xi \times 10^8 = 46.10 T_r^{0.618} - 20.40 \exp(-0.449T_r) + 1
9.40\exp(-4.058T_r)+1
\xi = 2173.424 T_c^{1/6} MW^{-1/2} P_c^{-2/3}
Parameters
... | def Yoon_Thodos(T, Tc, Pc, MW):
r'''Calculates the viscosity of a gas using an emperical formula
developed in [1]_.
.. math::
\eta \xi \times 10^8 = 46.10 T_r^{0.618} - 20.40 \exp(-0.449T_r) + 1
9.40\exp(-4.058T_r)+1
\xi = 2173.424 T_c^{1/6} MW^{-1/2} P_c^{-2/3}
Parameters
... | [
"r",
"Calculates",
"the",
"viscosity",
"of",
"a",
"gas",
"using",
"an",
"emperical",
"formula",
"developed",
"in",
"[",
"1",
"]",
"_",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L1017-L1072 | [
"def",
"Yoon_Thodos",
"(",
"T",
",",
"Tc",
",",
"Pc",
",",
"MW",
")",
":",
"Tr",
"=",
"T",
"/",
"Tc",
"xi",
"=",
"2173.4241",
"*",
"Tc",
"**",
"(",
"1",
"/",
"6.",
")",
"/",
"(",
"MW",
"**",
"0.5",
"*",
"Pc",
"**",
"(",
"2",
"/",
"3.",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Stiel_Thodos | r'''Calculates the viscosity of a gas using an emperical formula
developed in [1]_.
.. math::
TODO
Parameters
----------
T : float
Temperature of the fluid [K]
Tc : float
Critical temperature of the fluid [K]
Pc : float
Critical pressure of the fluid [Pa]
... | thermo/viscosity.py | def Stiel_Thodos(T, Tc, Pc, MW):
r'''Calculates the viscosity of a gas using an emperical formula
developed in [1]_.
.. math::
TODO
Parameters
----------
T : float
Temperature of the fluid [K]
Tc : float
Critical temperature of the fluid [K]
Pc : float
C... | def Stiel_Thodos(T, Tc, Pc, MW):
r'''Calculates the viscosity of a gas using an emperical formula
developed in [1]_.
.. math::
TODO
Parameters
----------
T : float
Temperature of the fluid [K]
Tc : float
Critical temperature of the fluid [K]
Pc : float
C... | [
"r",
"Calculates",
"the",
"viscosity",
"of",
"a",
"gas",
"using",
"an",
"emperical",
"formula",
"developed",
"in",
"[",
"1",
"]",
"_",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L1075-L1124 | [
"def",
"Stiel_Thodos",
"(",
"T",
",",
"Tc",
",",
"Pc",
",",
"MW",
")",
":",
"Pc",
"=",
"Pc",
"/",
"101325.",
"Tr",
"=",
"T",
"/",
"Tc",
"xi",
"=",
"Tc",
"**",
"(",
"1",
"/",
"6.",
")",
"/",
"(",
"MW",
"**",
"0.5",
"*",
"Pc",
"**",
"(",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | lucas_gas | r'''Estimate the viscosity of a gas using an emperical
formula developed in several sources, but as discussed in [1]_ as the
original sources are in German or merely personal communications with the
authors of [1]_.
.. math::
\eta = \left[0.807T_r^{0.618}-0.357\exp(-0.449T_r) + 0.340\exp(-4.05... | thermo/viscosity.py | def lucas_gas(T, Tc, Pc, Zc, MW, dipole=0, CASRN=None):
r'''Estimate the viscosity of a gas using an emperical
formula developed in several sources, but as discussed in [1]_ as the
original sources are in German or merely personal communications with the
authors of [1]_.
.. math::
\eta = \... | def lucas_gas(T, Tc, Pc, Zc, MW, dipole=0, CASRN=None):
r'''Estimate the viscosity of a gas using an emperical
formula developed in several sources, but as discussed in [1]_ as the
original sources are in German or merely personal communications with the
authors of [1]_.
.. math::
\eta = \... | [
"r",
"Estimate",
"the",
"viscosity",
"of",
"a",
"gas",
"using",
"an",
"emperical",
"formula",
"developed",
"in",
"several",
"sources",
"but",
"as",
"discussed",
"in",
"[",
"1",
"]",
"_",
"as",
"the",
"original",
"sources",
"are",
"in",
"German",
"or",
"m... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L1129-L1209 | [
"def",
"lucas_gas",
"(",
"T",
",",
"Tc",
",",
"Pc",
",",
"Zc",
",",
"MW",
",",
"dipole",
"=",
"0",
",",
"CASRN",
"=",
"None",
")",
":",
"Tr",
"=",
"T",
"/",
"Tc",
"xi",
"=",
"0.176",
"*",
"(",
"Tc",
"/",
"MW",
"**",
"3",
"/",
"(",
"Pc",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Gharagheizi_gas_viscosity | r'''Calculates the viscosity of a gas using an emperical formula
developed in [1]_.
.. math::
\mu = 10^{-7} | 10^{-5} P_cT_r + \left(0.091-\frac{0.477}{M}\right)T +
M \left(10^{-5}P_c-\frac{8M^2}{T^2}\right)
\left(\frac{10.7639}{T_c}-\frac{4.1929}{T}\right)|
Parameters
--------... | thermo/viscosity.py | def Gharagheizi_gas_viscosity(T, Tc, Pc, MW):
r'''Calculates the viscosity of a gas using an emperical formula
developed in [1]_.
.. math::
\mu = 10^{-7} | 10^{-5} P_cT_r + \left(0.091-\frac{0.477}{M}\right)T +
M \left(10^{-5}P_c-\frac{8M^2}{T^2}\right)
\left(\frac{10.7639}{T_c}-\fr... | def Gharagheizi_gas_viscosity(T, Tc, Pc, MW):
r'''Calculates the viscosity of a gas using an emperical formula
developed in [1]_.
.. math::
\mu = 10^{-7} | 10^{-5} P_cT_r + \left(0.091-\frac{0.477}{M}\right)T +
M \left(10^{-5}P_c-\frac{8M^2}{T^2}\right)
\left(\frac{10.7639}{T_c}-\fr... | [
"r",
"Calculates",
"the",
"viscosity",
"of",
"a",
"gas",
"using",
"an",
"emperical",
"formula",
"developed",
"in",
"[",
"1",
"]",
"_",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L1212-L1260 | [
"def",
"Gharagheizi_gas_viscosity",
"(",
"T",
",",
"Tc",
",",
"Pc",
",",
"MW",
")",
":",
"Tr",
"=",
"T",
"/",
"Tc",
"mu_g",
"=",
"1E-5",
"*",
"Pc",
"*",
"Tr",
"+",
"(",
"0.091",
"-",
"0.477",
"/",
"MW",
")",
"*",
"T",
"+",
"MW",
"*",
"(",
"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Herning_Zipperer | r'''Calculates viscosity of a gas mixture according to
mixing rules in [1]_.
.. math::
TODO
Parameters
----------
zs : float
Mole fractions of components
mus : float
Gas viscosities of all components, [Pa*S]
MWs : float
Molecular weights of all components, [... | thermo/viscosity.py | def Herning_Zipperer(zs, mus, MWs):
r'''Calculates viscosity of a gas mixture according to
mixing rules in [1]_.
.. math::
TODO
Parameters
----------
zs : float
Mole fractions of components
mus : float
Gas viscosities of all components, [Pa*S]
MWs : float
... | def Herning_Zipperer(zs, mus, MWs):
r'''Calculates viscosity of a gas mixture according to
mixing rules in [1]_.
.. math::
TODO
Parameters
----------
zs : float
Mole fractions of components
mus : float
Gas viscosities of all components, [Pa*S]
MWs : float
... | [
"r",
"Calculates",
"viscosity",
"of",
"a",
"gas",
"mixture",
"according",
"to",
"mixing",
"rules",
"in",
"[",
"1",
"]",
"_",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L1661-L1701 | [
"def",
"Herning_Zipperer",
"(",
"zs",
",",
"mus",
",",
"MWs",
")",
":",
"if",
"not",
"none_and_length_check",
"(",
"[",
"zs",
",",
"mus",
",",
"MWs",
"]",
")",
":",
"# check same-length inputs",
"raise",
"Exception",
"(",
"'Function inputs are incorrect format'"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Wilke | r'''Calculates viscosity of a gas mixture according to
mixing rules in [1]_.
.. math::
\eta_{mix} = \sum_{i=1}^n \frac{y_i \eta_i}{\sum_{j=1}^n y_j \phi_{ij}}
\phi_{ij} = \frac{(1 + \sqrt{\eta_i/\eta_j}(MW_j/MW_i)^{0.25})^2}
{\sqrt{8(1+MW_i/MW_j)}}
Parameters
----------
ys... | thermo/viscosity.py | def Wilke(ys, mus, MWs):
r'''Calculates viscosity of a gas mixture according to
mixing rules in [1]_.
.. math::
\eta_{mix} = \sum_{i=1}^n \frac{y_i \eta_i}{\sum_{j=1}^n y_j \phi_{ij}}
\phi_{ij} = \frac{(1 + \sqrt{\eta_i/\eta_j}(MW_j/MW_i)^{0.25})^2}
{\sqrt{8(1+MW_i/MW_j)}}
Par... | def Wilke(ys, mus, MWs):
r'''Calculates viscosity of a gas mixture according to
mixing rules in [1]_.
.. math::
\eta_{mix} = \sum_{i=1}^n \frac{y_i \eta_i}{\sum_{j=1}^n y_j \phi_{ij}}
\phi_{ij} = \frac{(1 + \sqrt{\eta_i/\eta_j}(MW_j/MW_i)^{0.25})^2}
{\sqrt{8(1+MW_i/MW_j)}}
Par... | [
"r",
"Calculates",
"viscosity",
"of",
"a",
"gas",
"mixture",
"according",
"to",
"mixing",
"rules",
"in",
"[",
"1",
"]",
"_",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L1704-L1748 | [
"def",
"Wilke",
"(",
"ys",
",",
"mus",
",",
"MWs",
")",
":",
"if",
"not",
"none_and_length_check",
"(",
"[",
"ys",
",",
"mus",
",",
"MWs",
"]",
")",
":",
"# check same-length inputs",
"raise",
"Exception",
"(",
"'Function inputs are incorrect format'",
")",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | Brokaw | r'''Calculates viscosity of a gas mixture according to
mixing rules in [1]_.
.. math::
\eta_{mix} = \sum_{i=1}^n \frac{y_i \eta_i}{\sum_{j=1}^n y_j \phi_{ij}}
\phi_{ij} = \left( \frac{\eta_i}{\eta_j} \right)^{0.5} S_{ij} A_{ij}
A_{ij} = m_{ij} M_{ij}^{-0.5} \left[1 +
\frac{M_{... | thermo/viscosity.py | def Brokaw(T, ys, mus, MWs, molecular_diameters, Stockmayers):
r'''Calculates viscosity of a gas mixture according to
mixing rules in [1]_.
.. math::
\eta_{mix} = \sum_{i=1}^n \frac{y_i \eta_i}{\sum_{j=1}^n y_j \phi_{ij}}
\phi_{ij} = \left( \frac{\eta_i}{\eta_j} \right)^{0.5} S_{ij} A_{ij}... | def Brokaw(T, ys, mus, MWs, molecular_diameters, Stockmayers):
r'''Calculates viscosity of a gas mixture according to
mixing rules in [1]_.
.. math::
\eta_{mix} = \sum_{i=1}^n \frac{y_i \eta_i}{\sum_{j=1}^n y_j \phi_{ij}}
\phi_{ij} = \left( \frac{\eta_i}{\eta_j} \right)^{0.5} S_{ij} A_{ij}... | [
"r",
"Calculates",
"viscosity",
"of",
"a",
"gas",
"mixture",
"according",
"to",
"mixing",
"rules",
"in",
"[",
"1",
"]",
"_",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L1751-L1838 | [
"def",
"Brokaw",
"(",
"T",
",",
"ys",
",",
"mus",
",",
"MWs",
",",
"molecular_diameters",
",",
"Stockmayers",
")",
":",
"cmps",
"=",
"range",
"(",
"len",
"(",
"ys",
")",
")",
"MDs",
"=",
"molecular_diameters",
"if",
"not",
"none_and_length_check",
"(",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | _round_whole_even | r'''Round a number to the nearest whole number. If the number is exactly
between two numbers, round to the even whole number. Used by
`viscosity_index`.
Parameters
----------
i : float
Number, [-]
Returns
-------
i : int
Rounded number, [-]
Notes
-----
Shou... | thermo/viscosity.py | def _round_whole_even(i):
r'''Round a number to the nearest whole number. If the number is exactly
between two numbers, round to the even whole number. Used by
`viscosity_index`.
Parameters
----------
i : float
Number, [-]
Returns
-------
i : int
Rounded number, [-]... | def _round_whole_even(i):
r'''Round a number to the nearest whole number. If the number is exactly
between two numbers, round to the even whole number. Used by
`viscosity_index`.
Parameters
----------
i : float
Number, [-]
Returns
-------
i : int
Rounded number, [-]... | [
"r",
"Round",
"a",
"number",
"to",
"the",
"nearest",
"whole",
"number",
".",
"If",
"the",
"number",
"is",
"exactly",
"between",
"two",
"numbers",
"round",
"to",
"the",
"even",
"whole",
"number",
".",
"Used",
"by",
"viscosity_index",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L2029-L2061 | [
"def",
"_round_whole_even",
"(",
"i",
")",
":",
"if",
"i",
"%",
".5",
"==",
"0",
":",
"if",
"(",
"i",
"+",
"0.5",
")",
"%",
"2",
"==",
"0",
":",
"i",
"=",
"i",
"+",
"0.5",
"else",
":",
"i",
"=",
"i",
"-",
"0.5",
"else",
":",
"i",
"=",
"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | viscosity_index | r'''Calculates the viscosity index of a liquid. Requires dynamic viscosity
of a liquid at 40°C and 100°C. Value may either be returned with or
without rounding. Rounding is performed per the standard.
if nu_100 < 70:
.. math::
L, H = interp(nu_100)
else:
.. math::
L = 0.8353\... | thermo/viscosity.py | def viscosity_index(nu_40, nu_100, rounding=False):
r'''Calculates the viscosity index of a liquid. Requires dynamic viscosity
of a liquid at 40°C and 100°C. Value may either be returned with or
without rounding. Rounding is performed per the standard.
if nu_100 < 70:
.. math::
L, H = inte... | def viscosity_index(nu_40, nu_100, rounding=False):
r'''Calculates the viscosity index of a liquid. Requires dynamic viscosity
of a liquid at 40°C and 100°C. Value may either be returned with or
without rounding. Rounding is performed per the standard.
if nu_100 < 70:
.. math::
L, H = inte... | [
"r",
"Calculates",
"the",
"viscosity",
"index",
"of",
"a",
"liquid",
".",
"Requires",
"dynamic",
"viscosity",
"of",
"a",
"liquid",
"at",
"40°C",
"and",
"100°C",
".",
"Value",
"may",
"either",
"be",
"returned",
"with",
"or",
"without",
"rounding",
".",
"Rou... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L2169-L2249 | [
"def",
"viscosity_index",
"(",
"nu_40",
",",
"nu_100",
",",
"rounding",
"=",
"False",
")",
":",
"nu_40",
",",
"nu_100",
"=",
"nu_40",
"*",
"1E6",
",",
"nu_100",
"*",
"1E6",
"# m^2/s to mm^2/s",
"if",
"nu_100",
"<",
"2",
":",
"return",
"None",
"# Not defi... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | viscosity_converter | r'''Converts kinematic viscosity values from different scales which have
historically been used. Though they may not be in use much, some standards
still specify values in these scales.
Parameters
----------
val : float
Viscosity value in the specified scale; [m^2/s] if
'kinematic ... | thermo/viscosity.py | def viscosity_converter(val, old_scale, new_scale, extrapolate=False):
r'''Converts kinematic viscosity values from different scales which have
historically been used. Though they may not be in use much, some standards
still specify values in these scales.
Parameters
----------
val : float
... | def viscosity_converter(val, old_scale, new_scale, extrapolate=False):
r'''Converts kinematic viscosity values from different scales which have
historically been used. Though they may not be in use much, some standards
still specify values in these scales.
Parameters
----------
val : float
... | [
"r",
"Converts",
"kinematic",
"viscosity",
"values",
"from",
"different",
"scales",
"which",
"have",
"historically",
"been",
"used",
".",
"Though",
"they",
"may",
"not",
"be",
"in",
"use",
"much",
"some",
"standards",
"still",
"specify",
"values",
"in",
"these... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L2423-L2566 | [
"def",
"viscosity_converter",
"(",
"val",
",",
"old_scale",
",",
"new_scale",
",",
"extrapolate",
"=",
"False",
")",
":",
"def",
"range_check",
"(",
"visc",
",",
"scale",
")",
":",
"scale_min",
",",
"scale_max",
",",
"nu_min",
",",
"nu_max",
"=",
"viscosit... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | ViscosityLiquid.load_all_methods | r'''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 :obj:`Tmin`, :obj:`Tmax`,
:obj:`all_methods` and obj:`all_methods_P` as a set of methods for
which the data ... | thermo/viscosity.py | def load_all_methods(self):
r'''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 :obj:`Tmin`, :obj:`Tmax`,
:obj:`all_methods` and obj:`all_methods_P` as a set of... | def load_all_methods(self):
r'''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 :obj:`Tmin`, :obj:`Tmax`,
:obj:`all_methods` and obj:`all_methods_P` as a set of... | [
"r",
"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"... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L503-L567 | [
"def",
"load_all_methods",
"(",
"self",
")",
":",
"methods",
",",
"methods_P",
"=",
"[",
"]",
",",
"[",
"]",
"Tmins",
",",
"Tmaxs",
"=",
"[",
"]",
",",
"[",
"]",
"if",
"has_CoolProp",
"and",
"self",
".",
"CASRN",
"in",
"coolprop_dict",
":",
"methods"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | ViscosityLiquid.calculate | r'''Method to calculate low-pressure liquid viscosity at tempearture
`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 viscosity, [K]
... | thermo/viscosity.py | def calculate(self, T, method):
r'''Method to calculate low-pressure liquid viscosity at tempearture
`T` with a given method.
This method has no exception handling; see `T_dependent_property`
for that.
Parameters
----------
T : float
Temperature at w... | def calculate(self, T, method):
r'''Method to calculate low-pressure liquid viscosity at tempearture
`T` with a given method.
This method has no exception handling; see `T_dependent_property`
for that.
Parameters
----------
T : float
Temperature at w... | [
"r",
"Method",
"to",
"calculate",
"low",
"-",
"pressure",
"liquid",
"viscosity",
"at",
"tempearture",
"T",
"with",
"a",
"given",
"method",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L569-L620 | [
"def",
"calculate",
"(",
"self",
",",
"T",
",",
"method",
")",
":",
"if",
"method",
"==",
"DUTT_PRASAD",
":",
"A",
",",
"B",
",",
"C",
"=",
"self",
".",
"DUTT_PRASAD_coeffs",
"mu",
"=",
"ViswanathNatarajan3",
"(",
"T",
",",
"A",
",",
"B",
",",
"C",... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | ViscosityLiquid.calculate_P | r'''Method to calculate pressure-dependent liquid viscosity at
temperature `T` and pressure `P` with a given method.
This method has no exception handling; see `TP_dependent_property`
for that.
Parameters
----------
T : float
Temperature at which to calculat... | thermo/viscosity.py | def calculate_P(self, T, P, method):
r'''Method to calculate pressure-dependent liquid viscosity at
temperature `T` and pressure `P` with a given method.
This method has no exception handling; see `TP_dependent_property`
for that.
Parameters
----------
T : float... | def calculate_P(self, T, P, method):
r'''Method to calculate pressure-dependent liquid viscosity at
temperature `T` and pressure `P` with a given method.
This method has no exception handling; see `TP_dependent_property`
for that.
Parameters
----------
T : float... | [
"r",
"Method",
"to",
"calculate",
"pressure",
"-",
"dependent",
"liquid",
"viscosity",
"at",
"temperature",
"T",
"and",
"pressure",
"P",
"with",
"a",
"given",
"method",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L690-L719 | [
"def",
"calculate_P",
"(",
"self",
",",
"T",
",",
"P",
",",
"method",
")",
":",
"if",
"method",
"==",
"LUCAS",
":",
"mu",
"=",
"self",
".",
"T_dependent_property",
"(",
"T",
")",
"Psat",
"=",
"self",
".",
"Psat",
"(",
"T",
")",
"if",
"hasattr",
"... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | ViscosityLiquidMixture.load_all_methods | r'''Method to initialize the object by precomputing any values which
may be used repeatedly and by retrieving mixture-specific variables.
All data are stored as attributes. This method also sets :obj:`Tmin`,
:obj:`Tmax`, and :obj:`all_methods` as a set of methods which should
work to c... | thermo/viscosity.py | def load_all_methods(self):
r'''Method to initialize the object by precomputing any values which
may be used repeatedly and by retrieving mixture-specific variables.
All data are stored as attributes. This method also sets :obj:`Tmin`,
:obj:`Tmax`, and :obj:`all_methods` as a set of met... | def load_all_methods(self):
r'''Method to initialize the object by precomputing any values which
may be used repeatedly and by retrieving mixture-specific variables.
All data are stored as attributes. This method also sets :obj:`Tmin`,
:obj:`Tmax`, and :obj:`all_methods` as a set of met... | [
"r",
"Method",
"to",
"initialize",
"the",
"object",
"by",
"precomputing",
"any",
"values",
"which",
"may",
"be",
"used",
"repeatedly",
"and",
"by",
"retrieving",
"mixture",
"-",
"specific",
"variables",
".",
"All",
"data",
"are",
"stored",
"as",
"attributes",
... | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L916-L941 | [
"def",
"load_all_methods",
"(",
"self",
")",
":",
"methods",
"=",
"[",
"MIXING_LOG_MOLAR",
",",
"MIXING_LOG_MASS",
"]",
"if",
"len",
"(",
"self",
".",
"CASs",
")",
">",
"1",
"and",
"'7732-18-5'",
"in",
"self",
".",
"CASs",
":",
"wCASs",
"=",
"[",
"i",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
valid | ViscosityLiquidMixture.calculate | r'''Method to calculate viscosity of a liquid mixture at
temperature `T`, pressure `P`, mole fractions `zs` and weight fractions
`ws` with a given method.
This method has no exception handling; see `mixture_property`
for that.
Parameters
----------
T : float
... | thermo/viscosity.py | def calculate(self, T, P, zs, ws, method):
r'''Method to calculate viscosity of a liquid mixture at
temperature `T`, pressure `P`, mole fractions `zs` and weight fractions
`ws` with a given method.
This method has no exception handling; see `mixture_property`
for that.
... | def calculate(self, T, P, zs, ws, method):
r'''Method to calculate viscosity of a liquid mixture at
temperature `T`, pressure `P`, mole fractions `zs` and weight fractions
`ws` with a given method.
This method has no exception handling; see `mixture_property`
for that.
... | [
"r",
"Method",
"to",
"calculate",
"viscosity",
"of",
"a",
"liquid",
"mixture",
"at",
"temperature",
"T",
"pressure",
"P",
"mole",
"fractions",
"zs",
"and",
"weight",
"fractions",
"ws",
"with",
"a",
"given",
"method",
"."
] | CalebBell/thermo | python | https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L943-L979 | [
"def",
"calculate",
"(",
"self",
",",
"T",
",",
"P",
",",
"zs",
",",
"ws",
",",
"method",
")",
":",
"if",
"method",
"==",
"MIXING_LOG_MOLAR",
":",
"mus",
"=",
"[",
"i",
"(",
"T",
",",
"P",
")",
"for",
"i",
"in",
"self",
".",
"ViscosityLiquids",
... | 3857ed023a3e64fd3039a32d53576c24990ef1c3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.