Module huracan.components.heat_exchangers

System heat exchangers

Expand source code
# SPDX-FileCopyrightText: © 2021 Antonio López Rivera <antonlopezr99@gmail.com>
# SPDX-License-Identifier: GPL-3.0-only

"""
System heat exchangers
----------------------
"""

from huracan.engine import component


class heat_sink(component):
    """
    Heat sink
    ---------
    """
    def __init__(self,
                 eta,
                 PI=1
                 ):
        """
        :param eta:   Isentropic efficiency.
        """

        self.eta = eta
        self.PI  = PI

    def tf(self, gas):

        assert hasattr(self, 'Q_out'), \
            'Heat sink children component has no heat removed method implemented.'

        return gas.heat_exchange(eta=self.eta,
                                 PI=self.PI,
                                 cp=gas.cp(gas.t0),
                                 Q_ex=-self.Q_out(gas),
                                 )


class intercooler(heat_sink):           # TODO: implement coolant-based intercooling
    """
    Intercooler
    -----------
    """
    def __init__(self,
                 Q_out,
                 eta):
        """
        :param Q_out: Heat removed by the intercooler.
        :param eta:   Isentropic efficiency.
        """
        super().__init__(eta=eta)

        self.Q_out = lambda _: Q_out

    def Q_out(self, gas):
        """
        Heat removed by the intercooler.

        Parameters:
        * Gas
        * Coolant
        * Coolant mass flow
        * Contact area
        * Thermal exchange efficiency
        """
        pass

Classes

class heat_sink (eta, PI=1)

Heat Sink

:param eta: Isentropic efficiency.

Expand source code
class heat_sink(component):
    """
    Heat sink
    ---------
    """
    def __init__(self,
                 eta,
                 PI=1
                 ):
        """
        :param eta:   Isentropic efficiency.
        """

        self.eta = eta
        self.PI  = PI

    def tf(self, gas):

        assert hasattr(self, 'Q_out'), \
            'Heat sink children component has no heat removed method implemented.'

        return gas.heat_exchange(eta=self.eta,
                                 PI=self.PI,
                                 cp=gas.cp(gas.t0),
                                 Q_ex=-self.Q_out(gas),
                                 )

Ancestors

Subclasses

Methods

def tf(self, gas)
Expand source code
def tf(self, gas):

    assert hasattr(self, 'Q_out'), \
        'Heat sink children component has no heat removed method implemented.'

    return gas.heat_exchange(eta=self.eta,
                             PI=self.PI,
                             cp=gas.cp(gas.t0),
                             Q_ex=-self.Q_out(gas),
                             )
class intercooler (Q_out, eta)

Intercooler

:param Q_out: Heat removed by the intercooler. :param eta: Isentropic efficiency.

Expand source code
class intercooler(heat_sink):           # TODO: implement coolant-based intercooling
    """
    Intercooler
    -----------
    """
    def __init__(self,
                 Q_out,
                 eta):
        """
        :param Q_out: Heat removed by the intercooler.
        :param eta:   Isentropic efficiency.
        """
        super().__init__(eta=eta)

        self.Q_out = lambda _: Q_out

    def Q_out(self, gas):
        """
        Heat removed by the intercooler.

        Parameters:
        * Gas
        * Coolant
        * Coolant mass flow
        * Contact area
        * Thermal exchange efficiency
        """
        pass

Ancestors

Methods

def Q_out(self, gas)

Heat removed by the intercooler.

Parameters: * Gas * Coolant * Coolant mass flow * Contact area * Thermal exchange efficiency

Expand source code
def Q_out(self, gas):
    """
    Heat removed by the intercooler.

    Parameters:
    * Gas
    * Coolant
    * Coolant mass flow
    * Contact area
    * Thermal exchange efficiency
    """
    pass