A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

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

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:

  1. It pulls weather data for the speciifed (lat, long)
  2. It simulates the solar power from the weather data
  3. It simulates the powerflow of the system between the solar, battery, generator, and datacenter.
  4. 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


GitHub Events

Total
Last Year

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 Email 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

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/offgridai-us/cost-calculator

Top Issue Authors

Top Pull Request Authors


Top Issue Labels

Top Pull Request Labels


Dependencies

requirements.txt pypi
  • numpy ==1.26.3
  • pandas ==2.2.0
  • plotly ==5.18.0
  • streamlit ==1.31.1

Score: 3.091042453358316