Modelica Events and Hybrid Modeling

I would like to understand the general idea of ​​hybrid modeling (in particular, state events) from a digital point of view (although I am not a mathematician :)). Given the following Modelica model:

model BouncingBall
    constant Real g=9.81 
    Real h(start=1);
    Real v(start=0);
equation
    der(h)=v;
    der(v)=-g;
algorithm
    when h < 0 then
         reinit(v,-pre(v));
    end when;

end BouncingBall;

I understand the concept whenand reinit.

  • Does an equation in an expression whenonly work when the condition becomes true correctly?
  • Suppose the ball hits the floor exactly 2sec. Since I use a multi-step solver, this means that the solver "goes out in 2 seconds", admits that h<0(let's say in the simulation time = 2.5sec, h = -0.7). What does this mean: "Time for an event is performed using the intersection function? Is there a simple explanation (example)?
  • ? ?
  • pre() ?
  • noEvent(): " . , , ": ? : 2.5, h = 0.7. noEvent()?
+6
1
  • , if .
  • : , () . , , h (, 2.000000001). - .
  • , . , . , - .
  • pre(x) x .
  • noEvent(h<0) . when noEvent(h<0) then

: Sturm , , , , ( ). , , , , . reset . (Runge-Kutta) , , (BDF/Adams - , dassl/lsodar/cvode) .

+4

Source: https://habr.com/ru/post/1016050/


All Articles