modelMoveMassByPolynomial

Demonstrate meaning of polynom's derivatives

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

The motion of the mass1 is forced depending on the motion of mass2. The dependency is given by a cubic polynomial.

This example demonstrates the meaning of the function evaluating the 2nd derivative of a polynomial with respect to time. Without this function, the DAE index reduction of the mechanical system would fail since positionByPolynomial.s, which prescribes the motion of mass1, needs to be differentiated twice.

In order to check proper differentiation, the block evalPolynomial3 is provided which only evaluates a cubic polynomial of the same coefficients like positionByPolynomial. The signal differences given by add block shall, thus, be zero (see simulation results of add[1].y, add[2].y and add[3].y).

Components

TypeNameDefaultDescription
Utilities.MoveByPolynomialpositionByPolynomial
Modelica.Mechanics.Translational.Components.Massmass1
Modelica.Mechanics.Translational.Components.Massmass2
Modelica.Mechanics.Translational.Components.SpringDamperspringDamper
Modelica.Mechanics.Translational.Sensors.PositionSensorpositionSensor2
Utilities.EvalPolynomial3evalPolynomial3
Modelica.Mechanics.Translational.Sensors.PositionSensorpositionSensor1
Modelica.Mechanics.Translational.Sensors.SpeedSensorspeedSensor
Modelica.Mechanics.Translational.Sensors.AccSensoraccSensor
Modelica.Blocks.Math.Add[3]add