Skip to content

Commit

Permalink
test for ticket:3857
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo committed May 6, 2016
1 parent e3488b6 commit 0cd621f
Show file tree
Hide file tree
Showing 4 changed files with 516 additions and 0 deletions.
16 changes: 16 additions & 0 deletions openmodelica/xml/BouncingBall.mo
@@ -0,0 +1,16 @@
model BouncingBall "The 'classic' bouncing ball model"
type Height=Real(unit="m");
type Velocity=Real(unit="m/s");
parameter Real e=0.8 "Coefficient of restitution";
parameter Height h0=1.0 "Initial height";
Height h;
Velocity v;
initial equation
h = h0;
equation
v = der(h);
der(v) = -9.81;
when h<0 then
reinit(v, -e*pre(v));
end when;
end BouncingBall;

0 comments on commit 0cd621f

Please sign in to comment.