Skip to content

imtona44/solarcalc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SolarCalc - Solar Energy Calculator

Python Flask License PRs Welcome

SolarCalc is a comprehensive solar energy calculator designed to help homeowners, businesses, and solar installers estimate solar power system requirements with precision.

πŸ“± Overview

SolarCalc provides an intuitive web interface for calculating solar system components, estimating costs, and generating detailed bills of materials. Whether you're a homeowner exploring solar options or a professional installer preparing quotes, SolarCalc streamlines the entire estimation process.

✨ Key Features

  • ⚑ Quick System Size Estimator
  • πŸ”§ Detailed PV System Calculator
  • πŸ“‹ Bill of Materials Generator
  • πŸ“Š Real-time Calculations
  • πŸ“± Responsive Design
  • πŸ“„ Print-Friendly Reports
  • πŸ”’ Privacy-Focused (Client-side calculations only)

πŸ—οΈ System Architecture

Frontend (HTML/CSS/JS)
        β”‚
        β–Ό
     Flask Backend
        β”‚
        β–Ό
   Jinja2 Templates
        β”‚
        β–Ό
 Static Assets (CSS/Images)

πŸš€ Quick Start

Prerequisites

  • Python 3.7+
  • pip

Clone the Repository

git clone https://github.com/imtona44/solarcalc.git
cd solarcalc

Install Dependencies

pip install -r requirements.txt

Run the Application

python Solar.py

Application: http://localhost:5000

🎯 Usage Guide

Quick System Size Estimator

  1. Enter monthly electricity bill.
  2. Enter monthly energy consumption (kWh).
  3. Click Calculate System Size.
  4. Review recommended PV system size.

Detailed PV Calculator

Configure:

  • System Voltage
  • PV Module Rating
  • PV Module Isc
  • Advanced Settings
  • Device Loads

Results include:

  • Energy Consumption
  • Solar Panels
  • Battery Bank
  • Inverter
  • Charge Controller

Bill of Materials

Generate and print a complete component list after calculation.

πŸ“ Project Structure

solarcalc/
β”œβ”€β”€ Solar.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
β”œβ”€β”€ templates/
β”œβ”€β”€ static/
└── docs/

πŸ”§ API Endpoints

Route Method Description
/ GET Home
/system-size GET Quick estimator
/detailed-calculator GET Detailed calculator
/materials GET Materials
/about GET About
/privacy GET Privacy
/api/calculate-system-size POST Quick calculation
/api/calculate-detailed-system POST Full calculation

πŸ“Š Calculation Methodology

Daily Consumption = Monthly Consumption / 30
System Size = Daily Consumption / (24 * PanelEfficiency)

TotalWh = Ξ£(DeviceWatts * DeviceHours)
RequiredWh = TotalWh * SystemLossFactor
Panels = ceil(TotalWp / PanelRating)
BatteryAh = (TotalWh * DaysAutonomy) / (Derating * DOD * Voltage)
Inverter = TotalDeviceWatts * 1.25
Controller = ceil(Panels * Isc * 1.3)

βš™οΈ Default Parameters

Parameter Value
System Loss Factor 1.3
Panel Generation Factor 3.43
Days of Autonomy 3
Derating Factor 0.85
Depth of Discharge 0.6
Panel Efficiency 0.16

πŸ“¦ Installation Options

Standard

pip install -r requirements.txt

Development

python -m venv venv
pip install -r requirements-dev.txt
python Solar.py

Production

gunicorn -w 4 Solar:app

or

waitress-serve --port=5000 Solar:app

πŸ§ͺ Testing

python -m pytest tests/
python -m pytest --cov=. tests/

πŸ› Troubleshooting

Issue Solution
Port already in use Change port
Missing dependencies Install requirements
Template missing Verify templates folder
Static files missing Check static folder

🀝 Contributing

  1. Fork repository
  2. Create feature branch
  3. Commit changes
  4. Push branch
  5. Open Pull Request

πŸ“„ License

Educational project using the MIT License.

⚠️ Disclaimer

Results are estimates only. Consult a certified solar engineer before installation.

πŸ“ž Support

  • Email: region2@tesda.gov.ph
  • Telephone: (078) 846-1618
  • Address: TESDA Region II, Tuguegarao, Cagayan

πŸ™ Acknowledgments

  • LEONICS Solar PV System Design
  • TESDA Region II
  • Font Awesome
  • Community Contributors

⭐ Star the Project

If you found this project useful, please consider giving it a ⭐ on GitHub.

Built with ❀️ for the renewable energy community.

About

A web-based solar energy calculator that estimates photovoltaic system requirements, battery sizing, inverter capacity, and generates detailed bills of materials using industry-standard formulas.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors