Your dream house come true!
A simple Building Energy Model written in Python.
The model is derived from the hourly dynamic model in ISO 13790. It has only one capacity and one resistance.
Compared to the ISO 13790 there is
- no internal heat gain,
- full shading of the building, no direct or indirect sun light,
- no windows or doors,
- no ventilation,
- immediate heat transfer between air and surface.
θm,t = θm,t-1 × (1 - Δt / Cm × Htr, em) + Δt / Cm × (ΦHC, nd, t-1 + Htr, em × θe, t-1)
- ΦHC, nd, t: cooling or heating power at time t
- θm, t: building temperature [℃] at time t
- θe, t: outside temperature [℃] at time t
- Af: conditioned floor area [m2]
- Cm: capacity of the building's heat mass [J/K]
- Δt: time step size [s]
- Htr, em: heat transmission to the outside [W/K]
- θint, C, set: cooling set point temperature [℃]
- θint, H, set: heating set point temperature [℃]
- ΦC, max: maximum cooling power [W]
- ΦH, max: maximum heating power [W]
You need Python 3.6 and pip installed.
Install from GitHub (needs Git):
$ pip install git+git://github.com/timtroendle/simple-simple
If you don't have Git installed, download and extract the repository and then execute:
$ cd <simple-simple-directory>
$ pip install -e .
from datetime import timedelta
from simplesimple import Building
conditioned_floor_area = 100
building = Building(
heat_mass_capacity=165000 * conditioned_floor_area,
heat_transmission=200,
maximum_cooling_power=-10000,
maximum_heating_power=10000,
initial_building_temperature=16,
time_step_size=timedelta(minutes=10),
conditioned_floor_area=conditioned_floor_area
)
# simulate one time step
print(building.current_temperature) # returns 16
print(building.thermal_power) # returns 0
building.step(outside_temperature=20, heating_setpoint=18, cooling_setpoint=26)
print(building.current_temperature) # returns ~16.4
print(building.thermal_power) # returns 10000
Best install simplesimple in editable mode:
$ pip install -e .
Run the test suite with py.test:
$ py.test