TMHP: Thermodynamic Models for Heat Pumps

A physics-based Python library for heat pump simulation.

First-principles dynamic models for heat pumps: air-, ground-, and water-source DHW boilers plus air- and ground-source space-conditioning heat pumps for heating and cooling.

TMHP’s released cycle-resolved families solve the closed refrigerant cycle at every time step using CoolProp as the equation-of-state backend. The shared core applies across refrigerants and operating envelopes, with no manufacturer-specific curve fits and no per-unit recalibration.

Getting Started

Install with uv, run your first steady-state, then drive a 24-hour dynamic simulation.

Getting Started
Concepts

Why first-principles, how the cycle is assembled, and how to read the diagnostic flags every call returns.

Concepts
Models

Released source/sink model families: ASHPB, GSHPB, and WSHPB for DHW; ASHP and GSHP for space heating/cooling.

Models
Tutorials

Focused walkthroughs — swap refrigerants, drive realistic schedules, compose PV / STC / ESS subsystems.

Tutorials
Integrations

Couple TMHP to EnergyPlus Python Plugins or export the current ASHPB reference adapter as FMI 2.0 / FMI 3.0 co-simulation FMUs.

Integrations
API Reference

Every model, support module, optional integration adapter, and helper exposed by the TMHP package, with full type signatures.

API Reference
Validation

The ASHPB reference case benchmarked against 15 Samsung EHS catalogue points — parity plot, per-point table, reproducibility.

Validation
Visualize

Plot a solved refrigerant cycle on a P–h chart using only CoolProp and Matplotlib.

Visualize thermodynamic cycle