Example - 15 - Apollo-AS-201 - Earth

[1]:
from AMAT.planet import Planet
from AMAT.vehicle import Vehicle
[2]:
import numpy as np
import matplotlib.pyplot as plt

This notebook simulates the atmospheric entry of the Apollo AS-201 suborbital flight test. https://en.wikipedia.org/wiki/AS-201

[3]:
# Set up the planet and atmosphere model.
planet=Planet("EARTH")
planet.loadAtmosphereModel('../atmdata/Earth/earth-gram-avg.dat', 0 , 1 ,2, 3)
[4]:
# Set up the vehicle
vehicle=Vehicle('Apollo-AS-201', 5400.0, 400.0, 0.3, 12.0, 0.0, 3.0, planet)
[5]:
# Set up entry parameters
vehicle.setInitialState(120.0,0.0,0.0,7.67,0.0,-9.03,0.0,0.0)
[6]:
# Set up solver
vehicle.setSolverParams(1E-6)
[7]:
# Propogate vehicle entry trajectory
vehicle.propogateEntry (2400.0,0.1,60.0)
# bank angle = 60 deg arbitrary, actual profile will give more realistic results
[8]:
# import rcParams to set figure font type
from matplotlib import rcParams
[9]:
fig = plt.figure(figsize=(12,8))
plt.rc('font',family='Times New Roman')
params = {'mathtext.default': 'regular' }
plt.rcParams.update(params)

plt.subplot(2, 2, 1)
plt.plot(vehicle.v_kmsc, vehicle.h_kmc, 'k-', linewidth=2.0)
plt.xlabel('Speed, km/s',fontsize=14)
plt.ylabel('Altitude, km', fontsize=14)
ax=plt.gca()
ax.tick_params(direction='in')
ax.yaxis.set_ticks_position('both')
ax.xaxis.set_ticks_position('both')
ax.tick_params(axis='x',labelsize=14)
ax.tick_params(axis='y',labelsize=14)

plt.subplot(2, 2, 2)
plt.plot(vehicle.acc_net_g, vehicle.h_kmc, 'b-', linewidth=2.0)
plt.xlabel('Deceleration, Earth g',fontsize=14)
plt.ylabel('Altitude, km', fontsize=14)
ax=plt.gca()
ax.tick_params(direction='in')
ax.yaxis.set_ticks_position('both')
ax.xaxis.set_ticks_position('both')
ax.tick_params(axis='x',labelsize=14)
ax.tick_params(axis='y',labelsize=14)

plt.subplot(2, 2, 3)
plt.plot(vehicle.q_stag_total, vehicle.h_kmc,'r-', linewidth=2.0)
plt.xlabel('Stagnation point heat-rate, '+r'$W/cm^2$',fontsize=14)
plt.ylabel('Altitude, km', fontsize=14)
ax=plt.gca()
ax.tick_params(direction='in')
ax.yaxis.set_ticks_position('both')
ax.xaxis.set_ticks_position('both')
ax.tick_params(axis='x',labelsize=14)
ax.tick_params(axis='y',labelsize=14)


plt.subplot(2, 2, 4)
plt.plot(vehicle.heatload/1.0E3, vehicle.h_kmc, 'm-', linewidth=2.0)
plt.xlabel('Stagnation point heat-load, '+r'$kJ/cm^2$',fontsize=14)
plt.ylabel('Altitude, km', fontsize=14)
ax=plt.gca()
ax.tick_params(direction='in')
ax.yaxis.set_ticks_position('both')
ax.xaxis.set_ticks_position('both')
ax.tick_params(axis='x',labelsize=14)
ax.tick_params(axis='y',labelsize=14)

plt.savefig('../plots/apollo-as-201-earth.png',bbox_inches='tight')
plt.savefig('../plots/apollo-as-201-earth.pdf', dpi=300,bbox_inches='tight')
plt.savefig('../plots/apollo-as-201-earth.eps', dpi=300,bbox_inches='tight')

plt.show()
../_images/examples_example-15-apollo-as-201-earth_10_0.png
[ ]: