carbatpy.models.components.heat_exchanger_thermo_v2¶
Created on Sun May 21 08:51:33 2023
@author: atakan
Attributes¶
Classes¶
Class for static counter-flow heat exchanger |
Module Contents¶
- class carbatpy.models.components.heat_exchanger_thermo_v2.StaticHeatExchanger(fluids, h_dot_min, h_out_w, h_limit_s, **kwargs)[source]¶
Class for static counter-flow heat exchanger
means: no time dependence and no heat transfer coefficients * areas are used (UA)! Instead a minimum approach temperature is tried to be met. At the moment, this is mainly done by varying one of the mass flow rates. But this is sometimes not enough and a variation of the working fluid pressure will soon be included. Only the first law and second law will be checked (the latter must be improved).
- pinch_calc(verbose=False)[source]¶
Calculate the changes in enthalpy and temperature in the heat exchanger
counter-flow hex assumed! Both flows are isobaric. Is used to check, whether the second law is violated. The factor can be used to vary the mass flow rate of the working fluid, until no violation is found (done in root finding).
- Parameters:
verbose (boolean, optional) – if True, several variables will be printed out. Default is False.
- Raises:
Exception – if temperatures are not consistent.
- Returns:
m_dot_s (float) – secondary fluid mass flow rate (kg/s.
d_tempall (numpy-array) – The temperature differences along the counter-flow heat exchanger.
w_array (array) – properties of the working fluid along the heat exchanger (T,p,h, etc. see fluid class).
s_array (array) – properties of the secondary fluid along the heat exchanger (T,p,h, etc. see fluid class).
- pinch_root(h_out_s, secondary, verbose=False)[source]¶
Function for finding the minimum mean temperature difference in a heat exchanger, while not going below the minimum approach temperature.
The output enthalpy of the secondary fluid is set (as default) and the heat exchanger is evaluated.
- Parameters:
h_out_s (float) – the output enthalpy, default would be of the secondary fluid.
secondary (boolean) – shall the secondary fluid output be varied (or the working fluid)?
- Returns:
root tries to reach a value of 0.
- Return type:
mean T-difference, float
- find_pinch(secondary=True)[source]¶
Function tries to vary the secondary fluid enthalpy until a minimum approach temperature is reached. This also changes the mass flow rate. This is then also the new exit state within the heat exchanger. If this is also not succesful, self.warning is set to 1. This should be checked. :param secondary: shall the output state of the secondary (True) or the working
(False) fluid be varied? default = True
- Returns:
the optimized enthalpy of the secondary fluid.
- Return type:
float
- pinch_plot(plot_fname='', plotting=True)[source]¶
calculates the secondary fluid output state and mass flow, for the minimum approach temperature of the HeatExchanger instance. When wanted, this is also plotted
- Parameters:
plot_fname (string, optional) – file-name to store the plot. The default is “”.
plotting (Boolean, optional) – should it be plotted? The default is True.
- Returns:
m_dot_s (float) – mass flow raete of the secondary fluid in SI units (kg/s).
d_tempall (np.array) – the temperature differences between the two fluids along the heat exchanger.
w_array (np.array [self.points, 7]) – the states of the working fluid along the heat exchanger.
s_array (np.array [self.points, 7]) – the states of the secondary fluid along the heat exchanger.