Videos > Firearms simulation in Ansys: Part 2 - Kinematic simulation in Ansys Motion
Aug 2, 2023

Firearms Simulation in Ansys: Part 2 - Kinematic Simulation in Ansys Motion

Hi everyone, this is MingYao from Ozen Engineering. Welcome to the continuation of my series on using simulation to design firearms. In this video, I'm going to discuss S-Motion and focus on the kinematic modeling of the trigger mechanism.

CAD Model and Setup

I'm using a CAD model from GrabCAD, created by Tony, which is a great model for the Desert Eagle. This model serves as a convenient example to demonstrate some capabilities. Ansys has two different rigid-body kinematic modeling tools. Our latest tool, Ansys Motion, is particularly efficient in modeling nonlinear contacts for both rigid and flexible bodies.

Setting Up Ansys Motion Simulation

  • We have a number of parts in this simplified trigger assembly, but I'll suppress a few unnecessary parts.
  • Every component is modeled as a rigid body with a moment of inertia coordinate system, and all stiffness behaviors are set to rigid.
  • We can easily switch a component from rigid to flexible by changing its properties.
  • The biggest part of a kinematic rigid-body dynamic analysis is the connections.

Defining Contacts and Joints

By default, Ansys defines contacts, but for kinematic models, we typically define most of the model as joints:

  • Select connections and joints, and have Ansys automatically create these joints.
  • Check through the contacts to ensure everything makes sense.
  • Define the only necessary contact between specific pieces, changing it from frictional to predefined contact locations.

Configuring Joints

Let's take a look at the joints:

  • Some joints are revolute, rotating along the z-axis, and can be configured to behave as expected.
  • Adjust joint orientation and coordinate systems to ensure proper alignment and functionality.

Positioning and Constraints

  • Position the assembly in space or fix it with appropriate joints.
  • Attach springs between surfaces, specifying stiffness and damping values.
  • Preload springs with a free length and compressed length to simulate realistic forces.

Simulation and Results

Generate a mesh for the simulation:

  • Create a coarse mesh on surface elements, adjusting sizing as needed.

Simulation Settings

  • Set up the simulation with specific time settings, such as a hundredth of a second.
  • Define joint loads, including rotational motion functions with constant rotational velocity.

Running the Simulation

The simulation runs quickly, taking only a few seconds, thanks to the rigid body dynamics:

  • Fix any issues, such as rolling parts, by adding appropriate joints.
  • Explore the benefits of converting components to flexible bodies for detailed deformation and stress analysis.

Analyzing Results

  • Examine stress and strain to identify high-stress areas and joint loads.
  • Probe joint loads to understand the moment required to actuate joints at different contact points.

This demonstration of Ansys Motion highlights its capabilities in modeling mechanisms, especially those found in firearms. The ability to simulate nonlinear and frictional contacts, as well as flexible bodies, enhances the analysis of rigid body kinematic problems.

If you have any questions, feel free to reach out to us at Ozen Engineering. If you enjoyed this video, please subscribe, and we'll see you next time. Thank you and have a good day.

[This was auto-generated. There may be mispellings.]

Hi everyone, this is MingYao from OZEN Engineering and this is a continuation of my series on using simulation to design firearms. In this video, I'm going to be talking about S-Motion, looking at kinematic modeling of the trigger mechanism. So I'm using again this CAD model from GrabCAD.

This GrabCAD model is created by Tony, great model for the Desert Eagle, and I'm using it as a convenient CAD model to demonstrate some capabilities. Ansys has two different rigid-body kinematic modeling tools.

Our latest tool is called Ansys Motion, which is special in its ability to efficiently model nonlinear contacts for rigid and flexible bodies. I'm going to demonstrate how we set up an Ansys Motion simulation for this trigger model. We have a number of parts here.

This is a simplified trigger assembly, but I'm still going to suppress a few more parts that I don't necessarily need. The first thing we notice is that every component is modeled as a rigid body. There is a moment of inertia coordinate system, and all the stiffness behavior is set to rigid.

We can easily switch one of these from rigid to a flexible body if we want, just by changing it. We can also specify the scale we want. The biggest part of a kinematic rigid-body dynamic analysis are the connections.

By default, Ansys defines contacts, and in this case, we, for kinematic models, we typically want to define most of the model as joints. I can select connections, I can select the joints, and have Ansys automatically create these joints for me.

But it's obviously important to check through the contacts to make sure everything makes sense. From a contact perspective, the only contact I want is between this piece here and this piece. So let's go ahead and see which one that represents. This first one is basically the only contact I want.

I'm going to change this from a frictional contact to a normal contact. I'm going to suppress everything else. Here, I'm going to predefine all the contact locations. The red is a contact side.

So I'm going to select contact to say, "Okay, these surfaces may come into contact at some point with these surfaces." And that looks pretty good. Maybe I'll select a few surfaces just in case. And here. Now Ansys will try to identify when these surfaces come into contact.

