1 | model TestDaeMode
|
---|
2 | Real p1(start = 1.3e5, fixed = true);
|
---|
3 | Real p2(start = 1.2e5, fixed = true);
|
---|
4 | Real p3(start = 1.1e5);
|
---|
5 | Real p4(start = 1.0e5, fixed = true);
|
---|
6 | Real rho1;
|
---|
7 | Real rho2;
|
---|
8 | Real rho3;
|
---|
9 | Real w12(start = 1);
|
---|
10 | Real w23(start = 1);
|
---|
11 | Real w34(start = 1);
|
---|
12 | parameter Real C = 1e-3;
|
---|
13 | parameter Real k = 1e4;
|
---|
14 | function sq = Modelica.Fluid.Utilities.regSquare;
|
---|
15 | equation
|
---|
16 | C*der(p1) = -w12;
|
---|
17 | C*der(p2) = w12 - w23;
|
---|
18 | w34 = w23;
|
---|
19 | C*der(p4) = w34;
|
---|
20 | rho1 = p1/1e5;
|
---|
21 | rho2 = p2/1e5;
|
---|
22 | rho3 = p3/1e5;
|
---|
23 | p1 - p2 = k*sq(w12)/rho1;
|
---|
24 | p2 - p3 = k*sq(w23)/rho2;
|
---|
25 | p3 - p4 = k*sq(w34)/rho3;
|
---|
26 | //annotation(__OpenModelica_commandLineOptions="--daeMode");
|
---|
27 |
|
---|
28 | end TestDaeMode;
|
---|