MotionView User's Guide

MV-1020 Modeling 2D Rigid to Rigid Contact Simulation

MV-1020 Modeling 2D Rigid to Rigid Contact Simulation

Previous topic Next topic No expanding text in this topic  

MV-1020 Modeling 2D Rigid to Rigid Contact Simulation

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

In this tutorial, you will learn how to:

Create Curve Entities using File, Math and Values options
Create Curve Graphics using Marker and Body/Point option
Use macro to create Curve Entity and Curve Graphics simultaneously
Setup 2D rigid curve to curve contact

Introduction

This tutorial will guide you through the new 2D rigid body contact capabilities in MotionSolve which can be used when contact occurs in a plane. In this tutorial, we will model a roller type cam-follower mechanism with the help of 2D rigid to rigid contact as there are no out-of-plane contact forces that are expected.

mv-1020_follower_cam

Exercise

Copy the files Cam_Follower_Input.mdl, CamProfile.h3d, Cam_Fixed.csv and Cam_Variable.csv from the location
<installation_directory>\tutorials\mv_hv_hg\mbd_modeling\interactive\ to your <Working directory>.

Step 1: Review the partially setup model.

A partially setup model is available for you to open in MotionView. Except the 2D contact, everything else has been setup. Let us review the same by running the model using MotionSolve.

1.Launch MotionView.
2.From the HyperWorks-Standard toolbar, click the Open Model icon,fileOpenModel-24.

Or

-Open the model by selecting File > Open > Model.
3.From the Open model dialog, select the file Cam_Follower_Input.mdl from your working directory and click Open.

Once the model is loaded it will look as it does below.  Review the model for its bodies, graphics, markers, joints and motion.

mv-1020_opening_model

4.In the Run panel run-24, click the Save and run current model browser button
5.Click the Run button.  Once the simulation is completed, close the solver window and the Message Log.
6.From the Run panel, review the results animation by clicking on Animate button.

Notice that the FollowerRoller is not in contact with the Cam since there is no contact defined in the model.

mv-1020_followerroller_no_contact

7.Return to MotionView window using the Page Window Layout button mv-1020_page_window_layout_icon located on the HyperWorks Page Controls toolbar as shown below.

mv-1020_page_controls_toolbar

Step 2: Create Curve Entity and Curve Graphics for FollowerRoller.

Since the FollowerRoller profile is circular - it can be easily defined using mathematical expressions. First, we will create a closed circular Curve Entity (using the Math option). Then, we will create Curve Graphics to associate this Curve Entity with FollowerRoller body so that it can be later used in setup the 2D Contact.

1.From the Project browser right-click on Model and select Add Reference Entity > Curve (or right-click the Curves icon entityCurves-24on the MotionView-Reference Entity toolbar).

The Add Curve dialog is displayed.

2.For Label, enter Roller_Curve. For Variable, enter crv_roller and click OK (as shown in the image below).

mv-1020_step2_add_curve_dialog

3.From the Properties tab, use the first drop-down menu to change the curve from 2D Cartesian to 3D Cartesian.
NoteOnly 3D Cartesian types of Curve Entities are supported for the Curve Graphics.
4.Use the fourth drop-down menu to change the curve from Open Curve to Closed Curve.
5.From the Properties tab, click on the x radio button. Select Math from the second drop-down menu on the left. Enter 5*SIN(2*PI*(0:1:0.01)) in the Expression Builder and hit Enter on the keyboard.
6.Similarly enter 5*COS(2*PI*(0:1:0.01)) and 0.0*(0:1:0.01) as Math expressions for y and z coordinates of the curve respectively. The panel should now look as shown in the image below.

mv-1020_step2_curves_panel

NoteNow having created the Curve Entity, let us create a Curve Graphics to graphically represent the FollowerRoller body on the screen and later use it to define 2D Contact.
7.From the Project browser right-click on Model and select Add Reference Entity > Graphic (or right-click the Graphic icon entityGraphics-24 on the MotionView-Reference Entity toolbar).
8.Choose Curve from the drop-down menu.
9.For Label, enter Roller_Curve. For Variable, enter gcrv_roller and click OK (as shown in the image below).

