Skip to main content

heatpumpmodel

Single-source implementation of the steady-state (bin-style) heat-pump performance model of

A. Rogeau, R. Vieubled, M. de la Ruche, G. Girard, "A generic methodology for mapping the performance of various heat pump configurations considering part-load behavior", Energy and Buildings 2024, https://doi.org/10.1016/j.enbuild.2024.114471

numpy is the only dependency. The package holds physics only: it knows nothing about a building stock, a weather reader or a simulation pipeline. Callers pass hourly arrays in and keep their own integration layer.

It exists so that buildingmodel and building_eload share one copy of the physics instead of two that drift apart (buildingmodel issue #47).

Install

pip install heatpumpmodel
# or, from a checkout:
pip install -e ".[dev]"

Use

import numpy as np
from heatpumpmodel import (
    Emitter, HeatPumpConfig, Mode, System, Technology,
    compute_T_base, hourly_power_split, scop, size_heat_pump,
)

# hourly series over a year: outdoor temperature (°C), relative humidity (%),
# and heat demand in any single consistent unit (it cancels in every ratio).
t_out = ...
rh = ...
demand = np.clip(20.0 - t_out, 0.0, None)

cfg = HeatPumpConfig(System.A_W, Mode.M, Emitter.MT, Technology.ON_OFF)
sizing = size_heat_pump(cfg, demand, t_out, compute_T_base(t_out))
p_h, p_e, p_h_backup = hourly_power_split(cfg, sizing, demand, t_out, rh=rh)

print(scop(p_h, p_e))            # seasonal COP

seasonal_performance(cfg, sizing, demand, t_out, rh=rh) bundles {"scop", "ecr", "peak_share"} in one call.

Configuration axes

Axis Values
System A_A (air/air), A_W (air/water), G_W (ground/water)
Mode M, M_SB, BA (bivalent alternative), BP (bivalent parallel)
Emitter FH 35 °C, LT 45 °C, MT 55 °C, HT 65 °C, FAN_COIL
Technology ON_OFF, BI_COMPRESSOR, INVERTER

Sub-models (COPCurve, DefrostModel, PartLoadModel, WeatherCompensation) are dataclasses on HeatPumpConfig and can be replaced with manufacturer-specific fits.

Conventions

  • Temperatures in °C, ΔT gaps in K.
  • Powers/demand in one arbitrary, self-cancelling unit.
  • Relative humidity in percent [0, 100] — the EPW convention.
  • Air-source configs (A/A, A/W) require an rh series: a missing, all-NaN or all-zero rh raises ValueError rather than silently skipping the defrost derate (which would leave SCOP ~5 % optimistic).
  • Every effective COP is floored at 1.0 — a heat pump never draws more electricity than the resistance backup would for the same heat.

Documentation

doc/heat_pump_model_spec.md is the implementation contract: equation-by-equation mapping to the paper, coefficient provenance (including the values resolved from the authors' Zenodo code rather than the PDF), and the documented deviations.

Tests

pytest                          # hermetic suite, synthetic climate
HEATPUMPMODEL_PARIS_EPW=/path/to/paris.epw pytest -m integration

The integration test reproduces the paper's Fig. 4 SCOP values and needs the authors' Paris-Montsouris TMY EPW; it skips when that file is not supplied. See its docstring for why an ERA5 Paris record does not substitute.

Licence

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

heatpumpmodel-0.1.0.tar.gz (28.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

heatpumpmodel-0.1.0-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

Details for the file heatpumpmodel-0.1.0.tar.gz.

File metadata

  • Download URL: heatpumpmodel-0.1.0.tar.gz
  • Upload date:
  • Size: 28.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.15

File hashes

Hashes for heatpumpmodel-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a651814ebb968dceb397fad58674acba71896d4f9b966e2b3962139547d5a553
MD5 58634b710def11572321d0e2209bb77d
BLAKE2b-256 c0adc4a2580cf79b3cbe255e7f68d264ee09c3bfe21cdcee8341dcbd2329c811

See more details on using hashes here.

File details

Details for the file heatpumpmodel-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: heatpumpmodel-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.15

File hashes

Hashes for heatpumpmodel-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a08236cf39cb563a4483ef6a4ffe60311e7eb88a6c2157c8eacdd7e077d36c38
MD5 6696d952175458005a7fa92ad76eec1c
BLAKE2b-256 cbbe6b0f26c2a0ebcc26c2e21360233f857e6e60ef7dc5f31e5617494bbdf602

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page