# MV-1012: Analytical Contact Simulation Using MotionView and MotionSolve

This tutorial will guide you through the new analytical 3-D rigid body contact capabilities in MotionView.

In this tutorial, you will learn how to setup semi-analytical contact between a primitive spherical geometry and a meshed geometry, perform a transient analysis to calculate the contact forces between these geometries, process the results, compare the analysis time when using meshed representation for the spheres. For these purposes, you will make use of a ball bearing model.
When one or both of the rigid bodies in contact are primitive spheres, MotionSolve uses a semi-analytical or fully analytical contact method respectively to calculate the penetration depth(s) and subsequently the contact force(s). This is explained in Table 1.
Table 1.
Body I Graphic Body J Graphic Contact method Description
Primitive Sphere Mesh Sphere – Mesh A semi-analytical contact method that computes contact between the primitive sphere (Body I) and the tessellated geometry (Body J).
Primitive Sphere Primitive Sphere Sphere – Sphere A fully analytical contact method that is independent of the tessellation of either graphics.
There are several 3D contact applications that involve spherical geometries (ball bearings, re-circulating ball systems and so on) – using the analytical approach for computing the contact forces in such scenarios offers several benefits:
• The simulation time is reduced when using the semi-analytical or fully analytical approach.
• The simulation is more robust since the dependence on the mesh quality is removed.
• The simulation results are often more accurate since there are no or lesser effects of mesh discretization.

## Load the Model in MotionView

In this step you will load a ball bearing model in MotionView.

A ball bearing is a type of bearing that consists of balls located between the outer and inner bearing races. The balls are in contact with both the outer and inner races. The purpose of the balls is mainly to support radial loads between the two races while minimizing losses due to friction. Since the balls roll in between the two races, the friction is drastically reduced as compared to two surfaces sliding against each other. The geometries for all surfaces except the balls are meshed in this geometry. Only the six balls are defined as primitive spheres.
1. Copy the files Ball_Bearing.mdl and bearing_graphic.h3d, located in the mbd_modeling\contacts folder, to your <working directory>.
2. Start a new MotionView session.
3. Open the Ball_Bearing.mdl model file from the <working directory>.
Figure 2 shows the model as it is setup in MotionView. This model has all the necessary contacts defined except for a few which you will setup next. Table 2 describes the components present in this model.
Table 2.
Component Name Component Type Description
Ground Body Rigid body Ground Body
Outer Race Rigid body The outer bearing race body
Inner Race Rigid body The inner bearing race body
Ball 1, , Ball 6 Rigid body Ball bodies
Rim Rigid body The rim body that keeps the balls in place
Ball1_inter, …, Ball5_inter 3d rigid body contact Contact force element between the balls and the Rim
Ball1_upper, … Ball5_upper 3d rigid body contact Contact force elements between the balls and the Outer Race
Ball1_inter, …, Ball5_inter 3d rigid body Contact force elements between the balls and the Inner Race
Solver Units Data Set The solver units for this model. These are set to Newton, Millimeter, Kilogram, Second
Gravity Data Set Gravity specified for this model. The gravity is turned on and acts in the negative Z direction
Outer Race Graphic Graphic The graphic that represents the outer race body. This is a tessellated graphic
Inner Race Graphic Graphic The graphic that represents the inner race body. This is a tessellated graphic.
Rim Graphic Graphic The graphic that represents the rim body. This is a tessellated graphic
Ball1 - primitive, … Ball6 - Primitive Graphic The graphics that represent the ball bodies. These are primitive geometries
Inner RaceRev Revolute Joint Revolute joint defined between the Inner Race and Ground Body
Outer Race Fixed Fixed Joint Fixed joint defined between the Outer Race and Ground Body
Input Motion to Inner Race Motion A motion defined on the Inner Race Rev joint that actuates the mechanism

## Define Contact Between the Primitive and Meshed Geometries

In this step, you will define contact between Ball 6 and the Outer Race, Ball 6 and the Rim, and Ball 6 and the Inner Race.

1. To add a new contact force entity, in the Force Entity toolbar right-click on the Contact button.
The Add Contact dialog is displayed.
2. From the dialog, specify the Label as Ball6_inter and the Variable as con_ball6_inter.
3. Verify that 3D Rigid To Rigid Contact is selected in the drop-down menu and click OK.
This will display the Contact panel.
4. From the Connectivity tab, resolve I Body to Ball 6 and J Body to Rim.
This will automatically select the graphics that are attached to these bodies.
5. To make sure that the geometries are well defined for contacts, the normals of the surface mesh should be along the direction of contact and there should be no open edges or T-connections in the geometries. To make sure that the normals are oriented correctly, activate the Highlight contact side box.
This will color the geometries specified for this contact force according to the direction of the surface normals. You should make sure both geometries are completely red, in other words there are no blue patches for either geometry.
Note: To see this clearly, you may have to deactivate the Outer Race graphic.
6. To check for open edges or T-connection, check if the Highlight mesh errors option is active.
1. If the option is active, activate the Highlight mesh errors box.
This will highlight any open edges or T Connections in the geometry. The graphics associated in this contact entity don’t have mesh errors. Hence you should see Highlight mesh errors grayed out.
7. Specify the contact properties.
1. Click on the Properties tab.
2. In the Normal Force and the Friction Force property tabs, specify the properties in Figure 8.
8. Repeat steps 1 through 3 to create contacts between the Ball 6 body and the Outer Race as well as the Ball 6 Body and the Inner Race. Use the details in Table 3.
 Label Ball6_outer Ball6_inner Varname con_ball6_outer con_ball6_inner I Body graphic Ball 6 – Primitive Ball 6 – Primitive J Body graphic Outer Race Graphic Inner Race Graphic Normal Force Model Impact Impact Stiffness 1000.0 1000.0 Exponent 2.1 2.1 Damping 0.1 0.1 Penetration Depth 0.1 0.1 Friction Force Model Static and Dynamic Static and Dynamic Mu Static 0.4 0.5 Mu Dynamic 0.2 0.3 Stiction transition velocity 1.0 1.0 Friction transition velocity 1.5 1.5

