BVP5C的第5阶微分方程
为此:有一个数学部分,包括确定此问题的边界条件,定义为:
更确切地说,第一个BC的配制不同,因为我们需要额外的条件才能“关闭”系统。
我们选择写: 。然后,我们渐近地解决新问题:
。因此,有5个根作为解决这个微分方程的解决方案:其中2个根正在增长以下条件允许消除的指数:
我们推论两个bc,将其推论为:
除了BC:
Matlab的>,但我没有成功。这是我的代码:
eta0 = 20;
etamesh = [linspace(-eta0,0,100),linspace(0,eta0,100)];
Finit = [1; 0.5; 1; 0; 0];
solinit = bvpinit(etamesh,Finit)
sol = bvp5c(@fun_ode, @bc, solinit);
figure()
plot(sol.x,sol.y(1,:),'linewidth',1.5) % Plotting F
ylim([-2 2]);
hold on
plot(sol.x,sol.y(3,:),'linewidth',1.5) % Plotting F''
plot(sol.x,sol.y(5,:),'linewidth',1.5) % Plotting F''''
grid on
legend("F","F''","F''''",'location','northwest')
function dFdeta = fun_ode(eta,F,region)
dFdeta=[F(2);F(3);F(4);F(5);(1-F(1))/F(1)^3];
end
% Boundary conditions :
% F'''(-eta0) = F''''(-eta0) = 0
% F(0) = 1
% [1] = [2] = 0 in eta = eta0
function res = bc(FL,FR)
alpha = cos(3*pi/5) + 1i*sin(3*pi/5);
beta = cos(7*pi/5) + 1i*sin(7*pi/5);
gamma = abs(alpha);
res = [FL(4,1) ; FL(5,1);...
FR(1,1) - 1 ;...
FR(1,1)-FL(1,2) ; FR(2,1)-FL(2,2) ; FR(3,1)-FL(3,2) ; FR(4,1)-FL(4,2) ; FR(5,1)-FL(5,2) ;...
(1-(beta+alpha))*FR(3,2) + (-(alpha+beta)+gamma^2)*FR(2,2) ; (-(beta+alpha)+gamma^2)*FR(3,2) + (FR(2,2))*gamma^2];
end
我主要在努力实施上面编写的两个耦合的BC以及F(0)的连续性条件...
我已经评论了我的代码,如果有人给人一些时间寻找潜在的潜在错误或提供一些建议。
非常感谢。
I am trying to solve this differential equation :
In order to do so : there is a mathematical part consisting on determining the boundary conditions of this problem that are defined as :
More precisely, the first BC is formulated differently since we need an extra condition in order to "close" the system.
We choose to write : . Then, we solve asymptotically the new problem :
. Therefore, there are 5 roots as a solution to this differential equation : 2 of these roots are growing exponentials that the following condition allows to eliminate :
We deduce two BC written as :
In addition to the BC :
And : F(0) = 1
I have tried to implement this problem by using bvp5c
of Matlab but I haven't succeeded. Here is my code :
eta0 = 20;
etamesh = [linspace(-eta0,0,100),linspace(0,eta0,100)];
Finit = [1; 0.5; 1; 0; 0];
solinit = bvpinit(etamesh,Finit)
sol = bvp5c(@fun_ode, @bc, solinit);
figure()
plot(sol.x,sol.y(1,:),'linewidth',1.5) % Plotting F
ylim([-2 2]);
hold on
plot(sol.x,sol.y(3,:),'linewidth',1.5) % Plotting F''
plot(sol.x,sol.y(5,:),'linewidth',1.5) % Plotting F''''
grid on
legend("F","F''","F''''",'location','northwest')
function dFdeta = fun_ode(eta,F,region)
dFdeta=[F(2);F(3);F(4);F(5);(1-F(1))/F(1)^3];
end
% Boundary conditions :
% F'''(-eta0) = F''''(-eta0) = 0
% F(0) = 1
% [1] = [2] = 0 in eta = eta0
function res = bc(FL,FR)
alpha = cos(3*pi/5) + 1i*sin(3*pi/5);
beta = cos(7*pi/5) + 1i*sin(7*pi/5);
gamma = abs(alpha);
res = [FL(4,1) ; FL(5,1);...
FR(1,1) - 1 ;...
FR(1,1)-FL(1,2) ; FR(2,1)-FL(2,2) ; FR(3,1)-FL(3,2) ; FR(4,1)-FL(4,2) ; FR(5,1)-FL(5,2) ;...
(1-(beta+alpha))*FR(3,2) + (-(alpha+beta)+gamma^2)*FR(2,2) ; (-(beta+alpha)+gamma^2)*FR(3,2) + (FR(2,2))*gamma^2];
end
I am mainly struggling with the implementation of the two coupled BC written above and the continuity condition for F(0)...
I have commented my code and I would be grateful if someone give some time to look for potential errors or providing some advices.
Thank you very much.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论