Sie sind auf Seite 1von 5

ME572 HW11

Alex Ames

May 1, 2017

7.10

a) With T0 = 300 K, p4 /p1 = 5.0, and 1 = 4 = 1.4, a1 = a4 = RT0 = 347 m s1

p4 p2 ( 1)(p2 /p1 1)

= 1 p
p1 p1 2[2 + ( + 1)(p2 /p1 1)]

Solving numerically, p2 /p1 = 2.128

b)
s
+ 1 p2
!
Ms = 1 + 1 = 1.402
2 p1
s
MR Ms 2( 1)
= 2 1+ (Ms2 1)( + Ms2 )
2
MR 1 Ms 1 ( + 1) 2

Again solving numerically, MR = 1.352. Then,

p5 2 MR2 1
= = 1.971
p2 +1 +1

p2 p1
c) p3 = p2 , so p3 /p4 = p2 /p4 . Thus, p3 /p4 = p1 p4 = 0.4256

1
Shock x-t diagram
0.03

0.02
t [s]

0.01

Shock
Contact surface
Expansion fan
0.00
-3 0 3 6 9
x[m]
Figure 1:

7.11
A shock wave propagates into air in a shock tube with driver and driven section lengths of 3 and
9 meters, respectively.


Shock wave With a1 = RT0 = 347 m s1 , and W = Ms a1 = 487 m s1 , the shock wave
reflects at t reflect = L driven /W = 18.5 ms.

Contact surface The bulk velocity of the shocked gas is u2 = u3 = u p , with


! 2 1/2
a1 p2 +1 = 199 m s1
up = 1 p2 + 1
p1
p1 +1

Reflected shock The shock-processed gas reaches temperature T2 :

1 + 1
   2 
M 2 M 21
2 s 1 s
T2 = T0 = 377 K
Ms 1 + 1
 2 
2
2

Then, a2 = RT2 = 389 m s1 , and u5 = MR a2 = 527 m s1 . The reflected wave speed in the
laboratory frame is W R = u5 u p = 327 m s1

2
Expansion fan The properties at the tail of the expansion fan are
! 1

p3
T3 = T4 = 235 K
p4
a3 = RT3 = 307 m s1
p

The bulk velocity u and sound speed a vary throughout the fan. In the simple region, the
a4 to u3 a3 , with corresponding Riemann invariants J = u 1 .
1 2a
x t slopes range from 1
In the nonsimple region, the C+ characteristics have Riemann invariants J+ = J , and nodal
properties at the intersections of left and right-running characteristics are given by

1
a= (J+ J )
4
1
u = (J+ + J )
2
The nodal slopes of the corresponding characteristics are given by

1
C = arctan
ua

The characteristic lines and intersections are calculated by approximating the slope of each inter-
nodal line by the average of the slopes at its endpoints, then iterating over the intersections of
each characteristic line using simple algebra and complicated iteration schemes. The resulting
wave is plotted in Figure 1.

3
Listing 1: Plot generation code
1 using Plots, Roots, LaTeXStrings
2 import Plots.pdf
3 cd(dirname(@__FILE__))
4
5 # Geometry
6 L_driver = 3 # m
7 L_driven = 9 # m
8
9 # Initial conditions & gas properties
10 T0 = 300 # K
11 P4P1 = 5
12 g = 1.4
13 R = 287 # J/kg-K
14
15 # Initialize vars
16 const u = zeros(5)
17 const a = zeros(5)
18 const T = T0*ones(5)
19
20 # Problem 10 ===================================================================
21 # 10a)
22 P2P1 = fzero(pr -> pr*(1-(g-1)*(pr-1)/sqrt(2*g*(2*g+(g+1)*(pr-1))))^(-2*g/(g-1)) - P4P1, 2.0)
23
24 # 10b)
25 Ms = sqrt((g+1)/(2*g)*(P2P1 - 1) + 1)
26 Mr = fzero(Mr -> Ms/(Ms^2-1)*sqrt(1 + 2*(g-1)*(Ms^2-1)*(g+1/Ms^2)/(g+1)^2)-Mr/(Mr^2-1), Ms)
27 P5P2 = 2*g*Mr^2/(g+1) - (g-1)/(g+1)
28
29 # 10c)
30 P3P4 = P2P1/P4P1
31
32 # Problem 11: shock waves ======================================================
33 # Incident shock wave
34 a[1] = sqrt(g*R*T0)
35 W = Ms*a[1] # Shock wave speed
36 t_reflect = L_driven/W # s
37
38 # Contact surface propagates at u_p
39 u_p = a[1]/g*(P2P1 - 1)*sqrt((2*g/(g+1))/(P2P1 + (g-1)/(g+1)))
40 u[2:3] = u_p
41
42 # Reflected shock wave will eventually interact with contact surface
43 T2T1 = (1+(g-1)/2*Ms^2)*(2g/(g-1)*Ms^2 - 1)/(Ms^2*(2g/(g-1) + (g-1)/2))
44 T[2] = T2T1*T0 # K
45 a[2] = sqrt(g*R*T[2]) # m/s
46 u[5] = Mr*a[2] # m/s
47 Wr = u[5] - u_p # m/s
48 x_r_intersect = L_driven + t_reflect*Wr # Pseudo-intersection loc. of ref. wave
49 # with x = 0 (for plotting purposes)
50 t_intersect = x_r_intersect/(u_p + Wr)
51
52 x_shock = [0., 9., u_p*t_intersect]
53 t_shock = [0., t_reflect, t_intersect]
54 p = plot(x_shock,t_shock,color=:black,xlim=(-L_driver,L_driven),width=2,
55 xlab=L"x \, [m]", ylab=L"t \, [s]", lab="Shock",title="Shock x-t diagram")
56
57 x_contact = [0., t_intersect*u_p]
58 t_contact = [0., t_intersect]
59 plot!(x_contact,t_contact,style=:dot,lab="Contact surface",color=:red)
60
61 # Problem 11: reflected expansion fan ==========================================
62 n_r = 16 # Number of rarefaction waves
63 n_pts = div(n_r^2 + n_r, 2) # Number of intersection points
64 const xr = zeros(n_r + 2, n_r) # Rarefaction fan x-locations
65 const tr = copy(xr) # Rarefaction fan t-locations
66 slopes = zeros(n_r + 1, n_r) # Slopes for expansion waves
67 interc = copy(slopes) # Intercepts for expansion waves
68
69 a[4] = a[1]
70 T[3] = T[4]*P3P4^((g-1)/g)
71 a[3] = sqrt(g*R*T[3])
72
73 # Simple region ----------------------------------------------------------------
74 slopes[1,:] = linspace(-1/a[4], 1/(u[3]-a[3]), n_r)
75 ur = 2/(g+1)*(a[4] + 1./slopes[1,:])

