Simcenter 3D Solutions How to Drive an Assembly Constraint from Motion

2024-01-11T13:13:56.000-0500
Simcenter 3D

Summary

This article describes how to drive an assembly constraint in an assembly from an expression in the Motion simulation.


Details

Creating the Interpart Expression

The requirement is to have the angle controlled by an expression in the Motion sim file. It is therefore necessary to first create this expression in the Motion sim file. Following this, an interpart expression will be created in the assembly file. Begin from the Motion sim
  1. On your keyboard, click “Ctrl” + “E” to open the expressions menu. In the Expressions menu, create a new expression to control the angle of the gear.
  1. In the desired Motion file, click on the “Application” tab in the ribbon, then click “Modeling”. This will open the modeling application.
A screenshot of a computer  Description automatically generated
  1. In the Assembly Navigator, right click on an assembly which owns the gear which will be rotated and select “Make Work Part”.
A screenshot of a computer  Description automatically generated
  1. On the keyboard, hit “CTRL” + “E” to bring up the Expressions menu. On the left hand side of the Expressions Dialog Box, select “Create/Edit Interpart Expression”.
A screenshot of a computer  Description automatically generated
  1. In the Create Interpart Expression dialog box, select the .sim file that is being used. Then, select the expression that will control the angle of the part. Then click OK.
A screenshot of a computer  Description automatically generated

Creating the Assembly Constraint

Objective: Use an assembly constraint in the Modeling Application to change the angle of a gear relative to ground.
  1. First, to control the angle of the gear, there must be something to reference to for an angle. This is best accomplished by defining a CSYS on the object that will be rotated, in the case of the gear, usually at the center. To do this, either right click on the part that will be rotated and select “Make Work Part” or “Open in Window”. It does not matter which method is used, as either way the created Datum CSYS will be owned by the part.
A screenshot of a computer  Description automatically generated
  1. Once open or selected as a work part, in the “Home” tab, under “Construction”, click “Datum CSYS”. Leave the Reference CSYS as “WCS”. In the Datum CSYS dialog box, under Manipulator, click on the Point Dialog button. Select a point that is at the desired center of rotation for the object. For the gear, it should be in the middle of the center hole. Then click OK.
A screenshot of a computer  Description automatically generated
A blue gear with a hole in the center  Description automatically generated
A blue gear with a hole in the center  Description automatically generated
  1. If the gear was edited in a new window, return to the full assembly. Right click on the topmost assembly and click “Make Work Part”.
  2. For this tutorial it could be useful to create a second Datum CSYS that is on the same center of rotation but slightly offset above or below the other Datum CSYS. This will allow the use of the Orient feature in the Assembly Constraint dialog box. However, the second Datum CSYS cannot be owned by the part that will be rotated, so it is best to have the Datum CSYS owned by the topmost assembly.
A blue gear with a hole in the center  Description automatically generated
  1. For the first gear that will be referenced for the assembly constraint, right click on it, then click “Replace Reference Set > Entire Part”. This will bring any Datum CSYS that is a child of the part up to be visible so that it can be used with the assembly constraint. If the part is not the parent of a Datum CSYS, one must be created.
A screenshot of a computer program  Description automatically generated
A blue gear with a white center  Description automatically generated
Before Reference Set Replacement
A blue gear with green lines  Description automatically generated
After Reference Set Replacement

 
  1. In the Assembly Navigator, change the work part to be any assembly which owns both gears of interest.
  2. In the top ribbon, click on “Assemblies”, then click on “Assembly Constraints”.
A diagram of a surface  Description automatically generated with medium confidence
  1. In the Assembly Constraints window, click on the “Angle” constraint under “Type”. Under “Geometry to Constrain”, for “Subtype”, click “Orient Angle”.
A screenshot of a computer  Description automatically generated
  1. Follow the instructions in the bottom left corner of the Simcenter 3D window for how to select objects. For gears, a good series of selections is often: 1.) Select the center of rotation of the gear (Red Box). 2.) Select an axis on a Datum CSYS orthogonal to the axis of rotation (Green Box). 3). Select another axis that is in the same direction as 2 (however it will need to be on a separate CSYS) (Purple Box)
A blue gear with green lines and a hole in the middle  Description automatically generated

 
  1. After the three selections for objects have been made, in the Assembly Constraints dialog box, under “Angle”, from the drop down menu select “Formula”. This will bring up the Expressions dialog box.
A screenshot of a computer  Description automatically generated
 
  1. In the expressions dialog box, a new expression will appear. Double click on the interpart expression, or type in the expression name, to have the formula value match the expression. Once the expression is entered, click OK, then click OK on the Assembly Constraints dialog box.
A screenshot of a computer  Description automatically generated
  1. The motion model can be returned to by clicking “Application” then “Motion” on the top ribbon
image.png

KB Article ID# KB000129078_EN_US

Contents

SummaryDetails

Associated Components

Acoustics Additive Manufacturing Assembly FEM Correlation and Updating Durability Electromagnetics (High Frequency) Electromagnetics (Low Frequency) Flexible Pipe Laminate Composites Margin of Safety Motion Multiphysics NX Open Nonlinear Optimization Pre/Post Response Dynamics Rotor Dynamics Samcef Environment Simulation Process Management Thermal / Flow