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.18.0.tar.gz (485.9 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.18.0-cp313-cp313-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.13Windows x86-64

libraryfemtherm-0.18.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.18.0-cp313-cp313-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

libraryfemtherm-0.18.0-cp313-cp313-macosx_10_15_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.13macOS 10.15+ x86-64

libraryfemtherm-0.18.0-cp312-cp312-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.12Windows x86-64

libraryfemtherm-0.18.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.18.0-cp312-cp312-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

libraryfemtherm-0.18.0-cp312-cp312-macosx_10_15_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.12macOS 10.15+ x86-64

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

Uploaded CPython 3.11Windows x86-64

libraryfemtherm-0.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

libraryfemtherm-0.18.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.18.0.tar.gz.

File metadata

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

File hashes

Hashes for libraryfemtherm-0.18.0.tar.gz
Algorithm Hash digest
SHA256 8b0d5f25cd970cbbae36740ad9eb0ca62348e774185f1edd3ae90c943cd28a2b
MD5 dfba17e680f1eef0d041f2523d96facb
BLAKE2b-256 8c52d4a78f5caabe7a2ec294afbc9da99f3cf93addb2cbb1521e116427db9d47

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.18.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.18.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.18.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2d232050e73d36f846666c1382caac22fd950cbe1269771e78acd30c37c9165e
MD5 c714296d6455d36e64573f45567981f4
BLAKE2b-256 fa9ab14145d7ab0fc4669de2ca29eb56760750ae0eede136c49dde40e8187692

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.18.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.18.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.18.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5101c85a1df0672b14e75874fe861219311518a5d331a780c93ed8633149683b
MD5 9c33ea59b14319e950b819f5332e6ad8
BLAKE2b-256 281d95656ac1b033b661dca77445c6a42d55548522fca366d507d62359e7f559

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.18.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.18.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.18.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 24b480e8e5c3b5da97508c735c59a4db9a39501947c91b6210c8ab6f1ea8b50d
MD5 b42878aafb5fe74eba7c5a8b3c04f8a3
BLAKE2b-256 87ba45daf9d271edad4bd2fb947cf76ea9c387fb579ce512300a8bc62cf34f7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.18.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.18.0-cp313-cp313-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.18.0-cp313-cp313-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 66c7fe9ed6454d77a2e869b5f0d1d95a2513383b16926f25d99ebfb488fe6261
MD5 24bd3e0bae92eadeb94aceed241bd302
BLAKE2b-256 182ac2a46f2961a36f58ba740c4c579b14b3ad080d90fe570e756965391e27a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.18.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.18.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.18.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ae915547605bb9f61c3fc94b59ab17be6bbfd8a1bf66ecf29a05458440a673ed
MD5 7988b8dc2f125bb0e3d7eaa150885c78
BLAKE2b-256 4888004c693253d8a2d42fba4a41b0bb237d51c69f241601f010c15b2c1ca372

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.18.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.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c9cdedd3c6001b70223b7de6b264c65c6fa7174c979399456de9e26c23a57902
MD5 a6a7be101d0e0c5e466923f2401ba20a
BLAKE2b-256 70bf8a5302e9bc4100ec3579af47433059b9d39a0a58e2e9dec9fc8eb119161b

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.18.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.18.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.18.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 975325429a30355fad70db8522f08f9685df587ae898b5197d9bbd8c95409470
MD5 02c529181812e059d0a46a7fcd84b2a6
BLAKE2b-256 df7fe4150000c37500c1df3a94b44aff90536f15fce8b0c57e15cfdffab85116

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.18.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.18.0-cp312-cp312-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.18.0-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 0bb108185136c979c18959a9139aa00fd43c098806efda92106da3dc0ecc506e
MD5 d1453ded0a0072cb6420a9b45d2d9eb7
BLAKE2b-256 05a6565452daa85a04150163f9a7a3396dbee58454b69fd2aa6107106b49cbbb

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.18.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.18.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.18.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a2b8de4a59651f25d0a5516cdd7ff9b1806032c3ea1810be48344a8c9a42605c
MD5 e3d2c44e4edf6366a96b75edd996eb85
BLAKE2b-256 8074fecb663f8f58cbb0d210f9d8d6126d48debecb42509bf65d1b90a5e76487

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.18.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.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ae74b730c5d11489ba221164b5a8cd54f0e4b259a891d2e5d93df150577c3bb8
MD5 c3d97a16c2ff3014a58f9bc6f8b797b9
BLAKE2b-256 7572d230fd2b61e3f7f504a8b2f329a7f46469bb559f17ff6b13a1c663d68bb3

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.18.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.18.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.18.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a356ee70802ad63258c2e0418c93a8dd6387554da8803d682ab5676addb16e9b
MD5 8ec39667e93871ced674c868ae8b0c44
BLAKE2b-256 7dfa64c129933e1c0820b6ff02bf640883d4725222cef42c04cee27afbbaad8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.18.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.18.0-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for libraryfemtherm-0.18.0-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 c3142d1d1457660e9ad6f8ab3e01d5a194999af967c23620a328d13e3346b55a
MD5 3cd13f88b2eddd7cbf48ef4955873090
BLAKE2b-256 ef6e5c2e21145f9adf67f82a7b9de9e5d550997e06e30ff30dd1ff86fe6ed7d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for libraryfemtherm-0.18.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