OS-T: 1940 MBD Rigid Contact

In this tutorial you will how to create model contacts using HyperMesh.

Before you begin, copy the file(s) used in this tutorial to your working directory.

Contact constraints are very common in the mechanisms/general machinery domain. MotionSolve uses the penalty-based Poisson contact force model for calculating the magnitude and direction of the contact and friction forces.

The Curved Pentagon Positive Return Cam system is used to define the contacts. In this system the curved pentagon rolls inside the circle and translates the slider.

rd4040_rigid_body_model
Figure 1. Rigid Body Model

Launch HyperMesh and Set the OptiStruct User Profile

  1. Launch HyperMesh.
    The User Profile dialog opens.
  2. Select OptiStruct and click OK.
    This loads the user profile. It includes the appropriate template, macro menu, and import reader, paring down the functionality of HyperMesh to what is relevant for generating models for OptiStruct.

Open the Model

  1. Click File > Open > Model.
  2. Select the for_contact_tutorial.hm file you saved to your working directory.
  3. Click Open.
    The for_contact_tutorial.hm database is loaded into the current HyperMesh session, replacing any existing data.

Set Up the Model

Create Rigid Bodies (PRBODY)

PRBODY is the Rigid Body Definition for Multi-body Simulation. PRBODY defines a rigid body out of a list of finite element properties, elements and grid points.

There will be five bodies apart from the ground body in our model via: the stand, the slider, the driver, the pentagon and the circle. Pre-defined free nodes will be used to define the bodies and joints.

  1. From the Analysis page, click the bodies panel.
  2. Select the create subpanel.
  3. In the body= field, enter stand.
  4. Click type= and select PRBODY.
  5. Using the props selector, select Stand1.
  6. Double-click nodes and select by id, then enter 2, 19391, and 19402.
  7. Click create.
  8. Define PRBODY for the remaining components.
    body= type= props free nodes
    Slider PRBODY Slider2 4, 19399
    Driver PRBODY Driver3 19392, 19395
    Pentagon PRBODY Pentagon4 4246, 19396
    Circle PRBODY Circle5 414, 19400
    Ground GROUND Not required 19401
  9. Click return.

Create Joints

In this step you will create all of the joints needed for the model.

The first joint is the fixed joint between the stand and ground body. The second joint is a revolute joint between the stand and driver, the third joint is the translational joint that connects the slider to the stand, the fourth joint is the revolute joint between the driver and the pentagon, and the fifth joint is the fixed joint between the slider and the circle.
DOF = 5*6 - (5+5+6+6+5+1) = 2
Joint Type Removes translational dof Removes rotational dof Removes total number of dof
Revolute 3 2 5
Fixed 3 3 6
Translational 2 3 5
Motion (rev) 3 2 1

rd4040_joint_locations
Figure 2. Joint Locations in the Model
  1. Create the component, joints.
    1. In the Model Browser, right-click and select Create > Component from the context menu.
      A default component template displays in the Entity Editor.
    2. For Name, enter joints.
  2. From the menu bar, click Mesh > Create > 1D Elements > Joints.
    The Joints panel opens.
  3. Create a fixed joint between the stand and ground.
    1. Set joint type to fixed.
    2. Select node ID 19401 as the first terminal and node ID 19402 as the second terminal.
      Tip: The first and second terminals are corresponding to the bodies that are connected by the joint. Nodes 19401 and 19402 are coincident. Use coincident node picking in the options panel > graphics subpanel to help you select these coincident nodes in the modeling window.
    3. Click create.
  4. Create a fixed joint between the slider and the circle.
    1. Set joint type to fixed.
    2. Select node ID 19399 as the first terminal and node ID 19400 as the second terminal.
    3. Click create.
  5. Create a revolute joint between the stand and driver.
    1. Set joint type to revolute.
    2. Select node ID 19391 as the first terminal and node ID 19392 as the second terminal.
    3. Set the first orientation selector to vector, then select y-axis.
    4. Click create.
  6. Create a revolute joint between the driver and pentagon body.
    1. Set joint type to revolute.
    2. Select node ID 19395 as the first terminal and node ID 19396 as the second terminal.
    3. Set the first orientation selector to vector, then select y-axis.
    4. Click create.
  7. Create a translational joint between the slider and stand.
    1. Set joint type to translational.
    2. Select node ID 2 as the first terminal and node ID 4 as the second terminal.
    3. Set the first orientation selector to vector, then select x-axis.
    4. Click create.
  8. Click return to exit the panel.

Define a Contact

