Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Ballistics - calculating initial velocity

  1. Feb 28, 2008 #1
    Hello all,

    This is my first post so be gentle. :smile:

    I am programming a ballistics related script to a predefined physics engine. I am no physicist nor a mathematician so my knowledge in these things is quite limited.

    To the point:
    I need to calculate the initial velocity needed to shoot a projectile for it to land to known distance. Let's assume that we are using a flat surface. The physics engine uses a quite simplified drag formula which is something like this:
    D = Dc * V^2, where Dc is the predefined drag coefficient for that projectile.

    We know...
    ... the angle of the gun
    ... the distance to the target.
    ... the drag coefficient for the projectile

    I would provide you with more information, but frankly I don't know what info is needed to make this work. Please ask me for anything you need to make this function.

    Thanks for your responses in advance.
     
  2. jcsd
  3. Feb 29, 2008 #2

    cepheid

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Okaaay.....It seems to me that the inclusion of the drag force severely complicates the problem and changes it from an elementary kinematics problem to a rather sticky differential equation problem. I don't know offhand how you'd attempt it without calculus. I've made a couple of assumptions:

    1. D is a FORCE....right?
    2. D always acts in a direction opposing that of the particle's velocity.

    Using Newton's 2nd law, we can set up the equation of motion:

    [tex] \vec{F} = -mg\hat{y} - D_c |\vec{v}|^2 \hat{v} = m\vec{a} [/tex]

    [tex] -mg\hat{y} - D_c |\vec{v}|^2 \left(\frac{\vec{v}}{|\vec{v}|}\right) = m\vec{a} [/tex]

    [tex] -mg\hat{y} - D_c |\vec{v}| \vec{v} = m\vec{a} [/tex]

    [tex] -mg\hat{y} - D_c \sqrt{v_x^2 + v_y^2} (v_x\hat{x} + v_y\hat{y}) = m\vec{a} [/tex]

    Now we can write a separate equation for the horizontal component and the vertical component (dropping the unit vectors). We can also express the velocities as the first derivatives of the corresponding particle trajectories, and the accelerations as the second derivatives of the particle trajectories:

    [tex] -D_c \sqrt{\left(\frac{dx}{dt}\right)^2 + \left(\frac{dy}{dt}\right)^2} \frac{dx}{dt} = m\frac{d^2x}{dt^2} [/tex]

    [tex] -mg - D_c \sqrt{\left(\frac{dx}{dt}\right)^2 + \left(\frac{dy}{dt}\right)^2} \frac{dy}{dt} = m\frac{d^2y}{dt^2} [/tex]

    These ODE's look really ugly to solve. They're coupled, and they're non-linear. So I'm stuck here. Am I over-complicating this? Does anyone else have any insight?
     
  4. Feb 29, 2008 #3

    cepheid

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Without the drag, the differential equations are easy to solve, and the results are:

    horizontal position:

    [tex] x(t) = x_0 + v_{x_0}t = (v_0 \cos\theta)t [/tex]

    vertical position:

    [tex] y(t) = y_0 + v_{y_0}t - \frac{1}{2}gt^2 = (v_0 \sin\theta)t - \frac{1}{2}gt^2 [/tex]

    At a specified launch angle and initial velocity, the projectile is only going to spend a certain time airborne. In fact, it's vertical position will increase, reach a maximum, and then decrease until it hits the ground. To find this time airborne, we set

    [tex] y(t) = 0 \Longrightarrow \frac{1}{2}gt^2 = (v_0 \sin\theta) t [/tex]

    [tex] t = \frac{2v_0 \sin \theta}{g} [/tex]

    Now, the question is, how much horizontal distance does the projectile traverse during this time airborne? If the target is a distance d away, then we WANT it to be equal to d:

    [tex] x\left(\frac{2v_0 \sin \theta}{g} \right) = d [/tex]

    [tex] (v_0 \cos\theta)\left(\frac{2v_0 \sin \theta}{g} \right) = d [/tex]

    Solve for v0:

    [tex] v_0 = \sqrt{\frac{gd}{2\cos \theta \sin \theta}} \ \ \ \ \ \ \ (\textrm{no drag}) [/tex]

    Now you have the magnitude of the initial velocity in terms of the known parameters, which is what you need in order to write the program.
     
  5. Feb 29, 2008 #4
    Thanks for those cepheid.

    I have been able to create a script using the model without drag, but as expected the projectiles fall short from their target. So it's crucial to be able to add the drag factor in.

    This is what someone else has concluded with the same physics engine:
    I don't know if that helps at all, but the more the merrier or something like that. :smile:
     
    Last edited: Feb 29, 2008
  6. Feb 29, 2008 #5
    real world equivalent

    The real world formula for calculating the initial velocity would help too.
    If these facts are known:

    - we are on earth
    - the surface is flat
    - mass of the projectile
    - drag coefficient of the projectile
    - angle of the gun
    - landing distance

    what would be the formula for calculating the initial velocity?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Ballistics - calculating initial velocity
Loading...