Skip to content

Commit

Permalink
Update hydropower_potential.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbasp22 committed Apr 11, 2024
1 parent 85ad353 commit 7b53ef5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions HydroGenerate/hydropower_potential.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,21 +392,20 @@ def revenue_calculation(self, hp_params):

mean_power = np.mean(hp_params.power) # mean of the power provided for a time series of flow

if hp_params.n_operation_days is None:
hp_params.n_operation_days = 365

if hp_params.capacity_factor:
annual_energy = hp_params.capacity_factor * mean_power * 365 # annual energy generated, killowatt day
hp_params.n_operation_days = hp_params.capacity_factor * 365 # update

elif hp_params.n_operation_days:
else:
if hp_params.n_operation_days > 365:
raise ValueError('The number of days in a year a plant operates cannot exceed 365')

annual_energy = hp_params.n_operation_days * mean_power / 365 # annual energy generatedkillowatt day
annual_energy = hp_params.n_operation_days * mean_power # annual energy generatedkillowatt day
hp_params.capacity_factor = hp_params.n_operation_days * 100/ 365 # update

else:
raise ValueError('The number of days a plant operates, or the capacity factor, are needed' \
' to compute annual energy generated and revenue')

if hp_params.electricity_sell_price is None:
hp_params.electricity_sell_price = 0.01110 # average retail U.S. electricity price in 2021. https://www.eia.gov/electricity/state/

Expand Down

0 comments on commit 7b53ef5

Please sign in to comment.