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
ViscosityGas.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#L1454-L1501
[ "def", "load_all_methods", "(", "self", ")", ":", "methods", ",", "methods_P", "=", "[", "]", ",", "[", "]", "Tmins", ",", "Tmaxs", "=", "[", "]", ",", "[", "]", "if", "self", ".", "CASRN", "in", "_VDISaturationDict", ":", "methods", ".", "append", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
ViscosityGas.calculate
r'''Method to calculate low-pressure gas viscosity at tempearture `T` with a given method. This method has no exception handling; see `T_dependent_property` for that. Parameters ---------- T : float Temperature of the gas, [K] method : str ...
thermo/viscosity.py
def calculate(self, T, method): r'''Method to calculate low-pressure gas viscosity at tempearture `T` with a given method. This method has no exception handling; see `T_dependent_property` for that. Parameters ---------- T : float Temperature of the ...
def calculate(self, T, method): r'''Method to calculate low-pressure gas viscosity at tempearture `T` with a given method. This method has no exception handling; see `T_dependent_property` for that. Parameters ---------- T : float Temperature of the ...
[ "r", "Method", "to", "calculate", "low", "-", "pressure", "gas", "viscosity", "at", "tempearture", "T", "with", "a", "given", "method", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L1503-L1538
[ "def", "calculate", "(", "self", ",", "T", ",", "method", ")", ":", "if", "method", "==", "GHARAGHEIZI", ":", "mu", "=", "Gharagheizi_gas_viscosity", "(", "T", ",", "self", ".", "Tc", ",", "self", ".", "Pc", ",", "self", ".", "MW", ")", "elif", "me...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
ViscosityGas.calculate_P
r'''Method to calculate pressure-dependent gas 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 calculate g...
thermo/viscosity.py
def calculate_P(self, T, P, method): r'''Method to calculate pressure-dependent gas 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 gas 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", "gas", "viscosity", "at", "temperature", "T", "and", "pressure", "P", "with", "a", "given", "method", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/viscosity.py#L1593-L1618
[ "def", "calculate_P", "(", "self", ",", "T", ",", "P", ",", "method", ")", ":", "if", "method", "==", "COOLPROP", ":", "mu", "=", "PropsSI", "(", "'V'", ",", "'T'", ",", "T", ",", "'P'", ",", "P", ",", "self", ".", "CASRN", ")", "elif", "method...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
ViscosityGasMixture.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#L1931-L1954
[ "def", "load_all_methods", "(", "self", ")", ":", "methods", "=", "[", "SIMPLE", "]", "if", "none_and_length_check", "(", "(", "self", ".", "MWs", ",", "self", ".", "molecular_diameters", ",", "self", ".", "Stockmayers", ")", ")", ":", "methods", ".", "a...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
ViscosityGasMixture.calculate
r'''Method to calculate viscosity of a gas 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 gas 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. Pa...
def calculate(self, T, P, zs, ws, method): r'''Method to calculate viscosity of a gas 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. Pa...
[ "r", "Method", "to", "calculate", "viscosity", "of", "a", "gas", "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#L1956-L1995
[ "def", "calculate", "(", "self", ",", "T", ",", "P", ",", "zs", ",", "ws", ",", "method", ")", ":", "if", "method", "==", "SIMPLE", ":", "mus", "=", "[", "i", "(", "T", ",", "P", ")", "for", "i", "in", "self", ".", "ViscosityGases", "]", "ret...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
ppmv_to_mgm3
r'''Converts a concentration in ppmv to units of mg/m^3. Used in industrial toxicology. .. math:: \frac{mg}{m^3} = \frac{ppmv\cdot P}{RT}\cdot \frac{MW}{1000} Parameters ---------- ppmv : float Concentratoin of a component in a gas mixure [parts per million, volumetric] ...
thermo/safety.py
def ppmv_to_mgm3(ppmv, MW, T=298.15, P=101325.): r'''Converts a concentration in ppmv to units of mg/m^3. Used in industrial toxicology. .. math:: \frac{mg}{m^3} = \frac{ppmv\cdot P}{RT}\cdot \frac{MW}{1000} Parameters ---------- ppmv : float Concentratoin of a component in a g...
def ppmv_to_mgm3(ppmv, MW, T=298.15, P=101325.): r'''Converts a concentration in ppmv to units of mg/m^3. Used in industrial toxicology. .. math:: \frac{mg}{m^3} = \frac{ppmv\cdot P}{RT}\cdot \frac{MW}{1000} Parameters ---------- ppmv : float Concentratoin of a component in a g...
[ "r", "Converts", "a", "concentration", "in", "ppmv", "to", "units", "of", "mg", "/", "m^3", ".", "Used", "in", "industrial", "toxicology", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/safety.py#L46-L89
[ "def", "ppmv_to_mgm3", "(", "ppmv", ",", "MW", ",", "T", "=", "298.15", ",", "P", "=", "101325.", ")", ":", "parts", "=", "ppmv", "*", "1E-6", "n", "=", "parts", "*", "P", "/", "(", "R", "*", "T", ")", "mgm3", "=", "MW", "*", "n", "*", "100...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
mgm3_to_ppmv
r'''Converts a concentration in mg/m^3 to units of ppmv. Used in industrial toxicology. .. math:: ppmv = \frac{1000RT}{MW\cdot P} \cdot \frac{mg}{m^3} Parameters ---------- mgm3 : float Concentration of a substance in an ideal gas mixture [mg/m^3] MW : float Molecular ...
thermo/safety.py
def mgm3_to_ppmv(mgm3, MW, T=298.15, P=101325.): r'''Converts a concentration in mg/m^3 to units of ppmv. Used in industrial toxicology. .. math:: ppmv = \frac{1000RT}{MW\cdot P} \cdot \frac{mg}{m^3} Parameters ---------- mgm3 : float Concentration of a substance in an ideal g...
def mgm3_to_ppmv(mgm3, MW, T=298.15, P=101325.): r'''Converts a concentration in mg/m^3 to units of ppmv. Used in industrial toxicology. .. math:: ppmv = \frac{1000RT}{MW\cdot P} \cdot \frac{mg}{m^3} Parameters ---------- mgm3 : float Concentration of a substance in an ideal g...
[ "r", "Converts", "a", "concentration", "in", "mg", "/", "m^3", "to", "units", "of", "ppmv", ".", "Used", "in", "industrial", "toxicology", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/safety.py#L92-L135
[ "def", "mgm3_to_ppmv", "(", "mgm3", ",", "MW", ",", "T", "=", "298.15", ",", "P", "=", "101325.", ")", ":", "n", "=", "mgm3", "/", "MW", "/", "1000.", "parts", "=", "n", "*", "R", "*", "T", "/", "P", "ppm", "=", "parts", "/", "1E-6", "return"...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TWA
This function handles the retrieval of Time-Weighted Average limits on worker exposure to dangerous chemicals. This API is considered experimental, and is expected to be removed in a future release in favor of a more complete object-oriented interface. >>> TWA('98-00-0') (10.0, 'ppm') >>> TWA(...
thermo/safety.py
def TWA(CASRN, AvailableMethods=False, Method=None): # pragma: no cover '''This function handles the retrieval of Time-Weighted Average limits on worker exposure to dangerous chemicals. This API is considered experimental, and is expected to be removed in a future release in favor of a more complete o...
def TWA(CASRN, AvailableMethods=False, Method=None): # pragma: no cover '''This function handles the retrieval of Time-Weighted Average limits on worker exposure to dangerous chemicals. This API is considered experimental, and is expected to be removed in a future release in favor of a more complete o...
[ "This", "function", "handles", "the", "retrieval", "of", "Time", "-", "Weighted", "Average", "limits", "on", "worker", "exposure", "to", "dangerous", "chemicals", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/safety.py#L292-L326
[ "def", "TWA", "(", "CASRN", ",", "AvailableMethods", "=", "False", ",", "Method", "=", "None", ")", ":", "# pragma: no cover", "def", "list_methods", "(", ")", ":", "methods", "=", "[", "]", "if", "CASRN", "in", "_OntarioExposureLimits", "and", "(", "_Onta...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
STEL
This function handles the retrieval of Short-term Exposure Limit on worker exposure to dangerous chemicals. This API is considered experimental, and is expected to be removed in a future release in favor of a more complete object-oriented interface. >>> STEL('67-64-1') (750.0, 'ppm') >>> STEL(...
thermo/safety.py
def STEL(CASRN, AvailableMethods=False, Method=None): # pragma: no cover '''This function handles the retrieval of Short-term Exposure Limit on worker exposure to dangerous chemicals. This API is considered experimental, and is expected to be removed in a future release in favor of a more complete obj...
def STEL(CASRN, AvailableMethods=False, Method=None): # pragma: no cover '''This function handles the retrieval of Short-term Exposure Limit on worker exposure to dangerous chemicals. This API is considered experimental, and is expected to be removed in a future release in favor of a more complete obj...
[ "This", "function", "handles", "the", "retrieval", "of", "Short", "-", "term", "Exposure", "Limit", "on", "worker", "exposure", "to", "dangerous", "chemicals", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/safety.py#L329-L365
[ "def", "STEL", "(", "CASRN", ",", "AvailableMethods", "=", "False", ",", "Method", "=", "None", ")", ":", "# pragma: no cover", "def", "list_methods", "(", ")", ":", "methods", "=", "[", "]", "if", "CASRN", "in", "_OntarioExposureLimits", "and", "(", "_Ont...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Ceiling
This function handles the retrieval of Ceiling limits on worker exposure to dangerous chemicals. This API is considered experimental, and is expected to be removed in a future release in favor of a more complete object-oriented interface. >>> Ceiling('75-07-0') (25.0, 'ppm') >>> Ceiling('1395-...
thermo/safety.py
def Ceiling(CASRN, AvailableMethods=False, Method=None): # pragma: no cover '''This function handles the retrieval of Ceiling limits on worker exposure to dangerous chemicals. This API is considered experimental, and is expected to be removed in a future release in favor of a more complete object-orie...
def Ceiling(CASRN, AvailableMethods=False, Method=None): # pragma: no cover '''This function handles the retrieval of Ceiling limits on worker exposure to dangerous chemicals. This API is considered experimental, and is expected to be removed in a future release in favor of a more complete object-orie...
[ "This", "function", "handles", "the", "retrieval", "of", "Ceiling", "limits", "on", "worker", "exposure", "to", "dangerous", "chemicals", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/safety.py#L368-L402
[ "def", "Ceiling", "(", "CASRN", ",", "AvailableMethods", "=", "False", ",", "Method", "=", "None", ")", ":", "# pragma: no cover", "def", "list_methods", "(", ")", ":", "methods", "=", "[", "]", "if", "CASRN", "in", "_OntarioExposureLimits", "and", "(", "_...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Skin
This function handles the retrieval of whether or not a chemical can be absorbed through the skin, relevant to chemical safety calculations. This API is considered experimental, and is expected to be removed in a future release in favor of a more complete object-oriented interface. >>> Skin('108-94-1'...
thermo/safety.py
def Skin(CASRN, AvailableMethods=False, Method=None): # pragma: no cover '''This function handles the retrieval of whether or not a chemical can be absorbed through the skin, relevant to chemical safety calculations. This API is considered experimental, and is expected to be removed in a future releas...
def Skin(CASRN, AvailableMethods=False, Method=None): # pragma: no cover '''This function handles the retrieval of whether or not a chemical can be absorbed through the skin, relevant to chemical safety calculations. This API is considered experimental, and is expected to be removed in a future releas...
[ "This", "function", "handles", "the", "retrieval", "of", "whether", "or", "not", "a", "chemical", "can", "be", "absorbed", "through", "the", "skin", "relevant", "to", "chemical", "safety", "calculations", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/safety.py#L405-L436
[ "def", "Skin", "(", "CASRN", ",", "AvailableMethods", "=", "False", ",", "Method", "=", "None", ")", ":", "# pragma: no cover", "def", "list_methods", "(", ")", ":", "methods", "=", "[", "]", "if", "CASRN", "in", "_OntarioExposureLimits", ":", "methods", "...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Carcinogen
r'''Looks up if a chemical is listed as a carcinogen or not according to either a specifc method or with all methods. Returns either the status as a string for a specified method, or the status of the chemical in all available data sources, in the format {source: status}. Parameters ----------...
thermo/safety.py
def Carcinogen(CASRN, AvailableMethods=False, Method=None): r'''Looks up if a chemical is listed as a carcinogen or not according to either a specifc method or with all methods. Returns either the status as a string for a specified method, or the status of the chemical in all available data sources, in...
def Carcinogen(CASRN, AvailableMethods=False, Method=None): r'''Looks up if a chemical is listed as a carcinogen or not according to either a specifc method or with all methods. Returns either the status as a string for a specified method, or the status of the chemical in all available data sources, in...
[ "r", "Looks", "up", "if", "a", "chemical", "is", "listed", "as", "a", "carcinogen", "or", "not", "according", "to", "either", "a", "specifc", "method", "or", "with", "all", "methods", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/safety.py#L448-L529
[ "def", "Carcinogen", "(", "CASRN", ",", "AvailableMethods", "=", "False", ",", "Method", "=", "None", ")", ":", "methods", "=", "[", "COMBINED", ",", "IARC", ",", "NTP", "]", "if", "AvailableMethods", ":", "return", "methods", "if", "not", "Method", ":",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Tautoignition
r'''This function handles the retrieval or calculation of a chemical's autoifnition temperature. Lookup is based on CASRNs. No predictive methods are currently implemented. Will automatically select a data source to use if no Method is provided; returns None if the data is not available. Prefered sourc...
thermo/safety.py
def Tautoignition(CASRN, AvailableMethods=False, Method=None): r'''This function handles the retrieval or calculation of a chemical's autoifnition temperature. Lookup is based on CASRNs. No predictive methods are currently implemented. Will automatically select a data source to use if no Method is provi...
def Tautoignition(CASRN, AvailableMethods=False, Method=None): r'''This function handles the retrieval or calculation of a chemical's autoifnition temperature. Lookup is based on CASRNs. No predictive methods are currently implemented. Will automatically select a data source to use if no Method is provi...
[ "r", "This", "function", "handles", "the", "retrieval", "or", "calculation", "of", "a", "chemical", "s", "autoifnition", "temperature", ".", "Lookup", "is", "based", "on", "CASRNs", ".", "No", "predictive", "methods", "are", "currently", "implemented", ".", "W...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/safety.py#L634-L704
[ "def", "Tautoignition", "(", "CASRN", ",", "AvailableMethods", "=", "False", ",", "Method", "=", "None", ")", ":", "def", "list_methods", "(", ")", ":", "methods", "=", "[", "]", "if", "CASRN", "in", "IEC_2010", ".", "index", "and", "not", "np", ".", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
LFL
r'''This function handles the retrieval or calculation of a chemical's Lower Flammability Limit. Lookup is based on CASRNs. Two predictive methods are currently implemented. Will automatically select a data source to use if no Method is provided; returns None if the data is not available. Prefered sour...
thermo/safety.py
def LFL(Hc=None, atoms={}, CASRN='', AvailableMethods=False, Method=None): r'''This function handles the retrieval or calculation of a chemical's Lower Flammability Limit. Lookup is based on CASRNs. Two predictive methods are currently implemented. Will automatically select a data source to use if no Me...
def LFL(Hc=None, atoms={}, CASRN='', AvailableMethods=False, Method=None): r'''This function handles the retrieval or calculation of a chemical's Lower Flammability Limit. Lookup is based on CASRNs. Two predictive methods are currently implemented. Will automatically select a data source to use if no Me...
[ "r", "This", "function", "handles", "the", "retrieval", "or", "calculation", "of", "a", "chemical", "s", "Lower", "Flammability", "Limit", ".", "Lookup", "is", "based", "on", "CASRNs", ".", "Two", "predictive", "methods", "are", "currently", "implemented", "."...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/safety.py#L713-L797
[ "def", "LFL", "(", "Hc", "=", "None", ",", "atoms", "=", "{", "}", ",", "CASRN", "=", "''", ",", "AvailableMethods", "=", "False", ",", "Method", "=", "None", ")", ":", "def", "list_methods", "(", ")", ":", "methods", "=", "[", "]", "if", "CASRN"...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
UFL
r'''This function handles the retrieval or calculation of a chemical's Upper Flammability Limit. Lookup is based on CASRNs. Two predictive methods are currently implemented. Will automatically select a data source to use if no Method is provided; returns None if the data is not available. Prefered sour...
thermo/safety.py
def UFL(Hc=None, atoms={}, CASRN='', AvailableMethods=False, Method=None): r'''This function handles the retrieval or calculation of a chemical's Upper Flammability Limit. Lookup is based on CASRNs. Two predictive methods are currently implemented. Will automatically select a data source to use if no Me...
def UFL(Hc=None, atoms={}, CASRN='', AvailableMethods=False, Method=None): r'''This function handles the retrieval or calculation of a chemical's Upper Flammability Limit. Lookup is based on CASRNs. Two predictive methods are currently implemented. Will automatically select a data source to use if no Me...
[ "r", "This", "function", "handles", "the", "retrieval", "or", "calculation", "of", "a", "chemical", "s", "Upper", "Flammability", "Limit", ".", "Lookup", "is", "based", "on", "CASRNs", ".", "Two", "predictive", "methods", "are", "currently", "implemented", "."...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/safety.py#L803-L887
[ "def", "UFL", "(", "Hc", "=", "None", ",", "atoms", "=", "{", "}", ",", "CASRN", "=", "''", ",", "AvailableMethods", "=", "False", ",", "Method", "=", "None", ")", ":", "def", "list_methods", "(", ")", ":", "methods", "=", "[", "]", "if", "CASRN"...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
fire_mixing
Crowl, Daniel A., and Joseph F. Louvar. Chemical Process Safety: Fundamentals with Applications. 2E. Upper Saddle River, N.J: Prentice Hall, 2001. >>> fire_mixing(ys=normalize([0.0024, 0.0061, 0.0015]), FLs=[.012, .053, .031]) 0.02751172136637643 >>> fire_mixing(ys=normalize([0.0024, 0.0061, 0.001...
thermo/safety.py
def fire_mixing(ys=None, FLs=None): # pragma: no cover ''' Crowl, Daniel A., and Joseph F. Louvar. Chemical Process Safety: Fundamentals with Applications. 2E. Upper Saddle River, N.J: Prentice Hall, 2001. >>> fire_mixing(ys=normalize([0.0024, 0.0061, 0.0015]), FLs=[.012, .053, .031]) 0.02751...
def fire_mixing(ys=None, FLs=None): # pragma: no cover ''' Crowl, Daniel A., and Joseph F. Louvar. Chemical Process Safety: Fundamentals with Applications. 2E. Upper Saddle River, N.J: Prentice Hall, 2001. >>> fire_mixing(ys=normalize([0.0024, 0.0061, 0.0015]), FLs=[.012, .053, .031]) 0.02751...
[ "Crowl", "Daniel", "A", ".", "and", "Joseph", "F", ".", "Louvar", ".", "Chemical", "Process", "Safety", ":", "Fundamentals", "with", "Applications", ".", "2E", ".", "Upper", "Saddle", "River", "N", ".", "J", ":", "Prentice", "Hall", "2001", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/safety.py#L890-L902
[ "def", "fire_mixing", "(", "ys", "=", "None", ",", "FLs", "=", "None", ")", ":", "# pragma: no cover", "return", "1.", "/", "sum", "(", "[", "yi", "/", "FLi", "for", "yi", ",", "FLi", "in", "zip", "(", "ys", ",", "FLs", ")", "]", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
LFL_mixture
Inert gases are ignored. This API is considered experimental, and is expected to be removed in a future release in favor of a more complete object-oriented interface. >>> LFL_mixture(ys=normalize([0.0024, 0.0061, 0.0015]), LFLs=[.012, .053, .031]) 0.02751172136637643 >>> LFL_mixture(LFLs=[None, No...
thermo/safety.py
def LFL_mixture(ys=None, LFLs=None, CASRNs=None, AvailableMethods=False, Method=None): # pragma: no cover '''Inert gases are ignored. This API is considered experimental, and is expected to be removed in a future release in favor of a more complete object-oriented interface. >>> LFL_m...
def LFL_mixture(ys=None, LFLs=None, CASRNs=None, AvailableMethods=False, Method=None): # pragma: no cover '''Inert gases are ignored. This API is considered experimental, and is expected to be removed in a future release in favor of a more complete object-oriented interface. >>> LFL_m...
[ "Inert", "gases", "are", "ignored", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/safety.py#L913-L965
[ "def", "LFL_mixture", "(", "ys", "=", "None", ",", "LFLs", "=", "None", ",", "CASRNs", "=", "None", ",", "AvailableMethods", "=", "False", ",", "Method", "=", "None", ")", ":", "# pragma: no cover", "def", "list_methods", "(", ")", ":", "methods", "=", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
UFL_mixture
Inert gases are ignored. This API is considered experimental, and is expected to be removed in a future release in favor of a more complete object-oriented interface. >>> UFL_mixture(ys=normalize([0.0024, 0.0061, 0.0015]), UFLs=[.075, .15, .32]) 0.12927551844869378 >>> LFL_mixture(LFLs=[None, None...
thermo/safety.py
def UFL_mixture(ys=None, UFLs=None, CASRNs=None, AvailableMethods=False, Method=None): # pragma: no cover '''Inert gases are ignored. This API is considered experimental, and is expected to be removed in a future release in favor of a more complete object-oriented interface. >>> UFL_m...
def UFL_mixture(ys=None, UFLs=None, CASRNs=None, AvailableMethods=False, Method=None): # pragma: no cover '''Inert gases are ignored. This API is considered experimental, and is expected to be removed in a future release in favor of a more complete object-oriented interface. >>> UFL_m...
[ "Inert", "gases", "are", "ignored", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/safety.py#L968-L1019
[ "def", "UFL_mixture", "(", "ys", "=", "None", ",", "UFLs", "=", "None", ",", "CASRNs", "=", "None", ",", "AvailableMethods", "=", "False", ",", "Method", "=", "None", ")", ":", "# pragma: no cover", "def", "list_methods", "(", ")", ":", "methods", "=", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Suzuki_LFL
r'''Calculates lower flammability limit, using the Suzuki [1]_ correlation. Uses heat of combustion only. The lower flammability limit of a gas is air is: .. math:: \text{LFL} = \frac{-3.42}{\Delta H_c^{\circ}} + 0.569 \Delta H_c^{\circ} + 0.0538\Delta H_c^{\circ 2} + 1.80 Parameters ...
thermo/safety.py
def Suzuki_LFL(Hc=None): r'''Calculates lower flammability limit, using the Suzuki [1]_ correlation. Uses heat of combustion only. The lower flammability limit of a gas is air is: .. math:: \text{LFL} = \frac{-3.42}{\Delta H_c^{\circ}} + 0.569 \Delta H_c^{\circ} + 0.0538\Delta H_c^{\ci...
def Suzuki_LFL(Hc=None): r'''Calculates lower flammability limit, using the Suzuki [1]_ correlation. Uses heat of combustion only. The lower flammability limit of a gas is air is: .. math:: \text{LFL} = \frac{-3.42}{\Delta H_c^{\circ}} + 0.569 \Delta H_c^{\circ} + 0.0538\Delta H_c^{\ci...
[ "r", "Calculates", "lower", "flammability", "limit", "using", "the", "Suzuki", "[", "1", "]", "_", "correlation", ".", "Uses", "heat", "of", "combustion", "only", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/safety.py#L1022-L1071
[ "def", "Suzuki_LFL", "(", "Hc", "=", "None", ")", ":", "Hc", "=", "Hc", "/", "1E6", "LFL", "=", "-", "3.42", "/", "Hc", "+", "0.569", "*", "Hc", "+", "0.0538", "*", "Hc", "*", "Hc", "+", "1.80", "return", "LFL", "/", "100." ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Crowl_Louvar_LFL
r'''Calculates lower flammability limit, using the Crowl-Louvar [1]_ correlation. Uses molecular formula only. The lower flammability limit of a gas is air is: .. math:: C_mH_xO_y + zO_2 \to mCO_2 + \frac{x}{2}H_2O \text{LFL} = \frac{0.55}{4.76m + 1.19x - 2.38y + 1} Parameters --...
thermo/safety.py
def Crowl_Louvar_LFL(atoms): r'''Calculates lower flammability limit, using the Crowl-Louvar [1]_ correlation. Uses molecular formula only. The lower flammability limit of a gas is air is: .. math:: C_mH_xO_y + zO_2 \to mCO_2 + \frac{x}{2}H_2O \text{LFL} = \frac{0.55}{4.76m + 1.19x - ...
def Crowl_Louvar_LFL(atoms): r'''Calculates lower flammability limit, using the Crowl-Louvar [1]_ correlation. Uses molecular formula only. The lower flammability limit of a gas is air is: .. math:: C_mH_xO_y + zO_2 \to mCO_2 + \frac{x}{2}H_2O \text{LFL} = \frac{0.55}{4.76m + 1.19x - ...
[ "r", "Calculates", "lower", "flammability", "limit", "using", "the", "Crowl", "-", "Louvar", "[", "1", "]", "_", "correlation", ".", "Uses", "molecular", "formula", "only", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/safety.py#L1126-L1176
[ "def", "Crowl_Louvar_LFL", "(", "atoms", ")", ":", "nC", ",", "nH", ",", "nO", "=", "0", ",", "0", ",", "0", "if", "'C'", "in", "atoms", "and", "atoms", "[", "'C'", "]", ":", "nC", "=", "atoms", "[", "'C'", "]", "else", ":", "return", "None", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Crowl_Louvar_UFL
r'''Calculates upper flammability limit, using the Crowl-Louvar [1]_ correlation. Uses molecular formula only. The upper flammability limit of a gas is air is: .. math:: C_mH_xO_y + zO_2 \to mCO_2 + \frac{x}{2}H_2O \text{UFL} = \frac{3.5}{4.76m + 1.19x - 2.38y + 1} Parameters ---...
thermo/safety.py
def Crowl_Louvar_UFL(atoms): r'''Calculates upper flammability limit, using the Crowl-Louvar [1]_ correlation. Uses molecular formula only. The upper flammability limit of a gas is air is: .. math:: C_mH_xO_y + zO_2 \to mCO_2 + \frac{x}{2}H_2O \text{UFL} = \frac{3.5}{4.76m + 1.19x - 2...
def Crowl_Louvar_UFL(atoms): r'''Calculates upper flammability limit, using the Crowl-Louvar [1]_ correlation. Uses molecular formula only. The upper flammability limit of a gas is air is: .. math:: C_mH_xO_y + zO_2 \to mCO_2 + \frac{x}{2}H_2O \text{UFL} = \frac{3.5}{4.76m + 1.19x - 2...
[ "r", "Calculates", "upper", "flammability", "limit", "using", "the", "Crowl", "-", "Louvar", "[", "1", "]", "_", "correlation", ".", "Uses", "molecular", "formula", "only", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/safety.py#L1179-L1229
[ "def", "Crowl_Louvar_UFL", "(", "atoms", ")", ":", "nC", ",", "nH", ",", "nO", "=", "0", ",", "0", ",", "0", "if", "'C'", "in", "atoms", "and", "atoms", "[", "'C'", "]", ":", "nC", "=", "atoms", "[", "'C'", "]", "else", ":", "return", "None", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.Vfls
r'''Volume fractions of all species in a hypothetical pure-liquid phase at the current or specified temperature and pressure. If temperature or pressure are specified, the non-specified property is assumed to be that of the mixture. Note this is a method, not a property. Volume fract...
thermo/mixture.py
def Vfls(self, T=None, P=None): r'''Volume fractions of all species in a hypothetical pure-liquid phase at the current or specified temperature and pressure. If temperature or pressure are specified, the non-specified property is assumed to be that of the mixture. Note this is a metho...
def Vfls(self, T=None, P=None): r'''Volume fractions of all species in a hypothetical pure-liquid phase at the current or specified temperature and pressure. If temperature or pressure are specified, the non-specified property is assumed to be that of the mixture. Note this is a metho...
[ "r", "Volume", "fractions", "of", "all", "species", "in", "a", "hypothetical", "pure", "-", "liquid", "phase", "at", "the", "current", "or", "specified", "temperature", "and", "pressure", ".", "If", "temperature", "or", "pressure", "are", "specified", "the", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L773-L797
[ "def", "Vfls", "(", "self", ",", "T", "=", "None", ",", "P", "=", "None", ")", ":", "if", "(", "T", "is", "None", "or", "T", "==", "self", ".", "T", ")", "and", "(", "P", "is", "None", "or", "P", "==", "self", ".", "P", ")", ":", "Vmls", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.Vfgs
r'''Volume fractions of all species in a hypothetical pure-gas phase at the current or specified temperature and pressure. If temperature or pressure are specified, the non-specified property is assumed to be that of the mixture. Note this is a method, not a property. Volume fraction...
thermo/mixture.py
def Vfgs(self, T=None, P=None): r'''Volume fractions of all species in a hypothetical pure-gas phase at the current or specified temperature and pressure. If temperature or pressure are specified, the non-specified property is assumed to be that of the mixture. Note this is a method, ...
def Vfgs(self, T=None, P=None): r'''Volume fractions of all species in a hypothetical pure-gas phase at the current or specified temperature and pressure. If temperature or pressure are specified, the non-specified property is assumed to be that of the mixture. Note this is a method, ...
[ "r", "Volume", "fractions", "of", "all", "species", "in", "a", "hypothetical", "pure", "-", "gas", "phase", "at", "the", "current", "or", "specified", "temperature", "and", "pressure", ".", "If", "temperature", "or", "pressure", "are", "specified", "the", "n...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L800-L824
[ "def", "Vfgs", "(", "self", ",", "T", "=", "None", ",", "P", "=", "None", ")", ":", "if", "(", "T", "is", "None", "or", "T", "==", "self", ".", "T", ")", "and", "(", "P", "is", "None", "or", "P", "==", "self", ".", "P", ")", ":", "Vmgs", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.atom_fractions
r'''Dictionary of atomic fractions for each atom in the mixture. Examples -------- >>> Mixture(['CO2', 'O2'], zs=[0.5, 0.5]).atom_fractions {'C': 0.2, 'O': 0.8}
thermo/mixture.py
def atom_fractions(self): r'''Dictionary of atomic fractions for each atom in the mixture. Examples -------- >>> Mixture(['CO2', 'O2'], zs=[0.5, 0.5]).atom_fractions {'C': 0.2, 'O': 0.8} ''' things = dict() for zi, atoms in zip(self.zs, self.atomss): ...
def atom_fractions(self): r'''Dictionary of atomic fractions for each atom in the mixture. Examples -------- >>> Mixture(['CO2', 'O2'], zs=[0.5, 0.5]).atom_fractions {'C': 0.2, 'O': 0.8} ''' things = dict() for zi, atoms in zip(self.zs, self.atomss): ...
[ "r", "Dictionary", "of", "atomic", "fractions", "for", "each", "atom", "in", "the", "mixture", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L966-L983
[ "def", "atom_fractions", "(", "self", ")", ":", "things", "=", "dict", "(", ")", "for", "zi", ",", "atoms", "in", "zip", "(", "self", ".", "zs", ",", "self", ".", "atomss", ")", ":", "for", "atom", ",", "count", "in", "atoms", ".", "iteritems", "...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.mass_fractions
r'''Dictionary of mass fractions for each atom in the mixture. Examples -------- >>> Mixture(['CO2', 'O2'], zs=[0.5, 0.5]).mass_fractions {'C': 0.15801826905745822, 'O': 0.8419817309425419}
thermo/mixture.py
def mass_fractions(self): r'''Dictionary of mass fractions for each atom in the mixture. Examples -------- >>> Mixture(['CO2', 'O2'], zs=[0.5, 0.5]).mass_fractions {'C': 0.15801826905745822, 'O': 0.8419817309425419} ''' things = dict() for zi, atoms in zi...
def mass_fractions(self): r'''Dictionary of mass fractions for each atom in the mixture. Examples -------- >>> Mixture(['CO2', 'O2'], zs=[0.5, 0.5]).mass_fractions {'C': 0.15801826905745822, 'O': 0.8419817309425419} ''' things = dict() for zi, atoms in zi...
[ "r", "Dictionary", "of", "mass", "fractions", "for", "each", "atom", "in", "the", "mixture", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L997-L1012
[ "def", "mass_fractions", "(", "self", ")", ":", "things", "=", "dict", "(", ")", "for", "zi", ",", "atoms", "in", "zip", "(", "self", ".", "zs", ",", "self", ".", "atomss", ")", ":", "for", "atom", ",", "count", "in", "atoms", ".", "iteritems", "...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.charge_balance
r'''Charge imbalance of the mixture, in units of [faraday]. Mixtures meeting the electroneutrality condition will have an imbalance of 0. Examples -------- >>> Mixture(['Na+', 'Cl-', 'water'], zs=[.01, .01, .98]).charge_balance 0.0
thermo/mixture.py
def charge_balance(self): r'''Charge imbalance of the mixture, in units of [faraday]. Mixtures meeting the electroneutrality condition will have an imbalance of 0. Examples -------- >>> Mixture(['Na+', 'Cl-', 'water'], zs=[.01, .01, .98]).charge_balance 0.0 ...
def charge_balance(self): r'''Charge imbalance of the mixture, in units of [faraday]. Mixtures meeting the electroneutrality condition will have an imbalance of 0. Examples -------- >>> Mixture(['Na+', 'Cl-', 'water'], zs=[.01, .01, .98]).charge_balance 0.0 ...
[ "r", "Charge", "imbalance", "of", "the", "mixture", "in", "units", "of", "[", "faraday", "]", ".", "Mixtures", "meeting", "the", "electroneutrality", "condition", "will", "have", "an", "imbalance", "of", "0", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L1101-L1111
[ "def", "charge_balance", "(", "self", ")", ":", "return", "sum", "(", "[", "zi", "*", "ci", "for", "zi", ",", "ci", "in", "zip", "(", "self", ".", "zs", ",", "self", ".", "charges", ")", "]", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.Cpsm
r'''Solid-phase heat capacity of the mixture at its current temperature and composition, in units of [J/mol/K]. For calculation of this property at other temperatures or compositions, or specifying manually the method used to calculate it, and more - see the object oriented interface :ob...
thermo/mixture.py
def Cpsm(self): r'''Solid-phase heat capacity of the mixture at its current temperature and composition, in units of [J/mol/K]. For calculation of this property at other temperatures or compositions, or specifying manually the method used to calculate it, and more - see the object orient...
def Cpsm(self): r'''Solid-phase heat capacity of the mixture at its current temperature and composition, in units of [J/mol/K]. For calculation of this property at other temperatures or compositions, or specifying manually the method used to calculate it, and more - see the object orient...
[ "r", "Solid", "-", "phase", "heat", "capacity", "of", "the", "mixture", "at", "its", "current", "temperature", "and", "composition", "in", "units", "of", "[", "J", "/", "mol", "/", "K", "]", ".", "For", "calculation", "of", "this", "property", "at", "o...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L1816-L1829
[ "def", "Cpsm", "(", "self", ")", ":", "return", "self", ".", "HeatCapacitySolidMixture", "(", "self", ".", "T", ",", "self", ".", "P", ",", "self", ".", "zs", ",", "self", ".", "ws", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.Cplm
r'''Liquid-phase heat capacity of the mixture at its current temperature and composition, in units of [J/mol/K]. For calculation of this property at other temperatures or compositions, or specifying manually the method used to calculate it, and more - see the object oriented interface :o...
thermo/mixture.py
def Cplm(self): r'''Liquid-phase heat capacity of the mixture at its current temperature and composition, in units of [J/mol/K]. For calculation of this property at other temperatures or compositions, or specifying manually the method used to calculate it, and more - see the object ...
def Cplm(self): r'''Liquid-phase heat capacity of the mixture at its current temperature and composition, in units of [J/mol/K]. For calculation of this property at other temperatures or compositions, or specifying manually the method used to calculate it, and more - see the object ...
[ "r", "Liquid", "-", "phase", "heat", "capacity", "of", "the", "mixture", "at", "its", "current", "temperature", "and", "composition", "in", "units", "of", "[", "J", "/", "mol", "/", "K", "]", ".", "For", "calculation", "of", "this", "property", "at", "...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L1832-L1845
[ "def", "Cplm", "(", "self", ")", ":", "return", "self", ".", "HeatCapacityLiquidMixture", "(", "self", ".", "T", ",", "self", ".", "P", ",", "self", ".", "zs", ",", "self", ".", "ws", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.Cpgm
r'''Gas-phase heat capacity of the mixture at its current temperature and composition, in units of [J/mol/K]. For calculation of this property at other temperatures or compositions, or specifying manually the method used to calculate it, and more - see the object oriented interface :obj:...
thermo/mixture.py
def Cpgm(self): r'''Gas-phase heat capacity of the mixture at its current temperature and composition, in units of [J/mol/K]. For calculation of this property at other temperatures or compositions, or specifying manually the method used to calculate it, and more - see the object oriented...
def Cpgm(self): r'''Gas-phase heat capacity of the mixture at its current temperature and composition, in units of [J/mol/K]. For calculation of this property at other temperatures or compositions, or specifying manually the method used to calculate it, and more - see the object oriented...
[ "r", "Gas", "-", "phase", "heat", "capacity", "of", "the", "mixture", "at", "its", "current", "temperature", "and", "composition", "in", "units", "of", "[", "J", "/", "mol", "/", "K", "]", ".", "For", "calculation", "of", "this", "property", "at", "oth...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L1848-L1861
[ "def", "Cpgm", "(", "self", ")", ":", "return", "self", ".", "HeatCapacityGasMixture", "(", "self", ".", "T", ",", "self", ".", "P", ",", "self", ".", "zs", ",", "self", ".", "ws", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.Cps
r'''Solid-phase heat capacity of the mixture at its current temperature and composition, in units of [J/kg/K]. For calculation of this property at other temperatures or compositions, or specifying manually the method used to calculate it, and more - see the object oriented interface :ob...
thermo/mixture.py
def Cps(self): r'''Solid-phase heat capacity of the mixture at its current temperature and composition, in units of [J/kg/K]. For calculation of this property at other temperatures or compositions, or specifying manually the method used to calculate it, and more - see the object oriente...
def Cps(self): r'''Solid-phase heat capacity of the mixture at its current temperature and composition, in units of [J/kg/K]. For calculation of this property at other temperatures or compositions, or specifying manually the method used to calculate it, and more - see the object oriente...
[ "r", "Solid", "-", "phase", "heat", "capacity", "of", "the", "mixture", "at", "its", "current", "temperature", "and", "composition", "in", "units", "of", "[", "J", "/", "kg", "/", "K", "]", ".", "For", "calculation", "of", "this", "property", "at", "ot...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L1864-L1881
[ "def", "Cps", "(", "self", ")", ":", "Cpsm", "=", "self", ".", "HeatCapacitySolidMixture", "(", "self", ".", "T", ",", "self", ".", "P", ",", "self", ".", "zs", ",", "self", ".", "ws", ")", "if", "Cpsm", ":", "return", "property_molar_to_mass", "(", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.Cpl
r'''Liquid-phase heat capacity of the mixture at its current temperature and composition, in units of [J/kg/K]. For calculation of this property at other temperatures or compositions, or specifying manually the method used to calculate it, and more - see the object oriented interface :ob...
thermo/mixture.py
def Cpl(self): r'''Liquid-phase heat capacity of the mixture at its current temperature and composition, in units of [J/kg/K]. For calculation of this property at other temperatures or compositions, or specifying manually the method used to calculate it, and more - see the object ...
def Cpl(self): r'''Liquid-phase heat capacity of the mixture at its current temperature and composition, in units of [J/kg/K]. For calculation of this property at other temperatures or compositions, or specifying manually the method used to calculate it, and more - see the object ...
[ "r", "Liquid", "-", "phase", "heat", "capacity", "of", "the", "mixture", "at", "its", "current", "temperature", "and", "composition", "in", "units", "of", "[", "J", "/", "kg", "/", "K", "]", ".", "For", "calculation", "of", "this", "property", "at", "o...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L1884-L1901
[ "def", "Cpl", "(", "self", ")", ":", "Cplm", "=", "self", ".", "HeatCapacityLiquidMixture", "(", "self", ".", "T", ",", "self", ".", "P", ",", "self", ".", "zs", ",", "self", ".", "ws", ")", "if", "Cplm", ":", "return", "property_molar_to_mass", "(",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.Cpg
r'''Gas-phase heat capacity of the mixture at its current temperature , and composition in units of [J/kg/K]. For calculation of this property at other temperatures or compositions, or specifying manually the method used to calculate it, and more - see the object oriented interface :obj:...
thermo/mixture.py
def Cpg(self): r'''Gas-phase heat capacity of the mixture at its current temperature , and composition in units of [J/kg/K]. For calculation of this property at other temperatures or compositions, or specifying manually the method used to calculate it, and more - see the object oriented ...
def Cpg(self): r'''Gas-phase heat capacity of the mixture at its current temperature , and composition in units of [J/kg/K]. For calculation of this property at other temperatures or compositions, or specifying manually the method used to calculate it, and more - see the object oriented ...
[ "r", "Gas", "-", "phase", "heat", "capacity", "of", "the", "mixture", "at", "its", "current", "temperature", "and", "composition", "in", "units", "of", "[", "J", "/", "kg", "/", "K", "]", ".", "For", "calculation", "of", "this", "property", "at", "othe...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L1904-L1921
[ "def", "Cpg", "(", "self", ")", ":", "Cpgm", "=", "self", ".", "HeatCapacityGasMixture", "(", "self", ".", "T", ",", "self", ".", "P", ",", "self", ".", "zs", ",", "self", ".", "ws", ")", "if", "Cpgm", ":", "return", "property_molar_to_mass", "(", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.Cvgm
r'''Gas-phase ideal-gas contant-volume heat capacity of the mixture at its current temperature and composition, in units of [J/mol/K]. Subtracts R from the ideal-gas heat capacity; does not include pressure-compensation from an equation of state. Examples -------- >>> Mi...
thermo/mixture.py
def Cvgm(self): r'''Gas-phase ideal-gas contant-volume heat capacity of the mixture at its current temperature and composition, in units of [J/mol/K]. Subtracts R from the ideal-gas heat capacity; does not include pressure-compensation from an equation of state. Examples ...
def Cvgm(self): r'''Gas-phase ideal-gas contant-volume heat capacity of the mixture at its current temperature and composition, in units of [J/mol/K]. Subtracts R from the ideal-gas heat capacity; does not include pressure-compensation from an equation of state. Examples ...
[ "r", "Gas", "-", "phase", "ideal", "-", "gas", "contant", "-", "volume", "heat", "capacity", "of", "the", "mixture", "at", "its", "current", "temperature", "and", "composition", "in", "units", "of", "[", "J", "/", "mol", "/", "K", "]", ".", "Subtracts"...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L1924-L1938
[ "def", "Cvgm", "(", "self", ")", ":", "Cpgm", "=", "self", ".", "HeatCapacityGasMixture", "(", "self", ".", "T", ",", "self", ".", "P", ",", "self", ".", "zs", ",", "self", ".", "ws", ")", "if", "Cpgm", ":", "return", "Cpgm", "-", "R", "return", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.Vml
r'''Liquid-phase molar volume of the mixture at its current temperature, pressure, and composition in units of [m^3/mol]. For calculation of this property at other temperatures or pressures or compositions, or specifying manually the method used to calculate it, and more - see the object...
thermo/mixture.py
def Vml(self): r'''Liquid-phase molar volume of the mixture at its current temperature, pressure, and composition in units of [m^3/mol]. For calculation of this property at other temperatures or pressures or compositions, or specifying manually the method used to calculate it, an...
def Vml(self): r'''Liquid-phase molar volume of the mixture at its current temperature, pressure, and composition in units of [m^3/mol]. For calculation of this property at other temperatures or pressures or compositions, or specifying manually the method used to calculate it, an...
[ "r", "Liquid", "-", "phase", "molar", "volume", "of", "the", "mixture", "at", "its", "current", "temperature", "pressure", "and", "composition", "in", "units", "of", "[", "m^3", "/", "mol", "]", ".", "For", "calculation", "of", "this", "property", "at", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L2141-L2155
[ "def", "Vml", "(", "self", ")", ":", "return", "self", ".", "VolumeLiquidMixture", "(", "T", "=", "self", ".", "T", ",", "P", "=", "self", ".", "P", ",", "zs", "=", "self", ".", "zs", ",", "ws", "=", "self", ".", "ws", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.Vmg
r'''Gas-phase molar volume of the mixture at its current temperature, pressure, and composition in units of [m^3/mol]. For calculation of this property at other temperatures or pressures or compositions, or specifying manually the method used to calculate it, and more - see the object or...
thermo/mixture.py
def Vmg(self): r'''Gas-phase molar volume of the mixture at its current temperature, pressure, and composition in units of [m^3/mol]. For calculation of this property at other temperatures or pressures or compositions, or specifying manually the method used to calculate it, and m...
def Vmg(self): r'''Gas-phase molar volume of the mixture at its current temperature, pressure, and composition in units of [m^3/mol]. For calculation of this property at other temperatures or pressures or compositions, or specifying manually the method used to calculate it, and m...
[ "r", "Gas", "-", "phase", "molar", "volume", "of", "the", "mixture", "at", "its", "current", "temperature", "pressure", "and", "composition", "in", "units", "of", "[", "m^3", "/", "mol", "]", ".", "For", "calculation", "of", "this", "property", "at", "ot...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L2158-L2172
[ "def", "Vmg", "(", "self", ")", ":", "return", "self", ".", "VolumeGasMixture", "(", "T", "=", "self", ".", "T", ",", "P", "=", "self", ".", "P", ",", "zs", "=", "self", ".", "zs", ",", "ws", "=", "self", ".", "ws", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.SGg
r'''Specific gravity of a hypothetical gas phase of the mixture, . [dimensionless]. The reference condition is air at 15.6 °C (60 °F) and 1 atm (rho=1.223 kg/m^3). The definition for gases uses the compressibility factor of the reference gas and the mixture both at the reference condi...
thermo/mixture.py
def SGg(self): r'''Specific gravity of a hypothetical gas phase of the mixture, . [dimensionless]. The reference condition is air at 15.6 °C (60 °F) and 1 atm (rho=1.223 kg/m^3). The definition for gases uses the compressibility factor of the reference gas and the mixture both at the ...
def SGg(self): r'''Specific gravity of a hypothetical gas phase of the mixture, . [dimensionless]. The reference condition is air at 15.6 °C (60 °F) and 1 atm (rho=1.223 kg/m^3). The definition for gases uses the compressibility factor of the reference gas and the mixture both at the ...
[ "r", "Specific", "gravity", "of", "a", "hypothetical", "gas", "phase", "of", "the", "mixture", ".", "[", "dimensionless", "]", ".", "The", "reference", "condition", "is", "air", "at", "15", ".", "6", "°C", "(", "60", "°F", ")", "and", "1", "atm", "("...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L2175-L2191
[ "def", "SGg", "(", "self", ")", ":", "Vmg", "=", "self", ".", "VolumeGasMixture", "(", "T", "=", "288.70555555555552", ",", "P", "=", "101325", ",", "zs", "=", "self", ".", "zs", ",", "ws", "=", "self", ".", "ws", ")", "if", "Vmg", ":", "rho", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.mul
r'''Viscosity of the mixture in the liquid phase at its current temperature, pressure, and composition in units of [Pa*s]. For calculation of this property at other temperatures and pressures, or specifying manually the method used to calculate it, and more - see the object oriented int...
thermo/mixture.py
def mul(self): r'''Viscosity of the mixture in the liquid phase at its current temperature, pressure, and composition in units of [Pa*s]. For calculation of this property at other temperatures and pressures, or specifying manually the method used to calculate it, and more - see ...
def mul(self): r'''Viscosity of the mixture in the liquid phase at its current temperature, pressure, and composition in units of [Pa*s]. For calculation of this property at other temperatures and pressures, or specifying manually the method used to calculate it, and more - see ...
[ "r", "Viscosity", "of", "the", "mixture", "in", "the", "liquid", "phase", "at", "its", "current", "temperature", "pressure", "and", "composition", "in", "units", "of", "[", "Pa", "*", "s", "]", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L2194-L2209
[ "def", "mul", "(", "self", ")", ":", "return", "self", ".", "ViscosityLiquidMixture", "(", "self", ".", "T", ",", "self", ".", "P", ",", "self", ".", "zs", ",", "self", ".", "ws", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.mug
r'''Viscosity of the mixture in the gas phase at its current temperature, pressure, and composition in units of [Pa*s]. For calculation of this property at other temperatures and pressures, or specifying manually the method used to calculate it, and more - see the object oriented interf...
thermo/mixture.py
def mug(self): r'''Viscosity of the mixture in the gas phase at its current temperature, pressure, and composition in units of [Pa*s]. For calculation of this property at other temperatures and pressures, or specifying manually the method used to calculate it, and more - see the...
def mug(self): r'''Viscosity of the mixture in the gas phase at its current temperature, pressure, and composition in units of [Pa*s]. For calculation of this property at other temperatures and pressures, or specifying manually the method used to calculate it, and more - see the...
[ "r", "Viscosity", "of", "the", "mixture", "in", "the", "gas", "phase", "at", "its", "current", "temperature", "pressure", "and", "composition", "in", "units", "of", "[", "Pa", "*", "s", "]", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L2212-L2227
[ "def", "mug", "(", "self", ")", ":", "return", "self", ".", "ViscosityGasMixture", "(", "self", ".", "T", ",", "self", ".", "P", ",", "self", ".", "zs", ",", "self", ".", "ws", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.sigma
r'''Surface tension of the mixture at its current temperature and composition, in units of [N/m]. For calculation of this property at other temperatures, or specifying manually the method used to calculate it, and more - see the object oriented interface :obj:`thermo.interface.SurfaceTe...
thermo/mixture.py
def sigma(self): r'''Surface tension of the mixture at its current temperature and composition, in units of [N/m]. For calculation of this property at other temperatures, or specifying manually the method used to calculate it, and more - see the object oriented interface :obj:`t...
def sigma(self): r'''Surface tension of the mixture at its current temperature and composition, in units of [N/m]. For calculation of this property at other temperatures, or specifying manually the method used to calculate it, and more - see the object oriented interface :obj:`t...
[ "r", "Surface", "tension", "of", "the", "mixture", "at", "its", "current", "temperature", "and", "composition", "in", "units", "of", "[", "N", "/", "m", "]", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L2230-L2244
[ "def", "sigma", "(", "self", ")", ":", "return", "self", ".", "SurfaceTensionMixture", "(", "self", ".", "T", ",", "self", ".", "P", ",", "self", ".", "zs", ",", "self", ".", "ws", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.kl
r'''Thermal conductivity of the mixture in the liquid phase at its current temperature, pressure, and composition in units of [Pa*s]. For calculation of this property at other temperatures and pressures, or specifying manually the method used to calculate it, and more - see the object o...
thermo/mixture.py
def kl(self): r'''Thermal conductivity of the mixture in the liquid phase at its current temperature, pressure, and composition in units of [Pa*s]. For calculation of this property at other temperatures and pressures, or specifying manually the method used to calculate it, and more - se...
def kl(self): r'''Thermal conductivity of the mixture in the liquid phase at its current temperature, pressure, and composition in units of [Pa*s]. For calculation of this property at other temperatures and pressures, or specifying manually the method used to calculate it, and more - se...
[ "r", "Thermal", "conductivity", "of", "the", "mixture", "in", "the", "liquid", "phase", "at", "its", "current", "temperature", "pressure", "and", "composition", "in", "units", "of", "[", "Pa", "*", "s", "]", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L2247-L2262
[ "def", "kl", "(", "self", ")", ":", "return", "self", ".", "ThermalConductivityLiquidMixture", "(", "self", ".", "T", ",", "self", ".", "P", ",", "self", ".", "zs", ",", "self", ".", "ws", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.kg
r'''Thermal conductivity of the mixture in the gas phase at its current temperature, pressure, and composition in units of [Pa*s]. For calculation of this property at other temperatures and pressures, or specifying manually the method used to calculate it, and more - see the object orie...
thermo/mixture.py
def kg(self): r'''Thermal conductivity of the mixture in the gas phase at its current temperature, pressure, and composition in units of [Pa*s]. For calculation of this property at other temperatures and pressures, or specifying manually the method used to calculate it, and more - see ...
def kg(self): r'''Thermal conductivity of the mixture in the gas phase at its current temperature, pressure, and composition in units of [Pa*s]. For calculation of this property at other temperatures and pressures, or specifying manually the method used to calculate it, and more - see ...
[ "r", "Thermal", "conductivity", "of", "the", "mixture", "in", "the", "gas", "phase", "at", "its", "current", "temperature", "pressure", "and", "composition", "in", "units", "of", "[", "Pa", "*", "s", "]", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L2265-L2280
[ "def", "kg", "(", "self", ")", ":", "return", "self", ".", "ThermalConductivityGasMixture", "(", "self", ".", "T", ",", "self", ".", "P", ",", "self", ".", "zs", ",", "self", ".", "ws", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.rhom
r'''Molar density of the mixture at its current phase and temperature and pressure, in units of [mol/m^3]. Available only if single phase. Examples -------- >>> Mixture(['1-hexanol'], ws=[1]).rhom 7983.414573003429
thermo/mixture.py
def rhom(self): r'''Molar density of the mixture at its current phase and temperature and pressure, in units of [mol/m^3]. Available only if single phase. Examples -------- >>> Mixture(['1-hexanol'], ws=[1]).rhom 7983.414573003429 ''' return phase...
def rhom(self): r'''Molar density of the mixture at its current phase and temperature and pressure, in units of [mol/m^3]. Available only if single phase. Examples -------- >>> Mixture(['1-hexanol'], ws=[1]).rhom 7983.414573003429 ''' return phase...
[ "r", "Molar", "density", "of", "the", "mixture", "at", "its", "current", "phase", "and", "temperature", "and", "pressure", "in", "units", "of", "[", "mol", "/", "m^3", "]", ".", "Available", "only", "if", "single", "phase", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L2339-L2349
[ "def", "rhom", "(", "self", ")", ":", "return", "phase_select_property", "(", "phase", "=", "self", ".", "phase", ",", "s", "=", "None", ",", "l", "=", "self", ".", "rholm", ",", "g", "=", "self", ".", "rhogm", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.SG
r'''Specific gravity of the mixture, [dimensionless]. For gas-phase conditions, this is calculated at 15.6 °C (60 °F) and 1 atm for the mixture and the reference fluid, air. For liquid and solid phase conditions, this is calculated based on a reference fluid of water at 4°C ...
thermo/mixture.py
def SG(self): r'''Specific gravity of the mixture, [dimensionless]. For gas-phase conditions, this is calculated at 15.6 °C (60 °F) and 1 atm for the mixture and the reference fluid, air. For liquid and solid phase conditions, this is calculated based on a reference ...
def SG(self): r'''Specific gravity of the mixture, [dimensionless]. For gas-phase conditions, this is calculated at 15.6 °C (60 °F) and 1 atm for the mixture and the reference fluid, air. For liquid and solid phase conditions, this is calculated based on a reference ...
[ "r", "Specific", "gravity", "of", "the", "mixture", "[", "dimensionless", "]", ".", "For", "gas", "-", "phase", "conditions", "this", "is", "calculated", "at", "15", ".", "6", "°C", "(", "60", "°F", ")", "and", "1", "atm", "for", "the", "mixture", "a...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L2368-L2382
[ "def", "SG", "(", "self", ")", ":", "return", "phase_select_property", "(", "phase", "=", "self", ".", "phase", ",", "s", "=", "self", ".", "SGs", ",", "l", "=", "self", ".", "SGl", ",", "g", "=", "self", ".", "SGg", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.Vml_STP
r'''Liquid-phase molar volume of the mixture at 298.15 K and 101.325 kPa, and the current composition in units of [m^3/mol]. Examples -------- >>> Mixture(['cyclobutane'], ws=[1]).Vml_STP 8.143327329133706e-05
thermo/mixture.py
def Vml_STP(self): r'''Liquid-phase molar volume of the mixture at 298.15 K and 101.325 kPa, and the current composition in units of [m^3/mol]. Examples -------- >>> Mixture(['cyclobutane'], ws=[1]).Vml_STP 8.143327329133706e-05 ''' return self.VolumeLiqu...
def Vml_STP(self): r'''Liquid-phase molar volume of the mixture at 298.15 K and 101.325 kPa, and the current composition in units of [m^3/mol]. Examples -------- >>> Mixture(['cyclobutane'], ws=[1]).Vml_STP 8.143327329133706e-05 ''' return self.VolumeLiqu...
[ "r", "Liquid", "-", "phase", "molar", "volume", "of", "the", "mixture", "at", "298", ".", "15", "K", "and", "101", ".", "325", "kPa", "and", "the", "current", "composition", "in", "units", "of", "[", "m^3", "/", "mol", "]", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L2498-L2507
[ "def", "Vml_STP", "(", "self", ")", ":", "return", "self", ".", "VolumeLiquidMixture", "(", "T", "=", "298.15", ",", "P", "=", "101325", ",", "zs", "=", "self", ".", "zs", ",", "ws", "=", "self", ".", "ws", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.Vmg_STP
r'''Gas-phase molar volume of the mixture at 298.15 K and 101.325 kPa, and the current composition in units of [m^3/mol]. Examples -------- >>> Mixture(['nitrogen'], ws=[1]).Vmg_STP 0.02445443688838904
thermo/mixture.py
def Vmg_STP(self): r'''Gas-phase molar volume of the mixture at 298.15 K and 101.325 kPa, and the current composition in units of [m^3/mol]. Examples -------- >>> Mixture(['nitrogen'], ws=[1]).Vmg_STP 0.02445443688838904 ''' return self.VolumeGasMixture(T...
def Vmg_STP(self): r'''Gas-phase molar volume of the mixture at 298.15 K and 101.325 kPa, and the current composition in units of [m^3/mol]. Examples -------- >>> Mixture(['nitrogen'], ws=[1]).Vmg_STP 0.02445443688838904 ''' return self.VolumeGasMixture(T...
[ "r", "Gas", "-", "phase", "molar", "volume", "of", "the", "mixture", "at", "298", ".", "15", "K", "and", "101", ".", "325", "kPa", "and", "the", "current", "composition", "in", "units", "of", "[", "m^3", "/", "mol", "]", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L2510-L2519
[ "def", "Vmg_STP", "(", "self", ")", ":", "return", "self", ".", "VolumeGasMixture", "(", "T", "=", "298.15", ",", "P", "=", "101325", ",", "zs", "=", "self", ".", "zs", ",", "ws", "=", "self", ".", "ws", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.rhol_STP
r'''Liquid-phase mass density of the mixture at 298.15 K and 101.325 kPa, and the current composition in units of [kg/m^3]. Examples -------- >>> Mixture(['cyclobutane'], ws=[1]).rhol_STP 688.9851989526821
thermo/mixture.py
def rhol_STP(self): r'''Liquid-phase mass density of the mixture at 298.15 K and 101.325 kPa, and the current composition in units of [kg/m^3]. Examples -------- >>> Mixture(['cyclobutane'], ws=[1]).rhol_STP 688.9851989526821 ''' Vml = self.Vml_STP ...
def rhol_STP(self): r'''Liquid-phase mass density of the mixture at 298.15 K and 101.325 kPa, and the current composition in units of [kg/m^3]. Examples -------- >>> Mixture(['cyclobutane'], ws=[1]).rhol_STP 688.9851989526821 ''' Vml = self.Vml_STP ...
[ "r", "Liquid", "-", "phase", "mass", "density", "of", "the", "mixture", "at", "298", ".", "15", "K", "and", "101", ".", "325", "kPa", "and", "the", "current", "composition", "in", "units", "of", "[", "kg", "/", "m^3", "]", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L2522-L2534
[ "def", "rhol_STP", "(", "self", ")", ":", "Vml", "=", "self", ".", "Vml_STP", "if", "Vml", ":", "return", "Vm_to_rho", "(", "Vml", ",", "self", ".", "MW", ")", "return", "None" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.rhog_STP
r'''Gas-phase mass density of the mixture at 298.15 K and 101.325 kPa, and the current composition in units of [kg/m^3]. Examples -------- >>> Mixture(['nitrogen'], ws=[1]).rhog_STP 1.145534453639403
thermo/mixture.py
def rhog_STP(self): r'''Gas-phase mass density of the mixture at 298.15 K and 101.325 kPa, and the current composition in units of [kg/m^3]. Examples -------- >>> Mixture(['nitrogen'], ws=[1]).rhog_STP 1.145534453639403 ''' Vmg = self.Vmg_STP if V...
def rhog_STP(self): r'''Gas-phase mass density of the mixture at 298.15 K and 101.325 kPa, and the current composition in units of [kg/m^3]. Examples -------- >>> Mixture(['nitrogen'], ws=[1]).rhog_STP 1.145534453639403 ''' Vmg = self.Vmg_STP if V...
[ "r", "Gas", "-", "phase", "mass", "density", "of", "the", "mixture", "at", "298", ".", "15", "K", "and", "101", ".", "325", "kPa", "and", "the", "current", "composition", "in", "units", "of", "[", "kg", "/", "m^3", "]", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L2537-L2549
[ "def", "rhog_STP", "(", "self", ")", ":", "Vmg", "=", "self", ".", "Vmg_STP", "if", "Vmg", ":", "return", "Vm_to_rho", "(", "Vmg", ",", "self", ".", "MW", ")", "return", "None" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.Zl_STP
r'''Liquid-phase compressibility factor of the mixture at 298.15 K and 101.325 kPa, and the current composition, [dimensionless]. Examples -------- >>> Mixture(['cyclobutane'], ws=[1]).Zl_STP 0.0033285083663950068
thermo/mixture.py
def Zl_STP(self): r'''Liquid-phase compressibility factor of the mixture at 298.15 K and 101.325 kPa, and the current composition, [dimensionless]. Examples -------- >>> Mixture(['cyclobutane'], ws=[1]).Zl_STP 0.0033285083663950068 ''' Vml = self.Vml ...
def Zl_STP(self): r'''Liquid-phase compressibility factor of the mixture at 298.15 K and 101.325 kPa, and the current composition, [dimensionless]. Examples -------- >>> Mixture(['cyclobutane'], ws=[1]).Zl_STP 0.0033285083663950068 ''' Vml = self.Vml ...
[ "r", "Liquid", "-", "phase", "compressibility", "factor", "of", "the", "mixture", "at", "298", ".", "15", "K", "and", "101", ".", "325", "kPa", "and", "the", "current", "composition", "[", "dimensionless", "]", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L2552-L2564
[ "def", "Zl_STP", "(", "self", ")", ":", "Vml", "=", "self", ".", "Vml", "if", "Vml", ":", "return", "Z", "(", "self", ".", "T", ",", "self", ".", "P", ",", "Vml", ")", "return", "None" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.Zg_STP
r'''Gas-phase compressibility factor of the mixture at 298.15 K and 101.325 kPa, and the current composition, [dimensionless]. Examples -------- >>> Mixture(['nitrogen'], ws=[1]).Zg_STP 0.9995520809691023
thermo/mixture.py
def Zg_STP(self): r'''Gas-phase compressibility factor of the mixture at 298.15 K and 101.325 kPa, and the current composition, [dimensionless]. Examples -------- >>> Mixture(['nitrogen'], ws=[1]).Zg_STP 0.9995520809691023 ''' Vmg = self.Vmg if Vm...
def Zg_STP(self): r'''Gas-phase compressibility factor of the mixture at 298.15 K and 101.325 kPa, and the current composition, [dimensionless]. Examples -------- >>> Mixture(['nitrogen'], ws=[1]).Zg_STP 0.9995520809691023 ''' Vmg = self.Vmg if Vm...
[ "r", "Gas", "-", "phase", "compressibility", "factor", "of", "the", "mixture", "at", "298", ".", "15", "K", "and", "101", ".", "325", "kPa", "and", "the", "current", "composition", "[", "dimensionless", "]", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L2567-L2579
[ "def", "Zg_STP", "(", "self", ")", ":", "Vmg", "=", "self", ".", "Vmg", "if", "Vmg", ":", "return", "Z", "(", "self", ".", "T", ",", "self", ".", "P", ",", "Vmg", ")", "return", "None" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.API
r'''API gravity of the hypothetical liquid phase of the mixture, [degrees]. The reference condition is water at 15.6 °C (60 °F) and 1 atm (rho=999.016 kg/m^3, standardized). Examples -------- >>> Mixture(['hexane', 'decane'], ws=[0.5, 0.5]).API 71.347078417...
thermo/mixture.py
def API(self): r'''API gravity of the hypothetical liquid phase of the mixture, [degrees]. The reference condition is water at 15.6 °C (60 °F) and 1 atm (rho=999.016 kg/m^3, standardized). Examples -------- >>> Mixture(['hexane', 'decane'], ws=[0.5, 0.5]).A...
def API(self): r'''API gravity of the hypothetical liquid phase of the mixture, [degrees]. The reference condition is water at 15.6 °C (60 °F) and 1 atm (rho=999.016 kg/m^3, standardized). Examples -------- >>> Mixture(['hexane', 'decane'], ws=[0.5, 0.5]).A...
[ "r", "API", "gravity", "of", "the", "hypothetical", "liquid", "phase", "of", "the", "mixture", "[", "degrees", "]", ".", "The", "reference", "condition", "is", "water", "at", "15", ".", "6", "°C", "(", "60", "°F", ")", "and", "1", "atm", "(", "rho", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L2613-L2627
[ "def", "API", "(", "self", ")", ":", "Vml", "=", "self", ".", "VolumeLiquidMixture", "(", "T", "=", "288.70555555555552", ",", "P", "=", "101325", ",", "zs", "=", "self", ".", "zs", ",", "ws", "=", "self", ".", "ws", ")", "if", "Vml", ":", "rho",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Mixture.draw_2d
r'''Interface for drawing a 2D image of all the molecules in the mixture. Requires an HTML5 browser, and the libraries RDKit and IPython. An exception is raised if either of these libraries is absent. Parameters ---------- Hs : bool Whether or not to show hyd...
thermo/mixture.py
def draw_2d(self, Hs=False): # pragma: no cover r'''Interface for drawing a 2D image of all the molecules in the mixture. Requires an HTML5 browser, and the libraries RDKit and IPython. An exception is raised if either of these libraries is absent. Parameters ----------...
def draw_2d(self, Hs=False): # pragma: no cover r'''Interface for drawing a 2D image of all the molecules in the mixture. Requires an HTML5 browser, and the libraries RDKit and IPython. An exception is raised if either of these libraries is absent. Parameters ----------...
[ "r", "Interface", "for", "drawing", "a", "2D", "image", "of", "all", "the", "molecules", "in", "the", "mixture", ".", "Requires", "an", "HTML5", "browser", "and", "the", "libraries", "RDKit", "and", "IPython", ".", "An", "exception", "is", "raised", "if", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/mixture.py#L2629-L2653
[ "def", "draw_2d", "(", "self", ",", "Hs", "=", "False", ")", ":", "# pragma: no cover", "try", ":", "from", "rdkit", ".", "Chem", "import", "Draw", "from", "rdkit", ".", "Chem", ".", "Draw", "import", "IPythonConsole", "if", "Hs", ":", "mols", "=", "["...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Tt
r'''This function handles the retrieval of a chemical's triple temperature. 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. Returns data from [1]_, or a chemical's melting point if available. Parameters ...
thermo/triple.py
def Tt(CASRN, AvailableMethods=False, Method=None): r'''This function handles the retrieval of a chemical's triple temperature. 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. Returns data from [1]_, or a che...
def Tt(CASRN, AvailableMethods=False, Method=None): r'''This function handles the retrieval of a chemical's triple temperature. 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. Returns data from [1]_, or a che...
[ "r", "This", "function", "handles", "the", "retrieval", "of", "a", "chemical", "s", "triple", "temperature", ".", "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/triple.py#L47-L119
[ "def", "Tt", "(", "CASRN", ",", "AvailableMethods", "=", "False", ",", "Method", "=", "None", ")", ":", "def", "list_methods", "(", ")", ":", "methods", "=", "[", "]", "if", "CASRN", "in", "Staveley_data", ".", "index", ":", "methods", ".", "append", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Pt
r'''This function handles the retrieval of a chemical's triple 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. Returns data from [1]_, or attempts to calculate the vapor pressure at the triple tempe...
thermo/triple.py
def Pt(CASRN, AvailableMethods=False, Method=None): r'''This function handles the retrieval of a chemical's triple 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. Returns data from [1]_, or attempts...
def Pt(CASRN, AvailableMethods=False, Method=None): r'''This function handles the retrieval of a chemical's triple 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. Returns data from [1]_, or attempts...
[ "r", "This", "function", "handles", "the", "retrieval", "of", "a", "chemical", "s", "triple", "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/triple.py#L125-L193
[ "def", "Pt", "(", "CASRN", ",", "AvailableMethods", "=", "False", ",", "Method", "=", "None", ")", ":", "def", "list_methods", "(", ")", ":", "methods", "=", "[", "]", "if", "CASRN", "in", "Staveley_data", ".", "index", "and", "not", "np", ".", "isna...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
to_num
r'''Legacy function to turn a list of strings into either floats (if numeric), stripped strings (if not) or None if the string is empty. Accepts any numeric formatting the float function does. Parameters ---------- values : list list of strings Returns ------- values : list ...
thermo/utils.py
def to_num(values): r'''Legacy function to turn a list of strings into either floats (if numeric), stripped strings (if not) or None if the string is empty. Accepts any numeric formatting the float function does. Parameters ---------- values : list list of strings Returns -----...
def to_num(values): r'''Legacy function to turn a list of strings into either floats (if numeric), stripped strings (if not) or None if the string is empty. Accepts any numeric formatting the float function does. Parameters ---------- values : list list of strings Returns -----...
[ "r", "Legacy", "function", "to", "turn", "a", "list", "of", "strings", "into", "either", "floats", "(", "if", "numeric", ")", "stripped", "strings", "(", "if", "not", ")", "or", "None", "if", "the", "string", "is", "empty", ".", "Accepts", "any", "nume...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L75-L104
[ "def", "to_num", "(", "values", ")", ":", "for", "i", "in", "range", "(", "len", "(", "values", ")", ")", ":", "try", ":", "values", "[", "i", "]", "=", "float", "(", "values", "[", "i", "]", ")", "except", ":", "if", "values", "[", "i", "]",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Parachor
r'''Calculate Parachor for a pure species, using its density in the liquid and gas phases, surface tension, and molecular weight. .. math:: P = \frac{\sigma^{0.25} MW}{\rho_L - \rho_V} Parameters ---------- MW : float Molecular weight, [g/mol] rhol : float Liquid de...
thermo/utils.py
def Parachor(MW, rhol, rhog, sigma): r'''Calculate Parachor for a pure species, using its density in the liquid and gas phases, surface tension, and molecular weight. .. math:: P = \frac{\sigma^{0.25} MW}{\rho_L - \rho_V} Parameters ---------- MW : float Molecular weight, [...
def Parachor(MW, rhol, rhog, sigma): r'''Calculate Parachor for a pure species, using its density in the liquid and gas phases, surface tension, and molecular weight. .. math:: P = \frac{\sigma^{0.25} MW}{\rho_L - \rho_V} Parameters ---------- MW : float Molecular weight, [...
[ "r", "Calculate", "Parachor", "for", "a", "pure", "species", "using", "its", "density", "in", "the", "liquid", "and", "gas", "phases", "surface", "tension", "and", "molecular", "weight", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L164-L222
[ "def", "Parachor", "(", "MW", ",", "rhol", ",", "rhog", ",", "sigma", ")", ":", "rhol", ",", "rhog", "=", "rhol", "*", "1000.", ",", "rhog", "*", "1000.", "# Convert kg/m^3 to g/m^3", "return", "sigma", "**", "0.25", "*", "MW", "/", "(", "rhol", "-",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
phase_identification_parameter
r'''Calculate the Phase Identification Parameter developed in [1]_ for the accurate and efficient determination of whether a fluid is a liquid or a gas based on the results of an equation of state. For supercritical conditions, this provides a good method for choosing which property correlations to us...
thermo/utils.py
def phase_identification_parameter(V, dP_dT, dP_dV, d2P_dV2, d2P_dVdT): r'''Calculate the Phase Identification Parameter developed in [1]_ for the accurate and efficient determination of whether a fluid is a liquid or a gas based on the results of an equation of state. For supercritical conditions, thi...
def phase_identification_parameter(V, dP_dT, dP_dV, d2P_dV2, d2P_dVdT): r'''Calculate the Phase Identification Parameter developed in [1]_ for the accurate and efficient determination of whether a fluid is a liquid or a gas based on the results of an equation of state. For supercritical conditions, thi...
[ "r", "Calculate", "the", "Phase", "Identification", "Parameter", "developed", "in", "[", "1", "]", "_", "for", "the", "accurate", "and", "efficient", "determination", "of", "whether", "a", "fluid", "is", "a", "liquid", "or", "a", "gas", "based", "on", "the...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L427-L489
[ "def", "phase_identification_parameter", "(", "V", ",", "dP_dT", ",", "dP_dV", ",", "d2P_dV2", ",", "d2P_dVdT", ")", ":", "return", "V", "*", "(", "d2P_dVdT", "/", "dP_dT", "-", "d2P_dV2", "/", "dP_dV", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
phase_identification_parameter_phase
r'''Uses the Phase Identification Parameter concept developed in [1]_ and [2]_ to determine if a chemical is a solid, liquid, or vapor given the appropriate thermodynamic conditions. The criteria for liquid is PIP > 1; for vapor, PIP <= 1. For solids, PIP(solid) is defined to be d2P_dVdT. If it is l...
thermo/utils.py
def phase_identification_parameter_phase(d2P_dVdT, V=None, dP_dT=None, dP_dV=None, d2P_dV2=None): r'''Uses the Phase Identification Parameter concept developed in [1]_ and [2]_ to determine if a chemical is a solid, liquid, or vapor given the appropriate thermodynamic conditions. The criteria for liq...
def phase_identification_parameter_phase(d2P_dVdT, V=None, dP_dT=None, dP_dV=None, d2P_dV2=None): r'''Uses the Phase Identification Parameter concept developed in [1]_ and [2]_ to determine if a chemical is a solid, liquid, or vapor given the appropriate thermodynamic conditions. The criteria for liq...
[ "r", "Uses", "the", "Phase", "Identification", "Parameter", "concept", "developed", "in", "[", "1", "]", "_", "and", "[", "2", "]", "_", "to", "determine", "if", "a", "chemical", "is", "a", "solid", "liquid", "or", "vapor", "given", "the", "appropriate",...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L492-L553
[ "def", "phase_identification_parameter_phase", "(", "d2P_dVdT", ",", "V", "=", "None", ",", "dP_dT", "=", "None", ",", "dP_dV", "=", "None", ",", "d2P_dV2", "=", "None", ")", ":", "if", "d2P_dVdT", ">", "0", ":", "return", "'s'", "else", ":", "PIP", "=...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
speed_of_sound
r'''Calculate a real fluid's speed of sound. The required derivatives should be calculated with an equation of state, and `Cp` and `Cv` are both the real fluid versions. Expression is given in [1]_ and [2]_; a unit conversion is further performed to obtain a result in m/s. If MW is not provided the re...
thermo/utils.py
def speed_of_sound(V, dP_dV, Cp, Cv, MW=None): r'''Calculate a real fluid's speed of sound. The required derivatives should be calculated with an equation of state, and `Cp` and `Cv` are both the real fluid versions. Expression is given in [1]_ and [2]_; a unit conversion is further performed to obtain...
def speed_of_sound(V, dP_dV, Cp, Cv, MW=None): r'''Calculate a real fluid's speed of sound. The required derivatives should be calculated with an equation of state, and `Cp` and `Cv` are both the real fluid versions. Expression is given in [1]_ and [2]_; a unit conversion is further performed to obtain...
[ "r", "Calculate", "a", "real", "fluid", "s", "speed", "of", "sound", ".", "The", "required", "derivatives", "should", "be", "calculated", "with", "an", "equation", "of", "state", "and", "Cp", "and", "Cv", "are", "both", "the", "real", "fluid", "versions", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L614-L676
[ "def", "speed_of_sound", "(", "V", ",", "dP_dV", ",", "Cp", ",", "Cv", ",", "MW", "=", "None", ")", ":", "if", "not", "MW", ":", "return", "(", "-", "V", "**", "2", "*", "dP_dV", "*", "Cp", "/", "Cv", ")", "**", "0.5", "else", ":", "return", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Joule_Thomson
r'''Calculate a real fluid's Joule Thomson coefficient. The required derivative should be calculated with an equation of state, and `Cp` is the real fluid versions. This can either be calculated with `dV_dT` directly, or with `beta` if it is already known. .. math:: \mu_{JT} = \left(\frac{\pa...
thermo/utils.py
def Joule_Thomson(T, V, Cp, dV_dT=None, beta=None): r'''Calculate a real fluid's Joule Thomson coefficient. The required derivative should be calculated with an equation of state, and `Cp` is the real fluid versions. This can either be calculated with `dV_dT` directly, or with `beta` if it is already ...
def Joule_Thomson(T, V, Cp, dV_dT=None, beta=None): r'''Calculate a real fluid's Joule Thomson coefficient. The required derivative should be calculated with an equation of state, and `Cp` is the real fluid versions. This can either be calculated with `dV_dT` directly, or with `beta` if it is already ...
[ "r", "Calculate", "a", "real", "fluid", "s", "Joule", "Thomson", "coefficient", ".", "The", "required", "derivative", "should", "be", "calculated", "with", "an", "equation", "of", "state", "and", "Cp", "is", "the", "real", "fluid", "versions", ".", "This", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L679-L728
[ "def", "Joule_Thomson", "(", "T", ",", "V", ",", "Cp", ",", "dV_dT", "=", "None", ",", "beta", "=", "None", ")", ":", "if", "dV_dT", ":", "return", "(", "T", "*", "dV_dT", "-", "V", ")", "/", "Cp", "elif", "beta", ":", "return", "V", "/", "Cp...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Z_from_virial_density_form
r'''Calculates the compressibility factor of a gas given its temperature, pressure, and molar density-form virial coefficients. Any number of coefficients is supported. .. math:: Z = \frac{PV}{RT} = 1 + \frac{B}{V} + \frac{C}{V^2} + \frac{D}{V^3} + \frac{E}{V^4} \dots Parameters --...
thermo/utils.py
def Z_from_virial_density_form(T, P, *args): r'''Calculates the compressibility factor of a gas given its temperature, pressure, and molar density-form virial coefficients. Any number of coefficients is supported. .. math:: Z = \frac{PV}{RT} = 1 + \frac{B}{V} + \frac{C}{V^2} + \frac{D}{V^3} ...
def Z_from_virial_density_form(T, P, *args): r'''Calculates the compressibility factor of a gas given its temperature, pressure, and molar density-form virial coefficients. Any number of coefficients is supported. .. math:: Z = \frac{PV}{RT} = 1 + \frac{B}{V} + \frac{C}{V^2} + \frac{D}{V^3} ...
[ "r", "Calculates", "the", "compressibility", "factor", "of", "a", "gas", "given", "its", "temperature", "pressure", "and", "molar", "density", "-", "form", "virial", "coefficients", ".", "Any", "number", "of", "coefficients", "is", "supported", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L937-L1024
[ "def", "Z_from_virial_density_form", "(", "T", ",", "P", ",", "*", "args", ")", ":", "l", "=", "len", "(", "args", ")", "if", "l", "==", "1", ":", "return", "1", "/", "2.", "+", "(", "4", "*", "args", "[", "0", "]", "*", "P", "+", "R", "*",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Z_from_virial_pressure_form
r'''Calculates the compressibility factor of a gas given its pressure, and pressure-form virial coefficients. Any number of coefficients is supported. .. math:: Z = \frac{Pv}{RT} = 1 + B'P + C'P^2 + D'P^3 + E'P^4 \dots Parameters ---------- P : float Pressure, [Pa] B to Z : fl...
thermo/utils.py
def Z_from_virial_pressure_form(P, *args): r'''Calculates the compressibility factor of a gas given its pressure, and pressure-form virial coefficients. Any number of coefficients is supported. .. math:: Z = \frac{Pv}{RT} = 1 + B'P + C'P^2 + D'P^3 + E'P^4 \dots Parameters ---------- P...
def Z_from_virial_pressure_form(P, *args): r'''Calculates the compressibility factor of a gas given its pressure, and pressure-form virial coefficients. Any number of coefficients is supported. .. math:: Z = \frac{Pv}{RT} = 1 + B'P + C'P^2 + D'P^3 + E'P^4 \dots Parameters ---------- P...
[ "r", "Calculates", "the", "compressibility", "factor", "of", "a", "gas", "given", "its", "pressure", "and", "pressure", "-", "form", "virial", "coefficients", ".", "Any", "number", "of", "coefficients", "is", "supported", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L1027-L1076
[ "def", "Z_from_virial_pressure_form", "(", "P", ",", "*", "args", ")", ":", "return", "1", "+", "P", "*", "sum", "(", "[", "coeff", "*", "P", "**", "i", "for", "i", ",", "coeff", "in", "enumerate", "(", "args", ")", "]", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
zs_to_ws
r'''Converts a list of mole fractions to mass fractions. Requires molecular weights for all species. .. math:: w_i = \frac{z_i MW_i}{MW_{avg}} MW_{avg} = \sum_i z_i MW_i Parameters ---------- zs : iterable Mole fractions [-] MWs : iterable Molecular weights [g/...
thermo/utils.py
def zs_to_ws(zs, MWs): r'''Converts a list of mole fractions to mass fractions. Requires molecular weights for all species. .. math:: w_i = \frac{z_i MW_i}{MW_{avg}} MW_{avg} = \sum_i z_i MW_i Parameters ---------- zs : iterable Mole fractions [-] MWs : iterable ...
def zs_to_ws(zs, MWs): r'''Converts a list of mole fractions to mass fractions. Requires molecular weights for all species. .. math:: w_i = \frac{z_i MW_i}{MW_{avg}} MW_{avg} = \sum_i z_i MW_i Parameters ---------- zs : iterable Mole fractions [-] MWs : iterable ...
[ "r", "Converts", "a", "list", "of", "mole", "fractions", "to", "mass", "fractions", ".", "Requires", "molecular", "weights", "for", "all", "species", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L1079-L1112
[ "def", "zs_to_ws", "(", "zs", ",", "MWs", ")", ":", "Mavg", "=", "sum", "(", "zi", "*", "MWi", "for", "zi", ",", "MWi", "in", "zip", "(", "zs", ",", "MWs", ")", ")", "ws", "=", "[", "zi", "*", "MWi", "/", "Mavg", "for", "zi", ",", "MWi", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
ws_to_zs
r'''Converts a list of mass fractions to mole fractions. Requires molecular weights for all species. .. math:: z_i = \frac{\frac{w_i}{MW_i}}{\sum_i \frac{w_i}{MW_i}} Parameters ---------- ws : iterable Mass fractions [-] MWs : iterable Molecular weights [g/mol] Ret...
thermo/utils.py
def ws_to_zs(ws, MWs): r'''Converts a list of mass fractions to mole fractions. Requires molecular weights for all species. .. math:: z_i = \frac{\frac{w_i}{MW_i}}{\sum_i \frac{w_i}{MW_i}} Parameters ---------- ws : iterable Mass fractions [-] MWs : iterable Molecul...
def ws_to_zs(ws, MWs): r'''Converts a list of mass fractions to mole fractions. Requires molecular weights for all species. .. math:: z_i = \frac{\frac{w_i}{MW_i}}{\sum_i \frac{w_i}{MW_i}} Parameters ---------- ws : iterable Mass fractions [-] MWs : iterable Molecul...
[ "r", "Converts", "a", "list", "of", "mass", "fractions", "to", "mole", "fractions", ".", "Requires", "molecular", "weights", "for", "all", "species", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L1115-L1146
[ "def", "ws_to_zs", "(", "ws", ",", "MWs", ")", ":", "tot", "=", "sum", "(", "w", "/", "MW", "for", "w", ",", "MW", "in", "zip", "(", "ws", ",", "MWs", ")", ")", "zs", "=", "[", "w", "/", "MW", "/", "tot", "for", "w", ",", "MW", "in", "z...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
zs_to_Vfs
r'''Converts a list of mole fractions to volume fractions. Requires molar volumes for all species. .. math:: \text{Vf}_i = \frac{z_i V_{m,i}}{\sum_i z_i V_{m,i}} Parameters ---------- zs : iterable Mole fractions [-] VMs : iterable Molar volumes of species [m^3/mol] ...
thermo/utils.py
def zs_to_Vfs(zs, Vms): r'''Converts a list of mole fractions to volume fractions. Requires molar volumes for all species. .. math:: \text{Vf}_i = \frac{z_i V_{m,i}}{\sum_i z_i V_{m,i}} Parameters ---------- zs : iterable Mole fractions [-] VMs : iterable Molar volu...
def zs_to_Vfs(zs, Vms): r'''Converts a list of mole fractions to volume fractions. Requires molar volumes for all species. .. math:: \text{Vf}_i = \frac{z_i V_{m,i}}{\sum_i z_i V_{m,i}} Parameters ---------- zs : iterable Mole fractions [-] VMs : iterable Molar volu...
[ "r", "Converts", "a", "list", "of", "mole", "fractions", "to", "volume", "fractions", ".", "Requires", "molar", "volumes", "for", "all", "species", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L1149-L1185
[ "def", "zs_to_Vfs", "(", "zs", ",", "Vms", ")", ":", "vol_is", "=", "[", "zi", "*", "Vmi", "for", "zi", ",", "Vmi", "in", "zip", "(", "zs", ",", "Vms", ")", "]", "tot", "=", "sum", "(", "vol_is", ")", "return", "[", "vol_i", "/", "tot", "for"...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
Vfs_to_zs
r'''Converts a list of mass fractions to mole fractions. Requires molecular weights for all species. .. math:: z_i = \frac{\frac{\text{Vf}_i}{V_{m,i}}}{\sum_i \frac{\text{Vf}_i}{V_{m,i}}} Parameters ---------- Vfs : iterable Molar volume fractions [-] VMs : iterable ...
thermo/utils.py
def Vfs_to_zs(Vfs, Vms): r'''Converts a list of mass fractions to mole fractions. Requires molecular weights for all species. .. math:: z_i = \frac{\frac{\text{Vf}_i}{V_{m,i}}}{\sum_i \frac{\text{Vf}_i}{V_{m,i}}} Parameters ---------- Vfs : iterable Molar volume fractio...
def Vfs_to_zs(Vfs, Vms): r'''Converts a list of mass fractions to mole fractions. Requires molecular weights for all species. .. math:: z_i = \frac{\frac{\text{Vf}_i}{V_{m,i}}}{\sum_i \frac{\text{Vf}_i}{V_{m,i}}} Parameters ---------- Vfs : iterable Molar volume fractio...
[ "r", "Converts", "a", "list", "of", "mass", "fractions", "to", "mole", "fractions", ".", "Requires", "molecular", "weights", "for", "all", "species", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L1188-L1225
[ "def", "Vfs_to_zs", "(", "Vfs", ",", "Vms", ")", ":", "mols_i", "=", "[", "Vfi", "/", "Vmi", "for", "Vfi", ",", "Vmi", "in", "zip", "(", "Vfs", ",", "Vms", ")", "]", "mols", "=", "sum", "(", "mols_i", ")", "return", "[", "mol_i", "/", "mols", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
none_and_length_check
r'''Checks inputs for suitability of use by a mixing rule which requires all inputs to be of the same length and non-None. A number of variations were attempted for this function; this was found to be the quickest. Parameters ---------- all_inputs : array-like of array-like list of all the ...
thermo/utils.py
def none_and_length_check(all_inputs, length=None): r'''Checks inputs for suitability of use by a mixing rule which requires all inputs to be of the same length and non-None. A number of variations were attempted for this function; this was found to be the quickest. Parameters ---------- all_in...
def none_and_length_check(all_inputs, length=None): r'''Checks inputs for suitability of use by a mixing rule which requires all inputs to be of the same length and non-None. A number of variations were attempted for this function; this was found to be the quickest. Parameters ---------- all_in...
[ "r", "Checks", "inputs", "for", "suitability", "of", "use", "by", "a", "mixing", "rule", "which", "requires", "all", "inputs", "to", "be", "of", "the", "same", "length", "and", "non", "-", "None", ".", "A", "number", "of", "variations", "were", "attempte...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L1228-L1260
[ "def", "none_and_length_check", "(", "all_inputs", ",", "length", "=", "None", ")", ":", "if", "not", "length", ":", "length", "=", "len", "(", "all_inputs", "[", "0", "]", ")", "for", "things", "in", "all_inputs", ":", "if", "None", "in", "things", "o...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
allclose_variable
Returns True if two arrays are element-wise equal within several different tolerances. Tolerance values are always positive, usually very small. Based on numpy's allclose function. Only atols or rtols needs to be specified; both are used if given. Parameters ---------- a, b : array_li...
thermo/utils.py
def allclose_variable(a, b, limits, rtols=None, atols=None): '''Returns True if two arrays are element-wise equal within several different tolerances. Tolerance values are always positive, usually very small. Based on numpy's allclose function. Only atols or rtols needs to be specified; both are u...
def allclose_variable(a, b, limits, rtols=None, atols=None): '''Returns True if two arrays are element-wise equal within several different tolerances. Tolerance values are always positive, usually very small. Based on numpy's allclose function. Only atols or rtols needs to be specified; both are u...
[ "Returns", "True", "if", "two", "arrays", "are", "element", "-", "wise", "equal", "within", "several", "different", "tolerances", ".", "Tolerance", "values", "are", "always", "positive", "usually", "very", "small", ".", "Based", "on", "numpy", "s", "allclose",...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L1263-L1309
[ "def", "allclose_variable", "(", "a", ",", "b", ",", "limits", ",", "rtols", "=", "None", ",", "atols", "=", "None", ")", ":", "l", "=", "float", "(", "len", "(", "a", ")", ")", "if", "rtols", "is", "None", "and", "atols", "is", "None", ":", "r...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
polylog2
r'''Simple function to calculate PolyLog(2, x) from ranges 0 <= x <= 1, with relative error guaranteed to be < 1E-7 from 0 to 0.99999. This is a Pade approximation, with three coefficient sets with splits at 0.7 and 0.99. An exception is raised if x is under 0 or above 1. Parameters --------...
thermo/utils.py
def polylog2(x): r'''Simple function to calculate PolyLog(2, x) from ranges 0 <= x <= 1, with relative error guaranteed to be < 1E-7 from 0 to 0.99999. This is a Pade approximation, with three coefficient sets with splits at 0.7 and 0.99. An exception is raised if x is under 0 or above 1. Pa...
def polylog2(x): r'''Simple function to calculate PolyLog(2, x) from ranges 0 <= x <= 1, with relative error guaranteed to be < 1E-7 from 0 to 0.99999. This is a Pade approximation, with three coefficient sets with splits at 0.7 and 0.99. An exception is raised if x is under 0 or above 1. Pa...
[ "r", "Simple", "function", "to", "calculate", "PolyLog", "(", "2", "x", ")", "from", "ranges", "0", "<", "=", "x", "<", "=", "1", "with", "relative", "error", "guaranteed", "to", "be", "<", "1E", "-", "7", "from", "0", "to", "0", ".", "99999", "....
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L1344-L1388
[ "def", "polylog2", "(", "x", ")", ":", "if", "0", "<=", "x", "<=", "0.7", ":", "p", "=", "[", "0.06184590404457956", ",", "-", "0.7460693871557973", ",", "2.2435704485433376", ",", "-", "2.1944070385048526", ",", "0.3382265629285811", ",", "0.2791966558569478"...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
mixing_simple
r'''Simple function calculates a property based on weighted averages of properties. Weights could be mole fractions, volume fractions, mass fractions, or anything else. .. math:: y = \sum_i \text{frac}_i \cdot \text{prop}_i Parameters ---------- fracs : array-like Fractions of ...
thermo/utils.py
def mixing_simple(fracs, props): r'''Simple function calculates a property based on weighted averages of properties. Weights could be mole fractions, volume fractions, mass fractions, or anything else. .. math:: y = \sum_i \text{frac}_i \cdot \text{prop}_i Parameters ---------- fra...
def mixing_simple(fracs, props): r'''Simple function calculates a property based on weighted averages of properties. Weights could be mole fractions, volume fractions, mass fractions, or anything else. .. math:: y = \sum_i \text{frac}_i \cdot \text{prop}_i Parameters ---------- fra...
[ "r", "Simple", "function", "calculates", "a", "property", "based", "on", "weighted", "averages", "of", "properties", ".", "Weights", "could", "be", "mole", "fractions", "volume", "fractions", "mass", "fractions", "or", "anything", "else", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L1421-L1454
[ "def", "mixing_simple", "(", "fracs", ",", "props", ")", ":", "if", "not", "none_and_length_check", "(", "[", "fracs", ",", "props", "]", ")", ":", "return", "None", "result", "=", "sum", "(", "frac", "*", "prop", "for", "frac", ",", "prop", "in", "z...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
mixing_logarithmic
r'''Simple function calculates a property based on weighted averages of logarithmic properties. .. math:: y = \sum_i \text{frac}_i \cdot \log(\text{prop}_i) Parameters ---------- fracs : array-like Fractions of a mixture props: array-like Properties Returns ---...
thermo/utils.py
def mixing_logarithmic(fracs, props): r'''Simple function calculates a property based on weighted averages of logarithmic properties. .. math:: y = \sum_i \text{frac}_i \cdot \log(\text{prop}_i) Parameters ---------- fracs : array-like Fractions of a mixture props: array-li...
def mixing_logarithmic(fracs, props): r'''Simple function calculates a property based on weighted averages of logarithmic properties. .. math:: y = \sum_i \text{frac}_i \cdot \log(\text{prop}_i) Parameters ---------- fracs : array-like Fractions of a mixture props: array-li...
[ "r", "Simple", "function", "calculates", "a", "property", "based", "on", "weighted", "averages", "of", "logarithmic", "properties", "." ]
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L1457-L1489
[ "def", "mixing_logarithmic", "(", "fracs", ",", "props", ")", ":", "if", "not", "none_and_length_check", "(", "[", "fracs", ",", "props", "]", ")", ":", "return", "None", "return", "exp", "(", "sum", "(", "frac", "*", "log", "(", "prop", ")", "for", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
phase_select_property
r'''Determines which phase's property should be set as a default, given the phase a chemical is, and the property values of various phases. For the case of liquid-gas phase, returns None. If the property is not available for the current phase, or if the current phase is not known, returns None. Paramet...
thermo/utils.py
def phase_select_property(phase=None, s=None, l=None, g=None, V_over_F=None): r'''Determines which phase's property should be set as a default, given the phase a chemical is, and the property values of various phases. For the case of liquid-gas phase, returns None. If the property is not available for t...
def phase_select_property(phase=None, s=None, l=None, g=None, V_over_F=None): r'''Determines which phase's property should be set as a default, given the phase a chemical is, and the property values of various phases. For the case of liquid-gas phase, returns None. If the property is not available for t...
[ "r", "Determines", "which", "phase", "s", "property", "should", "be", "set", "as", "a", "default", "given", "the", "phase", "a", "chemical", "is", "and", "the", "property", "values", "of", "various", "phases", ".", "For", "the", "case", "of", "liquid", "...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L1492-L1537
[ "def", "phase_select_property", "(", "phase", "=", "None", ",", "s", "=", "None", ",", "l", "=", "None", ",", "g", "=", "None", ",", "V_over_F", "=", "None", ")", ":", "if", "phase", "==", "'s'", ":", "return", "s", "elif", "phase", "==", "'l'", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TDependentProperty.set_user_methods
r'''Method used to select certain property methods as having a higher priority than were set by default. If `forced` is true, then methods which were not specified are excluded from consideration. As a side effect, `method` is removed to ensure than the new methods will be used in calcu...
thermo/utils.py
def set_user_methods(self, user_methods, forced=False): r'''Method used to select certain property methods as having a higher priority than were set by default. If `forced` is true, then methods which were not specified are excluded from consideration. As a side effect, `method` is remo...
def set_user_methods(self, user_methods, forced=False): r'''Method used to select certain property methods as having a higher priority than were set by default. If `forced` is true, then methods which were not specified are excluded from consideration. As a side effect, `method` is remo...
[ "r", "Method", "used", "to", "select", "certain", "property", "methods", "as", "having", "a", "higher", "priority", "than", "were", "set", "by", "default", ".", "If", "forced", "is", "true", "then", "methods", "which", "were", "not", "specified", "are", "e...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L1690-L1728
[ "def", "set_user_methods", "(", "self", ",", "user_methods", ",", "forced", "=", "False", ")", ":", "# Accept either a string or a list of methods, and whether", "# or not to only consider the false methods", "if", "isinstance", "(", "user_methods", ",", "str", ")", ":", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TDependentProperty.select_valid_methods
r'''Method to obtain a sorted list of methods which are valid at `T` according to `test_method_validity`. Considers either only user methods if forced is True, or all methods. User methods are first tested according to their listed order, and unless forced is True, then all methods are t...
thermo/utils.py
def select_valid_methods(self, T): r'''Method to obtain a sorted list of methods which are valid at `T` according to `test_method_validity`. Considers either only user methods if forced is True, or all methods. User methods are first tested according to their listed order, and unless for...
def select_valid_methods(self, T): r'''Method to obtain a sorted list of methods which are valid at `T` according to `test_method_validity`. Considers either only user methods if forced is True, or all methods. User methods are first tested according to their listed order, and unless for...
[ "r", "Method", "to", "obtain", "a", "sorted", "list", "of", "methods", "which", "are", "valid", "at", "T", "according", "to", "test_method_validity", ".", "Considers", "either", "only", "user", "methods", "if", "forced", "is", "True", "or", "all", "methods",...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L1730-L1772
[ "def", "select_valid_methods", "(", "self", ",", "T", ")", ":", "# Consider either only the user's methods or all methods", "# Tabular data will be in both when inserted", "if", "self", ".", "forced", ":", "considered_methods", "=", "list", "(", "self", ".", "user_methods",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TDependentProperty.T_dependent_property
r'''Method to calculate the property with sanity checking and without specifying a specific method. `select_valid_methods` is used to obtain a sorted list of methods to try. Methods are then tried in order until one succeeds. The methods are allowed to fail, and their results are checked...
thermo/utils.py
def T_dependent_property(self, T): r'''Method to calculate the property with sanity checking and without specifying a specific method. `select_valid_methods` is used to obtain a sorted list of methods to try. Methods are then tried in order until one succeeds. The methods are allowed to ...
def T_dependent_property(self, T): r'''Method to calculate the property with sanity checking and without specifying a specific method. `select_valid_methods` is used to obtain a sorted list of methods to try. Methods are then tried in order until one succeeds. The methods are allowed to ...
[ "r", "Method", "to", "calculate", "the", "property", "with", "sanity", "checking", "and", "without", "specifying", "a", "specific", "method", ".", "select_valid_methods", "is", "used", "to", "obtain", "a", "sorted", "list", "of", "methods", "to", "try", ".", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L1799-L1850
[ "def", "T_dependent_property", "(", "self", ",", "T", ")", ":", "# Optimistic track, with the already set method", "if", "self", ".", "method", ":", "# retest within range", "if", "self", ".", "test_method_validity", "(", "T", ",", "self", ".", "method", ")", ":",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TDependentProperty.plot_T_dependent_property
r'''Method to create a plot of the property vs temperature according to either a specified list of methods, or user methods (if set), or all methods. User-selectable number of points, and temperature range. If only_valid is set,`test_method_validity` will be used to check if each tempera...
thermo/utils.py
def plot_T_dependent_property(self, Tmin=None, Tmax=None, methods=[], pts=50, only_valid=True, order=0): # pragma: no cover r'''Method to create a plot of the property vs temperature according to either a specified list of methods, or user methods (if set), or all ...
def plot_T_dependent_property(self, Tmin=None, Tmax=None, methods=[], pts=50, only_valid=True, order=0): # pragma: no cover r'''Method to create a plot of the property vs temperature according to either a specified list of methods, or user methods (if set), or all ...
[ "r", "Method", "to", "create", "a", "plot", "of", "the", "property", "vs", "temperature", "according", "to", "either", "a", "specified", "list", "of", "methods", "or", "user", "methods", "(", "if", "set", ")", "or", "all", "methods", ".", "User", "-", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L1855-L1943
[ "def", "plot_T_dependent_property", "(", "self", ",", "Tmin", "=", "None", ",", "Tmax", "=", "None", ",", "methods", "=", "[", "]", ",", "pts", "=", "50", ",", "only_valid", "=", "True", ",", "order", "=", "0", ")", ":", "# pragma: no cover", "# This f...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TDependentProperty.interpolate
r'''Method to perform interpolation on a given tabular data set previously added via :obj:`set_tabular_data`. This method will create the interpolators the first time it is used on a property set, and store them for quick future use. Interpolation is cubic-spline based if 5 or more poin...
thermo/utils.py
def interpolate(self, T, name): r'''Method to perform interpolation on a given tabular data set previously added via :obj:`set_tabular_data`. This method will create the interpolators the first time it is used on a property set, and store them for quick future use. Interpolation...
def interpolate(self, T, name): r'''Method to perform interpolation on a given tabular data set previously added via :obj:`set_tabular_data`. This method will create the interpolators the first time it is used on a property set, and store them for quick future use. Interpolation...
[ "r", "Method", "to", "perform", "interpolation", "on", "a", "given", "tabular", "data", "set", "previously", "added", "via", ":", "obj", ":", "set_tabular_data", ".", "This", "method", "will", "create", "the", "interpolators", "the", "first", "time", "it", "...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L1959-L2033
[ "def", "interpolate", "(", "self", ",", "T", ",", "name", ")", ":", "key", "=", "(", "name", ",", "self", ".", "interpolation_T", ",", "self", ".", "interpolation_property", ",", "self", ".", "interpolation_property_inv", ")", "# If the interpolator and extrapol...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TDependentProperty.set_tabular_data
r'''Method to set tabular data to be used for interpolation. Ts must be in increasing order. If no name is given, data will be assigned the name 'Tabular data series #x', where x is the number of previously added tabular data series. The name is added to all methods and iserted at the st...
thermo/utils.py
def set_tabular_data(self, Ts, properties, name=None, check_properties=True): r'''Method to set tabular data to be used for interpolation. Ts must be in increasing order. If no name is given, data will be assigned the name 'Tabular data series #x', where x is the number of previously add...
def set_tabular_data(self, Ts, properties, name=None, check_properties=True): r'''Method to set tabular data to be used for interpolation. Ts must be in increasing order. If no name is given, data will be assigned the name 'Tabular data series #x', where x is the number of previously add...
[ "r", "Method", "to", "set", "tabular", "data", "to", "be", "used", "for", "interpolation", ".", "Ts", "must", "be", "in", "increasing", "order", ".", "If", "no", "name", "is", "given", "data", "will", "be", "assigned", "the", "name", "Tabular", "data", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2035-L2072
[ "def", "set_tabular_data", "(", "self", ",", "Ts", ",", "properties", ",", "name", "=", "None", ",", "check_properties", "=", "True", ")", ":", "# Ts must be in increasing order.", "if", "check_properties", ":", "for", "p", "in", "properties", ":", "if", "not"...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TDependentProperty.solve_prop
r'''Method to solve for the temperature at which a property is at a specified value. `T_dependent_property` is used to calculate the value of the property as a function of temperature; if `reset_method` is True, the best method is used at each temperature as the solver seeks a solution. ...
thermo/utils.py
def solve_prop(self, goal, reset_method=True): r'''Method to solve for the temperature at which a property is at a specified value. `T_dependent_property` is used to calculate the value of the property as a function of temperature; if `reset_method` is True, the best method is used at ea...
def solve_prop(self, goal, reset_method=True): r'''Method to solve for the temperature at which a property is at a specified value. `T_dependent_property` is used to calculate the value of the property as a function of temperature; if `reset_method` is True, the best method is used at ea...
[ "r", "Method", "to", "solve", "for", "the", "temperature", "at", "which", "a", "property", "is", "at", "a", "specified", "value", ".", "T_dependent_property", "is", "used", "to", "calculate", "the", "value", "of", "the", "property", "as", "a", "function", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2074-L2111
[ "def", "solve_prop", "(", "self", ",", "goal", ",", "reset_method", "=", "True", ")", ":", "if", "self", ".", "Tmin", "is", "None", "or", "self", ".", "Tmax", "is", "None", ":", "raise", "Exception", "(", "'Both a minimum and a maximum value are not present in...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TDependentProperty.calculate_derivative
r'''Method to calculate a derivative of a property with respect to temperature, of a given order using a specified method. Uses SciPy's derivative function, with a delta of 1E-6 K and a number of points equal to 2*order + 1. This method can be overwritten by subclasses who may perfe...
thermo/utils.py
def calculate_derivative(self, T, method, order=1): r'''Method to calculate a derivative of a property with respect to temperature, of a given order using a specified method. Uses SciPy's derivative function, with a delta of 1E-6 K and a number of points equal to 2*order + 1. ...
def calculate_derivative(self, T, method, order=1): r'''Method to calculate a derivative of a property with respect to temperature, of a given order using a specified method. Uses SciPy's derivative function, with a delta of 1E-6 K and a number of points equal to 2*order + 1. ...
[ "r", "Method", "to", "calculate", "a", "derivative", "of", "a", "property", "with", "respect", "to", "temperature", "of", "a", "given", "order", "using", "a", "specified", "method", ".", "Uses", "SciPy", "s", "derivative", "function", "with", "a", "delta", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2113-L2139
[ "def", "calculate_derivative", "(", "self", ",", "T", ",", "method", ",", "order", "=", "1", ")", ":", "return", "derivative", "(", "self", ".", "calculate", ",", "T", ",", "dx", "=", "1e-6", ",", "args", "=", "[", "method", "]", ",", "n", "=", "...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TDependentProperty.T_dependent_property_derivative
r'''Method to obtain a derivative of a property with respect to temperature, of a given order. Methods found valid by `select_valid_methods` are attempted until a method succeeds. If no methods are valid and succeed, None is returned. Calls `calculate_derivative` internally to perfor...
thermo/utils.py
def T_dependent_property_derivative(self, T, order=1): r'''Method to obtain a derivative of a property with respect to temperature, of a given order. Methods found valid by `select_valid_methods` are attempted until a method succeeds. If no methods are valid and succeed, None is retur...
def T_dependent_property_derivative(self, T, order=1): r'''Method to obtain a derivative of a property with respect to temperature, of a given order. Methods found valid by `select_valid_methods` are attempted until a method succeeds. If no methods are valid and succeed, None is retur...
[ "r", "Method", "to", "obtain", "a", "derivative", "of", "a", "property", "with", "respect", "to", "temperature", "of", "a", "given", "order", ".", "Methods", "found", "valid", "by", "select_valid_methods", "are", "attempted", "until", "a", "method", "succeeds"...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2141-L2178
[ "def", "T_dependent_property_derivative", "(", "self", ",", "T", ",", "order", "=", "1", ")", ":", "if", "self", ".", "method", ":", "# retest within range", "if", "self", ".", "test_method_validity", "(", "T", ",", "self", ".", "method", ")", ":", "try", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TDependentProperty.calculate_integral
r'''Method to calculate the integral of a property with respect to temperature, using a specified method. Uses SciPy's `quad` function to perform the integral, with no options. This method can be overwritten by subclasses who may perfer to add analytical methods for some or all ...
thermo/utils.py
def calculate_integral(self, T1, T2, method): r'''Method to calculate the integral of a property with respect to temperature, using a specified method. Uses SciPy's `quad` function to perform the integral, with no options. This method can be overwritten by subclasses who may per...
def calculate_integral(self, T1, T2, method): r'''Method to calculate the integral of a property with respect to temperature, using a specified method. Uses SciPy's `quad` function to perform the integral, with no options. This method can be overwritten by subclasses who may per...
[ "r", "Method", "to", "calculate", "the", "integral", "of", "a", "property", "with", "respect", "to", "temperature", "using", "a", "specified", "method", ".", "Uses", "SciPy", "s", "quad", "function", "to", "perform", "the", "integral", "with", "no", "options...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2180-L2206
[ "def", "calculate_integral", "(", "self", ",", "T1", ",", "T2", ",", "method", ")", ":", "return", "float", "(", "quad", "(", "self", ".", "calculate", ",", "T1", ",", "T2", ",", "args", "=", "(", "method", ")", ")", "[", "0", "]", ")" ]
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TDependentProperty.T_dependent_property_integral
r'''Method to calculate the integral of a property with respect to temperature, using a specified method. Methods found valid by `select_valid_methods` are attempted until a method succeeds. If no methods are valid and succeed, None is returned. Calls `calculate_integral` inte...
thermo/utils.py
def T_dependent_property_integral(self, T1, T2): r'''Method to calculate the integral of a property with respect to temperature, using a specified method. Methods found valid by `select_valid_methods` are attempted until a method succeeds. If no methods are valid and succeed, None is r...
def T_dependent_property_integral(self, T1, T2): r'''Method to calculate the integral of a property with respect to temperature, using a specified method. Methods found valid by `select_valid_methods` are attempted until a method succeeds. If no methods are valid and succeed, None is r...
[ "r", "Method", "to", "calculate", "the", "integral", "of", "a", "property", "with", "respect", "to", "temperature", "using", "a", "specified", "method", ".", "Methods", "found", "valid", "by", "select_valid_methods", "are", "attempted", "until", "a", "method", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2208-L2250
[ "def", "T_dependent_property_integral", "(", "self", ",", "T1", ",", "T2", ")", ":", "Tavg", "=", "0.5", "*", "(", "T1", "+", "T2", ")", "if", "self", ".", "method", ":", "# retest within range", "if", "self", ".", "test_method_validity", "(", "Tavg", ",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TDependentProperty.calculate_integral_over_T
r'''Method to calculate the integral of a property over temperature with respect to temperature, using a specified method. Uses SciPy's `quad` function to perform the integral, with no options. This method can be overwritten by subclasses who may perfer to add analytical method...
thermo/utils.py
def calculate_integral_over_T(self, T1, T2, method): r'''Method to calculate the integral of a property over temperature with respect to temperature, using a specified method. Uses SciPy's `quad` function to perform the integral, with no options. This method can be overwritten ...
def calculate_integral_over_T(self, T1, T2, method): r'''Method to calculate the integral of a property over temperature with respect to temperature, using a specified method. Uses SciPy's `quad` function to perform the integral, with no options. This method can be overwritten ...
[ "r", "Method", "to", "calculate", "the", "integral", "of", "a", "property", "over", "temperature", "with", "respect", "to", "temperature", "using", "a", "specified", "method", ".", "Uses", "SciPy", "s", "quad", "function", "to", "perform", "the", "integral", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2252-L2278
[ "def", "calculate_integral_over_T", "(", "self", ",", "T1", ",", "T2", ",", "method", ")", ":", "return", "float", "(", "quad", "(", "lambda", "T", ":", "self", ".", "calculate", "(", "T", ",", "method", ")", "/", "T", ",", "T1", ",", "T2", ")", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TDependentProperty.T_dependent_property_integral_over_T
r'''Method to calculate the integral of a property over temperature with respect to temperature, using a specified method. Methods found valid by `select_valid_methods` are attempted until a method succeeds. If no methods are valid and succeed, None is returned. Calls `calcula...
thermo/utils.py
def T_dependent_property_integral_over_T(self, T1, T2): r'''Method to calculate the integral of a property over temperature with respect to temperature, using a specified method. Methods found valid by `select_valid_methods` are attempted until a method succeeds. If no methods are vali...
def T_dependent_property_integral_over_T(self, T1, T2): r'''Method to calculate the integral of a property over temperature with respect to temperature, using a specified method. Methods found valid by `select_valid_methods` are attempted until a method succeeds. If no methods are vali...
[ "r", "Method", "to", "calculate", "the", "integral", "of", "a", "property", "over", "temperature", "with", "respect", "to", "temperature", "using", "a", "specified", "method", ".", "Methods", "found", "valid", "by", "select_valid_methods", "are", "attempted", "u...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2280-L2322
[ "def", "T_dependent_property_integral_over_T", "(", "self", ",", "T1", ",", "T2", ")", ":", "Tavg", "=", "0.5", "*", "(", "T1", "+", "T2", ")", "if", "self", ".", "method", ":", "# retest within range", "if", "self", ".", "test_method_validity", "(", "Tavg...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TDependentProperty.load_all_methods
r'''Method to load all data, and set all_methods based on the available data and properties. Demo function for testing only; must be implemented according to the methods available for each individual method.
thermo/utils.py
def load_all_methods(self): r'''Method to load all data, and set all_methods based on the available data and properties. Demo function for testing only; must be implemented according to the methods available for each individual method. ''' methods = [] Tmins, Tmax...
def load_all_methods(self): r'''Method to load all data, and set all_methods based on the available data and properties. Demo function for testing only; must be implemented according to the methods available for each individual method. ''' methods = [] Tmins, Tmax...
[ "r", "Method", "to", "load", "all", "data", "and", "set", "all_methods", "based", "on", "the", "available", "data", "and", "properties", ".", "Demo", "function", "for", "testing", "only", ";", "must", "be", "implemented", "according", "to", "the", "methods",...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2345-L2368
[ "def", "load_all_methods", "(", "self", ")", ":", "methods", "=", "[", "]", "Tmins", ",", "Tmaxs", "=", "[", "]", ",", "[", "]", "if", "self", ".", "CASRN", "in", "[", "'7732-18-5'", ",", "'67-56-1'", ",", "'64-17-5'", "]", ":", "methods", ".", "ap...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TDependentProperty.calculate
r'''Method to calculate a property with a specified method, with no validity checking or error handling. Demo function for testing only; must be implemented according to the methods available for each individual method. Include the interpolation call here. Parameters ---------- ...
thermo/utils.py
def calculate(self, T, method): r'''Method to calculate a property with a specified method, with no validity checking or error handling. Demo function for testing only; must be implemented according to the methods available for each individual method. Include the interpolation call here....
def calculate(self, T, method): r'''Method to calculate a property with a specified method, with no validity checking or error handling. Demo function for testing only; must be implemented according to the methods available for each individual method. Include the interpolation call here....
[ "r", "Method", "to", "calculate", "a", "property", "with", "a", "specified", "method", "with", "no", "validity", "checking", "or", "error", "handling", ".", "Demo", "function", "for", "testing", "only", ";", "must", "be", "implemented", "according", "to", "t...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2370-L2394
[ "def", "calculate", "(", "self", ",", "T", ",", "method", ")", ":", "if", "method", "==", "TEST_METHOD_1", ":", "prop", "=", "self", ".", "TEST_METHOD_1_coeffs", "[", "0", "]", "+", "self", ".", "TEST_METHOD_1_coeffs", "[", "1", "]", "*", "T", "elif", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TPDependentProperty.set_user_methods_P
r'''Method to set the pressure-dependent property methods desired for consideration by the user. Can be used to exclude certain methods which might have unacceptable accuracy. As a side effect, the previously selected method is removed when this method is called to ensure user methods a...
thermo/utils.py
def set_user_methods_P(self, user_methods_P, forced_P=False): r'''Method to set the pressure-dependent property methods desired for consideration by the user. Can be used to exclude certain methods which might have unacceptable accuracy. As a side effect, the previously selected method ...
def set_user_methods_P(self, user_methods_P, forced_P=False): r'''Method to set the pressure-dependent property methods desired for consideration by the user. Can be used to exclude certain methods which might have unacceptable accuracy. As a side effect, the previously selected method ...
[ "r", "Method", "to", "set", "the", "pressure", "-", "dependent", "property", "methods", "desired", "for", "consideration", "by", "the", "user", ".", "Can", "be", "used", "to", "exclude", "certain", "methods", "which", "might", "have", "unacceptable", "accuracy...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2466-L2502
[ "def", "set_user_methods_P", "(", "self", ",", "user_methods_P", ",", "forced_P", "=", "False", ")", ":", "# Accept either a string or a list of methods, and whether", "# or not to only consider the false methods", "if", "isinstance", "(", "user_methods_P", ",", "str", ")", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TPDependentProperty.select_valid_methods_P
r'''Method to obtain a sorted list methods which are valid at `T` according to `test_method_validity`. Considers either only user methods if forced is True, or all methods. User methods are first tested according to their listed order, and unless forced is True, then all methods are test...
thermo/utils.py
def select_valid_methods_P(self, T, P): r'''Method to obtain a sorted list methods which are valid at `T` according to `test_method_validity`. Considers either only user methods if forced is True, or all methods. User methods are first tested according to their listed order, and unless f...
def select_valid_methods_P(self, T, P): r'''Method to obtain a sorted list methods which are valid at `T` according to `test_method_validity`. Considers either only user methods if forced is True, or all methods. User methods are first tested according to their listed order, and unless f...
[ "r", "Method", "to", "obtain", "a", "sorted", "list", "methods", "which", "are", "valid", "at", "T", "according", "to", "test_method_validity", ".", "Considers", "either", "only", "user", "methods", "if", "forced", "is", "True", "or", "all", "methods", ".", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2504-L2544
[ "def", "select_valid_methods_P", "(", "self", ",", "T", ",", "P", ")", ":", "# Same as select_valid_methods but with _P added to variables", "if", "self", ".", "forced_P", ":", "considered_methods", "=", "list", "(", "self", ".", "user_methods_P", ")", "else", ":", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TPDependentProperty.TP_dependent_property
r'''Method to calculate the property with sanity checking and without specifying a specific method. `select_valid_methods_P` is used to obtain a sorted list of methods to try. Methods are then tried in order until one succeeds. The methods are allowed to fail, and their results are check...
thermo/utils.py
def TP_dependent_property(self, T, P): r'''Method to calculate the property with sanity checking and without specifying a specific method. `select_valid_methods_P` is used to obtain a sorted list of methods to try. Methods are then tried in order until one succeeds. The methods are allow...
def TP_dependent_property(self, T, P): r'''Method to calculate the property with sanity checking and without specifying a specific method. `select_valid_methods_P` is used to obtain a sorted list of methods to try. Methods are then tried in order until one succeeds. The methods are allow...
[ "r", "Method", "to", "calculate", "the", "property", "with", "sanity", "checking", "and", "without", "specifying", "a", "specific", "method", ".", "select_valid_methods_P", "is", "used", "to", "obtain", "a", "sorted", "list", "of", "methods", "to", "try", ".",...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2546-L2598
[ "def", "TP_dependent_property", "(", "self", ",", "T", ",", "P", ")", ":", "# Optimistic track, with the already set method", "if", "self", ".", "method_P", ":", "# retest within range", "if", "self", ".", "test_method_validity_P", "(", "T", ",", "P", ",", "self",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TPDependentProperty.set_tabular_data_P
r'''Method to set tabular data to be used for interpolation. Ts and Psmust be in increasing order. If no name is given, data will be assigned the name 'Tabular data series #x', where x is the number of previously added tabular data series. The name is added to all methods and is inserted...
thermo/utils.py
def set_tabular_data_P(self, Ts, Ps, properties, name=None, check_properties=True): r'''Method to set tabular data to be used for interpolation. Ts and Psmust be in increasing order. If no name is given, data will be assigned the name 'Tabular data series #x', where x is the number of pr...
def set_tabular_data_P(self, Ts, Ps, properties, name=None, check_properties=True): r'''Method to set tabular data to be used for interpolation. Ts and Psmust be in increasing order. If no name is given, data will be assigned the name 'Tabular data series #x', where x is the number of pr...
[ "r", "Method", "to", "set", "tabular", "data", "to", "be", "used", "for", "interpolation", ".", "Ts", "and", "Psmust", "be", "in", "increasing", "order", ".", "If", "no", "name", "is", "given", "data", "will", "be", "assigned", "the", "name", "Tabular", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2607-L2647
[ "def", "set_tabular_data_P", "(", "self", ",", "Ts", ",", "Ps", ",", "properties", ",", "name", "=", "None", ",", "check_properties", "=", "True", ")", ":", "# Ts must be in increasing order.", "if", "check_properties", ":", "for", "p", "in", "np", ".", "arr...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TPDependentProperty.interpolate_P
r'''Method to perform interpolation on a given tabular data set previously added via `set_tabular_data_P`. This method will create the interpolators the first time it is used on a property set, and store them for quick future use. Interpolation is cubic-spline based if 5 or more points ...
thermo/utils.py
def interpolate_P(self, T, P, name): r'''Method to perform interpolation on a given tabular data set previously added via `set_tabular_data_P`. This method will create the interpolators the first time it is used on a property set, and store them for quick future use. Interpolati...
def interpolate_P(self, T, P, name): r'''Method to perform interpolation on a given tabular data set previously added via `set_tabular_data_P`. This method will create the interpolators the first time it is used on a property set, and store them for quick future use. Interpolati...
[ "r", "Method", "to", "perform", "interpolation", "on", "a", "given", "tabular", "data", "set", "previously", "added", "via", "set_tabular_data_P", ".", "This", "method", "will", "create", "the", "interpolators", "the", "first", "time", "it", "is", "used", "on"...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2649-L2725
[ "def", "interpolate_P", "(", "self", ",", "T", ",", "P", ",", "name", ")", ":", "key", "=", "(", "name", ",", "self", ".", "interpolation_T", ",", "self", ".", "interpolation_P", ",", "self", ".", "interpolation_property", ",", "self", ".", "interpolatio...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TPDependentProperty.plot_isotherm
r'''Method to create a plot of the property vs pressure at a specified temperature according to either a specified list of methods, or the user methods (if set), or all methods. User-selectable number of points, and pressure range. If only_valid is set, `test_method_validity_P` will be...
thermo/utils.py
def plot_isotherm(self, T, Pmin=None, Pmax=None, methods_P=[], pts=50, only_valid=True): # pragma: no cover r'''Method to create a plot of the property vs pressure at a specified temperature according to either a specified list of methods, or the user methods (if set), or...
def plot_isotherm(self, T, Pmin=None, Pmax=None, methods_P=[], pts=50, only_valid=True): # pragma: no cover r'''Method to create a plot of the property vs pressure at a specified temperature according to either a specified list of methods, or the user methods (if set), or...
[ "r", "Method", "to", "create", "a", "plot", "of", "the", "property", "vs", "pressure", "at", "a", "specified", "temperature", "according", "to", "either", "a", "specified", "list", "of", "methods", "or", "the", "user", "methods", "(", "if", "set", ")", "...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2727-L2798
[ "def", "plot_isotherm", "(", "self", ",", "T", ",", "Pmin", "=", "None", ",", "Pmax", "=", "None", ",", "methods_P", "=", "[", "]", ",", "pts", "=", "50", ",", "only_valid", "=", "True", ")", ":", "# pragma: no cover", "# This function cannot be tested", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TPDependentProperty.plot_isobar
r'''Method to create a plot of the property vs temperature at a specific pressure according to either a specified list of methods, or user methods (if set), or all methods. User-selectable number of points, and temperature range. If only_valid is set,`test_method_validity_P` will be use...
thermo/utils.py
def plot_isobar(self, P, Tmin=None, Tmax=None, methods_P=[], pts=50, only_valid=True): # pragma: no cover r'''Method to create a plot of the property vs temperature at a specific pressure according to either a specified list of methods, or user methods (if set), or all ...
def plot_isobar(self, P, Tmin=None, Tmax=None, methods_P=[], pts=50, only_valid=True): # pragma: no cover r'''Method to create a plot of the property vs temperature at a specific pressure according to either a specified list of methods, or user methods (if set), or all ...
[ "r", "Method", "to", "create", "a", "plot", "of", "the", "property", "vs", "temperature", "at", "a", "specific", "pressure", "according", "to", "either", "a", "specified", "list", "of", "methods", "or", "user", "methods", "(", "if", "set", ")", "or", "al...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2800-L2871
[ "def", "plot_isobar", "(", "self", ",", "P", ",", "Tmin", "=", "None", ",", "Tmax", "=", "None", ",", "methods_P", "=", "[", "]", ",", "pts", "=", "50", ",", "only_valid", "=", "True", ")", ":", "# pragma: no cover", "if", "not", "has_matplotlib", ":...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TPDependentProperty.plot_TP_dependent_property
r'''Method to create a plot of the property vs temperature and pressure according to either a specified list of methods, or user methods (if set), or all methods. User-selectable number of points for each variable. If only_valid is set,`test_method_validity_P` will be used to check if...
thermo/utils.py
def plot_TP_dependent_property(self, Tmin=None, Tmax=None, Pmin=None, Pmax=None, methods_P=[], pts=15, only_valid=True): # pragma: no cover r'''Method to create a plot of the property vs temperature and pressure according to eithe...
def plot_TP_dependent_property(self, Tmin=None, Tmax=None, Pmin=None, Pmax=None, methods_P=[], pts=15, only_valid=True): # pragma: no cover r'''Method to create a plot of the property vs temperature and pressure according to eithe...
[ "r", "Method", "to", "create", "a", "plot", "of", "the", "property", "vs", "temperature", "and", "pressure", "according", "to", "either", "a", "specified", "list", "of", "methods", "or", "user", "methods", "(", "if", "set", ")", "or", "all", "methods", "...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2874-L2977
[ "def", "plot_TP_dependent_property", "(", "self", ",", "Tmin", "=", "None", ",", "Tmax", "=", "None", ",", "Pmin", "=", "None", ",", "Pmax", "=", "None", ",", "methods_P", "=", "[", "]", ",", "pts", "=", "15", ",", "only_valid", "=", "True", ")", "...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TPDependentProperty.calculate_derivative_T
r'''Method to calculate a derivative of a temperature and pressure dependent property with respect to temperature at constant pressure, of a given order using a specified method. Uses SciPy's derivative function, with a delta of 1E-6 K and a number of points equal to 2*order + 1. ...
thermo/utils.py
def calculate_derivative_T(self, T, P, method, order=1): r'''Method to calculate a derivative of a temperature and pressure dependent property with respect to temperature at constant pressure, of a given order using a specified method. Uses SciPy's derivative function, with a delta o...
def calculate_derivative_T(self, T, P, method, order=1): r'''Method to calculate a derivative of a temperature and pressure dependent property with respect to temperature at constant pressure, of a given order using a specified method. Uses SciPy's derivative function, with a delta o...
[ "r", "Method", "to", "calculate", "a", "derivative", "of", "a", "temperature", "and", "pressure", "dependent", "property", "with", "respect", "to", "temperature", "at", "constant", "pressure", "of", "a", "given", "order", "using", "a", "specified", "method", "...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L2980-L3010
[ "def", "calculate_derivative_T", "(", "self", ",", "T", ",", "P", ",", "method", ",", "order", "=", "1", ")", ":", "return", "derivative", "(", "self", ".", "calculate_P", ",", "T", ",", "dx", "=", "1e-6", ",", "args", "=", "[", "P", ",", "method",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TPDependentProperty.calculate_derivative_P
r'''Method to calculate a derivative of a temperature and pressure dependent property with respect to pressure at constant temperature, of a given order using a specified method. Uses SciPy's derivative function, with a delta of 0.01 Pa and a number of points equal to 2*order + 1. ...
thermo/utils.py
def calculate_derivative_P(self, P, T, method, order=1): r'''Method to calculate a derivative of a temperature and pressure dependent property with respect to pressure at constant temperature, of a given order using a specified method. Uses SciPy's derivative function, with a delta of 0...
def calculate_derivative_P(self, P, T, method, order=1): r'''Method to calculate a derivative of a temperature and pressure dependent property with respect to pressure at constant temperature, of a given order using a specified method. Uses SciPy's derivative function, with a delta of 0...
[ "r", "Method", "to", "calculate", "a", "derivative", "of", "a", "temperature", "and", "pressure", "dependent", "property", "with", "respect", "to", "pressure", "at", "constant", "temperature", "of", "a", "given", "order", "using", "a", "specified", "method", "...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L3012-L3043
[ "def", "calculate_derivative_P", "(", "self", ",", "P", ",", "T", ",", "method", ",", "order", "=", "1", ")", ":", "f", "=", "lambda", "P", ":", "self", ".", "calculate_P", "(", "T", ",", "P", ",", "method", ")", "return", "derivative", "(", "f", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TPDependentProperty.TP_dependent_property_derivative_T
r'''Method to calculate a derivative of a temperature and pressure dependent property with respect to temperature at constant pressure, of a given order. Methods found valid by `select_valid_methods_P` are attempted until a method succeeds. If no methods are valid and succeed, None is r...
thermo/utils.py
def TP_dependent_property_derivative_T(self, T, P, order=1): r'''Method to calculate a derivative of a temperature and pressure dependent property with respect to temperature at constant pressure, of a given order. Methods found valid by `select_valid_methods_P` are attempted until a me...
def TP_dependent_property_derivative_T(self, T, P, order=1): r'''Method to calculate a derivative of a temperature and pressure dependent property with respect to temperature at constant pressure, of a given order. Methods found valid by `select_valid_methods_P` are attempted until a me...
[ "r", "Method", "to", "calculate", "a", "derivative", "of", "a", "temperature", "and", "pressure", "dependent", "property", "with", "respect", "to", "temperature", "at", "constant", "pressure", "of", "a", "given", "order", ".", "Methods", "found", "valid", "by"...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L3045-L3078
[ "def", "TP_dependent_property_derivative_T", "(", "self", ",", "T", ",", "P", ",", "order", "=", "1", ")", ":", "sorted_valid_methods_P", "=", "self", ".", "select_valid_methods_P", "(", "T", ",", "P", ")", "for", "method", "in", "sorted_valid_methods_P", ":",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
TPDependentProperty.TP_dependent_property_derivative_P
r'''Method to calculate a derivative of a temperature and pressure dependent property with respect to pressure at constant temperature, of a given order. Methods found valid by `select_valid_methods_P` are attempted until a method succeeds. If no methods are valid and succeed, None is r...
thermo/utils.py
def TP_dependent_property_derivative_P(self, T, P, order=1): r'''Method to calculate a derivative of a temperature and pressure dependent property with respect to pressure at constant temperature, of a given order. Methods found valid by `select_valid_methods_P` are attempted until a me...
def TP_dependent_property_derivative_P(self, T, P, order=1): r'''Method to calculate a derivative of a temperature and pressure dependent property with respect to pressure at constant temperature, of a given order. Methods found valid by `select_valid_methods_P` are attempted until a me...
[ "r", "Method", "to", "calculate", "a", "derivative", "of", "a", "temperature", "and", "pressure", "dependent", "property", "with", "respect", "to", "pressure", "at", "constant", "temperature", "of", "a", "given", "order", ".", "Methods", "found", "valid", "by"...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L3080-L3113
[ "def", "TP_dependent_property_derivative_P", "(", "self", ",", "T", ",", "P", ",", "order", "=", "1", ")", ":", "sorted_valid_methods_P", "=", "self", ".", "select_valid_methods_P", "(", "T", ",", "P", ")", "for", "method", "in", "sorted_valid_methods_P", ":",...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
MixtureProperty.set_user_method
r'''Method to set the T, P, and composition dependent property methods desired for consideration by the user. Can be used to exclude certain methods which might have unacceptable accuracy. As a side effect, the previously selected method is removed when this method is called to ensure...
thermo/utils.py
def set_user_method(self, user_methods, forced=False): r'''Method to set the T, P, and composition dependent property methods desired for consideration by the user. Can be used to exclude certain methods which might have unacceptable accuracy. As a side effect, the previously selected...
def set_user_method(self, user_methods, forced=False): r'''Method to set the T, P, and composition dependent property methods desired for consideration by the user. Can be used to exclude certain methods which might have unacceptable accuracy. As a side effect, the previously selected...
[ "r", "Method", "to", "set", "the", "T", "P", "and", "composition", "dependent", "property", "methods", "desired", "for", "consideration", "by", "the", "user", ".", "Can", "be", "used", "to", "exclude", "certain", "methods", "which", "might", "have", "unaccep...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L3160-L3197
[ "def", "set_user_method", "(", "self", ",", "user_methods", ",", "forced", "=", "False", ")", ":", "# Accept either a string or a list of methods, and whether", "# or not to only consider the false methods", "if", "isinstance", "(", "user_methods", ",", "str", ")", ":", "...
3857ed023a3e64fd3039a32d53576c24990ef1c3
valid
MixtureProperty.mixture_property
r'''Method to calculate the property with sanity checking and without specifying a specific method. `select_valid_methods` is used to obtain a sorted list of methods to try. Methods are then tried in order until one succeeds. The methods are allowed to fail, and their results are checked...
thermo/utils.py
def mixture_property(self, T, P, zs, ws): r'''Method to calculate the property with sanity checking and without specifying a specific method. `select_valid_methods` is used to obtain a sorted list of methods to try. Methods are then tried in order until one succeeds. The methods are allo...
def mixture_property(self, T, P, zs, ws): r'''Method to calculate the property with sanity checking and without specifying a specific method. `select_valid_methods` is used to obtain a sorted list of methods to try. Methods are then tried in order until one succeeds. The methods are allo...
[ "r", "Method", "to", "calculate", "the", "property", "with", "sanity", "checking", "and", "without", "specifying", "a", "specific", "method", ".", "select_valid_methods", "is", "used", "to", "obtain", "a", "sorted", "list", "of", "methods", "to", "try", ".", ...
CalebBell/thermo
python
https://github.com/CalebBell/thermo/blob/3857ed023a3e64fd3039a32d53576c24990ef1c3/thermo/utils.py#L3273-L3330
[ "def", "mixture_property", "(", "self", ",", "T", ",", "P", ",", "zs", ",", "ws", ")", ":", "# Optimistic track, with the already set method", "if", "self", ".", "method", ":", "# retest within range", "if", "self", ".", "test_method_validity", "(", "T", ",", ...
3857ed023a3e64fd3039a32d53576c24990ef1c3