Hello,
I’m working on modelling a hydrogen production system using Oemof.Solph, where the electricity sources are fixed wind and solar generators, and the only load is hydrogen demand (with no electricity demand). Additionally, I have a market price time series for excess electricity.
Here’s a summary of the components and challenges I’ve encountered:
Components:
- Bus: 2 - Electricity, hydrogen
- Source: 2 - wind and solar (each with a capacity of 11 MW)
- Transformer: 1 - electrolysis (4 MW)
- Sink: 2 - hydrogen demand and excess electricity
- GenericStorage: 1 - hydrogen store
Problems Encountered:
- Electrolyser Capacity: Despite setting the existing electrolyser capacity to 4 MW, the model still optimizes the capacity of the electrolyser (to 1.9 MW). How can I keep the capacity constant? Also, I need the capital cost of the electrolyser to be factored into the model.This is how I defined the electrolysis component:
electrolysis = solph.Transformer(label='electrolysis_l',
inputs={bus_electricity: solph.Flow()},
outputs={bus_hydrogen: solph.Flow(
nominal_capacity= 4,#MW
investment=solph.Investment(
ep_costs=costs.at['electrolysis', 'capital_cost']),
variable_costs =costs.at['electrolysis', 'marginal_cost'],
maximum=4,#MW
existing=4,#MW
)},
conversion_factors={bus_hydrogen: costs.at['electrolysis','efficiency']},
)
- Excess Electricity: I have excess electricity, but is it possible to include the monetary value of the excess electricity sold in the optimized objective function? While not critically important, it would be useful to compare the model with PyPSA.
- Electricity from the Grid: I’m considering modeling the usage of electricity from the grid, depending on prices, similar to arbitrage. My initial idea is using a Source component:
grid = solph.Source(label='grid_l',
outputs={bus_electricity: solph.Flow(
variable_costs=time_series['electricityprice'],
nominal_capacity= 4, #MW Capacity of the electrolyser
)
},)
However, I’m unsure if this approach will work, as the grid component would be included in the objective function, but the money gained from excess electricity sink component would be kept outside it. hence I’m seeking a solution for problem 2.
If anyone has an alternative solution for the entire model or any other approaches, as well as a solution for problem 1, I would greatly appreciate your insights and assistance.
Thank you for your help.
Best regards, Sajid