My last post mentioned going into the topic of meshing. So, here we go…
Meshing is a huge topic in and of itself, when it comes to simulation products. So this post may be a bit general or vague on some areas. But, hopefully, I’ll cover all of the major points about meshing.
When you work up a new simulation, prep work makes all the difference. And the most-prominent piece of this work is creating a good mesh for your part or assembly. The image at the top of my blog shows a part that has been meshed. The idea of a mesh is to approximate the shape of a part by breaking it down into small blocks, called elements. In the image above, most of these elements are simple cube shapes. But elements can be cubes, tetrahedra, wedges, thin rectangular blocks, or a combination of these.
But meshing requires a fine balance between accuracy and simulation time. On one hand, the smaller we make the mesh size, the more accurate our model will be represented. Curved surfaces or edges will be closer to reality, because the more small flat facets we put around a curved face, the smoother it begins to look. (Again, we’re only approximating shapes using elements.) And stresses will transfer more smoothly through the parts. But if you make the mesh really small to get nice, smooth faces and edges, you create a LOT more elements. Each element uses equations to calculate how stress moves from element to element (or, more correctly, node to node… nodes are the points where corners of elements come together… the intersections of the lines of the mesh, if you will). Each element that neighbors other elements, requires several equations to be solved. So it stands to reason that an increase in elements will cause a very serious increase in equations to solve. But let’s take this one step further…
Let’s say you have a cube… you cut that cube in a 2x2x2 mesh, meaning you now have 8 elements. If we even go to a 3x3x3 mesh, we now have 27 elements. Each time you decrease the mesh size, you create an exponential increase in the number of elements, and also equations to solve.
So, simply taking an overall average mesh size of 1-inch, and making it 1/2-inch, will figuratively make the number of elements we have to solve for explode. And our solve time goes up dramatically. It’s common for simulations to take hours to solve. But something as simple as decreashing the mesh size could take that time and make it days! So, we need to keep in mind the balance of accuracy versus time to solve. At some point, decreasing mesh size will only very-slightly increase accuracy (say, by an additional 0.01%). If my answer is 100psi of stress or 101psi of stress, does it really matter that much? If the answer is no, there’s no reason we need that additional accuracy.
Here are a few examples of mesh sizes: one that’s too large to be accurate, one that’s a good size, and one that’s too tiny to be beneficial.
-
-
Mesh size that’s much too large to be accurate.
-
-
Mesh size that’s just about right for this part.
-
-
Mesh that’s too small to be beneficial. Larger mesh size is adequate.
Both Autodesk Inventor and Autodesk Simulation products have what’s called a “convergence” utility. The way that it works is it takes your simulation and runs it twice, once at the normal mesh size and one at a slightly-reduced mesh size, and compares the two results. If the difference in results is small (you set what “small” means), the program will stop there. If the difference is too large (say, over a 10% difference in the results), the mesh size steps down again and the simulation runs once more. Again, it compares results from the last two runs to check for difference in stress. It continues this process until the results “converge” toward a specific value, or until it runs out of the number of tries that it is allowed to run before giving up. (Any more than around 4-6 mesh reductions and it probably won’t converge anyway. Plus, this means it would need to solve repeatedly for each time it reduces mesh size, significantly increasing solve times.) If the stresses do converge on a value, it means our mesh size is small enough to be reasonably accurate. So, it’s best to start with a larger mesh size than you’d think is appropriate and work smaller from there. If you start with a tiny mesh size, you may just be wasting time waiting for the program to solve.
To finish, a good mesh size for general stress analysis would be one where you have at least 2-3 layers of elements through the thickness of the material. Again, start a little bigger, if you think you’ll end up with too many elements. You can always test a second run with a smaller mesh size, or use the convergence utility to see how accurate your results are. Otherwise, you could be waiting for hours or days for results that aren’t even useful anyway. And every FEA package should have a way to refine the mesh in specific areas to increase accuracy only where you need it most.
Hopefully the idea of mesh size makes a bit more sense now. Particularly the idea of how to set a mesh size appropriate for a simulation. Feel free to post any questions you may have on this topic, and I’ll be happy to provide an answer, as best I can.