Skip to main content

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

CMake presets

CMakePresets.json ships six visible configure presets plus three hidden inheritance bases. Use the default-* presets for normal builds, local-* to consume sibling working copies of LBNL deps, and python-* to also build the Python bindings:

Preset Description Python bindings C++ tests
default-debug / default-release C++ only. Fetches all dependencies from declared remotes. OFF ON
local-debug / local-release C++ only, but consume sibling ../LBNLCPPCommon and ../FileParse working copies when present. OFF ON
python-debug / python-release C++ with Python bindings. Fetches all dependencies from declared remotes. ON ON

Missing siblings under local-* fall back to the declared remote automatically, so local-* is safe to invoke even if you don't have the LBNL siblings checked out.

cmake --preset default-release
cmake --build build/default-release --config Release --parallel
ctest --test-dir build/default-release -C Release --output-on-failure

For Python bindings:

cmake --preset python-release
cmake --build build/python-release --config Release --parallel
ctest --test-dir build/python-release -C Release -V

CLion and VS Code automatically detect these presets.

Per-machine compiler presets (CMakeUserPresets.json)

To use a specific compiler (vs2022-release, gcc-13-debug, clang-18-release, etc.), each developer maintains their own CMakeUserPresets.json next to CMakePresets.json. It is gitignored, read automatically by CMake (and CLion, VS Code, etc.), and stays on the developer's machine.

Personal presets inherit from one of the shipped presets (usually local, which gives you sibling-repo overrides for free, or python if you want bindings) and override whatever they want. A complete realistic example -- building with WSL Clang on a Windows machine, with CLion 2023.2+ routed through the WSL toolchain automatically:

{
    "version": 6,
    "configurePresets": [
        {
            "name": "clang-release",
            "displayName": "clang (Release)",
            "inherits": "local",
            "generator": "Ninja",
            "binaryDir": "${sourceDir}/build/clang-release",
            "cacheVariables": {
                "CMAKE_C_COMPILER":   "clang",
                "CMAKE_CXX_COMPILER": "clang++",
                "CMAKE_BUILD_TYPE":   "Release"
            },
            "vendor": {
                "jetbrains.com/clion": {
                    "toolchain": "WSL"
                }
            }
        }
    ]
}

Manual configuration (without presets)

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 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)

Metadata

Release files for libraryfemtherm 0.23.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for libraryfemtherm 0.23.3
File Size Uploaded
libraryfemtherm-0.23.3.tar.gz 498.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for libraryfemtherm 0.23.3
File
libraryfemtherm-0.23.3-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
libraryfemtherm-0.23.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
libraryfemtherm-0.23.3-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
libraryfemtherm-0.23.3-cp313-cp313-macosx_10_15_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.15+ x86-64 Details
libraryfemtherm-0.23.3-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
libraryfemtherm-0.23.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
libraryfemtherm-0.23.3-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
libraryfemtherm-0.23.3-cp312-cp312-macosx_10_15_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.15+ x86-64 Details
libraryfemtherm-0.23.3-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
libraryfemtherm-0.23.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
libraryfemtherm-0.23.3-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
libraryfemtherm-0.23.3-cp311-cp311-macosx_10_15_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.15+ x86-64 Details

Total release size: 22.8 MB

Release files / libraryfemtherm-0.23.3.tar.gz

Download URL libraryfemtherm-0.23.3.tar.gz
Size 498.4 kB
Tags Source
SHA-256 checksum
How to use checksums
05486ccc2ea38a045ed7c426ec23dcd0115b6c54587e754057bd66c4a6c4c176
BLAKE2b-256 checksum
How to use checksums
4a4f88ad2b79eafc36c7e89eb24bd72a087e426a6b7493fe043481a89d1f5736
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release files / libraryfemtherm-0.23.3-cp313-cp313-win_amd64.whl

Download URL libraryfemtherm-0.23.3-cp313-cp313-win_amd64.whl
Size 2.6 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
8f5164ee6ee93f9b57106ce486573fda442c7c78b917d26316bf6268d1ea4fdb
BLAKE2b-256 checksum
How to use checksums
e90d2cede11b07c764633939d034934e512be7fe0d5d324a8c65ea0293dbbd10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release files / libraryfemtherm-0.23.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL libraryfemtherm-0.23.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.9 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
44955751bd35cfe44ad63a1cc8f9a24ea0d979f7154a39aa2be68f5f954d57b1
BLAKE2b-256 checksum
How to use checksums
4aed5bcc4096ff8ab35bca730355102a1bc4ec779815b6661e90401e5a97245a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release files / libraryfemtherm-0.23.3-cp313-cp313-macosx_11_0_arm64.whl

