rumoca 0.7.28

Modelica compiler written in RUST
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
model BouncingBall "The 'classic' bouncing ball model"
  parameter Real e = 0.8 "Coefficient of restitution";
  parameter Real h0 = 1.0 "Initial height";
  Real h = 1.0 "Height";
  Real v "Velocity";
  Real z;
equation
  z = 2 * h + v;
  v = der(h);
  der(v) = -9.81;
  when h < 0 then
    reinit(v, -e * pre(v));
  end when;
end BouncingBall;