Creating and using subsystems

A subsystem in Dymola is a model that is used inside other models and is usually used to define models that correspond to physical parts. Making use of subsystems is important as it reduces the work required to build new models by increasing the reuse of existing models and reducing the future maintenance effort.

The model below is an example of a rear wheel drive model that contains flexible shafts in a simple test rig.

In the Rear Wheel Drive driveline above the simple flexible shafts are used to represent the propshaft, and the halfshafts.  The differential consists of an ideal planetary gear with an ideal gear to model the bevel gear.  The actuator is a step input torque and the left and right halfshafts are attached to two large inertias.

In the RWD driveline three flexible shafts are being used, a better way to model this would be to create a flexible shaft model (this is the subsystem) and use it three times.  We could also create a differential model that combines the planetary and ideal gear in to one component model.

To create the flexible shaft model, create a new model in Dymola and call it FlexibleShaft.  Drag in two inertias and a spring damper as in the image below:

Constructing flexible shaft

The FlexibleShaft model is above, the Inertia and SpringDamper models can be found in the Modelica.Mechanics.Rotational.Components package in the library browser.  To be able to connect this subsystem to other components, connectors are required.  These connectors are created by dragging out a connection from the inertia and then right clicking, a dialog box, as in the image above, will become visible. Select the Create Connector option.  Create two connectors as in the diagram above and also connect the inertias and the spring damper together as shown.

This model can now be re-used in a larger model.  The subsystem model can be dragged in from the Library Browser to make the following model below:

The model above essentially is the same model that was first created but with the flexible shafts now being subsystems.  This model is easier to understand and maintain then the original.


Got a question? Just fill in this form and send it to us and we'll get back to you shortly.


© Copyright 2010-2017 Claytex Services Ltd All Rights Reserved. | Designed by CMA Marketing

Log in with your credentials

Forgot your details?