mv-1020_step2_add_curvegraphic_dialog

NoteThe Body/Point option (Parent type) has been selected by default on the Connectivity tab.
10.From the Connectivity tab, double-click on the Body collector body_collector.

The Select a Body dialog is displayed.

-Select FollowerRoller from the tree.
11.Now the Point collector is highlighted by default, click once on the same.

The Select a Point dialog is displayed.

-Select FollowerRevJoint from the tree.
12.Similarly choose Roller_Curve using the Curve collectorcurve_collector_mv. Leave the rest of the options on the panel as default. The panel should look as shown in the image below.

mv-1020_step2_graphics_panel

NoteCurve Graphics representing the FollowerRoller should now be graphically visible as shown in the image below.

mv-1020_step2_followerroller_curve_graphics

NoteAt this point we can deactivate (or delete) the original cylinder graphics used to represent FollowerRoller.
13.To deactivate the FollowerRoller graphics from the Project browser; right-click on FollowerRoller > Deactivate as shown in the image below.

mv-1020_step2_browser

Step 3: Create Curve Entity and Curve Graphics for Cam.

In the process of designing a cam, designers often like to determine the best shape of the cam in order to achieve a specific displacement profile of the follower. To allow this, let us divide the cam profile into two portions: Fixed and Variable, as show in the image below.

mv-1020_step3_cam_divided

The variable portion of cam will be controlled by the coordinates of some points in our model.

Step 3a: Create fixed portion of Cam profile.

In this step we will learn how to use .csv File containing x,y and z coordinates of points to create a Curve Entity.

1.Right-click the Curves icon to insert a new Curve Entity and provide Cam_Fixed_Curve for the Label and crv_cam_fix for the Variable.
2.From the Properties tab, use the first drop-down menu to change the curve from 2D Cartesian to 3D Cartesian.
3.Retain the default selection for the fourth drop-down menu to Open Curve.
4.From the Properties tab, click on the x radio button. Retain the default File option in the second drop-down menu on the left.
5.Click on the file browser icon mv1025-icon07 and select Cam_Fixed.csv from the working directory. Click Open.
6.Select Column 1 for the Component. Retain all other options on the panel to its default values. The panel should look like the image below:

mv-1020_step3_curves_panel

7.Similarly click on the y radio button, the same file should be selected by default. This time, select Column 2 for the Component.
8.Click on the z radio button, the same file should be selected by default. This time, select Column 3 for the Component.
NoteNow, having created the Curve Entity, let us create a Curve Graphics to just graphically visualize and make sure that the imported data is located as per our requirement.
9.Insert a new Curve Graphic by following Steps 7 - 13 of Step 2 of this tutorial with input details as listed in the table below:

Variable

Value

Label:

Cam_Fixed_Curve

Variable:

gcrv_cam_fix

Body:

Cam

Origin Point:

Global Origin

Curve:

Cam_Fixed_Curve

mv-1020_step3_graphics_panel

NoteCurve Graphics representing the fixed portion of Cam should now be graphically visible as shown in the image below.

mv-1020_step3_cam_curve_graphics

Step 3b: Create variable portion of Cam profile.

In this step we will learn how to use a macro to automatically create both Curve Entity and Curve Graphics using existing points in the model.

Firstly, let us create some points in the model using Menu > Macros > Create Points > using Coordinates.

1.From Main menu, click Macros > Create Points > using Coordinates (or click Create Points using Coordinates create_points_using_coords_icon_mv button from the MotionView Toolbar > Point Macros toolbar).

mv-1020_step3b_create_points_macro

The Parametric Points dialog box opens.

2.Click on the file browser icon mv1025-icon07 and select Cam_Variable.csv from the working directory. Click Open. Click OK to create 10 points (Point 0 to Point 9).

mv-1020_step3b_parametric_points_dialog

NoteThe image below shows the newly created points.

