methods = []<EOL>Tmins, Tmaxs = [], []<EOL>if self.CASRN in WagnerMcGarry.index:<EOL><INDENT>methods.append(WAGNER_MCGARRY)<EOL>_, A, B, C, D, self.WAGNER_MCGARRY_Pc, self.WAGNER_MCGARRY_Tc, self.WAGNER_MCGARRY_Tmin = _WagnerMcGarry_values[WagnerMcGarry.index.get_loc(self.CASRN)].tolist()<EOL>self.WAGNER_MCGARRY_coefs = [A, B, C, D]<EOL>Tmins.append(self.WAGNER_MCGARRY_Tmin); Tmaxs.append(self.WAGNER_MCGARRY_Tc)<EOL><DEDENT>if self.CASRN in WagnerPoling.index:<EOL><INDENT>methods.append(WAGNER_POLING)<EOL>_, A, B, C, D, self.WAGNER_POLING_Tc, self.WAGNER_POLING_Pc, Tmin, self.WAGNER_POLING_Tmax = _WagnerPoling_values[WagnerPoling.index.get_loc(self.CASRN)].tolist()<EOL>self.WAGNER_POLING_Tmin = Tmin if not np.isnan(Tmin) else self.WAGNER_POLING_Tmax*<NUM_LIT:0.1><EOL>self.WAGNER_POLING_coefs = [A, B, C, D]<EOL>Tmins.append(Tmin); Tmaxs.append(self.WAGNER_POLING_Tmax)<EOL><DEDENT>if self.CASRN in AntoineExtended.index:<EOL><INDENT>methods.append(ANTOINE_EXTENDED_POLING)<EOL>_, A, B, C, Tc, to, n, E, F, self.ANTOINE_EXTENDED_POLING_Tmin, self.ANTOINE_EXTENDED_POLING_Tmax = _AntoineExtended_values[AntoineExtended.index.get_loc(self.CASRN)].tolist()<EOL>self.ANTOINE_EXTENDED_POLING_coefs = [Tc, to, A, B, C, n, E, F]<EOL>Tmins.append(self.ANTOINE_EXTENDED_POLING_Tmin); Tmaxs.append(self.ANTOINE_EXTENDED_POLING_Tmax)<EOL><DEDENT>if self.CASRN in AntoinePoling.index:<EOL><INDENT>methods.append(ANTOINE_POLING)<EOL>_, A, B, C, self.ANTOINE_POLING_Tmin, self.ANTOINE_POLING_Tmax = _AntoinePoling_values[AntoinePoling.index.get_loc(self.CASRN)].tolist()<EOL>self.ANTOINE_POLING_coefs = [A, B, C]<EOL>Tmins.append(self.ANTOINE_POLING_Tmin); Tmaxs.append(self.ANTOINE_POLING_Tmax)<EOL><DEDENT>if self.CASRN in Perrys2_8.index:<EOL><INDENT>methods.append(DIPPR_PERRY_8E)<EOL>_, C1, C2, C3, C4, C5, self.Perrys2_8_Tmin, self.Perrys2_8_Tmax = _Perrys2_8_values[Perrys2_8.index.get_loc(self.CASRN)].tolist()<EOL>self.Perrys2_8_coeffs = [C1, C2, C3, C4, C5]<EOL>Tmins.append(self.Perrys2_8_Tmin); Tmaxs.append(self.Perrys2_8_Tmax)<EOL><DEDENT>if has_CoolProp and self.CASRN in coolprop_dict:<EOL><INDENT>methods.append(COOLPROP)<EOL>self.CP_f = coolprop_fluids[self.CASRN]<EOL>Tmins.append(self.CP_f.Tmin); Tmaxs.append(self.CP_f.Tc)<EOL><DEDENT>if self.CASRN in _VDISaturationDict:<EOL><INDENT>methods.append(VDI_TABULAR)<EOL>Ts, props = VDI_tabular_data(self.CASRN, '<STR_LIT:P>')<EOL>self.VDI_Tmin = Ts[<NUM_LIT:0>]<EOL>self.VDI_Tmax = Ts[-<NUM_LIT:1>]<EOL>self.tabular_data[VDI_TABULAR] = (Ts, props)<EOL>Tmins.append(self.VDI_Tmin); Tmaxs.append(self.VDI_Tmax)<EOL><DEDENT>if self.CASRN in VDI_PPDS_3.index:<EOL><INDENT>_,  Tm, Tc, Pc, A, B, C, D = _VDI_PPDS_3_values[VDI_PPDS_3.index.get_loc(self.CASRN)].tolist()<EOL>self.VDI_PPDS_coeffs = [A, B, C, D]<EOL>self.VDI_PPDS_Tc = Tc<EOL>self.VDI_PPDS_Tm = Tm<EOL>self.VDI_PPDS_Pc = Pc<EOL>methods.append(VDI_PPDS)<EOL>Tmins.append(self.VDI_PPDS_Tm); Tmaxs.append(self.VDI_PPDS_Tc)<EOL><DEDENT>if all((self.Tb, self.Tc, self.Pc)):<EOL><INDENT>methods.append(BOILING_CRITICAL)<EOL>Tmins.append(<NUM_LIT>); Tmaxs.append(self.Tc)<EOL><DEDENT>if all((self.Tc, self.Pc, self.omega)):<EOL><INDENT>methods.append(LEE_KESLER_PSAT)<EOL>methods.append(AMBROSE_WALTON)<EOL>methods.append(SANJARI)<EOL>methods.append(EDALAT)<EOL>if self.eos:<EOL><INDENT>methods.append(EOS)<EOL><DEDENT>Tmins.append(<NUM_LIT>); Tmaxs.append(self.Tc)<EOL><DEDENT>self.all_methods = set(methods)<EOL>if Tmins and Tmaxs:<EOL><INDENT>self.Tmin = min(Tmins)<EOL>self.Tmax = max(Tmaxs)<EOL><DEDENT>

r'''Method which picks out coefficients for the specified chemical
        from the various dictionaries and DataFrames storing it. All data is
        stored as attributes. This method also sets :obj:`Tmin`, :obj:`Tmax`,
        and :obj:`all_methods` as a set of methods for which the data exists for.

        Called on initialization only. See the source code for the variables at
        which the coefficients are stored. The coefficients can safely be
        altered once the class is initialized. This method can be called again
        to reset the parameters.


Tr = T/Tc<EOL>tau = <NUM_LIT:1> - T/Tc<EOL>f0 = (-<NUM_LIT>*tau + <NUM_LIT>*tau**<NUM_LIT> - <NUM_LIT>*tau**<NUM_LIT> - <NUM_LIT>*tau**<NUM_LIT:5>)/Tr<EOL>f1 = (-<NUM_LIT>*tau + <NUM_LIT>*tau**<NUM_LIT> - <NUM_LIT>*tau**<NUM_LIT> - <NUM_LIT>*tau**<NUM_LIT:5>)/Tr<EOL>f2 = (-<NUM_LIT>*tau + <NUM_LIT>*tau**<NUM_LIT> - <NUM_LIT>*tau**<NUM_LIT> + <NUM_LIT>*tau**<NUM_LIT:5>)/Tr<EOL>return Pc*exp(f0 + omega*f1 + omega**<NUM_LIT:2>*f2)<EOL>

r'''Calculates vapor pressure of a fluid at arbitrary temperatures using a
    CSP relationship by [1]_; requires a chemical's critical temperature and
    acentric factor.

    The vapor pressure is given by:

    .. math::
        \ln P_r=f^{(0)}+\omega f^{(1)}+\omega^2f^{(2)}

        f^{(0)}=\frac{-5.97616\tau + 1.29874\tau^{1.5}- 0.60394\tau^{2.5}
        -1.06841\tau^5}{T_r}

        f^{(1)}=\frac{-5.03365\tau + 1.11505\tau^{1.5}- 5.41217\tau^{2.5}
        -7.46628\tau^5}{T_r}

        f^{(2)}=\frac{-0.64771\tau + 2.41539\tau^{1.5}- 4.26979\tau^{2.5}
        +3.25259\tau^5}{T_r}

        \tau = 1-T_{r}

    Parameters
    ----------
    T : float
        Temperature of fluid [K]
    Tc : float
        Critical temperature of fluid [K]
    Pc : float
        Critical pressure of fluid [Pa]
    omega : float
        Acentric factor [-]

    Returns
    -------
    Psat : float
        Vapor pressure at T [Pa]

    Notes
    -----
    Somewhat more accurate than the :obj:`Lee_Kesler` formulation.

    Examples
    --------
    Example from [2]_; ethylbenzene at 347.25 K.

    >>> Ambrose_Walton(347.25, 617.15, 36.09E5, 0.304)
    13278.878504306222

    References
    ----------
    .. [1] Ambrose, D., and J. Walton. "Vapour Pressures up to Their Critical
       Temperatures of Normal Alkanes and 1-Alkanols." Pure and Applied
       Chemistry 61, no. 8 (1989): 1395-1403. doi:10.1351/pac198961081395.
    .. [2] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition.
       New York: McGraw-Hill Professional, 2000.


return <NUM_LIT> - <NUM_LIT>*T + (<NUM_LIT> - <NUM_LIT>*T)*M**-<NUM_LIT:0.5><EOL>

r'''Estimates thermal conductivity of pure liquids as a function of
    temperature using a reference fluid approach. Low accuracy but quick.
    Developed using several organic fluids.

    .. math::
        \lambda = 0.0655-0.0005T + \frac{1.3855-0.00197T}{M^{0.5}}

    Parameters
    ----------
    T : float
        Temperature of the fluid [K]
    M : float
        Molecular weight of the fluid [g/mol]

    Returns
    -------
    kl : float
        Estimated liquid thermal conductivity [W/m/k]

    Notes
    -----
    This equation returns negative numbers at high T sometimes.
    This equation is one of those implemented by DDBST.
    If this results in a negative thermal conductivity, no value is returned.

    Examples
    --------
    >>> Lakshmi_Prasad(273.15, 100)
    0.013664450000000009

    References
    ----------
    .. [1] Lakshmi, D. S., and D. H. L. Prasad. "A Rapid Estimation Method for
       Thermal Conductivity of Pure Liquids." The Chemical Engineering Journal
       48, no. 3 (April 1992): 211-14. doi:10.1016/0300-9467(92)80037-B


def DIPPR9B(T, MW, Cvm, mu, Tc=None, chemtype=None):

Cvm = Cvm*<NUM_LIT>  <EOL>if not chemtype:<EOL><INDENT>chemtype = '<STR_LIT>'<EOL><DEDENT>if chemtype == '<STR_LIT>':<EOL><INDENT>return <NUM_LIT>*mu*Cvm/MW<EOL><DEDENT>elif chemtype == '<STR_LIT>':<EOL><INDENT>Tr = T/Tc<EOL>return mu/MW*(<NUM_LIT>*Cvm + <NUM_LIT> - <NUM_LIT>/Tr)<EOL><DEDENT>elif chemtype == '<STR_LIT>':<EOL><INDENT>return mu/MW*(<NUM_LIT>*Cvm + <NUM_LIT>)<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>

r'''Calculates the thermal conductivity of a gas using one of several
    emperical equations developed in [1]_, [2]_, and presented in [3]_.

    For monoatomic gases:

    .. math::
        k = 2.5 \frac{\eta C_v}{MW}

    For linear molecules:

    .. math::
        k = \frac{\eta}{MW} \left( 1.30 C_v + 14644.00 - \frac{2928.80}{T_r}\right)

    For nonlinear molecules:

    .. math::
        k = \frac{\eta}{MW}(1.15C_v + 16903.36)

    Parameters
    ----------
    T : float
        Temperature of the fluid [K]
    Tc : float
        Critical temperature of the fluid [K]
    MW : float
        Molwcular weight of fluid [g/mol]
    Cvm : float
        Molar heat capacity at constant volume of fluid, [J/mol/K]
    mu : float
        Viscosity of gas, [Pa*S]

    Returns
    -------
    k_g : float
        Thermal conductivity of gas, [W/m/k]

    Notes
    -----
    Tested with DIPPR values.
    Cvm is internally converted to J/kmol/K.

    Examples
    --------
    CO:

    >>> DIPPR9B(200., 28.01, 20.826, 1.277E-5, 132.92, chemtype='linear')
    0.01813208676438415

    References
    ----------
    .. [1] Bromley, LeRoy A., Berkeley. University of California, and U.S.
       Atomic Energy Commission. Thermal Conductivity of Gases at Moderate
       Pressures. UCRL;1852. Berkeley, CA: University of California Radiation
       Laboratory, 1952.
    .. [2] Stiel, Leonard I., and George Thodos. "The Thermal Conductivity of
       Nonpolar Substances in the Dense Gaseous and Liquid Regions." AIChE
       Journal 10, no. 1 (January 1, 1964): 26-30. doi:10.1002/aic.690100114
    .. [3] Danner, Ronald P, and Design Institute for Physical Property Data.
       Manual for Predicting Chemical Process Design Data. New York, N.Y, 1982.


MW = MW/<NUM_LIT><EOL>return (<NUM_LIT:1.> + <NUM_LIT:9>/<NUM_LIT>/(Cvm/R))*mu*Cvm/MW<EOL>

