Solving Blasius Equation Using Integral Method
Show older comments
Anyone familiar with the Blasius Equation for boundary layer thickness? I have rewritten it as an ODE through the substitution of the stream function. I now need to solve it numerically in Matlab using the iterative integral method. My code is below, but it is definitely not producing the correct answers. I have no idea what might be wrong with it. I have attached an Excel sheet with the correct answers; independent variable is eta while dependent variable, which I'm trying to solve for in my code below, is f^. My code below spits out a linear f^. However, it should be a curved line as shown in the attached Excel sheet.
Thanks in advance, M Ridzon
clear all
eta=0:0.01:10;
sz=size(eta);
lg=length(eta);
f=zeros(sz); %Define f zero matrix for computational efficiency in FOR loop
f1=zeros(sz); %Define f1 zero matrix for computational efficiency in FOR loop
f2=zeros(sz); %Define f2 zero matrix for computational efficiency in FOR loop
f3=zeros(sz); %Define f3 zero matrix for computational efficiency in FOR loop
f4=zeros(sz); %Define f4 zero matrix for computational efficiency in FOR loop
fx=zeros(sz); %Define fx zero matrix for computational efficiency in FOR loop
results=zeros(lg,2); %Define results zero matrix for computational efficiency in FOR loop
results(1,1)=eta(1);
results(1,2)=0;
for_count=0; %Counter to monitor 'for' loop
for k=2:lg
for_count=for_count+1
if k==2
fx(k-1)=eta(k-1);
f(k-1)=0;
f1(k-1)=0;
f2(k-1)=1;
f3(k-1)=0;
end
fx_guess(k)=eta(k);
fcheck=1; %Dummy setting to initiate 'while' loop
while_count=0; %Counter to monitor 'while' loop
while fcheck~=0
while_count=while_count+1
f(k)=((eta(k)-eta(1)).*((fx_guess(k)+fx(1))./2));
f1(k)=-0.5.*((eta(k)-eta(1)).*((f(k)+f(1))./2));
f2(k)=exp(f1(k));
f3(k)=(eta(k)-eta(1)).*((f2(k)+f2(1))/2);
f4(k)=(eta(lg)-eta(1)).*((f2(k)+f2(1))/2);
fx(k)=f3(k)./f4(k);
fcheck=fx(k)-fx_guess(k);
fx_guess(k)=fx(k);
end
results(k,1)=eta(k);
results(k,2)=fx_guess(k);
end
1 Comment
David After
on 5 Sep 2020
How can i solve this eqaution?
F''' + F*F"+ F'^2 = 0
with the boundary conditions
F(0)=F''(0)=0 and F'(infinity)=0 and eta is 0:0.1:6
i want to plot it and create a table for it (eta-f-f'-f'')
I am new to using the ode solver in matlab and am not sure how to make it solve a equation. Any suggestion would be appreciated.
thank you
my email : ff223325@gmail.com
Answers (1)
Matthew
on 8 Nov 2015
0 votes
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!