CoCalc Shared FilesASYS 631 - Spacecraft Engineering / Exam / ASYS631-Exam.sagews
Author: Jordan Ziegler
Views : 3
########### General Use Constants ###########
mu_E_km  = 3.98601e5; mu_E1 = 1.;   #Mu for Earth in km^3 s^-2 #Mu for Earth in canonical units
mu_S_km  = 1.32715e11; mu_S1 = 1.;  #Mu for Sun in km^3 s^-2 #Mu for Sun in canonical units
R_E_km = 6378.1366;  R_E1 = 1.;      #Earth radius in km #Earth radius in canonical units
pii = RealField(30)(pi);     #Pi to a certain precision
SiderealDay_s = 86164.09054; #Sidereal day in seconds
SiderealYear_s = 365.25636*SiderealDay_s; #Sidereal year in seconds
AU_km = 1.49599e8;           #Astronomical Unit in km
AU_m = 1.49599e11;           #Astronomical Unit in m
c = 299792458;               #Speed of light in m/s
k = 1.38064852e-23;          #Boltzmann constant in SI units
SB = 5.670367e-8;            #Stefan-Boltzmann constant in SI units
def RF(r): #Give me a friggin number
return RealField(30)(r)
return degree*2*pi/360
def kelToCel(kelvin): #Give kelvin, get celsius
return kelvin - 273.15
#############################################



############################################
########### Questions  01  &  02 ###########
############################################
Perigee_alt = 550;                   #Perigee altitude of 550 km (given)
Apogee_alt = 1900;                   #Apogee altitude of 1900 km (given)
a_01 = (Perigee_alt + Apogee_alt + 2*R_E_km)/2;  #The semi-major axis for problem 01
Period_01 = 2*pii*sqrt((a_01^3)/mu_E_km);        #The period from eq. C-63 pg 966
print 'The period is: ', Period_01, 'seconds';
print 'The period is: ', Period_01/60, 'minutes';

mean_motion_02 = 2*pii/Period_01;  #Mean motion
ecc_02 = Apogee_rad/a_01 - 1;      #Eccentricity from equation C-56
Alt_02 = 1050;                     #Altitude in km for problem 2
Mean_anom_02 = Ecc_anom_02 - ecc_02*sin(Ecc_anom_02)
time_02 = Mean_anom_02/mean_motion_02;

print '\nThe eccentric anomaly is:          ', Ecc_anom_02;
print 'The eccentricity is:               ', ecc_02;
print 'The time from perigee to 1050 alt: ', time_02, 'seconds';
print 'The time from perigee to 1050 alt: ', time_02/60, 'minutes';
###########################################

The period is: 6597.8109 seconds The period is: 109.96352 minutes The eccentric anomaly is: 1.30854116791904 The eccentricity is: 0.0887791493842160 The time from perigee to 1050 alt: 1284.0282 seconds The time from perigee to 1050 alt: 21.400470 minutes


############################################
########### Questions  03  -  05 ###########
############################################
factor = 1;                               #Size factor for answering question 5
M_recon_sensor = 125;                     #Mass of the recon sensor in kg
Altitude_35 = 450;                        #Altitude of circular orbit in km
focal_length_35 = 0.95*factor;            #Sensor focal length in meters
diam_aperture_35 = factor*35e-2;          #Aperture diameter in m (given as 35cm)
focal_plane_35 = factor*30e-3;            #Focal plane diameter in m (same as detector size in HW) given as 35mm
PWR_Cnsume_35 = 200;                      #Power consumption in watts

FOV35 = 2*arctan(focal_plane_35/(2*focal_length_35))

