Search is not available for this dataset
text
stringlengths
75
104k
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 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_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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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_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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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_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 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 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 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_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 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 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 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 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 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 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 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 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_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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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_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_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 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_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 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_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 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 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...