building energy.ninja
Energy in Cities group, University of Victoria
Instant hourly building load data using surrogate models.
Machine learning surrogate models trained on EnergyPlus runs provide estimates of hourly building heating and cooling loads for any location in the world for different building types, insulation levels etc..

By following the steps below, this tool simulates the heating demand or cooling demand of a through the use of a deep temporal convolutional neural network as a building energy surrogate model.

  1. Choose the building type.
  2. Pick a location on the map.
  3. Customize the building design parameters.
  4. Click Get heating loads or Get cooling loads.
  5. A CSV file with the hourly loads is downloaded.
Victoria, mediterranean climate
Edmonton, humid continental climate
Ottawa, warm summer continental climate

Locations on this map are coloured according to their Heading Degree Day.

CommercialResidential

Location:
Heating Degree Day:













Related research works:

Click to read article
Click to read article
Click to read article

Citation:

Citation:

Citation:

Westermann, Paul, Matthias Welzel, and Ralph Evins. "Using a deep temporal convolutional network as a building energy surrogate model that spans multiple climate zones." Applied Energy 278 (2020): 115563.

Westermann, Paul, and Ralph Evins. "Surrogate modelling for sustainable building design–A review." Energy and Buildings 198 (2019): 170-186.

Westermann, Paul W. Advancing surrogate modelling for sustainable building design. Diss. 2020. http://hdl.handle.net/1828/12127

API

Use these endpoints to access Building Energy Ninja programmatically.

Fast Prediction

Endpoint: /fast/prediction   Method: GET
Returns a CSV file with hourly heating or cooling loads.

Required query parameters

ParameterDescriptionExample
weatherWeather file identifierAFG_FYB_Maymana.AP.409220_TMYx.2004-2018.epw
btBuilding typecommercial or residential
loadLoad typeheating or cooling

Building design parameters (13)

ParameterDescriptionExample
cnaNorth Axis [degrees]123
cuvU-value [W/(mK)]0.05
cwitWall insulation thickness [m]0.12
cwtWindow transmittance0.201
cwcWindow conductivity [W/(mK)]0.042
cwsaWall solar absorptance0.8
chsHeating setpoint [°C]19.25
ccsCooling setpoint [°C]25.98
cegEquipment Gains [W/m²]12
clgLight Gains [W/m²]10
cvrVentilation rate [m³/(s·Person)]0.0067
cirInfiltration rate [m³/(s·m²)]0.0001
cwwrWindow-to-wall ratio0.87

Examples

cURL

curl -O "http://localhost:5000/fast/prediction?weather=AFG_FYB_Maymana.AP.409220_TMYx.2004-2018.epw&bt=residential&cna=123&cuv=0.05&cwit=0.12&cwt=0.201&cwc=0.042&cwsa=0.8&chs=19.25&ccs=25.98&ceg=12&clg=10&cvr=0.0067&cir=0.0001&cwwr=0.87&load=heating"

Python (requests)

import requests

url = "http://localhost:5000/fast/prediction"
params = {
    "weather": "AFG_FYB_Maymana.AP.409220_TMYx.2004-2018.epw",
    "bt": "residential",
    "cna": 123,
    "cuv": 0.05,
    "cwit": 0.12,
    "cwt": 0.201,
    "cwc": 0.042,
    "cwsa": 0.8,
    "chs": 19.25,
    "ccs": 25.98,
    "ceg": 12,
    "clg": 10,
    "cvr": 0.0067,
    "cir": 0.0001,
    "cwwr": 0.87,
    "load": "heating"
}
response = requests.get(url, params=params)
with open("energy_loads.csv", "wb") as f:
    f.write(response.content)

Node.js

const https = require('https');
const fs = require('fs');

const params = new URLSearchParams({
  weather: 'AFG_FYB_Maymana.AP.409220_TMYx.2004-2018.epw',
  bt: 'residential',
  cna: 123,
  cuv: 0.05,
  cwit: 0.12,
  cwt: 0.201,
  cwc: 0.042,
  cwsa: 0.8,
  chs: 19.25,
  ccs: 25.98,
  ceg: 12,
  clg: 10,
  cvr: 0.0067,
  cir: 0.0001,
  cwwr: 0.87,
  load: 'heating'
});
const url = `http://localhost:5000/fast/prediction?${params.toString()}`;
https.get(url, (response) => {
  const file = fs.createWriteStream('energy_loads.csv');
  response.pipe(file);
});

Response

Additional Endpoints

/weather/list

Parameters: search (optional), format (json | csv)

curl "http://localhost:5000/weather/list?format=json"

Example JSON:

{
  "total": 7305,
  "weather_files": [
    {
      "filename": "AFG_FYB_Maymana.AP.409220_TMYx.2004-2018.epw",
      "city": "Maymana",
      "altitude": 824.0,
      "hdd": 4523.0,
      "coordinates": [67.5, 35.93]
    }
  ]
}

/weather/download

Parameter: id (e.g., AFG_FYB_Maymana)

curl -O "http://localhost:5000/weather/download?id=AFG_FYB_Maymana"

Finding Weather Files

  1. Use /weather/list to search.
  2. Or run list_weather_files.py locally:
    python list_weather_files.py --search "CAN"
    python list_weather_files.py --json
    python list_weather_files.py --csv
  3. Weather metadata lives at src/static/sourcedata.geojson.