File size: 5,356 Bytes
8acdfd3 91ba325 8acdfd3 91ba325 8acdfd3 91ba325 8acdfd3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | ---
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
|