4 Runge-Kutta Solution
4 Runge-Kutta Solution
4 Runge-Kutta Solution
4 Runge-Kutta solution
In order to solve O.D.E’s such as the Blasius equation (5) we often need to resort to computer methods. Let
us start by thinking about what an O.D.E actually represents. A first order O.D.E is a statement that the
gradient of y, dy/dx, takes some value or function. We can write this as
Given a particular starting point - some value of y corresponding to a given value of x - this equation
specifies a particular curve in the x - y plane. A typical such solution is shown in figure 3.
We could trace the curve defined by this O.D.E - i.e. solve the equation - by starting at this point and
tracing forwards/backwards in steps of size h
In fact this is the basis for all numerical methods for solving O.D.E’s. Used like this, it is referred to as
Euler’s method. Symbolically, we are writing the derivative as
Of course, in this case we can solve the problem analytically. The solution is
https://projects.exeter.ac.uk/fluidflow/Courses/FluidDynamics3211-2/BoundaryLayers/rkLecturese4.html 1/3
13/10/2019 4 Runge-Kutta solution
The Blasius equation is a 3rd order O.D.E, and the discussion above talked about 1st order O.D.E’s. It is
possible to use Runge-Kutta for higher order O.D.E’s, but we must first manipulate the equation we want to
solve. For instance, suppose we want to solve the equation
and we can write the 2nd order ODE as 2 1st order equations :
If we define a vector
which is in the same form as before - a 1st order O.D.E, but involving a vector of y values.
if we write
Of course, we still need to find the boundary conditions in order to be able to solve these equations. We note
that at the plate y = 0 the velocity is zero ux = 0, whilst a long way from the plate the flow has to match the
undisturbed flow ux U :
Boundary 1
At the plate y = 0, i.e. = 0, ux = 0 i.e. f' = 0, f = 0.
Boundary 2
A long way from the plate, i.e. y , i.e. , ux U , i.e. f' 1
This gives us a sufficient number of boundary conditions, but they are in two different locations. The
rkfixed routine in MathCad requires you to specify values for Y 0, Y 1 and Y 2 for a specific value of X, and
will return the solution for other values of X starting at this point. The only way to find the solution in this
https://projects.exeter.ac.uk/fluidflow/Courses/FluidDynamics3211-2/BoundaryLayers/rkLecturese4.html 2/3
13/10/2019 4 Runge-Kutta solution
case is to use a shooting method. We know that at X = 0, Y 0 = Y 1 = 0. Guess a value of Y 2 at this point and
then adjust it until the second boundary condition is satisfied.
https://projects.exeter.ac.uk/fluidflow/Courses/FluidDynamics3211-2/BoundaryLayers/rkLecturese4.html 3/3