offgridai
This is a cost calculator for a datacenter powered by solar, batteries, and gas generation.
https://github.com/offgridai-us/cost-calculator
Category: Consumption
Sub Category: Computation and Communication
Keywords
calculator offgrid solar streamlit
Last synced: about 1 hour ago
JSON representation
Repository metadata
Cost calculator for https://www.offgridai.us
- Host: GitHub
- URL: https://github.com/offgridai-us/cost-calculator
- Owner: offgridai-us
- License: mit
- Created: 2024-12-27T15:48:36.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-22T19:40:45.000Z (2 months ago)
- Last Synced: 2025-04-20T07:53:33.366Z (7 days ago)
- Topics: calculator, offgrid, solar, streamlit
- Language: Python
- Homepage: https://offgridai-cost-calculator.streamlit.app/
- Size: 4.53 MB
- Stars: 11
- Watchers: 2
- Forks: 3
- Open Issues: 0
- Releases: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
README.md
Introduction
This is a cost calculator for a datacenter powered by solar, batteries, and gas generation.
It can simulate a datacenter of any load anywhere in the world, with any combination of solar, battery, and gas generation. The output is a Levelized Cost of Energy (LCOE) in $/MWh, and a yearly financial model.
The code calculates the LCOE using the following steps:
- It pulls weather data for the speciifed
(lat, long)
- It simulates the solar power from the weather data
- It simulates the powerflow of the system between the solar, battery, generator, and datacenter.
- It calculates the annual cashflows and the LCOE of the system.
Usage
There are three ways to use this code:
1. Streamlit interface
streamlit run app.py
2. Command line interface
One-shot LCOE calculation
This simulates a single case.
python calculate_lcoe_one_shot.py --lat 31.9 --long -106.2 --solar-mw 250 --bess-mw 100 --generator-mw 125 --datacenter-load-mw 100
(See calculate_lcoe_one_shot.py
for all possible args)
LCOE Ensemble Calculation
This simulates a range of cases and saves the results to a CSV file.
The "raw results" for every case are saved as a CSV, as well as the Pareto-optimal frontier on LCOE vs renewable-percentage.
python run_ensemble.py
You can define the test cases in run_ensemble.py
.
3. Python
"""There are three steps to calculate the LCOE:
1. Get solar weather data
2. Simulate powerflow
3. Calculate LCOE
"""
# 1. Get solar weather data
solar_ac_dataframe = get_solar_ac_dataframe(lat, long)
# 2. Simulate powerflow
powerflow_results = simulate_system(lat, long, solar_ac_dataframe, ...)
# 3. Create DataCenter instance and calculate LCOE
datacenter = DataCenter(
powerflow_results=powerflow_results,
solar=100,
bess=100,
generator=125,
generator_type="Gas Engine",
# CAPEX rates
solar_capex_total_dollar_per_w=0.25,
bess_capex_total_dollar_per_kwh=0.10,
# O&M rates
solar_om_fixed_dollar_per_kw=0.01,
bess_om_fixed_dollar_per_kw=0.01,
... # See `datacenter.py` for all options and defaults
)
lcoe = datacenter.calculate_lcoe()
Authors
Owner metadata
- Name: offgridai.us
- Login: offgridai-us
- Email: [email protected]
- Kind: organization
- Description: How off-grid solar microgrids can power the AI race
- Website: https://www.offgridai.us
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/199001026?v=4
- Repositories: 1
- Last ynced at: 2025-02-18T22:24:46.338Z
- Profile URL: https://github.com/offgridai-us
GitHub Events
Total
- Watch event: 11
- Push event: 8
- Fork event: 2
Last Year
- Watch event: 11
- Push event: 8
- Fork event: 2
Committers metadata
Last synced: 7 days ago
Total Commits: 57
Total Committers: 2
Avg Commits per committer: 28.5
Development Distribution Score (DDS): 0.105
Commits in past year: 57
Committers in past year: 2
Avg Commits per committer in past year: 28.5
Development Distribution Score (DDS) in past year: 0.105
Name | Commits | |
---|---|---|
bengineer19 | b****9@h****k | 51 |
Mike Fix | 6****e | 6 |
Committer domains:
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 0
Total pull requests: 0
Average time to close issues: N/A
Average time to close pull requests: N/A
Total issue authors: 0
Total pull request authors: 0
Average comments per issue: 0
Average comments per pull request: 0
Merged pull request: 0
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
Top Pull Request Authors
Top Issue Labels
Top Pull Request Labels
Dependencies
- numpy ==1.26.3
- pandas ==2.2.0
- plotly ==5.18.0
- streamlit ==1.31.1
Score: 3.091042453358316