# MV-1028: Model a Point-to-Deformable-Surface Higher-Pair Constraint

In this tutorial, you will learn how to model a PTdSF (point-to-deformable-surface) joint.

A PTdSF (point-to-deformable-surface) joint is a higher pair constraint. This constraint restricts a specified point on a body to move along a specified deformable surface on another body. The point may belong to a rigid, flexible, or point body. The deformable surface for this tutorial is defined on a rigidly supported plate. A mass is constrained to move on the surface with a PTdSF constraint.

## Create Points

In this step, you will create points for the PTdSF model.

Before you begin, copy the files membrane.h3d and membrane.fem from the mbd_modeling\interactive folder to your <working directory>.
Creating points will help us locate the bodies and joints as required. We will define points for center of mass of the bodies and joint locations.
1. Start a new MotionView session.
2. Open the Add Point or PointPair dialog in one of the following ways:
• From the Project Browser right-click on Model and select Add Reference Entity > Point.
• On the Model-Reference toolbar, right-click the (Point) icon.
3. For Label, enter BallCM. Accept the default Variable name.
4. Click OK.
5. Click the Properties tab and specify the X, Y, and Z coordinates as 0.0.
6. Repeat steps 2 through 5 for the points specified in Table 1.
Table 1.
Point X Y Z
PointMembInterface39 -55.0 -55.0 0.0
PointMembInterface40 55.0 -55.0 0.0
PointMembInterface41 55.0 55.0 0.0
PointMembInterface42 -55.0 55.0 0.0

## Create Bodies

In this step you will create the membrane and ball bodies for the PTdSF model.

Pre-specified inertia properties will be used to define the ball.
1. Open the Add Body or BodyPair dialog in one of the following ways:
• From the Project Browser right-click on Model and select Add Reference Entity > Body.
• On the Model-Reference toolbar, right-click on the (Body) icon.
2. In the dialog, for Label enter Membrane. Accept the default Variable name and click OK.
Note: For the remainder of the tutorial, accept all default variable names.
3. From the Properties tab, click the Flex Body (CMS) check box.
4. Click the (Graphic file browser) icon and select membrane.h3d from the <working directory>.
5. Repeat step 1. In the dialog, for Label enter Ball.
6. From the Properties tab, specify the information provided in Table 2.
Table 2.
Mass Ixx Iyy Izz Ixy Iyz Izx
1 4000.0 4000.0 4000.0 0.0 0.0 0.0
7. Under the CM Coordinates tab, check the Use center of mass coordinate system box.
8. Double click .
9. From the Select a Point dialog, select BallCM and click OK. Accept defaults for axes orientation properties.
10. In the Initial Conditions tab, under Translational velocity check the Vx and Vy boxes.
11. In the text boxes for each, enter a value of 1.

## Create Markers and a Deformable Surface

In this step you will define markers for the membrane.

1. On the general toolbar, click Macros > Create Deformable Surface from FEM.
2. In the panel, double-click .
3. From the dialog, select Membrane and click OK.
4. Double-click on .
5. From the dialog, choose Model and click OK.
6. Next to Select the FEM file, click the (file browser) icon.
7. Select the membrane.fem file from your working directory and click OK.
8. Click Generate Surface.

## Create Joints

In this step you will define four fixed joints between the membrane and the ground.

The PTdSF joint will be defined as an advanced joint later in another step.
1. Open the Add Joint or JointPair dialog in one of the following ways:
• From the Project Browser, right-click on Model and select Add > Constraint > Joint.
• On the Model-Constraint toolbar, click the (Joints) icon.
2. In the dialog, for Label enter Joint 1.
3. For Type, choose Fixed Joint and click OK.
4. In the Joint panel, configure the Connectivity tab.
1. Double-click .
2. In the dialog, select Membrane and click OK.
3. Double-click .
4. In the dialog, select Ground Body and click OK.
5. Double-click .
6. In the dialog, select PointMembInterface39 and click OK.
5. Repeat steps 1 through 4 using the specifications given in Table 3.
Table 3.
Label Joint Type Body 1 Body 2 Point
Joint 2 Fixed Joint Membrane Ground Body PointMembInterface40
Joint 3 Fixed Joint Membrane Ground Body PointMembInterface41
Joint 4 Fixed Joint Membrane Ground Body PointMembInterface42

## Create the PTdSF Joint

In this step, you will define the PTdSF (point-to-deformable-surface) joint as an advanced joint.

1. Open the Add AdvJoint dialog by doing one of the following:
• From the Project Browser, right-click on Model and select Add > Constraint > Advanced Joint.
• On the Model-Constraint toolbar, click the (Advanced Joint) icon.
2. In the dialog, for Label enter AdvancedJoint 0. Accept the default variable name.
3. In the Type drop-down menu, click PointToDeformableSurface Joint.
4. Click OK.
5. In the panel, configure the Connectivity tab.
1. Double-click and select Ball.
2. Click OK.
3. For , choose BallCM and click OK.
4. For , choose DeformableSurface 1 and click OK.

## Create Graphics

In this step, you will create a graphic for the ball.

1. Open the Add Graphics or GraphicPair dialog in one of the following ways:
• From the Project Browser, right-click on Model and select Add > Reference Entity > Graphics.
• On the Model-Reference toolbar, click the (Graphics) icon.
2. In the dialog, for Label enter Ball.
3. In the Type drop-down menu, choose Sphere. Then click OK.
4. In the Connectivity tab, double-click .
5. In the dialog, select Ball and click OK.
6. Double-click on .
7. In the dialog, select BallCM and click OK.
8. In the Properties tab, under Radius enter 1.0.
9. In the Visualization tab, choose a color for the graphic.

## Find Nodes

In this step, you will return to the Bodies Panel and find the Nodes on the membrane.

1. In the Project Browser, click on the Membrane body.
2. On the reference toolbar, click the (Bodies) icon.
3. In the panel, click the Nodes button.
4. In the Nodes dialog, uncheck the Only search interface nodes box.
5. Click the Find All button.
6. Close the dialog.
Your model should resemble the example shown in Figure 3.

## Run the Model

In this step, you will run the model with a PTdSF constraint.

Important: This type of constraint does not ensure that the contact point will stay within the range of data specified for the curve. Additional forces at the end need to be defined by the user to satisfy this requirement. If the contact point goes out of range of the data specified for this surface, the solver encounters an error (unless additional forces are defined to satisfy this). In that case, you must change the initial velocities for the ball, increase the range of data specified for the surface, or run the simulation for a shorter interval of time.
1. On the toolbar, click (Run).
2. In the Run panel, specify the values shown in Figure 4.
3. Click the Save and run current model radio button.
4. Click the (browser icon) and specify result.xml as the file name.
5. Click Save.
6. Click the Simulation Settings button.
7. In the Simulation Settings dialog, click the Transient tab.
8. Specify the Maximum step size as 0.001 (as the solution is not converged for the default step size of 0.01).
9. Click Close.
10. Click the (Check Model) button to check the model for errors.
11. To invoke the solver, click the Run button.

## View the Results

In this step, you will view the animation and plot the Z position of the center of mass of the ball.

1. Once the solver has finished, the Animate button will be active. Click on Animate.
Click the (Start/Pause Animation) button to view the animation.

One would also like to inspect the displacement profile of the membrane and the ball. For this, we will plot the Z position of the center of mass of the ball.

2. Click on the (Add Page) icon.
3. In the Select application drop-down menu, change the client from MotionView to HyperGraph 2D .
4. On the Curves toolbar, click (Build Plots).
5. Click the (file browser) and open the results.abf file.
6. Configure the Plots panel as show in Figure 6.
7. Click Apply.
The profile for the Z-displacement should look like the example given in Figure 7.