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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.15+ x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.15+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

libraryfemtherm-0.20.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.20.2.tar.gz.

File metadata

  • Download URL: libraryfemtherm-0.20.2.tar.gz
  • Upload date:
  • Size: 487.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.20.2.tar.gz
Algorithm Hash digest
SHA256 3724dcd3f52ed6549c513db402fb5244a48d20d254a0d2a8c3c2edcababce7d3
MD5 cb63e5d57c2e3a274ca912e9b4fb5aa7
BLAKE2b-256 b23b827ce5882d59c00f59277f99b323666e8473121910855c5ccdab4c20523a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2bc5e734438160118eae86d8d483f35bc9d9a4aa26de8e36fc2ac7d87a4d07a9
MD5 50b1ef572a15b525f95f855b456383e9
BLAKE2b-256 03e70e585800694c504be6312c5f62d37f702e37b182c84296007d389a872878

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3cef64382b3f2f157280a94dd8de09bc3b638d0640323807baf99b0c1917ef55
MD5 96fa572abc9e75cf6044ff454fbf22bd
BLAKE2b-256 1128c2909ab11e6751dedd61b55b710a49fe98f80226f2f9ef56ece06548130f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d6d4507a3ef532c693c5c2e0a1c313484a23a6a3efb1b2402ed57be697a7ea21
MD5 6013c44b94a93644b11c0952e6d7141a
BLAKE2b-256 a5cd929609adaac4810086448311a3173944c833eb72d737d0f3f707d39c71bc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.2-cp313-cp313-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 46c64b1682811e1581e91ff096dfca39fe50c017cc873c746155d7e8e423f004
MD5 8b24e59eff35f0ddad4760e87250ec0a
BLAKE2b-256 e3d446389056e64e5d63d24b2356c53678140674efa589641124e6c6989d883c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 782f25578ba72cf424a82daf037fe66eb2696d592922be97b76a494695655e4c
MD5 ec724f7eeb9fd2c7f3e00a3b2ac6a25e
BLAKE2b-256 47307bdfeffdeec5c2e6130d18c2aaa3ebd32a0c79d843f78c3bd25f4bebbdce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b1157086381e9f3cc2b4fb5222d6b1c340a5ab7e98b8b796853791e8b717c8f0
MD5 df6c33327161e4ec97942a0901e99e38
BLAKE2b-256 bbe0ef3f20e4b707e8774c4d9c3befe543a31b109404c08a60fc71b98987fbf4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ad4c05fa19fed682fee7fce4050e54c825f1f1dc2f80aba2f2da003794b1b068
MD5 095950309a178602c2a44cb6fd82503b
BLAKE2b-256 fb214e5fa79398f79f01c42977f1b04434f570d95a95be25a3a8abe2a7c1afb6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.2-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 661ff3d048b0823dfe1f9275137c11213b00b763cd4327f64452554569d419be
MD5 d86ba1dc1f5309fa1a79e937f925a0b4
BLAKE2b-256 407dbfbcea7abf80a98cedf4d521378a2bcf8fb7bb67c59135fd5fa637bafa7c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4f25d3741619105708177dcd388a5b7aa071a1ac047ef6bb803c21f90d5e1946
MD5 45776bbe1e35db708f738dd94f3f2010
BLAKE2b-256 5004c37352d2d1f504d6b53141910bea66266fbfda949602fbe3abd651b87b83

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 30cda068cdf337b6e8b85e5f4d2ff72eec7ef014de15b0ac9b49c912f9a8c0ad
MD5 c67872899d6bf8e9dcc5fac71e851f69
BLAKE2b-256 f01f02ca1f88b6ccc3ee66a1d79f5a3b759266356bb96fee6d2f5ddd91617391

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 78333de474e359322e70dc2b9576e6e85349e6df90d23f37b362a6f06392b477
MD5 26d641d426b2bf31afeee8523917c358
BLAKE2b-256 1a875e5f2f7883facd8f59776173504ee0c1295d09280056aa539656596a131e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for libraryfemtherm-0.20.2-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 6d4dff429da430b6d68dc795b013c5f7e4859d63fd3003aa15cbcf9f1269858c
MD5 e9afd87ae6d75283d8a468df89f314ee
BLAKE2b-256 00645ef12ceeec2c2d66f071e7f0909e3e6f29b73865d8fd08e36d954fb00fcf

See more details on using hashes here.

Provenance

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