Videos > Firearms simulation in Ansys: Part 3 - Bullet motion in Ansys Ls-Dyna
Aug 2, 2023

Firearms Simulation in Ansys: Part 3 - Bullet Motion in Ansys Ls-Dyna

Hi everyone, this is Ming Yao from Ozen Engineering, Inc. In this video, we continue our series on firearm simulation. I will demonstrate how to model bullet loading and clip motion analysis using SSL Astina, one of our explicit dynamics tools.

Overview of Tools

There are numerous ways to model moving parts, especially in complex assemblies like firearms, where components slide against each other. Modeling the motion of various parts is essential. In our workbench project interface, we have several tools available:

  • Explicit Dynamics Tools: ANSYS Explicit Dynamics, SSL Astina
  • Rigid Body Dynamics Tools: Rigid Dynamics, ANSYS Motion
  • Transient Structural Analysis

Each tool has its benefits and drawbacks. In this video, I'll focus on using ANSYS Astina as an example of explicit dynamics simulation.

Benefits of Explicit Dynamics

The major advantage of using explicit dynamics is its ability to capture arbitrary contacts without predefined connections. The system can automatically handle all contacts and connections within an assembly. However, this can also present challenges due to unforeseen contacts, which depend on mesh size and quality.

Simulation Setup

Let's dive into the simulation setup:

  1. Assembly: We are working with a half-symmetry assembly of a gun.
  2. Material Library: ANSYS provides an extensive library of materials, including various types of steel (carbon, low alloy, high alloy, annealed, and hardened). For example, 4140 steel includes a plasticity curve, temperature-dependent thermal expansion coefficient, and SN curves for fatigue calculations.
  3. Component Suppression: Some components are not necessary for the simulation and can be suppressed.
  4. Contact Setup: Explicit dynamics excels in contact modeling. We can define body interactions where all bodies interact with each other as frictionless. Predefined contacts can also be renamed based on their definitions.
  5. Mesh Generation: Due to the complexity of the geometry, a TET mesh is used. For demonstration purposes, a coarser mesh is generated for quicker results.
  6. Boundary Conditions: Symmetry constraints are applied to ensure certain components do not move.
  7. Force Application: A force of 500 newtons is applied to simulate the bullet being pushed up.
  8. Displacement Setup: A time-dependent displacement is applied to simulate the slide's motion.

Running the Simulation

The simulation is set to run on 5 cores with mass scaling to increase speed. This approach can artificially increase the mass of certain elements but is acceptable if it remains a small percentage of the total mass.

Results and Analysis

The simulation predicts an hour-long runtime but should complete faster due to multi-core processing. Results include:

  • Deformation: Observe the deformation of components as the bullet is pushed up.
  • Stress Analysis: Analyze stress on individual components during the process.
  • Energy Plots: Kinetic and internal energy plots provide insights into the system's energy dynamics.

Conclusion

This demonstration highlights the capabilities of SSL Astina in modeling bullet loading and firearm motion. If you have any questions, feel free to contact us at Ozen Engineering, Inc. Don't forget to like this video and subscribe for more content. Have a great day!

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

Hi everyone, this is Ming Yao from OZEN Engineering. In this video, this is a continuation of my series on firearm simulation and in this video I'll be showing you how to model bullet loading and clip motion analysis using ANSYS SSL Astina, which is one of our explicit dynamics tools.

There are a number of ways to model parts that move around and obviously in an assembly like a firearms assembly, because there's so many components sliding against each other, it's very much necessary to model the motion of various parts. This is a workbench project interface.

I have a number of tools here, including ANSYS explicit dynamics and SSL Astina. We also have two rigid body dynamics tools, rigid dynamics as well as ANSYS motion. We also have transient structural analysis. So all these tools can model motion of various components.

However, there are some benefits and drawbacks to each one of these. So I'll be going into ANSYS Astina as an example. This is an example of using an explicit dynamics simulation tool to model the motion of different components.

The big benefit of using explicit dynamics is its ability to capture arbitrary contacts. You don't have to predefine any contacts or connections. There is the ability to create a body interaction that automatically handles all of the contacts and connections in an assembly.

However, this also leads to some unique challenges because unexpected or unforeseen contacts can occur depending on the size and quality of the mesh. So sometimes it is necessary to take into account.

It took me a little bit longer to get the license for this analysis because I'm testing out the new ANSYS. This is an example of using explicit dynamics in the ANSYS cloud licensing system as well. OK, just like before, this is the assembly that we're working with.

It's a half-symmetry assembly of a gun. With ANSYS, we can go from top to bottom. I'll try to replicate some of the things I did here. So one of the nice parts about ANSYS is that we have a huge library of materials for analysis. If I look at steel, I have a lot of steel options.

There's various types of carbon steel, low alloy as well as high alloy steel. So there's also annealed and hardened steel. So this makes it very easy to run simulations in ANSYS. If I go back to our database here and look at, for example, hardened steel. Here are all the hardened steel options.

