Skip to content

Commit

Permalink
updated linearization test of the SteamPipe model
Browse files Browse the repository at this point in the history
  • Loading branch information
Willi Braun authored and OpenModelica-Hudson committed Feb 13, 2018
1 parent 05f062d commit be30e8e
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions openmodelica/linearization/testSteamPipe.mos
Expand Up @@ -8,15 +8,15 @@ loadModel(Modelica);getErrorString();
loadFile("./SteamPipe.mo");
loadString("
model testSteamPipeLin
extends SteamPipe(N=1);
extends SteamPipe(N=2);
end testSteamPipeLin;
");

setCommandLineOptions("--generateSymbolicLinearization");
linearize(testSteamPipeLin, stopTime=0.0);getErrorString();

loadFile("linear_testSteamPipeLin.mo");
list(linear_testSteamPiperLin);
list(linear_testSteamPipeLin);


// Result:
Expand All @@ -36,5 +36,28 @@ list(linear_testSteamPiperLin);
// end SimulationResult;
// ""
// true
// ""
// "model linear_testSteamPipeLin
// parameter Integer n = 4;
// // states
// parameter Integer k = 0;
// // top-level inputs
// parameter Integer l = 0;
// // top-level outputs
// parameter Real x0[4] = {3100000, 3100000, 1000000, 1000000};
// parameter Real u0[0] = {i for i in 1:0};
// parameter Real A[4, 4] = [0, 0, -7.506579624472663, 7.506579624472661; 0, 0, 7.506579624472663, -15.01315924894532; 0, 0, -27.8910278969507, 27.8910278969507; 0, 0, 27.8910278969507, -55.78205579390141];
// parameter Real B[4, 0] = zeros(4, 0);
// parameter Real C[0, 4] = zeros(0, 4);
// parameter Real D[0, 0] = zeros(0, 0);
// Real x[4](start = x0);
// input Real u[0];
// output Real y[0];
// Real 'x_h[1]' = x[1];
// Real 'x_h[2]' = x[2];
// Real 'x_p[1]' = x[3];
// Real 'x_p[2]' = x[4];
// equation
// der(x) = A * x + B * u;
// y = C * x + D * u;
// end linear_testSteamPipeLin;"
// endResult

0 comments on commit be30e8e

Please sign in to comment.