General Information
The command Generate from Kinematic enables you to generate a
Modelica behavior (model) of a selected mechanism of a physical product. The Modelica code is
automatically generated, and can then be simulated as-is, or further extended with other
Modelica components.
You can also use an Engineering Knowledge Language (EKL) scripting method to generate the
Modelica behavior.
Data converted from the mechanism are: Other data is not used for model generation.
Overview of Generated Modelica Representation
As a result of the Modelica model generation, a number of classes are created under the
selected target package:
- A locked base class containing the generated model. This class is inserted in the
class InternalGenerated.
- An extended class from the generated model class, where you can add your
modifications, for example, extend the model or replace components.
Structure of the Generated Model
The selected mechanism includes mechanical constraints, from which the parts are
retrieved. The components in the generated Modelica representation are corresponding to
sets of identified parts. Parts included in the root product but not involved in the
mechanism are ignored.
In the generated model, all components are replaceable, except the "world" component.
This component is by default added if the initial physical model does not contain any
published axes. However, if you generate the Modelica model using the command, you can
select to always generate a "world" component and have it connected to the fixed parts,
even if the physical model contains published axes.
Naming Rules
The name of the components (bodies, joints) is generated from the instance name in the
physical product model. The description of the components is the occurrence path from the
physical product model. To comply to Modelica name rules, special characters in names are
replaced, and prefixes may be included to ensure unique entities.
Generated Diagram Layer and 3D Representation
The diagram layer is generated from the topology of the mechanism. The 3D body components
have picture representation from 3D screen shots of the 3D shapes.
Optionally, when generating the Modelica representation with a command, the generated model
can include a 3D representation of the shape, in VRML format as resource of the generated
model. In this mode, the VRML visualization is used for animation instead of the physical
model itself. This can be useful if you want to export the model to another tool, for
example, Dymola.
If you select not to generate a VRML representation, the generated model includes links to
the initial 3D physical model, so it can be animated from the results.
The pictures are stored as resources of the generated Modelica model.
Generated Icon Layer
The icon layer of the generated Modelica model has a different extent value from the
diagram layer. A screenshot of the physical product containing the originating mechanism is
used for the image of the icon layer.
Model Documentation
The generated base model includes an annotation with some information about the origin
model. That information is available from the documentation editor.
Parts Customization
Customization of the Orientation of the Part Frame Connectors
By default, the axis system of the frames of the part components in the generated
Modelica model corresponds to the local axis system of the corresponding physical product.
To specify the customized axis system for the frame of that part component, a publication
named ModelicaAxisSystem must be created in the reference of the
corresponding product.
Customization of Color Animation of Physical 3D Parts
In the class CATIAMultiBody.Parts.BodyShapeWithFrame , you can specify
the parameter UseModelicaColor to true to display input connectors for
color handling. The default value of the parameter is false. One Boolean input connector
is used to switch the color animation on or off, while an array connector of four Reals is
used to specify the color of the shape with RGBT coding (red, green, blue, transparency).
The Real values must be in the range of 0–255.
Handling Replaceable Components
The generated Modelica components are all replaceable. You can replace a component with a
more specialized version, for example, replacing a rigid body with a flexible body.
To do so, you must create a dedicated Modelica class extending
CATIAMultiBody.Interfaces.PartialArrayofFrames . The
frame_a array can then be connected to the relevant internal geometry of
the specialized class.
If you specify the hidePhysicalPart parameter to true, the corresponding
3D physical shape is hidden when the 3D animation is displayed.
Links and Relations from the Kinematic Model to its Modelica Representation
You can see the relationships between the generated Modelica representation and the
original Kinematic model using the command Links and Relations from
the Dymola Behavior Modeling
app. For more information about this command, see Mechanical Systems Design User´s Guide: Links and Relations. Note:
The
links are not bidirectional. You cannot see these links from the Mechanical Systems Design
app.
Updating a Modelica Model Corresponding to a Modified Mechanism
When the physical data involved in a mechanism generating a Modelica model is modified, you
can update the corresponding generated model using any of the following commands: For more information, see Updating, from the Physical or Logical Model, a Generated Modelica Model of a Kinematic Mechanism or an Engineering Model.
Retrieving the Kinematic Model from the Generated Modelica Model
You can retrieve the physical model from the generated Modelica model. For more
information, see Retrieving the Kinematic Mechanism, the 3D Piping Model, or the 3D HVAC Model.
Detecting and Handling Physical Clashes
You can detect and handle clashes in simulations of Modelica models generated from physical
mechanisms. If a clash occurs, clashing objects are highlighted, and the simulation can be
stopped. For more information, see Detecting and Handling Physical Clashes.
Licenses
To be able to generate a Modelica representation of a mechanism of a physical product,
you must also have the Mechanical Systems Design
app.
|