# bouncingBall.fmu

The bouncingBall implements the following equation:

- der(h) = v;
- der(v) = -g;
- when h<0 then v := -e* v

with start values h=1, e=0.7, g = 9.81 and

- h: height [m], used as state
- v: velocity of ball [m/s], used as state
- der(h): velocity of ball [m/s]
- der(v): acceleration of ball [m/s2]
- g: acceleration of gravity [m/s2], a parameter
- e: a dimensionless parameter

The figure shows the solution computed with Silver for height h of the ball for the start values given above.

The chain of events during simulation is as follows

1. initially h>0 and pos(0)=true
2. continuous integration until a state event is detected, i.e. until h + EPS_INDICATORS = 0. At this time h < 0, the EPS_INDICATORS adds hysteresis.
3. the simulator calls eventUpdate once which reverses the speed direction v of the ball: v = -e * v, and sets pos(0)=false
4. continuous integration until state event is detected, i.e. until h - EPS_INDICATORS = 0. At this time h > 0, the EPS_INDICATORS adds hysteresis.
5. the simulator calls eventUpdate once more which sets pos(0)=true.
6. goto 2

The above description refers to the variables used in file `bouncingBall.c`.

## License conditions

The FMU is provided by QTronic under the BSD License.