Skip to main content

Python bindings for LibraryFEMTherm – THMZ file parsing and thermal simulation data

Project description

LibraryFEMTherm

C++20 static library for reading, writing, and manipulating THERM (.thmz) files. Provides data structures and serialization for thermal models, materials, boundary conditions, gases, glazing systems, and CMA data. Optional Python bindings via pybind11.

Requirements

  • CMake 3.8+
  • C++20 compiler (MSVC 2022, GCC 11+, Clang 14+)
  • Ninja or Visual Studio generator
  • Python 3.11+ (only when building Python bindings)

Building

C++ only (default)

cmake --preset default
cmake --build build/default --config Release

C++ with Python bindings

cmake --preset python
cmake --build build/python --config Release

Manual configuration (Visual Studio generator)

cmake -G "Visual Studio 17 2022" -A x64 -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release

Add -DBUILD_PYTHON_BINDINGS=ON to include Python bindings.

CMake presets

Preset Description Python bindings C++ tests
default C++ only OFF ON
python C++ with Python bindings ON ON

CLion and VS Code automatically detect these presets.

Running tests

ctest --test-dir build/python -C Release -V

This runs both C++ Google Tests and Python pytest tests (when built with the python preset).

CMake options

Option Default Description
BUILD_PYTHON_BINDINGS OFF Build Python bindings via pybind11
BUILD_LibraryFEMTHERM_TESTING ON Build C++ test targets

Python bindings

Install from PyPI:

pip install libraryfemtherm

Or build from source with BUILD_PYTHON_BINDINGS=ON (see above).

import pylibraryfemtherm as fem

# Load a THMZ file
model = fem.load_model_from_zip_file("sample-sill.thmz")
print(f"Polygons:   {len(model.polygons)}")
print(f"Boundaries: {len(model.boundary_conditions)}")

# Save to XML string
xml = fem.save_model_to_string(model)

# Save to a new THMZ file
fem.save_model_to_zip_file(model, "output.thmz")

# Work with ZIP contents directly
contents = fem.zip.unzip_files("sample.thmz", [fem.zip.MATERIALS_FILE_NAME])
db = fem.MaterialsDB()
db.load_from_string(contents[fem.zip.MATERIALS_FILE_NAME])

For comprehensive Python API documentation with examples, see doc/python.md.

Project structure

src/
  BCSteadyState/     # Steady-state boundary conditions
  BCTransient/       # Transient boundary conditions
  CMA/               # CMA (Component Modeling Approach) data
  Common/            # Shared utilities
  Gases/             # Gas properties and mixtures
  Materials/         # Material definitions (solid, cavity, radiation)
  THMZ/              # ThermModel, geometry, preferences, properties, zip I/O
  LibraryUtilities/  # Common helpers
  Schemas/           # XML/JSON schemas
python/
  src/               # pybind11 binding source files
  tests/             # pytest test suite
tst/
  units/             # C++ Google Test files
  products/          # Test THMZ data files
cmake/               # CMake macros and compiler config

Dependencies (fetched automatically)

Project details


Download files

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

Source Distribution

libraryfemtherm-0.20.0.tar.gz (487.2 kB view details)

Uploaded Source

Built Distributions

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

libraryfemtherm-0.20.0-cp313-cp313-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.13Windows x86-64

libraryfemtherm-0.20.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

libraryfemtherm-0.20.0-cp313-cp313-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

libraryfemtherm-0.20.0-cp313-cp313-macosx_10_15_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.13macOS 10.15+ x86-64

libraryfemtherm-0.20.0-cp312-cp312-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.12Windows x86-64

libraryfemtherm-0.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

libraryfemtherm-0.20.0-cp312-cp312-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

libraryfemtherm-0.20.0-cp312-cp312-macosx_10_15_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12macOS 10.15+ x86-64

libraryfemtherm-0.20.0-cp311-cp311-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.11Windows x86-64

libraryfemtherm-0.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

libraryfemtherm-0.20.0-cp311-cp311-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

libraryfemtherm-0.20.0-cp311-cp311-macosx_10_15_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11macOS 10.15+ x86-64

File details

Details for the file libraryfemtherm-0.20.0.tar.gz.

File metadata

  • Download URL: libraryfemtherm-0.20.0.tar.gz
  • Upload date:
  • Size: 487.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for libraryfemtherm-0.20.0.tar.gz
Algorithm Hash digest
SHA256 97e2d0cb4993e74d6f31183b148e23cc0765ade7e1435b9eace23662a7d18dbc
MD5 f35c16f1ea90cbab3f3ceeb336d6f2d5
BLAKE2b-256 2f4df066d4c72ae56d4ec12719071e7e7d6c11597aafdb2cc141f5069ec1c18b

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.20.0.tar.gz:

Publisher: workflow.yml on LBNL-ETA/LibraryFEMTherm

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

File details

Details for the file libraryfemtherm-0.20.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.20.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 28279b79f7f59649630ea9673927140b6de79bfa624ec400045c421014b1d16f
MD5 fa08464bd608bd63b1b801154b573ca9
BLAKE2b-256 cb731cef023040115b2c3dca3be2ca5700e1ef927ba86926d8b015c25bd81e5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.20.0-cp313-cp313-win_amd64.whl:

Publisher: workflow.yml on LBNL-ETA/LibraryFEMTherm

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

File details

Details for the file libraryfemtherm-0.20.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.20.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 af2bac9fcc82578cfe2713d2f65c77a709e13ec8b51d313dfa9d2cf7e88d105b
MD5 3aa62f81120d8a12415c356a516e5b68
BLAKE2b-256 8a99f3f7a99fba35d2835c632d2b13f5f62ccc26ab5a10d435ef4afff5123c8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.20.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: workflow.yml on LBNL-ETA/LibraryFEMTherm

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

File details

Details for the file libraryfemtherm-0.20.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.20.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cd750ab7c03b3f384950650e9f56cdda8e551f20b9037df63738d06d254af5cd
MD5 6e20c9ec1a309d04bbd47bc17acbd37d
BLAKE2b-256 f9f4f1c1e40fd11443ae14cdff86abec4bf1a10b5ddca07356a3586cb5e4686b

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.20.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: workflow.yml on LBNL-ETA/LibraryFEMTherm

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

File details

Details for the file libraryfemtherm-0.20.0-cp313-cp313-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.20.0-cp313-cp313-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 470495c37d819de953b74dca1264b6e5346dd75a3080652316449e6f9f6da1dd
MD5 34532b02a835f3e4b696efa402fe665c
BLAKE2b-256 2836277fa7614b3c8310ffc478483dabfc4d6ce95f04c3316c3403c3f6db1640

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.20.0-cp313-cp313-macosx_10_15_x86_64.whl:

Publisher: workflow.yml on LBNL-ETA/LibraryFEMTherm

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

File details

Details for the file libraryfemtherm-0.20.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.20.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3d63108e298bf08cab5a4f6af84e23fe595ca79af5948f613163f8f28a9e4fad
MD5 be92cf663b60435d344270ca997994c2
BLAKE2b-256 8c95e0c66e7c9bda7ed7755382278e2f7db97ec4f42557300e7ada3ce53dbb62

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.20.0-cp312-cp312-win_amd64.whl:

Publisher: workflow.yml on LBNL-ETA/LibraryFEMTherm

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

File details

Details for the file libraryfemtherm-0.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 359c89e87135575c83fe1f01c88afe0b7ea2c16bf94888182b15e13c868413cc
MD5 0867a95fa2bf309e22ad8f05c562dc0b
BLAKE2b-256 beb019991ab8a0179fb31db2272bc8fbc86cf6d35f426bcca77bc66834773b24

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: workflow.yml on LBNL-ETA/LibraryFEMTherm

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

File details

Details for the file libraryfemtherm-0.20.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.20.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 57966d23487208c5cb4b6032b629324736a1df58025725a2a0ec0c2e59b0d702
MD5 a4661e450abb95d96a76927ee52d986b
BLAKE2b-256 3e9825ea02fae28b718bb29d14a9e04531ff5cc2b09e87868cd53e3d548a55b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.20.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: workflow.yml on LBNL-ETA/LibraryFEMTherm

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

File details

Details for the file libraryfemtherm-0.20.0-cp312-cp312-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.20.0-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 6e41488a0ea25e478916ff3d8efd6282960b2702c957b48fb104a891c4063697
MD5 97a02582a742968c9b99da3f59ba287e
BLAKE2b-256 de6274db2e1cb49518a6842016aea28325c6366cfa79ce61281f8acfa7ddd7c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.20.0-cp312-cp312-macosx_10_15_x86_64.whl:

Publisher: workflow.yml on LBNL-ETA/LibraryFEMTherm

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

File details

Details for the file libraryfemtherm-0.20.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.20.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 afa3f473bc067274d48ade0deb96ee2c322d915d97eac99a7b5487177aa20f3a
MD5 45c9e658a7e7d9d810bb8498cb0b3e88
BLAKE2b-256 d987d3809297ea907910083b6b16158f86f417a610e547f8904bb271224d5251

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.20.0-cp311-cp311-win_amd64.whl:

Publisher: workflow.yml on LBNL-ETA/LibraryFEMTherm

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

File details

Details for the file libraryfemtherm-0.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 11679a08e4dee31d3fb113908a5abed1bd99bd457de58238f6fc5ba73e67c042
MD5 08eedf90f72a1e061e34bc22f5fa5820
BLAKE2b-256 e197d59e4125649e37d953db9d2d0f2e219bc7c95e612c17bc3e711930d4d462

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: workflow.yml on LBNL-ETA/LibraryFEMTherm

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

File details

Details for the file libraryfemtherm-0.20.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.20.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f2195b036e6ee62c5368ea9cdaa8c6d549459a9fe3212898be959d02bfdc85fd
MD5 9565eef571437735ebb6cc4f0f09333e
BLAKE2b-256 2e1afdf4b155d0d2fe170df7079f9b21f7909d91c377e8637daead7cfcaa77f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.20.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: workflow.yml on LBNL-ETA/LibraryFEMTherm

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

File details

Details for the file libraryfemtherm-0.20.0-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.20.0-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 d7a4cba17d44f4f33ab60245f0eba1801314eff9cf9e60678cd7fbefc6bf5bf5
MD5 5826097b17d4f8bbe692ed69d90bd082
BLAKE2b-256 5cf014c734e7c07abb20ac4f66285539133ed708fa88608cfd5e81097595b8ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.20.0-cp311-cp311-macosx_10_15_x86_64.whl:

Publisher: workflow.yml on LBNL-ETA/LibraryFEMTherm

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page