non-linear coupled second order ODE with matlab

3 ビュー (過去 30 日間)
zakaria azdad
zakaria azdad 2019 年 7 月 1 日
編集済み: zakaria azdad 2019 年 7 月 8 日
Dear All,
In attempt to compare an asymptotic solution to the exact solution of Reissner theory of elasticity, I will need to solve the following coupled equation :
D, A and q are constant and the boundary conditions are of clumped boundary conditions
I would be glad if there are hints to how to implement this in matlab.
Thanks a lot!
  5 件のコメント
zakaria azdad
zakaria azdad 2019 年 7 月 2 日
I get this error...
Error using bvp4c (line 251)
Unable to solve the collocation equations -- a singular Jacobian encountered.
Torsten
Torsten 2019 年 7 月 2 日
You divide by r^2 and r. That means that you have to start solving at r>0.

サインインしてコメントする。

採用された回答

darova
darova 2019 年 7 月 2 日
According to Torsten suggestions
function bvp4c_mathworks
rspan = [0.05 1];
init = zeros(1,4);
solinit = bvpinit(rspan,init);
sol = bvp4c(@ode4,@bc4,solinit);
r = sol.x;
Nr = sol.y(1,:);
b = sol.y(2,:);
plot(r,Nr)
hold on
plot(r,b,'r')
hold off
legend('Nr(r)','\beta(r)')
end
function du = ode4(r,u)
Nr = u(1);
b = u(2); % beta
dNr = u(3); % d(Nr)/dr
db = u(4); % d(beta)/dr
cb = cos(b); % cos(beta)
sb = sin(b); % sin(beta)
A = 0.5;
D = 1.7;
q = 1;
du(1) = dNr;
du(2) = db;
du(3) = -(3*r*dNr + Nr + (1-cb)/A)/r^2;
du(4) = -(r*Nr*sb + r^2*q*cb)/D - db + sb/r;
du(4) = du(4)/r;
end
function res = bc4(u0, ur)
res = [ur(1)-0
ur(2)-0
ur(3)-0
u0(2)-0];
end
Accept my answer please
  3 件のコメント
darova
darova 2019 年 7 月 8 日
You had Nr before, what is u here?
zakaria azdad
zakaria azdad 2019 年 7 月 8 日
The authors (see attachement) define u as and
which is not clear to me who to solve it. Any hint?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by