MV-1020: Model 2D Rigid to Rigid Contact Simulation
Learn how to create Curve Entities and Curve Graphics, use macros to create them simultaneously, and setup a 2D rigid curve to curve contact.
Review the Model
Review the model by running it using MotionSolve.
- Launch MotionView.
-
Open the Model by doing one of the following:
- On the Standard toolbar, click (Open Model).
- On the menu bar, click .
-
From the Open model dialog, select the file
Cam_Follower_Input.mdl from your working directory
and click Open.
Review the model for its bodies, graphics, markers, joints, and motion. It will look like the image in Figure 2.
- Click the (Run panel) icon.
- Click the Save and run current model browser button. Then click the Run button.
- Once the simulation is completed, close the solver window and the Message Log.
-
From the Run panel, review the results animation by clicking on the
Animate button.
Notice that the FollowerRoller is not in contact with the Cam since there is no contact defined in the model.
-
Click the (Page Window Layout) button to return to the
MotionView window.
Create Curve Entity and Curve Graphics
Create the Curve Entity and Curve Graphics for FollowerRoller.
-
Open the Add Curve dialog by doing one of the
following:
- From the Project Browser, right-click on Model and select .
- On the Reference Entity toolbar, click the (Curves) icon.
- In the dialog, for Label enter Roller_Curve. For Variable, enter crv_roller.
-
Click OK.
-
From the Properties tab, use the first drop-down menu to change the curve to
3D Cartesian.
Note: Only 3D Cartesian types of Curve Entities are supported for the Curve Graphics.
- Use the fourth drop-down menu to change the curve from Open Curve to Closed Curve.
- Click the x radio button, then select Math from the second drop-down menu.
- In the Expression Builder, enter 5*SIN(2*PI*(0:1:0.01)). Then hit Enter.
-
For the Math expressions of the y and z coordinates, enter
5*COS(2*PI*(0:1:0.01)) and
0.0*(0:1:0.01) respectively.
You have finished creating the Curve Entity. Next, you will create a graphic to represent the FollowerRoller body. Later, you will use this to define 2D Contact.
-
Open the Add CurveGraphic dialog by doing one of the
following:
- From the Project Browser right-click on Model and select .
- On the Reference Entity toolbar, click the (Graphics) icon.
- In the drop-down menu, choose Curve.
- In the dialog, for Label enter Roller_Curve. For Variable, enter gcrv_roller.
-
Click OK.
Note: The Body/Point option (Parent type) has been selected by default on the Connectivity tab.
-
From the Connectivity tab, double-click on the
collector. In the dialog, select FollowerRoller.
The collector is highlighted by default.
- Click the collector. In the dialog, select FollowerRevJoint.
-
Click the collector. In the dialog, choose
Roller_Curve. Leave the rest of the options on the
panel as default.
Curve Graphics representing the FollowerRoller should now be graphically visible.
-
Now that you have created new graphics, deactivate the original cylinder
graphics used to represent the FollowerRoller.
Create Curve Entity and Curve Graphics for Cam
Divide the cam profile into Fixed and Variable portions to determine the best shape of the cam for achieving a specific displacement profile of the follower.
The variable portion of the cam will be controlled by the coordinates of some points in the model.
Create Fixed Portion of Cam Profile
Use a .csv file containing x, y, and z coordinates of points to create a Curve Entity.
-
Open the Add Curve dialog by doing one of the
following:
- From the Project Browser right-click on Model and select .
- On the Reference Entity toolbar, click the (Curves) icon.
- In the dialog, for Label enter Cam_fixed_Curve. For Variable, enter crv_cam_fix. Then click OK.
- From the Properties tab, use the first drop-down menu to change the curve to 3D Cartesian.
- Verify the fourth drop-down menu selection is set to Open Curve.
- From the Properties tab, click on the x radio button. Retain the default File option in the second drop-down menu.
- Click and select Cam_Fixed.csv from the <working directory>.
- Click Open.
-
For component, select Column 1. Retain all other values
in the panel as default.
- For the y and z radio buttons, for Component select Column 2 and Column 3 respectively.
-
Create a Curve Graphic to visualize the cam and make sure the import data is
located as per your requirements.
Create Variable Portion of Cam Profile
Use a macro to automatically create both the Curve Entity and Curve Graphics using the existing points in the model.
-
Create points for the model in one of the following ways:
- From the menu bar, click .
- On the MotionView Toolbar, click (Create Points using Coordinates).
- In the Parametric Points dialog, click the (file browser).
- Select the Cam_Variable.csv and click Open.
- Click OK to create 10 points (0 through 9).
-
Now that you have created new graphics, deactivate the original H3D file
graphics used to represent the Cam.
-
Open the Create Curve from Points/Nodes macro in one of
the following ways:
- From the menu bar, click Macros Create Curve from Points/Nodes/Edges/Faces.
- On the MotionView toolbar, Click (Create Curve from Points/Nodes button).
- Double-click the collector and select Cam body.
- Edit the Labels prefix for the Curve Entity and the Curve Graphics to be created to Cam_Variable_Curve.
-
For the collector, select Point 0 in
one of the following ways:
- Click Point 0 in the modeling window.
- Click the collector. In the Select a Point dialog, double-click on Point 0 from the filtered list of points.
Point 0 is highlighted in the modeling window and listed in the panel. -
Repeat step 9 to pick the
remaining points (1 through 9).
The panel should look as shown in Figure 18.Note: A node associated with File graphic H3D can also be picked. However, the curve created would not be parametrically linked with the node. Picking a point retains the parametric relation between the point and the curve.
-
Click Create.
A new Curve Entity and a new Curve Graphics (Cam_Variable_Curve) has been added to the model.The newly created Curve Graphics representing the variable portion of the Cam should now be visible in the modeling window.
-
Review the newly created Curve Entity by selecting it from the Model Tree in the Model Browser.
Note: Click (as shown in Figure 21) to see how the X, Y and Z values in the panel are parametrically pointing to the points selected while using the macro. Thus, by changing the coordinates of these Points in the model, the curve can be modified.
Create Merged Curve of Cam Profile
Merge both fixed and variable portions of the Cam and create a new closed curve to setup the 2D Contact.
-
Insert a new Curve entity by repeating steps 1 through 5 for step Create Curve Entity and Curve Graphics
using the input details listed in Table 2.
Table 2. Variable Value Label Cam_Curve Variable crv_cam Curve Type 3D Cartesian Open/Closed Closed - From the Properties tab, click the x radio button, then select Math from the second drop-down menu.
- In the Expression Builder, enter {CAT(crv_cam_fix.x, crv_0.x)}. Then hit Enter.
-
For the Math expressions of the y and z coordinates, enter
{CAT(crv_cam_fix.y, crv_0.y)} and
{CAT(crv_cam_fix.z, crv_0.z)} respectively.
Note: By using CAT function, you are able to append the data-points of variable portion of cam to the data-points of fixed portion of cam. The panel should display merged data of both fixed and variable portions of cam profile.You have finished creating the Curve Entity. Next, you will create a graphic to represent the Cam body. Later, you will use this to define 2D Contact.
-
Open the Add CurveGraphic dialog by doing one of the
following:
- From the Project Browser right-click on Model and select .
- On the Reference Entity toolbar, click the (Graphics) icon.
- In the drop-down menu, choose Curve.
- In the dialog, for Label enter Cam_Curve. For Variable, enter gcrv_cam.
-
Click OK.
Note: The Body/Point option (Parent type) has been selected by default on the Connectivity tab. For this process you will use the Marker option since you already have a CamMarker in the model which is associated with Cam (Body) and PivotPoint (Point).
- From the Connectivity tab, select the drop-down menu of Parent and change it to Marker.
- Double-click on the collector.
- In the Select a Marker dialog, select CamMarker and click OK.
- Double-click on the collector.
-
In the Select a Curve dialog, select
Cam_Curve.
The Curve Graphics representing the Cam should now be visible in the modeling window.
Set Up 2D Contact
Define a contact between Cam and FollowerRoller using their respective Curve Graphics.
- On the Force Entity toolbar, right-click on the (Contact) button.
- In the dialog, for Label enter 2D Contact 0 and retail the default Variable.
-
In the drop-down menu, change the Type to 2D Rigid to
Rigid and click OK.
-
In the Connectivity tab, click the
(I Body) collector. Then select the Cam body by clicking
its Curve Graphics in the modeling window.
(J Body) collector is highlighted automatically.
-
Click the collector and select the
FollwerRoller body in the dialog.
The Contact panel should now appear as shown in Figure 27:Note: Fixed and Variable Curve Graphics are selected by default since they are associated with Cam body. You can remove the same from the contact definition as they are not required.
- Under , deselect (or uncheck) Cam_Fixed_Curve and Cam_Variable_Curve.
-
Review the side of selected curves that will be in contact.
- In the Properties tab, retain the default selections.
- In the Advanced tab, activate the Find precise contact event and Change simulation max step size options with the default values.
Save and Run the Model
Save the 2D Contact model and run it using MotionSolve.
-
From the menu bar, click .
-
In the dialog, browse to your <working directory> and
specify the file name as Cam_Follower.mdl.
-
Run the model.
A 2D curve contact simulation should run faster than an equivalent model using 3D contact where the solver must work harder to determine contact for a 2D tessellated geometry.
- Click the Run button.
Post-Process the Results
Review the MotionSolve simulation summary using HyperView and HyperGraph.
- Click the Animate button to review the animation in HyperView.
-
Review the contact force.
-
Plot the FollowerShaft vertical displacement during the entire simulation using
HyperGraph.
- Optional: In MotionView, edit the coordinates of any/all points (Point 0 to Point 9) to get updated Cam profile and re-run the model to investigate its effect on Contact Force on Cam or FollowerShaft Displacement.