Have you ever asked yourself these questions while modeling?
- “I have a component that is allowed to move 5 mm in both the positive and negative Z directions. How can I define that limitation?”
- “I have two large components that only come into contact at a single point, but the model takes a long time to export due to meshing the entire component. Is there a way to define a small region or apply a force only at the impact site?”
To answer these questions, yes there is a way. You can use the Impact or Bistop functions.
The Impact Function
Let’s start with the Impact function. This function models impact forces acting on bodies during collisions. The elastic properties of the boundary surface between the two bodies can be tuned to your needs.
The general syntax is:
Where:
- x is the independent variable (e.g., displacement in translational or rotational directions such as DZ(...)).
- x_dot is the time derivative of x, usually velocity (e.g., VZ(...)).
- x1 is the lower bound. When x drops below this value, a positive force is returned.
- k is the stiffness of the boundary surface.
- e is the exponent that shapes the force-displacement curve.
- c_max is the maximum damping coefficient.
- d is the penetration depth at which full damping is applied.
Example: Disk-on-Disk Impact
Let’s consider a simple example. Two disks, one fixed at the bottom and the other free to move in the Z direction.
You want to model the impact when they collide.
Can you use a contact definition? Absolutely. But here's how you can do it using the Impact function.
- Define a marker on each disk at the contact surface.
- Create a force entity between the two bodies.
- Apply the Impact function in the respected direction:
In the model the function is:
`IMPACT(DZ({m_free_disk.idstring}, {m_lower.idstring}), VZ({m_free_disk.idstring}, {m_lower.idstring}), 0,1000.0,2.1,1,0.1 )`
Running the model and reviewing the results, you'll see that the Impact function behaves as expected.
When applying this to your own model, you must tune the stiffness, damping, and exponent parameters to match your use case. Otherwise, you might get noisy or unrealistic results.
Now, what if there’s another cylinder above the free-falling one? You want to limit the travel between the two fixed cylinders.
You could define two Impact functions, but there’s a better solution: use a Bistop function.
The Bistop Function
Bistop works similarly to Impact but includes both lower and upper bounds. The general syntax is:
- x2 is the upper bound. If x exceeds this value, a negative force is applied.
Going back to example and replacing the previous Impact force with the Bistop function:
`BISTOP(DZ({m_free_disk.idstring}, {m_lower.idstring}), VZ({m_free_disk.idstring}, {m_lower.idstring}), 0,40,1000.0,2.1,1,0.5 )`
- 0 is the lower bound (mm).
- 40 is the upper bound (mm).
- Penetration depth has been updated from 0.1 to 0.5 mm.
In this setup, the two fixed cylinders are combined into one body that is allowed to displace in the Z direction. A sinusoidal motion was applied to excite the system.
Looking at the results, the BISTOP function also behaves as intended.
Additional Resources
Model Files