FirstExample
A first example
Library
PlanarMechanics/UsersGuide/Tutorial
Description
Here seveal steps will be listed to demonstrate how to build up,simulate and animate a simple pendulum, whichconsists of a fixed point, a planar world model,a revolute joint, a fixed translation and a body.
Building up Modelica composition diagram
The diagram is showed as following.

where component Fixed, Body,FixedTranslation can be found inPartspackage, component Revolute inJoints,PlanarWorld directly under PlanarMechanics.
Every model having components from PlanarMechanics library must includean instance of component PlanarWorld on the highest level. The reason isthat PlanarWorld component defines the default gravity for the model,includes default settings of animation parameters of almost every components.
Setting up initial values and parameters.
In this step, we only need to double click the relevant component andwrite initial values and parameters in the blanks. Default gravityforce in is {0, -9.81}. In this example, phi.start
in revolute
component is set to be 50°,m
and I
in body
arerespectively 1 kg and 0.1 kgm2; all othersettings remain default.
Translating and simulating the simple pendulum model.
With the above settings, animation is as following:
