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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.15+ x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.15+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

libraryfemtherm-0.21.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.21.0.tar.gz.

File metadata

  • Download URL: libraryfemtherm-0.21.0.tar.gz
  • Upload date:
  • Size: 486.8 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.0.tar.gz
Algorithm Hash digest
SHA256 ecf73af6615da0378382954e0dcca767b5a0b81318da308b49d72a043b7f680a
MD5 3277990257b38c70bd9b61eb20e472dc
BLAKE2b-256 3cb6b13261cc2aa417084ec19d9a646f632e328754a9777fc778631cfc39e0c1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 28d3727a66c52c0ed568d5a4168ae0ab9379fef944201011810e4d2734c8ca41
MD5 c0ee915021d8a019376f701f88a942c6
BLAKE2b-256 38ed786ad9fe089c7ba4dfd28327dfee325b65f604ec05b35843d40b5b843aa7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 be955dbe8b4b63eaad567585b0c9d38954bff4a45fbe1f27afebee92a8ab75d0
MD5 c51184c46529c68cc42064b04cd9ef1b
BLAKE2b-256 6ebd14d0bbed81816944a9799ac7f197b60a60b50ba47a91b35d2e9ce0ce4f59

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 492ace93d22d1c6d5e341d2db05e34cd72b347da22ae2a6f66dc5551b53c44f4
MD5 9218162bdce0026a732b7319a592d32b
BLAKE2b-256 728624afe33175082c304a74ec26f213363279459ec23a31c91e7b3301aa5a66

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.0-cp313-cp313-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 15f0226a4a6a16dcf1aa83b4b0cfa1b2333ca6b2b9adcdf39a6ab924b7e5b5c7
MD5 82a78ece8b377c936e27889797614864
BLAKE2b-256 3708f0fb5c907f5971b3744930af21413d6598f370261bc180f63a2da6f00723

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 41f82bd79ff442ce9b8c159b2f5e1255aa5b2d734f44d01b623fedb8959151ca
MD5 1e7d09cc52d1e8abbbb6edf291c104df
BLAKE2b-256 eb56da655dd7b9a4113752df92710159a243194f7321589fd86eee34c5bc4976

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9f9b165619c0ea0a67df8fd1176bc8b5bfca3586238e1916c548a7b0fb9b3997
MD5 c6024a237e8541e83d52b95f59a65ad3
BLAKE2b-256 d7c148a961dd103d0ba02f17510c7a605dbc1b90764057cc3a7a730520d71e80

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b6b9f2b55ff2f5740aefcb8af312d672457fc025f32530b43251980150f22559
MD5 ade1190665f9cbf4bfe437b2022a1d2b
BLAKE2b-256 147282d054b7439be5fdf835fe80f3a8eca3bc4c0bde49e5d381ba87db7ee528

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.0-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 be72dd41bd8102d7b9f4f98e64b24631b983892f1c883a790f59a9ac788e0b4f
MD5 2af2903ba19252fd1d6344de02cc0cfc
BLAKE2b-256 1c3005934e07018cc1de8661f513e558b3611f7a420ae6cb274831e0f25cac36

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2f2c08dd0c8d851de7a3954ad575063feaa86ccf5ffcbc7c03912f6bdef19dbe
MD5 8738bd02f7ef7ec4ec0813e92a5202a9
BLAKE2b-256 679590fe3b4555a3ea046485c225f097de6fa0cfa470374209415ee67108ebf6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cba0a8df00812f492a3bc8075dab147f813464809c403368e500fb47cf5ff297
MD5 499454e54b85512f3da69a39e2de2bc7
BLAKE2b-256 3529defbc515c391c6aa17bfbf66025d67eaa70fac33a532f87dc32951737623

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0b7917e994e095515926083f7fe5a9536c8b7fae203e8becf5018985cfe972f1
MD5 e5a3fb55570facec799d79e07d0fce9d
BLAKE2b-256 58d654bb501e4c6be55672b1bbc3743e5810493d8853f879d01c9c51e9105263

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.0-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 36af3b2de86752290b2e8d5befadf439d6f55630704a101b40b4da1c30bdec3e
MD5 28bf1d425943b3d5cbcf37cd29750722
BLAKE2b-256 f90f53d25dc4102c90738b17eac32a616e84cb1514526a359b552233ef19eb14

See more details on using hashes here.

Provenance

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