# calculation for drag coefficient
v = 600
c = 343 # Standard atmospheric pressure
Mach = v / c
print(Mach)
if Mach < 0.5:
print("Cd = 0.384") # subsonic
elif Mach < 1.4:
Cd = 0.6396 + 0.5974 * (Mach - 1) - 0.1618 * (Mach - 1) ** 2 - 0.7212 * (Mach - 1) ** 3 # transonic
print("Cd =", Cd)
else:
Cd = 0.7624 + 0.2398 * ((Mach ** -1) - 1 / 2.75) - 0.475 * ((Mach ** -1) - 1 / 2.75) ** 2 # supersonic
print("Cd =", Cd)
低速冲击研究通常使用恒定的阻力系数。但在较高速度下,阻力系数高度依赖于马赫数,尤其是在跨音速区域。