Basic explosion physics - determining force I'm using a game engine that has a ton of physics stuff built in. What I am currently trying to do is to simulation an explosion with F force in an x,y coordinate system and figure out how other items in the world are affected by it (they each have x,y as well).
The ultimate function I call is applyForce and it takes an x,y vector in Newtons for the force and a point to act on (the other objects in this case).
Currently I am doing the following:


*

*Determining the distance of the explosion point for each of the objects' x,y coordinates

*If the distance is less than the force F (my total explosion force) then I proceed

*I subtract the distance from F and assign that back to F - so this effectively becomes the total force that can act on the object based on distance

*I find the angle of the explosion point from the object by atan2(x1-x2,y1-y2)*180/PI

*Find the resulting X force by F * cos(angle)

*Find the resulting Y force by F * sin(angle)

*Use these to assign the Force vector and apply it to the object


In general I think this okay but I feel like I am missing something as right now the forces are still a bit sporadic. I think I am making the assumption that the signs of the force (- or +) will be handled by the Trig functions above but I have a feeling that is not the case. From my logs sometimes the angle is -167 and I'm wondering if that shouldn't just be based on a 360 degree system instead? I'm assuming if that's the case then I have to do some logic to assign the correct - or + signs to the forces so it moves in a direction away from the explosion point. Can anyone point me in the right direction? I am a developer so this could be completely off :)
 A: In the simplest approximation, an explosion is a shockwave moving out from some locus. The shockwave may be a compression front in a ambient medium, or may be a wave of gas propagating from the explosive into a vacuum. 
So that's the first thing you need to tell us: in air, water, vacuum, or what?
When the shockwave arrives at some material thing, it is the pressure exerted by the shockwave that transfers momentum (i.e. applies a force) to the target. The target object then accelrates as per Newton's law:
$$ \vec{F} = m\vec{a} .$$
The vector part of the above is the trigonometry that you show. I'm simply going to assume that you have your coordinate system squared away. However, we still haven't said how much force. To a first approximation it goes by the shock pressure $P$ times the area $A$ the object presents to the shock wave. So that gets us to
$$ \vec{a} = \frac{P A}{m} \hat{n} $$
where the unit vector $\hat{n}$ is normal to the surface of the shockwave.
We're still not done because we don't know $P$. Again, we'll take the simplest approximation. Assume you know the shock pressure $P_0$ at the surface of the explosive (this is presumably something you can look up for chemical explosives). When the shockwave has total area $\mathcal{A}$, it's pressure is
$$ P = P_0 \frac{\mathcal{A}_0}{\mathcal{A}} $$
where $\mathcal{A_0}$ is the area over which $P_0$ applied. For small sources (like a bomb or stick of dynamite) this will give you a $1/r^2$ type dependence for the pressure. For long linear sources you get a $1/\rho$ dependence; and for large surface charges a pressure that is independent of distance.
That isn't a good approximation, because you can expect the shockwave to spread out of it's own accord over time, and I have not yet modeled that. The really, really simple thing to do here is to choose a maximum range $l = \tau v_s$ equal to some time interval times the speed of shock propagation, and apply a hard cutoff at that point.
Now we know how much force as a function of distance from the explosive and geometry of the explosive, but to get to change in velocity we need to know for how long the force is applied. Obviously that will be related to the depth of the shockwave and to it's speed of propagation: $ \Delta t \approx v_s * d $. Unfortunately I'm hazy on how to estimate $d$. For a simple explosive I might go with half the "size" of the charge (radius, thickness, whatever). The speed of propagation depends on the medium. Again, for game purposes you could simple chose some number. Once we have $\Delta t$ we get
$$ \Delta v = \Delta t * a . $$
Since you say that your engine works on a applied impulse, you get
$$ I = \Delta t * P * A = \Delta t * \frac{P_0 \mathcal{A}_0}{\mathcal{A}} * A, $$
which is actually pretty simple.
And that should get you on your way.
