def _fmix(self, T, rho, A):
        r"""Specific Helmholtz energy of air-water interaction

        Parameters
        ----------
        T : float
            Temperature, [K]
        rho : float
            Density, [kg/m³]
        A : float
            Mass fraction of dry air in humid air, [kg/kg]

        Returns
        -------
        prop : dict
          Dictionary with helmholtz energy and derivatives:

            * fir, [kJ/kg]
            * fira: :math:`\left.\frac{\partial f_{mix}}{\partial A}\right|_{T,\rho}`, [kJ/kg]
            * firt: :math:`\left.\frac{\partial f_{mix}}{\partial T}\right|_{A,\rho}`, [kJ/kgK]
            * fird: :math:`\left.\frac{\partial f_{mix}}{\partial \rho}\right|_{A,T}`, [kJ/m³kg²]
            * firaa: :math:`\left.\frac{\partial^2 f_{mix}}{\partial A^2}\right|_{T, \rho}`, [kJ/kg]
            * firat: :math:`\left.\frac{\partial^2 f_{mix}}{\partial A \partial T}\right|_{\rho}`, [kJ/kgK]
            * firad: :math:`\left.\frac{\partial^2 f_{mix}}{\partial A \partial \rho}\right|_T`, [kJ/m³kg²]
            * firtt: :math:`\left.\frac{\partial^2 f_{mix}}{\partial T^2}\right|_{A, \rho}`, [kJ/kgK²]
            * firdt: :math:`\left.\frac{\partial^2 f_{mix}}{\partial \rho \partial T}\right|_A`, [kJ/m³kg²K]
            * firdd: :math:`\left.\frac{\partial^2 f_{mix}}{\partial \rho^2}\right|_{A, T}`, [kJ/m⁶kg³]

        References
        ----------
        IAPWS, Guideline on an Equation of State for Humid Air in Contact with
        Seawater and Ice, Consistent with the IAPWS Formulation 2008 for the
        Thermodynamic Properties of Seawater, Table 10,
        http://www.iapws.org/relguide/SeaAir.html
        """
        Ma = Air.M/1000
        Mw = IAPWS95.M/1000
        vir = _virial(T)
        Baw = vir["Baw"]
        Bawt = vir["Bawt"]
        Bawtt = vir["Bawtt"]
        Caaw = vir["Caaw"]
        Caawt = vir["Caawt"]
        Caawtt = vir["Caawtt"]
        Caww = vir["Caww"]
        Cawwt = vir["Cawwt"]
        Cawwtt = vir["Cawwtt"]

        # Eq T45
        f = 2*A*(1-A)*rho*R*T/Ma/Mw*(Baw+3*rho/4*(A/Ma*Caaw+(1-A)/Mw*Caww))
        # Eq T46
        fa = 2*rho*R*T/Ma/Mw*((1-2*A)*Baw+3*rho/4*(
            A*(2-3*A)/Ma*Caaw+(1-A)*(1-3*A)/Mw*Caww))
        # Eq T47
        ft = 2*A*(1-A)*rho*R/Ma/Mw*(
            Baw+T*Bawt+3*rho/4*(A/Ma*(Caaw+T*Caawt)+(1-A)/Mw*(Caww+T*Cawwt)))
        # Eq T48
        fd = A*(1-A)*R*T/Ma/Mw*(2*Baw+3*rho*(A/Ma*Caaw+(1-A)/Mw*Caww))
        # Eq T49
        faa = rho*R*T/Ma/Mw*(-4*Baw+3*rho*((1-3*A)/Ma*Caaw-(2-3*A)/Mw*Caww))
        # Eq T50
        fat = 2*rho*R/Ma/Mw*(1-2*A)*(Baw+T*Bawt)+3*rho**2*R/2/Ma/Mw*(
            A*(2-3*A)/Ma*(Caaw+T*Caawt)+(1-A)*(1-3*A)/Mw*(Caww+T*Cawwt))
        # Eq T51
        fad = 2*R*T/Ma/Mw*((1-2*A)*Baw+3/2*rho*(
            A*(2-3*A)/Ma*Caaw+(1-A)*(1-3*A)/Mw*Caww))
        # Eq T52
        ftt = 2*A*(1-A)*rho*R/Ma/Mw*(2*Bawt+T*Bawtt+3*rho/4*(
            A/Ma*(2*Caawt+T*Caawtt)+(1-A)/Mw*(2*Cawwt+T*Cawwtt)))
        # Eq T53
        ftd = 2*A*(1-A)*R/Ma/Mw*(Baw+T*Bawt+3*rho/2*(
            A/Ma*(Caaw+T*Caawt)+(1-A)/Mw*(Caww+T*Cawwt)))
        # Eq T54
        fdd = 3*A*(1-A)*R*T/Ma/Mw*(A/Ma*Caaw+(1-A)/Mw*Caww)

        prop = {}
        prop["fir"] = f/1000
        prop["fira"] = fa/1000
        prop["firt"] = ft/1000
        prop["fird"] = fd/1000
        prop["firaa"] = faa/1000
        prop["firat"] = fat/1000
        prop["firad"] = fad/1000
        prop["firtt"] = ftt/1000
        prop["firdt"] = ftd/1000
        prop["firdd"] = fdd/1000
        return prop
def _fmix ( self , T , rho , A ) : Ma = Air . M / 1000 Mw = IAPWS95 . M / 1000 vir = _virial ( T ) Baw = vir [ "Baw" ] Bawt = vir [ "Bawt" ] Bawtt = vir [ "Bawtt" ] Caaw = vir [ "Caaw" ] Caawt = vir [ "Caawt" ] Caawtt = vir [ "Caawtt" ] Caww = vir [ "Caww" ] Cawwt = vir [ "Cawwt" ] Cawwtt = vir [ "Cawwtt" ] f = 2 * A * ( 1 - A ) * rho * R * T / Ma / Mw * ( Baw + 3 * rho / 4 * ( A / Ma * Caaw + ( 1 - A ) / Mw * Caww ) ) fa = 2 * rho * R * T / Ma / Mw * ( ( 1 - 2 * A ) * Baw + 3 * rho / 4 * ( A * ( 2 - 3 * A ) / Ma * Caaw + ( 1 - A ) * ( 1 - 3 * A ) / Mw * Caww ) ) ft = 2 * A * ( 1 - A ) * rho * R / Ma / Mw * ( Baw + T * Bawt + 3 * rho / 4 * ( A / Ma * ( Caaw + T * Caawt ) + ( 1 - A ) / Mw * ( Caww + T * Cawwt ) ) ) fd = A * ( 1 - A ) * R * T / Ma / Mw * ( 2 * Baw + 3 * rho * ( A / Ma * Caaw + ( 1 - A ) / Mw * Caww ) ) faa = rho * R * T / Ma / Mw * ( - 4 * Baw + 3 * rho * ( ( 1 - 3 * A ) / Ma * Caaw - ( 2 - 3 * A ) / Mw * Caww ) ) fat = 2 * rho * R / Ma / Mw * ( 1 - 2 * A ) * ( Baw + T * Bawt ) + 3 * rho ** 2 * R / 2 / Ma / Mw * ( A * ( 2 - 3 * A ) / Ma * ( Caaw + T * Caawt ) + ( 1 - A ) * ( 1 - 3 * A ) / Mw * ( Caww + T * Cawwt ) ) fad = 2 * R * T / Ma / Mw * ( ( 1 - 2 * A ) * Baw + 3 / 2 * rho * ( A * ( 2 - 3 * A ) / Ma * Caaw + ( 1 - A ) * ( 1 - 3 * A ) / Mw * Caww ) ) ftt = 2 * A * ( 1 - A ) * rho * R / Ma / Mw * ( 2 * Bawt + T * Bawtt + 3 * rho / 4 * ( A / Ma * ( 2 * Caawt + T * Caawtt ) + ( 1 - A ) / Mw * ( 2 * Cawwt + T * Cawwtt ) ) ) ftd = 2 * A * ( 1 - A ) * R / Ma / Mw * ( Baw + T * Bawt + 3 * rho / 2 * ( A / Ma * ( Caaw + T * Caawt ) + ( 1 - A ) / Mw * ( Caww + T * Cawwt ) ) ) fdd = 3 * A * ( 1 - A ) * R * T / Ma / Mw * ( A / Ma * Caaw + ( 1 - A ) / Mw * Caww ) prop = { } prop [ "fir" ] = f / 1000 prop [ "fira" ] = fa / 1000 prop [ "firt" ] = ft / 1000 prop [ "fird" ] = fd / 1000 prop [ "firaa" ] = faa / 1000 prop [ "firat" ] = fat / 1000 prop [ "firad" ] = fad / 1000 prop [ "firtt" ] = ftt / 1000 prop [ "firdt" ] = ftd / 1000 prop [ "firdd" ] = fdd / 1000 return prop
r"""Specific Helmholtz energy of air-water interaction

        Parameters
        ----------
        T : float
            Temperature, [K]
        rho : float
            Density, [kg/m³]
        A : float
            Mass fraction of dry air in humid air, [kg/kg]

        Returns
        -------
        prop : dict
          Dictionary with helmholtz energy and derivatives:

            * fir, [kJ/kg]
            * fira: :math:`\left.\frac{\partial f_{mix}}{\partial A}\right|_{T,\rho}`, [kJ/kg]
            * firt: :math:`\left.\frac{\partial f_{mix}}{\partial T}\right|_{A,\rho}`, [kJ/kgK]
            * fird: :math:`\left.\frac{\partial f_{mix}}{\partial \rho}\right|_{A,T}`, [kJ/m³kg²]
            * firaa: :math:`\left.\frac{\partial^2 f_{mix}}{\partial A^2}\right|_{T, \rho}`, [kJ/kg]
            * firat: :math:`\left.\frac{\partial^2 f_{mix}}{\partial A \partial T}\right|_{\rho}`, [kJ/kgK]
            * firad: :math:`\left.\frac{\partial^2 f_{mix}}{\partial A \partial \rho}\right|_T`, [kJ/m³kg²]
            * firtt: :math:`\left.\frac{\partial^2 f_{mix}}{\partial T^2}\right|_{A, \rho}`, [kJ/kgK²]
            * firdt: :math:`\left.\frac{\partial^2 f_{mix}}{\partial \rho \partial T}\right|_A`, [kJ/m³kg²K]
            * firdd: :math:`\left.\frac{\partial^2 f_{mix}}{\partial \rho^2}\right|_{A, T}`, [kJ/m⁶kg³]

        References
        ----------
        IAPWS, Guideline on an Equation of State for Humid Air in Contact with
        Seawater and Ice, Consistent with the IAPWS Formulation 2008 for the
        Thermodynamic Properties of Seawater, Table 10,
        http://www.iapws.org/relguide/SeaAir.html