Download URL libraryfemtherm-0.23.3-cp313-cp313-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1d590f38fd6d063061ee0c4fc7234c661bb5d8937a2d9a75b646262cd2c50421
BLAKE2b-256 checksum
How to use checksums
f585c5bc0edd8a37bdd4e9e8006be4814d2bf8b2721539af8a6b8e9e0bda529f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release files / libraryfemtherm-0.23.3-cp313-cp313-macosx_10_15_x86_64.whl

Download URL libraryfemtherm-0.23.3-cp313-cp313-macosx_10_15_x86_64.whl
Size 1.5 MB
Tags CPython 3.13 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
2f7329480b45e7841d355ca455810650b23093e95939003fa9e4b403c131947e
BLAKE2b-256 checksum
How to use checksums
f337928b356c6b2af234f3d065d627d27fe34b53af405eac0176734d8e0c652a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release files / libraryfemtherm-0.23.3-cp312-cp312-win_amd64.whl

Download URL libraryfemtherm-0.23.3-cp312-cp312-win_amd64.whl
Size 2.6 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
8580ffa698898df94e5cd9a444dec32c226760ee6619bb2e2a87d634ba330f80
BLAKE2b-256 checksum
How to use checksums
4307c6571b7b27495d9050f4e659fc916bff739b94b8f3526bd6b9521bb3f183
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release files / libraryfemtherm-0.23.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL libraryfemtherm-0.23.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.9 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
63a9814c4592231a92ef01e47cca91381704bbd30e4c499240dc602ad17d5c45
BLAKE2b-256 checksum
How to use checksums
a2528023ca61d1fdb20ed39ff88aa7126231d0d59336ef4c21dee0d8e4bc2977
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release files / libraryfemtherm-0.23.3-cp312-cp312-macosx_11_0_arm64.whl

Download URL libraryfemtherm-0.23.3-cp312-cp312-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a3e4854fc937b656f1255555c068c68a41932fc5467b971f5a37d1d3a5a0f70d
BLAKE2b-256 checksum
How to use checksums
5968b9a440250ef1a6ca90a086a88f7461c079fe37cc1720b36cef4685c19537
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release files / libraryfemtherm-0.23.3-cp312-cp312-macosx_10_15_x86_64.whl

Download URL libraryfemtherm-0.23.3-cp312-cp312-macosx_10_15_x86_64.whl
Size 1.5 MB
Tags CPython 3.12 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
05d079c8c8f206ad074ac2393a0ebc14280c1cc5ca77a3c9031d3b0280a7b967
BLAKE2b-256 checksum
How to use checksums
13230818062ae578c35f63a04d61648f8f8e871323685b1e816616dffa63520b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release files / libraryfemtherm-0.23.3-cp311-cp311-win_amd64.whl

Download URL libraryfemtherm-0.23.3-cp311-cp311-win_amd64.whl
Size 2.6 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
e6d232d397a05898421512f843935206bf1fe7a4d6d7b863853b3bdb2ee78824
BLAKE2b-256 checksum
How to use checksums
972e31b87cf5a232358c2029ee860549e6ffe335be73b1960014cc158324a02a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release files / libraryfemtherm-0.23.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL libraryfemtherm-0.23.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.9 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
ea1acaa7aca6eba5df4acfd56c0c61d01a2a4020cd57e08030b07475d815f3f7
BLAKE2b-256 checksum
How to use checksums
ce737c88d1bf798e645f002d9e87027726fa37c27e05593cc0a1c270d9422133
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release files / libraryfemtherm-0.23.3-cp311-cp311-macosx_11_0_arm64.whl

Download URL libraryfemtherm-0.23.3-cp311-cp311-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a72a4968416573e59dd389333c9ceb693ce3be72371c862b93dfe1a477888351
BLAKE2b-256 checksum
How to use checksums
13b74bdac8181877a7ef0d378a323c03469a561d1ebf7e4a0083114f16df661c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release files / libraryfemtherm-0.23.3-cp311-cp311-macosx_10_15_x86_64.whl

Download URL libraryfemtherm-0.23.3-cp311-cp311-macosx_10_15_x86_64.whl
Size 1.5 MB
Tags CPython 3.11 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
dd22ed499203d8e1956e75e983da2350cdaa188ab7306d06bbc29787032c9aa2
BLAKE2b-256 checksum
How to use checksums
556867da444d57579dc477dbd50a9cd8e9bf3e039d9bf979bf6d8368fe1943cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page