Cost and Revenue Calculations#

HydroGenerate will compute a project cost, O&M, and revenue. Cost and O&M are computed using the Hydropower Baseline Cost Modeling, Version 2 report, developed by Oak Ridge National Laboratory.

Revenue is computed using the weigthed average wholesale electricity price in 2023 (0.0582 $/kWh) obtained from the EIA by default, or a user entered price.

Exploring economic calcualtion options#

from HydroGenerate.hydropower_potential import calculate_hp_potential
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# 1) Cost and Annual O&M as part of a project. Resource_category =  'Non-PoweredDam'
flow = 2000 # cfs
head = 1000 # ft
power = None
hydropower_type = 'Diversion'
penstock_length = 1200
resource_category = 'NEWSTREAM-REACH'
capacity_factor = 0.6

hp = calculate_hp_potential(flow= flow, rated_power= power, head= head,
                            penstock_headloss_calculation= True,
                            hydropower_type= hydropower_type, penstock_length = penstock_length,
                            resource_category= resource_category,
                            capacity_factor = capacity_factor,
                            annual_caclulation = True)

print('\nResource Category:', hp.resource_category)
print('Initial Capital Cost (M$):', np.round(hp.icc,2))
print('Annual Operation and Maintennance (M$):', np.round(hp.annual_om,2))
print('Annual Revenue (M$):', np.round(hp.annual_revenue,2))
Resource Category: NEWSTREAM-REACH
Initial Capital Cost (M$): 511.0
Annual Operation and Maintennance (M$): 3.26
Annual Revenue (M$): 33.3
# 2) resource_category: 'Non-PoweredDam'

head = 1000 # ft
power = 20000 # kW

hp = calculate_hp_potential(rated_power= power, head= head,
                            hydropower_type= None, 
                            resource_category= 'Non-PoweredDam')

print('\nResource Category:', hp.resource_category)
print('Initial Capital Cost (M$):', np.round(hp.icc,2))
print('Annual Operation and Maintennance (M$):', np.round(hp.annual_om,2))
Resource Category: Non-PoweredDam
Initial Capital Cost (M$): 40.75
Annual Operation and Maintennance (M$): 1.02
# 3 Rewinding a generator. resource_caterogy= 'GeneratorRewind')
head = 104 # ft
power = 20500 # kWred dev

hp = calculate_hp_potential(rated_power= power, head= head,
                            hydropower_type= None, 
                            resource_category= 'GeneratorRewind')

print('\nResource Category:', hp.resource_category)
print('Initial Capital Cost (M$):', np.round(hp.icc,1))
print('Annual Operation and Maintennance (M$):', np.round(hp.annual_om,1))
Resource Category: GeneratorRewind
Initial Capital Cost (M$): 3.0
Annual Operation and Maintennance (M$): 1.2
# 4 Adding a new unit. resource_caterogy= 'UnitAddition')
head = 104 # ft
power = 20500 # kW

hp = calculate_hp_potential(rated_power= power, head= head,
                           hydropower_type= None, resource_category= 'UnitAddition')

print('\nResource Category:', hp.resource_category)
print('Initial Capital Cost (M$):', np.round(hp.icc,1))
print('Annual Operation and Maintennance (M$):', np.round(hp.annual_om,1))
Resource Category: UnitAddition
Initial Capital Cost (M$): 39.0
Annual Operation and Maintennance (M$): 1.0

Using flow as a pandas dataframe and energy calculation#

  • The file data_test.csv used in the examples below is available in the ./examples/ directory of the repository. The Jupyter notebook files for all examples are located in the jugc-docs branch, within the docs folder.

flow = pd.read_csv('data_test.csv') # pandas data frame
flow['dateTime'] = pd.to_datetime(flow['dateTime']) # preprocessing convert to datetime
flow = flow.set_index('dateTime') # set datetime index # flolw is in cfs

head = 20 # ft
power = None
penstock_length = 50 # ft
hp_type = 'Diversion' 

hp = calculate_hp_potential(flow= flow, rated_power= power, head= head,
                            pctime_runfull = 30,
                            penstock_headloss_calculation= True,
                            design_flow= None,
                            electricity_sell_price = 0.05,
                            resource_category= 'CanalConduit',
                            hydropower_type= hp_type, penstock_length= penstock_length,
                            flow_column= 'discharge_cfs', annual_caclulation= True)

