Heat Pump Cycle

Heat pump cycle incl. heat transfer.

Calculate the pressures and the mass flow rate to fulfill the heat transfer canditions for given (constant!) temperatures of the heat sink and source x=1 before the compressor with isentropic efficienc eta and x=0 entering the throttle. For now, the heat transfer coefficients are constant, but differing between superheated and saturated in the condenser. This is done by root finding for a fluid, taking the properties from Refprop or CoolProp, this has to be set globally (_props) at the moment, but will perhaps be included to the functions later. Will be used for sensitivity analysis and optimization (hopefully).

Created on Tue Feb 23 17:15:50 2021

@author: atakan

heat_pump_rp.check_bound(p, bounds)

Check whether the parametere p are within the bounds

Parameters
  • p (numpy.array) – parameters to be checked.

  • bounds (list of lists (len(2))) – list with lists of upper and lower limit for each bounded parameter.

Returns

True when within limits.

Return type

bool

heat_pump_rp.heat_pump_ht(p, eta, U, A, T_s, working_fluid, composition=[1.0], WF=ctREFPROP.ctREFPROP.REFPROPFunctionLibrary, rootfind=True, optim=False, bounds=None)

Heat pump cycle with isothermal source and sink, x=0 after condenser.

x=1 entering the compressor. For optimizing the two working fluid pressures or calculating states, COPs etc for optimization, the COP is relative to the reversible COP (Carnot).

Parameters
  • p (numpy.array, 3 floats) – with the pressures of evaporator and condenser and the mass flow rate (all SI Pa, kg/s.

  • eta (float) – compressor efficienvy (isentropic).

  • U (numpy.array, 3floats) – mean overall heat ransfer coefficients for evaporator, condenser(gas) condenser two-phase (W/m2/K).

  • A (numpy.array, 2 floats) – areas of evaporatorand condenser (m2).

  • T_s (numpy.array, 2 floats) – secondary fluid temperatures low and high in K.

  • working_fluid (coolprop or Refprop fluid) – DESCRIPTION.

  • composition (list or array) – mole fractions of each compound

  • WF (instance of REFPROPFluid (or empty)) – defines the fluid using REFPROP, output from setRPFluid

  • rootfind (Boolean, optional.) – are we finding the root? (T-differences according to heat exchanger size)

  • optim (Boolean, optional) – if true: output for optimization if false: output of several properties. The default is True.

  • bounds (not yet implemented) –

Returns

  • if rootfind == True – array with three differences of energy balances

  • if optim == True – rational efficiency (for optimization)

  • if False – state: array with all calculated states (T,p,x,h,s,rho …) q_w: all specific energies transfered (J/kg) A_hg: heat exchanger Area until condensation cop: COP of the cycle cop_carnot: Carnot-COP for the tempereatures of condenser and evaporator (superheating is neglected) eta_rational: ratio of the latter two COPs p_compr: Compressor Power (W) q_h_dot: Heat flow rate at high T (W).

heat_pump_rp.heat_pump_opti(para, eta, U, T_s, working_fluid, bounds, WF)

Function to optimize (the COP/COP_reversible) of a heat pump with isothermal heat source and heat sink. For further details see heat_pump_ht

Parameters
  • para (TYPE) – DESCRIPTION.

  • eta (TYPE) – DESCRIPTION.

  • U (TYPE) – DESCRIPTION.

  • T_s (TYPE) – DESCRIPTION.

  • working_fluid (TYPE) – DESCRIPTION.

  • bounds (TYPE) – DESCRIPTION.

  • WF (Instance of Refprop) – fluid mxture name/file are stored inside, output from setRPFluid

Returns

DESCRIPTION.

Return type

TYPE