I am working on an algorithm for a real-time simulation.

I would like to calculate to extremely permissive tolerances approximate values for the stress within a 2D geometry. It will not be difficult to triangulate so we can assume a mesh or grid is available.

From what I have read, it seems that in real applications it is essentially impossible to directly measure stress, and it can only be deduced by observing strain or deformation. Is this true? Does this mean that there exists no method, analytical or numerical, that will allow me to produce meaningful numeric values?

To be specific, I am working in only 2 dimensions, with a rigid polygonal shape. I'd like to calculate the distribution of stresses within the geometry when an external force is applied to a point on the boundary.

As an example, consider the geometry of the capital letter L. If a force is applied at the top, in a westerly direction (left), then there would be tensile stress applied at the inside corner of the L, and little bit of compression at the outside corner. There would also be some high values found near the point of application.

I arrived at those conclusions by intuition but is there an algorithm I can use to calculate this numerically or analytically without generating a mesh and deforming it first? I'm okay with having to produce a mesh, but requiring me to simulate deformation before I can produce values for the stress tensor is just not feasible for a real-time solution.

I have come up with an idea for an algorithm that I will try to implement, which will hopefully be sufficient for my purposes. I thought about how the very concept of stress is at odds with a rigid body system. It seemed like an irreconcilable paradox. But I realized that I can have rigid objects, but I can simply let them break at critical moments, and the broken pieces can continue to be rigid. Rigid objects break at points on their geometry which are the weakest. Assuming they are made of the same material and density, areas of small cross-section are weak: Momentum transfer and the clash of internal forces occur through these cross-sections, and when there is not enough area to transmit these forces, failure occurs.

So, I can take my geometry and use some fuzzy sampling and determine "weak areas" by looking for the shortest cross sections (in 2D the split planes are simply line segments). Then, if I can calculate the amount of momentum that is required to pass through the segment in order to keep the object rigid, and compare that with a predetermined value, I think it might just work.

The problem with this is that I'm not producing a stress tensor field. I am relying almost entirely on heuristics, and I'm producing a split plane by sampling from a random set and seeing which ones behave most realistically. It might possibly look good with tweaking but it's so non-physical that I really want to find a more robust method.


As you mention, the concept of rigid bodies and stresses don't fit together. The stress distribution is dependent on the elastic properties of the material.

For a relatively simple 2D shape (say, less than 700 nodes, 1000 triangles), doing FE-simulations in real time can be feasible (~1/100 seconds). Also, since the stiffness matrix wouldn't change, this could be constructed, and Cholesky-factorized, only at the initial construction of the object itself, in which case solving the displacement field for given loading would be very fast (milliseconds).

Just doing an extremely coarse finite element simulation would be the best heuristic measure you could hope to achieve. For an L-beam, with maybe a 50 nodes or so, you would be looking at about 50 µs.

I doubt you can get anything faster than this. Generating the mesh will probably take a longer time.

(Approximate times given for a single core on a 2.4 GHz machine)

| cite | improve this answer | |
  • $\begingroup$ This is great. I need to do a bit of studying up to find out what particular PDE's I want to come up with FEA solvers for, then see how far I can get. I'm going after real-time speed and you are showing me that it is definitely possible. Accuracy is not paramount either, but the more variables I can tweak for different effects, the better. Got a long road ahead of me but this will be spectacular if I can pull it off. $\endgroup$ – Steven Lu Dec 16 '11 at 21:32
  • $\begingroup$ Remember to accept an answer (not just upvote) if you think your question have been answered. $\endgroup$ – Mikael Öhman Dec 19 '11 at 14:09
  • $\begingroup$ Well... I think I still need a bit more direction in the way of how to get it done though. $\endgroup$ – Steven Lu Dec 20 '11 at 3:45
  • $\begingroup$ For this question, the real, short answer is; No, you can't get stresses without strains, and for that, the displacements. The only reasonable thing to add is that you should just solve the displacements using FEA. As the FAQ-mentions, questions should be reasonably scoped, and you'll need a book to cover practical FEM. $\endgroup$ – Mikael Öhman Dec 20 '11 at 16:04
  • $\begingroup$ Well of course you get the accept. Not gonna hold out on ya. $\endgroup$ – Steven Lu Dec 20 '11 at 23:14

You need to consider the elasticity of materials in order to avoid reduntant constraints. If the forces acting on body are completely known (as well as moments), then you might be able to distribute the applied forces onto internal stresses on the basis of hertz contact pressures and subsurface stresses on the elastic half spaces.

To get bulk stresses you need to make idealizations like those in beam theory to get normal, shear and bending stresses. You need a good book on engineering design.

| cite | improve this answer | |

It all depends on how fast and how accurate you want to be. There are plenty finite element packages that you might use which will do the meshing and solve the problem for you (FreeFem++ is an nice open-source example but there are many others).

BTW, in the example you gave, the stress distribution in the letter L will be singular at the corner, and will diverge. This can be seen analytically.The divergence will be cutoff at a finite length-scale, which is the mesh size. If this effect is important for you, you should do it carefully. FreeFem handles adaptive meshing very easily.

| cite | improve this answer | |
  • $\begingroup$ Thanks for commenting. These links and directions will help me a lot. $\endgroup$ – Steven Lu Dec 16 '11 at 21:33
  • $\begingroup$ Can anybody come up with a partial differential equation which may have something to do with planar stress? $\endgroup$ – Steven Lu Dec 17 '11 at 4:20
  • $\begingroup$ I'd also like to point out something I hadn't considered up to this point. Consider the L-shape again but this time it is spinning. Due to inertia alone, at some particular speed a real structure of that shape would break due to internal tensile forces. How to go about calculating something like that? $\endgroup$ – Steven Lu Dec 17 '11 at 5:13
  • $\begingroup$ The propagation of cracks in materials is notoriuosly difficult to simulate. I find it hard to believe that you can do it in real time. $\endgroup$ – yohBS Dec 17 '11 at 12:29
  • $\begingroup$ I think the actual crack geometry can be faked pretty convincingly. I'll post back with results from my code when I get it finished. $\endgroup$ – Steven Lu Dec 17 '11 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.