In this step you will use pre-defined element sets to add a contact to the model. The element sets are defined from the Analysis page, entity sets by choosing a set of elements. The set of elements on the face of the pentagon body is named main and the sets elements on the face of the circle body is named secondary.
  1. Create a contact.
    1. From the Analysis page, click the interfaces panel.
    2. Select the create subpanel.
    3. In the name= field, enter Contact.
    4. Click type= and select MBCNTR.
    5. Click create.

    rd4040_interfaces
    Figure 3.
  2. Add pre-defined element sets to the contact.
    1. Select the add subpanel.
    2. Set main to sets, then use the sets selector to select mas.
    3. Set secondary to sets, then use the sets selector to select Sla.
    4. Click update.

    rd4040_interfaces2
    Figure 4. Interfaces Panel - Contact
  3. Edit the contact's card image.
    1. Select the card image subpanel.
    2. Click edit.
    3. In the Card Image dialog, set CNFTYPE to POISSON.
    4. Enter the values as shown in the image below.

      rd4040_mbcntr_v11
      Figure 5.
    5. Click return.
  4. Click return to exit the Interface panel.

Define the Motion Constraint

In this step you will create the motion which drives the mechanism.
  1. From the menu bar, click BCs > Create > Constraints to open the Constraints panel.
  2. Double-click nodes and select by id, then enter node id 19392.
  3. Uncheck all degrees of freedom; except for dof5. In the dof= field, enter 1.

    rd4040_constraints
    Figure 6. Constraints Panel - Motion
  4. Click load types = and select MOTNG(V).
  5. Click create to create the constraint.
  6. Click return to go to the Analysis page.
A new load collector (auto1) has been added to the model. The motion is assigned to this load collector and will be used as reference in the OptiStruct subcase.

Create Load Collectors

In this step you will create the gravity force that applies to the model and MBSIM Bulk Data card, which is to specify the parameter for multibody simulation.

  1. In the Model Browser, right-click and select Create > Load Collector from the context menu.
    A default load collector displays in the Entity Editor.
  2. For Name, enter gravity.
  3. Click Color and select a color from the color palette.
  4. Set Card Image to GRAV.
  5. Input the values as illustrated below.


    Figure 7.
  6. Create another load collector.
    1. For Name, enter SIM.
    2. For Card Image, select MBSIM.
    3. Input the values as illustrated below.


      Figure 8.

Create Load Steps

  1. In the Model Browser, right-click and select Create > Load Step from the context menu.
  2. For Name, enter Dynamic.
  3. Set Analysis type to Multi-body dynamics.
  4. Define MLOAD.
    1. For MLOAD, click Unspecified > Loadcol.
    2. In the Select Loadcol dialog, select gravity and click OK.
  5. Define MBSIM.
    1. For MBSIM, click Unspecified > Loadcol.
    2. In the Select Loadcol dialog, select SIM and click OK.
  6. Define MOTION.
    1. For MOTION, click Unspecified > Loadcol.
    2. In the Select Loadcol dialog, select auto1 and click OK.

Submit the Job

  1. From the Analysis page, click the OptiStruct panel.

    OS_1000_13_17
    Figure 9. Accessing the OptiStruct Panel
  2. Click save as.
  3. In the Save As dialog, specify location to write the OptiStruct model file and enter for_contact_tutorial for filename.
    For OptiStruct input decks, .fem is the recommended extension.
  4. Click Save.
    The input file field displays the filename and location specified in the Save As dialog.
  5. Set the export options toggle to all.
  6. Set the run options toggle to analysis.
  7. Set the memory options toggle to memory default.
  8. Click OptiStruct to launch the OptiStruct job.
If the job is successful, new results files should be in the directory where the for_contact_tutorial.fem was written. The for_contact_tutorial.out file is a good place to look for error messages that could help debug the input deck if any errors are present.
The default files written to the directory are:
for_contact_tutorial.html
HTML report of the analysis, providing a summary of the problem formulation and the analysis results.
for_contact_tutorial.out
OptiStruct output file containing specific information on the file setup, the setup of your optimization problem, estimates for the amount of RAM and disk space required for the run, information for each of the optimization iterations, and compute time information. Review this file for warnings and errors.
for_contact_tutorial.h3d
HyperView binary results file.
for_contact_tutorial.res
HyperMesh binary results file.
for_contact_tutorial.stat
Summary, providing CPU information for each step during analysis process.

There are a few more files written to the directory with the name for_contact_tutorial_mbd.

View the Results

In this step you will view the results in HyperView, which will be launched from within the OptiStruct panel of HyperMesh.

HyperView is a complete post-processing and visualization environment for finite element analysis (FEA), multibody system simulation, video and engineering data.

  1. From the OptiStruct panel of the Analysis page, click HyperView.

    The path and filename for for_contact_tutorial.h3d appears in the fields to the right of Load model and Load results. This is fine because the .h3d format contains both model and results data.

    The model and results are loaded in the current HyperView window.

  2. Click the Contour panel toolbar icon resultsContour-16.
  3. Under Results type: select Displacement(v).
  4. Click Apply.
  5. Start/stop the animation using the Animation Controls in the panel next to the playback controls.

    animation_toolbar
    Figure 10.
    1. Verify Animate Mode is set to animationTransient-24 (Transient).
    2. Click the Start/Pause Animation icon to start the animation.
    3. With the animation running, use the bottom slider bar to adjust the speed of the animation.
    4. Click the Start/Pause Animation icon again to stop the animation.