Skip to content

Commit

Permalink
clean up unused data
Browse files Browse the repository at this point in the history
  • Loading branch information
mgarrouste committed Oct 4, 2023
1 parent ca4c8e2 commit 1cc8fb0
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 170 deletions.
38 changes: 0 additions & 38 deletions use_cases/LWR_FT_2023/data/ENC_DF.csv

This file was deleted.

38 changes: 0 additions & 38 deletions use_cases/LWR_FT_2023/data/ENC_JF.csv

This file was deleted.

38 changes: 0 additions & 38 deletions use_cases/LWR_FT_2023/data/ENC_MG.csv

This file was deleted.

7 changes: 7 additions & 0 deletions use_cases/LWR_FT_2023/data/data_cleaner.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The goal of this notebook is to pre-process electricity market data to use it for ARMA training"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
56 changes: 0 additions & 56 deletions use_cases/LWR_FT_2023/run/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,35 +118,6 @@ def find_lower_nearest_idx(array, value):
idx = i
return idx

def co2_supply_curve_comb(data,meta):
"""
Determines the cost of CO2 as a function of the quantity asked for,
For HTSE and FT combined component cases
Based on preliminary data from D. Wendt analysis for Braidwood NPP
@ In, data, dict, request for data
@ In, meta, dict, state information
@ Out, data, dict, filled data
@ In, meta, dict, state information
"""
co2_cost = 0
comp_cap = meta['HERON']['RAVEN_vars']['htse_ft_capacity'] #MWe (negative value)
elec_to_h2_rate = 25.13 #kg-H2/MWe
h2_to_co2_rate = 6.58/1.06 #kg-Co2/kg-h2
comp_cap = np.abs(comp_cap)
co2_demand_year = 365*24*comp_cap*elec_to_h2_rate*h2_to_co2_rate #(kg-CO2/year) neg
# Get the data for the NPP
labels = meta['HERON']['Case'].get_labels()
location = labels['location']
location_path = '../data/'+str(location)+'_co2.csv'
df = pd.read_csv(os.path.join(os.path.dirname(__file__), location_path))
cost_data = df.iloc[:,-1].to_numpy()
co2_demand_data = df.iloc[:,-2].to_numpy()
diff = np.absolute(co2_demand_data-co2_demand_year)
idx = np.argmin(diff)
co2_cost = cost_data[idx]
data = {'reference_price': -co2_cost*co2_demand_year}
return data, meta

def co2_supply_curve(data, meta):
"""
Determines the cost of CO2 as a function of the quantity asked for,
Expand Down Expand Up @@ -174,33 +145,6 @@ def co2_supply_curve(data, meta):
data = {'reference_price': -co2_cost*co2_demand_year}
return data, meta

def co2_supply_curve_test(data, meta):
"""
Determines the cost of CO2 as a function of the quantity asked for,
Based on data from D. Wendt analysis on CO2 feedstock
@ In, data, dict, request for data
@ In, meta, dict, state information
@ Out, data, dict, filled data
@ In, meta, dict, state information
"""
co2_cost = 0
ft_cap = meta['HERON']['RAVEN_vars']['ft_capacity'] #kg-H2
h2_rate = 1.06
co2_rate = 6.58
co2_demand_year = 365*24*np.abs(ft_cap)*co2_rate/h2_rate #(kg/year)
# Get the data for the NPP
labels = meta['HERON']['Case'].get_labels()
location = labels['location']
location_path = '../data/'+str(location)+'_co2.csv'
df = pd.read_csv(os.path.join(os.path.dirname(__file__), location_path))
cost_data = df.iloc[:,-1].to_numpy()
co2_demand_data = df.iloc[:,-2].to_numpy()
diff = np.absolute(co2_demand_data-co2_demand_year)
idx = np.argmin(diff)
co2_cost = cost_data[idx]
data = {'reference_price': -co2_cost*co2_demand_year}
return data, meta

def jet_fuel_price(data, meta):
"""
Determines the price of jet fuel given the year of the simulation
Expand Down

0 comments on commit 1cc8fb0

Please sign in to comment.