vclibpy.components.heat_exchangers package
Subpackages
- vclibpy.components.heat_exchangers.heat_transfer package
- Submodules
- vclibpy.components.heat_exchangers.heat_transfer.air_to_wall module
- vclibpy.components.heat_exchangers.heat_transfer.constant module
- vclibpy.components.heat_exchangers.heat_transfer.heat_transfer module
- vclibpy.components.heat_exchangers.heat_transfer.pipe_to_wall module
- vclibpy.components.heat_exchangers.heat_transfer.vdi_atlas_air_to_wall module
AirSourceHeatExchangerGeometry
AirSourceHeatExchangerGeometry.A
AirSourceHeatExchangerGeometry.A_FreieOberflaecheRohr
AirSourceHeatExchangerGeometry.A_Rippen
AirSourceHeatExchangerGeometry.A_RohrInnen
AirSourceHeatExchangerGeometry.A_RohrUnberippt
AirSourceHeatExchangerGeometry.a
AirSourceHeatExchangerGeometry.alpha_S()
AirSourceHeatExchangerGeometry.char_length
AirSourceHeatExchangerGeometry.d_a
AirSourceHeatExchangerGeometry.d_i
AirSourceHeatExchangerGeometry.dicke_rippe
AirSourceHeatExchangerGeometry.eta_R()
AirSourceHeatExchangerGeometry.hoehe
AirSourceHeatExchangerGeometry.laenge
AirSourceHeatExchangerGeometry.lambda_R
AirSourceHeatExchangerGeometry.n_Rippen
AirSourceHeatExchangerGeometry.n_Rohre
AirSourceHeatExchangerGeometry.phi
AirSourceHeatExchangerGeometry.t_l
AirSourceHeatExchangerGeometry.t_q
AirSourceHeatExchangerGeometry.tiefe
AirSourceHeatExchangerGeometry.verjuengungsfaktor
VDIAtlasAirToWallTransfer
- vclibpy.components.heat_exchangers.heat_transfer.wall module
Submodules
vclibpy.components.heat_exchangers.economizer module
- class vclibpy.components.heat_exchangers.economizer.VaporInjectionEconomizerNTU(**kwargs)[source]
Bases:
BasicNTU
Economizer heat exchanger which is NTU based. Used only for vapor injection cycles, as calculations are purely based for two-phase and liquid estimations.
See parent class for more arguments.
Assumptions:
Default flow_type is counter_flow.
Default ratio_outer_to_inner_area is 1, as
pipes are nearly same diameter and length
Secondary heat transfer for alpha is disabled; gas,
liquid and two-phase models are used for both sides.
- calc(inputs, fs_state) -> (<class 'float'>, <class 'float'>)[source]
Calculate the heat exchanger based on the given inputs.
The flowsheet state can be used to save important variables during calculation for later analysis.
Both return values are used to check if the heat transfer is valid or not.
- Args:
inputs (Inputs): The inputs for the calculation. fs_state (FlowsheetState): The flowsheet state to save important variables.
- Returns:
- Tuple[float, float]:
error: Error in percentage between the required and calculated heat flow rates. dT_min: Minimal temperature difference (can be negative).
- calc_alpha_secondary(transport_properties)[source]
Calculate the secondary-medium heat transfer coefficient.
- Args:
transport_properties: Transport properties for the secondary medium.
- Returns:
float: The secondary-medium heat transfer coefficient.
- calc_transport_properties_secondary_medium(T, p=None)[source]
Calculate the transport properties for the selected secondary_medium.
- Args:
T (float): Temperature in K. p (float, optional): Pressure to use. Defaults to None.
- Returns:
media.TransportProperties: The calculated transport properties.
- property state_two_phase_inlet: ThermodynamicState
- property state_two_phase_outlet: ThermodynamicState
vclibpy.components.heat_exchangers.heat_exchanger module
- class vclibpy.components.heat_exchangers.heat_exchanger.HeatExchanger(A: float, wall_heat_transfer: HeatTransfer, secondary_heat_transfer: HeatTransfer, gas_heat_transfer: HeatTransfer, liquid_heat_transfer: HeatTransfer, two_phase_heat_transfer: TwoPhaseHeatTransfer, secondary_medium: str)[source]
Bases:
BaseComponent
,ABC
Class for a heat exchanger.
- Args:
- A (float):
Area of HE in m^2 for NTU calculation
- secondary_medium (str):
Name for secondary medium, e.g. water or air
- wall_heat_transfer (HeatTransfer):
Model for heat transfer inside wall
- secondary_heat_transfer (HeatTransfer):
Model for heat transfer from secondary medium to wall
- gas_heat_transfer (HeatTransfer):
Model for heat transfer from refrigerant gas to wall
- liquid_heat_transfer (HeatTransfer):
Model for heat transfer from refrigerant liquid to wall
- two_phase_heat_transfer (TwoPhaseHeatTransfer):
Model for heat transfer from refrigerant two phase to wall
- abstract calc(inputs: Inputs, fs_state: FlowsheetState) Tuple[float, float] [source]
Calculate the heat exchanger based on the given inputs.
The flowsheet state can be used to save important variables during calculation for later analysis.
Both return values are used to check if the heat transfer is valid or not.
- Args:
inputs (Inputs): The inputs for the calculation. fs_state (FlowsheetState): The flowsheet state to save important variables.
- Returns:
- Tuple[float, float]:
error: Error in percentage between the required and calculated heat flow rates. dT_min: Minimal temperature difference (can be negative).
- calc_Q_flow() float [source]
Calculate the total heat flow rate.
- Returns:
float: The total heat flow rate.
- calc_alpha_gas(transport_properties) float [source]
Calculate the gas-phase heat transfer coefficient.
- Args:
transport_properties: Transport properties for the gas phase.
- Returns:
float: The gas-phase heat transfer coefficient.
- calc_alpha_liquid(transport_properties) float [source]
Calculate the liquid-phase heat transfer coefficient.
- Args:
transport_properties: Transport properties for the liquid phase.
- Returns:
float: The liquid-phase heat transfer coefficient.
- calc_alpha_secondary(transport_properties) float [source]
Calculate the secondary-medium heat transfer coefficient.
- Args:
transport_properties: Transport properties for the secondary medium.
- Returns:
float: The secondary-medium heat transfer coefficient.
- calc_alpha_two_phase(state_q0, state_q1, inputs: Inputs, fs_state: FlowsheetState) float [source]
Calculate the two-phase heat transfer coefficient.
- Args:
state_q0: State at vapor quality 0. state_q1: State at vapor quality 1. inputs (Inputs): The inputs for the calculation. fs_state (FlowsheetState): The flowsheet state to save important variables.
- Returns:
float: The two-phase heat transfer coefficient.
- calc_secondary_cp(T: float, p=None)[source]
Calculate and set the heat capacity rate m_flow_cp of the secondary medium.
- Args:
T (float): Temperature of the secondary medium. p (float, optional): Pressure of the secondary medium. Defaults to None.
- calc_transport_properties_secondary_medium(T, p=None) TransportProperties [source]
Calculate the transport properties for the selected secondary_medium.
- Args:
T (float): Temperature in K. p (float, optional): Pressure to use. Defaults to None.
- Returns:
media.TransportProperties: The calculated transport properties.
- calc_wall_heat_transfer() float [source]
Calculate the heat transfer coefficient inside the wall.
- Returns:
float: The wall heat transfer coefficient.
- property m_flow_secondary_cp
vclibpy.components.heat_exchangers.moving_boundary_ntu module
- class vclibpy.components.heat_exchangers.moving_boundary_ntu.MovingBoundaryNTU(flow_type: str, ratio_outer_to_inner_area: float, **kwargs)[source]
-
Moving boundary NTU based heat exchanger.
See parent classe for arguments.
- iterate_area(dT_max, alpha_pri, alpha_sec, Q) float [source]
Iteratively calculates the required area for the heat exchange.
- Args:
dT_max (float): Maximum temperature differential. alpha_pri (float): Heat transfer coefficient for the primary medium. alpha_sec (float): Heat transfer coefficient for the secondary medium. Q (float): Heat flow rate.
- Returns:
float: Required area for heat exchange.
- separate_phases(state_max: ThermodynamicState, state_min: ThermodynamicState, p: float)[source]
Separates a flow with possible phase changes into three parts: subcooling (sc), latent phase change (lat), and superheating (sh) at the given pressure.
- Args:
state_max (ThermodynamicState): State with higher enthalpy. state_min (ThermodynamicState): State with lower enthalpy. p (float): Pressure of phase change.
- Returns:
- Tuple[float, float, float, ThermodynamicState, ThermodynamicState]:
Q_sc: Heat for subcooling. Q_lat: Heat for latent phase change. Q_sh: Heat for superheating. state_q0: State at vapor quality 0 and the given pressure. state_q1: State at vapor quality 1 and the given pressure.
- class vclibpy.components.heat_exchangers.moving_boundary_ntu.MovingBoundaryNTUCondenser(flow_type: str, ratio_outer_to_inner_area: float, **kwargs)[source]
Bases:
MovingBoundaryNTU
Condenser class which implements the actual calc method.
Assumptions: - No phase changes in secondary medium - cp of secondary medium is constant over heat-exchanger
See parent classes for arguments.
- calc(inputs: ~vclibpy.datamodels.Inputs, fs_state: ~vclibpy.datamodels.FlowsheetState) -> (<class 'float'>, <class 'float'>)[source]
Calculate the heat exchanger with the NTU-Method based on the given inputs.
The flowsheet state can be used to save important variables during calculation for later analysis.
Both return values are used to check if the heat transfer is valid or not.
- Args:
inputs (Inputs): The inputs for the calculation. fs_state (FlowsheetState): The flowsheet state to save important variables.
- Returns:
- Tuple[float, float]:
error: Error in percentage between the required and calculated heat flow rates. dT_min: Minimal temperature difference (can be negative).
- class vclibpy.components.heat_exchangers.moving_boundary_ntu.MovingBoundaryNTUEvaporator(flow_type: str, ratio_outer_to_inner_area: float, **kwargs)[source]
Bases:
MovingBoundaryNTU
Evaporator class which implements the actual calc method.
Assumptions: - No phase changes in secondary medium - cp of secondary medium is constant over heat-exchanger
See parent classes for arguments.
- calc(inputs: ~vclibpy.datamodels.Inputs, fs_state: ~vclibpy.datamodels.FlowsheetState) -> (<class 'float'>, <class 'float'>)[source]
Calculate the heat exchanger with the NTU-Method based on the given inputs.
The flowsheet state can be used to save important variables during calculation for later analysis.
Both return values are used to check if the heat transfer is valid or not.
- Args:
inputs (Inputs): The inputs for the calculation. fs_state (FlowsheetState): The flowsheet state to save important variables.
- Returns:
- Tuple[float, float]:
error: Error in percentage between the required and calculated heat flow rates. dT_min: Minimal temperature difference (can be negative).
vclibpy.components.heat_exchangers.ntu module
- class vclibpy.components.heat_exchangers.ntu.BasicNTU(flow_type: str, ratio_outer_to_inner_area: float, **kwargs)[source]
Bases:
HeatExchanger
,ABC
Moving boundary NTU based heat exchanger.
See parent class for more arguments.
- Args:
- flow_type (str):
Counter, Cross or parallel flow
- ratio_outer_to_inner_area (float):
The NTU method uses the overall heat transfer coefficient k and multiplies it with the outer area A (area of the secondary side). However, depending on the heat exchanger type, the areas may differ drastically. For instance in an air-to-water heat exchanger. The VDI-Atlas proposes the ratio of outer area to inner pipe area to account for this mismatch in sizes. The calculation follows the code in the function calc_k. Typical values are around 20-30.
- static calc_NTU(A: float, k: float, m_flow_cp: float) float [source]
Calculate the Number of Transfer Units (NTU) for the heat exchanger.
- Args:
A (float): Area of the heat exchanger. k (float): Overall heat transfer coefficient. m_flow_cp (float): Minimal heat capacity rates (m_flow*cp) between primary and secondary side.
- Returns:
float: Number of Transfer Units (NTU).
- calc_Q_ntu(dT_max: float, alpha_pri: float, alpha_sec: float, A: float) -> (<class 'float'>, <class 'float'>)[source]
Calculate the heat transfer and overall heat transfer coefficient for the heat exchanger based on NTU.
- Args:
dT_max (float): Maximum temperature differential. alpha_pri (float): Heat transfer coefficient for the primary medium. alpha_sec (float): Heat transfer coefficient for the secondary medium. A (float): Area of the heat exchanger.
- Returns:
Tuple[float, float]: Heat transfer and overall heat transfer coefficient.
- calc_R() float [source]
Calculate the R value, which is the ratio of heat capacity rates (m_flow*cp) of the primary to secondary medium.
- Returns:
float: R value.
- calc_eps(R: float, NTU: float) float [source]
Calculate the effectiveness (eps) of the heat exchanger based on NTU.
Source of implementation: EBC Lecture SimModelle.
- Args:
R (float): Ratio of heat capacity rates (m_flow*cp) of the primary to secondary medium. NTU (float): Number of Transfer Units.
- Returns:
float: Effectiveness (eps) of the heat exchanger.
- calc_k(alpha_pri: float, alpha_sec: float) float [source]
Calculate the overall heat transfer coefficient (k) of the heat exchanger.
- Args:
alpha_pri (float): Heat transfer coefficient for the primary medium. alpha_sec (float): Heat transfer coefficient for the secondary medium.
- Returns:
float: Overall heat transfer coefficient (k).