Skip to content

Commit

Permalink
[shockwaves] new function sigmaSonic: sigma at downstream sonic flow
Browse files Browse the repository at this point in the history
  • Loading branch information
jgressier committed Jun 13, 2014
1 parent ca3ee13 commit 581c46f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
aero
aero
----

Python packages for compressible flow computations
Expand Down
14 changes: 11 additions & 3 deletions aero/ShockWave.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,19 @@ def local_f(sig):
return deflection_Mach_sigma(Mach, sig, gamma)
return IterativeSolve.secant_solve(local_f, deflection, degree.asin(1./Mach)+deflection)

def sigmamax_Mach(Mach, gamma=1.4):
M2 = Mach*Mach
def sigmaMax(Mach, gamma=1.4):
" computes the MAXIMUM shock angle (always subsonic downstream flow)
M2 = np.square(Mach)
ka = (M2-1.)*(1.+.5*(gamma-1.)*M2)
kb = .25*((gamma+1.)*M2-(3.-gamma))*M2 + 1.
return degree.atan(math.sqrt((kb+math.sqrt(kb**2+ka))/ka))
return degree.atan(np.sqrt((kb+np.sqrt(kb**2+ka))/ka))

def sigmaSonic(Mach, gamma=1.4):
" computes the shock angle for a downstream SONIC Mach number
M2 = np.square(Mach)
ka = gamma-3+M2*(gamma+1)
kb = (gamma+1)*(np.square(M2-3)+gamma*np.square(M2+1))
return degree.asin(np.sqrt((ka+np.sqrt(kb))/(4*gamma*M2)))

# --- CONICAL SHOCK WAVE ---

Expand Down

0 comments on commit 581c46f

Please sign in to comment.