carbatpy.utils.exergy_loss ========================== .. py:module:: carbatpy.utils.exergy_loss .. autoapi-nested-parse:: Created on Sun Nov 5 10:01:28 2023 @author: atakan Attributes ---------- .. autoapisummary:: carbatpy.utils.exergy_loss.n_pos carbatpy.utils.exergy_loss.FLUID Functions --------- .. autoapisummary:: carbatpy.utils.exergy_loss.s_irr_flow carbatpy.utils.exergy_loss.exergy_loss_alternative carbatpy.utils.exergy_loss.exergy_loss_flow Module Contents --------------- .. py:data:: n_pos :value: [0, 2, 4] .. py:function:: s_irr_flow(states, mass_flow_rates, verbose=False, entropy_position=4) Irreversible entropy production rate for two fluid flows or an adiabatic heat exchanger. It is intended to use for heat pumps, where energy is stored at low and at high temperature. :param states: the states to analyse ordered as entering fluids[:,0,:] and exiting fluid [:,1,:] the states are as defined in fluid_props, with the 4th value being the specific entropy in J/(kg K)(see below). :type states: numpy-array [n,2,7] :param mass_flow_rates: the mass flow rates in SI units (kg/s). :type mass_flow_rates: numpy array of length n :param verbose: should we print? The default is False. :type verbose: Boolean, optional :param entropy_position: in the states array, where to find thge specific entropy. The default is 4. :type entropy_position: Integer, optional :returns: entropy production rate in W/K. :rtype: float .. py:function:: exergy_loss_alternative(states, mass_flow_rates, power_in=0.0, temp_surrounding=cb._T_SURROUNDING, verbose=False, entropy_position=4, enthaply_position=2) assumption both fluids enter in equilibrium with the surrounding if entropy is reduced, T is below the environment T and exergy is positive but this not correct yet, should be implemented correctly .. py:function:: exergy_loss_flow(states, mass_flow_rates, power_in=0.0, temp_surrounding=cb._T_SURROUNDING, verbose=False, entropy_position=4) Calculate the exergy loss rate for two fluid flows or an adiabatic heat exchanger. It is intended to use for heat pumps, where energy is stored at low and at high temperature. Uses s_irr_flow. All parameters are described there, except one. Gouy-Stodola :param states: DESCRIPTION. :type states: TYPE :param mass_flow_rates: DESCRIPTION. :type mass_flow_rates: TYPE :param power_in: DESCRIPTION. The default is 0.. :type power_in: TYPE, optional :param temp_surrounding: surrounding temperature in K. The default is cb._T_SURROUNDING. :type temp_surrounding: Float, optional :param verbose: DESCRIPTION. The default is False. :type verbose: TYPE, optional :param entropy_position: DESCRIPTION. The default is 4. :type entropy_position: TYPE, optional :returns: Exergy loss rate in W. :rtype: float .. py:data:: FLUID :value: 'Propane * Pentane'