|
|
--- |
|
|
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 |
|
|
|
|
|
1. Clone or download this repository |
|
|
2. Navigate to the project directory |
|
|
3. Run the setup script: |
|
|
|
|
|
```bash |
|
|
chmod +x setup.sh |
|
|
./setup.sh |
|
|
``` |
|
|
|
|
|
4. Activate the virtual environment: |
|
|
|
|
|
```bash |
|
|
source venv/bin/activate |
|
|
``` |
|
|
|
|
|
5. Run the application: |
|
|
|
|
|
```bash |
|
|
streamlit run app/main.py |
|
|
``` |
|
|
|
|
|
6. Open your web browser and go to http://localhost:8501 |
|
|
|
|
|
### Option 2: Hugging Face Space Deployment |
|
|
|
|
|
1. Create a new Space on Hugging Face |
|
|
2. Select Streamlit as the Space SDK |
|
|
3. Upload all files from this repository |
|
|
4. 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.md` for detailed usage instructions |
|
|
- **Technical Documentation**: See `docs/technical_documentation.md` for technical details |
|
|
- **Code Documentation**: Comprehensive docstrings are included in the code |
|
|
|
|
|
## Development |
|
|
|
|
|
### Running Tests |
|
|
|
|
|
To run the tests: |
|
|
|
|
|
```bash |
|
|
cd hvac_calculator |
|
|
python -m unittest tests/test_calculator.py |
|
|
``` |
|
|
|
|
|
### Adding New Features |
|
|
|
|
|
1. Fork the repository |
|
|
2. Create a new branch for your feature |
|
|
3. Implement your feature |
|
|
4. Add tests for your feature |
|
|
5. 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 |
|
|
|