def main(output='flutter-velocity-example.pdf'): """ >>> import io >>> fobj = io.BytesIO() >>> main(fobj) >>> assert len(fobj.getvalue()) > 0 >>> assert fobj.getvalue()[:4] == b'%PDF' """ zs = np.linspace(0, 20000, 200) ps, ts, ss = model_atmosphere(zs) rhos = (ps/1000) / (0.2869 * (ts + 273.1)) vs_t = flutter_velocity_transonic(ps, ss, 14.02, 7, 8.59, 0.5) vs_s1 = flutter_velocity_supersonic(rhos, 5026, 11671, 0.0923, 0.0859, 0.0284, 0.0040, 4.3) vs_s2 = flutter_velocity_supersonic(rhos, 5026, 11671, 0.0923, 0.0859, 0.0284, 0.0040, 3) vs_s3 = flutter_velocity_supersonic(rhos, 5026, 11671, 0.0923, 0.0859, 0.0284, 0.0040, 2) plt.figure() #plt.plot(zs * 1e-3, vs_t, 'r', label="transonic flutter velocity") plt.plot(zs*1e-3, vs_t/343.2, 'c', label="Theodorson") plt.plot(zs*1e-3, vs_s1/343.2, 'g', label="Mach 4.3") plt.plot(zs*1e-3, vs_s2/343.2, 'r', label="Mach 3") plt.plot(zs*1e-3, vs_s3/343.2, 'b', label="Mach 2") plt.title('Flutter velocity vs altitude, Core/Booster fin') plt.xlabel('Altitude [km]') plt.ylabel('Flutter Velocity [Mach]') plt.legend() plt.savefig(output, format='PDF')
def main(output="flutter-velocity-example.pdf"): """ >>> import io >>> fobj = io.BytesIO() >>> main(fobj) >>> assert len(fobj.getvalue()) > 0 >>> assert fobj.getvalue()[:4] == b'%PDF' """ zs = np.linspace(0, 20000, 200) ps, ts, ss = model_atmosphere(zs) rhos = (ps / 1000) / (0.2869 * (ts + 273.1)) vs_t = flutter_velocity_transonic(ps, ss, 20, 10, 10, 0.2) vs_s = flutter_velocity_supersonic(rhos, 380, 104, 1, 0.3, 0.0313, 0.0855, 3) plt.figure() plt.plot(zs * 1e-3, vs_t, "r", label="transonic flutter velocity") plt.plot(zs * 1e-3, vs_s, "g", label="supersonic flutter velocity, Mach 3") plt.title("Flutter velocity vs altitude") plt.xlabel("Altitude [km]") plt.ylabel("Flutter velocity [m/s]") plt.legend() plt.savefig(output, format="PDF")
def main(output='flutter-velocity-example.pdf'): """ >>> import io >>> fobj = io.BytesIO() >>> main(fobj) >>> assert len(fobj.getvalue()) > 0 >>> assert fobj.getvalue()[:4] == b'%PDF' """ zs = np.linspace(0, 20000, 200) ps, ts, ss = model_atmosphere(zs) rhos = (ps / 1000) / (0.2869 * (ts + 273.1)) vs_t = flutter_velocity_transonic(ps, ss, 20, 10, 10, 0.2) vs_s = flutter_velocity_supersonic(rhos, 380, 104, 1, 0.3, 0.0313, 0.0855, 3) plt.figure() plt.plot(zs * 1e-3, vs_t, 'r', label="transonic flutter velocity") plt.plot(zs * 1e-3, vs_s, 'g', label="supersonic flutter velocity, Mach 3") plt.title('Flutter velocity vs altitude') plt.xlabel('Altitude [km]') plt.ylabel('Flutter velocity [m/s]') plt.legend() plt.savefig(output, format='PDF')