Two Pumps

Property of Wetterskip Fryslân

Note

This example focuses on how to put multiple pumps in a hydraulic model, and assumes basic exposure to RTC-Tools and the PumpingStationMixin. To start with basics of pump modeling, see Basic Pumping Station.

The purpose of this example is to understand the technical setup of a model with multiple pumps.

The scenario of this example is similar to that of Basic Pumping Station with the following exceptions:

  • there are two available pumps instead of one;
  • each pump has its associated price of energy;
  • from historical data we know that pump1 has been on during the two previous hours.

The folder examples/pumping_station/two_pumps contains the complete RTC- Tools optimization problem. The discussion below will focus on the differences from the Basic Pumping Station.

The Model

The pumping station object MyPumpingStation looks as follows in its diagram representation in OpenModelica:

../../_images/two-pumps-mypumpingstation-medit.png

When modeling multiple pumps of the same type, it makes sense to define a model, which can then be instantiated into multiple objects. In the file Example.mo this can be seen in the submodel MyPump of MyPumpingStation:

 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
    model MyPump
      extends Deltares.HydraulicStructures.PumpingStation.Pump(
        power_coefficients = {{{-39095.7484857 ,  66783.26438029},
                               {  7281.58399033,       0.0}},
                              {{-27859.72396609,  52991.89678362},
                               {  6547.78028277,       0.0}},
                              {{-23247.11759041,  47371.07046571},
                               {  6106.48287875,       0.0}},
                              {{-33451.06236192,  59110.131313  },
                               {  7034.0025483,       0.0}},
                              {{-39861.93265223,  67925.88638803},
                               {  7281.81109575,       0.0}},
                              {{-18905.97159263,  40725.7120928 },
                               {  5785.42670305,       0.0}},
                              {{-69080.26073112,  97844.92974535},
                               {  8776.27578528,       0.0}},
                              {{-27357.47031974,  52938.41395038},
                               {  6406.26137405,       0.0}},
                              {{-49670.43493511,  78653.65042992},

The data of this pump is exactly equal to that used in Basic Pumping Station, but is not instantiated yet. To instantiate two pumps using this data, we define two components pump1 and pump2:

33
34
                               {  8408.00958411,       0.0}},
                              {{-22131.50613895,  39713.73557364},

Lastly, it is important not to forget to set the right number of pumps on the pumping station object:

3
4
5
6
  model MyPumpingStation
    extends Deltares.HydraulicStructures.PumpingStation.PumpingStation(
      n_pumps=2
    );

The Optimization Problem

When using multiple pumps it is important to specify the right order of pumps. This order should match the order of pumps in the pump_switching_matrix. The parameter energy_price_symbol is used to specify the energy price of each pump in the pumping station. This is either a string or a list of strings of names of the energy prices time series. If energy_price_symbol is a string, then all the pumps of the pumping station will have the same energy price. Else there must be as many energy price symbols as number of pumps.

53
54
55
56
57
58
59
60
61
62

        # Here we define a list of pumping stations, each consisting of a list
        # of pumps. In our case, there is only one pumping station containing
        # a single pump.
        self.__pumping_stations = [PumpingStation(self, 'pumpingstation1',
                                                  pump_symbols=['pumpingstation1.pump1',
                                                                'pumpingstation1.pump2'],
                                                  energy_price_symbols=['energy_price_P1',
                                                                        'energy_price_P2'],
                                                  status_history='{pump}_status_hist')]

Results

We give an overview of the results.

../../_images/overall_results2.png

As mentioned we assume that pump1 has been on for the two previous hours, so it must be on for at least one more hour. This explains why it is on in the first time step. Beside that, the pumps discharge water when the water level is low even though the energy price is higher during that time frame.