-
Notifications
You must be signed in to change notification settings - Fork 298
/
testDrumBoiler.mos
64 lines (59 loc) · 2.68 KB
/
testDrumBoiler.mos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// name: testDrumBoiler
// keywords: jacobian differentiation linearization
// status: correct
// teardown_command: rm -rf testDrumBoilerLin* output.log
//
loadModel(Modelica);getErrorString();
loadString("
model testDrumBoilerLin
extends Modelica.Fluid.Examples.DrumBoiler.DrumBoiler(use_inputs=true);
end testDrumBoilerLin;
");
setCommandLineOptions("--generateSymbolicLinearization");
linearize(testDrumBoilerLin, stopTime=0.0);getErrorString();
loadFile("linearized_model.mo");
list(linearized_model);
// Result:
// true
// ""
// true
// true
// record SimulationResult
// resultFile = "testDrumBoilerLin_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 0.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'testDrumBoilerLin', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "stdout | info | Linearization will be performed at point of time: 0.000000
// LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
// LOG_SUCCESS | info | The simulation finished successfully.
// stdout | info | Linear model is created.
// "
// end SimulationResult;
// "Warning: The model contains alias variables with redundant start and/or conflicting nominal values. It is recommended to resolve the conflicts, because otherwise the system could be hard to solve. To print the conflicting alias sets and the chosen candidates please use -d=aliasConflicts.
// "
// true
// "model linearized_model \"testDrumBoilerLin\"
// parameter Integer n = 3 \"number of states\";
// parameter Integer m = 2 \"number of inputs\";
// parameter Integer p = 4 \"number of outputs\";
// parameter Real x0[n] = {0, 67, 100000};
// parameter Real u0[m] = {0, 0};
// parameter Real A[n, n] = [-0, -0.008333333333333333, -0; 0.01043953430921842, -0.01043953430921842, 0; 0.1178989396709848, -0.1178989396709848, 4.135580766728708e-15];
// parameter Real B[n, m] = [0, 0; -0.001308242749261165, 0.0001170710024614629; -19.14622757506173, 8.475892309753018];
// parameter Real C[p, n] = [0, 0, 0.0001439468903880623; 0, 1, 0; 0, 0, 1e-05; 0, 0, 0];
// parameter Real D[p, m] = [0, 0; 0, 0; 0, 0; 1, 0];
// Real x[n](start = x0);
// input Real u[m](start = u0);
// output Real y[p];
// Real 'x_controller.x' = x[1];
// Real 'x_evaporator.V_l' = x[2];
// Real 'x_evaporator.p' = x[3];
// Real 'u_Y_Valve' = u[1];
// Real 'u_q_F' = u[2];
// Real 'y_T_S' = y[1];
// Real 'y_V_l' = y[2];
// Real 'y_p_S' = y[3];
// Real 'y_qm_S' = y[4];
// equation
// der(x) = A * x + B * u;
// y = C * x + D * u;
// end linearized_model;"
// endResult