Skip to content

Commit 7b8e3b7

Browse files
lvanfrettidietmarw
andauthored
Adding "--daeMode", "DAEsolver=true" and related changes (OpenIPSL#375)
* Adding "--daeMode", "DAEsolver=true" and related changes As per OpenIPSL#305, I have finally added the openmodelica flag for DAE mode. I've also added (when missing) the DAEsolver=true flag for Dymola, and I've removed RK2 fixed solver settings for examples that would create an issue when attempting to run the model in Dymola using DAE mode (as those settings are contradicting). Modified the documentation in Examples.DAE to cite the paper, which was added in the Reference sub-package with DOI and URL pointing to the paper. * Attempt to fix URL issue HTML checker did not like the link to LiU's site, so linking to paper directly instead. * Adds link to reference. Also fixes OpenIPSL#305 when merged. --------- Co-authored-by: Dietmar Winkler <[email protected]>
1 parent df3ac05 commit 7b8e3b7

File tree

14 files changed

+39
-17
lines changed

14 files changed

+39
-17
lines changed

OpenIPSL/Examples/DAEMode/N44_Base_Case_Systems/Nordic44_Base_Case_StateEvents.mo

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3376,7 +3376,7 @@ Try simulating the system with an fixed time-step solver, without a DAE mode, an
33763376
experiment(
33773377
StopTime=5,
33783378
Interval=0.001,
3379-
Tolerance=5e-05,
3380-
__Dymola_fixedstepsize=0.01,
3381-
__Dymola_Algorithm="Rkfix2"));
3379+
Tolerance=5e-05),__Dymola_experimentFlags(
3380+
Advanced(Define(DAEsolver=true))),
3381+
__OpenModelica_commandLineOptions = "--daeMode");
33823382
end Nordic44_Base_Case_StateEvents;

OpenIPSL/Examples/DAEMode/N44_Base_Case_Systems/Nordic44_Base_Case_StateEvents2.mo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3374,5 +3374,6 @@ equation
33743374
<li><code>genEventTest.gENSAL.SPEED</code></li>
33753375
</ul>
33763376
<p>Simulate Compare with the results obtained in <strong>Nordic44_Base_Case_Bus_StateEvents</strong>. Note that it takes significantly less time to simulate this system.</p>
3377-
</html>"));
3377+
</html>"),
3378+
__OpenModelica_commandLineOptions = "--daeMode");
33783379
end Nordic44_Base_Case_StateEvents2;

OpenIPSL/Examples/DAEMode/N44_Base_Case_Systems/Nordic44_Base_Case_StateEvents3.mo

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ model Nordic44_Base_Case_StateEvents3
278278
StartTime=60,
279279
StopTime=65,
280280
Interval=0.001,
281-
Tolerance=5e-05,
282-
__Dymola_fixedstepsize=0.01),
281+
Tolerance=5e-05),
283282
__Dymola_experimentFlags(
284-
Advanced(Define(DAEsolver=true))));
283+
Advanced(Define(DAEsolver=true))),
284+
__OpenModelica_commandLineOptions = "--daeMode");
285285
end Nordic44_Base_Case_StateEvents3;

OpenIPSL/Examples/DAEMode/N44_Original_Systems/Nordic44_Original_Case_Bus_Fault.mo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@ equation
2323
<li><code>G1_bus6500.gENSAL.SPEED</code></li>
2424
</ul>
2525
<p>Compare with the results obtained in <strong>Nordic44_Original_Case_Line_Opening</strong>.</p>
26-
</html>"));
26+
</html>"),
27+
__OpenModelica_commandLineOptions = "--daeMode");
2728
end Nordic44_Original_Case_Bus_Fault;

OpenIPSL/Examples/DAEMode/N44_Original_Systems/Nordic44_Original_Case_Line_Opening.mo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ model Nordic44_Original_Case_Line_Opening
1616
<li><code>G1_bus6500.gENSAL.SPEED</code></li>
1717
</ul>
1818
<p>Compare with the results obtained in <strong>Nordic44_Original_Case_Bus_Fault</strong>.</p>
19-
</html>"));
19+
</html>"),
20+
__OpenModelica_commandLineOptions = "--daeMode");
2021
end Nordic44_Original_Case_Line_Opening;

OpenIPSL/Examples/DAEMode/SMIB_Examples/Example_1/Network1.mo

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,7 @@ equation
7979
</ul>
8080
<p>Compare these results with the ones obtained in the <strong>Network2</strong> and <strong>Network3</strong>.
8181
Compare also with the results obtained from the simulating the systems in <strong>Example_1Mode</strong> and <strong>Example_2</strong>.</p>
82-
</html>"));
82+
</html>"),__Dymola_experimentFlags(
83+
Advanced(Define(DAEsolver=true))),
84+
__OpenModelica_commandLineOptions = "--daeMode");
8385
end Network1;

OpenIPSL/Examples/DAEMode/SMIB_Examples/Example_1/Network2.mo

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,7 @@ equation
5858
</ul>
5959
<p>Compare these results with the ones obtained in the <strong>Network1</strong> and <strong>Network3</strong>.
6060
Compare also with the results obtained from the simulating the systems in <strong>Example_1Mode</strong> and <strong>Example_2</strong>.</p>
61-
</html>"));
61+
</html>"),__Dymola_experimentFlags(
62+
Advanced(Define(DAEsolver=true))),
63+
__OpenModelica_commandLineOptions = "--daeMode");
6264
end Network2;

OpenIPSL/Examples/DAEMode/SMIB_Examples/Example_1/Network3.mo

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,7 @@ equation
7878
</ul>
7979
<p>Compare these results with the ones obtained in the <strong>Network1</strong> and <strong>Network2</strong>.
8080
Compare also with the results obtained from the simulating the systems in <strong>Example_1Mode</strong> and <strong>Example_2</strong>.</p>
81-
</html>"));
81+
</html>"),__Dymola_experimentFlags(
82+
Advanced(Define(DAEsolver=true))),
83+
__OpenModelica_commandLineOptions = "--daeMode");
8284
end Network3;

OpenIPSL/Examples/DAEMode/SMIB_Examples/Example_1Mod/Network.mo

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,7 @@ annotation (
6262
</ul>
6363
<p>Note that this system is unstable.
6464
Compare also with the results obtained from the simulating the systems in <strong>Example_1</strong> and <strong>Example_2</strong>.</p>
65-
</html>"));
65+
</html>"),__Dymola_experimentFlags(
66+
Advanced(Define(DAEsolver=true))),
67+
__OpenModelica_commandLineOptions = "--daeMode");
6668
end Network;

OpenIPSL/Examples/DAEMode/SMIB_Examples/Example_2/Network.mo

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,7 @@ equation
6060
</ul>
6161
<p>Note that this system is now stable due to the presence of the Stabilizer.
6262
Compare also with the results obtained from the simulating the systems in <strong>Example_1</strong> and <strong>Example_1Mode</strong>.</p>
63-
</html>"), experiment(StopTime=10));
63+
</html>"), experiment(StopTime=10),__Dymola_experimentFlags(
64+
Advanced(Define(DAEsolver=true))),
65+
__OpenModelica_commandLineOptions = "--daeMode");
6466
end Network;

0 commit comments

Comments
 (0)