필터 지우기
필터 지우기

Trying to solve a system of 2 ordinary differential equations with boundary conditions

조회 수: 3 (최근 30일)
Hi there, I am trying to solve a system of ordinary differential equations with boundary conditions. These equations are part of my thesis and govern thick cylinders under internal pressure. I have checked my equations with the general theroy as suggested by Gabriel Lame for thick walled cylinders. The codes simplify as follows:
A,B,C and D are the functions of E and poisson's ratio.
the boundary conditions are t=1, y=0 and at t=R, y=-P. (As in the case of cylinder with internal pressure only)
I have tried to solve it in matlab but get an [ empty sym ] in return. I have limited experience with matlab so would appreciate any help possible.
My code:
syms E nu a11= (1/E); a12= (-nu/E); a33= (1/E); A= (a12)/(a11+a12); B= ((a33)-((2*a12^2)/(a11+a12))); C= (a11)/(a11^2-a12^2); D= (2*a12+a11)/(a11+a12);
syms x(t) y(t) eqns = [diff(x,t)==A*(x/t)+B*y, diff(y,t)==-C*(x/t^2)-D*y]; cond = [y(0) == 0, y(2)==1]; withSimplifications = dsolve(eqns, cond)

답변 (4개)

Ketav Majumdar
Ketav Majumdar 2016년 11월 21일
Correction this is my code so far
if true
%syms E nu
a11= (1/E);
a12= (-nu/E);
a33= (1/E);
A= (a12)/(a11+a12);
B= ((a33)-((2*a12^2)/(a11+a12)));
C= (a11)/(a11^2-a12^2);
D= (2*a12+a11)/(a11+a12);
syms x(t) y(t) eqns = [diff(x,t)==A*(x/t)+B*y, diff(y,t)==-C*(x/t^2)-D*y]; cond = [y(0) == 0, y(2)==1]; withSimplifications = dsolve(eqns, cond)
end

Torsten
Torsten 2016년 11월 22일
I doubt that your system can be solved analytically using dsolve.
Try a numerical solution with bvp4c.
If you start at t=0, problems will arise because t is in the denominator in both equations.
Furthermore, are you sure that you don't have to prescribe any boundary condition for x ?
Best wishes
Torsten.
  댓글 수: 1
Ketav Majumdar
Ketav Majumdar 2016년 11월 23일
well I dont have any boundary conditions for x as thats the radial displacement of the cylinder. Ill give numerical values a shot

댓글을 달려면 로그인하십시오.


Ketav Majumdar
Ketav Majumdar 2016년 11월 23일
So if managed to get something.but i get
struct with fields:
y: [1×1 sym]
x: [1×1 sym]
This is my code so far:
code:
%Mechanical Properties of Material
E=200e9;
nu=0.3;
%Constants A,B,C,D in the Equations
syms E nu
a11= (1/E);
a12= (-nu/E);
a33= (1/E);
A= (a12)/(a11+a12);
B= ((a33)-((2*a12^2)/(a11+a12)));
C= (a11)/(a11^2-a12^2);
D= (2*a12+a11)/(a11+a12);
%Defining the System of 2ODES
syms x(t) y(t)
t=1;
eqns = [diff(x,t)==A*(x/t)+B*y, diff(y,t)==-C*(x/t^2)-D*y];
cond = [y(0) == 0, y(2)==1];
withSimplifications = dsolve(eqns, cond)
withoutSimplifications = dsolve(eqns, cond, 'IgnoreAnalyticConstraints', false)
end
how do I get the numerical values?

Ketav Majumdar
Ketav Majumdar 2016년 11월 23일
So i made changes and i have some solutions but i can't get a plot for y against t. I'm not sure how to get this solved with ode45. any suggestions?
%Mechanical Properties of Material
E=200e9;
nu=0.3;
%Constants A,B,C,D in the Equations
a11= (1/E);
a12= (-nu/E);
a33= (1/E);
A= (a12)/(a11+a12);
B= ((a33)-((2*a12^2)/(a11+a12)));
C= (a11)/(a11^2-a12^2);
D= (2*a12+a11)/(a11+a12);
%Defining the System of 2ODES
syms x(t) y(t)
t=1;
eqns = [diff(x,t)==A.*(x/t)+B*y, diff(y,t)==-C.*(x/t^2)-D*y];
cond = [y(0) == 0, y(2)==1];
[ySol(t) xSol(t)] = dsolve(eqns)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by