wl_1_35 = 0.5e-6;                         #Wavelength 1 in meters (given as 0.5 micrometers)
wl_2_35 = 3.2e-6;                         #Wavelength 2 in meters (given as 3.2 micrometers)
DLR1_35 = 1.22*wl_1_35/diam_aperture_35;  #Diffraction limited resolution for wavelength 1
DLR2_35 = 1.22*wl_2_35/diam_aperture_35;  #Diffraction limited resolution for wavelength 2
DLGSD1_35 = DLR1_35*Altitude_35;          #Diffraction limited ground separation distance for wavelenght 1
DLGSD2_35 = DLR2_35*Altitude_35;          #Diffraction limited ground separation distance for wavelenght 2
print '\nDiffraction limited resolution for wavelenght 1: ', DLR1_35;
print 'Diffraction limited resolution for wavelenght 2: ', DLR2_35;
print 'Diffraction limited ground separation distance for WL 1: ', DLGSD1_35, 'km  =  ', DLGSD1_35*1000, 'meters';
print 'Diffraction limited ground separation distance for WL 2: ', DLGSD2_35, 'km  =  ', DLGSD2_35*1000, 'meters';
############################################

FOV: 0.0315763234716491 rad FOV: 1.8091901 degree Diffraction limited resolution for wavelenght 1: 1.74285714285714e-6 Diffraction limited resolution for wavelenght 2: 0.0000111542857142857 Diffraction limited ground separation distance for WL 1: 0.000784285714285714 km = 0.784285714285714 meters Diffraction limited ground separation distance for WL 2: 0.00501942857142857 km = 5.01942857142857 meters


############################################
########### Questions  06  -  07 ###########
############################################
Wet_mass = 2560;                   #Wet mass of the satellite in kg
Altitude_67 = 430;                 #Satellite altitude in km
V_makeup_per_year = 18.7;          #The annual drag makeup velocity in m/s

Isp_67 = 200;             #The ISP of our thruster in seconds
g = 9.80665;              #Acceleration at Earth's surface in m/s
propellantMass = Wet_mass*(    1 - e^(-V_makeup_total/(Isp_67*g))   );  #From equation 10-14 of SME
print 'Required Propellant Mass: ', propellantMass, 'kg';
print 'Total mass of propellant: ', (11/10)*propellantMass, 'kg';

###################################################

Required Propellant Mass: 232.804737291951 kg Total mass of propellant: 256.085211021146 kg


############################################
########### Questions  08  -  12 ###########
############################################
Td = 92*60;         #Time in daylight in seconds (given as 92 minutes)
Te = 35*60;         #Time in eclipse in seconds (given as 35 minutes)
Pd = 680;           #Power required in daylight in Watts
Pe = 780;           #Power required in eclipse in Watts
#Pe = 0.2*Pd;        #Power required in eclipse in Watts (for problem 11 only)
Xd = 0.85;          #Path efficiency in daylight
Xe = 0.62;          #Path efficiency in eclipse

Psa = ( (Pe*Te/Xe)  +  (Pd*Td/Xd) )/Td;
print 'Power required during daylight to \npower the satellite for the entire orbit:', Psa, 'Watts';

L = 6;                             #Lifetime of the mission in years
EfficOfCell = .185;                #GA achieved efficiency (production) from table 21-13 of SME
S = 1353;                          #Solar constant  W/m^2
Po = EfficOfCell*S;                #Power output (Step 3 of table 21-12)
Id = 0.72;                         #Inherent degradation factor
Pbol = Po*Id*cos(degToRad(23.5));  #Beginning of life Power
Peol = Pbol*Ld;                    #Power end of life from SME 21-9
AreaSA = Psa/Peol;                 #Area required of solar array from SME 21-10
print 'Required solar array area: ', RF(AreaSA);

numBatt = 4;                       #Number of batteries is 4
eff12 = .83;                       #Efficiency given as 83%
busVolt = 13.3;                    #Averge bus voltage
def battCap(DoD): #Give Depth of Discharge, get battery capacity in Ah
return (Pe*Te)/(DoD*numBatt*eff12*busVolt)
print '\nBattery Capacity in Ah for part A: ', battCap(.07)/3600
print 'Battery Capacity in Ah for part B: ', battCap(.18)/3600
print 'Battery Capacity in Ah for part C: ', battCap(.43)/3600
print 'Battery Capacity in Ah for part D: ', battCap(.51)/3600
print 'Battery Capacity in Ah for part E: ', battCap(.68)/3600

