A programmer asks a (silly) physics question

Physics and electronics discussion, revision, exam and homework help.

Announcements Posted on
Enter our travel-writing competition for the chance to win a Nikon 1 J3 camera 21-05-2013
IMPORTANT: You must wait until midnight (morning exams)/4.30AM (afternoon exams) to discuss Edexcel exams and until 1pm/6pm the following day for STEP and IB exams. Please read before posting, including for rules for practical and oral exams. 28-04-2013
Sign in to Reply
  1. beepbeeprichie's Avatar
    • Vengeful, Imperial Overlord of The Student Room
    • Posts: 3,838
    A programmer asks a (silly) physics question
    Ok, so I almost feel embarrassed about asking this ( I studied A-level physics):

    Is the horizontal acceleration of a ball through the air only retarded by air resistance?

    How can I roughly calculate this value (say for a tennis ball)?
  2. ihatebrownbread's Avatar
    • Benevolent Member
    • Posts: 629
    Re: A programmer asks a (silly) physics question
    LOL you said retarded.

    That made me smile
  3. A.J10's Avatar
    • Benevolent Member
    • Location: Brighton and Hove
    • Posts: 794
    Re: A programmer asks a (silly) physics question
    The horizontal speed is only affected by air resistance yes...

    As for how you'd calculate it... I do believe it would vary as the ball slowed down. The resistance is caused by a difference in pressure in front of the ball (higher) and behind (turbulent and lower).
  4. unprinted's Avatar
    • Exalted and Worshipped Member
    • Location: London
    • Posts: 1,098
    Re: A programmer asks a (silly) physics question
    Relative to the air, erm... probably. If the wind velocity isn't zero, then there will be an effect relative to the ground.

    For a tennis game, it'd be interesting to know just how much the ball slows down across the court.
  5. jk5430's Avatar
    • New Member
    • Posts: 18
    Re: A programmer asks a (silly) physics question
    So I think from memory the best description of air resistance is that the acceleration is proportional to the speed squared.

    And if that is the case, you can't really separate it into vertical and horizontal components so easily.

    So basically you need to solve two differential equations which would be something like
     \frac{\mathrm{d}^{2}x}{\mathrm{d  }t^{2}} =- g -\alpha \left(\frac{\mathrm{d}x}{\mathrm  {d}t}\right)^{2}-\alpha \left(\frac{\mathrm{d}y}{\mathrm  {d}t}\right)^{2}

    and

     \frac{\mathrm{d}^{2}y}{\mathrm{d  }t^{2}} =-\alpha \left(\frac{\mathrm{d}x}{\mathrm  {d}t}\right)^{2}-\alpha \left(\frac{\mathrm{d}y}{\mathrm  {d}t}\right)^{2}

    Then solve for x and y using something like a runge kutta method.
    Last edited by jk5430; 31-07-2012 at 10:52.
  6. mf2004's Avatar
    • Peer Of The TSR Realm
    • Posts: 1,478
    Re: A programmer asks a (silly) physics question
    (Original post by jk5430)
    So I think from memory the best description of air resistance is that the acceleration is proportional to the speed squared.

    And if that is the case, you can't really separate it into vertical and horizontal components so easily.

    So basically you need to solve two differential equations which would be something like
     \frac{\mathrm{d}^{2}x}{\mathrm{d  }t^{2}} =- g -\alpha \left(\frac{\mathrm{d}x}{\mathrm  {d}t}\right)^{2}-\alpha \left(\frac{\mathrm{d}y}{\mathrm  {d}t}\right)^{2}

    and

     \frac{\mathrm{d}^{2}y}{\mathrm{d  }t^{2}} =-\alpha \left(\frac{\mathrm{d}x}{\mathrm  {d}t}\right)^{2}-\alpha \left(\frac{\mathrm{d}y}{\mathrm  {d}t}\right)^{2}

    Then solve for x and y using something like a runge kutta method.
    This won't work as it is. As you can see if you put g=0 and the x component of velocity= something then this would cause the ball to accelerate in the negative y direction (not what happens).

    I think this is right: (multiplied by sin & cos of the angles in the resistance bit)

    \frac{\mathrm{d}^{2}y}{\mathrm{d  }t^{2}} =-g-\alpha \sqrt {\left(\frac{\mathrm{d}x}{ \mathrm{d} t}\right)^{2}+ \left(\frac{\mathrm{d}y}{\mathrm  {d}t}\right)^{2}} \left\frac{\mathrm{d}y}{\mathrm{  d}t}\right

    \frac{\mathrm{d}^{2}y}{\mathrm{d  }t^{2}} =-\alpha \sqrt {\left(\frac{\mathrm{d}x}{ \mathrm{d} t}\right)^{2}+ \left(\frac{\mathrm{d}y}{\mathrm  {d}t}\right)^{2}} \left\frac{\mathrm{d}x}{\mathrm{  d}t}\right

    also you put g in the x direction which is just plain wrong

    EDIT: for small velocities you can use a term that's linear in velocity in which case you replace \alpha\sqrt{...} by \beta it's an easier one to code so it might be worth trying that first.
    Last edited by mf2004; 31-07-2012 at 12:07.
  7. Stonebridge's Avatar
    • Community Assistant
    • TSR Demigod
    Re: A programmer asks a (silly) physics question
    (Original post by beepbeeprichie)
    Ok, so I almost feel embarrassed about asking this ( I studied A-level physics):

    Is the horizontal acceleration of a ball through the air only retarded by air resistance?

    How can I roughly calculate this value (say for a tennis ball)?
    One way of doing this numerically (for a "rough" calculation) is to
    1. split the motion into horizontal and vertical components
    2. the vertical (downwards) component is governed by Fy=mg - kvy2
    3. the horizontal component is governed by Fx=-kvx2

    This assumes the drag force is proportional to the velocity squared. (k is the constant)
    See here for a discussion of this
    http://en.wikipedia.org/wiki/Drag_(physics)

    The two acceleration components are then equal to F/m

    After that it's a simple matter of just setting up your "loop" time interval and calculating the horizontal and vertical velocity and displacement components using standard SUVAT equations.
    Last edited by Stonebridge; 31-07-2012 at 17:47.
  8. jk5430's Avatar
    • New Member
    • Posts: 18
    Re: A programmer asks a (silly) physics question
    (Original post by mf2004)
    This won't work as it is. As you can see if you put g=0 and the x component of velocity= something then this would cause the ball to accelerate in the negative y direction (not what happens).

    I think this is right: (multiplied by sin & cos of the angles in the resistance bit)

    \frac{\mathrm{d}^{2}y}{\mathrm{d  }t^{2}} =-g-\alpha \sqrt {\left(\frac{\mathrm{d}x}{ \mathrm{d} t}\right)^{2}+ \left(\frac{\mathrm{d}y}{\mathrm  {d}t}\right)^{2}} \left\frac{\mathrm{d}y}{\mathrm{  d}t}\right

    \frac{\mathrm{d}^{2}y}{\mathrm{d  }t^{2}} =-\alpha \sqrt {\left(\frac{\mathrm{d}x}{ \mathrm{d} t}\right)^{2}+ \left(\frac{\mathrm{d}y}{\mathrm  {d}t}\right)^{2}} \left\frac{\mathrm{d}x}{\mathrm{  d}t}\right

    also you put g in the x direction which is just plain wrong

    EDIT: for small velocities you can use a term that's linear in velocity in which case you replace \alpha\sqrt{...} by \beta it's an easier one to code so it might be worth trying that first.
    Ah, yes thank you! that's what happens when you do math in the morning...
  9. XiaoXiao1's Avatar
    • Full Member
    • Posts: 126
    Re: A programmer asks a (silly) physics question
    For slow moving projectiles you could assume that drag is proportional to speed, then you would be able to solve analytically.
Sign in to Reply
Share this discussion:  
Article updates
Moderators

We have a brilliant team of more than 60 volunteers looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

Reputation gems:
The Reputation gems seen here indicate how well reputed the user is, red gem indicate negative reputation and green indicates a good rep.
Post rating score:
These scores show if a post has been positively or negatively rated by our members.