![]() In the following section, we show how vectors can be represented in C# and how they keep our programming of the Nyström algorithm transparent. This detail is the only challenge that we face moving from a numerical solution of one individual equation to a solution of a differential equation set. In this second case, however, the function values y n, first derivatives (dy/dt) n, second derivatives (d 2x/dt 2) n and even coefficients k 1 to k 4 are all vectors, not single numbers. The nice feature of the Nyström method is that the same formulae can be applied both to one individual differential equation and also to a set of equations. y n+1 is the next function value, (dy/dt) n+1 is the next first derivative and h is a time step. ![]() It relies on present time t n, function value y n and the first derivative (dy/dt) n. Here, f(t n, y n, (dy/dt) n) is a function returning the value of the second derivative. There is a numerical method called Nyström modification of the fourth order Runge-Kutta method which suits well to such problems. In other words, we obtained a set of two ordinal second order differential equations with initial conditions. Total velocity is:ĭrag components are then obtained as follows:ĭividing the resulting forces by the ball mass, we get two components of the ball's acceleration. Here, r a is the air density, c d is the drag coefficient and A is the ball cross-sectional area. ![]() Where m is the ball mass and g is the acceleration due the gravity. Where D x is the horizontal and D y the vertical component of aerodynamic drag. Let us now throw a ball with initial velocity v 0 and a given elevation angle.Īt any following instant t, the horizontal and vertical forces acting on the ball are: So, whenever we want to take the aerodynamic drag of a projectile into account we should solve a set of two tied equations of motion, not two individual equations. The same is true for horizontal drag component. This means that the ratio of vertical and horizontal components of both velocity v and drag D should be the same.Ĭonsidering the square dependence of drag on velocity, we conclude that the vertical component of drag, D y, relies both on the vertical and horizontal components of velocity v. Imagine the ball moving with velocity v, like in the following picture.īecause of ball symmetry, the drag D is in the exactly opposite direction of velocity v. If we suppose that the drag works directly against the velocity direction, then the square dependency causes coupling of the horizontal and vertical forces that act on the projectile. ![]() For velocities higher than, say, 20 km/h, the drag of a moving body is proportional to the square of the velocity. Observing the situation more closely, however, we find that some tie between the horizontal and vertical movements should exist. Each of these two equations can be solved individually yielding quite realistic results. This enables the setup of two equations of motion: one for the vertical throw under the force of gravity and the other for the horizontal motion with no acceleration, which keeps that velocity constant. The simplification is based on the assumption that the horizontal and vertical components of projectile motion are independent and can be treated separately. Many textbooks bring a simplified approach to the calculation of a flying projectile's path. The article is intended as a continuation of my previous article about solitary differential equations. Then the method is applied to two problems: to find the trajectory of a flying projectile and to calculate coupled oscillations of a mechanical system with two degrees of freedom. Nyström modification of the fourth order Runge-Kutta method is explained first. This article describes how to numerically solve a set of second order differential equations with initial conditions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |