My name is Jordan Koszarek, I'm a software engineer, and this is my React based Passive Logic submission for simulating the power transfer from a solar panel to power storage.
For convenience, I have hosted the web app in Azure at: https://jkpowertransfer.z5.web.core.windows.net/
The Solar Panel Simulator is a tool that helps users determine the best placement for solar panels based on weather conditions, location, the time of day, and the current date. By using current weather data, temperature, location, and cloud coverage, this simulator will output the watts per hour, pump consumption and net power.
- Interactive map for solar panel placement
- Weather data integration
- Energy transfer data
- Automatically calculate Azimuth based on the current date and location
- Customizable solar panel configuration: Area m^2, Panel Tilt, Panel Efficiency, Panel Facing direction, and distance from the power storage.
To set up and run the project locally:
Prerequisite 0. (Prerequisite) install node.js and npm more info: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open localhost
Note: An OpenWeatherMap API key is provided, limited to 1000 requests per day. If I were to use this in production the key would be in a Azure Key Vault or GitHub Secret.
- Open the application in your web browser.
- Drag and drop the marker on the map to position the solar panel.
- Configure your solar panel and pump, default values are provided.
- The simulator will update with energy generation estimates based on the new location.
-
Location Data: The simulator uses Leaflet to provide an interactive map. When you move the marker, it captures the new latitude and longitude.
-
Weather Integration: Using the location data, the app makes an API request to OpenWeatherMap to fetch current weather conditions, including cloud coverage, temperature, and humidity, and local timezone.
-
Parameter Consideration: The simulation takes into account user-defined parameters such as solar panel size, distance from the storage container, and storage container capacity.
-
Energy Simulation: Based on all collected data, the simulator calculates the potential energy transfer per hour under the current conditions.
- The simulator only considers current weather conditions, and current time which means the current sun location. It does not account for weather changes over time.
- The math has been simplified for the proof of concept, I would not use this for actual solar panel placement, although it could be a good place to start.
- The web app is intended for desktop use, some of the smaller screen styling could use work.
- The simulator only accounts for 1 solar panel.
- It would be great to support multiple solar panels.
- Account for weather changes over time
- Support time based simulation, for example, simulating a month at a time given the rotation of the solar panel and the changes in output over time.