Power Investment with the Flow-Class

Hello,

I currently try to enable oemof to be able to invest in storage capacity as well as in power per Technology (for example a pump storage).
I am Aware of the capacity_ratio Parameter, though that seems to be fixed and I want it to be variable.

My Approach was to Limit the Maximum flow.

General “Flow” questions:

  1. The flow itself has to be seen as a summed up flow per period (kWh / Joule) and is either set by the user or optimized by oemof. If latter is the case, oemof will have the possibility to invest in kWh/€ (or whatever I choose to be the “unit”) ?
    Example: outputs={bel : solph.Flow(actual_value=data[‘wind’],fixed=True,investment=solph.Investment(ep_costs=epc_wind))}

  2. I don’t fully understand the implications when using the flow class with Storages. That flow is apparently created by using the capacity_ratio and has to be set and I am bounded by that.

–> To be able to bound the flow aside from the capacity_ratio my idea is to create a dummy bus+dummy-technology

–> General_Electricity_Bus <----Dummy_Flow—> <—>General_Storage_Class

That doens’t seem elegant to me at all, but I don’t see any other Workarounds.

Can anybody help me with that?

BR
Fabian

UPDATE: With version v0.2.2 it will be possible to define the parts of the storage separately within the GenericStorage component.

The GenericStorage with an Investment object uses the GenericInvestmentStorageBlock of oemof. This connects the investment variable of the input and output Flow with the investment variable of the capacity with the capacity_ratio. This is pretty realistic for a battery stack but if you want to increase the reservoir of a PHES without increasing the pump and the turbine (or just change the ratio) this does not work for you.

If you want to optimise the three components separately you have to add these components. A pump, a turbine and a storage. You could use the transformer class for the pump (electrical energy into potential energy) and the turbine (potential energy into electricity) and the GenericStorage for the reservoir. Now you connect the electricity bus with the pump, the pump with the storage, the storage with the turbine and the turbine with the electricity bus. In that way you can add limitations and costs for each component separately. You can keep the reservoir fixed and invest only into the turbine and the pump or the other way round or you can invest into all three parts.

You may want to have this a little more compact (without what you called “dummy components”). First of all with the generic components we tried to make it possible to cover all use cases. In a second step we started to add special components for special use cases (more compact but less generic). In your case you could add a PHES component which covers your use cases in one component. If you want to do that you can contact us and we will provide some help.

The attributes in the Flow class are relative to the nominal_value (or investment_variable). Therefore you can add a relative time series for the data['wind'] and the output will increase equivalent to the installed capacity.

You have to care for the units. You always have to use the same units or you have to use a transformer to change between units. If you want the storage to store in Joule instead of MWh you have to adapt you inflow/outflow efficiency respectively. The Flow has a power unit and you get the energy if you multiply it with the time period. If you have 15 minutes values and the input flow has the value 1 the energy in the storage will increase by 0.25.

I hope I understood the questions the right way.

@uwe.krien thanks for the Feedback. I wrote you personally concerning the PHES component.

As a Training I tried to quickly achieve the same with the 3 components but it seems like I am doing it wrong … would it be possible to take a quick glance? I wasn’t sure about the Flow Parameters for “PHES_Speicher”. Since it is connected through the two Transformers, I simply erased all the Code for the Flow.

Code:

PHES_Speicher = solph.components.GenericStorage(
label=“PHES_Speicher”,
capacity_loss=0, initial_capacity=0,
investment=solph.Investment(ep_costs=epc_storage),
)

PHES_Pumpe = solph.Transformer(
label=‘PHES_Pumpe’,
inputs= {bel : solph.Flow(
actual_value=1000,
fixed=True,
investment=solph.Investment(ep_costs=100))},
outputs={PHES_Speicher : solph.Flow()},
conversion_factors={bel : 1, PHES_Speicher : 1}
)

PHES_Turbine = solph.Transformer(
label=‘PHES_Turbine’,
inputs= {bel : solph.Flow()},
outputs={bel : solph.Flow(
actual_value=1000,
fixed=True,
investment=solph.Investment(ep_costs=100))},
conversion_factors={bel : 1, PHES_Speicher : 1}
)

First, please use the code-block to show your code. It is much easier to read:

```python
print(“This is my {0} code”.format(‘python’))
```

The code above leads to:

print("This is my {0} code".format('python'))

You cannot connect a component to a component. Sorry in this point my answer above was a little bit misleading. You need a “Potential-Energy-Bus”.

phes

You could also add a Source if your PHES has an natural inflow.

1 Like

By the way: If you do not have any costs or energy losses the pumps and turbines may work at the same time (the energy just circulates).

With commit a9cc26265 it is possible to use the GenericStorage of oemof more flexible. Now it is possible to set a value or invest in each component of the storage (e.g. pump, basin, turbine) independently. This should solve this issue.

Thanks to @Fabian and @simnh.

The feature will be part of the v0.2.2 release scheduled for 15 June 2018 but it can already be used in the developer version.

1 Like

@Fabian I think you can mark it as solved because v0.2.2 of oemof is already released.

Now all parts of the storage (pump, basin and turbine or the equivalent components in other storage types) can be defined separately as fixed component or as investment component within the GenericStorage class.