Cone Notes
Cone Notes
(2) (3)
We can employ a numerical solver, such as the ode15s function available in Matlab, to solve the Taylor-Maccoll ODE for vr (). In this case, one can determine vr and v = vr immediately behind the shock as a function of M using the oblique shock relations. Note that = s and = in the --M oblique shock relation. The values immediately behind the shock form one boundary condition for our ODE, while ow tangency at the cone surface provides another boundary condition. We can numerically solve for the solution to vr () by marching the solution from the initial conditions at s until we reach c where v = vr = 0. Using this
1 See
sh
oc
s cone
ce urfa
Ryerson University
AE 8121
High-Speed Aerodynamics
Winter 2009
Solution between cone ! =45 to shock ! =69.4 at M =2 c s " 1.2 p/p2 #/#2 1.15 T/T2 M/M2 1.1
1.05
0.95
0.9
0.85 45
50
55
Angle ! [deg] c
60
65
Figure 2: Flow solution for cone normalized relative to ow properties immediately behind the shock.
technique one can indirectly determine the half cone angle c that produces a given shock angle s. Matlabs family of ODE solvers (eg. ode15s) can determine the solution y(t) that satises the ODE y = f (t, y) by marching forward in t from the initial value y(t0 ). The ODE f (t, y) can be a scalar ordinary dierential equation or a system of ordinary dierential equations. In the case of the Taylor-Maccoll equation it is convenient to represent the ODE as a system of ODE with solution vector [ ] [ ] y v y= 1 = r (4) y2 vr such that the ODE can be represented as the following system of dierential equations
[ y = f (, y) =
1 2
y2
2 2 2 y2 y1 1 (1y1 y2 )(2y1 +y2 cot()) 2 2 2 2 (1y1 y2 )y2
]
(5)
Note that the new ODE, y , can be expressed entirely in terms of a given y and where the second vector component is determined by rearranging Eq. 1 for vr . Using the initial conditions behind the shock y(s ), we can use ode15s2 to march the initial solution from s to 0, stopping the solution early if we detect y2 = vr = v = 0. Using the isentropic relations, one can determine the solution to the ow properties behind the shock, as illustrated for the case where c = 45 and M = 2.0 in Fig. 2. The solution for shock angle and cone surface Mach number as a function of half cone angle appears in Fig. 3 and 4, respectively, for a range of M. The source code used to produce these gures follows.
2 There are several ODE solvers with diering accuracy and speed available. In this case, ode15s quickly solves a relatively sti problem.
2 of 6
Ryerson University
AE 8121
High-Speed Aerodynamics
Winter 2009
Right Circular Cone at Zero Angle of Attack !=1.4 90 M#=1.01 1.05 1.1 1.15 1.25 3 4 10 6 20 #
80
70
1.5
50
40
30
20
10
10
20
40
50
60
0.8
0.6
0.4
0.2
0 M#=1.01
0.2
0.4
0.6
0.8
10
20
40
50
60
3 of 6
Ryerson University
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
AE 8121
High-Speed Aerodynamics
Winter 2009
function [thetac,Mc,sol]=solvecone(thetas,Minf,gamma) % Solves the right circular cone at zero angle of attack in supersonic flow % thetas - shock angle [degrees] % Minf - upstream Mach number % gamma - ratio of specific heats % Convert to radians thetasr=thetas*pi/180.0; if (thetasr<=asin(1/Minf)) thetac=0.0; Mc=Minf; return; end % Calculate initial flow deflection (delta) just after shock... delta=thetabetam(thetasr,Minf,gamma); Mn1=Minf*sin(thetasr); Mn2=sqrt((Mn1^2+(2/(gamma-1)))/(2*gamma/(gamma-1)*Mn1^2-1)); M2=Mn2/(sin(thetasr-delta)); % All values are non-dimensionalized! % Calculate the non-dimensional velocity just after the oblique shock V0=(1+2/((gamma-1)*M2^2))^(-0.5); % Calculate velocity components in spherical coordinates Vr0=V0*cos(thetasr-delta); Vtheta0=-V0*sin(thetasr-delta); % Calculate initial values for derivatives dVr0=Vtheta0; % Assemble initial value for ODE solver y0=[Vr0;dVr0]; % Set up ODE solver % Quit integration when vtheta=0 % See: coneevent.m % Set relative error tolerance small enough to handle low M options=odeset(Events,@coneevent,RelTol,1e-5); % Solve by marching solution away from shock until either 0 degrees or flow % flow tangency reached as indicated by y(2)==0. % See cone.m [sol]=ode15s(@cone,[thetasr 1e-10],y0,options,gamma); % Check if we have a solution, as ode15s may not converge for some values. [n,m]=size(sol.ye); thetac=0.0; Mc=Minf; % If ODE solver worked, calculate the angle and Mach number at the cone. if (n>0 & m>0 & abs(sol.ye(2))<1e-10) thetac=sol.xe*180.0/pi; Vc2=sol.ye(1)^2+sol.ye(2)^2; Mc=((1.0/Vc2-1)*(gamma-1)/2)^-0.5; end Figure 5: Matlab source code for solvecone.m
4 of 6
Ryerson University
1 2 3 4 5 6 7 8
AE 8121
High-Speed Aerodynamics
Winter 2009
function [dy]=cone2(theta,y,gamma) % y is a vector containing vr, vr % Governing equations are continuity, irrotationality, & Eulers equation. dy=zeros(2,1); dy(1)=y(2); dy(2)=(y(2)^2*y(1)-(gamma-1)/2*(1-y(1)^2-y(2)^2)*(2*y(1)+y(2)*cot(theta)))... /((gamma-1)/2*(1-y(1)^2-y(2)^2)-y(2)^2); Figure 6: Matlab source code for cone.m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
function [value,isterminal,direction]=coneevent(theta,y,gamma) % Check cone solution for point where vtheta=0 % theta - current angle % y - current solution vector % gamma - ratio of specific heats value=zeros(2,1); isterminal=zeros(2,1); direction=zeros(2,1); %Quit if Vr goes negative (which shouldnt happen!) value(1)=1.0; if (y(1)<0.0) value(1)=0.0; end isterminal(1)=1; direction(1)=0; %Quit if Vtheta goes positive (which occurs at the wall) value(2)=1.0; if (y(2)>0.0) value(2)=0.0; end isterminal(2)=1; direction(2)=0; Figure 7: Matlab source code for coneevent.m
1 2 3 4 5 6 7 8 9 10
function [theta]=thetabetam(beta,M,gamma) % Return theta for beta-theta-M relationship for oblique shocks % beta - shock angle in radians % M - upstream Mach number % gamma - ratio of specific heat %Cut off at Mach wave angle if (beta<=asin(1/M)) theta=0; return; end theta=atan(2*cot(beta)*((M*sin(beta))^2-1)/(M^2*(gamma+cos(2*beta))+2)); Figure 8: Matlab source code for thetabetam.m
5 of 6