Message Boards Message Boards

0
|
9002 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Projectile motion considering a wind

I would like to simulate the projectile motion, but considering both initial velocity, gravity, drag and a “wind” vector field.

My wind is specified by a discrete set of values of position intensity and direction (it can be regular, if easier). I’m currently restricting myself to the 2D vertical section domain.

I’m also considering that the projectile has a drag coefficient independent of its resultant velocity direction (like a sphere type).

Can someone give me some initial guidance for the best implementation approach, especially in what concerns the integration of the “discrete” sampled vector field into the calculation of the projectile path (the program “motor”).

Here are some demonstrations that I found of interest:
http://demonstrations.wolfram.com/FlowOfAVectorFieldIn2D/
http://demonstrations.wolfram.com/MotionOfProjectileWithOrWithoutAirResistance/
http://demonstrations.wolfram.com/BallisticTrajectories/

I will later want to integrate the notion of walls. That is, the vector field is not defined in the entire 2D domain, since there are “buildings” in the middle. The projectile can eventually bump into these polygonal regions. No special treatment is needed on these cases, besides just treating it as, for instance, a black hole, or a point of velocity stagnation (although I’m opened to suggestions on other type of treatments).

And just for curiosity, on the final state of the development, I will want to simulated the launch of hundreds these heavy particles, with a statistical variation of initial position and velocity, and check how many bump into one specific region.

Thank you in advance for any kind of input.
POSTED BY: Pedro Fonseca
2 Replies
Posted 11 years ago
@Diego

Indeed!

So I imagine that I can start from here:
Projectile3[v_,theta_, windspeed_] := First@NDSolve[{
    y''[t] == gravity[y[t]] + yDrag[x'[t], y'[t], y[t]]/mass,
    y'[0] == v Sin[theta],(*Initial vertical velocity*)
    y[0] == 0, (*Initial altitude*)
    x''[t] == xDrag[(x'[t] + windspeed), y'[t], y[t]]/mass,
    x'[0] == v Cos[theta], (*Initial horizontal velocity*)
    x[0] == 0 (*Initial horizontal position*)},
   {x[t], y[t]}, {t, 0, 120}]

and create two windspeed functions like:
windspeedX[x_,y_]:=(*horizontal component of the wind speed at point {x,y}*)
windspeedY[x_,y_]:=(*vertical component of the wind speed at point  {x,y}*)

And then specify it in the x'' [ t ] and the y'' [ t ]:
Projectile3[v_,theta_, windspeed_] := First@NDSolve[{
    y''[t] == gravity[y[t]] + yDrag[x'[t], (y'[t] + windspeedY[x[t], y[t]]), y[t]]/mass,
    y'[0] == v Sin[theta],(*Initial vertical velocity*)
    y[0] == 0, (*Initial altitude*)
    x''[t] == xDrag[(x'[t] + windspeedX[x[t], y[t]]), y'[t], y[t]]/mass,
    x'[0] == v Cos[theta], (*Initial horizontal velocity*)
    x[0] == 0 (*Initial horizontal position*)},
   {x[t], y[t]}, {t, 0, 120}]

It sounds correct. Any thoughts?

What is then the best approach to retrieve the wind velocity at a given point of the domain? I have always struggled with the Interpolation on the 2D domain... Would a package like "NonGridInterpolation" better fit my needs? Are there other alternatives? Please remember that I have black spots (the "buildings").
POSTED BY: Pedro Fonseca
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract