# Anyone working on modeling methanation plants connected to biogas plants and electrolysers?

Hi there,

I’m interested in modeling an energy system that connects biogas plants, electrolysers and methanation plants. I’m thinking of the following components:

• Electrolyser: input: electricity from wind/pv or grid; output: H2, heat
• Biogas Plant: input: heat ; output: CO2, CH4
• Methanation Plant: input: H2, CO2, electricity; output: CH4, heat

At first, it’s sufficient to calculate the hourly and yearly production of CH4 (synthetic CH4 from methanation + CH4 from biogas) with the option of either just using pv and wind for the electrolysis and methanation or a mix of pv, wind and grid electricity. Second priority would be modeling the use of the waste heat supplied by the electrolysis and the methanation for the biogas plant. Generation costs would be great too, but at first I would keep it simple an calculate the costs in already existing excel tools, using the CH4 production and electricity consumption provided by the modeled energy system.

Is anyone working on something similar? As far as I know, electrolysis is already implemented as a transformer in oemof but so far, biogas plants and methanation transformers are not, right?

Cheers and greetings from Leipzig
Oli

In oemof.solph we use generic components such as Transformer, OffsetTransformer and others. Don’t be confused by the name but think of the function. A Transformer for example will transform n inputs to m outputs with a constant efficiency. So you could use it for electrolysis as well as for methanation if you are fine with the linear approach. You could also use the OffsetTransformer to be a bit more exact but you will get a MILP. There are some CHP components but you can use it for all processes with one input and two outputs even though the name suggest just heat and power.

Ok great, thanks for the quick reply :)! The linear approach is fine. So the way I understand it, everything I need is already in the framework.

I’m new to modelling and oemof. I just finished my first python course and took a look at the basic example. So I might have a few more basic questions like these :

So while setting up the energy system, I need to add the transformers and define the respective parameters (nominal Value = kW or MW?, number of inputs and outputs, conversion efficiencies and variable costs). If I create a transformer to represent the methanation I could use a transformer template and add as many new key:value pair to the respective dictionaries of inputs/outputs/conversion_factors, right?

You can use any unit you want but you have to use the same unit everywhere. If you use `kW` for power you have to use `kWh` for energy and `ct/kW` for costs and so on. See my answer here.

Sounds right but have a look at the docs for the Class and the according Constraints.

Hey Oli,

in oemof we do mostly provide generalized components, which can be parameterized in a way to represent certain technologies. With a “transformer” you may model any m:n conversion process (maximum 2:2) and in combination with the generic storage component it should be fairly easy to model your problem (of course with a certain level of abstraction).

All equations will be linear or with some non-linearities represented with binary variables resulting in a mixed integer linear problem. In this way you may for example model on/off model, startup costs or nonlinear efficiencies by using the NonConvex option. You can also have a look at the examples: https://github.com/oemof/oemof-examples/blob/master/oemof_examples/oemof.solph/v0.4.x/start_and_shutdown_costs/startup_shutdown.py#L73.

It would be helpful to be more specific about how detailed the physical processes need to be modelled,

One question you want to answer is: Do you want to set the installed capacities exogenously (not part of the optimisation) “only” simulating optimal dispatch of the system or do you want to find optimal design of the system with its installed capacities (or at least for some components)

Oh, it actually possible to create m:n relations with the transformer class. Sorry for any confusion.