non-linear coupled second order ODE with matlab

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 件のコメント

darova
darova 2019 年 7 月 1 日
I tried bvp4c, but didn't get a result. Also MATLAB wants 4 boundary conditions
I did all i can, im so sorry (
zakaria azdad
zakaria azdad 2019 年 7 月 2 日
Hi Thanks for the quick response,
The fourth boundary condition is how can I add it to the attached file?
thanks again!
Torsten
Torsten 2019 年 7 月 2 日
編集済み: Torsten 2019 年 7 月 2 日
function res = bc4(ul, ur)
res = [ur(1)
ur(2)
ur(3)
ul(2)];
end
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 日

0 投票

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 件のコメント

zakaria azdad
zakaria azdad 2019 年 7 月 8 日
編集済み: zakaria azdad 2019 年 7 月 8 日
Hi, sorry to comeback on this point.
But how can I specify a boundary condition of this form :
as and
than I would like to evaluate
I am trying to reproduce the results of this paper (see attachement)
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 件)

カテゴリ

質問済み:

2019 年 7 月 1 日

編集済み:

2019 年 7 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by