# Shooting Method to solve Blasius equation

In summary, the conversation is about solving the Blasius Equation using Matlab. The equation involves f*f'' + f''' = 0, with boundary conditions at eta = 0 and eta = infinity. The conversation discusses the code written so far and two specific questions about driving y2 to the boundary condition of 1 and relating the solution back to physical properties. The expert summarizer offers advice on using a more accurate integration algorithm and suggests using Newton's method to efficiently iterate upon the initial guess for the solution. They also recommend checking the accuracy of the code by substituting in the known solution and testing the boundary condition at a fixed value of eta. The expert also mentions that they are unable to provide a MATLAB code to find the value of
Hello all,
I'm trying to write a bit of Matlab to solve the Blasius Equation f*f'' + f''' = 0, where at eta = 0, f' = 0, and at eta = infinity, f' = 1.

What I have so far is below...I'm a bit rusty. Two specific questions:

1. I'm trying to drive y2 to the b.c. of 1, however my loop appear to not be working.

2. Once I've solved the transformed equation in Matlab, how does it physically relate back to reality, in terms of boundary layer thickness and Cf?

Code:
%Define variables
%n = eta
%y1 = f
%y2 = df/dn = d(y1)/dn
%y3 = d^2f/dn^2 = d(y2)/dn
%d(y3)/dn = d^3/dn^3 = -y1*y3

%Clear values
clear;
clc;

%Initial conditions at n = 0
%f(0) = 0
y1 = 0;
%df/dn(0) = 0
y2 = 0;
%Need iniial guess for d^f/dn^2
y3 = .1;

%Need step size in eta
dn = 0.1;

%Set debugging counter
count = 0;

%Integration loop seeking target value of 1 for y2 = df/dn

if abs(y2-1) > 0.001
for n = dn:dn:10 %establish incremental range over eta
y1 = y1 + y2*dn;
y2 = y2 + y3*dn;
y3 = y3 + (-y1*y3)*dn;
end
count = count + 1;
end

y2
count
y3

Thanks!

%Integration loop seeking target value of 1 for y2 = df/dn

if abs(y2-1) > 0.001
for n = dn:dn:10 %establish incremental range over eta
y1 = y1 + y2*dn;
y2 = y2 + y3*dn;
y3 = y3 + (-y1*y3)*dn;
end
count = count + 1;
end
What are you doing here?

First, that is not an acceptable way to integrate a system of ODEs. Since you are using Matlab, take a robust method such as rkf45.

Second, you don't loop over the integration many times until you (magically) get the right boundary condition. You have to integrate every time starting from a set of initial conditions, and these have to be modified intelligently so that at each iteration you get closer to the desired target.

Dr Claude is right. You have to reset the initial conditions on all the dependent variables each time you restart the integration. You also need to use a better algorithm for converging to the final solution using the shooting method. I always use Newton's method, evaluating the partial derivative of the error with respect to the unknown initial condition numerically. This requires you to got through the integration twice in advance of the actual set of iterations, using two slightly different values of the unknown initial condition. Make sure you integrate far enough out in eta to be sure you are close enough to infinity. What final value of eta are you using?

chet

1. Dr. Claude is also right about the integration formula you are using. You are using a forward Euler integration, which is very inaccurate. You should be using an automatic integration package or a more accurate integration algorithm.

2. You are cutting off the integration when y' exceeds 1.0, but y' might also level off before it reaches 1.0. You need to decide on a fixed value of eta that you integrate up to, and regard that as essentially infinity. You then test the boundary condition at that location. I recommend eta = 10.

3. You know the answer to this problem before you begin. So, substitute this value in for the unknown boundary condition, as see if your integration comes close to matching the far boundary condition. This will give you a check on your coding, and also on the accuracy of your integration.

4. You need to decide on how to iterate upon the initial guess in an efficient way so that you converge rapidly to the desired solution. As I mentioned in my previous post, I recommend Newton's method (or modified Newton's method).

Chet

hellow everyone i need help to find the value f''(0) in blasius equation f'''+f*f''=0 or post a easy MATLAB code.
thanks

## 1. How does the Shooting Method work to solve the Blasius equation?

The Shooting Method is a numerical technique used to solve differential equations, such as the Blasius equation, by converting them into a boundary value problem. It involves guessing an initial value for the solution and then iteratively adjusting it until the boundary conditions are satisfied.

## 2. What is the significance of the Blasius equation in fluid mechanics?

The Blasius equation is a fundamental equation in fluid mechanics that describes the boundary layer flow over a flat plate. It is widely used to study laminar flow and is an important tool in the design of aerodynamic and hydrodynamic systems.

## 3. What are the limitations of the Shooting Method in solving the Blasius equation?

Despite its usefulness, the Shooting Method has some limitations when applied to the Blasius equation. It can only be used to solve laminar flow problems and is not suitable for turbulent flows. Additionally, it may require a significant amount of computational resources to obtain accurate solutions.

## 4. How does the accuracy of the Shooting Method compare to other numerical techniques for solving the Blasius equation?

The accuracy of the Shooting Method depends on the accuracy of the initial guess and the number of iterations performed. It can provide highly accurate solutions if the initial guess is close to the actual solution. However, other numerical techniques, such as the Runge-Kutta method, may be more accurate for certain types of boundary value problems.

## 5. Are there any practical applications of the Shooting Method in solving the Blasius equation?

Yes, the Shooting Method has several practical applications in solving the Blasius equation. It is commonly used in the design of aircraft wings and in the analysis of boundary layer flows in engineering systems. It is also used in the study of heat transfer and mass transfer problems in industrial processes.

• Engineering and Comp Sci Homework Help
Replies
1
Views
2K
• Engineering and Comp Sci Homework Help
Replies
2
Views
1K
• Engineering and Comp Sci Homework Help
Replies
10
Views
2K
• Engineering and Comp Sci Homework Help
Replies
6
Views
1K
• Engineering and Comp Sci Homework Help
Replies
1
Views
3K
• Engineering and Comp Sci Homework Help
Replies
1
Views
2K
• Differential Equations
Replies
1
Views
1K
• Engineering and Comp Sci Homework Help
Replies
11
Views
5K
• Calculus and Beyond Homework Help
Replies
2
Views
1K
• Differential Equations
Replies
16
Views
2K