134
4 Modeling of Mechanical Oscillatory Systems with One Degree …
equation
der(theta) = omega;
der(omega) = -g / l * sin(theta);
x = l * sin(theta);
y = -l * cos(theta);
Now, you need to add the visualization of the pendulum. To do this, select in
the Modelica library a section of ready-made components of the Mechanics, then
Multibody, and finally Visualizers. Next, select Advanced and then Shape (Fig. 4.2.).
By double-clicking on the Shape button, we get a list of parameters that must be
set in the program (Fig. 4.3.).
So the form search link looks like Modelica.Mechanics.MultiBody.Visualizers.
Advanced.Shape. Since we do not use component modeling, but work in text mode,
we will use Table 4.1 as reference information to create the corresponding lines of
Fig. 4.2 Choosing a form for model visualization
Fig. 4.3 List of parameters for the Visualizer Shape
Précédent

- 146/274

Suivant