Battery Wiz is an application that can be used to estimate solar array specifications based on your monthly consumption and location. In addition to calculating the required solar capacity for the project, Battery Wiz calculates the capacity of a battery required to power consumption throughout the night.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You need to have PostgreSQL, Rails, and Bundler installed on your machine
Install Rails & Bundler:
$ gem install rails
$ gem install bundler
Install Required Gems
$ bundle install
Setup Database
$ rake db:{create,migrate}
Boot Server and Visit localhost:3000
$ rails server
Testing was written using RSpec. To run the tests:
$ rspec
- User visits homepage and can either sign in (to save information) or proceed to the calculator without signing in.
- The first step of the calculator asks a user for their zipcode.
- After submission an installation resource is created in the db with the zipcode and user_id (if signed in). A session is created with the current installation_id.
- User is redirected to second step.
- The second step of the calculator asks for their energy consumption for every month.
- After submission a consumption resource is created to save their monthly consumption with the current installation_id from the session.
- Before the user is redirected, we calculate the estiated minimum size of a solar array based on the location, their monthly consumption and raw monthly solar output data.
- The user is redirected to the final step where they can specify the details of the solar array for the output calculations. The solar capacity comes pre-filled with the result from step 7, but can be changed.
- The user hits submit and the details are captured in the solar system resource.
- Before the solar system is saved two things happen:
- An api call gets sent to the NREL PVWatts calculator to estimate total monthly output and hour by hour production for the entire year. That data gets captured in the production resource.
- The battery capacity is calculated by taking the monthly consumption and breaking it out to hour by hour consumption based on a standard profile. Then, compares that hourly consumption to hourly production and finds the total daily consumption when there is no solar production, where the maximum is the required battery capacity. These calculations are captured in the battery resource
- The user is directed to a summary page with the installation details, CO2 offset, dollars saved and graphs of the energy production.
- Max Stackhouse - Initial work - Maxscores
This project is licensed under the MIT License - see the LICENSE.md file for details
- Thanks to NREL for the great APIs
- Thanks to Ben Marum for solar expertise