How can I model a heat pump in the oemof. I think it is necessary to create three buses (low temperature reservoir, electricity, high temperature). But the LinearTransformer class does not allow more than one input. Is there another way to do it?
I would like to set an oemof tag but I am not allowed to do so.
It depends on which oemof version you use. If you use oemof < v0.1.2 you have to model it with just two buses. You can calculate the COP in advance using the temperature of the reservoir and the average temperature of the heat bus. You can pass it as a list, numpy.array, pandas.Series etc..
from oemof import solph
cop = [2.5, 2.3, 2.5] # length = number of time steps
solph.LinearTransformer(
label="pp_gas",
inputs={electricity_bus: solph.Flow()},
outputs={heat_bus: solph.Flow(nominal_value=maximum_output)},
conversion_factors={electricity_bus: cop})
With oemof >= v0.1.2 you can use two or three buses. But think hard if gain an extra value by using a third bus.
from oemof import solph
b_el = solph.Bus(label='electricity')
b_th_low = solph.Bus(label='low_temp_heat')
b_th_high = solph.Bus(label='high_temp_heat')
cop = 3 # coefficient of performance of the heat pump
solph.LinearN1Transformer(
label='heat_pump',
inputs={bus_elec: Flow(), bus_low_temp_heat: Flow()},
outputs={bus_th_high: Flow()},
conversion_factors={bus_elec: cop,
b_th_low: cop/(cop-1)})