###################################################

Power required during daylight to power the satellite for the entire orbit: 1278.61150070126 Watts Required solar array area: 11.214287 Battery Capacity in Ah for part A: 147.205362804602 Battery Capacity in Ah for part B: 57.2465299795674 Battery Capacity in Ah for part C: 23.9636637123770 Battery Capacity in Ah for part D: 20.2046576398473 Battery Capacity in Ah for part E: 15.1534932298855


############################################
########### Question      17     ###########
############################################
emiss = 0.06;              #emissivity
absorp = 0.02;             #absorptivity
S17  = 1358;               #Solar flux for problem 17
Ap = pii*rad17^2;          #Area of surface facing sun

Teq = (absorp*S17/(4*emiss*SB))^(1/4);   #Equilibrium temp from slide 14 of thermal
print 'Equilibrium Temp: ', Teq, 'Kelvin';
print 'Equilibrium Temp: ', kelToCel(Teq), 'Celsius';

Teq1kw = ((S17*Ap*absorp + 1000)/(Ar*emiss*SB))^(1/4);
print 'Equilibrirum Temp with 1kW internal: ', Teq1kw, 'Kelvin';
print 'Equilibrirum Temp with 1kW internal: ', kelToCel(Teq1kw), 'Celsius';
###################################################


Equilibrium Temp: 211.361965493893 Kelvin Equilibrium Temp: -61.7880345061067 Celsius Equilibrirum Temp with 1kW internal: 260.35302 Kelvin Equilibrirum Temp with 1kW internal: -12.796978 Celsius


############################################
########### Question      20     ###########
############################################
f20 = 1e9;            #Frequency given as 1GHz
wl20 = c/f20;         #Wavelength in meters
Dr_20 = 0.3;          #Receive antenna diameter in meters
effR_20 = 0.55;       #Receiver antenna efficiency
Trn = 550;            #Receiver noise temp 550K
PWR_b = 5;            #Broadcast power of 5W
Ll = 1.0;             #Line Loss ratio
Lp = 1.0;             #Pointing Loss ratio
Rd20 = 1.5e6;         #Data rate 1.5 Mbps
Dt_20 = 3;            #Transmit antenna diameter
effT_20 = .62;        #Transmit antenna efficiency
Ttn = 300;            #Transmit noise temperature
EbNo_req = 15.5;      #Eb/No required in dB (includes 6 dB margin)

Rgain = effR_20*(pii*Dr_20*f20/c)^2;  #Antenna gain from slide 24 of comm slides
Tgain = effT_20*(pii*Dt_20*f20/c)^2;  #Antenna gain from slide 24 of comm slides
TgaindB = 20.4 + 20*log(1, 10) + 20*log(Dt_20, 10) + 10*log(effT_20, 10);
RgaindB = 20.4 + 20*log(1, 10) + 20*log(Dr_20, 10) + 10*log(effR_20, 10);
print 'Receiver gain dB: ', RF(RgaindB);
print 'Transmit gain: ', Tgain;
print 'Transmit gain dB: ', RF(TgaindB);
dist = 4842.898e3;                          #Distance in meter
#4842.898e3 for 15.5 dB
#9662e3 for 9.5 dB
Ls = (wl20/(4*pii*dist))^(2);           #Free space loss at distance 'dist'
EbNo = PWR_b*Ll*Tgain*Lp*Ls*Rgain/(k*Trn*Rd20);   #Eb/No from slide 22 of comm slides
print 'EbNo: ', EbNo;
print '10log EbNo: ', 10*log(EbNo, 10);
############################################

Receiver gain: 5.4358009 Receiver gain dB: 7.3460520 Transmit gain: 612.76301 Transmit gain dB: 27.866342 EbNo: 35.481342 10log EbNo: 15.500000


############################################
########### Question      21     ###########
############################################
emiss0 = 0.06;
absrp0 = 0.16;
emissA = 0.9;
absrpA = 0.85;
emissB = 0.9;
absrpB = 0.2;
emissC = 0.8;
absrpC = 0.1;
emissD = 0.04;
absrpD = 0.25;
emissE = 0.6;
absrpE = 0.45;
S21 = 1353;      #Solar constant
Ap21 = 1;        #Area facing the sun 1 m^2
Ar21 = 4;        #Total surface area 4 m^2

