Solving Blasius Equation Using Integral Method

2 次查看(过去 30 天)
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 个评论
David After
David After 2020-9-5
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

请先登录,再进行评论。

回答(1 个)

Matthew
Matthew 2015-11-8
Star Strider,
Thanks for the input. I was afraid the question was aiming for a narrow niche of users. My hopes to find that specific person on here might be too high. But I thought I'd give it a try.
The link you provided was not helpful. My code is a homework assignment and I'm confined to using the Integral Method, whereas your link clearly calls out the Runge-Kutta method on page 7, which is one of the other methods assigned to my classmates.
If anyone else might have some insight, I'd be eager to hear it!
Thanks in advance, M Ridzon

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by