Skip to content

Commit d21f159

Browse files
Add IDZ linear model to simple routing.
1 parent 7363d8f commit d21f159

File tree

4 files changed

+43
-2
lines changed

4 files changed

+43
-2
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
within Deltares.ChannelFlow.SimpleRouting.Branches;
2+
3+
block IDZ
4+
import SI = Modelica.SIunits;
5+
extends Internal.PartialIDZ(H(min = H_b));
6+
7+
// Bed level
8+
parameter SI.Position H_b;
9+
parameter SI.Time Delay_in_hour;
10+
11+
annotation(Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {10, 10})));
12+
end IDZ;
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
within Deltares.ChannelFlow.SimpleRouting.Branches.Internal;
2+
3+
partial block PartialIDZ
4+
extends Deltares.ChannelFlow.Internal.HQTwoPort;
5+
extends Deltares.ChannelFlow.Internal.QForcing;
6+
extends Deltares.ChannelFlow.Internal.QLateral;
7+
//extends Deltares.ChannelFlow.Internal.Reservoir;
8+
input Real Q_upstream_delayed;
9+
input Real Q_downstream_delayed;
10+
11+
// States
12+
Modelica.SIunits.Position H;
13+
parameter Real p21;
14+
parameter Real p22;
15+
parameter Real p11;
16+
parameter Real p12;
17+
parameter SI.Area Au;
18+
parameter SI.Area Ad;
19+
20+
equation
21+
// Water level
22+
H = HQUp.H;
23+
24+
der(HQDown.H) = Q_upstream_delayed / Ad + sum(QForcing) / Ad + sum(QLateral.Q) / Ad + p21 * der(Q_upstream_delayed)+ HQDown.Q / Ad + p22 * der(HQDown.Q);
25+
der(HQUp.H) = HQUp.Q / Au + sum(QForcing) / Au + sum(QLateral.Q) / Au + p11 * der(HQUp.Q)+ Q_downstream_delayed / Au + p12 * der(Q_downstream_delayed);
26+
27+
end PartialIDZ;

src/rtctools_channel_flow/modelica/Deltares/ChannelFlow/SimpleRouting/Branches/Internal/package.order

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ PartialKNNonlinear
44
KNAlpha
55
KNNonlinearityParameter
66
KNNonlinearityParameterDenominator
7-
KNNonlinearityParameterNumerator
7+
KNNonlinearityParameterNumerator
8+
PartialIDZ

src/rtctools_channel_flow/modelica/Deltares/ChannelFlow/SimpleRouting/Branches/package.order

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ Integrator
55
KNNonlinear
66
Muskingum
77
Steady
8-
LagAndK
8+
LagAndK
9+
IDZ

0 commit comments

Comments
 (0)