Temp21_0 = ((S21*Ap21*absrp0 + 750)/(Ar21*emiss0*SB))^(1/4);
print 'Temp option 0: ', Temp21_0, 'Kelvin';
print 'Temp option 0: ', kelToCel(Temp21_0), 'Celsius';

Temp21_A = ((S21*Ap21*absrpA + 750)/(Ar21*emissA*SB))^(1/4);
print '\nTemp option A: ', Temp21_A, 'Kelvin';
print 'Temp option A: ', kelToCel(Temp21_A), 'Celsius';

Temp21_B = ((S21*Ap21*absrpB + 750)/(Ar21*emissB*SB))^(1/4);
print '\nTemp option B: ', Temp21_B, 'Kelvin';
print 'Temp option B: ', kelToCel(Temp21_B), 'Celsius';

Temp21_C = ((S21*Ap21*absrpC + 750)/(Ar21*emissC*SB))^(1/4);
print '\nTemp option C: ', Temp21_C, 'Kelvin';
print 'Temp option C: ', kelToCel(Temp21_C), 'Celsius';

Temp21_D = ((S21*Ap21*absrpD + 750)/(Ar21*emissD*SB))^(1/4);
print '\nTemp option D: ', Temp21_D, 'Kelvin';
print 'Temp option D: ', kelToCel(Temp21_D), 'Celsius';

Temp21_E = ((S21*Ap21*absrpE + 750)/(Ar21*emissE*SB))^(1/4);
print '\nTemp option E: ', Temp21_E, 'Kelvin';
print 'Temp option E: ', kelToCel(Temp21_E), 'Celsius';
###################################################

Temp option 0: 516.229258192046 Kelvin Temp option 0: 243.079258192046 Celsius Temp option A: 310.608145122272 Kelvin Temp option A: 37.4581451222724 Celsius Temp option B: 265.910492079086 Kelvin Temp option B: -7.23950792091415 Celsius Temp option C: 264.290972726430 Kelvin Temp option C: -8.85902727356961 Celsius Temp option D: 588.503948709270 Kelvin Temp option D: 315.353948709270 Celsius Temp option E: 316.109302977216 Kelvin Temp option E: 42.9593029772158 Celsius


############################################
########### Question      22     ###########
############################################
L22 = 12;              #Mission lifetime in years
eff22A = .22;          #Efficiency of silicon
eff22B = .185;         #Efficiency of GA
eff22C = .18;          #Efficiency of Indium Phosphide
dpyA = .015;           #Degredation per year
dpyB = .0045;          #Degredation per year
dpyC = .002;           #Degredation per year

factorA = 1/(eff22A*(1 - dpyA)^L22);
factorB = 1/(eff22B*(1 - dpyB)^L22);
factorC = 1/(eff22C*(1 - dpyC)^L22);
print 'The factor for A is: ', factorA;
print 'The factor for B is: ', factorB;
print 'The factor for C is: ', factorC;
###################################################

The factor for A is: 5.44932303037809 The factor for B is: 5.70601749945659 The factor for C is: 5.69063852211429


############################################
########### Question      23     ###########
############################################
i23 = 28.5;                #Inclination in degrees
alt23 = 1000;              #Altitude in km
print 'Delta-V for the inclination change: ', RF(deltaV23);
###################################################

Delta-V for the inclination change: 3.6185243


############################################
########### Questions  24 & 25    ##########
############################################
Isp24 = 1997;                  #Isp for the Hall Effect Thruster
Isp24A = 3500;                 #Isp for part A
Isp24B = 1000;                 #Isp for part B
Isp24D = 5991;                 #Isp for part D
eff24 = 0.48;                  #Efficiency
inPWR = 650;                   #Input power in Watts
inPWRCD = 1300;                #Input power for part c/d
MI24 = 1000;                   #Initial Mass in KG
deltaV24 = 4.5e3;              #Delta-V in m/s (given as 4.5 km/s)