If I look at, for example, 4140, it has a plasticity curve, temperature-dependent thermal expansion coefficient, as well as multiple SN curves for fatigue calculations. Temperature-dependent thermal conductivity, as well as specific heat is also included.

So you can include any and all of these materials in a simulation quite easily. Next, we want to look at the parts. We have a few parts here that don't need to be included in the simulation. Those little components that I didn't really care about, we can just go ahead and suppress these parts.

So here we have the parts that are not included in the simulation. We're going to go ahead and suppress these parts. And now we have taken them out of the analysis. The real, the part where explicit dynamics really shines is in the contacts.

And namely, there's this option to do body interaction where all bodies can interact with all other bodies and self-contact is included. And they're treated as frictionless. So automatically, I can have any of the components touch anything else without having to pre-define it.

So as this bullet travels up the path, bumping into various components, I don't have to explicitly define each component and how and pre-define the contacts. ANSYS Ellis Dynan will just find those contacts for me. We also have a set of contacts up here.

These are predefined contacts and we can choose to rename them based on definition. So the only thing I care about here is this contact here. Normally there are various mechanisms that will pull back and there's a pin that causes this component to rotate.

Because I'm doing a half symmetry model, it's not necessarily included in here. So I'll leave this as a bonded contact and automatically this will set up the contacts so that the components don't move with respect to each other. There is this maximum offset value.

You want this to be larger so that if there's even a tiny amount of gap between it, it won't be connected. So making this a larger value helps to define it. The rest of this I can suppress, which means I'm not interested in including in my simulation. So selecting all of these and suppressing it.

And that's all I really need to do for this model to set up the contacts. I have one bonded contact where as I move the slide here, it will pull back the other piece, the bolt. And then the body interaction is, contacts automatically defined here. Go ahead and generate a quick mesh here.

Because of the complexity of the geometry, this will be a TET mesh. But that's okay for demonstration purposes. And we can always refine it to something more accurate later on if needed. Okay. So this is the mesh that ANSYS created for me. You can see it's a fairly uniform TET mesh automatically.

And this is ready to go for analysis purposes. However, for any other analysis, you can use the TET mesh. And you can see that the TET mesh is very uniform. Because this is a demonstration, let's take a look at the mesh. This is about 100,000 nodes and half a million elements. So it's not too bad.

But I'm running this on a laptop, so I want this to be a fairly quick analysis. So I'm going to increase the size of the mesh globally to a size of 5. And then I'm going to make the bullets a little bit more refined.

So these will have a sizing of 2. So I'm deliberately getting a lower quality result so that I can get results quickly. So much coarser mesh. But now this is only a few thousand elements. So it will run very quickly. So it looks like this is going to be a very good result.

And I'm going to increase the size of the mesh. And I'm going to increase the size of the bullets. So it looks like some of the elements didn't get meshed. Oh, because I didn't suppress this one. I missed one of the elements.

So these little check marks tell me which one is meshed and which one hasn't. So now everything has been meshed. So let's go ahead and set up this simulation now. This is an analysis. And we'll set an in time to 15 milliseconds. And I'm going to run this on 5 cores. And we can turn on mass scaling.

Mass scaling allows us to make certain elements heavier. And that will increase the mass of certain elements. The smallest of elements. That increases the simulation speed. So that we can accelerate this analysis even more. This obviously makes some components artificially heavy.

If you're only talking about a few tenths of a percentage, it's not a big deal. But if it becomes a large number, certainly it is cause for concern. So now we want to set up the boundaries and conditions and such.

Because this is a symmetry model, I'm going to select the surfaces in the symmetry plane. And constrain it so that it's not allowed to move in the x axis. So that's a set of constraints. I want to make sure my clip doesn't move. So I can select a few surfaces here. And put in a fixed support.

That makes sure the clip doesn't move. We can put a spring between the clip and this piece that pushes the bullet up. But instead I'm going to assign force. So mostly because I'm not sure what the force is to push this up. I did an analysis and I think I ended up going with 500 newtons.

Which may be too much. So it's going to be going in that direction. And we'll do 500 newtons showing that it's pointed that way. One of the things that's interesting with ANSYS is that we do take into account the thickness of the mid surface. And you can see this is the mid surface here.

Sometimes we have to be careful with the mesh. The reason I refine my bullets is that if the mesh is too coarse, sometimes it'll be jagged and poke into my mid surface. And that'll cause simulation issues where things won't move properly. So I want to double check to make sure.

For example here, it's pretty close. It's not quite touching. Hopefully it doesn't touch. But because this is a cylindrical surface, it actually looks fine over here. But something we do need to worry about is whether this node for example is poking into or having any overlaps with my boundary.

