Simulate a Behavior with the Simulate Command
You can use the Simulate command to perform a simulation and then show a 2D/3D animation.
-
Open the Modelica Standard Library and from the Package
Browser select
Modelica.Mechanics.MultiBody.Examples.Elementary
and then double-click Pendulum.
The Pendulum diagram opens. It is also selected.Note: The model must be open and selected before performing next step.
-
From the
Behavior Authoring section of the
action bar,
click
Simulate
.
Tip: You can also access this command from any of: - The Simulation section of the action bar.
- The Action Pad panel. To access the Action Pad panel, from the Tools section of the action bar, click Action Pad , or right-click an empty area and select Display > Action Pad.
- A window containing a status bar appears. The status bar shows the progress of the simulation calculations, including the simulation time. This window closes when the simulation calculations are completed.
- The results of the simulation are shown as a list in the Variable Browser.
- The Messages Reporting window appears to display information about the compilation.
- If your model contains a 3D representation, the 3D representation is displayed. You can manage if you display the animation, the diagram or both. See Managing 2D and 3D Views.
- The Experience Player toolbar is displayed.
- The Simulation Options dialog box appears, as a dialog box or minimized as an icon to the right in the tab.
Important: To display the two last items in the list above, animation must be started. It may be started automatically after simulation, depending on the value of the preference Start animation after simulation. If the items are not displayed, you can start animation by replaying the simulation. To do that, from the Simulation section of the action bar, click Replay Animation . (To specify the above preference Start animation after simulation, select Me > Preferences > App Preferences > 3D Modeling > Systems Modeling and Execution > Dymola Behavior Modeling , the Results tab. For more information, see Native Apps Preferences Guide: Results.)
-
In the
Simulation Options
dialog box,
set your preferences for the animation.
See
Managing Simulation Options Using the Simulation Options Dialog Box.
-
In the
Experience Player toolbar click
Play Forward
.
Other options available on the Experience Player toolbar are:
Option Description Loop Mode
: Plays a single animation.
: Continuously repeats the animation from the start.
: Continuously reverses the animation.
Current Simulation Parameter box
Displays the current timer value and units. You can enter a value in this box.
Jump to begin
Stops the simulation animation and resets the timer to the start value.
Play Backward
Plays the simulation animation backwards from the current position.
Play Step Backward
Plays the simulation animation backwards one step at a time.
Pause
Pauses the simulation animation.
Play Step Forward
Plays the simulation animation one step at a time.
Play Forward
Plays the simulation animation from the current position.
Jump to End
Stops the simulation animation and resets the timer to the end value.
Seek slider control
Displays the current timer value and units. You can drag the slider to change the timer value.
SpeedFactor box and drop down list
Displays the current speed factor and units (the speed factor is the value of one step when using the Play Step Backward and Play Step Forward commands). Use the drop down list to change the speed factor value. You can also Reset the value to speed factor 1.
Warning: The Experience Player toolbar may be displayed before the simulation calculation has been completed. In these circumstances, if you position the Seek slider control at a time that is not yet computed, the animation is not displayed anymore. The animation of the simulation is displayed. If your model contains a 3D representation, the 3D representation is also animated. At the timer end value, the animation stops.Tip: You can display variable names and values dynamically on the diagram. See Monitoring Variables on the Diagram. -
To leave the animation mode, do one of the following:
- If you did not replay, click Simulate from the action bar or from the Action Pad panel.
- If you did replay, click Replay Animation from the action bar.
- In any case, you can close the Experience Player toolbar. It must be undocked by dragging to be able to close.