Problems in solving Taylor-Maccoll Equation via ode45
20 views (last 30 days)
Show older comments
Hello everyone,
For a study project, I have to solve the Taylor-Maccoll Equation that describes the hypersonic filed around a cone.
My textbook provides the system of ODEs in this fashion
The γ and the are constants. Now I have tried to implement the ode45 via writing a function that codes the second members of the system. In particular, I have substituted
I don't know if this make sense, but then I have solved for x and y in this way
This is how I have implemented
function f = TaylorMaccoll(omega, V)
global gamma V_lim
Vr = V(1);
Vomega = V(2);
% a building
tris = ((V_lim*V_lim) - (Vomega*Vomega) - (Vr*Vr));
den = (gamma - 1)*(tris);
rap = (2*Vomega*Vomega)/(den);
a = 1 - rap;
% b building
b = (2*Vomega*Vr)/den;
% Fs building
F1 = Vomega;
F2 = -((Vomega*cotd(omega))+(2*Vr));
Fq = (b/a)*F1 + (1/a)*F2;
f = [F1; Fq];
end
Then, in the main, I have called the ode45 in this way
V0 = [V_inf*cosd(beta_c), epsilon*V_inf*sind(beta_c)];
[omega,V] = ode45(@TaylorMaccol,[beta_c:-0.001:eps],V0);
The stepsize is negative because I have to integrate from the shock angle to the body wall. The problem is that the solution is not stable
I have seen on the internet several other attempts that actually work, but I would like to follow my class and my textbook. I am pretty sure that the error is in the way I implement the ODEs but I have never seen this kind of problem so far. If some one can provide me some help I would be very grateful, also with some hints I don't want the entire code.
13 Comments
Answers (0)
See Also
Categories
Find more on Gamma Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!