4
76 ar = a[4] - ur*(g-1)/2
77 Jm = ur - 2ar/(g-1)
78
79 # Nonsimple region -------------------------------------------------------------
80 Jp = -Jm
81 for i = 2:n_r
82 append!(ur, 0.50*(Jp[i] + Jm[i:n_r]))
83 append!(ar, 0.25*(Jp[i] - Jm[i:n_r])*(g-1))
84 end
85 cp = atan(1./(ur + ar))
86 cm = atan(1./(ur - ar))
87
88 # Calculate slopes -------------------------------------------------------------
89 meanslope(c1,c2) = tan(0.5*(c1 + c2))
90 kp = [1, 2]
91 for j = 1:n_r
92 if j != 1 # Calculate C- characteristics in nonsimple region
93 km = [j, j + n_r - 1]
94 for i = 2:j
95 slopes[i, j] = meanslope(cm[km[1]],cm[km[2]])
96 diff = km[2] - km[1]
97 km[1] = km[2]
98 km[2] += diff - 1
99 end
100 end
101 if j != n_r # Calculate C+ characteristics in nonsimple region
102 for i = j+1 : n_r
103 slopes[i,j] = meanslope(cp[kp[1]],cp[kp[2]])
104 kp += (i == n_r ? 2 : 1)
105 end
106 end
107 # Calculate C+ characteristics downstream of nonsimple region
108 slopes[n_r+1,j] = cp[j*n_r - div((j-1)^2 + j - 1, 2)]
109 end
110
111 # Calculate interactions -------------------------------------------------------
112 for j = 1:n_r # iterate over waves
113 for i = j:n_r+1 # iterate over intersection points
114 interc[i,j] = tr[i,j] - slopes[i,j]*xr[i,j]
115 if i == j
116 xr[i+1,j] = -L_driver
117 tr[i+1,j] = tr[i,j] + (-L_driver - xr[i,j])*slopes[i,j]
118 elseif i <= n_r
119 interc[j,i] = tr[j,i] - slopes[j,i]*xr[j,i]
120 xr[i+1,j]= (interc[j,i] - interc[i,j])/(slopes[i,j] - slopes[j,i])
121 xr[j+1,i] = xr[i+1,j]
122 tr[i+1,j] = slopes[i,j]*xr[i+1,j] + interc[i,j]
123 tr[j+1,i] = tr[i+1,j]
124 else
125 xr[i+1,j] = 0.
126 tr[i+1,j] = interc[i,j]
127 end
128 end
129 end
130
131 # Plot resulting expansion fan -------------------------------------------------
132 for j = 1:n_r
133 if j == 1
134 plot!(xr[:,j],tr[:,j],lab="Expansion fan",w=1,color=:blue)
135 elseif j == n_r
136 plot!(xr[:,j],tr[:,j],primary=false,w=1,color=:blue)
137 else
138 plot!(xr[:,j],tr[:,j],primary=false,w=0.5,color=:blue)
139 end
140 end; p
141
142 pdf("x-t")

Das könnte Ihnen auch gefallen