This example is actually a mathematical model of a physical system a planar pendulum,containing five simple equations.The equations are Newton s equations of motion for the pendulum mass under the influence of gravity, together with a geometric constraint, the 5th equation x2+y2=L2 ,that specifies that its position (x,y) must be on a circle with radius L. The variables vx and vy are its velocities in the x and y directions respectively. The interesting property of this model, however, is the fact that the 5th equation is of a different kind: a so-called algebraic equation only involving algebraic formulas of variables but no derivatives. The first four equations of this model are differential equations as in the HelloWorld example. Equation systems that contain both differential and algebraic equations are called differential algebraic equation systems (DAEs)
A Modelica model of the pendulum appears below.
Now let us Plot the results