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.21.2.tar.gz (488.1 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.21.2-cp313-cp313-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.15+ x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.15+ x86-64

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

Uploaded CPython 3.11Windows x86-64

libraryfemtherm-0.21.2-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.21.2-cp311-cp311-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

libraryfemtherm-0.21.2-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.21.2.tar.gz.

File metadata

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

File hashes

Hashes for libraryfemtherm-0.21.2.tar.gz
Algorithm Hash digest
SHA256 ae00186c6efbd4fa74153026f844c6f73be83b4a4670921052ddcda655c4dcda
MD5 2ebd2e40e477ff309d2093a56050159b
BLAKE2b-256 e9ab4b3aa69db1d464d25ada027ee5ff360b4be3e973aac5166d988be71dd186

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d7541ccd2e04edafb3eda48b712cf50ba09761442789f0d5b7861f7284de61e0
MD5 a86a84875125f884a19f9d2b7f17ed5d
BLAKE2b-256 e93b535cd5b991420a7b7fe78b05f2f6f20b841d3d1b46ba37c3492fa3901281

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bf36c1506c27ed53e0ce750eb8dc91750d74d8d3e7a6d3494ce1024d9a60383c
MD5 151910d01718bd244ca1fcad7553d4af
BLAKE2b-256 5d2172b607ff376a90cedb9b6bc98469d40b11c769d9031f231d6e115368724d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 31580f55d83a59b63b98e1da5574e9832acfca5d5d139efc0dd586eef4a81232
MD5 644bcfa345b08c943b08f1cafebce49e
BLAKE2b-256 7b9f59d070670e8a5644aba7fbb98fe48c42da681690d462f92e4f2d23218c53

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.2-cp313-cp313-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 4845b452b553ed111490156136409ae2bf3402e15ec446da6f3a8f6164912e02
MD5 22521b6d20409187ed3ab352fc6ee906
BLAKE2b-256 cb56686c4b8e9d57815fece8b4b21a1a7b1461cf93d35ece2f468f62d93cfa8f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a47b97b843e7107db96013ed5b7a0e0336922e1f1e384e3bc45bcd5e74d329bf
MD5 4e488520708e3cb639d9c215f331b2e4
BLAKE2b-256 af16d0f2126e89c117039e86ea19ff514b735d3b432d3870d0e53b211fea43f4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fc713bde866f47a1d80545d16e1fbc78643b6cffd2f24bc443fc8f9907f2ce2b
MD5 9025c4980d8b544b078416ac00e110fc
BLAKE2b-256 b047d27dad1999ea748c4fdf076e1cbae354050780846bbe2e8801384230b339

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fadd740423276fddac586e875a0b50c7ddfbd487a1d00f2d89ffdb5b33ce79de
MD5 6ef8037b27bc73ed9d3e81b37d103054
BLAKE2b-256 d37a6a069ee58dba4a71cd0885bf0c8afaa44d4cd8e8da0a8f8a897f9dec48a5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.2-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 12db8804af851c3f8e79e809b447cf7eb2584bc9a592d42ebf18c0ed1364ba89
MD5 f29ea40e1d7ac1cc7be5575f29050691
BLAKE2b-256 2e1643d40ae2f6d1a6153062d05be03e1889b48a9280a3c29a14520f052702c2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6bd8db717e95efc5c75e751b3bcf15b06aff7e21776196071eccb95be17f9c3f
MD5 2a69ecfd269976c65feb8e2da7766639
BLAKE2b-256 7412361c88dafcec0f22815e4858b4a2eb532872eac6dc80b40c73daec013c47

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4379e33de29517c4debc8e4a4f77af798695fa38f20a796f8d67c2bdd444658a
MD5 305f075c1533e6bf06f797c586bd805d
BLAKE2b-256 d19fba48417f07af8f6e80ca5badf48e11e788d0845ce591446ecf806c81e83e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 082c46f3018b717424d158d653de82d9a6c086d5a53ff7f3cb245829b4433756
MD5 46fee469f57b49d2fb56aa836599aa89
BLAKE2b-256 1d0e6c569379a4214aa62a12f6556c54cd75e3450d92531cbfe419f3d3073679

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.2-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 d9b7d3f8b110425c38a0d7eb27d38b658f00ed2bfa5470c741b99d04ab126e9c
MD5 7e68e2d73f39adf2b023cfd64821762a
BLAKE2b-256 51affb001b6acc02d3c32e0873f6778a124f8979629b0bc9faea5ef25730d70c

See more details on using hashes here.

Provenance

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