필터 지우기
필터 지우기

Third Order Coupled ODE's

조회 수: 3 (최근 30일)
Andrew Amoateng-Agyemang
Andrew Amoateng-Agyemang 2015년 4월 6일
댓글: Didarul Ahasan Redwan 2020년 4월 1일
I have these coupled equations based off Falkner-Skan:
f′′′=−f⋅f′′−(2m/(m+1))⋅(1−(f′)2)−(2/(m+1))⋅Ri⋅θcos(m/(m+1))
&
θ′′=−Pr⋅f⋅θ'
With the BC's: f(0)=f′(0)=0 and θ(0)=1. f(5)=1 and θ(5)=0 (5 has been taken as the endpoint)
Where Pr, m and Ri are constants which can be assigned, f and θ are functions of η and the dash (') means derivative with respect to η.
I have a MATLAB file which solves this when Ri=0 by using the shooting method (as this is a BVP) and ODE45 but now it seems like that can no longer be used as easily because now they need to be solved simultaneously when Ri is not zero and I don't know where to start.
How can I solve this problem using MATLAB for the plots of f' and θ against η?
  댓글 수: 2
ravinder khary
ravinder khary 2018년 6월 29일
Respected Andrew Amoateng-Agyemang, As I am a beginner in MATLAB programming, Can you please share your code of shooting method and ODE45 for the above mentioned coupled Falkner-Skan equation. I also have a coupled BVP to solve. I don't know how to use MATLAB inbuilt function so please share a full code if possible. Thank you
Didarul Ahasan Redwan
Didarul Ahasan Redwan 2020년 4월 1일

댓글을 달려면 로그인하십시오.

채택된 답변

Torsten
Torsten 2015년 4월 8일
function main
xa = 0; xb = 5;
solinit = bvpinit(linspace(xa,xb,10),[0 0 1 1 0]);
sol = bvp4c(@coupled_falkner_skan,@bc,solinit);
function res = bc(ya,yb)
res = [ ya(1); ya(2); ya(4)-1; yb(2)-1; yb(4)];
function dydx = coupled_falkner_skan(x,y)
m = 0.0909; Ri = 5; Pr = 0.71;
dydx = [y(2); y(3); -y(1)*y(3)-(2*m/(m+1))*(1-y(2)^2)-(2/(m+1))*Ri*y(4)*cos(m*pi/(m+1)); y(5); -Pr*y(1)*y(5)];
Best wishes
Torsten.
  댓글 수: 3
Taylor Nichols
Taylor Nichols 2019년 1월 24일
I know this is an old question, but shouldn't the 4th boudary condition be yb(1) - 1, not yb(2) - 1. The BC you have written at the beginning is not the 1st derivative.
Torsten
Torsten 2019년 1월 24일
Yes, take a look at my answer from the 7th of April below. I subsequently copied the code from the comment to it (where the boundary condition is modified) and added the plotting.

댓글을 달려면 로그인하십시오.

추가 답변 (3개)

Torsten
Torsten 2015년 4월 7일
Rewrite your equations as a system of first-order ordinary differential equations and use bvp4c to solve.
Best wishes
Torsten.
  댓글 수: 1
Andrew Amoateng-Agyemang
Andrew Amoateng-Agyemang 2015년 4월 7일
I have rewritten the equations in first order form, thanks. But now I'm stuck on actually using bvp4c. I need more clarification on MATLAB's definition (typed "help bvpc4") which I have been trying to understand.
Can you please clarify?

댓글을 달려면 로그인하십시오.


Torsten
Torsten 2015년 4월 7일
function dydx = ode(x,y)
m=...;
Ri=...;
Pr=...;
dydx = [ y(2); y(3); -y(1)*y(3)-2*m/(m+1)*(1-y(2)*2)-2/(m+1)*Ri*y(4)*cos(m/(m+1)); y(5); -Pr*y(1)*y(4)];
function res = bc(ya,yb)
res = [ ya(1); ya(2); yb(1)-1.0; ya(4)-1.0; yb(4)];
solinit = bvpinit(linspace(0,4,5),[0 0 0 0 0]);
sol = bvp4c(@ode,@bc,solinit);
Best wishes
Torsten.
  댓글 수: 1
Andrew Amoateng-Agyemang
Andrew Amoateng-Agyemang 2015년 4월 7일
Thank you, I now understand all this and corrected any mistakes leaving:
function dydx = coupled_falkner_skan(x,y)
m = 0.0909; Ri = 5; Pr = 0.71;
dydx = [y(2); y(3); -y(1)*y(3)-(2*m/(m+1))*(1-y(2)^2)-(2/(m+1))*Ri*y(4)*cos(m*pi/(m+1)); y(5); -Pr*y(1)*y(5)];
end
function res = bc(ya,yb)
res = [ ya(1); ya(2); ya(4)-1; yb(2)-1; yb(4)];
xa = 0; xb = 5;
solinit = bvpinit(linspace(xa,xb,10),[0 0 1 1 0]);
sol = bvp4c(@coupled_falkner_skan,@bc,solinit);
end
Now I want to plot the solution across the whole domain, I hit the run button but it's telling me "error not enough input arguments" ?
Thanks

댓글을 달려면 로그인하십시오.


T K
T K 2018년 10월 17일
if true
% code
end

카테고리

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