mv-1020_step3b_cam_points

NoteNow that we have fixed portion Curve Graphics representing Cam, we can deactivate (or delete) the original H3D file graphics used to represent Cam.
3.To deactivate the Cam graphics, from the Project browser; right-click on Cam > Deactivate as shown in the image below.

mv-1020_step3b_browser

Now let us use the newly created points to create the variable portion of the cam profile using the Create Curve from Points/Nodes macro.

4.From the Main menu, click Macros > Create Curve from Points/Nodes (or click the Create Curve from Points/Nodes macro button create_curve_from_points_nodes_icon_mv from the MotionView toolbar > Point Macros toolbar).

mv-1020_step3b_create_curves_macro

5.Double-click the Body collector body_collector and select the Cam body.
6.Edit the Labels prefix for the new Curve Entity as well as the Curve Graphics to be created to Cam_Variable_Curve.
7.Now, the Point/Node collector will be highlighted by default .

You can graphically pick Point 0 from the screen

OR

Click once on the Point/Node collector.

The Select a Point dialog is displayed.

-Double-click on Point 0 from the filtered list of points.
NoteThe selected Point 0 is highlighted in the graphics screen and also listed in the panel.
8.Now repeat the above step to pick all the points from Point 1 to Point 9.

The panel should look like the image shown below.

mv-1020_step3b_create_curves_panel

NoteA 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.
9.Click the Create button.

A new Curve Entity and a new Curve Graphics (Cam_Variable_Curve) has been added to the model as shown in the image below.

mv-1020_step3b_browser_curve_graphics

NoteThe newly created Curve Graphics representing the variable portion of Cam should now be graphically visible as shown below.

mv-1020_step3b_cam_curve_graphics

NoteReview the newly created Curve Entity by selecting it from the model tree as shown in the image below. Notice (by clicking as shown in the image below) 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.

mv-1020_step3b_browser_panel

Step 3c: Create merged curve of Cam profile for 2D Contact.

The fixed and variable Curve Graphics of Cam generated in Step 3a and Step 3b cannot be used in setting up contact since they are using open Curve Entities. We generated these in order to verify if the curve data is in the correct location. For a continuous contact between FollowerRoller and Cam, we need closed curves. Thus, in this step we will merge both fixed and variable portions of Cam and create a new closed curve to setup the 2D Contact. In the process, we will learn how to use a mathematical function (CAT) to concatenate two Curve Entities.

1.Insert a new Curve Entity by following Steps 1 - 4 of Step 2 of this tutorial with input details as listed in the table below:

Variable

Value

Label:

Cam_Curve

Variable:

crv_cam

Curve Type:

3D Cartesian

Open/Closed:

Closed

2.From the Properties tab, click on the x radio button. Select Math from the second drop-down menu on the left. Enter {CAT(crv_cam_fix.x, crv_0.x)} in the Expression Builder and hit Enter on the keyboard.
3.Similarly enter {CAT(crv_cam_fix.y, crv_0.y)} and {CAT(crv_cam_fix.z, crv_0.z)} as Math expressions for y and z coordinates of the curve respectively.
NoteBy using CAT function, we 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 as shown in the image below.

mv-1020_step3c_curves_panel

NoteNow having created the Curve Entity, let us create Curve Graphics to graphically represent the Cam body on the screen and later use it to define 2D Contact.
4.From the Project browser right-click on Model and select Add Reference Entity > Graphic (or right-click the Graphic icon entityGraphics-24 on the MotionView-Reference Entity toolbar).
5.Choose Curve from the drop-down menu.
6.For Label, enter Cam_Curve. For Variable, enter gcrv_cam and click OK.
NoteThe Body/Point option (Parent type) has been selected by default on the Connectivity tab. This time, let us use the Marker option since we already have a CamMarker in the model which is associated with Cam (Body) and PivotPoint (Point).
7.From the Connectivity tab, select the drop-down menu of Parent and change it to Marker.
8.Now, double-click on the Marker collector.

The Select a Marker dialog is displayed.