r'''Estimates the thermal conductivity of a gas as a function of
    temperature using the CSP method of Eucken [1]_.

    .. math::
        \frac{\lambda M}{\eta C_v} = 1 + \frac{9/4}{C_v/R}

    Parameters
    ----------
    MW : float
        Molecular weight of the gas [g/mol]
    Cvm : float
        Molar contant volume heat capacity of the gas [J/mol/K]
    mu : float
        Gas viscosity [Pa*S]

    Returns
    -------
    kg : float
        Estimated gas thermal conductivity [W/m/k]

    Notes
    -----
    Temperature dependence is introduced via heat capacity and viscosity.
    A theoretical equation. No original author located.
    MW internally converted to kg/g-mol.

    Examples
    --------
    2-methylbutane at low pressure, 373.15 K. Mathes calculation in [1]_.

    >>> Eucken(MW=72.151, Cvm=135.9, mu=8.77E-6)
    0.018792644287722975

    References
    ----------
    .. [1] Reid, Robert C.; Prausnitz, John M.; Poling, Bruce E.
       Properties of Gases and Liquids. McGraw-Hill Companies, 1987.


methods = []        <EOL>methods.append(SIMPLE)<EOL>if none_and_length_check((self.Tbs, self.MWs)):<EOL><INDENT>methods.append(LINDSAY_BROMLEY)<EOL><DEDENT>self.all_methods = set(methods)<EOL>Tmins = [i.Tmin for i in self.ThermalConductivityGases if i.Tmin]<EOL>Tmaxs = [i.Tmax for i in self.ThermalConductivityGases if i.Tmax]<EOL>if Tmins:<EOL><INDENT>self.Tmin = max(Tmins)<EOL><DEDENT>if Tmaxs:<EOL><INDENT>self.Tmax = max(Tmaxs)<EOL><DEDENT>

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 calculate the property.

        Called on initialization only. See the source code for the variables at
        which the coefficients are stored. The coefficients can safely be
        altered once the class is initialized. This method can be called again
        to reset the parameters.


def eli_hanley(T, MW, Tc, Vc, Zc, omega, Cvm):

Cs = [<NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <EOL><NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>]<EOL>Tr = T/Tc<EOL>if Tr > <NUM_LIT:2>: Tr = <NUM_LIT:2><EOL>theta = <NUM_LIT:1> + (omega - <NUM_LIT>)*(<NUM_LIT> - <NUM_LIT>*log(Tr) - <NUM_LIT>/Tr)<EOL>psi = (<NUM_LIT:1> + (omega-<NUM_LIT>)*(<NUM_LIT> - <NUM_LIT>*log(Tr)))*<NUM_LIT>/Zc<EOL>f = Tc/<NUM_LIT>*theta<EOL>h = Vc/<NUM_LIT>*psi<EOL>T0 = T/f<EOL>eta0 = <NUM_LIT>*sum([Ci*T0**((i+<NUM_LIT:1.> - <NUM_LIT>)/<NUM_LIT>) for i, Ci in enumerate(Cs)])<EOL>k0 = <NUM_LIT>*eta0<EOL>H = (<NUM_LIT>/MW)**<NUM_LIT:0.5>*f**<NUM_LIT:0.5>*h**(-<NUM_LIT:2>/<NUM_LIT>)<EOL>etas = eta0*H*MW/<NUM_LIT><EOL>ks = k0*H<EOL>return ks + etas/(MW/<NUM_LIT>)*<NUM_LIT>*(Cvm - <NUM_LIT>*R)<EOL>

r'''Estimates the thermal conductivity of a gas as a function of
    temperature using the reference fluid method of Eli and Hanley [1]_ as
    shown in [2]_.

    .. math::
        \lambda = \lambda^* + \frac{\eta^*}{MW}(1.32)\left(C_v - \frac{3R}{2}\right)

        Tr = \text{min}(Tr, 2)

        \theta = 1 + (\omega-0.011)\left(0.56553 - 0.86276\ln Tr - \frac{0.69852}{Tr}\right)

        \psi = [1 + (\omega - 0.011)(0.38560 - 1.1617\ln Tr)]\frac{0.288}{Z_c}

        f = \frac{T_c}{190.4}\theta

        h = \frac{V_c}{9.92E-5}\psi

        T_0 = T/f

        \eta_0^*(T_0)= \sum_{n=1}^9 C_n T_0^{(n-4)/3}

        \theta_0 = 1944 \eta_0

        \lambda^* = \lambda_0 H

        \eta^* = \eta^*_0 H \frac{MW}{16.04}

        H = \left(\frac{16.04}{MW}\right)^{0.5}f^{0.5}/h^{2/3}

    Parameters
    ----------
    T : float
        Temperature of the gas [K]
    MW : float
        Molecular weight of the gas [g/mol]
    Tc : float
        Critical temperature of the gas [K]
    Vc : float
        Critical volume of the gas [m^3/mol]
    Zc : float
        Critical compressibility of the gas []
    omega : float
        Acentric factor of the gas [-]
    Cvm : float
        Molar contant volume heat capacity of the gas [J/mol/K]

    Returns
    -------
    kg : float
        Estimated gas thermal conductivity [W/m/k]

    Notes
    -----
    Reference fluid is Methane.
    MW internally converted to kg/g-mol.

    Examples
    --------
    2-methylbutane at low pressure, 373.15 K. Mathes calculation in [2]_.

    >>> eli_hanley(T=373.15, MW=72.151, Tc=460.4, Vc=3.06E-4, Zc=0.267,
    ... omega=0.227, Cvm=135.9)
    0.02247951789135337

    References
    ----------
    .. [1] Ely, James F., and H. J. M. Hanley. "Prediction of Transport
       Properties. 2. Thermal Conductivity of Pure Fluids and Mixtures."
       Industrial & Engineering Chemistry Fundamentals 22, no. 1 (February 1,
       1983): 90-97. doi:10.1021/i100009a016.
    .. [2] Reid, Robert C.; Prausnitz, John M.; Poling, Bruce E.
       Properties of Gases and Liquids. McGraw-Hill Companies, 1987.


def Mersmann_Kind_thermal_conductivity_liquid(T, MW, Tc, Vc, atoms):

na = sum(atoms.values())<EOL>lambda_star = <NUM_LIT:2>/<NUM_LIT>*(na + <NUM_LIT>*(<NUM_LIT:1.> - T/Tc)**<NUM_LIT:0.5>)<EOL>Vc = Vc*<NUM_LIT:1000> <EOL>N_A2 = N_A*<NUM_LIT:1000> <EOL>kl = lambda_star*(k*Tc)**<NUM_LIT>*N_A2**(<NUM_LIT:7>/<NUM_LIT>)*Vc**(-<NUM_LIT:2>/<NUM_LIT>)/Tc*MW**-<NUM_LIT:0.5><EOL>return kl<EOL>

