You are browsing as a guest. Sign up (or log in) to start making projects!

5h 6m 31s logged

Completed implementation of Drag into my the 3 models. I used quadratic drag with the projectile being modelled as an sphere representing an apple. I tried my best to get the actual cross sectional area and the coefficient of drag of an average apple. Mass density i collected off google. Using the drag function that i made(implements quadratic drag formula), I calculated the acceleration components of the projectile. My main purpose was to show clearly that RK4 method is much more accurate with drag as compared to heun or euler’s method. AFter implementing drag and calculating acceleration at each stage in each method, i sketched few graphs using matplotlib. First graph was a simple trajectory graph of all the methods. I used RK4 method with a very small dt (1e-5), as an reference/analytical curve. After this i decided to plot the error curve between RK4 and heun method, i could clearly see that the two methods start to diverge with drag. Highest difference is when the velocity is at its maximum(largest drag), and the lowest difference is when velocity is very small/0, which means drag is almost 0. This gives similar results to the previous model with no drag(in which both heun and rk4 were replicas of one another/identical). Finally i did few plots of the methods with different time steps, and you can clearly see 0.5s is too big of a dt and ends up overshooting by a large amount. Finally, to clearly showcase the difference in empirical order, I decided to plot a range difference/error curve with both log and non-log axis. This range difference was calculated using the analytical curve. From thsi we can see that rk4 gives the lowest error, then followed by heun and finally euler, which gives the most error, highlighting their empirical order. Unfortunately, i did not manage to calculate the precise emprical order(through gradient) due to interpolation error at the landing boundary interfering with the fit.

0
1

Comments 0

No comments yet. Be the first!