Skip to content
This repository has been archived by the owner on Feb 12, 2020. It is now read-only.

Commit

Permalink
Harmonize descriptions in BouncingBall XMLs
Browse files Browse the repository at this point in the history
see #7
  • Loading branch information
t-sommer committed Jun 25, 2019
1 parent 03777e9 commit 4e56451
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions BouncingBall/FMI1CS.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
<DefaultExperiment startTime="0" stopTime="3"/>

<ModelVariables>
<ScalarVariable name="h" valueReference="0" causality="output" description="Height">
<ScalarVariable name="h" valueReference="0" causality="output" description="Position of the ball">
<Real start="1" fixed="true"/>
</ScalarVariable>
<ScalarVariable name="v" valueReference="1" causality="output" description="Velocity">
<ScalarVariable name="v" valueReference="1" causality="output" description="Velocity of the ball">
<Real/>
</ScalarVariable>
<ScalarVariable name="g" valueReference="2" description="Gravity" variability="parameter">
<ScalarVariable name="g" valueReference="2" variability="parameter" description="Gravity acting on the ball">
<Real start="-9.81" fixed="true"/>
</ScalarVariable>
<ScalarVariable name="e" valueReference="3" description="Rebound factor" variability="parameter">
<ScalarVariable name="e" valueReference="3" variability="parameter" description="Coefficient of restitution">
<Real start="0.7"/>
</ScalarVariable>
</ModelVariables>
Expand Down
6 changes: 3 additions & 3 deletions BouncingBall/FMI1ME.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
<DefaultExperiment startTime="0" stopTime="3"/>

<ModelVariables>
<ScalarVariable name="h" valueReference="0" causality="output" description="Height">
<ScalarVariable name="h" valueReference="0" causality="output" description="Position of the ball">
<Real start="1"/>
</ScalarVariable>
<ScalarVariable name="v" valueReference="1" causality="output" description="Velocity">
<ScalarVariable name="v" valueReference="1" causality="output" description="Velocity of the ball">
<Real start="0"/>
</ScalarVariable>
<ScalarVariable name="g" valueReference="2" variability="parameter" description="Gravity">
<ScalarVariable name="g" valueReference="2" variability="parameter" description="Gravity acting on the ball">
<Real start="-9.81" fixed="true"/>
</ScalarVariable>
<ScalarVariable name="e" valueReference="3" variability="parameter" description="Coefficient of restitution">
Expand Down
8 changes: 4 additions & 4 deletions BouncingBall/FMI3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
<DefaultExperiment startTime="0" stopTime="3" stepSize="1e-3"/>

<ModelVariables>
<Float64 name="h" valueReference="0" description="height, used as state" causality="output" variability="continuous" initial="exact" start="1"/>
<Float64 name="v" valueReference="1" description="velocity of ball, used as state" causality="output" variability="continuous" initial="exact" start="0" reinit="true"/>
<Float64 name="g" valueReference="2" description="acceleration of gravity" causality="parameter" variability="fixed" initial="exact" start="-9.81"/>
<Float64 name="e" valueReference="3" description="dimensionless parameter" causality="parameter" variability="tunable" initial="exact" start="0.7" min="0.5" max="1"/>
<Float64 name="h" valueReference="0" causality="output" variability="continuous" initial="exact" start="1" description="Position of the ball"/>
<Float64 name="v" valueReference="1" causality="output" variability="continuous" initial="exact" start="0" reinit="true" description="Velocity of the ball"/>
<Float64 name="g" valueReference="2" causality="parameter" variability="fixed" initial="exact" start="-9.81" description="Gravity acting on the ball"/>
<Float64 name="e" valueReference="3" causality="parameter" variability="tunable" initial="exact" start="0.7" min="0.5" max="1" description="Coefficient of restitution"/>
</ModelVariables>

<ModelStructure>
Expand Down
10 changes: 5 additions & 5 deletions BouncingBall/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ whith the variables

| Variable | Start | Unit | Causality | Variability | Description
|:---------| -----:|:-----|-----------|-------------|:---------------
| h | 1 | m | output | continuous | Distance to the ground
| v | 0 | m/s | output | continuous | Velocity
| g | 9.81 | m/s2 | parameter | fixed | Gravity
| e | 0.7 | | parameter | tunable | Rebound factor
| v_min | 0.1 | m/s2 | parameter | constant | Threshold velocity to stop bouncing
| h | 1 | m | output | continuous | Position of the ball
| v | 0 | m/s | output | continuous | Velocity of the ball
| g | 9.81 | m/s2 | parameter | fixed | Gravity acting on the ball
| e | 0.7 | | parameter | tunable | Coefficient of restitution
| v_min | 0.1 | m/s2 | parameter | constant | Velocity below which the ball stops bouncing

The plot shows the [reference result](BouncingBall_ref.csv) computed with [FMPy](https://github.com/CATIA-Systems/FMPy).

Expand Down

0 comments on commit 4e56451

Please sign in to comment.