Heat Pump and Refrigeration Methods =================================== OpenPinch treats Heat Pump and refrigeration work as an integration problem first and a cycle problem second. A candidate cycle is valuable only if its hot and cold utility streams improve the process heat cascade after the minimum-approach shifts have been applied. The public workflows are: - ``problem.target.direct_heat_pump(...)`` - ``problem.target.indirect_heat_pump(...)`` - ``problem.target.direct_refrigeration(...)`` - ``problem.target.indirect_refrigeration(...)`` These workflows prepare the relevant process or site-level background cascade and then dispatch one of the configured HPR backends through ``HPR_TYPE``. Direct and Indirect Placement ----------------------------- Direct HPR Direct methods place the HPR streams inside the selected process or zone boundary. They answer questions such as: can a heat pump move heat from this zone's available hot side to this zone's heat demand? Indirect HPR Indirect methods place the HPR streams against the aggregated utility picture. They are useful for Total Site-style questions where heat may be lifted from one zone's surplus into another zone's demand through a utility layer. In both cases, OpenPinch evaluates the HPR as additional hot and cold utility streams and recomputes the residual process heat cascade. Carnot screening remains a thermodynamic screening workflow. The simulated vapour-compression backends use an annualized total-cost objective: .. math:: J = C_{\mathrm{HPR,annualized}} + P_{\mathrm{feasibility}} The annualized cost includes compressor electricity, residual external hot and cold utilities, compressor capital, and HPR heat-exchanger capital. Compressor capital is based on installed work capacity. HPR heat-exchanger capital is based on installed heat-transfer duty, using the summed condenser and evaporator external duties. Capital is annualized with the configured discount rate and service life. Simulated-cycle integration accounting uses one combined residual GCC. The hot side includes background hot streams, HPR condenser streams, and ambient hot streams. The cold side includes background cold streams, HPR evaporator streams, and ambient cold streams. The first and last points of the pocket-free residual GCC define the remaining external hot and cold utility duties. Those duties are priced as operating cost; ordinary residual utility shortfall is not treated as a feasibility penalty. Feasibility penalties are reserved for integration or cycle-model problems: - residual GCC pockets introduced by the HPR candidate - opposite-utility regression relative to the baseline residual GCC - cycle allocation, subcooling, or related backend penalties For heat-pump solves, opposite-utility regression means increasing residual cold utility above the baseline. For refrigeration solves, it means increasing residual hot utility above the baseline. Temperature and Duty Conventions -------------------------------- For heat pumping, the cycle absorbs heat from a source side and rejects useful heat on a sink side: .. math:: Q_\mathrm{cond} = Q_\mathrm{evap} + W For refrigeration, the useful duty is on the evaporator side: .. math:: Q_\mathrm{cond} = Q_\mathrm{cool} + W OpenPinch uses shifted process temperatures during targeting. The configured ``DT_CONT_HP`` and related approach settings therefore represent integration temperature margins, not necessarily equipment terminal temperature differences from a detailed exchanger design. Optimisation Coordinates and Duty Allocation -------------------------------------------- HPR optimisation variables are deliberately not final physical duties. The targeting services decode the optimiser vector into: - ambient hot/cold duty from ``x_amb`` - condenser and evaporator temperatures from ``x_cond`` and ``x_evap`` - approach settings such as subcooling and internal heat-exchanger temperature differences where the selected backend supports them - total base duty scales such as ``Q_heat_base`` and ``Q_cool_base`` - process-side availability arrays such as ``Q_heat_available`` and ``Q_cool_available`` at the candidate stage temperatures The backend classes then decode bounded split fractions into requested stage duties: .. math:: Q_{\mathrm{request},i} = f_i\left(Q_\mathrm{base} - \sum_{j