Skip to main content
#+title: Pyhydronic: Heat Flow and Thermal Comfort
#+author: Perry Kundert
#+email: perry@dominionrnd.com
#+OPTIONS: ^:nil toc:nil

* Pyhydronic

Thermostats measure the wrong thing. People don't feel the air temperature; they feel the heat
they lose -- by convection to the air, and by radiation to every surface around them. A room at
21C with a wall of cold windows feels cool; the same room over a warm radiant floor feels warm.

Pyhydronic (=import hydronic=) computes both halves of that:

- =hydronic.heat= :: Heat flow between interconnected /spaces/ (rooms, slabs, hydronic zones, the
ground, the outdoors) through /portals/ (walls, windows, floors) of some area and R value. This
estimates every surface's temperature, and hence each room's mean radiant temperature.
- =hydronic.comfort= :: Fanger's comfort equation (ISO 7730): the Predicted Mean Vote (PMV) and
Predicted Percentage Dissatisfied (PPD) for any air and radiant temperature, humidity, air
speed, clothing and activity -- and the air temperature =setpoint= yielding neutral comfort.

Pure Python with no dependencies, for Python 2.7 and 3. It has controlled a multi-zone hydronic
radiant slab home for over a decade.

* Install

#+BEGIN_EXAMPLE
python3 -m pip install pyhydronic # or: python2 -m pip install pyhydronic
#+END_EXAMPLE

For Python 2 systems without access to PyPI, use the source; eg. as a git submodule:

#+BEGIN_EXAMPLE
git submodule add https://github.com/pjkundert/pyhydronic.git pyhydronic
ln -s pyhydronic/hydronic hydronic # or add pyhydronic/ to PYTHONPATH
#+END_EXAMPLE

* Use

How comfortable is a room with 21C air, if cold windows drag its mean radiant temperature (t_r)
down to 17C? What air temperature would make it comfortable?

#+BEGIN_SRC python
from hydronic import fanger

f = fanger( clo=1.0, met=1.2, hum=0.4 ) # winter clothes, sitting/standing, 40% RH
f.PMV( t_a=21, t_r=21 ) # -0.24: neutral
f.PMV( t_a=21, t_r=17 ) # -0.64: slightly cool
f.PPD( t_a=21, t_r=17 ) # 13.6% dissatisfied
f.setpoint( t_r=17 ) # 26.9C air restores neutral comfort
f.setpoint( t_r=25 ) # 19.8C suffices over a warm radiant floor
#+END_SRC

Where does t_r come from? Model the room (US units: F, ft, R values), and ask:

#+BEGIN_SRC python
from hydronic import space, portal, environment, C_to_F, F_to_C, ft

world = space( 'world', ( 1e4, 1e4, 1e4 ), environment( C_to_F( -20 )), now=0 )
room = space( 'room', ( ft(12), ft(14), ft(9) ), environment( C_to_F( 21 )), now=0 )
world.contains( room )
room.connects( portal( 'walls', 'world', ( ft(26), ft(9) ), R=20 ))
room.connects( portal( 'window', 'world', ( ft(8), ft(5) ), R=2 ))
room.connects( portal( 'ceiling', 'world', room.size, R=50 ))

F_to_C( room.radiant( world )) # 19.1C: walls 19.7C, ceiling 20.4C, window 10.6C
world.absorb( world.compute( now=60 )) # advance 1 minute; room loses ~36 BTU
#+END_SRC

The [[file:examples/][examples]] build a two room house on a radiant slab, and compare an air-temperature thermostat
against a comfort (PMV) thermostat; and reproduce the classic "comfort lines" of neutral air vs.
radiant temperature:

#+BEGIN_EXAMPLE
python examples/radiant_room.py --mode air # sunroom air held at 21C, but PMV -0.3
python examples/radiant_room.py --mode comfort # sunroom held at PMV ~0
python examples/comfort_lines.py
#+END_EXAMPLE

* More

| [[file:README-model.org][README-model.org]] | The heat flow model: spaces, portals, radiant floors, time steps |
| [[file:README-comfort.org][README-comfort.org]] | Fanger's PMV / PPD: inputs, validation, caveats |
| [[file:README-development.org][README-development.org]] | Nix, make, testing under Python 2.7 and 3, releasing |
| [[file:docs/README.org][docs/]] | Reference papers |

* License and Commercial Support

Dual licensed: GPLv3 (or later), or a commercial license from Dominion Research & Development
Corp.; see [[file:LICENSE][LICENSE]]. We help thermostat, controller and building automation vendors put comfort
-- not just air temperature -- at the center of their products: [[https://dominionrnd.com/products/hydronic-comfort][dominionrnd.com]].

Metadata

Release files for pyhydronic 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyhydronic 2.0.0
File Size Uploaded Provenance Actions
pyhydronic-2.0.0.tar.gz 54.3 kB With provenance Details for pyhydronic-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyhydronic 2.0.0
File Interpreter ABI Platform Actions
pyhydronic-2.0.0-py2.py3-none-any.whl Python 3, Python 2 none any Details for pyhydronic-2.0.0-py2.py3-none-any.whl

Total release size: 92.0 kB

Release files / pyhydronic-2.0.0.tar.gz

Download URL pyhydronic-2.0.0.tar.gz
Size 54.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7cc72c88a9960249dca035e32b885f8f4bb3ce4024dea6881175ff510ff1ecc6
BLAKE2b-256 checksum
How to use checksums
88d354ee71520af34737cec1d8d0b63870bc6bb81fe85ef3f59ca6f98fcb9291
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / pyhydronic-2.0.0-py2.py3-none-any.whl

Download URL pyhydronic-2.0.0-py2.py3-none-any.whl
Size 37.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
c4956a95562ee3d6004d61c507c0a321601c1083750d2fb15b5d1f354cb27a75
BLAKE2b-256 checksum
How to use checksums
9935a4a32069fce2c1dcfc6f10f2ca5a4828b22206313ccfd0262a68e83d2f9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for pyhydronic 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyhydronic-2.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files Full provenance

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