some of you may remember at the beginning of the year there were several in depth discussions of using physics to calculate the flight of a ball, while accounting for the drag that acts on that ball. As team moved away from design and into build these discussions died out, but I was never satisfied with the results
The simulations we discussed earlier pretty much involved using complex formulas that I didn’t understand to find X and Y position related to time. For me at least this involved nothing more than copying these equations from the internet into a spread sheet, and I never learned or understood very much. Also because of some underlying problems these simulations never quite were as accurate nor did they achieve the results I wanted.
As FRC season began this year the challenge again involved shooting balls into a goal, the FRC balls are even more heavily effected by drag. With this I decided to dredge up the physics simulations again. However this time I wanted to start from the ground up and understand all the physical forces involved, and in the process make the simulation more accurate.
so here is the spreadsheet that came out of this project. below will be and explanation of the physics involved. I tried to account for every factor to make these more accurate than any one previously seen on the forums
Ok so at the most basic level, an objects motion through a fluid is resisted by drag.
drag applies a force opposite the direction of motion, and the size of the force is related to the velocity of the object (and the size, density of the fluid, and a bunch of other things, but that not what’s important here)
however, exactly how Force of Drag (Fd from here on) relates to velocity changes and can take one of two forms
Fd = Kd * velocity or
Fd = Kd * V^2
Kd is the “drag constant” and is calculated based on the fluid density, and the size and shape of the projectile.
our previous simulations only used one of the two, but to be perfectly accurate both types must be used.
The first one (the V approximation) is used at very low speeds (less than a gentle toss)
the second one (the v^2 approximation) is used at higher speeds (any thing above a good throw)
the reason they are different is because as speed changes the type of flow changes from laminar to not, and so with non -laminar flow the air gets all wonky and bad stuff happens this should explain this concept well
https://docs.google.com/document/d/11Jk_VnameKUrvISPgJVIrX6YvhB0kBbK1U71C28pDVo/edit?usp=sharing
The thing that determines when each different type of drag applies is called the “Reynolds Number” (Re) this number is related to the viscosity and density of the fluid, as well as the velocity of the projectile. Pretty much for Reynolds numbers over 1000 the V^2 approximation is used. under 1000 and we use the V approximation.
so the spreadsheet takes an input angle and velocity, as well as info about the characteristics of the fluid. Then it finds the velocity in X and Y, determines the Reynolds number, then determines which drag equation to use, then calculates Force of drag, then uses force/mass to find acceleration due to drag. Then adds in acceleration due to gravity. Then you integrate this acceleration over a period of time (time step set by user) then calculates the velocity at the end of that time period, then finds the average velocity during that time period, then multiplies the average velocity times the length of the time period to get change in position.
As far as I know this should be more accurate than our earlier simulations.
as an added bouns the sheet does a couple of other things
you can give a target Y position, and the sheet looks at all the data, and finds the two X positions when the ball with be closest to tht Y target ( one on the way up and one on the way down) it also looks at the data to find max height and horizontal distance when the ball hits the ground.
Have fun and let me know if you find any mistakes or have any questions
also fair warning I tried to work on this using crappy school computers and it crashed them, it’s pretty calculation intensive.