This blog post seeks to raise awareness of how objects such as visualisers/visualizers reference global settings that can be enabled and adjusted from within the Animation Setup and World objects within Dymola.
Often we want to be able to visualise the application of forces and torques to better understand what is happening in the system we are modelling. This is one of the beauties of simulation, the fact that we can animate variables as the system dynamics evolve, and is something that you cannot do in real life experimentation.
In this blog post we will take the instance of the force arrows available within Modelica.Mechanics.MultiBody.Visualizers and Modelica.Mechanics.MultiBody.Visualizers.Advanced.
The parameter dialog of the arrow classes, an example of which is shown in Figure 2, has a quantity field which allows the user to choose from a list of types, the physical quantity that the arrow represents. The default value for quantity in these arrows is RelativePosition. So if we are interested in using the arrows to visualise a force vector, then we should choose the type Force quantity from the drop down menu.
When we do this, we need to also check the Animation Setup to view what the underlying global scaling is for that type (see Figure 3 and 4).
The Force and Torque vector scaling is derived from the World object defaults that will exist in your model. This is shown in Figure 5 below in the Defaults tab.
Wider use
Within the VeSyMA suite of libraries we use arrows to visualise forces and torques. These might be torques on drive shafts, or forces at wheel-ground contact points or indeed mesh forces in gears.
In the case of the wheel models we use the Claytex.Mechanics.MultiBody.Visualisers.ForceXYZ arrows to be able to visualise the resultant force along each axis. In this case we have bypassed the global scaling factors and just use an internal scaling factor to the Claytex.Mechanics.MultiBody.Visualisers.ForceXYZ model. This is an option you might want to consider if you do not want your scaling to depend on global values.
In summary, try and use as much visualisation as possible, not only for analysis purposes but also for debugging models and be aware of the global scaling settings that are used by such visualisation objects.
Claytex can offer bespoke guidance on how to apply these visualisation techniques to your models. Please get in touch for more information on how we can help you maximise the Dymola- Modelica potential in your modelling tasks. support@claytex.com
Written by: Alessandro Picarelli – Engineering Director
Please get in touch if you have any questions or have got a topic in mind that you would like us to write about. You can submit your questions / topics via: Tech Blog Questions / Topic Suggestion