Solving Blasius Equation Using Integral Method

조회 수: 2 (최근 30일)
Matthew
Matthew 2015년 11월 8일
댓글: David After 2020년 9월 5일
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