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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.15+ x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.15+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

File metadata

  • Download URL: libraryfemtherm-0.21.1.tar.gz
  • Upload date:
  • Size: 488.0 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.1.tar.gz
Algorithm Hash digest
SHA256 4888e58a8f0ba0944656edf8f7f4a7e69de1944f4200b7acc65c9666358182ed
MD5 ef7fcb9042723a42b4c917ee8ea96a27
BLAKE2b-256 66233472b3369486208a99573c27b8090e8f3aa821c3fabc5d21ba9bf1cd9767

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ccaa2731cf1003a180a77ac3a0d56687ebc1c07446cb4ea905ed92f53cacecbd
MD5 bbb4db62aeda86a32d9e6ce62cbb1d40
BLAKE2b-256 6a510547dbec8b8c5ced03a848cfb329c428550fe0ae70f6218c2c66e7eee4b7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 deff461205450c14c6d8909bd9096d7d4c825e75c04e1bcdf4501385d8612e60
MD5 8528ea252c7808e252f1b98753c90c47
BLAKE2b-256 17c5f055c67f6b6b6a0d0ec9faf1f3bf6b3fb320e1630dd57001d3c486fe79ad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dec2d26285cf98824a5e6a6862940a5059a35f3bfa9f385434483a952ce3f978
MD5 2eafdd40e5d47dff34477198a470315d
BLAKE2b-256 d0fdbee4fb508ec4e29b5df65f4cea15a419610c13d9475c1a5b6879200c276c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.1-cp313-cp313-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 9b27dfb6501c87643b3d93077de14e3155b24d1d57c2fcad98b8b93ef760043f
MD5 50c5944feb98fa31e9c91717a113bda2
BLAKE2b-256 da4fa3cda56f8cc3018f60fde26ecb3bca8644100155cec632c4b201345588df

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5c4511896a5aa5472913b0a388504993279ad6aed75a0931bf10ce6fd58804d8
MD5 56d04a7c0601748337b226a972414355
BLAKE2b-256 b61fa556fef46fbef657f583de03025e9183e6089406fef74d1309249d193450

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8f9923aa8f683fd43dd6df7196b3a60bf6f1991875bc3cdbf2e739cf537c11b8
MD5 da9d517f9ada0a1b73f1166b02ee43e0
BLAKE2b-256 40ba37263e787f748e793249fff14c33916e4904d66ca49d7556420464973078

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 312b507a6a634e77a9a3d3e3fe3a55c46a9ab8b47e8f0b2423588efd1b9cc5a7
MD5 85aa69063681c913dd969fcedcc05018
BLAKE2b-256 8dbf611d7202b8c88520ae3426ddf6f668644bdf14a0f6ee2b9fc39f26bcc7bf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.1-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 715bb757ddaf5bd5c46fcc92e2327f73b75f47759b9dfebd5c650ba420d743b1
MD5 b00bba494d11e2127455f428db7c55bf
BLAKE2b-256 eab295620fe57d61bad053fb34aa38bcd95f3a0a4c0ade0ea42d688f0e761c24

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ae6c3b22098192ad595f378e9ad83edebe2f8ad2f4a92a7aac6be4b4616fbf32
MD5 a023c200093d7ff33096539dc5398640
BLAKE2b-256 b73fe3703910fe60c1c6a3cdf2d3362127e07e18011c5cf28e84d0965fbec241

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5ffd049f61acba8b29f6be772bf959892c08a70ab1c9a0f4874a32acddc47697
MD5 80ff1be74ee00fee16bf571bcdddc3e9
BLAKE2b-256 d05885c7df98af56d8228e6a6d2e1cbaacd0a010bb768a4d7fbed9d2db76013f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d8e6e064f04356893f1cc802af52767fafb58a19bffbf1eb570182aea27b830d
MD5 971ee9b09d97cf260831f0b2fa190f5c
BLAKE2b-256 8aa54539f134258e99c24d983b63bd6b47852c257a76873fddaa77830bd9bdad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.21.1-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 266d458fbf617ae8a84497dcd4568a06bb8a82d4d692b7b6e179087a5554f5da
MD5 c3ba8c23893d73cfdc9781e52bbc9261
BLAKE2b-256 a2b2554c1c0ae299d4e515b446089d3bae2462eab9e6a26967549e502caa6f71

See more details on using hashes here.

Provenance

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