## Finding the stress of a beam

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 and FB in the attached diagram below) and comparing them to a maximum value.
There are 2 problems with this:
1. The bridge only breaks apart at the pins
2. 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 and FB) of each of its pins (A and B). I can get the position of each side of the beam (A and B, 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)
Where AB or BA is the beam (and the vector that represents it), SAB is the stress of AB, * is the dot product, and FA, FB is the reaction force of A and B, respectively.

Is this correct? If not, can someone guide me in the right direction?
Attached Thumbnails

 Tags beams, bridge, compression, stress, tension