A newer version of the Streamlit SDK is available:
1.52.2
metadata
title: HVAC Load Calculator
emoji: π‘οΈ
colorFrom: blue
colorTo: green
sdk: streamlit
sdk_version: 1.28.0
app_file: app/main.py
pinned: false
HVAC Load Calculator
A comprehensive tool for calculating heating and cooling loads for buildings using ASHRAE methods.
Overview
The HVAC Load Calculator is a web-based application that allows users to perform detailed heating and cooling load calculations for buildings. It implements ASHRAE calculation methods and provides an intuitive interface for inputting building information, defining components, and visualizing results.
Features
- Building Information Management: Input and manage building details and design conditions
- Climate Data: Access ASHRAE 169 climate data for various locations
- Building Component System: Define walls, roofs, floors, windows, and doors with preset or custom properties
- U-Value Calculator: Calculate thermal transmittance for custom assemblies
- Internal Loads: Define people, lighting, and equipment loads
- Calculation Engine: Perform cooling load calculations using CLTD/CLF method and heating load calculations using steady-state method
- Interactive Visualizations: View hierarchical component breakdowns, scenario comparisons, psychrometric analysis, and time-based load profiles
- Data Persistence: Save and load projects
- Data Export: Export results in CSV, Excel, and JSON formats
Installation
Prerequisites
- Python 3.10 or higher
- pip (Python package installer)
Option 1: Local Installation
- Clone or download this repository
- Navigate to the project directory
- Run the setup script:
chmod +x setup.sh
./setup.sh
- Activate the virtual environment:
source venv/bin/activate
- Run the application:
streamlit run app/main.py
- Open your web browser and go to http://localhost:8501
Option 2: Hugging Face Space Deployment
- Create a new Space on Hugging Face
- Select Streamlit as the Space SDK
- Upload all files from this repository
- The application will be automatically deployed
Project Structure
hvac_calculator/
βββ app/ # Streamlit application components
β βββ main.py # Main application entry point
β βββ building_info_form.py # Building information input form
β βββ component_selection.py # Component selection interface
β βββ results_display.py # Results display module
β βββ data_validation.py # Data validation module
β βββ data_persistence.py # Data persistence module
β βββ data_export.py # Data export module
βββ data/ # Data models and reference data
β βββ building_components.py # Building component data models
β βββ reference_data.py # Reference data for materials
β βββ climate_data.py # ASHRAE 169 climate data module
β βββ ashrae_tables.py # ASHRAE tables implementation
βββ utils/ # Utility functions and calculation engines
β βββ component_library.py # Component library
β βββ u_value_calculator.py # U-value calculator
β βββ shading_system.py # Shading system for windows
β βββ area_calculation_system.py # Area calculation system
β βββ psychrometrics.py # Psychrometric calculations
β βββ heat_transfer.py # Heat transfer calculations
β βββ cooling_load.py # Cooling load calculations
β βββ heating_load.py # Heating load calculations
β βββ component_visualization.py # Component visualization
β βββ scenario_comparison.py # Scenario comparison
β βββ psychrometric_visualization.py # Psychrometric visualization
β βββ time_based_visualization.py # Time-based visualization
βββ tests/ # Test cases
β βββ test_calculator.py # Tests for calculator components
βββ docs/ # Documentation
β βββ user_guide.md # User guide
β βββ technical_documentation.md # Technical documentation
βββ requirements.txt # Python dependencies
βββ setup.sh # Setup script
βββ huggingface-space.yaml # Hugging Face Space configuration
Documentation
- User Guide: See
docs/user_guide.mdfor detailed usage instructions - Technical Documentation: See
docs/technical_documentation.mdfor technical details - Code Documentation: Comprehensive docstrings are included in the code
Development
Running Tests
To run the tests:
cd hvac_calculator
python -m unittest tests/test_calculator.py
Adding New Features
- Fork the repository
- Create a new branch for your feature
- Implement your feature
- Add tests for your feature
- Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgements
- ASHRAE for providing the calculation methods and reference data
- Streamlit for the web application framework
- The open-source community for various libraries used in this project
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference