I'm making a bridge-simulation game. I'm using Box2D for the physics engine. I'm trying to figure out the best way to get the amount of stress on a beam. Right now, I'm taking the reaction force of the pins of the beam (Which is FA
in the attached diagram below) and comparing them to a maximum value.
There are 2 problems with this:
- The bridge only breaks apart at the pins
- There is no distinction between compression and tension.
So, I need to rethink how to simulate the bridge. I want to be able to see the beams themselves break in half (or even wherever it should break, that'd be cool), and a visualization of both tension and compression for the beams. For a specific beam, I can get the reaction force (FA
) of each of its pins (A
). I can get the position of each side of the beam (A
, which are also the position of each pin). I can also get the reaction torque of each beam (though I'm not sure how that'd help me).
Here's my attempt at finding the stress on a beam: (sorry I can't figure out how to work latex)
SAB=(FA * AB) + (FB * BA)
is the beam (and the vector that represents it), SAB
is the stress of AB
, * is the dot product, and FA
is the reaction force of A
Is this correct? If not, can someone guide me in the right direction?