r'''Estimates the thermal conductivity of organic liquid substances
    according to the method of [1]_.

    .. math::
        \lambda^* = \frac{\lambda\cdot V_c^{2/3}\cdot T_c\cdot \text{MW}^{0.5}}
        {(k\cdot T_c)^{1.5}\cdot N_A^{7/6}}

        \lambda^* = \frac{2}{3}\left(n_a + 40\sqrt{1-T_r}\right)

    Parameters
    ----------
    T : float
        Temperature of the fluid [K]
    M : float
        Molecular weight of the fluid [g/mol]
    Tc : float
        Critical temperature of the fluid [K]
    Vc : float
        Critical volume of the fluid [m^3/mol]
    atoms : dict
        Dictionary of atoms and their counts, [-]

    Returns
    -------
    kl : float
        Estimated liquid thermal conductivity [W/m/k]

    Notes
    -----
    In the equation, all quantities must be in SI units but N_A is in a kmol
    basis and Vc is in units of (m^3/kmol); this is converted internally.

    Examples
    --------
    Dodecane at 400 K:

    >>> Mersmann_Kind_thermal_conductivity_liquid(400, 170.33484, 658.0,
    ... 0.000754, {'C': 12, 'H': 26})
    0.08952713798442789

    References
    ----------
    .. [1] Mersmann, Alfons, and Matthias Kind. "Prediction of Mechanical and
       Thermal Properties of Pure Liquids, of Critical Data, and of Vapor
       Pressure." Industrial & Engineering Chemistry Research, January 31,
       2017. https://doi.org/10.1021/acs.iecr.6b04323.


def eli_hanley_dense(T, MW, Tc, Vc, Zc, omega, Cvm, Vm):

Cs = [<NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>,<EOL><NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>,<EOL><NUM_LIT>]<EOL>Tr = T/Tc<EOL>if Tr > <NUM_LIT:2>:<EOL><INDENT>Tr = <NUM_LIT:2><EOL><DEDENT>Vr = Vm/Vc<EOL>if Vr > <NUM_LIT:2>:<EOL><INDENT>Vr = <NUM_LIT:2><EOL><DEDENT>theta = <NUM_LIT:1> + (omega - <NUM_LIT>)*(<NUM_LIT> - <NUM_LIT>*log(Tr) + (<NUM_LIT> - <NUM_LIT>/Tr)*(Vr-<NUM_LIT:0.5>))<EOL>psi = (<NUM_LIT:1> + (omega-<NUM_LIT>)*(<NUM_LIT>*(Vr-<NUM_LIT>) - <NUM_LIT>*(Vr-<NUM_LIT>)*log(Tr)))*<NUM_LIT>/Zc<EOL>f = Tc/<NUM_LIT>*theta<EOL>h = Vc/<NUM_LIT>*psi<EOL>T0 = T/f<EOL>rho0 = <NUM_LIT>/(Vm*<NUM_LIT>)*h  <EOL>eta0 = <NUM_LIT>*sum([Cs[i]*T0**((i+<NUM_LIT:1>-<NUM_LIT:4>)/<NUM_LIT>) for i in range(len(Cs))])<EOL>k1 = <NUM_LIT>*eta0<EOL>b1 = -<NUM_LIT><EOL>b2 = <NUM_LIT><EOL>b3 = <NUM_LIT><EOL>b4 = <NUM_LIT><EOL>k2 = (b1 + b2*(b3 - log(T0/b4))**<NUM_LIT:2>)/<NUM_LIT>*rho0<EOL>a1 = -<NUM_LIT><EOL>a2 = <NUM_LIT><EOL>a3 = <NUM_LIT><EOL>a4 = -<NUM_LIT><EOL>a5 = <NUM_LIT><EOL>a6 = <NUM_LIT><EOL>a7 = -<NUM_LIT><EOL>k3 = exp(a1 + a2/T0)*(exp((a3 + a4/T0**<NUM_LIT>)*rho0**<NUM_LIT:0.1> + (rho0/<NUM_LIT> - <NUM_LIT:1>)*rho0**<NUM_LIT:0.5>*(a5 + a6/T0 + a7/T0**<NUM_LIT:2>)) - <NUM_LIT:1>)/<NUM_LIT><EOL>if T/Tc > <NUM_LIT:2>:<EOL><INDENT>dtheta = <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>dtheta = (omega - <NUM_LIT>)*(-<NUM_LIT>/T + (Vr-<NUM_LIT:0.5>)*<NUM_LIT>*Tc/T**<NUM_LIT:2>)<EOL><DEDENT>dfdT = Tc/<NUM_LIT>*dtheta<EOL>X = ((<NUM_LIT:1> - T/f*dfdT)*<NUM_LIT>/Zc)**<NUM_LIT><EOL>H = (<NUM_LIT>/MW)**<NUM_LIT:0.5>*f**<NUM_LIT:0.5>/h**(<NUM_LIT:2>/<NUM_LIT>)<EOL>ks = (k1*X + k2 + k3)*H<EOL>theta = <NUM_LIT:1> + (omega - <NUM_LIT>)*(<NUM_LIT> - <NUM_LIT>*log(Tr) - <NUM_LIT>/Tr)<EOL>psi = (<NUM_LIT:1> + (omega-<NUM_LIT>)*(<NUM_LIT> - <NUM_LIT>*log(Tr)))*<NUM_LIT>/Zc<EOL>f = Tc/<NUM_LIT>*theta<EOL>h = Vc/<NUM_LIT>*psi<EOL>T0 = T/f<EOL>eta0 = <NUM_LIT>*sum([Cs[i]*T0**((i+<NUM_LIT:1>-<NUM_LIT:4>)/<NUM_LIT>) for i in range(len(Cs))])<EOL>H = (<NUM_LIT>/MW)**<NUM_LIT:0.5>*f**<NUM_LIT:0.5>/h**(<NUM_LIT:2>/<NUM_LIT>)<EOL>etas = eta0*H*MW/<NUM_LIT><EOL>k = ks + etas/(MW/<NUM_LIT>)*<NUM_LIT>*(Cvm-<NUM_LIT:3>*R/<NUM_LIT>)<EOL>return k<EOL>

r'''Estimates the thermal conductivity of a gas at high pressure as a
    function of temperature using the reference fluid method of Eli and
    Hanley [1]_ as shown in [2]_.

    .. math::
        Tr = min(Tr, 2)

        Vr = min(Vr, 2)

        f = \frac{T_c}{190.4}\theta

        h = \frac{V_c}{9.92E-5}\psi

        T_0 = T/f

        \rho_0 = \frac{16.04}{V}h

        \theta = 1 + (\omega-0.011)\left(0.09057 - 0.86276\ln Tr + \left(
        0.31664 - \frac{0.46568}{Tr}\right) (V_r - 0.5)\right)

        \psi = [1 + (\omega - 0.011)(0.39490(V_r - 1.02355) - 0.93281(V_r -
        0.75464)\ln T_r]\frac{0.288}{Z_c}

        \lambda_1 = 1944 \eta_0

        \lambda_2 = \left\{b_1 + b_2\left[b_3 - \ln \left(\frac{T_0}{b_4}
        \right)\right]^2\right\}\rho_0

        \lambda_3 = \exp\left(a_1 + \frac{a_2}{T_0}\right)\left\{\exp[(a_3 +
        \frac{a_4}{T_0^{1.5}})\rho_0^{0.1} + (\frac{\rho_0}{0.1617} - 1)
        \rho_0^{0.5}(a_5 + \frac{a_6}{T_0} + \frac{a_7}{T_0^2})] - 1\right\}

        \lambda^{**} = [\lambda_1 + \lambda_2 + \lambda_3]H

        H = \left(\frac{16.04}{MW}\right)^{0.5}f^{0.5}/h^{2/3}

        X = \left\{\left[1 - \frac{T}{f}\left(\frac{df}{dT}\right)_v \right]
        \frac{0.288}{Z_c}\right\}^{1.5}

        \left(\frac{df}{dT}\right)_v = \frac{T_c}{190.4}\left(\frac{d\theta}
        {d T}\right)_v

        \left(\frac{d\theta}{d T}\right)_v = (\omega-0.011)\left[
        \frac{-0.86276}{T} + (V_r-0.5)\frac{0.46568T_c}{T^2}\right]

    Parameters
    ----------
    T : float
        Temperature of the gas [K]
    MW : float
        Molecular weight of the gas [g/mol]
    Tc : float
        Critical temperature of the gas [K]
    Vc : float
        Critical volume of the gas [m^3/mol]
    Zc : float
        Critical compressibility of the gas []
    omega : float
        Acentric factor of the gas [-]
    Cvm : float
        Molar contant volume heat capacity of the gas [J/mol/K]
    Vm : float
        Volume of the gas at T and P [m^3/mol]

    Returns
    -------
    kg : float
        Estimated dense gas thermal conductivity [W/m/k]

    Notes
    -----
    Reference fluid is Methane.
    MW internally converted to kg/g-mol.

    Examples
    --------
    >>> eli_hanley_dense(T=473., MW=42.081, Tc=364.9, Vc=1.81E-4, Zc=0.274,
    ... omega=0.144, Cvm=82.70, Vm=1.721E-4)
    0.06038475936515042

    References
    ----------
    .. [1] Ely, James F., and H. J. M. Hanley. "Prediction of Transport
       Properties. 2. Thermal Conductivity of Pure Fluids and Mixtures."
       Industrial & Engineering Chemistry Fundamentals 22, no. 1 (February 1,
       1983): 90-97. doi:10.1021/i100009a016.
    .. [2] Reid, Robert C.; Prausnitz, John M.; Poling, Bruce E.
       Properties of Gases and Liquids. McGraw-Hill Companies, 1987.


def calculate(self, T, P, zs, ws, method):

if method == SIMPLE:<EOL><INDENT>ks = [i(T, P) for i in self.ThermalConductivityLiquids]<EOL>return mixing_simple(zs, ks)<EOL><DEDENT>elif method == DIPPR_9H:<EOL><INDENT>ks = [i(T, P) for i in self.ThermalConductivityLiquids]<EOL>return DIPPR9H(ws, ks)<EOL><DEDENT>elif method == FILIPPOV:<EOL><INDENT>ks = [i(T, P) for i in self.ThermalConductivityLiquids]<EOL>return Filippov(ws, ks)<EOL><DEDENT>elif method == MAGOMEDOV:<EOL><INDENT>k_w = self.ThermalConductivityLiquids[self.index_w](T, P)<EOL>ws = list(ws) ; ws.pop(self.index_w)<EOL>return thermal_conductivity_Magomedov(T, P, ws, self.wCASs, k_w)<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>

r'''Method to calculate thermal conductivity of a liquid mixture at
        temperature `T`, pressure `P`, mole fractions `zs` and weight fractions
        `ws` with a given method.

        This method has no exception handling; see `mixture_property`
        for that.

        Parameters
        ----------
        T : float
            Temperature at which to calculate the property, [K]
        P : float
            Pressure at which to calculate the property, [Pa]
        zs : list[float]
            Mole fractions of all species in the mixture, [-]
        ws : list[float]
            Weight fractions of all species in the mixture, [-]
        method : str
            Name of the method to use

        Returns
        -------
        k : float
            Thermal conductivity of the liquid mixture, [W/m/K]


return <NUM_LIT>*(<NUM_LIT:1> - <NUM_LIT>*(T - Tm))/(Tm**<NUM_LIT>*M**<NUM_LIT>)<EOL>

r'''Calculate the thermal conductivity of a liquid as a function of
    temperature using the Sheffy-Johnson (1961) method. Requires
    Temperature, molecular weight, and melting point.

    .. math::
        k = 1.951 \frac{1-0.00126(T-T_m)}{T_m^{0.216}MW^{0.3}}

    Parameters
    ----------
    T : float
        Temperature of the fluid [K]
    M : float
        Molecular weight of the fluid [g/mol]
    Tm : float
        Melting point of the fluid [K]

    Returns
    -------
    kl : float
        Thermal conductivity of the fluid, W/m/k

    Notes
    -----
    The origin of this equation has been challenging to trace. It is
    presently unknown, and untested.

    Examples
    --------
    >>> Sheffy_Johnson(300, 47, 280)
    0.17740150413112196

    References
    ----------
    .. [1] Scheffy, W. J., and E. F. Johnson. "Thermal Conductivities of
       Liquids at High Temperatures." Journal of Chemical & Engineering Data
       6, no. 2 (April 1, 1961): 245-49. doi:10.1021/je60010a019


def Nicola_original(T, M, Tc, omega, Hfus):

Tr = T/Tc<EOL>Hfus = Hfus*<NUM_LIT:1000><EOL>return -<NUM_LIT> - <NUM_LIT>*Tr + <NUM_LIT>*Hfus + <NUM_LIT>*omega + (<NUM_LIT:1.>/M)**<NUM_LIT><EOL>

r'''Estimates the thermal conductivity of a liquid as a function of
    temperature using the CSP method of Nicola [1]_. A  simpler but long
    method claiming high-accuracy and using only statistically significant
    variable following analalysis.

    Requires temperature, molecular weight, critical temperature, acentric
    factor and the heat of vaporization.

    .. math::
        \frac{\lambda}{1 \text{Wm/K}}=-0.5694-0.1436T_r+5.4893\times10^{-10}
        \frac{\Delta_{fus}H}{\text{kmol/J}}+0.0508\omega +
        \left(\frac{1 \text{kg/kmol}}{MW}\right)^{0.0622}

    Parameters
    ----------
    T : float
        Temperature of the fluid [K]
    M : float
        Molecular weight of the fluid [g/mol]
    Tc : float
        Critical temperature of the fluid [K]
    omega : float
        Acentric factor of the fluid [-]
    Hfus : float
        Heat of fusion of the fluid [J/mol]

    Returns
    -------
    kl : float
        Estimated liquid thermal conductivity [W/m/k]

    Notes
    -----
    A weird statistical correlation. Recent and yet to be reviewed.
    This correlation has been superceded by the author's later work.
    Hfus is internally converted to be in J/kmol.

    Examples
    --------
    >>> Nicola_original(300, 142.3, 611.7, 0.49, 201853)
    0.2305018632230984

    References
    ----------
    .. [1] Nicola, Giovanni Di, Eleonora Ciarrocchi, Mariano Pierantozzi, and
        Roman Stryjek. "A New Equation for the Thermal Conductivity of Organic
        Compounds." Journal of Thermal Analysis and Calorimetry 116, no. 1
        (April 1, 2014): 135-40. doi:10.1007/s10973-013-3422-7


Tr = T/Tc<EOL>Pr = P/Pc<EOL>return kl*(<NUM_LIT> + <NUM_LIT>*Pr*Tr**<NUM_LIT> + <NUM_LIT>*Tr**<NUM_LIT>*(Pr/(<NUM_LIT> + Pr)))<EOL>

r'''Adjustes for pressure the thermal conductivity of a liquid using an
    emperical formula based on [1]_, but as given in [2]_.

    .. math::
        k = k^* \left[ 0.98 + 0.0079 P_r T_r^{1.4} + 0.63 T_r^{1.2}
        \left( \frac{P_r}{30 + P_r}\right)\right]

    Parameters
    ----------
    T : float
        Temperature of fluid [K]
    P : float
        Pressure of fluid [Pa]
    Tc: float
        Critical point of fluid [K]
    Pc : float
        Critical pressure of the fluid [Pa]
    kl : float
        Thermal conductivity of liquid at 1 atm or saturation, [W/m/K]

    Returns
    -------
    kl_dense : float
        Thermal conductivity of liquid at P, [W/m/K]

    Notes
    -----
    This equation is entrely dimensionless; all dimensions cancel.
    The original source has not been reviewed.

    This is DIPPR Procedure 9G: Method for the Thermal Conductivity of Pure
    Nonhydrocarbon Liquids at High Pressures

    Examples
    --------
    From [2]_, for butyl acetate.

    >>> DIPPR9G(515.05, 3.92E7, 579.15, 3.212E6, 7.085E-2)
    0.0864419738671184

    References
    ----------
    .. [1] Missenard, F. A., Thermal Conductivity of Organic Liquids of a
       Series or a Group of Liquids , Rev. Gen.Thermodyn., 101 649 (1970).
    .. [2] Danner, Ronald P, and Design Institute for Physical Property Data.
       Manual for Predicting Chemical Process Design Data. New York, N.Y, 1982.


if method == SIMPLE:<EOL><INDENT>ks = [i(T, P) for i in self.ThermalConductivityGases]<EOL>return mixing_simple(zs, ks)<EOL><DEDENT>elif method == LINDSAY_BROMLEY:<EOL><INDENT>ks = [i(T, P) for i in self.ThermalConductivityGases]<EOL>mus = [i(T, P) for i in self.ViscosityGases]<EOL>return Lindsay_Bromley(T=T, ys=zs, ks=ks, mus=mus, Tbs=self.Tbs, MWs=self.MWs)<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>

r'''Method to calculate thermal conductivity 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
            Temperature at which to calculate the property, [K]
        P : float
            Pressure at which to calculate the property, [Pa]
        zs : list[float]
            Mole fractions of all species in the mixture, [-]
        ws : list[float]
            Weight fractions of all species in the mixture, [-]
        method : str
            Name of the method to use

        Returns
        -------
        kg : float
            Thermal conductivity of gas mixture, [W/m/K]


methods, methods_P = [], []<EOL>Tmins, Tmaxs = [], []<EOL>if self.CASRN in _VDISaturationDict:<EOL><INDENT>methods.append(VDI_TABULAR)<EOL>Ts, props = VDI_tabular_data(self.CASRN, '<STR_LIT>')<EOL>self.VDI_Tmin = Ts[<NUM_LIT:0>]<EOL>self.VDI_Tmax = Ts[-<NUM_LIT:1>]<EOL>self.tabular_data[VDI_TABULAR] = (Ts, props)<EOL>Tmins.append(self.VDI_Tmin); Tmaxs.append(self.VDI_Tmax)<EOL><DEDENT>if has_CoolProp and self.CASRN in coolprop_dict:<EOL><INDENT>methods.append(COOLPROP); methods_P.append(COOLPROP)<EOL>self.CP_f = coolprop_fluids[self.CASRN]<EOL>Tmins.append(self.CP_f.Tmin); Tmaxs.append(self.CP_f.Tc)<EOL><DEDENT>if self.CASRN in Perrys2_314.index:<EOL><INDENT>methods.append(DIPPR_PERRY_8E)<EOL>_, C1, C2, C3, C4, self.Perrys2_314_Tmin, self.Perrys2_314_Tmax = _Perrys2_314_values[Perrys2_314.index.get_loc(self.CASRN)].tolist()<EOL>self.Perrys2_314_coeffs = [C1, C2, C3, C4]<EOL>Tmins.append(self.Perrys2_314_Tmin); Tmaxs.append(self.Perrys2_314_Tmax)<EOL><DEDENT>if self.CASRN in VDI_PPDS_10.index:<EOL><INDENT>_,  A, B, C, D, E = _VDI_PPDS_10_values[VDI_PPDS_10.index.get_loc(self.CASRN)].tolist()<EOL>self.VDI_PPDS_coeffs = [A, B, C, D, E]<EOL>self.VDI_PPDS_coeffs.reverse()<EOL>methods.append(VDI_PPDS)<EOL><DEDENT>if all((self.MW, self.Tb, self.Pc, self.omega)):<EOL><INDENT>methods.append(GHARAGHEIZI_G)<EOL>Tmaxs.append(<NUM_LIT>)<EOL><DEDENT>if all((self.Cvgm, self.mug, self.MW, self.Tc)):<EOL><INDENT>methods.append(DIPPR_9B)<EOL>Tmins.append(<NUM_LIT>); Tmaxs.append(<NUM_LIT>)  <EOL><DEDENT>if all((self.Cvgm, self.mug, self.MW, self.Tc, self.omega)):<EOL><INDENT>methods.append(CHUNG)<EOL>Tmins.append(<NUM_LIT>); Tmaxs.append(<NUM_LIT>)  <EOL><DEDENT>if all((self.Cvgm, self.MW, self.Tc, self.Vc, self.Zc, self.omega)):<EOL><INDENT>methods.append(ELI_HANLEY)<EOL>Tmaxs.append(<NUM_LIT>)  <EOL><DEDENT>if all((self.Cvgm, self.mug, self.MW)):<EOL><INDENT>methods.append(EUCKEN_MOD)<EOL>methods.append(EUCKEN)<EOL>Tmins.append(<NUM_LIT>); Tmaxs.append(<NUM_LIT>)  <EOL><DEDENT>if self.MW:<EOL><INDENT>methods.append(BAHADORI_G)<EOL><DEDENT>if all([self.MW, self.Tc, self.Vc, self.Zc, self.omega]):<EOL><INDENT>methods_P.append(ELI_HANLEY_DENSE)<EOL><DEDENT>if all([self.MW, self.Tc, self.Vc, self.omega, self.dipole]):<EOL><INDENT>methods_P.append(CHUNG_DENSE)<EOL><DEDENT>if all([self.MW, self.Tc, self.Pc, self.Vc, self.Zc]):<EOL><INDENT>methods_P.append(STIEL_THODOS_DENSE)<EOL><DEDENT>self.all_methods = set(methods)<EOL>self.all_methods_P = set(methods_P)<EOL>if Tmins and Tmaxs:<EOL><INDENT>self.Tmin, self.Tmax = min(Tmins), max(Tmaxs)<EOL><DEDENT>

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 exists for.

        Called on initialization only. See the source code for the variables at
        which the coefficients are stored. The coefficients can safely be
        altered once the class is initialized. This method can be called again
        to reset the parameters.


if not none_and_length_check([ks, ws]):  <EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>return sum(ws[i]/ks[i]**<NUM_LIT:2> for i in range(len(ws)))**(-<NUM_LIT:0.5>)<EOL>

r'''Calculates thermal conductivity of a liquid mixture according to
    mixing rules in [1]_ and also in [2]_.

    .. math::
        \lambda_m = \left( \sum_i w_i \lambda_i^{-2}\right)^{-1/2}

    Parameters
    ----------
    ws : float
        Mass fractions of components
    ks : float
        Liquid thermal conductivites of all components, [W/m/K]

    Returns
    -------
    kl : float
        Thermal conductivity of liquid mixture, [W/m/K]

    Notes
    -----
    This equation is entirely dimensionless; all dimensions cancel.
    The example is from [2]_; all results agree.
    The original source has not been reviewed.

    DIPPR Procedure 9H: Method for the Thermal Conductivity of Nonaqueous Liquid Mixtures

    Average deviations of 3%. for 118 nonaqueous systems with 817 data points.
    Max deviation 20%. According to DIPPR.

    Examples
    --------
    >>> DIPPR9H([0.258, 0.742], [0.1692, 0.1528])
    0.15657104706719646

    References
    ----------
    .. [1] Reid, Robert C.; Prausnitz, John M.; Poling, Bruce E. The
       Properties of Gases and Liquids. McGraw-Hill Companies, 1987.
    .. [2] Danner, Ronald P, and Design Institute for Physical Property Data.
       Manual for Predicting Chemical Process Design Data. New York, N.Y, 1982.


Hc = Hc/<NUM_LIT><EOL>LFL = -<NUM_LIT>/Hc + <NUM_LIT>*Hc + <NUM_LIT>*Hc*Hc + <NUM_LIT><EOL>return LFL/<NUM_LIT><EOL>

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
    ----------
    Hc : float
        Heat of combustion of gas [J/mol]

    Returns
    -------
    LFL : float
        Lower flammability limit, mole fraction [-]

    Notes
    -----
    Fit performed with 112 compounds, r^2 was 0.977.
    LFL in percent volume in air. Hc is at standard conditions, in MJ/mol.
    11 compounds left out as they were outliers.
    Equation does not apply for molecules with halogen atoms, only hydrocarbons
    with oxygen or nitrogen or sulfur.
    No sample calculation provided with the article. However, the equation is
    straightforward.

    Limits of equations's validity are -6135596 J where it predicts a
    LFL of 0, and -48322129 J where it predicts a LFL of 1.

    Examples
    --------
    Pentane, 1.5 % LFL in literature

    >>> Suzuki_LFL(-3536600)
    0.014276107095811815

    References
    ----------
    .. [1] Suzuki, Takahiro. "Note: Empirical Relationship between Lower
       Flammability Limits and Standard Enthalpies of Combustion of Organic
       Compounds." Fire and Materials 18, no. 5 (September 1, 1994): 333-36.
       doi:10.1002/fam.810180509.


def Carcinogen(CASRN, AvailableMethods=False, Method=None):

methods = [COMBINED, IARC, NTP]<EOL>if AvailableMethods:<EOL><INDENT>return methods<EOL><DEDENT>if not Method:<EOL><INDENT>Method = methods[<NUM_LIT:0>]<EOL><DEDENT>if Method == IARC:<EOL><INDENT>if CASRN in IARC_data.index:<EOL><INDENT>status = IARC_codes[IARC_data.at[CASRN, '<STR_LIT>']]<EOL><DEDENT>else:<EOL><INDENT>status = UNLISTED<EOL><DEDENT><DEDENT>elif Method == NTP:<EOL><INDENT>if CASRN in NTP_data.index:<EOL><INDENT>status = NTP_codes[NTP_data.at[CASRN, '<STR_LIT>']]<EOL><DEDENT>else:<EOL><INDENT>status = UNLISTED<EOL><DEDENT><DEDENT>elif Method == COMBINED:<EOL><INDENT>status = {}<EOL>for method in methods[<NUM_LIT:1>:]:<EOL><INDENT>status[method] = Carcinogen(CASRN, Method=method)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>return status<EOL>

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
    ----------
    CASRN : string
        CASRN [-]

    Returns
    -------
    status : str or dict
        Carcinogen status information [-]
    methods : list, only returned if AvailableMethods == True
        List of methods which can be used to obtain carcinogen status with the
        given inputs

    Other Parameters
    ----------------
    Method : string, optional
        A string for the method name to use, as defined by constants in
        Carcinogen_methods
    AvailableMethods : bool, optional
        If True, function will determine which methods can be used to obtain
        if a chemical is listed as carcinogenic, and will return methods
        instead of the status

    Notes
    -----
    Supported methods are:

        * **IARC**: International Agency for Research on Cancer, [1]_. As
          extracted with a last update of  February 22, 2016. Has listing
          information of 843 chemicals with CAS numbers. Chemicals without
          CAS numbers not included here. If two listings for the same CAS
          were available, that closest to the CAS number was used. If two
          listings were available published at different times, the latest
          value was used. All else equal, the most pessimistic value was used.
        * **NTP**: National Toxicology Program, [2]_. Has data on 226
          chemicals.

    Examples
    --------
    >>> Carcinogen('61-82-5')
    {'National Toxicology Program 13th Report on Carcinogens': 'Reasonably Anticipated', 'International Agency for Research on Cancer': 'Not classifiable as to its carcinogenicity to humans (3)'}

    References
    ----------
    .. [1] International Agency for Research on Cancer. Agents Classified by
       the IARC Monographs, Volumes 1-115. Lyon, France: IARC; 2016 Available
       from: http://monographs.iarc.fr/ENG/Classification/
    .. [2] NTP (National Toxicology Program). 2014. Report on Carcinogens,
       Thirteenth Edition. Research Triangle Park, NC: U.S. Department of
       Health and Human Services, Public Health Service.
       http://ntp.niehs.nih.gov/pubhealth/roc/roc13/


def Ceiling(CASRN, AvailableMethods=False, Method=None):

def list_methods():<EOL><INDENT>methods = []<EOL>if CASRN in _OntarioExposureLimits and (_OntarioExposureLimits[CASRN]["<STR_LIT>"] or _OntarioExposureLimits[CASRN]["<STR_LIT>"]):<EOL><INDENT>methods.append(ONTARIO)<EOL><DEDENT>methods.append(NONE)<EOL>return methods<EOL><DEDENT>if AvailableMethods:<EOL><INDENT>return list_methods()<EOL><DEDENT>if not Method:<EOL><INDENT>Method = list_methods()[<NUM_LIT:0>]<EOL><DEDENT>if Method == ONTARIO:<EOL><INDENT>if _OntarioExposureLimits[CASRN]["<STR_LIT>"]:<EOL><INDENT>_Ceiling = (_OntarioExposureLimits[CASRN]["<STR_LIT>"], '<STR_LIT>')<EOL><DEDENT>elif _OntarioExposureLimits[CASRN]["<STR_LIT>"]:<EOL><INDENT>_Ceiling = (_OntarioExposureLimits[CASRN]["<STR_LIT>"], '<STR_LIT>')<EOL><DEDENT><DEDENT>elif Method == NONE:<EOL><INDENT>_Ceiling = None<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>return _Ceiling<EOL>

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-21-7')
    (6e-05, 'mg/m^3')
    >>> Ceiling('7572-29-4', AvailableMethods=True)
    ['Ontario Limits', 'None']


def Tautoignition(CASRN, AvailableMethods=False, Method=None):

def list_methods():<EOL><INDENT>methods = []<EOL>if CASRN in IEC_2010.index and not np.isnan(IEC_2010.at[CASRN, '<STR_LIT>']):<EOL><INDENT>methods.append(IEC)<EOL><DEDENT>if CASRN in NFPA_2008.index and not np.isnan(NFPA_2008.at[CASRN, '<STR_LIT>']):<EOL><INDENT>methods.append(NFPA)<EOL><DEDENT>methods.append(NONE)<EOL>return methods<EOL><DEDENT>if AvailableMethods:<EOL><INDENT>return list_methods()<EOL><DEDENT>if not Method:<EOL><INDENT>Method = list_methods()[<NUM_LIT:0>]<EOL><DEDENT>if Method == IEC:<EOL><INDENT>return float(IEC_2010.at[CASRN, '<STR_LIT>'])<EOL><DEDENT>elif Method == NFPA:<EOL><INDENT>return float(NFPA_2008.at[CASRN, '<STR_LIT>'])<EOL><DEDENT>elif Method == NONE:<EOL><INDENT>return None<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>

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 source is 'IEC 60079-20-1 (2010)' [1]_, with the secondary source
    'NFPA 497 (2008)' [2]_ having very similar data.

    Examples
    --------
    >>> Tautoignition(CASRN='71-43-2')
    771.15

    Parameters
    ----------
    CASRN : string
        CASRN [-]

    Returns
    -------
    Tautoignition : float
        Autoignition point of the chemical, [K]
    methods : list, only returned if AvailableMethods == True
        List of methods which can be used to obtain Tautoignition with the
        given inputs

    Other Parameters
    ----------------
    Method : string, optional
        A string for the method name to use, as defined by constants in
        Tautoignition_methods
    AvailableMethods : bool, optional
        If True, function will determine which methods can be used to obtain
        Tautoignition for the desired chemical, and will return methods
        instead of Tautoignition

    Notes
    -----

    References
    ----------
    .. [1] IEC. “IEC 60079-20-1:2010 Explosive atmospheres - Part 20-1:
       Material characteristics for gas and vapour classification - Test
       methods and data.” https://webstore.iec.ch/publication/635. See also
       https://law.resource.org/pub/in/bis/S05/is.iec.60079.20.1.2010.pdf
    .. [2] National Fire Protection Association. NFPA 497: Recommended
       Practice for the Classification of Flammable Liquids, Gases, or Vapors
       and of Hazardous. NFPA, 2008.


nC, nH, nO = <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0><EOL>if '<STR_LIT:C>' in atoms and atoms['<STR_LIT:C>']:<EOL><INDENT>nC = atoms['<STR_LIT:C>']<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>if '<STR_LIT:H>' in atoms:<EOL><INDENT>nH = atoms['<STR_LIT:H>']<EOL><DEDENT>if '<STR_LIT:O>' in atoms:<EOL><INDENT>nO = atoms['<STR_LIT:O>']<EOL><DEDENT>return <NUM_LIT>/(<NUM_LIT>*nC + <NUM_LIT>*nH - <NUM_LIT>*nO + <NUM_LIT:1.>)<EOL>

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
    ----------
    atoms : dict
        Dictionary of atoms and atom counts

    Returns
    -------
    UFL : float
        Upper flammability limit, mole fraction

    Notes
    -----
    Coefficient of 3.5 taken from [2]_

    Examples
    --------
    Hexane, example from [1]_, lit. 7.5 %

    >>> Crowl_Louvar_UFL({'H': 14, 'C': 6})
    0.07572479446127219

    References
    ----------
    .. [1] Crowl, Daniel A., and Joseph F. Louvar. Chemical Process Safety:
       Fundamentals with Applications. 2E. Upper Saddle River, N.J:
       Prentice Hall, 2001.
    .. [2] Jones, G. W. "Inflammation Limits and Their Practical Application
       in Hazardous Industrial Operations." Chemical Reviews 22, no. 1
       (February 1, 1938): 1-26. doi:10.1021/cr60071a001


def mgm3_to_ppmv(mgm3, MW, T=<NUM_LIT>, P=<NUM_LIT>):

n = mgm3/MW/<NUM_LIT><EOL>parts = n*R*T/P<EOL>ppm = parts/<NUM_LIT><EOL>return ppm<EOL>

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 weight of the trace gas [g/mol]
    T : float, optional
        Temperature of the gas at which the ppmv is reported
    P : float, optional
        Pressure of the gas at which the ppmv is reported

    Returns
    -------
    ppmv : float
        Concentration of a component in a gas mixure [parts per million,
        volumetric]

    Notes
    -----
    The term P/(RT)/1000 converts to 0.040874 at STP. Its inverse is reported
    as 24.45 in [1]_.

    Examples
    --------
    >>> mgm3_to_ppmv(1.635, 40)
    1.0000230371625833

    References
    ----------
    .. [1] ACGIH. Industrial Ventilation: A Manual of Recommended Practice,
       23rd Edition. American Conference of Governmental and Industrial
       Hygenists, 2004.


def TWA(CASRN, AvailableMethods=False, Method=None):

def list_methods():<EOL><INDENT>methods = []<EOL>if CASRN in _OntarioExposureLimits and (_OntarioExposureLimits[CASRN]["<STR_LIT>"] or _OntarioExposureLimits[CASRN]["<STR_LIT>"]):<EOL><INDENT>methods.append(ONTARIO)<EOL><DEDENT>methods.append(NONE)<EOL>return methods<EOL><DEDENT>if AvailableMethods:<EOL><INDENT>return list_methods()<EOL><DEDENT>if not Method:<EOL><INDENT>Method = list_methods()[<NUM_LIT:0>]<EOL><DEDENT>if Method == ONTARIO:<EOL><INDENT>if _OntarioExposureLimits[CASRN]["<STR_LIT>"]:<EOL><INDENT>_TWA = (_OntarioExposureLimits[CASRN]["<STR_LIT>"], '<STR_LIT>')<EOL><DEDENT>elif _OntarioExposureLimits[CASRN]["<STR_LIT>"]:<EOL><INDENT>_TWA = (_OntarioExposureLimits[CASRN]["<STR_LIT>"], '<STR_LIT>')<EOL><DEDENT><DEDENT>elif Method == NONE:<EOL><INDENT>_TWA = None<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>return _TWA<EOL>

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('1303-00-0')
    (5.0742430905659505e-05, 'ppm')
    >>> TWA('7782-42-5', AvailableMethods=True)
    ['Ontario Limits', 'None']


def LFL_mixture(ys=None, LFLs=None, CASRNs=None, AvailableMethods=False,<EOL>Method=None):

def list_methods():<EOL><INDENT>methods = []<EOL>if CASRNs:<EOL><INDENT>CASRNs2 = list(CASRNs)<EOL>LFLs2 = list(LFLs)<EOL>for i in inerts:<EOL><INDENT>if i in CASRNs2:<EOL><INDENT>ind = CASRNs.index(i)<EOL>CASRNs2.remove(i)<EOL>LFLs2.remove(LFLs[ind])<EOL><DEDENT><DEDENT>if none_and_length_check([LFLs2]):<EOL><INDENT>methods.append('<STR_LIT>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if none_and_length_check([LFLs]):<EOL><INDENT>methods.append('<STR_LIT>')<EOL><DEDENT><DEDENT>methods.append('<STR_LIT:None>')<EOL>return methods<EOL><DEDENT>if AvailableMethods:<EOL><INDENT>return list_methods()<EOL><DEDENT>if not Method:<EOL><INDENT>Method = list_methods()[<NUM_LIT:0>]<EOL>


def ppmv_to_mgm3(ppmv, MW, T=<NUM_LIT>, P=<NUM_LIT>):

parts = ppmv*<NUM_LIT><EOL>n = parts*P/(R*T)<EOL>mgm3 = MW*n*<NUM_LIT:1000>  <EOL>return mgm3<EOL>

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]
    MW : float
        Molecular weight of the trace gas [g/mol]
    T : float, optional
        Temperature of the gas at which the ppmv is reported
    P : float, optional
        Pressure of the gas at which the ppmv is reported

    Returns
    -------
    mgm3 : float
        Concentration of a substance in an ideal gas mixture [mg/m^3]

    Notes
    -----
    The term P/(RT)/1000 converts to 0.040874 at STP. Its inverse is reported
    as 24.45 in [1]_.

    Examples
    --------
    >>> ppmv_to_mgm3(1, 40)
    1.6349623351068687

    References
    ----------
    .. [1] ACGIH. Industrial Ventilation: A Manual of Recommended Practice,
       23rd Edition. American Conference of Governmental and Industrial
       Hygenists, 2004.


Hc = Hc/<NUM_LIT><EOL>UFL = <NUM_LIT>*Hc + <NUM_LIT>*Hc*Hc + <NUM_LIT><EOL>return UFL/<NUM_LIT><EOL>

r'''Calculates upper flammability limit, using the Suzuki [1]_ correlation.
    Uses heat of combustion only.

    The upper flammability limit of a gas is air is:

    .. math::
        \text{UFL} = 6.3\Delta H_c^\circ + 0.567\Delta H_c^{\circ 2} + 23.5

    Parameters
    ----------
    Hc : float
        Heat of combustion of gas [J/mol]

    Returns
    -------
    UFL : float
        Upper flammability limit, mole fraction

    Notes
    -----
    UFL in percent volume in air according to original equation.
    Hc is at standard conditions in the equation, in units of MJ/mol.
    AAPD = 1.2% for 95 compounds used in fit.
    Somewhat better results than the High and Danner method.
    4.9% < UFL < 23.0%
    -890.3 kJ/mol < dHc < -6380 kJ/mol
    r^2 = 0.989
    Sample calculations provided for all chemicals, both this method and
    High and Danner. Examples are from the article.

    Predicts a UFL of 1 at 7320190 J and a UFL of 0 at -5554160 J.

    Examples
    --------
    Pentane, literature 7.8% UFL

    >>> Suzuki_UFL(-3536600)
    0.0831119493052

    References
    ----------
    .. [1] Suzuki, Takahiro, and Kozo Koide. "Short Communication: Correlation
       between Upper Flammability Limits and Thermochemical Properties of
       Organic Compounds." Fire and Materials 18, no. 6 (November 1, 1994):
       393-97. doi:10.1002/fam.810180608.


def Tflash(CASRN, AvailableMethods=False, Method=None):

def list_methods():<EOL><INDENT>methods = []<EOL>if CASRN in IEC_2010.index and not np.isnan(IEC_2010.at[CASRN, '<STR_LIT>']):<EOL><INDENT>methods.append(IEC)<EOL><DEDENT>if CASRN in NFPA_2008.index and not np.isnan(NFPA_2008.at[CASRN, '<STR_LIT>']):<EOL><INDENT>methods.append(NFPA)<EOL><DEDENT>if CASRN in DIPPR_SERAT.index:<EOL><INDENT>methods.append(SERAT)<EOL><DEDENT>methods.append(NONE)<EOL>return methods<EOL><DEDENT>if AvailableMethods:<EOL><INDENT>return list_methods()<EOL><DEDENT>if not Method:<EOL><INDENT>Method = list_methods()[<NUM_LIT:0>]<EOL><DEDENT>if Method == IEC:<EOL><INDENT>return float(IEC_2010.at[CASRN, '<STR_LIT>'])<EOL><DEDENT>elif Method == NFPA:<EOL><INDENT>return float(NFPA_2008.at[CASRN, "<STR_LIT>"])<EOL><DEDENT>elif Method == SERAT:<EOL><INDENT>return float(DIPPR_SERAT.at[CASRN, "<STR_LIT>"])<EOL><DEDENT>elif Method == NONE:<EOL><INDENT>return None<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>

r'''This function handles the retrieval or calculation of a chemical's
    flash point. 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 source is 'IEC 60079-20-1 (2010)' [1]_, with the secondary source
    'NFPA 497 (2008)' [2]_ having very similar data. A third source
    'Serat DIPPR (2017)' [3]_ provides third hand experimental but evaluated
    data from the DIPPR database, version unspecified, for 870 compounds.

    Examples
    --------
    >>> Tflash(CASRN='64-17-5')
    285.15

    Parameters
    ----------
    CASRN : string
        CASRN [-]

    Returns
    -------
    Tflash : float
        Flash point of the chemical, [K]
    methods : list, only returned if AvailableMethods == True
        List of methods which can be used to obtain Tflash with the given
        inputs

    Other Parameters
    ----------------
    Method : string, optional
        A string for the method name to use, as defined by constants in
        Tflash_methods
    AvailableMethods : bool, optional
        If True, function will determine which methods can be used to obtain
        Tflash for the desired chemical, and will return methods instead of
        Tflash

    Notes
    -----
    The predicted values from the DIPPR databank are also available in the
    supporting material in [3]_, but are not included.

    References
    ----------
    .. [1] IEC. "IEC 60079-20-1:2010 Explosive atmospheres - Part 20-1:
       Material characteristics for gas and vapour classification - Test
       methods and data." https://webstore.iec.ch/publication/635. See also
       https://law.resource.org/pub/in/bis/S05/is.iec.60079.20.1.2010.pdf
    .. [2] National Fire Protection Association. NFPA 497: Recommended
       Practice for the Classification of Flammable Liquids, Gases, or Vapors
       and of Hazardous. NFPA, 2008.
    .. [3] Serat, Fatima Zohra, Ali Mustapha Benkouider, Ahmed Yahiaoui, and
       Farid Bagui. "Nonlinear Group Contribution Model for the Prediction of
       Flash Points Using Normal Boiling Points." Fluid Phase Equilibria 449
       (October 15, 2017): 52-59. doi:10.1016/j.fluid.2017.06.008.


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
    ----------
    atoms : dict
        Dictionary of atoms and atom counts

    Returns
    -------
    LFL : float
        Lower flammability limit, mole fraction

    Notes
    -----
    Coefficient of 0.55 taken from [2]_

    Examples
    --------
    Hexane, example from [1]_, lit. 1.2 %

    >>> Crowl_Louvar_LFL({'H': 14, 'C': 6})
    0.011899610558199915

    References
    ----------
    .. [1] Crowl, Daniel A., and Joseph F. Louvar. Chemical Process Safety:
       Fundamentals with Applications. 2E. Upper Saddle River, N.J:
       Prentice Hall, 2001.
    .. [2] Jones, G. W. "Inflammation Limits and Their Practical Application
       in Hazardous Industrial Operations." Chemical Reviews 22, no. 1
       (February 1, 1938): 1-26. doi:10.1021/cr60071a001


def Skin(CASRN, AvailableMethods=False, Method=None):

def list_methods():<EOL><INDENT>methods = []<EOL>if CASRN in _OntarioExposureLimits:<EOL><INDENT>methods.append(ONTARIO)<EOL><DEDENT>methods.append(NONE)<EOL>return methods<EOL><DEDENT>if AvailableMethods:<EOL><INDENT>return list_methods()<EOL><DEDENT>if not Method:<EOL><INDENT>Method = list_methods()[<NUM_LIT:0>]<EOL><DEDENT>if Method == ONTARIO:<EOL><INDENT>_Skin = (_OntarioExposureLimits[CASRN]["<STR_LIT>"])<EOL><DEDENT>elif Method == NONE:<EOL><INDENT>_Skin = None<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>return _Skin<EOL>

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')
    True
    >>> Skin('1395-21-7')
    False
    >>> Skin('7572-29-4', AvailableMethods=True)
    ['Ontario Limits', 'None']


if method == SIMPLE:<EOL><INDENT>Cpgms = [i(T) for i in self.HeatCapacityGases]<EOL>return mixing_simple(zs, Cpgms)<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>

r'''Method to calculate heat capacity 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
            Temperature at which to calculate the property, [K]
        P : float
            Pressure at which to calculate the property, [Pa]
        zs : list[float]
            Mole fractions of all species in the mixture, [-]
        ws : list[float]
            Weight fractions of all species in the mixture, [-]
        method : str
            Name of the method to use

        Returns
        -------
        Cpgm : float
            Molar heat capacity of the gas mixture at the given conditions,
            [J/mol]


def calculate_integral_over_T(self, T1, T2):

return (Zabransky_quasi_polynomial_integral_over_T(T2, self.Tc, *self.coeffs)<EOL>- Zabransky_quasi_polynomial_integral_over_T(T1, self.Tc, *self.coeffs))<EOL>

r'''Method to compute the entropy integral of heat capacity from
         `T1` to `T2`.

        Parameters
        ----------
        T1 : float
            Initial temperature, [K]
        T2 : float
            Final temperature, [K]

        Returns
        -------
        dS : float
            Entropy difference between `T1` and `T2`, [J/mol/K]


if T <= a7:<EOL><INDENT>y = <NUM_LIT:0.><EOL><DEDENT>else:<EOL><INDENT>y = (T - a7)/(T + a6)<EOL><DEDENT>Cp = R*(a0 + (a1/T**<NUM_LIT:2>)*exp(-a2/T) + a3*y**<NUM_LIT:2> + (a4 - a5/(T-a7)**<NUM_LIT:2> )*y**<NUM_LIT>)<EOL>return Cp<EOL>

r'''Calculates ideal gas heat capacity using the model developed in [1]_.

    The ideal gas heat capacity is given by:

    .. math::
        C_p = R\left(a_0 + (a_1/T^2) \exp(-a_2/T) + a_3 y^2
        + (a_4 - a_5/(T-a_7)^2 )y^j \right)

        y = \frac{T-a_7}{T+a_6} \text{ for } T > a_7 \text{ otherwise } 0

    Parameters
    ----------
    T : float
        Temperature [K]
    a1-a7 : float
        Coefficients

    Returns
    -------
    Cp : float
        Ideal gas heat capacity , [J/mol/K]

    Notes
    -----
    j is set to 8. Analytical integrals are available for this expression.

    Examples
    --------
    >>> TRCCp(300, 4.0, 7.65E5, 720., 3.565, -0.052, -1.55E6, 52., 201.)
    42.06525682312236

    References
    ----------
    .. [1] Kabo, G. J., and G. N. Roganov. Thermodynamics of Organic Compounds
       in the Gas State, Volume II: V. 2. College Station, Tex: CRC Press, 1994.


methods = []<EOL>Tmins, Tmaxs = [], []<EOL>if self.CASRN in zabransky_dict_const_s:<EOL><INDENT>methods.append(ZABRANSKY_SPLINE)<EOL>self.Zabransky_spline = zabransky_dict_const_s[self.CASRN]<EOL><DEDENT>if self.CASRN in zabransky_dict_const_p:<EOL><INDENT>methods.append(ZABRANSKY_QUASIPOLYNOMIAL)<EOL>self.Zabransky_quasipolynomial = zabransky_dict_const_p[self.CASRN]<EOL><DEDENT>if self.CASRN in zabransky_dict_iso_s:<EOL><INDENT>methods.append(ZABRANSKY_SPLINE_C)<EOL>self.Zabransky_spline_iso = zabransky_dict_iso_s[self.CASRN]<EOL><DEDENT>if self.CASRN in zabransky_dict_iso_p:<EOL><INDENT>methods.append(ZABRANSKY_QUASIPOLYNOMIAL_C)<EOL>self.Zabransky_quasipolynomial_iso = zabransky_dict_iso_p[self.CASRN]<EOL><DEDENT>if self.CASRN in Poling_data.index and not np.isnan(Poling_data.at[self.CASRN, '<STR_LIT>']):<EOL><INDENT>methods.append(POLING_CONST)<EOL>self.POLING_T = <NUM_LIT><EOL>self.POLING_constant = float(Poling_data.at[self.CASRN, '<STR_LIT>'])<EOL><DEDENT>if self.CASRN in CRC_standard_data.index and not np.isnan(CRC_standard_data.at[self.CASRN, '<STR_LIT>']):<EOL><INDENT>methods.append(CRCSTD)<EOL>self.CRCSTD_T = <NUM_LIT><EOL>self.CRCSTD_constant = float(CRC_standard_data.at[self.CASRN, '<STR_LIT>'])<EOL><DEDENT>if self.CASRN in zabransky_dict_sat_s:<EOL><INDENT>methods.append(ZABRANSKY_SPLINE_SAT)<EOL>self.Zabransky_spline_sat = zabransky_dict_sat_s[self.CASRN]<EOL><DEDENT>if self.CASRN in zabransky_dict_sat_p:<EOL><INDENT>methods.append(ZABRANSKY_QUASIPOLYNOMIAL_SAT)<EOL>self.Zabransky_quasipolynomial_sat = zabransky_dict_sat_p[self.CASRN]<EOL><DEDENT>if self.CASRN in _VDISaturationDict:<EOL><INDENT>methods.append(VDI_TABULAR)<EOL>Ts, props = VDI_tabular_data(self.CASRN, '<STR_LIT>')<EOL>self.VDI_Tmin = Ts[<NUM_LIT:0>]<EOL>self.VDI_Tmax = Ts[-<NUM_LIT:1>]<EOL>self.tabular_data[VDI_TABULAR] = (Ts, props)<EOL>Tmins.append(self.VDI_Tmin); Tmaxs.append(self.VDI_Tmax)<EOL><DEDENT>if self.Tc and self.omega:<EOL><INDENT>methods.extend([ROWLINSON_POLING, ROWLINSON_BONDI])<EOL><DEDENT>if has_CoolProp and self.CASRN in coolprop_dict:<EOL><INDENT>methods.append(COOLPROP)<EOL>self.CP_f = coolprop_fluids[self.CASRN]<EOL>Tmins.append(self.CP_f.Tt); Tmaxs.append(self.CP_f.Tc)<EOL><DEDENT>if self.MW and self.similarity_variable:<EOL><INDENT>methods.append(DADGOSTAR_SHAW)<EOL><DEDENT>self.all_methods = set(methods)<EOL>if Tmins and Tmaxs:<EOL><INDENT>self.Tmin, self.Tmax = min(Tmins), max(Tmaxs)<EOL><DEDENT>

r'''Method which picks out coefficients for the specified chemical
        from the various dictionaries and DataFrames storing it. All data is
        stored as attributes. This method also sets :obj:`Tmin`, :obj:`Tmax`,
        and :obj:`all_methods` as a set of methods for which the data exists for.

        Called on initialization only. See the source code for the variables at
        which the coefficients are stored. The coefficients can safely be
        altered once the class is initialized. This method can be called again
        to reset the parameters.


if method == ZABRANSKY_SPLINE:<EOL><INDENT>return self.Zabransky_spline.calculate(T)<EOL><DEDENT>elif method == ZABRANSKY_QUASIPOLYNOMIAL:<EOL><INDENT>return self.Zabransky_quasipolynomial.calculate(T)<EOL><DEDENT>elif method == ZABRANSKY_SPLINE_C:<EOL><INDENT>return self.Zabransky_spline_iso.calculate(T)<EOL><DEDENT>elif method == ZABRANSKY_QUASIPOLYNOMIAL_C:<EOL><INDENT>return self.Zabransky_quasipolynomial_iso.calculate(T)<EOL><DEDENT>elif method == ZABRANSKY_SPLINE_SAT:<EOL><INDENT>return self.Zabransky_spline_sat.calculate(T)<EOL><DEDENT>elif method == ZABRANSKY_QUASIPOLYNOMIAL_SAT:<EOL><INDENT>return self.Zabransky_quasipolynomial_sat.calculate(T)<EOL><DEDENT>elif method == COOLPROP:<EOL><INDENT>return CoolProp_T_dependent_property(T, self.CASRN , '<STR_LIT>', '<STR_LIT:l>')<EOL><DEDENT>elif method == POLING_CONST:<EOL><INDENT>return self.POLING_constant<EOL><DEDENT>elif method == CRCSTD:<EOL><INDENT>return self.CRCSTD_constant<EOL><DEDENT>elif method == ROWLINSON_POLING:<EOL><INDENT>Cpgm = self.Cpgm(T) if hasattr(self.Cpgm, '<STR_LIT>') else self.Cpgm<EOL>return Rowlinson_Poling(T, self.Tc, self.omega, Cpgm)<EOL><DEDENT>elif method == ROWLINSON_BONDI:<EOL><INDENT>Cpgm = self.Cpgm(T) if hasattr(self.Cpgm, '<STR_LIT>') else self.Cpgm<EOL>return Rowlinson_Bondi(T, self.Tc, self.omega, Cpgm)<EOL><DEDENT>elif method == DADGOSTAR_SHAW:<EOL><INDENT>Cp = Dadgostar_Shaw(T, self.similarity_variable)<EOL>return property_mass_to_molar(Cp, self.MW)<EOL><DEDENT>elif method in self.tabular_data:<EOL><INDENT>return self.interpolate(T, method)<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>

r'''Method to calculate heat capacity of a liquid at temperature `T`
        with a given method.

        This method has no exception handling; see `T_dependent_property`
        for that.

        Parameters
        ----------
        T : float
            Temperature at which to calculate heat capacity, [K]
        method : str
            Name of the method to use

        Returns
        -------
        Cp : float
            Heat capacity of the liquid at T, [J/mol/K]


def Zabransky_cubic_integral_over_T(T, a1, a2, a3, a4):

T = T/<NUM_LIT><EOL>return R*(T*(T*(T*a4/<NUM_LIT:3> + a3/<NUM_LIT:2>) + a2) + a1*log(T))<EOL>

r'''Calculates the integral of liquid heat capacity over T using the model
    developed in [1]_.

    Parameters
    ----------
    T : float
        Temperature [K]
    a1-a4 : float
        Coefficients

    Returns
    -------
    S : float
        Difference in entropy from 0 K, [J/mol/K]

    Notes
    -----
    The analytical integral was derived with Sympy; it is a simple polynomial,
    plus a logarithm

    Examples
    --------
    >>> Zabransky_cubic_integral_over_T(298.15, 20.9634, -10.1344, 2.8253,
    ... -0.256738)
    24.73245695987246

    References
    ----------
    .. [1] Zabransky, M., V. Ruzicka Jr, V. Majer, and Eugene S. Domalski.
       Heat Capacity of Liquids: Critical Review and Recommended Values.
       2 Volume Set. Washington, D.C.: Amer Inst of Physics, 1996.


<EOL>if T2 < T1:<EOL><INDENT>flipped = True<EOL>T1, T2 = T2, T1<EOL><DEDENT>else:<EOL><INDENT>flipped = False<EOL><DEDENT>if self.n == <NUM_LIT:1>:<EOL><INDENT>dH = (Zabransky_cubic_integral(T2, *self.coeff_sets[<NUM_LIT:0>])<EOL>- Zabransky_cubic_integral(T1, *self.coeff_sets[<NUM_LIT:0>]))<EOL><DEDENT>else:<EOL><INDENT>ind_T1, ind_T2 = self._coeff_ind_from_T(T1), self._coeff_ind_from_T(T2)<EOL>if ind_T1 == ind_T2:<EOL><INDENT>dH = (Zabransky_cubic_integral(T2, *self.coeff_sets[ind_T2])<EOL>- Zabransky_cubic_integral(T1, *self.coeff_sets[ind_T1]))<EOL><DEDENT>else:<EOL><INDENT>dH = (Zabransky_cubic_integral(self.Ts[ind_T1], *self.coeff_sets[ind_T1])<EOL>- Zabransky_cubic_integral(T1, *self.coeff_sets[ind_T1]))<EOL>for i in range(ind_T1, ind_T2):<EOL><INDENT>diff =(Zabransky_cubic_integral(self.Ts[i+<NUM_LIT:1>], *self.coeff_sets[i])<EOL>- Zabransky_cubic_integral(self.Ts[i], *self.coeff_sets[i]))<EOL>dH += diff<EOL><DEDENT>end = (Zabransky_cubic_integral(T2, *self.coeff_sets[ind_T2])<EOL>- Zabransky_cubic_integral(self.Ts[ind_T2], *self.coeff_sets[ind_T2]))<EOL>dH += end<EOL><DEDENT><DEDENT>return -dH if flipped else dH<EOL>

r'''Method to compute the enthalpy integral of heat capacity from
        `T1` to `T2`. Analytically integrates across the piecewise spline
        as necessary.

        Parameters
        ----------
        T1 : float
            Initial temperature, [K]
        T2 : float
            Final temperature, [K]

        Returns
        -------
        dS : float
            Enthalpy difference between `T1` and `T2`, [J/mol/K]


methods = []<EOL>Tmins, Tmaxs = [], []<EOL>if self.CASRN in TRC_gas_data.index:<EOL><INDENT>methods.append(TRCIG)<EOL>_, self.TRCIG_Tmin, self.TRCIG_Tmax, a0, a1, a2, a3, a4, a5, a6, a7, _, _, _ = _TRC_gas_data_values[TRC_gas_data.index.get_loc(self.CASRN)].tolist()<EOL>self.TRCIG_coefs = [a0, a1, a2, a3, a4, a5, a6, a7]<EOL>Tmins.append(self.TRCIG_Tmin); Tmaxs.append(self.TRCIG_Tmax)<EOL><DEDENT>if self.CASRN in Poling_data.index and not np.isnan(Poling_data.at[self.CASRN, '<STR_LIT>']):<EOL><INDENT>_, self.POLING_Tmin, self.POLING_Tmax, a0, a1, a2, a3, a4, Cpg, Cpl = _Poling_data_values[Poling_data.index.get_loc(self.CASRN)].tolist()<EOL>methods.append(POLING)<EOL>self.POLING_coefs = [a0, a1, a2, a3, a4]<EOL>Tmins.append(self.POLING_Tmin); Tmaxs.append(self.POLING_Tmax)<EOL><DEDENT>if self.CASRN in Poling_data.index and not np.isnan(Poling_data.at[self.CASRN, '<STR_LIT>']):<EOL><INDENT>methods.append(POLING_CONST)<EOL>self.POLING_T = <NUM_LIT><EOL>self.POLING_constant = float(Poling_data.at[self.CASRN, '<STR_LIT>'])<EOL><DEDENT>if self.CASRN in CRC_standard_data.index and not np.isnan(CRC_standard_data.at[self.CASRN, '<STR_LIT>']):<EOL><INDENT>methods.append(CRCSTD)<EOL>self.CRCSTD_T = <NUM_LIT><EOL>self.CRCSTD_constant = float(CRC_standard_data.at[self.CASRN, '<STR_LIT>'])<EOL><DEDENT>if self.CASRN in _VDISaturationDict:<EOL><INDENT>methods.append(VDI_TABULAR)<EOL>Ts, props = VDI_tabular_data(self.CASRN, '<STR_LIT>')<EOL>self.VDI_Tmin = Ts[<NUM_LIT:0>]<EOL>self.VDI_Tmax = Ts[-<NUM_LIT:1>]<EOL>self.tabular_data[VDI_TABULAR] = (Ts, props)<EOL>Tmins.append(self.VDI_Tmin); Tmaxs.append(self.VDI_Tmax)<EOL><DEDENT>if has_CoolProp and self.CASRN in coolprop_dict:<EOL><INDENT>methods.append(COOLPROP)<EOL>self.CP_f = coolprop_fluids[self.CASRN]<EOL>Tmins.append(self.CP_f.Tt); Tmaxs.append(self.CP_f.Tc)<EOL><DEDENT>if self.MW and self.similarity_variable:<EOL><INDENT>methods.append(LASTOVKA_SHAW)<EOL><DEDENT>self.all_methods = set(methods)<EOL>if Tmins and Tmaxs:<EOL><INDENT>self.Tmin, self.Tmax = min(Tmins), max(Tmaxs)<EOL><DEDENT>


methods = [SIMPLE]        <EOL>self.all_methods = set(methods)<EOL>

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 calculate the property.

        Called on initialization only. See the source code for the variables at
        which the coefficients are stored. The coefficients can safely be
        altered once the class is initialized. This method can be called again
        to reset the parameters.


def TRCCp_integral_over_T(T, a0, a1, a2, a3, a4, a5, a6, a7, J=<NUM_LIT:0>):

<EOL>if T <= a7:<EOL><INDENT>y = <NUM_LIT:0.><EOL><DEDENT>else:<EOL><INDENT>y = (T - a7)/(T + a6)<EOL><DEDENT>z = T/(T + a6)*(a7 + a6)/a7<EOL>if T <= a7:<EOL><INDENT>s = <NUM_LIT:0.><EOL><DEDENT>else:<EOL><INDENT>a72 = a7*a7<EOL>a62 = a6*a6<EOL>a7_a6 = a7/a6 <EOL>a7_a6_2 = a7_a6*a7_a6<EOL>a7_a6_4 = a7_a6_2*a7_a6_2<EOL>x1 = (a4*a72 - a5)/a62 <EOL>first = (a3 + ((a4*a72 - a5)/a62)*a7_a6_4)*a7_a6_2*log(z)<EOL>second = (a3 + a4)*log((T + a6)/(a6 + a7))<EOL>fourth = -(a3/a6*(a6 + a7) + a5*y**<NUM_LIT:6>/(<NUM_LIT>*a7*(a6 + a7)))*y<EOL>third = sum([(x1*(-a7_a6)**(<NUM_LIT:6>-i) - a4)*y**i/i for i in range(<NUM_LIT:1>, <NUM_LIT:8>)])<EOL>s = first + second + third + fourth<EOL><DEDENT>return R*(J + a0*log(T) + a1/(a2*a2)*(<NUM_LIT:1.> + a2/T)*exp(-a2/T) + s)<EOL>

r'''Integrates ideal gas heat capacity over T using the model developed in
    [1]_. Best used as a delta only.

    The difference in ideal-gas entropy with respect to 0 K is given by:

    .. math::
        \frac{S^\circ}{R} = J + a_0\ln T + \frac{a_1}{a_2^2}\left(1
        + \frac{a_2}{T}\right)x(a_2) + s(T)

        s(T) = \left[\left\{a_3 + \left(\frac{a_4 a_7^2 - a_5}{a_6^2}\right)
        \left(\frac{a_7}{a_6}\right)^4\right\}\left(\frac{a_7}{a_6}\right)^2
        \ln z + (a_3 + a_4)\ln\left(\frac{T+a_6}{a_6+a_7}\right)
        +\sum_{i=1}^7 \left\{\left(\frac{a_4 a_7^2 - a_5}{a_6^2}\right)\left(
        \frac{-a_7}{a_6}\right)^{6-i} - a_4\right\}\frac{y^i}{i}
        - \left\{\frac{a_3}{a_6}(a_6 + a_7) + \frac{a_5 y^6}{7a_7(a_6+a_7)}
        \right\}y\right]

        s(T) = 0 \text{ for } T \le a_7

        z = \frac{T}{T+a_6} \cdot \frac{a_7 + a_6}{a_7}

        y = \frac{T-a_7}{T+a_6} \text{ for } T > a_7 \text{ otherwise } 0

    Parameters
    ----------
    T : float
        Temperature [K]
    a1-a7 : float
        Coefficients
    J : float, optional
        Integral offset

    Returns
    -------
    S-S(0) : float
        Difference in entropy from 0 K , [J/mol/K]

    Notes
    -----
    Analytical integral as provided in [1]_ and verified with numerical
    integration.

    Examples
    --------
    >>> TRCCp_integral_over_T(300, 4.0, 124000, 245, 50.539, -49.469,
    ... 220440000, 560, 78)
    213.80148972435018

    References
    ----------
    .. [1] Kabo, G. J., and G. N. Roganov. Thermodynamics of Organic Compounds
       in the Gas State, Volume II: V. 2. College Station, Tex: CRC Press, 1994.


def add_coeffs(self, Tmin, Tmax, coeffs):

self.n += <NUM_LIT:1><EOL>if not self.Ts:<EOL><INDENT>self.Ts = [Tmin, Tmax]<EOL>self.coeff_sets = [coeffs]<EOL><DEDENT>else:<EOL><INDENT>for ind, T in enumerate(self.Ts):<EOL><INDENT>if Tmin < T:<EOL><INDENT>self.Ts.insert(ind, Tmin) <EOL>self.coeff_sets.insert(ind, coeffs)<EOL>return<EOL><DEDENT><DEDENT>self.Ts.append(Tmax)<EOL>self.coeff_sets.append(coeffs)<EOL><DEDENT>

Called internally during the parsing of the Zabransky database, to
        add coefficients as they are read one per line


def Lastovka_Shaw_integral(T, similarity_variable, cyclic_aliphatic=False):

a = similarity_variable<EOL>if cyclic_aliphatic:<EOL><INDENT>A1 = -<NUM_LIT><EOL>A2 = <NUM_LIT><EOL>first = A1 + A2*a<EOL><DEDENT>else:<EOL><INDENT>A1 = <NUM_LIT><EOL>A2 = <NUM_LIT><EOL>A3 = <NUM_LIT> <EOL>A4 = <NUM_LIT><EOL>first = A2 + (A1-A2)/(<NUM_LIT:1.>+exp((a-A3)/A4)) <EOL><DEDENT>B11 = <NUM_LIT><EOL>B12 = <NUM_LIT><EOL>C11 = <NUM_LIT><EOL>C12 = <NUM_LIT><EOL>B21 = <NUM_LIT><EOL>B22 = <NUM_LIT><EOL>C21 = <NUM_LIT><EOL>C22 = <NUM_LIT><EOL>return <NUM_LIT>*(T*first - (B11 + B12*a)*(-C11 - C12*a)**<NUM_LIT:2>/(-C11 - C12*a + (C11 <EOL>+ C12*a)*exp((-C11 - C12*a)/T)) - (B21 + B22*a)*(-C21 - C22*a)**<NUM_LIT:2>/(-C21 <EOL>- C22*a + (C21 + C22*a)*exp((-C21 - C22*a)/T)))<EOL>

r'''Calculate the integral of ideal-gas constant-pressure heat capacitiy
    with the similarity variable concept and method as shown in [1]_.

    Parameters
    ----------
    T : float
        Temperature of gas [K]
    similarity_variable : float
        similarity variable as defined in [1]_, [mol/g]

    Returns
    -------
    H : float
        Difference in enthalpy from 0 K, [J/kg]

    Notes
    -----
    Original model is in terms of J/g/K. Note that the model is for predicting
    mass heat capacity, not molar heat capacity like most other methods!
    Integral was computed with SymPy.

    See Also
    --------
    Lastovka_Shaw
    Lastovka_Shaw_integral_over_T

    Examples
    --------
    >>> Lastovka_Shaw_integral(300.0, 0.1333)
    5283095.816018478

    References
    ----------
    .. [1] Lastovka, Vaclav, and John M. Shaw. "Predictive Correlations for
       Ideal Gas Heat Capacities of Pure Hydrocarbons and Petroleum Fractions."
       Fluid Phase Equilibria 356 (October 25, 2013): 338-370.
       doi:10.1016/j.fluid.2013.07.023.


a = similarity_variable<EOL>a2 = a*a<EOL>T2 = T*T<EOL>a11 = -<NUM_LIT><EOL>a12 = <NUM_LIT><EOL>a21 = <NUM_LIT><EOL>a22 = -<NUM_LIT><EOL>a31 = -<NUM_LIT><EOL>a32 = <NUM_LIT><EOL>constant = <NUM_LIT><EOL>H = T2*T/<NUM_LIT>*(a2*a32 + a*a31) + T2*<NUM_LIT:0.5>*(a2*a22 + a*a21) + T*constant*(a2*a12 + a*a11)<EOL>return H*<NUM_LIT><EOL>

r'''Calculate the integral of liquid constant-pressure heat capacitiy
    with the similarity variable concept and method as shown in [1]_.

    Parameters
    ----------
    T : float
        Temperature of gas [K]
    similarity_variable : float
        similarity variable as defined in [1]_, [mol/g]

    Returns
    -------
    H : float
        Difference in enthalpy from 0 K, [J/kg]

    Notes
    -----
    Original model is in terms of J/g/K. Note that the model is for predicting
    mass heat capacity, not molar heat capacity like most other methods!
    Integral was computed with SymPy.

    See Also
    --------
    Dadgostar_Shaw
    Dadgostar_Shaw_integral_over_T

    Examples
    --------
    >>> Dadgostar_Shaw_integral(300.0, 0.1333)
    238908.15142664989

    References
    ----------
    .. [1] Dadgostar, Nafiseh, and John M. Shaw. "A Predictive Correlation for
       the Constant-Pressure Specific Heat Capacity of Pure and Ill-Defined
       Liquid Hydrocarbons." Fluid Phase Equilibria 313 (January 15, 2012):
       211-226. doi:10.1016/j.fluid.2011.09.015.


<EOL>if T2 < T1:<EOL><INDENT>flipped = True<EOL>T1, T2 = T2, T1<EOL><DEDENT>else:<EOL><INDENT>flipped = False<EOL><DEDENT>if self.n == <NUM_LIT:1>:<EOL><INDENT>dS = (Zabransky_cubic_integral_over_T(T2, *self.coeff_sets[<NUM_LIT:0>])<EOL>- Zabransky_cubic_integral_over_T(T1, *self.coeff_sets[<NUM_LIT:0>]))<EOL><DEDENT>else:<EOL><INDENT>ind_T1, ind_T2 = self._coeff_ind_from_T(T1), self._coeff_ind_from_T(T2)<EOL>if ind_T1 == ind_T2:<EOL><INDENT>dS = (Zabransky_cubic_integral_over_T(T2, *self.coeff_sets[ind_T2])<EOL>- Zabransky_cubic_integral_over_T(T1, *self.coeff_sets[ind_T1]))<EOL><DEDENT>else:<EOL><INDENT>dS = (Zabransky_cubic_integral_over_T(self.Ts[ind_T1], *self.coeff_sets[ind_T1])<EOL>- Zabransky_cubic_integral_over_T(T1, *self.coeff_sets[ind_T1]))<EOL>for i in range(ind_T1, ind_T2):<EOL><INDENT>diff =(Zabransky_cubic_integral_over_T(self.Ts[i+<NUM_LIT:1>], *self.coeff_sets[i])<EOL>- Zabransky_cubic_integral_over_T(self.Ts[i], *self.coeff_sets[i]))<EOL>dS += diff<EOL><DEDENT>end = (Zabransky_cubic_integral_over_T(T2, *self.coeff_sets[ind_T2])<EOL>- Zabransky_cubic_integral_over_T(self.Ts[ind_T2], *self.coeff_sets[ind_T2]))<EOL>dS += end<EOL><DEDENT><DEDENT>return -dS if flipped else dS<EOL>

r'''Method to compute the entropy integral of heat capacity from
        `T1` to `T2`. Analytically integrates across the piecewise spline
        as necessary.

        Parameters
        ----------
        T1 : float
            Initial temperature, [K]
        T2 : float
            Final temperature, [K]

        Returns
        -------
        dS : float
            Entropy difference between `T1` and `T2`, [J/mol/K]


A1 = <NUM_LIT><EOL>A2 = <NUM_LIT><EOL>theta = <NUM_LIT><EOL>C1 = <NUM_LIT><EOL>C2 = -<NUM_LIT><EOL>D1 = <NUM_LIT><EOL>D2 = -<NUM_LIT><EOL>similarity_variable2 = similarity_variable*similarity_variable<EOL>return (T*T*T*(<NUM_LIT>*D1*similarity_variable/<NUM_LIT> <EOL>+ <NUM_LIT>*D2*similarity_variable2/<NUM_LIT>) + T*T*(<NUM_LIT>*C1*similarity_variable <EOL>+ <NUM_LIT>*C2*similarity_variable2)<EOL>+ (<NUM_LIT>*A1*R*similarity_variable*theta<EOL>+ <NUM_LIT>*A2*R*similarity_variable2*theta)/(exp(theta/T) - <NUM_LIT:1.>))<EOL>

r'''Integrates solid constant-pressure heat capacitiy with the similarity
    variable concept and method as shown in [1]_.

    Uses a explicit form as derived with Sympy.

    Parameters
    ----------
    T : float
        Temperature of solid [K]
    similarity_variable : float
        similarity variable as defined in [1]_, [mol/g]

    Returns
    -------
    H : float
        Difference in enthalpy from 0 K, [J/kg]

    Notes
    -----
    Original model is in terms of J/g/K. Note that the model is for predicting
    mass heat capacity, not molar heat capacity like most other methods!

    See Also
    --------
    Lastovka_solid

    Examples
    --------
    >>> Lastovka_solid_integral(300, 0.2139)
    283246.1242170376

    References
    ----------
    .. [1] Laštovka, Václav, Michal Fulem, Mildred Becerra, and John M. Shaw.
       "A Similarity Variable for Estimating the Heat Capacity of Solid Organic
       Compounds: Part II. Application: Heat Capacity Calculation for
       Ill-Defined Organic Solids." Fluid Phase Equilibria 268, no. 1-2
       (June 25, 2008): 134-41. doi:10.1016/j.fluid.2008.03.018.


return (Zabransky_quasi_polynomial_integral(T2, self.Tc, *self.coeffs)<EOL>- Zabransky_quasi_polynomial_integral(T1, self.Tc, *self.coeffs))<EOL>

r'''Method to compute the enthalpy integral of heat capacity from
         `T1` to `T2`.

        Parameters
        ----------
        T1 : float
            Initial temperature, [K]
        T2 : float
            Final temperature, [K]

        Returns
        -------
        dH : float
            Enthalpy difference between `T1` and `T2`, [J/mol]


def calculate_integral_over_T(self, T1, T2, method):

if method == PERRY151:<EOL><INDENT>S2 = (self.PERRY151_const*log(T2) + self.PERRY151_lin*T2 <EOL>- self.PERRY151_quadinv/(<NUM_LIT>*T2**<NUM_LIT:2>) + <NUM_LIT:0.5>*self.PERRY151_quad*T2**<NUM_LIT:2>)<EOL>S1 = (self.PERRY151_const*log(T1) + self.PERRY151_lin*T1<EOL>- self.PERRY151_quadinv/(<NUM_LIT>*T1**<NUM_LIT:2>) + <NUM_LIT:0.5>*self.PERRY151_quad*T1**<NUM_LIT:2>)<EOL>return (S2 - S1)*calorie<EOL><DEDENT>elif method == CRCSTD:<EOL><INDENT>S2 = self.CRCSTD_Cp*log(T2)<EOL>S1 = self.CRCSTD_Cp*log(T1)<EOL>return (S2 - S1)<EOL><DEDENT>elif method == LASTOVKA_S:<EOL><INDENT>dS = (Lastovka_solid_integral_over_T(T2, self.similarity_variable)<EOL>- Lastovka_solid_integral_over_T(T1, self.similarity_variable))<EOL>return property_mass_to_molar(dS, self.MW)<EOL><DEDENT>elif method in self.tabular_data:<EOL><INDENT>return float(quad(lambda T: self.calculate(T, method)/T, T1, T2)[<NUM_LIT:0>])<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>

r'''Method to calculate the integral of a property over temperature
        with respect to temperature, using a specified method. Implements the
        analytical integrals of all available methods except for tabular data.

        Parameters
        ----------
        T1 : float
            Lower limit of integration, [K]
        T2 : float
            Upper limit of integration, [K]
        method : str
            Method for which to find the integral

        Returns
        -------
        integral : float
            Calculated integral of the property over the given range,
            [`units`]


def calculate_integral(self, T1, T2, method):

if method == ZABRANSKY_SPLINE:<EOL><INDENT>return self.Zabransky_spline.calculate_integral(T1, T2)<EOL><DEDENT>elif method == ZABRANSKY_SPLINE_C:<EOL><INDENT>return self.Zabransky_spline_iso.calculate_integral(T1, T2)<EOL><DEDENT>elif method == ZABRANSKY_SPLINE_SAT:<EOL><INDENT>return self.Zabransky_spline_sat.calculate_integral(T1, T2)<EOL><DEDENT>elif method == ZABRANSKY_QUASIPOLYNOMIAL:<EOL><INDENT>return self.Zabransky_quasipolynomial.calculate_integral(T1, T2)<EOL><DEDENT>elif method == ZABRANSKY_QUASIPOLYNOMIAL_C:<EOL><INDENT>return self.Zabransky_quasipolynomial_iso.calculate_integral(T1, T2)<EOL><DEDENT>elif method == ZABRANSKY_QUASIPOLYNOMIAL_SAT:<EOL><INDENT>return self.Zabransky_quasipolynomial_sat.calculate_integral(T1, T2)<EOL><DEDENT>elif method == POLING_CONST:<EOL><INDENT>return (T2 - T1)*self.POLING_constant<EOL><DEDENT>elif method == CRCSTD:<EOL><INDENT>return (T2 - T1)*self.CRCSTD_constant<EOL><DEDENT>elif method == DADGOSTAR_SHAW:<EOL><INDENT>dH = (Dadgostar_Shaw_integral(T2, self.similarity_variable)<EOL>- Dadgostar_Shaw_integral(T1, self.similarity_variable))<EOL>return property_mass_to_molar(dH, self.MW)<EOL><DEDENT>elif method in self.tabular_data or method == COOLPROP or method in [ROWLINSON_POLING, ROWLINSON_BONDI]:<EOL><INDENT>return float(quad(self.calculate, T1, T2, args=(method))[<NUM_LIT:0>])<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>

r'''Method to calculate the integral of a property with respect to
        temperature, using a specified method.  Implements the
        analytical integrals of all available methods except for tabular data,
        the case of multiple coefficient sets needed to encompass the temperature
        range of any of the ZABRANSKY methods, and the CSP methods using the
        vapor phase properties.

        Parameters
        ----------
        T1 : float
            Lower limit of integration, [K]
        T2 : float
            Upper limit of integration, [K]
        method : str
            Method for which to find the integral

        Returns
        -------
        integral : float
            Calculated integral of the property over the given range,
            [`units*K`]


def calculate(self, T, P, zs, ws, method):

if method == SIMPLE:<EOL><INDENT>Cplms = [i(T) for i in self.HeatCapacityLiquids]<EOL>return mixing_simple(zs, Cplms)<EOL><DEDENT>elif method == LALIBERTE:<EOL><INDENT>ws = list(ws) ; ws.pop(self.index_w)<EOL>Cpl = Laliberte_heat_capacity(T, ws, self.wCASs)<EOL>MW = mixing_simple(zs, self.MWs)<EOL>return property_mass_to_molar(Cpl, MW)<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>

r'''Method to calculate heat capacity of a liquid mixture at
        temperature `T`, pressure `P`, mole fractions `zs` and weight fractions
        `ws` with a given method.

        This method has no exception handling; see `mixture_property`
        for that.

        Parameters
        ----------
        T : float
            Temperature at which to calculate the property, [K]
        P : float
            Pressure at which to calculate the property, [Pa]
        zs : list[float]
            Mole fractions of all species in the mixture, [-]
        ws : list[float]
            Weight fractions of all species in the mixture, [-]
        method : str
            Name of the method to use

        Returns
        -------
        Cplm : float
            Molar heat capacity of the liquid mixture at the given conditions,
            [J/mol]


def Rowlinson_Bondi(T, Tc, omega, Cpgm):

Tr = T/Tc<EOL>Cplm = Cpgm + R*(<NUM_LIT> + <NUM_LIT>/(<NUM_LIT:1.>-Tr) + <NUM_LIT>*omega*(<NUM_LIT><EOL>+ <NUM_LIT>*(<NUM_LIT:1>-Tr)**(<NUM_LIT:1>/<NUM_LIT>)/Tr + <NUM_LIT>/(<NUM_LIT:1.>-Tr)))<EOL>return Cplm<EOL>

r'''Calculate liquid constant-pressure heat capacitiy with the CSP method
    shown in [1]_.

    The heat capacity of a liquid is given by:

    .. math::
        \frac{Cp^L - Cp^{ig}}{R} = 1.45 + 0.45(1-T_r)^{-1} + 0.25\omega
        [17.11 + 25.2(1-T_r)^{1/3}T_r^{-1} + 1.742(1-T_r)^{-1}]

    Parameters
    ----------
    T : float
        Temperature of fluid [K]
    Tc : float
        Critical temperature of fluid [K]
    omega : float
        Acentric factor for fluid, [-]
    Cpgm : float
        Constant-pressure gas heat capacity, [J/mol/K]

    Returns
    -------
    Cplm : float
        Liquid constant-pressure heat capacitiy, [J/mol/K]

    Notes
    -----
    Less accurate than `Rowlinson_Poling`.

    Examples
    --------
    >>> Rowlinson_Bondi(T=373.28, Tc=535.55, omega=0.323, Cpgm=119.342)
    175.39760730048116

    References
    ----------
    .. [1] Poling, Bruce E. The Properties of Gases and Liquids. 5th edition.
       New York: McGraw-Hill Professional, 2000.
    .. [2] Gesellschaft, V. D. I., ed. VDI Heat Atlas. 2nd edition.
       Berlin; New York:: Springer, 2010.
    .. [3] J.S. Rowlinson, Liquids and Liquid Mixtures, 2nd Ed.,
       Butterworth, London (1969).


methods = [SIMPLE]        <EOL>if len(self.CASs) > <NUM_LIT:1> and '<STR_LIT>' in self.CASs:<EOL><INDENT>wCASs = [i for i in self.CASs if i != '<STR_LIT>'] <EOL>if all([i in _Laliberte_Heat_Capacity_ParametersDict for i in wCASs]):<EOL><INDENT>methods.append(LALIBERTE)<EOL>self.wCASs = wCASs<EOL>self.index_w = self.CASs.index('<STR_LIT>')<EOL><DEDENT><DEDENT>self.all_methods = set(methods)<EOL>


T = T/<NUM_LIT><EOL>return R*(((a4*T + a3)*T + a2)*T + a1)<EOL>

r'''Calculates liquid heat capacity using the model developed in [1]_.

    .. math::
        \frac{C}{R}=\sum_{j=0}^3 A_{j+1} \left(\frac{T}{100}\right)^j

    Parameters
    ----------
    T : float
        Temperature [K]
    a1-a4 : float
        Coefficients

    Returns
    -------
    Cp : float
        Liquid heat capacity, [J/mol/K]

    Notes
    -----
    Most often form used in [1]_.
    Analytical integrals are available for this expression.

    Examples
    --------
    >>> Zabransky_cubic(298.15, 20.9634, -10.1344, 2.8253, -0.256738)
    75.31462591538556

    References
    ----------
    .. [1] Zabransky, M., V. Ruzicka Jr, V. Majer, and Eugene S. Domalski.
       Heat Capacity of Liquids: Critical Review and Recommended Values.
       2 Volume Set. Washington, D.C.: Amer Inst of Physics, 1996.


if method == PERRY151:<EOL><INDENT>H2 = (self.PERRY151_const*T2 + <NUM_LIT:0.5>*self.PERRY151_lin*T2**<NUM_LIT:2> <EOL>- self.PERRY151_quadinv/T2 + self.PERRY151_quad*T2**<NUM_LIT:3>/<NUM_LIT>)<EOL>H1 = (self.PERRY151_const*T1 + <NUM_LIT:0.5>*self.PERRY151_lin*T1**<NUM_LIT:2> <EOL>- self.PERRY151_quadinv/T1 + self.PERRY151_quad*T1**<NUM_LIT:3>/<NUM_LIT>)<EOL>return (H2-H1)*calorie<EOL><DEDENT>elif method == CRCSTD:<EOL><INDENT>return (T2-T1)*self.CRCSTD_Cp<EOL><DEDENT>elif method == LASTOVKA_S:<EOL><INDENT>dH = (Lastovka_solid_integral(T2, self.similarity_variable)<EOL>- Lastovka_solid_integral(T1, self.similarity_variable))<EOL>return property_mass_to_molar(dH, self.MW)<EOL><DEDENT>elif method in self.tabular_data:<EOL><INDENT>return float(quad(self.calculate, T1, T2, args=(method))[<NUM_LIT:0>])<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>

r'''Method to calculate the integral of a property with respect to
        temperature, using a specified method. Implements the analytical
        integrals of all available methods except for tabular data.

        Parameters
        ----------
        T1 : float
            Lower limit of integration, [K]
        T2 : float
            Upper limit of integration, [K]
        method : str
            Method for which to find the integral

        Returns
        -------
        integral : float
            Calculated integral of the property over the given range,
            [`units*K`]


methods = []<EOL>Tmins, Tmaxs = [], []<EOL>if self.CASRN and self.CASRN in _PerryI and '<STR_LIT:c>' in _PerryI[self.CASRN]:<EOL><INDENT>self.PERRY151_Tmin = _PerryI[self.CASRN]['<STR_LIT:c>']['<STR_LIT>'] if _PerryI[self.CASRN]['<STR_LIT:c>']['<STR_LIT>'] else <NUM_LIT:0><EOL>self.PERRY151_Tmax = _PerryI[self.CASRN]['<STR_LIT:c>']['<STR_LIT>'] if _PerryI[self.CASRN]['<STR_LIT:c>']['<STR_LIT>'] else <NUM_LIT><EOL>self.PERRY151_const = _PerryI[self.CASRN]['<STR_LIT:c>']['<STR_LIT>']<EOL>self.PERRY151_lin = _PerryI[self.CASRN]['<STR_LIT:c>']['<STR_LIT>']<EOL>self.PERRY151_quad = _PerryI[self.CASRN]['<STR_LIT:c>']['<STR_LIT>']<EOL>self.PERRY151_quadinv = _PerryI[self.CASRN]['<STR_LIT:c>']['<STR_LIT>']<EOL>methods.append(PERRY151)<EOL>Tmins.append(self.PERRY151_Tmin); Tmaxs.append(self.PERRY151_Tmax)<EOL><DEDENT>if self.CASRN in CRC_standard_data.index and not np.isnan(CRC_standard_data.at[self.CASRN, '<STR_LIT>']):<EOL><INDENT>self.CRCSTD_Cp = float(CRC_standard_data.at[self.CASRN, '<STR_LIT>'])<EOL>methods.append(CRCSTD)<EOL><DEDENT>if self.MW and self.similarity_variable:<EOL><INDENT>methods.append(LASTOVKA_S)<EOL>Tmins.append(<NUM_LIT:1.0>); Tmaxs.append(<NUM_LIT>)<EOL><DEDENT>self.all_methods = set(methods)<EOL>if Tmins and Tmaxs:<EOL><INDENT>self.Tmin, self.Tmax = min(Tmins), max(Tmaxs)<EOL><DEDENT>

r'''Method which picks out coefficients for the specified chemical
        from the various dictionaries and DataFrames storing it. All data is
        stored as attributes. This method also sets :obj:`Tmin`, :obj:`Tmax`,
        and :obj:`all_methods` as a set of methods for which the data exists for.

        Called on initialization only. See the source code for the variables at
        which the coefficients are stored. The coefficients can safely be
        altered once the class is initialized. This method can be called again
        to reset the parameters.


return Zabransky_quasi_polynomial(T, self.Tc, *self.coeffs)<EOL>

r'''Method to actually calculate heat capacity as a function of
        temperature.

        Parameters
        ----------
        T : float
            Temperature, [K]

        Returns
        -------
        Cp : float
            Liquid heat capacity as T, [J/mol/K]


Vc = Vc*<NUM_LIT><EOL>sigma = <NUM_LIT>*Vc**(<NUM_LIT:1>/<NUM_LIT>)*Zc**(-<NUM_LIT>)<EOL>return sigma<EOL>

r'''Calculates Lennard-Jones molecular diameter.
    Uses critical volume and compressibility. CSP method by [1]_.

    .. math::
        \sigma = 0.1866 V_c^{1/3} Z_c^{-6/5}

    Parameters
    ----------
    Vc : float
        Critical volume of fluid [m^3/mol]
    Zc : float
        Critical compressibility of fluid, [-]

    Returns
    -------
    sigma : float
        Lennard-Jones molecular diameter, [Angstrom]

    Notes
    -----
    Vc is originally in units of mL/mol.

    Examples
    --------
    Monofluorobenzene

    >>> sigma_Stiel_Thodos(0.000271, 0.265)
    5.94300853971033

    References
    ----------
    .. [1] Stiel, L. I., and George Thodos. "Lennard-Jones Force Constants
       Predicted from Critical Properties." Journal of Chemical & Engineering
       Data 7, no. 2 (April 1, 1962): 234-36. doi:10.1021/je60013a023


epsilon_k = <NUM_LIT>*Tb<EOL>return epsilon_k<EOL>

r'''Calculates Lennard-Jones depth of potential-energy minimum.
    Uses boiling temperature. CSP method by [1]_.

    .. math::
        \epsilon/k = 1.15 T_b

    Parameters
    ----------
    Tb : float
        Boiling temperature [K]

    Returns
    -------
    epsilon_k : float
        Lennard-Jones depth of potential-energy minimum over k, [K]

    Notes
    -----

    Examples
    --------
    >>> epsilon_Bird_Stewart_Lightfoot_boiling(357.85)
    411.5275

    References
    ----------
    .. [1] Bird, R. Byron, Warren E. Stewart, and Edwin N. Lightfoot.
       Transport Phenomena, Revised 2nd Edition. New York:
       John Wiley & Sons, Inc., 2006


def collision_integral_Neufeld_Janzen_Aziz(Tstar, l=<NUM_LIT:1>, s=<NUM_LIT:1>):

if (l, s) not in Neufeld_collision:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>A, B, C, D, E, F, G, H, R, S, W, P = Neufeld_collision[(l, s)]<EOL>omega = A/Tstar**B + C/exp(D*Tstar) + E/exp(F*Tstar)<EOL>if (l, s) in [(<NUM_LIT:1>, <NUM_LIT:1>), (<NUM_LIT:1>, <NUM_LIT:2>), (<NUM_LIT:3>, <NUM_LIT:3>)]:<EOL><INDENT>omega += G/exp(H*Tstar)<EOL><DEDENT>if (l, s) not in [(<NUM_LIT:1>, <NUM_LIT:1>), (<NUM_LIT:1>, <NUM_LIT:2>)]:<EOL><INDENT>omega += R*Tstar**B*sin(S*Tstar**W-P)<EOL><DEDENT>return omega<EOL>

r'''Calculates Lennard-Jones collision integral for any of 16 values of
    (l,j) for the wide range of 0.3 < Tstar < 100. Values are accurate to
    0.1 % of actual values, but the calculation of actual values is
    computationally intensive and so these simplifications are used, developed
    in [1]_.

    .. math::
        \Omega_D = \frac{A}{T^{*B}} + \frac{C}{\exp(DT^*)} +
        \frac{E}{\exp(FT^{*})} + \frac{G}{\exp(HT^*)} + RT^{*B}\sin(ST^{*W}-P)

    Parameters
    ----------
    Tstar : float
        Reduced temperature of the fluid [-]
    l : int
        term
    s : int
        term

    Returns
    -------
    Omega : float
        Collision integral of A and B

    Notes
    -----
    Acceptable pairs of (l,s) are (1, 1), (1, 2), (1, 3), (1, 4), (1, 5),
    (1, 6), (1, 7), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (3, 3), (3, 4),
    (3, 5), and (4, 4).

    .. math::
        T^* = \frac{k_b T}{\epsilon}

    Results are very similar to those of the more modern formulation,
    `collision_integral_Kim_Monroe`.

    Calculations begin to yield overflow errors in some values of (l, 2) after
    Tstar = 75, beginning with (1, 7). Also susceptible are (1, 5) and (1, 6).

    Examples
    --------
    >>> collision_integral_Neufeld_Janzen_Aziz(100, 1, 1)
    0.516717697672334

    References
    ----------
    .. [1] Neufeld, Philip D., A. R. Janzen, and R. A. Aziz. "Empirical
       Equations to Calculate 16 of the Transport Collision Integrals
       Omega(l, S)* for the Lennard-Jones (12-6) Potential." The Journal of
       Chemical Physics 57, no. 3 (August 1, 1972): 1100-1102.
       doi:10.1063/1.1678363


epsilon_k = <NUM_LIT>*Tc*Zc**<NUM_LIT><EOL>return epsilon_k<EOL>

r'''Calculates Lennard-Jones depth of potential-energy minimum.
    Uses Critical temperature and critical compressibility. CSP method by [1]_.

    .. math::
        \epsilon/k = 65.3 T_c Z_c^{3.6}

    Parameters
    ----------
    Tc : float
        Critical temperature of fluid [K]
    Zc : float
        Critical compressibility of fluid, [-]

    Returns
    -------
    epsilon_k : float
        Lennard-Jones depth of potential-energy minimum over k, [K]

    Notes
    -----

    Examples
    --------
    Fluorobenzene

    >>> epsilon_Stiel_Thodos(358.5, 0.265)
    196.3755830305783

    References
    ----------
    .. [1] Stiel, L. I., and George Thodos. "Lennard-Jones Force Constants
       Predicted from Critical Properties." Journal of Chemical & Engineering
       Data 7, no. 2 (April 1, 1962): 234-36. doi:10.1021/je60013a023


Vb = Vb*<NUM_LIT><EOL>sigma = <NUM_LIT>*Vb**(<NUM_LIT:1>/<NUM_LIT>)<EOL>return sigma<EOL>

r'''Calculates Lennard-Jones molecular diameter.
    Uses molar volume of liquid at boiling. CSP method by [1]_.

    .. math::
        \sigma = 1.166V_{b,liq}^{1/3}

    Parameters
    ----------
    Vb : float
        Boiling molar volume of liquid [m^3/mol]

    Returns
    -------
    sigma : float
        Lennard-Jones collision integral, [Angstrom]

    Notes
    -----
    Original units of Vb are mL/mol.

    Examples
    --------
    >>> sigma_Bird_Stewart_Lightfoot_boiling(0.0001015)
    5.439018856944655

    References
    ----------
    .. [1] Bird, R. Byron, Warren E. Stewart, and Edwin N. Lightfoot.
       Transport Phenomena, Revised 2nd Edition. New York:
       John Wiley & Sons, Inc., 2006


epsilon_k = <NUM_LIT>*Tm<EOL>return epsilon_k<EOL>

r'''Calculates Lennard-Jones depth of potential-energy minimum.
    Uses melting temperature. CSP method by [1]_.

    .. math::
        \epsilon/k = 1.92T_m

    Parameters
    ----------
    Tm : float
        Melting temperature [K]

    Returns
    -------
    epsilon_k : float
        Lennard-Jones depth of potential-energy minimum over k, [K]

    Notes
    -----

    Examples
    --------
    >>> epsilon_Bird_Stewart_Lightfoot_melting(231.15)
    443.808

    References
    ----------
    .. [1] Bird, R. Byron, Warren E. Stewart, and Edwin N. Lightfoot.
       Transport Phenomena, Revised 2nd Edition. New York:
       John Wiley & Sons, Inc., 2006


Vc = Vc*<NUM_LIT>  <EOL>sigma = <NUM_LIT>*Vc**(<NUM_LIT:1>/<NUM_LIT>)<EOL>return sigma<EOL>

r'''Calculates Lennard-Jones molecular diameter.
    Uses critical volume. CSP method by [1]_.

    .. math::
        \sigma = 0.841 V_c^{1/3}

    Parameters
    ----------
    Vc : float
        Critical volume of fluid [m^3/mol]

    Returns
    -------
    sigma : float
        Lennard-Jones molecular diameter, [Angstrom]

    Notes
    -----
    Original units of Vc are mL/mol.

    Examples
    --------
    >>> sigma_Bird_Stewart_Lightfoot_critical_1(0.000268)
    5.422184116631474

    References
    ----------
    .. [1] Bird, R. Byron, Warren E. Stewart, and Edwin N. Lightfoot.
       Transport Phenomena, Revised 2nd Edition. New York:
       John Wiley & Sons, Inc., 2006


Pc = Pc/<NUM_LIT><EOL>sigma = <NUM_LIT>*(Tc/Pc)**(<NUM_LIT:1>/<NUM_LIT>)<EOL>return sigma<EOL>

r'''Calculates Lennard-Jones molecular diameter.
    Uses critical temperature and pressure. CSP method by [1]_.

    .. math::
        \sigma = 2.3647 \left(\frac{T_c}{P_c}\right)^{1/3}

    Parameters
    ----------
    Tc : float
        Critical temperature of fluid [K]
    Pc : float
        Critical pressure of fluid [Pa]

    Returns
    -------
    sigma : float
        Lennard-Jones molecular diameter, [Angstrom]

    Notes
    -----
    Original units of Pc are atm. Further regressions with other parameters
    were performed in [1]_ but are not included here, except for
    `sigma_Tee_Gotoh_Steward_2`.

    Examples
    --------
    >>> sigma_Tee_Gotoh_Steward_1(560.1, 4550000)
    5.48402779790962

    References
    ----------
    .. [1] Tee, L. S., Sukehiro Gotoh, and W. E. Stewart. "Molecular
       Parameters for Normal Fluids. Lennard-Jones 12-6 Potential." Industrial
       & Engineering Chemistry Fundamentals 5, no. 3 (August 1, 1966): 356-63.
       doi:10.1021/i160019a011