So one way of adjusting this is finding the mid surface. And we can choose to put an offset in the middle, bottom, or top. So if I change this, then the mid surface becomes the bottom of my surface. And that means the mesh goes on the other side.

That gives us a little bit of room for the mesh to move. Alright, so we want to pull the slide back. So I think what I did was I grabbed this piece here. And I put in a fixed displacement or a remote displacement. Remote displacement allows us to find the rotation as well.

But in this case there's no real difference. I'm going to set everything to zero. And I can make a time dependent rotation. A time dependent displacement. So from zero to let's say three milliseconds. X is zero. Y is zero. Z is zero. But I want to pull this back.

So this will initially be at zero and at eight milliseconds. For example, I can pull this back to 70 millimeters. I'll change this to the original here. And 1e to the minus two. We're going to maintain, maybe hold it for 70. And then maybe at the end, we pull this back.

And then maybe at the end, we push it back. All the way to minus 20. So maybe not quite to the end. So we're going to pull this, wait a little bit. Pull this. And then hold. And push it back. So this allows us to model various mechanisms. This is an Excel spreadsheet.

So we can easily copy and paste various types of displacement or pressure loads. If you have those available. So it looks like there are a few other components where I placed fixed support on. So I decided to select those surfaces and do a fixed support. Sometimes these barrels will start vibrating.

And if you want to keep more of a rigid dynamics type of action, you can select surfaces here. And constrain it to only move, for example, in the Z plane. That allows us to avoid some vibration of the barrels.

But if you're interested in the vibration of the barrels, that's totally acceptable as well. So that's the type of simulation we can set up. We're automatically tracking the total deformation for the simulation. And then we can look at things like deformation, stresses, strains, etc.

And you can also extract contact pressure. Shear forces. And all kinds of good information. So let's go ahead and run this analysis. So this simulation is predicted to take about an hour. But in reality, it should only take a fraction of that. Because I'm running all four cores.

And I'm running all four of them. So it's running nicely. Let's take a look at the results. You can see that... Maybe I put too much force in. It doesn't look like it's pulling back quite yet. Maybe this is the exaggerated results here. True scale. There you go.

So we have the bullets kind of bouncing around as we push them up. It's about to get interesting here. You can see I was holding everything steady until 3 milliseconds. And then I think we start pushing it up. We start sliding the slide back.

So instead of waiting for this to finish in a few more minutes, I'll show you the results of what the finished analysis looks like. So here is the deformation. Of the part as it goes up. You can see that I'm not a great firearms designer. The bullet is not going to the chamber as expected.

I'm probably missing a few pieces of components that's necessary for that to happen. What's interesting here is we can plot, for example, the stress on an individual component through this process. So you can see that the bullet is not going to the chamber. And it's not going to the chamber.

So you can look at how the stresses occur as the part is pushed in. And there may be some contacts that's happening unnecessarily here. And obviously the vibration is captured in this process. We can slow it down a little.

Now because contacts are automatically taken care of for each part, for explicit dynamics analysis, we don't have the standard convergence plots. Instead we look at the kinetic energy buildup. So this is the energy of the system as it goes through the firing cycle.

We can put in some sort of filtering. Do some Butterworth filtering of the energy to look at what the plot looks like. We can export this and copy it to the system. And paste this as needed. Now also look at the internal energy buildup.

So this is permanent deformation or internal strain that gets built up. It tells you how much deformation there is in the system as we go through the cycle. Finally, add in mass. Now we can look at the overall mass of our system right now. It is about 0.65 kilograms.

And we ended up adding 4 times 10 to the minus 4. So maybe one thousandth of the mass of the gun to this in order to speed up the simulation. So these analyses are extremely fast. I think this is on four cores. It only takes 11 minutes.

If I have more computational resources, more cores, more HPC, I can certainly handle much larger models and run them very quickly to many milliseconds. But these types of simulations are very fast.

But these types of simulations typically aren't practical for things that last on the order of more than a second. So that's the key limitation. And that is why we have a number of other methods for setting up these simulations.

In addition to L-estainer, we have static and transient structural as well as rigid dynamics and ANSYS motion to handle other types of longer duration motion events. So that's a quick overview of what happens when we simulate a bullet loading analysis in ANSYS SSL Astina.

You can see the vibration here. So that's not realistic. And that's probably because as I'm sliding this along, you can see the mesh is slightly bumpy. And that causes those vibrations. Lots of ways to simplify that. Remove contacts from that area. Smooth it out with a finer mesh.

Or set up displacement constraints. So you don't have these jagged edges rubbing against the other parts. So a big part of setting up these simulations is using the right assumptions so we can set up analysis quickly.

So that's a demonstration of how we go about modeling the motion of bullets as well as the firearm itself and how they interact. Hopefully this was of interest to you. If you have any questions, feel free to contact me. Contact us at OZENgineering.

Otherwise, like this video, subscribe, and I hope you have a good day. Bye bye.