This repository provides a collection of modular engineering calculation tools designed for building energy systems. The tools focus on HVAC performance, energy cost estimation, and retrofit savings analyses. Originally developed to work with the SmolAgents framework, these files now function as standalone scripts or can be integrated with agent frameworks for automated analysis.
This project includes multiple calculation modules for:
- Boiler Plant Energy Use & Savings
Estimate boiler input/output energy, efficiency, and potential savings through improved operations. - Chilled Water Energy Analysis
Process Excel/CSV datasets from AHUs to calculate cooling energy usage and to produce unit-converted summaries. - VFD Energy Savings
Two alternative approaches:- Fallback Estimation: Uses predefined fan speed profiles and schedules to estimate energy and demand costs.
- Data-Driven Approach (Test): Leverages trend data to compute instantaneous fan power and aggregate energy consumption.
- VAV DDC Replacement Savings
Estimate annual energy cost savings achievable by replacing legacy VAV systems with DDC-controlled units that improve static pressure and supply air temperature control.
In addition, several Gradio demo scripts (e.g. app.py, app_og.py) provide interactive web interfaces for live testing and demonstrations.
Key files in this folder include:
-
boiler_plant_energy_template.py
Contains boiler energy input/output calculations, pump energy estimations, and cost computations based on user-specified scenarios. -
calculate_chilled_water_energy.py
Reads AHU data from Excel/CSV files, cleans and standardizes column names, computes delta T, and calculates total cooling energy (in BTU, ton-hours, and kWh). It also saves results to new Excel files. -
vfd_energy_estimate_fallback.py
Provides a fallback estimation method to calculate fan energy/demand costs using predefined fan speed profiles (e.g. by building type). -
vfd_tools_test.py
Includes alternative energy savings calculations based on VFD trend data from CSV files.
Note: May still contain references to legacy dependencies such assmolagents. -
vav_ddc_replacement_energy_savings.py
Estimates energy cost savings from replacing legacy VAV systems with improved DDC-controlled units. It calculates the combined savings from static pressure and supply air temperature improvements. -
Gradio Demo Scripts (
app.py,app_og.py)
Provide web-based interfaces for interacting with the aforementioned calculation tools. -
Additional Files & Documents
Documentation files (README.md, tool-specific markdown files), workbooks, and related resources that aid in the understanding and deployment of these tools.
-
Clone the Repository and Navigate to the Directory
git clone https://github.com/mbcoalson/engineering_calcs.git cd engineering_calcs -
Set Up Your Virtual Environment
python -m venv venv
Activate the virtual environment:
- On Windows:
.\venv\Scripts\Activate.ps1
- On macOS/Linux:
source venv/bin/activate
- On Windows:
-
Install Dependencies Install the required packages using:
pip install -r requirements.txt
-
Run a Demo For example, to launch the Gradio interface demo:
python app_og.py
-
For Boiler Plant Calculations:
Edit the input parameters inboiler_plant_energy_template.py(e.g., boiler ratings, pump specs) and run the script to generate a detailed energy and savings report. -
For Chilled Water Energy Analysis:
Update the file path incalculate_chilled_water_energy.pyto point to your AHU data file, then run the script. The output Excel file will be saved with summarized energy metrics. -
For VFD and VAV Calculations:
Use the provided functions and demo scripts to estimate energy cost savings. The output is typically printed to the console or provided via the Gradio interface. -
Integration with SmolAgents:
The tools were originally designed to be compatible with SmolAgents frameworks (using the@tooldecorator). See the respective files and the examples in this README for guidance on integrating with agents.
-
Refine Data-Driven Models:
Further testing and validation of the VFD energy savings methods. -
Expand Agent Integration:
Enhance compatibility with LLM-driven analytics for automated decision support. -
Documentation Enhancements:
More detailed usage examples and case studies.
This project is licensed under the MIT License.
Created by mbcoalson.