Commit 476b1e5a authored by kdas's avatar kdas
Browse files

removed Landbosse connection

class name changed from "HPP_Sizing" to "hpp"
new methods for the class added
mathematical optimization for wind, solar sizing and wind, solar and battery sizing
new files added for parameters_hpp.py and parameters_Simulation.py
parent 4b37254e
This diff is collapsed.
......@@ -7,73 +7,79 @@ Created on Sun Nov 10 12:05:52 2019
# -*- coding: utf-8 -*-
from parameters_Simulation import *
from parameters_hpp import *
from HyDesign import hpp
if __name__ == "__main__":
import pandas as pd
from HyDesign import Hpp_Sizing
ExampleHPP=hpp(
hpp_grid_connection,
hpp_land_area_available,
wind_rating_WT,
wind_nWT_per_string,
wind_lifetime_WT,
wind_rotor_diameter,
wind_hub_height,
wind_turbine_spacing,
wind_turbine_row_spacing,
solar_lifetime_PV
)
[wind_power_t, solar_power_t, spot_price_t] = ExampleHPP.load_Exogenous_Data_Sizing()
wind_power_t = wind_power_t.loc[start_date:end_date,'Pwind']/100
solar_power_t = solar_power_t.loc[start_date:end_date,'Psolar']/100
spot_price_t = spot_price_t.loc[start_date:end_date,'Price']
capacity_factor_wind = ExampleHPP.calculate_Capacity_Factor(wind_power_t, 1)
capacity_factor_solar = ExampleHPP.calculate_Capacity_Factor(solar_power_t, 1)
# %%
[hpp_wind_capacity, hpp_solar_capacity, P_HPP_t, P_curtailment_t, hpp_investment_cost, hpp_maintenance_cost, LCOE, NPV, IRR] = ExampleHPP.sizing_Wind_Solar(wind_power_t, solar_power_t, spot_price_t)
# Setting up
input_dir_ts = r'C:\Users\kdas\Documents\HCP Anywhere\Anatole MSc thesis\Case_study\Data'
input_wind_ts_filename = r'\Wind\wind_pow.csv'
input_solar_ts_filename = r'\Solar\solar_pow.csv'
input_price_ts_filename = r'\Market\spot_2014_2016.csv'
start_date = pd.to_datetime("2016-01-01 00:00:00")
end_date = pd.to_datetime("2016-12-31 23:00:00")
wind_zone = "DK2_wind"
solar_zone = "DK2_solar"
market_zone = "DK2"
timeFormat_wind = "%d/%m/%Y %H:%M:%S"
timeFormat_solar = "%d/%m/%Y %H:%M:%S"
timeFormat_price = '%Y/%m/%d %H:%M:%S'
timename ='Time'
rating_WT = 2.6
nWT_per_string = 20
lifetime_WT = 30
lifetime_PV = 30
grid_connection = 50 # in MW
land_area_available = 100 # in square km
rotor_diameter = 128 # in m
hub_height = 120 # in m
turbine_spacing = 4 # in terms of Rotor Diameter
turbine_row_spacing = 10 # in terms of Rotor Diameter
## ----------------------------------------------------------------------------
## 1. Initilize a Meso_extractor object
## ----------------------------------------------------------------------------
my_Hpp_Sizing = Hpp_Sizing(
input_dir_ts,
input_wind_ts_filename,
input_solar_ts_filename,
input_price_ts_filename,
start_date,
end_date,
wind_zone,
solar_zone,
market_zone,
timeFormat_wind,
timeFormat_solar,
timeFormat_price,
timename,
rating_WT,
nWT_per_string,
lifetime_WT,
lifetime_PV,
grid_connection,
land_area_available,
rotor_diameter,
hub_height,
turbine_spacing,
turbine_row_spacing
)
# %%
wind_ts=my_Hpp_Sizing.Data_Import_Wind()
# wind_cap_fact=my_Hpp_Sizing.Calculate_Capacity_Factor_Wind(wind_ts)
AEP = P_HPP_t.sum()/len(P_HPP_t)*8760/1000
Curtailed_Energy = P_curtailment_t.sum()/1000
print("\033[H\033[J")
print('Wind Capacity = %d MW' % hpp_wind_capacity)
print('Solar Capacity = %d MW' % hpp_solar_capacity)
print('AEP = %.0f GWh' % AEP)
print('Curtailed Energy = %.0f GWh' % Curtailed_Energy)
print('HPP Investment Cost = %.0f MEUR' % (hpp_investment_cost/1e6))
print('HPP Maintenance Cost = %.0f MEUR' % (hpp_maintenance_cost.sum()/1e6))
print('HPP LCOE = %.2f EUR/MWh' % LCOE)
print('HPP NPV= %.0f MEUR' % (NPV/1000000))
print('HPP IRR = %.0f%%' % (IRR*100))
solar_ts=my_Hpp_Sizing.Data_Import_Solar()
# %%
price_ts=my_Hpp_Sizing.Data_Import_Price()
out_var=my_Hpp_Sizing.Sizing_Optimisation(wind_ts,solar_ts,price_ts)
[hpp_wind_capacity, hpp_solar_capacity, hpp_battery_power_rating, hpp_battery_energy_capacity, P_RES_available_t, P_HPP_t, P_curtailment_t, P_charge_discharge_t, E_SOC_t, hpp_investment_cost, hpp_maintenance_cost, LCOE, NPV, IRR] = ExampleHPP.sizing_Wind_Solar_Battery(wind_power_t, solar_power_t, spot_price_t)
# %%
AEP = P_HPP_t.sum()/len(P_HPP_t)*8760/1000
Curtailed_Energy = P_curtailment_t.sum()/1000
print("\033[H\033[J")
print('Wind Capacity = %d MW' % hpp_wind_capacity)
print('Solar Capacity = %d MW' % hpp_solar_capacity)
print('Battery Storage Power Rating = %d MW' % hpp_battery_power_rating)
print('Battery Storage Energy Rating = %d MWh' % hpp_battery_energy_capacity)
print('AEP = %.0f GWh' % AEP)
print('Curtailed Energy = %.0f GWh' % Curtailed_Energy)
print('HPP Investment Cost = %.0f MEUR' % (hpp_investment_cost/1e6))
print('HPP Maintenance Cost = %.0f MEUR' % (hpp_maintenance_cost.sum()/1e6))
print('HPP LCOE = %.2f EUR/MWh' % LCOE)
print('HPP NPV= %.0f MEUR' % (NPV/1000000))
print('HPP IRR = %.0f%%' % (IRR*100))
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 14 17:51:53 2020
@author: kdas
"""
import pandas as pd
# =============================================================================
# # Alessandra's data
# =============================================================================
CorRES_simulation = 0
sizing_simulation = 1
EMS_simulation = 0
wind_as_component = 1
solar_as_component = 1
battery_as_component = 1
input_dir_ts = r'C:\Users\kdas\OneDrive - Danmarks Tekniske Universitet\Work\Hybrid Power Plant\HyDesign\hydesign\HyDesign\Alessandra code\Hand in\Data'
#input_wind_ts_filename = r'\Wind\wind_pow.csv'
input_wind_ts_filename = r'\aveW.csv'
#input_solar_ts_filename = r'\Solar\solar_pow.csv'
input_solar_ts_filename = r'\aveS.csv'
#input_price_ts_filename = r'\Market\spot_2014_2016.csv'
input_price_ts_filename = r'\PriceProfilePPA.csv'
#start_date = pd.to_datetime("2016-01-01 00:00:00")
start_date=pd.to_datetime('2018-09-01 00:00')
#end_date = pd.to_datetime("2016-12-31 23:00:00")
end_date = pd.to_datetime("2019-08-31 23:00")
wind_zone = "DK2_wind"
solar_zone = "DK2_solar"
market_zone = "DK2"
#timeFormat_wind = "%d/%m/%Y %H:%M:%S"
timeFormat_wind = "%d/%m/%Y %H:%M"
#timeFormat_solar = "%d/%m/%Y %H:%M:%S"
timeFormat_solar = "%d/%m/%Y %H:%M"
#timeFormat_price = '%Y/%m/%d %H:%M:%S'
timeFormat_price = '%d/%m/%Y %H:%M'
timename ='Time'
#timeZone_wind = "UTC"
timeZone_wind = "IST"
#timeZone_solar = "UTC"
timeZone_solar = "IST"
#timeZone_price = "CET"
timeZone_price = "IST"
# =============================================================================
# =============================================================================
# Anatole's data
# =============================================================================
# CorRES_simulation = 1
# sizing_simulation = 1
# EMS_simulation = 0
# wind_as_component = 1
# solar_as_component = 1
# storage_as_component = 1
# input_dir_ts = r'C:\Users\kdas\OneDrive - Danmarks Tekniske Universitet\Work\Hybrid Power Plant\Data'
# #input_wind_ts_filename = r'\Wind\wind_pow.csv'
# input_wind_ts_filename = r'\Wind\Wind_Forecast_dataseed1\power_groups.csv'
# #input_price_ts_filename = r'\Market\spot_2014_2016.csv'
# input_price_ts_filename = r'\PriceProfilePPA.csv'
# #start_date = pd.to_datetime("2016-01-01 00:00:00")
# start_date=pd.to_datetime('2018-09-01 00:00')
# #end_date = pd.to_datetime("2016-12-31 23:00:00")
# end_date = pd.to_datetime("2019-08-31 23:00")
# wind_zone = "DK2_wind"
# solar_zone = "DK2_solar"
# market_zone = "DK2"
# #timeFormat_wind = "%d/%m/%Y %H:%M:%S"
# timeFormat_wind = "%d/%m/%Y %H:%M"
# #timeFormat_solar = "%d/%m/%Y %H:%M:%S"
# timeFormat_solar = "%d/%m/%Y %H:%M"
# #timeFormat_price = '%Y/%m/%d %H:%M:%S'
# timeFormat_price = '%d/%m/%Y %H:%M'
# timename ='Time'
# #timeZone_wind = "UTC"
# timeZone_wind = "IST"
# #timeZone_solar = "UTC"
# timeZone_solar = "IST"
# #timeZone_price = "CET"
# timeZone_price = "IST"
# =============================================================================
\ No newline at end of file
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 14 18:22:37 2020
@author: kdas
"""
# Alessandra's data
#hpp parameters
hpp_grid_connection = 300 # in MW
hpp_land_area_available = 100 # in square km
# hpp_BOS_soft_cost = 119940 #[Eur/MW]
# hpp_grid_connection_cost = 37074 #[Eur/MW]
hpp_lifetime = 25 # [years]
hpp_discount_factor = 0.07
#hpp wind parameters
wind_rating_WT = 2.1
wind_nWT_per_string = 20
wind_lifetime_WT = 30
wind_rotor_diameter = 97 # in m
wind_hub_height = 120 # in m
wind_turbine_spacing = 5 # in terms of Rotor Diameter
wind_turbine_row_spacing = 10 # in terms of Rotor Diameter
# wind_turbine_cost = 851000 # [EUR/MW]
# wind_civil_works_cost = 116986 #[Eur/MW]
# wind_fixed_onm_cost = 12805 #Wind fixed O&M cost per year [Eur/MW]
#hpp solar parameters
solar_lifetime_PV = 30
# solar_PV_cost = 219000 # [EUR/MW]
# solar_hardware_installation_cost = 241854 #[Eur/MW]
# solar_fixed_onm_cost = 8149 #Solar O&M cost per year [Eur/MW]
#hpp battery parameters
hpp_BOS_soft_cost = 119940 #[Eur/MW]
hpp_grid_connection_cost = 37074 #[Eur/MW]
wind_turbine_cost = 851000 # [EUR/MW]
wind_civil_works_cost = 116986 #[Eur/MW]
wind_fixed_onm_cost = 12805 #Wind fixed O&M cost per year [Eur/MW]
solar_PV_cost = 219000 # [EUR/MW]
solar_hardware_installation_cost = 241854 #[Eur/MW]
solar_fixed_onm_cost = 8149 #Solar O&M cost per year [Eur/MW]
battery_energy_cost = 181596 #163436 272394Eur/MWh
battery_power_cost = 64190 # 64190-64190*0.1 64190*1.6Power conversion system cost[Eur/MW]
battery_BOP_installation_commissioning_cost = 73360 #73360-73360*0.1# 73360-73360*0.1 73360*1.6Electric Balance of Plant, installation, commissioning cost [Eur/MW]
battery_control_system_cost = 18340# 18340-18340*0.1 18340*1.6Grid management control system cost[Eur/MW]
battery_energy_onm_cost = 10000 #4000 13000Battery energy capacity maintenance cost [Eur/MWh] per year
battery_depth_of_discharge = 0.9
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment