forked from modelica/Reference-FMUs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FMI2.xml
104 lines (95 loc) · 3.79 KB
/
FMI2.xml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?xml version="1.0" encoding="UTF-8"?>
<fmiModelDescription
fmiVersion="2.0"
modelName="BouncingBall"
description="This model calculates the trajectory, over time, of a ball dropped from a height of 1 m."
generationTool="Reference FMUs (development build)"
guid="{1AE5E10D-9521-4DE3-80B9-D0EAAA7D5AF1}"
numberOfEventIndicators="1">
<ModelExchange
modelIdentifier="BouncingBall"
canNotUseMemoryManagementFunctions="true"
canGetAndSetFMUstate="true"
canSerializeFMUstate="true">
<SourceFiles>
<File name="all.c"/>
</SourceFiles>
</ModelExchange>
<CoSimulation
modelIdentifier="BouncingBall"
canHandleVariableCommunicationStepSize="true"
canNotUseMemoryManagementFunctions="true"
canGetAndSetFMUstate="true"
canSerializeFMUstate="true">
<SourceFiles>
<File name="all.c"/>
</SourceFiles>
</CoSimulation>
<UnitDefinitions>
<Unit name="m">
<BaseUnit m="1"/>
</Unit>
<Unit name="m/s">
<BaseUnit m="1" s="-1"/>
</Unit>
<Unit name="m/s2">
<BaseUnit m="1" s="-2"/>
</Unit>
</UnitDefinitions>
<TypeDefinitions>
<SimpleType name="Position">
<Real quantity="Position" unit="m"/>
</SimpleType>
<SimpleType name="Velocity">
<Real quantity="Velocity" unit="m/s"/>
</SimpleType>
<SimpleType name="Acceleration">
<Real quantity="Acceleration" unit="m/s2"/>
</SimpleType>
</TypeDefinitions>
<LogCategories>
<Category name="logEvents" description="Log events"/>
<Category name="logStatusError" description="Log error messages"/>
</LogCategories>
<DefaultExperiment startTime="0" stopTime="3" stepSize="1e-2"/>
<ModelVariables>
<ScalarVariable name="time" valueReference="0" causality="independent" variability="continuous" description="Simulation time">
<Real/>
</ScalarVariable>
<ScalarVariable name="h" valueReference="1" causality="output" variability="continuous" initial="exact" description="Position of the ball">
<Real start="1" declaredType="Position"/>
</ScalarVariable>
<ScalarVariable name="der(h)" valueReference="2" causality="local" variability="continuous" initial="calculated" description="Derivative of h">
<Real derivative="1" declaredType="Velocity"/>
</ScalarVariable>
<ScalarVariable name="v" valueReference="3" causality="output" variability="continuous" initial="exact" description="Velocity of the ball">
<Real start="0" reinit="true" declaredType="Velocity"/>
</ScalarVariable>
<ScalarVariable name="der(v)" valueReference="4" causality="local" variability="continuous" initial="calculated" description="Derivative of v">
<Real derivative="3" declaredType="Acceleration"/>
</ScalarVariable>
<ScalarVariable name="g" valueReference="5" causality="parameter" variability="fixed" initial="exact" description="Gravity acting on the ball">
<Real start="-9.81" derivative="2" declaredType="Acceleration"/>
</ScalarVariable>
<ScalarVariable name="e" valueReference="6" causality="parameter" variability="tunable" initial="exact" description="Coefficient of restitution">
<Real start="0.7" min="0.5" max="1"/>
</ScalarVariable>
<ScalarVariable name="v_min" valueReference="7" variability="constant" description="Velocity below which the ball stops bouncing">
<Real start="0.1" declaredType="Velocity"/>
</ScalarVariable>
</ModelVariables>
<ModelStructure>
<Outputs>
<Unknown index="2"/>
<Unknown index="4"/>
</Outputs>
<Derivatives>
<Unknown index="3"/>
<Unknown index="5"/>
</Derivatives>
<InitialUnknowns>
<Unknown index="3" dependencies="4" dependenciesKind="constant"/>
<Unknown index="5" dependencies="6" dependenciesKind="constant"/>
</InitialUnknowns>
</ModelStructure>
</fmiModelDescription>