You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
(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 data2. Simulate powerflow3. Calculate LCOE"""# 1. Get solar weather datasolar_ac_dataframe=get_solar_ac_dataframe(lat, long)
# 2. Simulate powerflowpowerflow_results=simulate_system(lat, long, solar_ac_dataframe, ...)
# 3. Create DataCenter instance and calculate LCOEdatacenter=DataCenter(
powerflow_results=powerflow_results,
solar=100,
bess=100,
generator=125,
generator_type="Gas Engine",
# CAPEX ratessolar_capex_total_dollar_per_w=0.25,
bess_capex_total_dollar_per_kwh=0.10,
# O&M ratessolar_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()