Two Pumps¶
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 equal to that of Basic Pumping Station,
but with two pumps available instead of one. 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:
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 = {{3522.8, -27946.3, 54484.8},
{1665.43, 5827.81, 0.0},
{208.251, 0.0, 0.0}},
working_area = {{{ -5.326999, 54.050758, 0.000000},
{ -1.0, 0.0, 0.0}},
{{ 0.000426, -0.001241, 2.564056},
{ -1.0, 0.0, 0.0}},
{{ 2.577975, -5.203480, 0.000000},
{ -1.0, 0.0, 0.0}},
{{ 13.219650, -3.097600, -7.551339},
{ -1.0, 0.0, 0.0}}},
working_area_direction = {1, -1, -1, 1},
minimum_on=3.0*3600);
end MyPump;
|
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
:
28 29 | MyPump pump1;
MyPump pump2;
|
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
.
48 49 50 51 52 53 54 |
# 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'])]
|