carbatpy.models.coupled.heat_pump_simple

Version for new FlowDevices

Changed on 2024-07-18

@author: atakan

Attributes

FLUID

Classes

HeatPump

Heat pump class for simple thermodynamic calculations for energy storage

Functions

read_hp_results([filename])

Reading the evaluation results dictionary of the heat pump

Module Contents

class carbatpy.models.coupled.heat_pump_simple.HeatPump(fluids, fixed_points, components=[])[source]

Heat pump class for simple thermodynamic calculations for energy storage

Two pairwase storages at two different temperatures are assumed, always starting at room temperature (around 300K). Thus, three fluids are expected: the working fluid, the storage fluid or sink at high temperature (h) and the source storage fluid at low temperature. The minimum and maximum temperatures of all storags are fixed and the heat flow rate to the high-T storage are given. Also, isentropic efficiencies are fixed so far, but they should use a function later.

calculate_hex(fluid_numbers, h_dot_min_, h_out_w_, h_limit_s_=np.nan, points_=50, d_temp_separation_min_=0.5, calc_type_='const', pinch='', name_='evaporator', plot_info={}, verbose_=True)[source]

Utility function to calculate the T-h_dot curves and secondary fluid

mass flow rates for a heat exchanger. it returns the state of the working fluid at the heat exchanger exit. while

Parameters:
  • fluid_numbers (list of two integers) – the working fluid index and the secondary fluid index.

  • h_dot_min (float) – wanted heat flow rate [W].

  • h_out_w (float) – specific enthalpy of the working fluid at the exit [J/kg].

  • h_limit_s (float, optional) – specific enthalpy of the secondary fluid at the exit [J/kg]. The default is np.NAN.

  • points (integer, optional) – number of t-h points along the heat exchanger. The default is 50.

  • d_temp_separation_min (float, optional) – the minimum approach temperature in K. The default is 0.5.

  • calc_type (string, optional) – select the calculation type (only one implemented for now). The default is “const”.

  • pinch (string, optional) – shall a minimization of the mean temperture difference be performed? “”-> no, “secondary”-> output state of secondary fluid will be varied, “working”-> the ouput state of the working fluid will be varied. Default is “”

  • name (string, optional) – name of the heat exchanger. The default is “evaporator”.

  • plot_info (dictionary, optional) – if not empty a Figure, an Axes, a list of What shall be plotted, a list with the colour/styles and a list with the labels must be passed. in “what”, the two numbers coincide with the fluid THERMO order. The x-shift can be used in cycle calculations, to shift the curves, by the value (it will be added). The names in the dictionary are: “fig”, “ax”, “what”,”col”, “label”, “x-shift”. Default is empty.

  • verbose (Boolean, optional) – additional printing/plotting. The default is False.

Returns:

w_after_condenser – actual output state of the working fluid [T,p,h,v,s,q].

Return type:

list

calc_heat_pump(plot_info={}, variations=['', ''], verbose=False)[source]

calculate a simple compression heat pump

working with two sensible storages (or source and sink). At the moment the compressor model is just for a constant isentropic efficiency. An isenthalpic throttle is used for expnsion. The initial states are provided by the Fluid-instances. The pressures have to be selected carefully, they are not tested at the moment. The two desired storage temperatures are an input, and will be varied to meet the desired minmum approach temperatures in the heat exchangers. For optimization, the pressure levels of the cycle could be used within a second script. Several parameters are fixed along a calculation, this is in the dictionary “self.fixed_points”. It can turn out that the foreseen evaporator exit temperature of the secondary(cooling) fluid is below the temperature of the isenthalpic temperature of the fluid coming out of the throttle. In this case the secondary exit temperature is increased.

Parameters:
  • temps_wanted (np.array([float,float])) – the two (high and low) temperatures to store at, may be varied towards the temperature of the surrounding, if the second law of thermodynamics requires this. UNUSED at the moment!

  • verbose (Boolean, optional) – should values be printed? The deault is False

Returns:

COP – coefficient of performace.

Return type:

flaot

hp_plot(f_name=_RESULTS_ + '\\last_T_H_dot_plot_hp')[source]

plots the heat pump cycle and stores it to the given file (name)

Return type:

None.

carbatpy.models.coupled.heat_pump_simple.read_hp_results(filename=_RESULTS_ + '\\last_T_H_dot_plot_hp_evaluation_dict.npy')[source]

Reading the evaluation results dictionary of the heat pump

Parameters:

filename (string, optional) – name of the numpy file. The default is _RESULTS_+”last_T_H_dot_plot_hp”.

Returns:

loaded_dict – the saved results.

Return type:

dictionary

carbatpy.models.coupled.heat_pump_simple.FLUID = 'Propane * Butane * Pentane * Hexane'[source]