Tech Tips: Creating models with CATIA Dymola

In this blog we’ll be discussing the best tech tips for creating models with CATIA Dymola. CATIA Dymola is a powerful tool used by engineers and designers to create complex models of mechanical, electrical, and hydraulic systems.

However, mastering this software can be a challenge, especially for those who are new to it. That’s why we’re here to provide you with some essential tips and tricks that will make the process of creating models with CATIA Dymola much easier and more efficient.

Whether you’re a novice or an experienced user, you’re sure to find some valuable insights in this article that will help you take your modeling skills to the next level.

Creating models with CATIA Dymola

Different Types of Class Components

Modelica supports 8 different types of classes that are used to create functioning models/systems. Although many of the Modelica Standard Library components will be used in most models, it is valuable to understand the distinctions between them when looking at the Modelica code/programming custom components. Each of the components are summarized below in Table 4.

Table 4: Types of Dymola Class Components

ClassDescription
ModelThe most fundamental component, where all logic and component equations are defined.
BlockA special kind of model where connectors contain only input and output signals.
PackageA group of models, projects that contain multiple custom models/components should be stored in a package for organization.
RecordA tabular set of values that will be used as an input for different models.
TypeA custom type variable (i.e., Temperature, Area, etc.) with units/custom annotations
ConnectorA component that defines the connection properties between models
FunctionA set of operations (similar to how functions are traditionally programmed in other languages) using the assign operator := rather than the equals operator.
Expandable ConnectorA connector that automatically connects the two models based on all connectors in a connection set

The Modelica Standard Library (MSL)

The Modelica Standard Library is a free library developed by the Modelica Association which contains over 1400 standard components that can be used free with any commercial library. Many paid libraries are dependent upon the MSL and create their models using the MSL components. Each component in the MSL is documented and is demonstrated as part of the 500+ examples included in the library. The library is organized in a hierarchical structure as shown in Figure 3.

CATIA Dymola

Figure 3: Modelica Standard Library Example View

A breakdown of each of the main categories is given in Table 5. Each category contains sub-categories and is defined in depth in the User Guide of each package.

Table 5: Modelica Standard Library Categories Overview

CategoryDescription
UsersGuideUser’s Guide
BlocksLibrary of basic input/output control blocks (continuous, discrete, logical, table blocks)
ComplexBlocksLibrary of basic input/output control blocks with Complex signals
ClockedClock triggered blocks for describing synchronous behavior suited for implementation of control systems
StateGraphLibrary of hierarchical state machine components to model discrete event and reactive systems
ElectricalLibrary of electrical models (analog, digital, machines, polyphase)
MagneticLibrary of magnetic models
MechanicsLibrary of 1-dim. and 3-dim. mechanical components (multi-body, rotational, translational)
FluidLibrary of 1-dim. thermo-fluid flow models using the Modelica.Media media
MediaLibrary of media property models
ThermalLibrary of thermal system components to model heat transfer and simple thermo-fluid pipe flow
MathLibrary of mathematical functions (e.g., sin, cos) and of functions operating on vectors and matrices
ComplexMathLibrary of complex mathematical functions (e.g., sin, cos) and of functions operating on complex vectors and matrices
UtilitiesLibrary of utility functions dedicated to scripting (operating on files, streams, strings, system)
ConstantsLibrary of mathematical constants and constants of nature (e.g., pi, eps, R, sigma)
IconsLibrary of icons
UnitsLibrary of type and unit definitions

Importing the Modelica Standard Library

The Modelica Standard Library 3DXML is located in the install location for the cloud content, the default install location is C:\Program Files\Dassault Systemes\B425_Cloud_Content\win_b64\resources

\DBM_Libraries\3DXMLData. The 3DXML file for the 4.0.0 version shown in Figure 4 should be present in order to import the MSL in the Behavior Modeling app.

CATIA Dymola

Figure 4: Modelica Standard Library 3DXML File

The MSL can be imported in the Behavior Modeling app by navigating to Behavior Tools -> Modelica Libraries -> Modelica Standard Library (shown in Figure 5). When loading the library for the first time, the library may need to be imported but has been found in the 3DXML file location. Select ‘yes’ to import it. The library should then be shown in the Package Browser window.

CATIA Dymola

Figure 5: Importing the MSL in the Behavior Modeling App

To load the Modelica Standard Library by default, select the Preferences tab under the profile icon in the top right of the Behavior Modeling app. Search “Favorite Libraries”, select the + icon and add the Modelica with the version number 4.0.0, and select “Load the library automatically at opening”. Press “Ok”, “Apply” and close the window. See Figure 6 below.

CATIA Dymola

Figure 6: Automatically Load a Library at Instantiation

Creating a Simple Model

To create a model, select create a New Modelica Class from the function ribbon and give the model a name. Class names must only contain letters, numbers, and underscores and cannot start with a number. The different types of Dymola classes are discussed in Table 4 above. A model can be inserted into another class (most often a package), designated as a partial model (meaning it only exists in the context of a parent model), or extending another class. A model can reuse all the previous components in a different model by extending it.

CATIA Dymola

Figure 7: Creating a New Model: a) Selecting a New Modelica Class, b) Inputting Class Information

The model can now be populated with components. For example, consider the simple 1D spring damper system in Figure 8.

CATIA Dymola

Figure 8: Simple 1D Spring Mass Damper Model

Drag the following components in Table 6 from the translational Modelica Standard Library: Modelica ->  Mechanics -> Translational -> Components.

Table 6: Simple Spring Damper Model Parts

ComponentSymbolValuePurpose
FixedSymbol1A fixed 1D position
SpringSymbol2c = 50

s_rel0 = 100

Provides oscillation motion to the mass
DamperSymbol3d = 0.1Reduces the oscillations caused by the spring
MassSymbol4m = 0.5

L = 25

A mass to cause spring oscillation

The unconnected model should look like Figure 9.

CATIA Dymola

Figure 9: Unconnected Spring Damper Model

For a simple model like this, connections can be formed by simply holding down left click at one of the connector nodes and dragging the dashed blue line to the connector node of another component (see Figure 10 below). For more complex models, specific nodes need to be connected and joined along specified variables, however for this 1-dimensional model, that is not required.

CATIA Dymola

Figure 10: Creating a Connection Between Two Models