使用 MATLAB 离散 PDE

问题描述

我想解决以下描述膜随时间演化的偏微分方程

enter image description here

PDE 离散化如下

![enter image description here

哪里

enter image description here

x(s_i) = x_ij=0,1x^j=xx^j=y。我们暂时忽略压力项以及 k_t 等常量

我们希望使用前向欧拉方法找到 x(t),通过设置 x = x + h*dx/dth=1e-6

我的解决方案(对于x(t))如下(为了便于回答,忽略了y项)

l = [359,1:358]; 
r = [2:359,1]; %left and right indexing vectors

l1 = [358,359,1:357]; %twice left neighbour
r1 = [3:359,1,2]; %twice right neighbour
 
%create initial closed contour with coordinates x and y
phi = linspace(0,2*pi,360); phi(end) = []; %since closed curve

x = (5 + 0.5*sin(20*phi)).*cos(phi);
y = (5+0.5*sin(20*phi).*cos(phi);
 
ds2 = (1/360)^2;
 
for i = 1:2e5
lengths = sqrt( (x-x(r)).^2 + (y-y(r)).^2 );

Tx=(1/10)/ds2*(x(r) -2*x +x(l) - x0*(((x(r)-x)/lengths)-((x-x(l))/lengths(l))     )  );

%tension term

Bx = 1/ds2^2*(x(r1) - 2*x(r) + x -2(x(r) -2*x + x(l)) + x -2*x(l) + x(l1) ); %bending term

x = x + 1/(1e6)*(Tx); % - Bx); 
% Euler forward step

end

目前,代码运行,但在最后一行,如果我将 Bx 项反注释,程序将无法运行。似乎我的 Bx 与离散化中的匹配,但显然不匹配。

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)