CCWI / EP-Room-Simulator

This is a Python-based web application for the simulation of indoor climate in building rooms via EnergyPlus.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EnergyPlus Room Simulator

This is a Python-based web application that allows the simulation of indoor climate (temperature, humidity, CO2) in standalone rooms (zones) for data generation purposes using the simulation software EnergyPlus.

For this, an easy-to-use and straightforward GUI is provided, along with a REST API supporting the automation of simulations. It is possible to simulate the indoor climate of a room with individual IDF and EPW files. Furthermore, adjustments can be made to occupancy (presence of people and window openings), room dimensions, room orientation, and infiltration rate. Before starting the simulation, the modified version of a room model can be visualized. After the simulation, plots of the simulation results can then be displayed, and the simulation results can be downloaded as a CSV file and an ESO file. All inputs and outputs are persistently stored in a NoSQL database (MongoDB).

The application is primarily written in Python and uses the Python package eppy to work with EnergyPlus.
It is divided into a frontend (GUI) and a backend (REST API), which are implemented as two separate Python Flask servers.

Screenshot Frontpage Screenshot Room page


Documentation

Further documentation can be found here.

You may also watch our Demo Video.


Installation

To install the software, you need an installation of
Python 3.10,
EnergyPlus version 22-2-0 or 23-1-0,
and either Windows cmd.exe or Linux Bash console.
Additionally, a recent version of Docker must be installed on the machine or a local installation of MongoDB.
Furthermore, node.js is required in order to be able to use the visualization functionality of the tool.
The installation is then performed through the installation script install.py.

Important!

The script performs either a complete installation or simply starts the resources and the program. The complete installation includes creating a virtual Python VENV environment, downloading and starting the MongoDB image and container, installing all required Python packages, and starting the frontend and backend. The simple start involves starting the existing MongoDB Docker container and the program. It is important to note that for a complete installation, a system path equality check is performed. This check is successful only if no virtual environment is activated. Therefore, to perform a completely fresh installation, all existing currently activated virtual environments must be deactivated. On the other hand, for a simple start of the programs (if an installation has already been performed), the dedicated VENV created by the installation needs to be manually activated before running the script.

Installation on Windows (for Windows 10 / 11)

Prerequisites: Installation of Docker, EnergyPlus and node.js

You may use the installation.bat file and the three run files (run_backend.bat, run_frontend.bat, run_spider.bat) to install and run the application. Alternatively, you may use the following commands.

Run the script install.py after you navigated to your project folder:

 python install.py

After the first installation, you can use the same command python install.py to start all three components at once. Three console windows should open up (backend, frontend, spider server). Alternatively, you can start the components individually by the following commands.

Start frontend, backend, and spider server individually:

cd frontend
python -m app
cd backend
python -m app
cd ladybug_spider/spider-idf-viewer/v-2020-10-09/
node server.js

If only the REST API is needed, the backend application can be run standalone.
However, if the frontend is started without the backend, it will not be able to perform any simulation!
Always make sure, that the MongoDB instance is accessible (Docker is running).

About

This is a Python-based web application for the simulation of indoor climate in building rooms via EnergyPlus.

License:GNU General Public License v3.0


Languages

Language:JavaScript 58.8%Language:HTML 33.3%Language:CSS 4.7%Language:Python 3.2%Language:Batchfile 0.0%Language:Shell 0.0%