Skip to main content

py-tbd

Thermal Bridging & Derating (TBD) for OpenStudio — native Python port.

py-tbd is a line-for-line Python port of the rd2/tbd Ruby gem. It autodetects major thermal bridges (balconies, parapets, corners, …) in an OpenStudio model and derates the outside-facing opaque constructions (walls, roofs, exposed floors) to account for the added heat loss.

This is the library (importable as tbd). The OpenStudio measure wrapper that ships with the Ruby gem is out of scope for v1.

Status

Feature-complete port of TBD 3.6.0 (commit dd6f12f8 — see UPSTREAM.md). All of psi.rb, geo.rb and ua.rb are ported: the KHI/PSI libraries, the geometry/topology layer, the UA' reporting, and the full inputs/derate/ process/exit engine.

Parity is enforced by golden fixtures generated from the Ruby gem (OpenStudio 3.11.0) and asserted by 150+ tests, including exact process parity across all nine .osm fixtures, JSON-override and uprating cases, and the bilingual UA' report. The one deliverable intentionally left out of v1 is the OpenStudio Measure wrapper (this is the importable library).

Install

py-tbd depends on the OpenStudio SDK Python bindings and the Python ports of TBD's dependency gems:

  • openstudio — OpenStudio SDK bindings
  • oslg — logging (port of the OSlg gem)
  • osut — OpenStudio utilities (port of the OSut gem / pyOSut)
  • py-topolys — 3D topology (port of the Topolys gem)
  • jsonschema — validates tbd.json inputs against tbd.schema.json
python -m venv .venv
.venv/bin/pip install openstudio oslg osut jsonschema \
    "py-topolys @ git+https://github.com/canmet-energy/py-topolys.git"
.venv/bin/pip install -e .

On Debian/Ubuntu Python (PEP 668), if python -m venv cannot bootstrap pip, create it with python3 -m venv --without-pip .venv and bootstrap pip via curl -sS https://bootstrap.pypa.io/get-pip.py | .venv/bin/python.

Usage

import openstudio
import tbd

translator = openstudio.osversion.VersionTranslator()
model = translator.loadModel(openstudio.path("model.osm")).get()

argh = {"option": "poor (BETBG)"}
result = tbd.process(model, argh)   # -> {"io": ..., "surfaces": ...}

Tests / parity

Parity with the Ruby gem is enforced by golden reference fixtures generated from the gem (tools/gen_golden.rb) plus a unit test per public method. See the plan and UPSTREAM.md.

.venv/bin/pytest tests/unit    # fast, per-method
.venv/bin/pytest tests/e2e     # end-to-end (ports of the Ruby RSpec suite)

License

MIT — © 2020-2026 Denis Bourgeois & Dan Macumber.

Download files

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

Source Distribution

canmet_tbd-3.5.2.tar.gz (644.1 kB view details)

Uploaded Source

Built Distribution

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

canmet_tbd-3.5.2-py3-none-any.whl (48.9 kB view details)

Uploaded Python 3

File details

Details for the file canmet_tbd-3.5.2.tar.gz.

File metadata

  • Download URL: canmet_tbd-3.5.2.tar.gz
  • Upload date:
  • Size: 644.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for canmet_tbd-3.5.2.tar.gz
Algorithm Hash digest
SHA256 fb307ae5488a408503a70a4a363bdc55398ca9a17b264d827c097beaaef11db6
MD5 6bda85e5c0cbc77917525475ef54ae74
BLAKE2b-256 c074856242c5f4eaee8d9284f92ab4f81fe3bbddbbce75bfd16754d39582f076

See more details on using hashes here.

Provenance

The following attestation bundles were made for canmet_tbd-3.5.2.tar.gz:

Publisher: publish.yml on canmet-energy/py-tbd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file canmet_tbd-3.5.2-py3-none-any.whl.

File metadata

  • Download URL: canmet_tbd-3.5.2-py3-none-any.whl
  • Upload date:
  • Size: 48.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for canmet_tbd-3.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f16a21ace21996e209d74fff2fbf793a29ba50b018106d9fb7034769255f986f
MD5 88d8c5e97a84486f8fdb6de94fa90122
BLAKE2b-256 e9d15ae2904b7ab3bf461f2a57366dc4a5263f1916122abf1b5adcbf0ca2e31e

See more details on using hashes here.

Provenance

The following attestation bundles were made for canmet_tbd-3.5.2-py3-none-any.whl:

Publisher: publish.yml on canmet-energy/py-tbd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

3.5.2 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