Mp24 = MI24*(1 - e^(-deltaV24/(Isp24*g)));    #From SME eq 10-14, the propellant needed for this deltaV
T24 = (2*inPWR*eff24)/(g*Isp24);              #Thrust from equation 18-33 of SME
massFlow24 = T24/(Isp24*g);                   #Mass flow rate from SME equation 18-16
time24 = Mp24/massFlow24;                     #The time it takes to use the mass for our delta V, given the fass flow rate
print 'Time to deliver 4.5 km/s: ', time24, 'seconds';
print 'Time to deliver 4.5 km/s: ', time24/60, 'minutes';
print 'Time to deliver 4.5 km/s: ', time24/60/60, 'hours';
print 'Time to deliver 4.5 km/s: ', time24/60/60/24, 'days';
print 'Time to deliver 4.5 km/s: ', time24/SiderealYear_s, 'sidereal years';

Mp24A = MI24*(1 - e^(-deltaV24/(Isp24A*g)));    #From SME eq 10-14, the propellant needed for this deltaV
T24A = (2*inPWR*eff24)/(g*Isp24A);              #Thrust from equation 18-33 of SME
massFlow24A = T24A/(Isp24A*g);                  #Mass flow rate from SME equation 18-16
time24A = Mp24A/massFlow24A;                    #The time it takes to use the mass for our delta V, given the fass flow rate
print '\nTime to deliver 4.5 km/s part A: ', time24A/SiderealYear_s, 'sidereal years';

Mp24B = MI24*(1 - e^(-deltaV24/(Isp24B*g)));    #From SME eq 10-14, the propellant needed for this deltaV
T24B = (2*inPWR*eff24)/(g*Isp24B);              #Thrust from equation 18-33 of SME
massFlow24B = T24B/(Isp24B*g);                  #Mass flow rate from SME equation 18-16
time24B = Mp24B/massFlow24B;                    #The time it takes to use the mass for our delta V, given the fass flow rate
print '\nTime to deliver 4.5 km/s part B: ', time24B/SiderealYear_s, 'sidereal years';

Mp24C = MI24*(1 - e^(-deltaV24/(Isp24*g)));     #From SME eq 10-14, the propellant needed for this deltaV
T24C = (2*inPWRCD*eff24)/(g*Isp24);             #Thrust from equation 18-33 of SME
massFlow24C = T24C/(Isp24*g);                   #Mass flow rate from SME equation 18-16
time24C = Mp24C/massFlow24C;                    #The time it takes to use the mass for our delta V, given the fass flow rate
print '\nTime to deliver 4.5 km/s part C: ', time24C/SiderealYear_s, 'sidereal years';

Mp24D = MI24*(1 - e^(-deltaV24/(Isp24D*g)));    #From SME eq 10-14, the propellant needed for this deltaV
T24D = (2*inPWRCD*eff24)/(g*Isp24D);            #Thrust from equation 18-33 of SME
massFlow24D = T24D/(Isp24D*g);                  #Mass flow rate from SME equation 18-16
time24D = Mp24D/massFlow24D;                    #The time it takes to use the mass for our delta V, given the fass flow rate
print '\nTime to deliver 4.5 km/s part D: ', time24D/SiderealYear_s, 'sidereal years';
###################################################

Time to deliver 4.5 km/s: 1.26178513712592e8 seconds Time to deliver 4.5 km/s: 2.10297522854321e6 minutes Time to deliver 4.5 km/s: 35049.5871423868 hours Time to deliver 4.5 km/s: 1460.39946426612 days Time to deliver 4.5 km/s: 4.00923314643837 sidereal years Time to deliver 4.5 km/s part A: 7.37113153137352 sidereal years Time to deliver 4.5 km/s part B: 1.80212647355587 sidereal years Time to deliver 4.5 km/s part C: 2.00461657321919 sidereal years Time to deliver 4.5 km/s part D: 6.47989385990242 sidereal years