Ordinary differential equation - pratical problem
Ältere Kommentare anzeigen
Hello,
I have a single equation of the form: u'=a*u^2+b*u^1.5+c*u+d. I am trying to solve it in Matlab but it does not find the solution. The problem is a body falling down. The body is under the effect of four forces: 1) weight (m*g) 2) flow in opposite direction of the weight (0.5*da*A*U0^2) 3) drag force (0.5*da*C_d*A*u^2), which would change verse depending on flow direction 4) acceleration (m*u') u(t=0)=0;
The C_d changes with velocity (relationship from the sphere in free flow C_d = 21.12/Reynolds+6.3/sqrt(Reynolds)+.25; % drag coefficient)
I coded this problem, but I can't get it to give a result, unless I fix C_d to a value. Would you be able to give a help, please?
da = 1.161; %density of air
g = 9.81; % Gravitational acceleration
d =1E-6*100; % characteristic length of the body
m = 1000*.957251*d.^3.09275; %Mass of the the body
A = 3.3108*d.^2.21672; %Surface area of the body
u_flow = .5; % Velocity air flow
syms u(t) c_D Re_ver
Re_ver = da*u(t)*d/1.8E-5; % Reynolds number
c_D = 21.12/Re_ver+6.3/sqrt(Re_ver)+.25; % drag coefficient;
a = m;
b = -.5*da*A*c_D;
c = m*g-.5*da*u_flow^2*A;
if c<0
c = -c;
end
u(t) = dsolve(a*diff(u,t) == b*u^2+c,u(0)==0);
t = linspace(0,10,500);
figure, plot(t,double(u(t)))
I am using Matlab R2014a
Thanks Antonio
8 Kommentare
John D'Errico
am 9 Jul. 2016
Bearbeitet: John D'Errico
am 9 Jul. 2016
Why do you presume an analytical solution is there to be found in that case? You may need to use numerical tools.
Star Strider
am 9 Jul. 2016
I would use the numeric ODE solvers, probably ode45, instead of the Symbolic math Toolbox.
mortain
am 10 Jul. 2016
mortain
am 10 Jul. 2016
Walter Roberson
am 11 Jul. 2016
I ran it through Maple, but I gave up on it after it had been computing the differential equation for several hours.
The Maple setup would be
Q := v->convert(v,rational);
da := Q(1.161);
g := Q(9.81);
d := 100*Q(0.1e-5);
m := 1000*Q(.957251)*d^Q(3.09275);
A := Q(3.3108)*d^Q(2.21672);
u_flow := Q(.5);
Re_ver := da*u(t)*d/Q(0.18e-4);
c_D := Q(21.12)/Re_ver+Q(6.3)/sqrt(Re_ver)+Q(.25);
a := m;
b := Q(-.5)*da*A*c_D;
c := m*g-Q(.5)*da*u_flow^2*A;
ut := dsolve({a*(diff(u(t), t)) = b*u(t)^2+c, u(0) = 0});
Raising values to fractional powers like 3.09275 often takes a lot of computation symbolically, as it would typically end up checking the 4000 complex roots of 3629/4000...
mortain
am 12 Jul. 2016
Karan Gill
am 13 Jul. 2016
In the ODE a*u' = b*u^2+c , b has a term 1/sqrt(u). My guess is that this term complicates the calculation. The ODE is of the form:
C*u' = u^2(C + C/u + C/sqrt(C*u)) + C
|----'b' term-------|
where C represents the constants. I'm afraid I don't see how b = constant/u. Could you point out where I misunderstand?
Walter Roberson
am 13 Jul. 2016
At your initial condition, u(0) = 0, your Reynold's number is 0. That is giving you a division by 0 for your drag coefficient, which is giving a singularity right from the start, which is preventing any resolution of the system.
I am not familiar with fluid dynamics, but when I look at various material it appears to me that the equation you are using might perhaps not apply at very low velocities.
Antworten (0)
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!