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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.15+ x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.15+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

libraryfemtherm-0.19.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.19.0.tar.gz.

File metadata

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

File hashes

Hashes for libraryfemtherm-0.19.0.tar.gz
Algorithm Hash digest
SHA256 edf198d46b8f18d48001c321e53a762dd38d7507c0b3a9c6cbaded50e5f2af4a
MD5 85cfe0d0fcebea284359577e06c86268
BLAKE2b-256 553ae164bf8c467b8c0e57187154c395957b276c741171212144977a3f26f158

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.19.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9b664ff0f631d95d736ba87577c251ad4e469ef599969c04317dab7da22f4195
MD5 5ec71346b30f6ec8be3967f8ea7f6a32
BLAKE2b-256 4d63a35e42a5374d7ce835853091234a92a92fb2a9ff190d052beb8b602cc533

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.19.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 66603b9d3e8d908a92c07ed953b1db12274a1627bac4a3cdc131a20f94e35dc0
MD5 b7ad4eb4fa95f7cb3c1f4eeb34529520
BLAKE2b-256 bb43372fdfdb41718159adcb0b6af5d80dc9814f5abf135dbc723a9496e7f9f7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.19.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 94faf025e626dfc23788a4e9b1133e34f5c5505ffb6122ed57eac6fc040ed09a
MD5 69d148ceb4ba939dc70de1110fece974
BLAKE2b-256 96a5ccf874322aa50535f63a27962e38244960bc25bb77759c0fdfd325322369

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.19.0-cp313-cp313-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 b98504a102e3a6a9ec230426375b6ed8f78fdd78834240aa59118370747844d4
MD5 c46973fda34320b99b0516ac8d208103
BLAKE2b-256 1e414e196651ee352bcb63b9595e6b726d6353884ce6e04526e609cf0d2a1640

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.19.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ad63ab1a36fe4ed58ae350fc24571973f410177eae489a0aa749135eeb032a38
MD5 fb325d74261fbf377cd45de58dd777be
BLAKE2b-256 6878e7340c084b8e6b78e6019a463ac9051de2f151dbeaf49a27ee38b7ea048c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.19.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2d667958f5430cc59e112acc86099d2f70979a6538c071ee1adaf9dc950ee4d5
MD5 2c651f71ecca0c8a790e8a9ceba33e00
BLAKE2b-256 9353c57e59e819b0dca6024a6dad0b6d8e01baaac10f5e4932973d754145caba

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.19.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b7a82c891e71fee695281d629a23bd21bdbfe4c3640af7cadf58c21df32ef398
MD5 00e900452b16b30d4edc52ff3e9bb665
BLAKE2b-256 e1285f05f06a720a1650c36a0e218cc317c4225fa99e25c5108e4ddb6635a1c4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.19.0-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 f881abb6b746bbde9ab7b5f25efa0f4f54293e31b68b7962ca1b63fe422bd209
MD5 bee9ff9362b35d3a3e4c38f5cf10fca7
BLAKE2b-256 7bb7f3edd1413bc122f69f631b2e5a07df5043d5a089b1a76ae8f026f0a57b62

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.19.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0aa145783b3c3e4a61fed2494a512705fb6c61dcdd7a91e4dcb8d9fe99d58246
MD5 2d353bbcbd08ab6184ca2e7a44f71edf
BLAKE2b-256 97cb462083b3f9ac3a378822ca6dc6e66ea5a6e778083cbf65aafa7ed534b435

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.19.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dd864394a263aa1bb8b35f13c88da4efd4b62e450cedbc0609f16b57c03fc2ca
MD5 149726415a0f114821d17fd9f9ebdc4c
BLAKE2b-256 227b5775b495668643ebd4ae1b48a2908b6ce0a48cdd8cf7d987504b5797670d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.19.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bd7440d8a6d7d9cb65c2c7c9327d436d2be5ff7336c08ff88efccf8bf539bd15
MD5 474882c4a77b31cc60896520bff70fc6
BLAKE2b-256 f5661f8d278839b901dcd36afe7ca803db2a18d9fd88ed1de51fca7bac87ab52

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.19.0-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 431a857043d26349143bd4481f541975595b86de3031fe0368eba4c57772e0e7
MD5 dc10f1d22a59658b13faed2b70e8a6bc
BLAKE2b-256 3c831435aeaa1b39ee7b3130afeec16c4fc17c7e91294e0f5d9cd64858e3393b

See more details on using hashes here.

Provenance

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