Thermodynamic Models for Heat Pumps

A physics-based Python library for heat pump simulation.

First-principles dynamic models for air-source, ground-source, and water-source heat pumps — covering DHW, space heating, and space cooling.

tmhp solves the closed refrigerant cycle at every time step using CoolProp as the equation-of-state backend. The same model code 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

ASHPB / GSHPB / WSHPB plus the space-conditioning ASHP / GSHP — each one a 1-stop page with source-side mechanics, composed subsystem variants, and API reference.

Models
Tutorials

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

Tutorials
API Reference

Every model, support module, and helper exposed by the tmhp package, with full type signatures.

API Reference
Validation

ASHPB 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