Products & Services Solutions Academia Support User Community Company

Learn more about SimMechanics   

Configuring SimMechanics Models in Simulink

SimMechanics and Simulink Options

Simulink provides an extensive set of simulation options that apply to any type of model. Additional options apply specifically to simulating SimMechanics models. This section discusses those standard Simulink options for which mechanical models require special consideration and the additional SimMechanics options specific to mechanical systems .

Distinguishing Models and Machines

Respecting the distinction introduced in Representing Machines with Models in the Modeling Mechanical Systems chapter, you need to make two categories of settings, one for each machine in a model and one for the entire SimMechanics model. To configure a mechanical model for simulation, you need to interact with two dialogs.

Configuring Methods of Solution following discusses the settings in detail.

Machine Settings via the Machine Environment Block

Every machine in your model requires exactly one Machine Environment block to be connected to one of its Ground blocks. The mechanical settings that you enter in that Machine Environment block determine the mechanical environment for that machine only. Other machines are controlled by their respective Machine Environment blocks.

This block controls the connected machine's mechanical environment, including simulation dynamics, machine dimensionality, gravity, tolerances, constraints, motion analysis modes, and visualization. See the Machine Environment reference page for a full description of the block dialog's four tabs.

The Machine Environment settings are also presented in the following sections of this chapter:

Model-Wide Settings via Simulink and Simscape Software

Mechanical and general settings for an entire model are located in the Simulink Configuration Parameters dialog, accessed through the Simulink Simulation menu. Every node in this dialog is relevant to controlling your model's simulation, including visualization. See the Simulink documentation for more details about this dialog.

At a minimum, you need to check and possibly adjust the settings in the Solver node and the Simscape node, with its SimMechanics subnode, before running a mechanical model:

Simulink Configuration Parameters Dialog (Simscape Node Shown)

SimMechanics Default Settings Not Changed If SimMechanics Blocks Are Absent

If you have the SimMechanics product installed, any model you build will display the SimMechanics subnode under the Simscape node. However, if you then build a model that does not include any SimMechanics blocks, any nondefault SimMechanics settings you make in the SimMechanics subnode will not be saved in that model. Upon saving, closing, and reopening the model, the SimMechanics settings will revert to their defaults.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS