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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.15+ x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.15+ x86-64

libraryfemtherm-0.20.1-cp311-cp311-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

libraryfemtherm-0.20.1-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.1.tar.gz.

File metadata

  • Download URL: libraryfemtherm-0.20.1.tar.gz
  • Upload date:
  • Size: 487.5 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.1.tar.gz
Algorithm Hash digest
SHA256 1fc578c0506ae55d14e3e2e683b635d0b6ca949c0c6c6c25703fd382ede31e5b
MD5 7db17b926fe75e7e9e3d3505daf67cc2
BLAKE2b-256 f475dcd917cb5224626731eed3390d27a1de0a8daa75d902e6512322aa6071d6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f7885fb38ef4a5ded0eb2e90d77f573f3664fc39b0daeea9922f81748586f57d
MD5 e79cc7a946829ceab1c1bc3199bcea36
BLAKE2b-256 d21602312c2b0902e93049f1d080ef5b11013c359ccfd4105999970ce5227468

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 707a2a8add9a3730a1b577895b7064d2f2dd22760424a8b2c6b50755905cf755
MD5 b2fd1fa32c16ce110fbcf3b2dc8f8933
BLAKE2b-256 e8cd1c3a48329d1e8d4ce303050bcce584e465cccba9806e9d1fc60d4b561d15

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f67b81631d3fee8303b71a64842f7728c7aca9e896c08a1e4cc51a3279474eba
MD5 ac2d7c91aceea0867468588dab89cba6
BLAKE2b-256 6acb546b3930fd2fa977470800e23bc8d5ddb068e9546022bc46550e4b36e555

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.1-cp313-cp313-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 b0205738a1ad38ad78942b5252f8941f0efae88c98d00cf234f40c38ce17b25e
MD5 0e210e4a56aeef4dbd9f8941f1954b11
BLAKE2b-256 3b9d69cd4db586b0b1874c19ea43634d4e44b987beb032e632262597c2cf53d5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0f991d94bf4a57732e1a631983210abe9ec6c8e1e7904887dc177d218331834a
MD5 3a06e1936dfe29d66c667ebd418888aa
BLAKE2b-256 a48c4f6228960ed36b90751f11eb2b03afea53947cf19f30f3297599dae7ffc8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 41208c569935824e4ab608d72963ace08ff7b4c3b68f1fefa5aae6531f2a0910
MD5 70105037209459628706f8416720421a
BLAKE2b-256 00b4db2f149cec1dad259a1e908e0220fb731ee74b2ddafd32ae15ec496b4edb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8d322b18bf8ad0b12e02d01fc51c6bfbc3a0934c42477d8e433c021de9a0fbc8
MD5 a98eb4d802a27d253cf99770930cee56
BLAKE2b-256 95694c252b9f25fa27b5bd20335d47b3142e3c61a72a04fc509100d27379ee8b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.1-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 4ce638bca1eff373f7526228bfda24d61646980683605a19b19f410e9b9bae51
MD5 29f08c60249ae67beb57b19b18cbf759
BLAKE2b-256 6c6044723ab5dee1b0966f31e4afcbe9fe07cffc51288eb819152b6cc4fb1a07

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 324ae82f5c865f0415ccbc03c3a1b486eadca3b292dac05c5bf43e1bf8570174
MD5 6df1bbbf1ba425f9e8f6b89114b5dfe0
BLAKE2b-256 2bc015c91da0081e6df591c836ec5584a82eed43b62b4aa7c060a3aaea7ea30f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 66d61406b92c06363a6a9273a2c5f00415f42b8c14e5341afe9d208d2aa9ad91
MD5 91d30ab15be280c9d1dddfb41d0316cf
BLAKE2b-256 b34266e41b313d081f67bdeed7dc2fc461f8d609c2741797b4214446c6e46c54

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1d1f9be2a30c8c80d4785a5ac2118dc7cc56721fc9b756a9838b235858774a98
MD5 ec6bae220ecec59090223648beb7eff3
BLAKE2b-256 67e33b2905f39b3682c6601908410d5f5b7b31b7a5d15022613d9def5978297c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.1-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 d608f363f3240b05936a7fb8f48d636f0acdc654dad59c8c253b1673e0f0ff09
MD5 cfe7bf73b97711b1b8957ba819b7ccfa
BLAKE2b-256 63faf46d482002afab40adb09f8d4edfc5e8174d7454229bf24fe9bb9a6ca29a

See more details on using hashes here.

Provenance

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