BVP5C的第5阶微分方程

发布于 2025-02-04 10:02:30 字数 2626 浏览 1 评论 0原文

我正在尝试解决这个微分方程: ”在此处输入图像描述“

为此:有一个数学部分,包括确定此问题的边界条件,定义为:

更确切地说,第一个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 : enter image description here

In order to do so : there is a mathematical part consisting on determining the boundary conditions of this problem that are defined as :

enter image description here

More precisely, the first BC is formulated differently since we need an extra condition in order to "close" the system.

We choose to write : enter image description here. Then, we solve asymptotically the new problem : enter image description here. 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 :

enter image description here

We deduce two BC written as :

enter image description here
enter image description here

In addition to the BC :

enter image description here

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文