Skip to main content

Python implementation of the Open Building Energy Simulation (OpenBES) tool.

Project description

OpenBES-py

Unittest ASHRAE 140 Suite .github/workflows/package_test.yml PyPI - Downloads PyPI - Version GitHub Downloads (specific asset, all releases)

OpenBES-py is an open-source building energy simulation tool written in Python. It is designed to provide transparent, reproducible, and extensible energy modeling for buildings, supporting research, education, and practical analysis.

Features

  • Modular simulation engine: Each energy category is implemented as a separate module for clarity and extensibility.
  • Comprehensive test suite: All core modules are covered by unit and integration tests.
  • Standardized test cases: Planned integration with ASHRAE Standard 140 test cases (see cases_ashrae_std140_... directory).
  • Modern dependency management: Uses UV for fast, reliable Python environment setup (uv.lock included).

Installation

You can install OpenBES-py via pip:

pip install openBES[jit]

This will install the package along with optional JIT compilation support for improved performance (via Numba). If you do not need JIT support, you can install without the [jit] extra.

Why doesn't the package default to JIT support?

A major use-case for the package is in a web-based environment, using Pyodide. Pyodide does not currently support Numba, so to keep the package lightweight and compatible with such environments, JIT support is made optional.

At a later date we might custom-compile the project to WASM with Numba support, but for now this is not available.

Usage

Here is a simple example of how to use OpenBES-py to run a building energy simulation:

from openBES import BuildingSimulation, OpenBESSpecification

spec_file = "path/to/specification.toml"
spec = OpenBESSpecification.from_toml(spec_file)
simulation = BuildingSimulation(spec)  # the simulation is run upon initialization
total_annual_energy_used = simulation.energy_use.sum().sum()  # collaspse energy use DataFrame -> annual energy in kWh

Development

  1. Install UV if you do not have it: pip install uv

  2. Set up a virtual environment (recommended): uv venv

  3. Install editable package: uv pip install -e .[dev]

  4. Install dependencies: uv sync

  5. Run tests to verify installation: uv run python -m unittest discover -s tests

License

The license for this project is under consideration.

Credits

We use Pandas for data manipulation and NumPy for numerical calculations.

We use PVLib.iotools for reading EPW (energy plus weather) files.

Jensen, A., Anderson, K., Holmgren, W., Mikofski, M., Hansen, C., Boeman, L., Loonen, R. “pvlib iotools — Open-source Python functions for seamless access to solar irradiance data.” Solar Energy, 266, 112092, (2023). DOI: 10.1016/j.solener.2023.112092.

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

openbes-0.1.5.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openbes-0.1.5-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

Details for the file openbes-0.1.5.tar.gz.

File metadata

  • Download URL: openbes-0.1.5.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for openbes-0.1.5.tar.gz
Algorithm Hash digest
SHA256 98df7eac623a5358380f8525c560caf32bd1e4a0b550a94f779e56563eda9874
MD5 f0e0a28ea20bb68385bdaaefb1e3bf5d
BLAKE2b-256 4f183c47b7ae88fb23b42b98f6354be425c8e64bc750d597f3bdd3bb7b20f3f8

See more details on using hashes here.

File details

Details for the file openbes-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: openbes-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for openbes-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 719c9fcce8645608241fff1e70e205c9d723f3d28754b79939c71da322d5a8bd
MD5 62bfcd2c9ff0e870db9c0b736f40cb27
BLAKE2b-256 1352ca1ae64c894700d7707525c7e47ea258fe6883fc4e4614145c2720d6885e

See more details on using hashes here.

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