Welcome to reservoir-simulation’s documentation!

Reservoir model

Modelica element

The good practice is to name the input and output variables “Name of the reservoir + _Qturbine, _Qspill, _Inflow_Q”

The modelica model

Code:

model MudMountain_Reservoir__simulation
  import SI = Modelica.SIunits;
  // Schematization elements
  Deltares.ChannelFlow.SimpleRouting.Reservoir.Reservoir ReservoirMudMountain annotation(
    Placement(visible = true, transformation(origin = {-42, 22}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Deltares.ChannelFlow.SimpleRouting.BoundaryConditions.Inflow InflowMudMountain annotation(
    Placement(visible = true, transformation(origin = {-80, 22}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Deltares.ChannelFlow.SimpleRouting.BoundaryConditions.Terminal TerminalDownstream annotation(
    Placement(visible = true, transformation(origin = {30, 22}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));

// variable used to represent the absolute value of the derivative of Qturbine, used to smoothen
  //    operation of the turbine.
  //Real ReservoirMudMountain_absQturbder(min = 0);
  //Real ReservoirMudMountain_absQspillder(min = 0);
  // Time series
  input SI.VolumeFlowRate ReservoirMudMountain_Inflow_Q(fixed = true);
  input SI.VolumeFlowRate ReservoirMudMountain_Qturbine(fixed = false);
  input SI.VolumeFlowRate ReservoirMudMountain_Qspill(fixed = false);
  output SI.Volume  ReservoirMudMountain_V(min = 10^5, max = 1.68*10^8);
  output SI.VolumeFlowRate ReservoirMudMountain_Qout(min = 0, max = 8*10^3);
  output SI.VolumeFlowRate Downstream_Q(min = 0, max = 3*10^4);
equation
  connect(ReservoirMudMountain.QOut, TerminalDownstream.QIn) annotation(
    Line(points = {{-34, 22}, {30, 22}}));
  connect(InflowMudMountain.QOut, ReservoirMudMountain.QIn) annotation(
    Line(points = {{-72, 22}, {-50, 22}, {-50, 22}, {-50, 22}}));
  InflowMudMountain.Q = ReservoirMudMountain_Inflow_Q;
  ReservoirMudMountain.Q_spill = ReservoirMudMountain_Qspill;
  ReservoirMudMountain.Q_turbine = ReservoirMudMountain_Qturbine;
  ReservoirMudMountain_V = ReservoirMudMountain.V;
  ReservoirMudMountain_Qout = ReservoirMudMountain.QOut.Q;
  Downstream_Q = TerminalDownstream.QIn.Q;
    end MudMountain_Reservoir__simulation;

The modelica model for optimization

The sturcture of the reservoir model

Input of information

Information is given to the model to several ways:

  1. The boundary conditions are given in timeseries_import.xml
  2. The initial conditions are given in timeseries_import.xml
  3. The reservoir parameters are given in reservoirs.csv
  4. The parameters of the model are given in rtcParameterConfig.xml

Calculation

The simulation model calculates the spilled and turbined flow of the reservoir based on the option the user choses. This option can be chosen in “rtcParameterConfig.xml”. The following options are available:

		<parameter id="ReservoirMudMountain_passInflow">
			<boolValue>false</boolValue>
		</parameter>

In this option the outflow is is equal to the inflow and distributed between spillway and turbine flow. First, the water is sent to the turbine, and if the turbine runs with full capacity, the rest of the water is spilled. If the water to spill exceeds the capacity of the spillway, they stay in the reservoir. The capacity of the turbine and the spill is given at the reservoirs.csv file.

This option allows the user to give a time series for release. This will be distributed between turbine and spill just as explained above.

		<parameter id="ReservoirMudMountain_userRelease">
			<boolValue>false</boolValue>
		</parameter>

If both above options are set false, this option is automatically activated. This gives a constant Q release.

				<parameter id="ReservoirMudMountain_user_volume">
			<boolValue>false</boolValue>
		</parameter>

Note

The reservoir bounds have no longer any function. Note: the volume-level range should be long enough.

Indices and tables