carbatpy.models.coupled ======================= .. py:module:: carbatpy.models.coupled Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/carbatpy/models/coupled/heat_pump_simple/index /autoapi/carbatpy/models/coupled/hp_for_opt/index /autoapi/carbatpy/models/coupled/orc_simple_v2/index /autoapi/carbatpy/models/coupled/read_cycle_structure/index Attributes ---------- .. autoapisummary:: carbatpy.models.coupled._RESULTS_ carbatpy.models.coupled.FLUID carbatpy.models.coupled.DIRNAME carbatpy.models.coupled.FILE_NAME carbatpy.models.coupled.FLUID Classes ------- .. autoapisummary:: carbatpy.models.coupled.OrganicRankineCycle carbatpy.models.coupled.HeatPump Functions --------- .. autoapisummary:: carbatpy.models.coupled.plot_cycle_structure carbatpy.models.coupled.read_hp_results Package Contents ---------------- .. py:data:: _RESULTS_ .. py:class:: OrganicRankineCycle(fluids, fixed_points, components=[]) 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. .. py:method:: calc_orc(verbose=False) calculate a simple organic rankine cycle (ORC) working with two sensible storages (or source and sink). At the moment the machine model is just for a constant isentropic efficiency. The initial states are provided by the Fluid-instances. The pressures have to be selected carefully, they are not tested at the moment. 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". :param verbose: should values be printed? The deault is False :type verbose: Boolean, optional :returns: **eta_orc** -- thermal efficiency of ORC. :rtype: flaot .. py:method:: hp_plot(f_name=_RESULTS_ + '\\last_T_H_dot_plot_orc', fig_ax=[]) plots the heat pump cycle and stores it to the given file (name) :param f_name: where to write the results and the plot. :type f_name: string, optional :param fig_ax: instances with figure and axes to plot into. If Empty a new one will be generated. default =[] :type fig_ax: list (length 2), optional :rtype: None. .. py:data:: FLUID :value: 'Propane * Butane * Pentane * Hexane' .. py:data:: DIRNAME :value: '..//..//data' .. py:data:: FILE_NAME :value: 'orc_structure.xlsx' .. py:function:: plot_cycle_structure(fname, dirname=DIRNAME, cycle_name='cycle', format_='png', engine='circo') read an Excel file with information about the cycle structure and use graphviz for visualization, a file is generated. :param fname: the excel filename. :type fname: string :param dirname: the directory name to read the file and to store afterwards. The default is DIRNAME. :type dirname: string, optional :param cycle_name: name of the cycle. The default is "cyle". :type cycle_name: string, optional :param format: plot-format (png, pdf etc). The default is "png". :type format: String, optional :param engine: an engine name from graphviz (dot, circo etc.). The default is "circo". :type engine: string, optional :rtype: None. .. py:class:: HeatPump(fluids, fixed_points, components=[]) 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. .. py:method:: 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) 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 :param fluid_numbers: the working fluid index and the secondary fluid index. :type fluid_numbers: list of two integers :param h_dot_min_: wanted heat flow rate [W]. :type h_dot_min_: float :param h_out_w_: specific enthalpy of the working fluid at the exit [J/kg]. :type h_out_w_: float :param h_limit_s_: specific enthalpy of the secondary fluid at the exit [J/kg]. The default is np.NAN. :type h_limit_s_: float, optional :param points_: number of t-h points along the heat exchanger. The default is 50. :type points_: integer, optional :param d_temp_separation_min_: the minimum approach temperature in K. The default is 0.5. :type d_temp_separation_min_: float, optional :param calc_type_: select the calculation type (only one implemented for now). The default is "const". :type calc_type_: string, optional :param pinch: 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 "" :type pinch: string, optional :param name_: name of the heat exchanger. The default is "evaporator". :type name_: string, optional :param plot_info: 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. :type plot_info: dictionary, optional :param verbose_: additional printing/plotting. The default is False. :type verbose_: Boolean, optional :returns: **w_after_condenser** -- actual output state of the working fluid [T,p,h,v,s,q]. :rtype: list .. py:method:: calc_heat_pump(plot_info={}, variations=['', ''], verbose=False) 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. :param temps_wanted: 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! :type temps_wanted: np.array([float,float]) :param verbose: should values be printed? The deault is False :type verbose: Boolean, optional :returns: **COP** -- coefficient of performace. :rtype: flaot .. py:method:: hp_plot(f_name=_RESULTS_ + '\\last_T_H_dot_plot_hp') plots the heat pump cycle and stores it to the given file (name) :rtype: None. .. py:function:: read_hp_results(filename=_RESULTS_ + '\\last_T_H_dot_plot_hp_evaluation_dict.npy') Reading the evaluation results dictionary of the heat pump :param filename: name of the numpy file. The default is _RESULTS_+"\last_T_H_dot_plot_hp". :type filename: string, optional :returns: **loaded_dict** -- the saved results. :rtype: dictionary .. py:data:: FLUID :value: 'Propane * Butane * Pentane * Hexane'