Why Does My Ball Trajectory Simulation Show Only Positive Vertical Velocities?

In summary, your spreadsheet has trouble modeling the flight path of a sphere due to air resistance. You have corrected the acceleration equation to include the term due to gravity, but this has caused problems with the vertical velocity and altitude.
  • #1
Chelonian
10
0
I am attempting to create a spreadsheet that models the flight path of a sphere. My model should consider air resistance, but I've opted to ignore magnum. As a resource to help me, I'm using http://www.team2834.com/team_documents/Projectile_motion_with_air_resistance.pdf, but I have ran into some trouble. I have the velocity and position defined recursively as:
$$v_x(n+1)= v_x(n)+a_x(n)Δt$$
$$v_y(n+1)= v_y(n)+a_y(n)Δt$$
$$x(n+1)=x(n)+v_x(n)Δt+a_x(n)(Δt)^2$$
$$y(n+1)=y(n)+v_y(n)Δt+a_y(n)(Δt)^2$$
The acceleration has given me some trouble, though. I tried defining acceleration as it the page seemed to indicate:
$$a_x(n)=-(D/m)v_x(n) \sqrt{{v_x(n)}^2+{v_y(n)}^2}$$
$$a_y(n)=-g-(D/m)v_y(n) \sqrt{{v_x(n)}^2+{v_y(n)}^2}$$
When I used this to finish my spreadsheet, I noticed that the vertical velocity was always positive, an obvious error. It is very possible that I have made an error unrelated to the acceleration equations (I am a novice at best at mechanics and Excel), but I saw this as the most likely candidate. The [erroneous] spreadsheet I currently have is attached.

What is causing these incorrect values? If there is any additional information I can give to help, let me know, and I will be happy to do so. I'd hate for all of my work to be wasted, so any help you can give is very much appreciated. Thank you for your time and for your assistance.
 

Attachments

  • Ball Trajectory Simulator.xlsx
    18.4 KB · Views: 213
Physics news on Phys.org
  • #2
Your vertical acceleration does not include the term due to gravity. This is seen directly from the numeric values: its magnitude should always be greater than 9.8 while the vertical velocity is positive, and always less than 9.81 otherwise.

I have also noticed that you inserted some ad hoc calculations of the position and vertical velocity in the first iteration. When I removed those, and added the missing gravity term to vertical acceleration, I got negative vertical velocity on the 7th iteration, and negative altitude at the 16th iteration.
 
  • Like
Likes 1 person
  • #3
voko said:
Your vertical acceleration does not include the term due to gravity. This is seen directly from the numeric values: its magnitude should always be greater than 9.8 while the vertical velocity is positive, and always less than 9.81 otherwise.

I have also noticed that you inserted some ad hoc calculations of the position and vertical velocity in the first iteration. When I removed those, and added the missing gravity term to vertical acceleration, I got negative vertical velocity on the 7th iteration, and negative altitude at the 16th iteration.
Thank you very much. I don't know how my g value slipped out of my functions, but I'm glad I fixed it. When I just made that change, I ended up with negative values one iteration earlier then you did. What should the initial position and velocity equations be? I don't see what's wrong with them.
To clarify, is the acceleration formula in my first post correct, or should it be [itex]a_x(n+1)[/itex] and [itex]a_y(n+1)[/itex] instead of [itex]a_x(n)[/itex] and [itex]a_y(n)[/itex]?
I made a new version of the spreadsheet which I think addresses and fixes the problems you mentioned. Let me know if there's anything I need to fix on this one.
Thanks again for the help.
 

Attachments

  • Ball Trajectory Simulator - 1.xlsx
    12.8 KB · Views: 308
Last edited:
  • #4
It looks good to me now. The only thing I would change is the time step, I would make it much smaller, you do not want big velocity changes between steps.
 
  • #5


Hello,

Thank you for reaching out for help with your ball trajectory simulation project. It seems like you have put a lot of effort into this and I am happy to assist you in troubleshooting the issue you are experiencing.

Based on the information and equations you have provided, it appears that your approach to modeling the ball's trajectory is correct. However, I noticed that you are using the same equations for both horizontal and vertical acceleration. This could be the reason for the incorrect values in your spreadsheet.

The correct equations for acceleration should be:

$$a_x(n)=-(D/m)v_x(n) \sqrt{{v_x(n)}^2+{v_y(n)}^2}$$
$$a_y(n)=-g-(D/m)v_y(n) \sqrt{{v_x(n)}^2+{v_y(n)}^2}$$

As you can see, the horizontal and vertical accelerations have different components. The horizontal acceleration is affected by the drag force, while the vertical acceleration is affected by both the drag force and the force of gravity.

I recommend double-checking your equations and making sure that you have the correct values plugged in for all variables. It is also helpful to break down the equations into individual steps to make sure you are getting the correct values for each variable.

If you are still experiencing issues with your spreadsheet, please feel free to provide more information or share your spreadsheet with me so I can take a closer look. I am happy to help you troubleshoot further.

I wish you the best of luck with your project and thank you for your dedication to understanding projectile motion with air resistance. It is a complex topic, but with persistence and careful analysis, I am confident you will achieve your desired results.

Best,
 

1. What is ball trajectory simulation?

Ball trajectory simulation is a computer program or mathematical model that predicts the path of a ball in motion. It takes into account factors such as initial velocity, angle of release, air resistance, and gravity to calculate the trajectory of the ball.

2. How does ball trajectory simulation work?

Ball trajectory simulation uses mathematical equations and algorithms to calculate the position of the ball at different points in time. It takes into account various physical forces acting on the ball to accurately predict its path.

3. What are the applications of ball trajectory simulation?

Ball trajectory simulation has various applications in fields such as sports, engineering, and physics. It is commonly used in sports training to analyze and improve a player's performance, and in engineering to design and test the trajectory of projectiles.

4. How accurate is ball trajectory simulation?

The accuracy of ball trajectory simulation depends on the complexity of the model and the input parameters. In general, it can provide a good estimation of the ball's path, but it may not account for all external factors such as wind or spin.

5. Can ball trajectory simulation be used for any type of ball?

Yes, ball trajectory simulation can be used for any type of ball as long as the necessary parameters and physical forces are considered in the model. Different simulations may be required for different types of balls, such as a soccer ball versus a baseball, due to variations in their properties.

Similar threads

  • Mechanics
Replies
18
Views
2K
  • Introductory Physics Homework Help
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
749
Replies
22
Views
2K
Replies
1
Views
792
Replies
6
Views
2K
Replies
14
Views
1K
Replies
2
Views
760
  • Introductory Physics Homework Help
Replies
1
Views
1K
Back
Top