Ticket #6108: TestNonlinearTearing.mo

File TestNonlinearTearing.mo, 649 bytes (added by Francesco Casella, 5 years ago)
Line 
1package TestNonlinearTearing
2 model Test1
3 Real x1(start = 1);
4 Real x2(start = 3);
5 Real x3(start = 0);
6 Real x4(start = 10);
7 Real x5;
8 equation
9 sin(x1 - 10) * sin(x1 - 1) + 1e-2 * x5 = 0;
10 1e-6 * x1 + x2 + 1e-2 * x3 + 1e-2 * x4 + 1e-2 * x5 = 1;
11 1e-6 * x1 + 1e-6 * sin(x2) + x3 + 1e-6 * x4 = 0;
12 (x4 - 10) * (x4 - 1) + 1e-2 * x1 + 1e-2 * x2 + 1e-2 * x3 + 1e-2 * x4 = 0;
13 1e-6 * x1 + x5 + sin(x3) + 1e-6 * x4 = 4;
14 end Test1;
15
16 model Test2
17 extends Test1;
18 annotation(
19 __OpenModelica_commandLineOptions = "--tearingMethod=minimalTearing");
20 end Test2;
21end TestNonlinearTearing;