-
Notifications
You must be signed in to change notification settings - Fork 298
/
ScalingTest1.mos
59 lines (54 loc) · 2 KB
/
ScalingTest1.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
// name: ScalingTest1
// status: correct
//
//
loadModel(Modelica); getErrorString();
loadString("
model ScalingTest1
parameter Real nom1 = 1e30;
parameter Real nom2 = 1e-12;
parameter Real fnom1 = 1e25;
parameter Real fnom2 = 1e-13;
Real x1(start=4*nom1,nominal=nom1);
Real x2(start=2*nom2,nominal=nom2);
equation
0 = sin(x1/nom1)*cos(x2/nom2)*fnom2 - cos(x1/nom1)*sin(x2/nom2)*fnom2;
0 = log(x1/nom1)*log(x2/nom2)*fnom1 - log(3)^2*fnom1;
end ScalingTest1;
"); getErrorString();
simulate(ScalingTest1); getErrorString();
val(x1, 0.0); getErrorString();
val(x2, 0.0); getErrorString();
simulate(ScalingTest1, simflags="-override nom1=1,nom2=1,fnom1=1,fnom2=1"); getErrorString();
val(x1, 0.0); getErrorString();
val(x2, 0.0); getErrorString();
// Result:
// true
// ""
// true
// ""
// record SimulationResult
// resultFile = "ScalingTest1_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ScalingTest1', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "stdout | info | The initialization finished successfully without homotopy method.
// stdout | info | The simulation finished successfully.
// "
// end SimulationResult;
// ""
// 5.217839301454226e+30
// ""
// 2.076246647864433e-12
// ""
// record SimulationResult
// resultFile = "ScalingTest1_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ScalingTest1', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-override nom1=1,nom2=1,fnom1=1,fnom2=1'",
// messages = "stdout | info | The initialization finished successfully without homotopy method.
// stdout | info | The simulation finished successfully.
// "
// end SimulationResult;
// ""
// 5.217839301454226
// ""
// 2.076246647864433
// ""
// endResult