Let's take a look at the joints. This one is already a contact. So we'll ignore that one. This one is a revolute joint between these two bodies. That makes sense. It's going to rotate along the z-axis. And we can configure this to make sure it behaves as we expect.

This one is also a revolute joint, but we don't really need two sets of revolute joints concentrically. So I'm going to turn this into a fixed joint. This one here, another revolute joint. Let's see if it makes sense. So here, this one is oriented in the wrong direction.

So let's try to adjust this joint here. What I really want is kind of these two surfaces and these two surfaces. So it's like we have an axle, a bolt in the middle, and then we have a bolt in the middle. So we can adjust it. And revolute joints are defined using the coordinate system.

So we can change the location of the coordinate system. And then it's going to rotate along the z-axis. I want the z-axis to be aligned with the global x-axis. So that's how we adjust our joint so that it behaves in the right way. And then finally, this is a joint. This is a joint.

This is a joint here. And I believe we want this to be... I think I ended up selecting this as a revolute joint as well. We can define this as a contact. But instead, what I did was I selected a revolute joint for two edges. So I think I want to have it revolve around this edge here. So I can say...

So these two edges can revolve around one another. And it's going to switch this to a revolute joint. And adjust... And adjust the direction so that the z-axis is the global x-axis. There you go. So let's see what happens when we turn this.

So that's kind of what we expect this particular part to do. So those are all the joints that connect the different parts together. Now we have to position this in space or fix this in space. So let's go ahead and put a revolute joint here. We can put a revolute joint here. And we want to attach...

Oh, we probably should fix this one. Maybe I do a fixed so this part doesn't move. And then I want to attach a spring between this surface and this one. And then I want to give it some values for the stiffness and damping. So I'm going to put in some fictitious values.

And in here, we want to preload it with a free length. So we're going to say this is actually 60 millimeters long. And it's been compressed to about 40 millimeters. So it's trying to push this hammer upwards. We also have, I think in my model here, I put in another spring here.

But this one is a ground to body spring. And the ground location... I think I selected these two surfaces. And then I displaced it outwards. So right now my ground is... Is here. I can move it out in the z-axis. For the negative value. So maybe 260. Or minus 270. Something like that.

It's attached to the ground. The nice thing about rigid body dynamics is you can have things that are overlapping. Because as rigid bodies, they don't really know any better. So some sort of force and damping on that. So let's go ahead and generate a mesh for this.

You can see we created a fairly coarse mesh on just the surface elements. Here. Maybe I'll adjust the sizing here. Give a sizing of let's say one millimeter. Which seems a more reasonable mesh size. Now we can set up our simulation. So the NASA settings.

We're going to do just a hundredth of a second. I believe. Yeah. We're going to do... And that's all we have to do for this. And now we want a joint load. So there are a variety of motion loads available. We're going to put a joint load property. And we're going to find this joint here.

Which is our ground to trigger. And there's a lot of loads available. But ground to trigger load. And we're going to put a motion load. And this will be a rotational motion function. Rotation. You can write an expression or a constant rotation. Or rotational velocity.

And I think I put a constant rotational velocity of 50 radians per second. So that's the only load I have. I've constrained it. And I'll just put it here. I've constrained it. And obviously the benefit of motion studies is that it's all rigid body. So it's fairly quick.

And we can deal with lots of different contacts. And our simulations are able to solve in many seconds or even minutes of action. So we can do a lot of things. So let's take a look at what happens. Oh, it looks like I should have fixed this outer side here. Let's go ahead and do a...

Put a joint in there and fix this joint. So it doesn't roll away like that. So this simulation with all the contacts took three seconds to do. And it's pretty quick. It took three seconds to run, which is obviously very fast.

What's special about motion is we can also select a component and make it flexible. So if we're interested in how much contact this part goes through, instead of a rigid body, we can turn it into a flexible body. And now instead of matching just that part, we match the full structure.

Running a simulation. This simulation will take a little bit longer. But now we have the flexible deformation and stress on that part. So it'll be better for us to do a delay one specifically. So this simulation saw a deformation from the margin side down from the image to the back.

This shows that we don't see any deformation at the Uncture point so it's more climb yet and not которая. Okay. Let's look at the stress and strain, seeing where the high stress is at what position.

Results in a high stress so when the contact is just right over here, we have high stress values.

And we can also probe the joint loads so we can look at ground to trigger and we can look at the total moment, look at the moment it takes to actuate this joint as we're at different points of the contact.

So that's a quick demonstration of ANSYS motion and how it can be used to actuate the joint loads, to model mechanisms especially like those found in firearms, the ability to simulate nonlinear contacts, frictional contacts as well as fully flexible bodies, as well as working with rigid body kinematic problems.

So hopefully you like this this demonstration. If you have any questions, feel free to reach out to us at Ozen Engineering. And if you like this video, please subscribe and we will see you next time. Thank you and have a good day.