-Select CamMarker from the tree and click OK.
9.Now the Curve collector curve_collector_mv is highlighted by default, click once on the same.

The Select a Curve dialog is displayed.

-Double-click on Cam_Curve from the list of filtered curves.
NoteThe panel should now look like shown in the image below.

mv-1020_step3c_graphics_panel

NoteCurve Graphics representing the Cam should now be graphically visible on screen as shown in the image below.

mv-1020_step3c_cam_curve_graphics

Step 4: Set up 2D Contact.

In this step we will define a contact between Cam and FollowerRoller using their respective Curve Graphics.

1.Right-click on the Contact button entityContacts-24 in the Force Entity toolbar.

The Add Contact dialog is displayed.

2.For Label, enter 2D Contact 0 and retain the default Variable.
3.Change the contact Type to 2D Rigid to Rigid and click OK.

mv-1020_step4_add_contact_dialog

4.From the Connectivity tab, click the Body I collector once to activate it and then select the Cam body from the screen by picking its Curve Graphics as shown in the image below.

mv-1020_step4_body_graphics_area

5.Next, the Body J collector will be highlighted automatically. Click once and select the FollowerRoller body from the Select a Body dialog box.
NoteThe Contact panel should be displayed as shown below.

mv-1020_step4_contacts_panel

NoteFixed and Variable Curve Graphics are selected by default since they are associated with Cam body. Let us remove the same from the contact definition as they are not required.
6.Uncheck (or deselect) Cam_Fixed_Curve and Cam_Variable_Curve from the list of Curves under Body I.

Now, let us review the side of selected curves that will be in contact.

7.Click the Highlight contact side check box.
NoteThe arrow display indicates the inside of Cam and FollowerRoller as contacting side. This needs to be corrected.
8.Click the Flip Contact Side check box for both Body I and Body J curves.
NoteThe highlighted contact side for both the bodies should now be as shown in the image below.

mv-1020_step4_example

9.Review the Properties tab, the default selections are fine for the model.
10.Review the Advanced tab, turn on the Find precise contact event and Change simulation max step size options with its default values.

Step 5: Save and Run the model.

1.Click Save As > Model using the option located in the File menu.

mv-1020_step5_save_as_option

2.From the Save As Model dialog, browse to your working directory and specify the File name: as Cam_Follower.mdl.

mv-1020_step5_save_as_model_dialog

At this point, you are ready to run your model. We expect a lot quicker run using 2D curve contact as compared to an equivalent model using 3D contact where the solver has to work harder to determine contact for a 3D tessellated geometry.

3.Navigate to the Run panel by clicking on the Run button in the toolbar run-24.
NoteTo obtain accurate results, a smaller step size and a finer print interval have been selected in this model. You can review the same by checking Simulation Settings… button.
4.Specify a new name for your results by clicking on file browser icon mv1025-icon07 Cam_Follower.xml and click the Save button as shown in the image below.

mv-1020_step5_save_as_dialog

5.Click the Run button.

Step 6: Post-processing the results

After the simulation is complete, MotionSolve prints out a summary table like for 3D contact (both on screen-solver view window and in the log file generated) that lists the contact pairs ordered by maximum penetration depth and by maximum contact force for this simulation. The image below is an illustration of the same.

mv-1020_step6_example_code

1.Click on the Animate button to review the graphical animation in HyperView.
2.Review contact force graphically in HyperView by selecting Vector plot, then choosing the Result type to be Contact Force, click Apply and Start as shown in the image below.

mv-1020_step6_hv_vector_plot

NoteYou can even plot the graph of FollowerShaft vertical displacement during the entire simulation using HyperGraph. To do the same, follow the steps mentioned below.
3.In the MotionView window, from the Run panel run-24 click the Plot button.
NoteThis should open .abf file in HyperGraph.
4.Use the Build Plot plotsCreate-24 tool and for Y Type (Axis) select Body, FollowerShaft, Y , and click Apply as shown in the image below.

mv-1020_step6_hg_example

Further Optional Exercise

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.