-
Notifications
You must be signed in to change notification settings - Fork 298
/
ElectricalCircuit2.mos
81 lines (78 loc) · 3.35 KB
/
ElectricalCircuit2.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// name: ElectricalCircuit2
// keywords: resolveLoops
// status: correct
//
loadModel(Modelica, {"3.2.1"}); getErrorString();
loadFile("ElectricalCircuit2.mo"); getErrorString();
setDebugFlags("backenddaeinfo,stateselection"); getErrorString();
simulate(ElectricalCircuit2); getErrorString();
res := OpenModelica.Scripting.compareSimulationResults("ElectricalCircuit2_res.mat",
getEnvironmentVar("REFERENCEFILES")+"/resolveLoops/ElectricalCircuit2.mat",
"ElectricalCircuit2_diff.csv",0.01,0.0001,
{"resistor.v",
"resistor.i",
"resistor1.v",
"resistor1.i",
"inductor.v",
"inductor.i",
"inductor1.v",
"inductor1.i"});
// Result:
// true
// ""
// true
// ""
// true
// ""
// record SimulationResult
// resultFile = "ElectricalCircuit2_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ElectricalCircuit2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
// LOG_SUCCESS | info | The simulation finished successfully.
// "
// end SimulationResult;
// "Notification: Model statistics after passing the front-end and creating the data structures used by the back-end:
// * Number of equations: 39
// * Number of variables: 39
// Warning: The initial conditions are not fully specified. For more information set -d=initialization. In OMEdit Tools->Options->Simulation->OMCFlags, in OMNotebook call setCommandLineOptions(\"-d=initialization\").
// Notification: Model statistics after passing the back-end for initialization:
// * Number of independent subsystems: 2
// * Number of states: 0 ()
// * Number of discrete variables: 0 ('-d=discreteinfo' for list of discrete vars)
// * Number of discrete states: 0 ('-d=discreteinfo' for list of discrete states)
// * Top-level inputs: 0
// Notification: Strong component statistics for initialization (11):
// * Single equations (assignments): 9
// * Array equations: 0
// * Algorithm blocks: 0
// * Record equations: 0
// * When equations: 0
// * If-equations: 0
// * Equation systems (linear and non-linear blocks): 0
// * Torn equation systems: 2
// * Mixed (continuous/discrete) equation systems: 0
// Notification: Torn system details for strict tearing set:
// * Linear torn systems: 2 {(1,100.0%) 4,(1,100.0%) 3}
// * Non-linear torn systems: 0
// Notification: Model statistics after passing the back-end for simulation:
// * Number of independent subsystems: 3
// * Number of states: 1 (inductor1.i)
// * Number of discrete variables: 0 ('-d=discreteinfo' for list of discrete vars)
// * Number of discrete states: 0 ('-d=discreteinfo' for list of discrete states)
// * Top-level inputs: 0
// Notification: Strong component statistics for simulation (8):
// * Single equations (assignments): 6
// * Array equations: 0
// * Algorithm blocks: 0
// * Record equations: 0
// * When equations: 0
// * If-equations: 0
// * Equation systems (linear and non-linear blocks): 0
// * Torn equation systems: 2
// * Mixed (continuous/discrete) equation systems: 0
// Notification: Torn system details for strict tearing set:
// * Linear torn systems: 2 {(1,100.0%) 4,(1,100.0%) 2}
// * Non-linear torn systems: 0
// "
// {"Files Equal!"}
// endResult