Metadata-Version: 2.4
Name: iso52016
Version: 0.0.3
Summary: Python package for a ISO 52016 calculation
Home-page: https://git.fh-aachen.de/tb5152e/din-en-iso-52016
Author: Tobias Blanke
Author-email: blanke@fh-aachen.de
License: BSD-3-Clause
Keywords: iso52016,building,energy,thermal,hvac,heating,cooling
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24.4
Requires-Dist: pandas>=2.0.3
Requires-Dist: pvlib>=0.10.1
Requires-Dist: scipy>=1.10.1
Provides-Extra: dev
Requires-Dist: flake8>=4.0.1; extra == "dev"
Requires-Dist: pytest>=7.1.2; extra == "dev"
Requires-Dist: pytest-cov>=3.0.0; extra == "dev"
Requires-Dist: mypy>=0.961; extra == "dev"
Requires-Dist: bandit>=1.7.4; extra == "dev"
Requires-Dist: pylint>=2.14.5; extra == "dev"
Requires-Dist: isort>=5.10.1; extra == "dev"
Requires-Dist: black>=22.6.0; extra == "dev"
Requires-Dist: anybadge==1.9.0; extra == "dev"
Requires-Dist: pandas-stubs>=2.1.1; extra == "dev"
Dynamic: license-file

# DIN EN ISO 52016

[![pipeline status](https://git.fh-aachen.de/tb5152e/din-en-iso-52016/badges/main/pipeline.svg)](https://git.fh-aachen.de/tb5152e/din-en-iso-52016/-/commits/main)
[![coverage report](https://git.fh-aachen.de/tb5152e/din-en-iso-52016/badges/main/coverage.svg)](https://git.fh-aachen.de/tb5152e/din-en-iso-52016/-/commits/main)
[![Documentation Status](https://readthedocs.org/projects/din-en-iso-52016/badge/?version=latest)](https://din-en-iso-52016.readthedocs.io/en/latest/?badge=latest)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

Python implementation of the **DIN EN ISO 52016** standard for calculating the energy performance of buildings. The package computes hourly heating and cooling loads for thermal zones using a 5-node thermal-network model per opaque element, solar irradiation via `pvlib`, and ground-temperature coupling per ISO 13370.

## Installation

```bash
pip install .
```

Or for development:

```bash
pip install -e ".[dev]"
```

## Quick start

```python
import numpy as np
from iso52016 import (
    Building, Layer, Material, OpaqueElement, Orientation,
    Ventilation, Weather, Window, Zone,
)

# Create materials and layers
concrete = Material(density_kg_m3=2300, thermal_capacity_J_kgK=880, conductivity_W_mK=1.7)
insulation = Material(density_kg_m3=20, thermal_capacity_J_kgK=1450, conductivity_W_mK=0.035)
wall_layers = [Layer(0.2, concrete), Layer(0.1, insulation)]

# Set up weather (8760 hourly values)
weather = Weather(air_temperature=t_air, wind=wind)

# Define building envelope
wall = OpaqueElement(area=50, orientation=Orientation(90, 0), layers=wall_layers)
# ... add more walls, roof, floor

zone = Zone(
    opaque_elements=[wall, ...],
    usable_floor_area=100,
    internal_gains=[np.zeros(8760)],
    lower_temperature_limit=20,
    upper_temperature_limit=26,
)

building = Building(zones=zone, weather=weather)
building.calculate()

print(f"Heating: {zone.heat_load.sum() / 1000:.0f} kWh")
print(f"Cooling: {zone.cool_load.sum() / 1000:.0f} kWh")
```

See `examples/easy_example.py` for a complete working example.

## Features

- Hourly heating and cooling load calculation per ISO 52016
- 5-node thermal network for opaque elements, 2-node for windows
- Solar irradiation via `pvlib` (any orientation/tilt)
- Ground-temperature coupling per ISO 13370
- Multi-zone support
- Ventilation with heat recovery

## License

BSD 3-Clause.

Independent implementation of the calculation method described in DIN EN ISO 52016-1. This project is not affiliated with, authorized by, or endorsed by ISO, CEN, or DIN, and does not reproduce the text of the standard.