pd.set_option('display.max_columns', 10) # 
pd.set_option('display.width', 1000)

# Explore output
# print('Design flow (cfs):', hp.design_flow)
# print('Head_loss at design flow (ft):', round(hp.penstock_design_headloss, 2))
# print('Turbine type:', hp.turbine_type)
# print('Rated Power (Kw):', round(hp.rated_power, 2))
# print('Net head (ft):', round(hp.net_head, 2))
# print('Generator Efficiency:',hp.generator_efficiency)
# print('Head Loss method:',hp.penstock_headloss_method)
# print('Penstock length (ft):', hp.penstock_length)
# print('Penstock diameter (ft):', round(hp.penstock_diameter,2))
# print('Runner diameter (ft):', round(hp.runner_diameter,2))

print('\nResource Category:', hp.resource_category)
print('Initial Capital Cost (M$):', np.round(hp.icc,1))
print('Annual Operation and Maintennance (M$):', np.round(hp.annual_om,1))

print('\nPandas dataframe output: \n', hp.dataframe_output)
print('Annual output: \n', hp.annual_dataframe_output) # annual energy generated and revenue
Resource Category: CanalConduit
Initial Capital Cost (M$): 55.5
Annual Operation and Maintennance (M$): 0.9

Pandas dataframe output: 
                            discharge_cfs   site_id     power_kW  turbine_flow_cfs  efficiency   energy_kWh
dateTime                                                                                                  
2010-01-01 08:00:00+00:00         3260.0  11370500  4449.712151            3260.0    0.831829          NaN
2010-01-01 08:15:00+00:00         3270.0  11370500  4469.737155            3270.0    0.833076  1117.434289
2010-01-01 08:30:00+00:00         3250.0  11370500  4429.637380            3250.0    0.830567  1107.409345
2010-01-01 08:45:00+00:00         3270.0  11370500  4469.737155            3270.0    0.833076  1117.434289
2010-01-01 09:00:00+00:00         3270.0  11370500  4469.737155            3270.0    0.833076  1117.434289
...                                  ...       ...          ...               ...         ...          ...
2021-01-01 06:45:00+00:00         3100.0  11370500  4122.487427            3100.0    0.809553  1030.621857
2021-01-01 07:00:00+00:00         3190.0  11370500  4308.138438            3190.0    0.822639  1077.034610
2021-01-01 07:15:00+00:00         3170.0  11370500  4267.236706            3170.0    0.819858  1066.809177
2021-01-01 07:30:00+00:00         3100.0  11370500  4122.487427            3100.0    0.809553  1030.621857
2021-01-01 07:45:00+00:00         3150.0  11370500  4226.133005            3150.0    0.817006  1056.533251

[385416 rows x 6 columns]
Annual output: 
           annual_turbinedvolume_ft3  mean_annual_effienciency  total_annual_energy_KWh  revenue_M$  capacity_factor
dateTime                                                                                                           
2010                   6.566921e+06                  0.891949             8.106045e+07    4.053022         0.712347
2011                   7.637471e+06                  0.908082             9.412662e+07    4.706331         0.827171
2012                   6.468243e+06                  0.900021             8.065708e+07    4.032854         0.708803
2013                   6.639240e+06                  0.902711             8.241492e+07    4.120746         0.724250
2014                   5.620095e+06                  0.885524             6.982281e+07    3.491141         0.613593
2015                   5.444864e+06                  0.884499             6.842050e+07    3.421025         0.601269
2016                   6.513067e+06                  0.896222             8.079911e+07    4.039956         0.710051
2017                   8.423488e+06                  0.909233             1.029379e+08    5.146897         0.904604
2018                   6.237722e+06                  0.887974             7.683146e+07    3.841573         0.675184
2019                   7.299053e+06                  0.899794             8.972268e+07    4.486134         0.788470
2020                   6.678528e+06                  0.903051             8.303556e+07    4.151778         0.729704
2021                   2.825733e+03                  0.812258             3.328472e+04    0.001664         0.000293