test-29 / README.md
mabuseif's picture
Upload 31 files
91ba325 verified
---
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