## Setup a Transient Simulation and Run the Model

In this step you will setup and run a transient analysis for the model.

1. To setup a transient analysis, on the toolbar, click the (Run) button.
2. From the Run panel, change the Simulation type to Transient and specify an end time of 2.0 seconds.
3. Click on the Simulation Settings button and navigate to the Transient tab.
1. Set the Maximum step size to 1e-5and click Close.
Specifying a smaller step size than the default will help you obtain more accurate results.
4. Specify a name for your XML model and click the Run button.
In the HyperWorks Solver View window that pops up, a message will display from the solver that confirms the semi-analytical contact method is being used for the contact calculations.
Note: As you may have noticed, you did not have to explicitly specify the contact force method to be used. MotionSolve automatically detects if one or both the bodies in contact are primitive spheres and accordingly changes the contact force method being used.

## Post-Process the Results

In this section, you will view and analyze the reports MotionView generates after running the simulation.

After the simulation is complete, MotionSolve prints out a summary table (both on screen and in the log file generated) that lists the top five contact pairs ordered by maximum penetration depth and by maximum contact force for this simulation. This is very useful since it can be used to verify that the model is behaving as intended even before loading the results (ABF, MRF, PLT or H3D) files. You can also use this table to verify that the penetration depths and contact forces are within the intended limits for your model.
1. MotionView makes available an automated report for model containing contacts. The report automatically adds animation and plots to the session. To access the report, from the menu bar click Analysis > View Reports.
The View Reports dialog is displayed.
2. From the dialog, select Contact Report and click OK.
Note: The report item for the last submitted run will be listed at the top.
3. Use the Page Navigation buttons (located at the upper right corner of the window, below the menu bar and above the graphics area) to view these pages.
4. View the Contact Summary.
MotionSolve writes out a static load case to the H3D file that can be used to view the maximum penetration on all the geometry in contact throughout the length of the simulation. This enables you to inspect your results to see where the maximum penetration depth occurred in your geometry/geometries. You may hide one or more parts to view this clearly in the modeling window.
Note: You may Fit the graphic area in case the graphics are not visible in the modeling window.
1. From the Results Browser select the components Ball 1 – Primitive to Ball 6 – Primitive.
2. Right-click and then click Hide in the context menu.
3. Hide the Rim graphic and the Inner Race graphic in order to visualize the contours of the Outer Race graphic.
5. View the Animation - Penetration Depth.
1. Navigate to the next page , which shows a transient animation of the penetration depth.
2. You can visualize the contours individually on the components by isolating the components. To visualize the contours on the Inner Race graphic, select the component in the Results Browser browser, right-click and select Isolate from the context menu.
3. Click on the Start/Pause Animation button to view the animation.
6. Navigate to the next page .
7. Visualize the Contact forces via force vectors.
1. Fit the model in the modeling window.
2. From the toolbar options, select Transparent Element and Feature Lines.
3. Click the (Vector) icon.
4. Activate the Display tab and change the Size Scaling option to By Magnitude and use a value of 1.
5. Click the Start/Pause Animation button to view the animation.
8. Plot Contact Forces.
1. Go to the next page , which has a HyperGraph plot of all the contact force magnitudes.
Each time a new contact entity is created in MotionView, a corresponding output force request is created that can be used to plot the contact forces between the geometries specified in the contact entity.
Note: You may turn off curves from the Plot Browser to look at individual force plots.

## Compare the Run Time with a Model Containing Meshed Spheres

In this step you will compare the run time of the model with different bearings.

The semi-analytical (and fully analytical) contact method is more efficient than the 3D mesh-mesh based contact. To illustrate this, you can run the same model you just created however instead of using primitive spheres for the bearings, use a meshed representation. Such a model is already available in your HyperWorks installation.
Copy the model Ball_Bearing_meshed.mdl, located in the mbd_modeling\contacts folder, to your working directory. Run this model from MotionView and compare the analysis time to see the speedup.
As an example, a comparison between the run times for the two models is listed in Table 4. Also listed are the machine specifications that were used to generate this data.
Table 4.
Model Ball_Bearing.mdl Ball_Bearing_meshed.mdl
Contact Type Semi-analytical Mesh-Mesh

Number of processors used for

solution

1 1
Core Analysis Time (seconds) 177.4s 1342s
Total Elapsed Time (seconds) 180.4s 1344s
CPU Speed 2.4GHz 2.4GHz
Available RAM 57,784 MB 57,759 MB
CPU Type Intel Xeon E5-2620 Intel Xeon E5-2620
Platform Windows 7 Windows 7

As can be seen, for this model, a speedup of ~7x (1344/180.4) is achieved.

Summary

In this tutorial, you learned how to setup semi-analytical contact between a primitive spherical geometry and a meshed geometry. Further, you were able to inspect the geometry to make sure the surface normals were correct and there were no open edges or T connections

You were also able to setup a transient analysis to calculate the contact forces between these geometries and post-process the results via vector and contour plots, in addition to plotting the contact force requests.

Finally, you were able to compare the analysis time between a fully meshed representation of the spheres and the model that you created. A significant speedup was observed which makes the semi-analytical contact method the first choice for solving 3D contact models when applicable.