<<

Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

BACHELOR’S DEGREE IN AEROSPACE VEHICLE ENGINEERING Bachelor Thesis

ANALYTICAL STUDY OF SPACEX MISSION

ARCHITECTURE TO REACH MARS Annex

Student: Oscar Macía Fernández

Director:

Miquel Sureda Anfres

Co-Director:

David de la Torre Sangra

Delivery date: June, 30th 2020 (30.06.2020)

1 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

TABLE OF CONTENTS

1 Introduction ...... 4 2 Architecture analysis tool codes ...... 4 2.1 Patched conic approximation ...... 4 2.2 Trajectory calculation ...... 6 2.3 Starship launching ...... 6 2.4 Launching inputs ...... 7 2.5 Earth atmosphere ...... 8 2.6 Mars atmosphere ...... 9 2.7 Earth ...... 11 2.8 Mars Hyperbolic trajectory ...... 12 2.9 Hyperbolic anomaly ...... 13 2.10 Rendezvous ...... 13 2.11 Starship reentry ...... 14 2.12 Ballistic entry inputs ...... 15 2.13 Manoeuvring entry inputs ...... 16 2.14 Transfer ...... 17 2.15 Lambert solver ...... 18 2.16 Minimum Energy Transfer ...... 18 2.17 State transition matrix ...... 19 2.18 ...... 19 2.19 Planet position and velocity ...... 20 2.20 Plot orbit ...... 21 2.21 Keplerian elements to cartesian position and velocity ...... 21 2.22 Porkchop plot ...... 22 2.23 Date to mjd2000 conversion ...... 23 3 Mars society competition case study tables ...... 24 4 Economic plan tables ...... 31

2 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

TABLE OF TABLES

Table 1. Weight budget for Starship and Super Heavy rocket ...... 24 Table 2. Main materials estimation for Starship and Super Heavy rocket ...... 24 Table 3. Summary of architecture vehicles ...... 25 Table 4. Weight budget for Shuttle 1 ...... 25 Table 5. Weight budget for Rocket 1 ...... 25 Table 6. Main materials estimation for Shuttle 1 and Rocket 1 ...... 26 Table 7. Weight budget for Shuttle 2 ...... 26 Table 8. Weight budget for Rocket 2 ...... 26 Table 9. Main materials estimation for Shuttle 2 and Rocket 2 ...... 27 Table 10. Main materials budget for Shuttle 1 and 2, including Rocket 1 and 2 ...... 27 Table 11. Weight budget for Launcher type I ...... 27 Table 12. Main materials estimation for Launcher type I ...... 27 Table 13. Weight budget for Launcher type II ...... 28 Table 14. Main materials estimation for Launcher type II ...... 28 Table 15. Weight budget for Launcher type III ...... 28 Table 16. Weight budget for Booster of Launcher type III ...... 29 Table 17. Main materials estimation for Launcher type III ...... 29 Table 18. Weight budget for Launcher type IV ...... 29 Table 19. Weight budget for Booster of Launcher type IV ...... 30 Table 20. Main materials estimation for Launcher type IV ...... 30 Table 21. Total weight budget for all vehicles ...... 30 Table 22. Mars population and Starships sent to Mars per year ...... 31 Table 23. Main materials price evolution data ...... 31 Table 24. Fuel required per period ...... 31 Table 25. Total cost estimation for performing Mars' colonization process ...... 31

3 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

1 INTRODUCTION

The main aim of this document is to give extent information of certain aspects that in the report document does not fit. This information is related to the codes developed so as to obtain the results of the architecture interplanetary mission analysis tool developed for the thesis, and to the tables done so as to estimate the main materials needed for the Mars society competition case study and to the tables for developing the economic plan.

2 ARCHITECTURE ANALYSIS TOOL CODES

In this first section, the different algorithms for each phase of the mission are presented.

2.1 PATCHED CONIC APPROXIMATION

%Constant definition mu_S = 1.3271544*10^11; %Gravitational parameter of the Sun, km^3/s^2 mu_E = 3.986012*10^5; %Gravitational parameter of the Earth, km^3/s^2 mu_M = 4.282837*10^4; %Gravitational parameter of Mars d_1 = 1.4959965*10^8; %Distance between Earth and Sun, km d_2 = 1.524*d_1; %Distance between Mars and Sun, km r_E = 6370; %Earth radius, km r_M = 3389.5; %Mars radius, km v_E = 29.78; % of the Earth around the Sun, km/s v_M = 24.077; %Orbital speed of Mars around the Sun, km/s w_M = v_M/r_M; %Angular velocity of Mars around the Sun, rad/s t_1 = 0; %Time when the spacecraft departs %Heliocentric Transfer Orbit %1.Definition of the transfer orbit r_1 = d_1 + 100 + r_E; %Distance of departure of the spacecraft r_2 = d_2 + 300 + r_M; %Distance of arrival of the spacecraft a_t = (r_1 + r_2)/2; %Semimajor axis of the Hohmann transfer e_t = (r_2-r_1)/(r_2+r_1); %Eccentricity of the transfer orbit p = a_t*(1-e_t^2); %Parameter or semilatus rectum nu_1 = acos((p-r_1)/(e_t*r_1)); %Initial true anomaly nu_2 = acos((p-r_2)/(e_t*r_2)); %Final true anomaly i = 0; %Inclination Long_asc_node = 0; %Longitude of the ascending node Arg_per = 0; %Argument of periapsis %2.Obtainment of the required velocities E_t = - mu_S/(r_1+r_2); %Energy of the Hohmann transfer v_1 = sqrt(2*((mu_S/r_1)+E_t));%Heliocentric speed Delta_t = pi*sqrt(a_t^3/mu_S); %Time of flight t_2 = Delta_t + t_1; %Arrival time v_1cs = sqrt(mu_S/r_1); %Velocity in initial parking orbit Delta_v1 = v_1 - v_1cs; %Increment of velocity gamma_1 = (nu_2 - nu_1 - w_M*(t_2-t_1)); %Phase angle at departure h_t = r_1*v_1; %Angular momentum of the transfer orbit %Hyperbolic trajectories %1.Departure from Earth v_inf = Delta_v1; %Hyperbolic excess speed r_0 = r_E + 100; %Initial height v_0 = sqrt(v_inf^2+((2*mu_E)/(r_0))); %Injection speed h = r_0*v_0; %Angular momentum E_h = v_0^2/2 - mu_E/r_0; %Mechanical energy of the hyperbolic escape

4 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O. e_h = sqrt(1+2*E_h*h^2/mu_E^2); %Eccentricity of the hyperbola eta_h = acos(-1/e_h); %Angle eta of the hyperbola %2.Arrival at Mars v_2 = sqrt(2*(mu_S/r_2+E_t)); %Velocity when arriving to Mars' orbit phi_2 = acos((h_t)/(r_2*v_2)); %Angle between the velocity arriving to Mars' orbit and the Mars' orbit v_2cs = v_M; %Orbital velocity of Mars v_3 = sqrt(v_2^2 + v_2cs^2 - 2*v_2*v_2cs*cos(phi_2)); %Velocity of the spacecraft relative to the target planet theta = asin((v_2)/(v_3)*sin(phi_2)); %Angle between Mars' velocity and velocity when arriving to Mars' orbit b = (r_M/v_3)*sqrt(v_3^3+(2*mu_M)/(r_M)); %Effective collision cross section E_h_2 = v_3^2/2; %Mechanical energy of the hyperbolic approach trajectory h_2 = b*v_3; %Angular momentum of the hyperbolic approach trajectory r_p = r_M; %Radius of the perigee of the hyperbolic approach trajectory p_h2= h^2/mu_M; %Parameter of the hyperbolic approach trajectory e_h2 = sqrt(1+2*E_h_2*(h_2^2/mu_M^2)); %Eccentricity of the hyperbolic approach trajectory v_p2 = (b*v_3)/(r_p); %Velocity at perigee %Plot v0=[v_1 0 0]; r0=[0 -r_E-100-d_1 0]; npoints=10000; deltaTOF=Delta_t/npoints; for iT=2:npoints rTransfer(1,:)=r0; [rTransfer(iT,:)]=TrajectoryCalculation(r0,v0,deltaTOF*iT,mu_S); end plot(rTransfer(:,1),rTransfer(:,2), 'black') hold on th = 0:pi/50:2*pi; xunit2 = -(r_E+100)*cos(th); yunit2 = -(r_E+100)*sin(th)-d_1; plot(xunit2, yunit2, '--black') hold on xunit3 = (r_M+300)*cos(th); yunit3 = (r_M+300)*sin(th)+d_2; plot(xunit3, yunit3, ':black') axis equal grid on hold on point=[0,0]; plot(point, '-o', 'MarkerSize',10, 'MarkerEdgeColor','yellow', 'MarkerFaceColor', [1 1 0]) xlabel('X [km]'); ylabel('Y [km]')

5 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

2.2 TRAJECTORY CALCULATION function [r2,DeltaE,a,F,G]=TrajectoryCalculation(r1,v1,DeltaT,mu) %Previous Calculations a=mu/(2*mu/norm(r0)-norm(v0)^2); n=sqrt(mu/a^3); DeltaM=n*DeltaT; Sigma=dot(r1,v1)/sqrt(mu); %DeltaE obtainment DeltaE0=DeltaM; fun=@(E) E-(1-norm(r1)/a)*sin(E)-(sigma/sqrt(a))*(cos(E)-1)-DeltaM; DeltaE=fzero(fun,DeltaE0); %Lagrange coefficients F=1-(a/norm(r1))*(1-cos(DeltaE)); G=DeltaT+sqrt(a^3/mu)*(sin(DeltaE)-DeltaE); %Final position R2=F*r1+G*v1; end

2.3 STARSHIP LAUNCHING mu = 3.986004e14; %Gravitational parameter of the Earth omega = 2*pi/(23*3600+56*60+4.0905); %Angular velocity of the Earth S = 63.617; %Reference surface c=9; %Reference chord rE = 6378140; %Earth radius t1 = 137.94; %Burnout time stage 1 t2 = 335.39; %Burnout time stage 2 fT1 = 72000000; %Thrust fraction stage 1 fT2 = 12000000; %Thrust fraction stage 2 inim1 = 4850000; %Initial mass stage 1 inim2 = 1320000; %Initial mass stage 2 paym = 350000; %Payload mass propm1 = 3300000; %Propellant mass stage 1 propm2 = 1200000; %Propellant mass stage 2 gamma=1.41; long = 28.5*dtr; %Initial longitude lat = -80.55*dtr; %Initial latitude rad= 6378140; %Initial radius (m) vel= 0; %Initial velocity (m/s) fpa= deg2rad(90);%Initial flight-path angle chi= deg2rad(0); %Initial heading angle (measured from north) options = odeset('RelTol', 1e-10); derivative = [long; lat; rad; vel; fpa; chi]; [t,derivative] = ode45('rocket',[0, t1+t2],derivative,options); fclose('all'); heightdesired = 700000; for i=1:length(orbinit) if orbinit(i,3)-rE<=heightdesired height(i)=orbinit(i,3)-rm; t2(i,1)=t(i); end end tiledlayout(3,1) nexttile plot(t2,height) xlabel('Time [s]') ylabel('Height [m]') nexttile

6 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O. plot(t2,orbinit(1:length(height2),4)) xlabel('Time [s]') ylabel('Velocity [m/s]') nexttile plot(t2,rad2deg(orbinit(1:length(height2),5))) xlabel('Time [s]') ylabel('Flight path angle [º]')

2.4 LAUNCHING INPUTS function timeder = launchinginputs(t,der) global mu; global omega; global S; global c; global rE; global t1; global t2; global fT1; global fT2; global inim1; global inim2; global paym; global propm1; global propm2; global gamma; lon = der(1); lat = der(2); coslon = cos(lon); sinlon = sin(lon); coslat = cos(lat); sinlat = sin(lat); fpa = der(5); chi = der(6); cosfpa = cos(fpa); sinfpa = sin(fpa); coschi = cos(chi); sinchi = sin(chi); if der(3)

7 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O. else dergamma=(der(4)/der(3)-g/der(4))*cosfpa-gn*coschi*sinfpa/der(4) +Zfo/(der(4)*m)+2*omega*sinchi*coslat +omega*omega*der(3)*coslat*(cosfpa*coslat+ sinfpa*coschi*sinlat)/der(4); if abs(cosfpa)>1e-6 derhead=der(4)*sinchi*tan(der(2))*cosfpa/der(3)-gn*sinchi/der(4)- Yfo/(der(4)*cosfpa*m)-2*omega*(tan(der(5))*coschi*coslat – sinlat) +omega*omega*der(3)*sinchi*sinlat*coslat/(der(4)*cosfpa); else derhead=0; end end timeder = [derlon; derlat; derrad; dervel; dergamma; derhead]; end

2.5 EARTH ATMOSPHERE function at = Earthatmosphere(h, v, CL) R=287; %Sea level gas constant g0=9.806; %Mean gravity acceleration Na=6.0220978e23; %Avogadro’s number sigma=3.65e-10; %Air collision diameter S=110.4; %Sutherland’s temperature M0=28.964; %Molecular weight T0=288.15; %Temperature at sea level P0=1.01325e5; %Pressure at sea level rE=6378.14e3; %Earth’s radius beta=1.458e-6; %Sutherland’s constant gamma=1.405; %Specific heat ratio H=1e3*[0.00; 11.0191; 20.0631; 32.1619; 47.3501; 51.4125; 71.8020; 86.00; 100.00; 110.00; 120.00; 150.00; 160.00; 170.00; 190.00; 230.00; 300.00; 400.00; 500.00; 600.00; 700.00; 2000.00]; T=[To; 216.65; 216.65; 228.65; 270.65; 270.65; 214.65; 186.946; 210.65; 260.65; 360.65; 960.65; 1110.60; 1210.65; 1350.65; 1550.65; 1830.65; 2160.65; 2420.65; 2590.65; 2700.00; 2700.0]; M=[Mo; 28.964; 28.964; 28.964; 28.964; 28.964; 28.962; 28.962; 28.880; 28.560; 28.070; 26.920; 26.660; 26.500; 25.850; 24.690; 22.660; 19.940; 17.940; 16.840; 16.170; 16.17]; aT=[-6.5e-3; 0; 1e-3; 2.8e-3; 0; -2.8e-3; -2e-3; 1.693e-3; 5.00e-3; 1e-2; 2e-2; 1.5e-2; 1e-2; 7e-3; 5e-3; 4e-3; 3.3e-3; 2.6e-3; 1.7e-3; 1.1e-3; 0]; h00=P0/(R*T0); P(1) = P0; T(1) = T0; rho0=P0/(R*T0); P(1) = P0; T(1) = T0; rho(1)=rho0; for i=1:21 if ~(aT(i) == 0) P(i+1)=P(i)*(T(i+1)/T(i))^(-(1+B*(T(i)/aT(i)- H(i)))*g0/(R*aT(i)))*exp(g0*B*(H(i+1)-H(i))/(R*aT(i))); rho(i+1)=rho(i)*exp(g0*B*(H(i+1)-H(i))/(R*aT(i)))* T(i+1)/T(i)^(-((1+B*(T(i)/aT(i)-H(i)))*g0/(R*aT(i))+1)); else P(i+1)=P(i)*exp(-go*(H(i+1)-H(i))*(1-B*(H(i+1)+ H(i))/2)/(R*T(i))); rho(i+1)=rho(i)*exp(-go*(H(i+1)-H(i))*(1- B*(H(i+1)+ H(i))/2)/(R*T(i))); end end

8 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O. for i=1:21 if h= 10 f = 1; elseif Kn <= 0.01 f = 2; else f = 3; end at = [TM; rhoE; Mach; Kn; v_sound; f; PR; MU; RE; KT]; return; end end

2.6 MARS ATMOSPHERE function at = Marsatmosphere(h, v, CL) R=191.181; %Surface gas constant g0=3.7156; %Mean gravity acceleration Na=6.0220978e23; %Avogadro’s number sigma=3.305746e-10; %Collision diameter S = 110.4; %Sutherland’s temperature Mo = 43.49; %Molecular weight To = 228.5; %Surface mean temperature Po = 610.5; %Surface pressure rM = 3389.51e3; %Mars mean radius Beta = 1.458e-6; %Sutherland’s constant gamma = 1.31869506; %Surface specific-heat ratio if h<120 if h<39 TM=228-1.8*h; gamma=0.000001409*TM^2-0.001192*TM + 1.5175; R=191.181; P=610.5*(228.50/(228.50-1.80*h))^(19.435/(-1.80)); rho=P/R*TM; v_sound=(gamma*R*TM)^(1/2); elseif h>=39 && h<48 TM=158.3; gamma=0.000001409*TM^2-0.001192*TM + 1.5175; R=191.181;

9 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

P=11.6025*exp(-19.435*(h-39)/158.30); rho=P/R*TM; v_sound=(gamma*R*TM)^(1/2); elseif h>=48 && h<55 TM=271.10-2.35*h; gamma=0.000001409*TM^2-0.001192*TM + 1.5175; R=191.181; P=3.84305*(158.30/(158.30-2.35*(h-48)))^(19.435/(-2.35)); rho=P/R*TM; v_sound=(gamma*R*TM)^(1/2); elseif h>=55 && h<66 TM=106.1-2.35*h; gamma=0.000001409*TM^2-0.001192*TM + 1.5175; R=191.181; P=1.55091*(141.85/(141.85+0.65*(h-55)))^(19.435/0.65); rho=P/R*TM; v_sound=(gamma*R*TM)^(1/2); elseif h>=66 && h<75 TM=314-2.5*h; gamma=0.000001409*TM^2-0.001192*TM + 1.5175; R=191.181; P=0.356464*(149.00/(149.00-2.50*(h-66)))^(19.435/(-2.50)); rho=P/R*TM; v_sound=(gamma*R*TM)^(1/2); elseif h>=75 && h<84 TM=-61+2.5*h; gamma=0.000001409*TM^2-0.001192*TM + 1.5175; R=191.181; P=0.0998430*(126.50/(126.50+2.50*(h-75)))^(19.435/2.50); rho=P/R*TM; v_sound=(gamma*R*TM)^(1/2); elseif h>=84 && h<95 TM=149; gamma=0.000001409*TM^2-0.001192*TM + 1.5175; R=191.181; P=0.0279653*exp(-19.435*(h-84)/149.00); rho=P/R*TM; v_sound=(gamma*R*TM)^(1/2); elseif h>=95 && h<105 TM=282-1.4*h; gamma=0.000001409*TM^2-0.001192*TM + 1.5175; R=191.181; P=0.00666032*(149.00/(149.00-1.40*(h-95)))^(19.435/(-1.40)); rho=P/R*TM; v_sound=(gamma*R*TM)^(1/2); elseif h>=105 && h<120 TM=203.25-0.65*h; gamma=0.000001409*TM^2-0.001192*TM + 1.5175; R=191.181; P=0.00169282*(135.00/(135.00-0.65*(h-105)))^(19.435/(-0.65)); rho=P/R*TM; v_sound=(gamma*R*TM)^(1/2); end end if h>=120 if h>120 && h<=200 C1=(h-120)*(3389.510+120)/(3389.510+h); TM=200-72.225*exp(-0.0195*C1); P=exp(-4.18520e-10*h^5+3.45846e-7*h^4-1.13352e- 04*h^3+0.0188613*h^2-1.71718*h+61.10381); rho=exp(-2.55314e-10*h^5+2.31927e-07*h^4-8.33206e- 05*h^3+0.0151947*h^2-1.52799*h+48.69659); v_sound=(gamma*R*TM)^(1/2); else C1=(h-120)*(3389.510+120)/(3389.510+h); TM=200-72.225*exp(-0.0195*C1); P=exp(-4.83452e-11*h^5+6.96178e-08*h^4-4.03197e- 05*h^3+0.0117655*h^2-1.76494*h+93.67154); rho=exp(2.65472e-11*h^5-2.45558e-08*h^4+6.31410e- 06*h^3+4.73359e-04*h^2-0.443712*h+23.79408); v_sound=(gamma*R*TM)^(1/2); end

10 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O. end MU=Beta*TM^1.5/(TM + S); KT=2.64638e-3*TM^1.5/(TM + 245.4*10^(-12/TM)); vm=sqrt(8*R*TM/pi); m=Mo*1e-3/Na; n=rho/m; F=sqrt(2)*pi*n*sigma^2*vm; L=vm/F; Mach=v/v_sound; T0=TM*(1+(gamma-1)*Mach^2/2); MU0=Beta*T0^1.5/(T0+S); RE0=rho*v*CL/MU0; RE=rho*v*CL/MU; Kn=L/CL; Kno=1.25*sqrt(gamma)*Mach/RE0; if Kn>=10 f=1; elseif Kn <= 0.01 f=2; else f=3; end at = [TM; rho; Mach; Kn; v_sound; f; MU; RE; KT]; return; end

2.7 EARTH HYPERBOLIC TRAJECTORY r_E = [142971962.366616,-48268816.7825356,0]; %Earth position v_E = [9.04568857811963,28.1081939506458,0]; %Earth velocity [km/s] mu = 398600.14; %Earth gravitational parameter v1 = [12.0467982236657,30.8033922297774,1.87234955634886]; %Initial spacecraft velocity rEarth = 6378.14; %Earth radius height = 700; %Initial parking height r0 = rEarth+height; %Initial distance from Earth centre ifpa = 0; %Initial flight path angle %Previous calculations vs=v1; vp=v_E; vsp=vs-vp; v_sp=norm(vsp); v_inf=v_sp; %Hypothesis v0=sqrt(v_inf^2+(2*mu/(r0))); DeltaV=v0-sqrt(mu/(r0)); %Hyperbola parameters obtianment a=((2/r0)-(v0^2/mu))^(-1); h=r0*v0*cos(ifpa); %Angular momentum p=h^2/mu; %Semilatus rectum or parameter e=sqrt(1-p/a); %Eccentricity beta = acos(1/e); %Angle of the asymptote %Hyperbolic anomaly analysis H0=acosh((1/e)-(r0/(a*e))); n=sqrt(-mu/a^3); tau=(H0-e*sinh(H0))/n; time_step=1; rTransfer=zeros(3,10000); Vtraj=zeros(3,10000); for t=1:time_step:10000 M=n*(t-tau); H=HypAn(e,M); R=a*[cosh(H)-e -sqrt(e^2-1)*sinh(H) 0]; r=norm(R); V=sqrt(-mu*a)*[-sinh(H) sqrt(e^2-1)*cosh(H) 0]/r; v=norm(V); theta=acos(a*(cosh(H)-e)/r); %True anomaly

11 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

h2=norm(cross(R,V)); %Angluar momentum magnitude phi=acos(h/(r*v)); %Flight path angle rTransfer(1,t)=R(1); %Save position in function of time rTransfer(2,t)=R(2); rTransfer(3,t)=R(3); end tiledlayout(1,2) nexttile plot(rTransfer(1,:),rTransfer(2,:)) hold on th = 0:pi/50:2*pi; xunit = rEarth*cos(th); yunit = rEarth*sin(th); plot(xunit, yunit) title('2D Hyperbolic departure trajectory') xlabel('X†[km]'); ylabel('Y [km]') axis equal nexttile plot3(rTransfer(1,:),rTransfer(2,:),rTransfer(3,:)) hold on [x,y,z]=sphere; surf(rEarth*x,rEarth*y,rEarth*z,'facecolor','Blue'); axis equal title('3D Hyperbolic departure trajectory') xlabel('X†[km]'); ylabel('Y [km]'); zlabel('Z [km]')

2.8 MARS HYPERBOLIC TRAJECTORY r_M = [-149761968.315373,195017507.069819,7756487.27424835]; %Mars position v_M = [-18.3249792474703,-12.6847325457670,0.188210745638349]; %Mars velocity mu = 4.282837e4; % Mars gravitational parameter rMars = 3389,5; %Mars radius v1 = [-17.5202229184246,-10.4749954324313,-0.880050560774951]; %Initial spacecraft velocity height = 0; %Final orbit for Mars hyperbolic approach r0 = rMars+height; %Final distance from Mars centre ifpa = 0; %Initial flight path angle %Previous calculations vs=v1; vp=v_E; vsp=vs-vp; v_sp=norm(vsp); v_inf=v_sp; %Hypothesis v0=sqrt(v_inf^2+(2*mu/(r0))); DeltaV=v0-sqrt(mu/(r0)); %Hyperbola parameters obtainment a=((2/r0)-(v0^2/mu))^(-1); h=r0*v0*cos(ifpa); %Angular momentum p=h^2/mu; %Semilatus rectum or parameter e=sqrt(1-p/a); %Eccentricity beta = acos(1/e); %Angle of the asymptote %Hyperbolic anomaly analysis H0=acosh((1/e)-(r0/(a*e))); n=sqrt(-mu/a^3); tau=(H0-e*sinh(H0))/n; time_step=1; rTransfer=zeros(3,10000); Vtraj=zeros(3,10000);

12 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O. for t=1:time_step:10000 M=n*(t-tau); H=HypAn(e,M); R=a*[cosh(H)-e -sqrt(e^2-1)*sinh(H) 0]; r=norm(R); V=sqrt(-mu*a)*[-sinh(H) sqrt(e^2-1)*cosh(H) 0]/r; v=norm(V); theta=acos(a*(cosh(H)-e)/r); %True anomaly h2=norm(cross(R,V)); %Angluar momentum magnitude phi=acos(h/(r*v)); %Flight path angle rTransfer(1,t)=R(1); %Save position in function of time rTransfer(2,t)=R(2); rTransfer(3,t)=R(3); end tiledlayout(1,2) nexttile plot(rTransfer(1,:),rTransfer(2,:)) hold on th = 0:pi/50:2*pi; xunit = rMars*cos(th); yunit = rMars*sin(th); plot(xunit, yunit) title('2D Hyperbolic arrival trajectory') xlabel('X†[km]'); ylabel('Y [km]') axis equal nexttile plot3(rTransfer(1,:),rTransfer(2,:),rTransfer(3,:)) hold on [x,y,z]=sphere; surf(rMars*x,rMars*y,rMars*z,'facecolor','Red'); axis equal title('3D Hyperbolic arrival trajectory') xlabel('X†[km]'); ylabel('Y [km]'); zlabel('Z [km]')

2.9 HYPERBOLIC ANOMALY function H=HypAn(e,M); H=M; fH=e*sinh(H)-H-M; fpH=e*cosh(H)-1; dH=-fH/fpH; H=H+dH; eps=1e-10; i=0; while abs(fH)>eps i=i+1; fH=e*sinh(H)-H-M; fpH=e*cosh(H)-1; dH=-fH/fpH; H=H+dH; end end

2.10 RENDEZVOUS

%From initial parking orbit at 100km to final parking orbit at 700km npoints=100; rTransfer_motion=zeros(npoints,3); rEarth=6378.14; %Earth radius

13 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O. mu=398600.4; %Earth gravitational parameter initial_height_parking_orbit=100; %Height of the initial parking orbit final_height_parking_orbit=700; %Height of the final parking orbit r0=[0 -rEarth-initial_height_parking_orbit 0]; %Process for obtainment of initial velocity t_1=0; r_1 = initial_height_parking_orbit + rEarth; % r_2 = final_height_parking_orbit + rEarth; a_t = (r_1 + r_2)/2; %Semimajor axis e_t = (r_2-r_1)/(r_2+r_1); %Eccentricity p = a_t*(1-e_t^2); %Parameter or semilatus rectum nu_1 = acos((p-r_1)/(e_t*r_1)); %Initial true anomaly nu_2 = acos((p-r_2)/(e_t*r_2)); %Final true anomaly i = 0; %Inclination Long_asc_node = 0; %Longitude of the ascending node; Arg_per = 0; %Argument of periapsis; %2.Obtainment of the required velocities E_t = - mu/(r_1+r_2); %Energy of the Hohmann transfer v_1 = sqrt(2*((mu/r_1)+E_t));%Speed required at the departure point Delta_t = pi*sqrt(a_t^3/mu); %Time of flight t_2 = Delta_t + t_1; %Arrival time v_1cs = sqrt(mu/r_1); Delta_v1 = v_1 - v_1cs; %Increment 1 of velocity v_2 = sqrt(2*(mu/r_2+E_t)); %Velocity when arriving to final orbit v_2cs = sqrt(mu/r_2); %Velocity in final parking orbit Delta_v2 = abs(v_2-v_2cs); %Increment 2 of velocity h_t = r_1*v_1; %Angular momentum of the transfer orbit deltaTOF=Delta_t/npoints; v0=[v_1 0 0]; for iT=1:npoints [rTransfer_motion(iT,:)]=TrajectoryCalculation(r0,v0,deltaTOF*iT,mu); end rTransfer=rTransfer_motion*1000; plot(rTransfer(:,1),rTransfer(:,2), '-black') hold on th = 0:pi/50:2*pi; xunit = 1000*(rEarth+initial_height_parking_orbit)*cos(th); yunit = 1000*(rEarth+initial_height_parking_orbit)*sin(th); plot(xunit, yunit, '--black') hold on xunit2 = 1000*(rEarth+final_height_parking_orbit)*cos(th); yunit2 = 1000*(rEarth+final_height_parking_orbit)*sin(th); plot(xunit2, yunit2,':black') axis equal xlabel('X [m]') ylabel('Y [m]') legend('Transfer orbit','Initial orbit','Final orbit')

2.11 STARSHIP REENTRY global dtr; dtr=pi/180; global mu; mu=3.986004418e14; global S; S=63.17; global c; c=9; global m; m=350000; global rE; rE=6378000; global omega; omega=2*pi/(24*3600+36*60+4.0905); global gamma; gamma=1.41; long = 0*dtr; %Initial longitude

14 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O. lat=0*dtr; %Initial latitude rad=6378000+300000; %Initial radius v=7000; %initial velocity (m/s) fpa=0*dtr; %Initial flight-path angle chi=0*dtr; %Initial heading angle (measured from north) options=odeset('RelTol', 1e-8); orbinit=[long; lat; rad; v; fpa; chi]; [t,orbinit]=ode45('ballentry',[0, 700],orbinit,options); %For ballistic entry [t,orbinit]=ode45('Manentry',[0, 1070],orbinit,options); %For manoeuvring entry fclose('all'); tiledlayout(3,1) nexttile plot(t,orbinit(:,3)-6378000) xlabel('Time [s]') ylabel('Height [m]') nexttile plot(t,orbinit(:,4)/1000) xlabel('Time [s]') ylabel('Velocity [km/s]') nexttile plot(t,rad2deg(orbinit(:,5))) xlabel('Time [s]') ylabel('Flight path angle [º]')

2.12 BALLISTIC ENTRY INPUTS function Y = ballentry(t,der) [g,gn]=gravity(der(3),der(2)); lon=der(1); lat=der(2); coslon=cos(lon); sinlon=sin(lon); coslat=cos(lat); sinlat=sin(lat); fpa=der(5); chi=der(6); cosfpa=cos(fpa); sinfpa=sin(fpa); coschi=cos(chi); sinchi=sin(chi); if der(3)

15 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

+omega*omega*der(3)*coslat*(sinfpa*coslat-cosfpa*coschi*sinlat); dergamma=(der(4)/der(3)-g/der(4))*cosfpa- gn*coschi*sinfpa/der(4)+2*omega*sinchi*coslat+omega*omega*der(3)*cosla t*(cosfpa*coslat+sinfpa*coschi*sinlat)/der(4); derhead=der(4)*sinchi*tan(der(2))*cosfpa/der(3)-gn*sinchi/der(4)- 2*omega*(tan(der(5))*coschi*coslat - sinlat)+omega*omega*der(3)*sinchi*sinlat*coslat/(der(4)*cosfpa); Y = [derlon; derlat; derrad; dervel; dergamma; derhead]; end

2.13 MANOEUVRING ENTRY INPUTS function Y = Manentry(t,der) global dtr; global mu; global S; global c; global m; global rE; global omega; global Gamma; [g,gn]=gravity(o(3),o(2)); lon=der(1); lat=der(2); coslon=cos(lon); sinlon=sin(lon); coslat=cos(lat); sinlat=sin(lat); fpa=der(5); chi=der(6); cosfpa=cos(fpa); sinfpa=sin(fpa); coschi=cos(chi); sinchi=sin(chi); if der(3)

16 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

2.14 TRANSFER ORBIT

%Inputs and needed constants definition nEarth = 1; departure_time = [2037,9,3,12,00,00]; %Gregorian date format, [year, month, day, hour, minute, second] departure_t = date2mjd2000(departure_time); nMars = 2; arrival_time = [2038,4,11,12,00,00]; %Gregorian date format, [year, month, day, hour, minute, second] arrival_t = date2mjd2000(arrival_time); mu = 1.327124e20; mu2 = 1.327124e11; rSun = 6.957e10; %Earth position and velocity obtainment [r1 v1] = PlanetPosition(nEarth,departure_t); r11 = r1*1000; %Position of the Earth in meters vE = v1*1000; %Velocity of the Earth rEarth = 6.371e9; %Earth radius %Ploting Earth orbit kepEarth = [1.00000011*149.597870e9 0.01671022 deg2rad(0.00005) deg2rad(-11.26064) deg2rad(102.94719)]; hobj1 = plotOrbit(kepEarth,mu); hold on %Mars position and velocity obtainment [r2 v2] = PlanetPosition(nMars,arrival_t); r22 = r2*1000; %Position of Mars in meters vM = v2*1000; %Velocity of Mars in m/s rMars = 3.3895e9; %Mars radius [m] %Ploting Mars orbit [aM,eM,iM,OmegaM,omegaM,nu_0M,u_0M,PiM,l_0M] = OrbitalElements(r22,vM,mu); kepMars = [aM,eM,iM,OmegaM,omegaM]; hobj2 = plotOrbit(kepMars,mu); %Plotting Sun, Earth and Mars point=[0,0]; [x y z] = sphere; hold on surf(rEarth*x+r11(1),rEarth*y+r11(2),rEarth*z+r11(3),'facecolor','Blue '); hold on surf(rMars*x+r22(1),rMars*y+r22(2),rMars*z+r22(3),'facecolor','Red'); hold on plot(point, '-o', 'MarkerSize',10, 'MarkerEdgeColor','yellow', 'MarkerFaceColor', [1 1 0]) xlabel('X [km]'); ylabel('Y [km]') %Computing transfer orbit r111 = r1/149.597870e6; r222 = r2/149.597870e6; mu1 = 3.964016e-14; %Gravitational constant in AU^3/s^2 TOF=(arrival_t-departure_t)*24*3600; tm=1; [v11 v22] = LambertSolver(r1,r2,TOF,tm,mu2); [atrans,etrans,itrans,Omegatrans,omegatrans,nu_0trans,u_0trans,Pitrans ,l_0trans] = OrbitalElements(r11,v11*1000,mu); DeltaV_obtained = norm((v11)-v1)+norm((v22)-v2); axis equal hold on npoints=100; rTransfer_motion=zeros(npoints,3);

17 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O. r0_Earth=r1; v0_Transfer=v11; %v0_Transfer is the initial velocity obtained from the Lambert Solver deltaTOF=TOF3/npoints; for iT=1:npoints [rTransfer_motion(iT,:)]=FGKepler_dt(r0_Earth,v0_Transfer,deltaTOF*iT, mu2); end rTransfer=rTransfer_motion*1000; plot3(rTransfer(:,1),rTransfer(:,2),rTransfer(:,3))

2.15 LAMBERT SOLVER function [v0 vf]=LambertSolver(r1,r2,TOF_desired,tm,mu) %Maximmum Efficient Transfer [v0 Min_TOF]=MinEnTrans(r1,r2,mu,tm); r0=r1; %Continuation method nIt=10; %Limit of iterations to meet TOF for iIt=1:nIt %Parameters definition lambda=iIt/nIt; TOF=lambda*TOF_desired+(1-lambda)*Min_TOF; %Differential Corrector tol=1e-3; it=1; maxit=1e3; err=1e9; while err>tol && it<=maxit [rf]=TrajectoryCalculation(r0,v0,TOF,mu); [drf_dv0 vf]=StateTransitionMatrix(r0,v0,TOF,mu); DeltaV0=inv(drf_dv0)*(r2-rf)'; DELTAV0=norm(DeltaV0); v0=v0+DeltaV0'; it=it+1; %Calculate error error=norm(r2-rf); %Checks a=mu/(2*mu/norm(r0)-norm(v0)^2); if a<0 %Hyperbolic orbit v0=[100 100 100]; vf=[100 100 100]; return end if it>=maxit; %Check for continuation method v0=[100 100 100]; vf=[100 100 100]; return end end end [rf]=TrajectoryCalculation(r0,v0,TOF,mu); %Final position end

2.16 MINIMUM ENERGY TRANSFER function [v0 Min_TOF theta Min_a Min_e]=MinEnTrans(r1,r2,mu,tm) %Geometry calculation

18 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O. chord =norm(r2-r1); Min_a =(1/4)*(norm(r1)+norm(r2)+chord); cosDeltatheta=dot(r1,r2)/(norm(r1)*norm(r2)); theta=acos(cosDeltatheta); sinDeltatheta=tm*sqrt(1-cosDeltatheta^2); Min_p =((norm(r1)*norm(r2))/chord)*(1-cosDeltatheta); Min_e =sqrt(1-Min_p/Min_a); %Lagrange coefficients F=1-(norm(r2)/Min_p)*(1-cosDeltatheta); G=((norm(r1)*norm(r2))/sqrt(mu*Min_p))*sinDeltatheta; %Initial velocity and TOF obtainment v0=(1/G)*(r2-F*r1); beta_e=2*asin(sqrt((2*Min_a-chord)/(2*Min_a))); Min_TOF =sqrt(Min_a^3/mu)*(pi-tm*(beta_e-sin(beta_e))); end

2.17 STATE TRANSITION MATRIX function [drf_dv0 vf a]=StateTransitionMatrix(r0,v0,DeltaT,mu) %Geometry calculation a=mu/(2*mu/norm(r0)-norm(v0)^2); n=sqrt(mu/a^3); DeltaM=n*DeltaT; Sigma=dot(r0,v0)/sqrt(mu); %Delta E obtainment DeltaE0=DeltaM; fun=@(E) E-(1-norm(r0)/a)*sin(E)-(Sigma/sqrt(a))*(cos(E)-1)-DeltaM; DeltaE=fzero(fun,DeltaE0); %Lagrange coefficients F=1-(a/norm(r0))*(1-cos(DeltaE)); G=DeltaT+sqrt(a^3/mu)*(sin(DeltaE)-DeltaE); %State transition matrix obtainment rf=F*r0+G*v0; C=a*sqrt(a^3/mu)*(3*sin(DeltaE)-(2+cos(DeltaE))*DeltaE)-a*DeltaT*(1- cos(DeltaE)); dr=rf-r0; Fdot=-(sqrt(mu*a)/(norm(rf)*norm(r0)))*sin(DeltaE); Gdot=1-a/norm(rf)*(1-cos(DeltaE)); vf=Fdot*r0+Gdot*v0; dv=vf-v0; drf_dv0=(norm(r0)/mu)*(1-F)*(dr'*v0-dv'*r0)+(C/mu)*vf'*v0+G*eye(3); end

2.18 ORBITAL ELEMENTS function [a e i Omega omega nu_0 u_0 Pi l_0] = OrbitalElements(r,v,mu) %Vectors definition h = [r(2)*v(3)-r(3)*v(2), r(3)*v(1)-r(1)*v(3), r(1)*v(2)-r(2)*v(1)]; %Specific angular momentum n = [-h(2), h(1), 0]; %Node vector (line of nodes) e_vector = ((norm(v)^2-mu/norm(r)).*r-dot(r,v).*v)/mu; %Eccentricity vector %Orbital elements computation a = (1)/((2/norm(r))-(norm(v)^2)/(mu)); %Semimajor axis e = norm(e_vector); %Eccentricity i = acos(h(3)/norm(h)); %Inclination, always less than 180º Omega = acos(n(1)/norm(n)); %Longitude of ascending node, if n_y>0, Omega is less than 180º

19 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

if n(2)<0 Omega = 2*pi-Omega; end if isnan(Omega) Omega=0; end omega = acos(dot(n,e_vector)/(norm(n)*norm(e_vector))); %Argument of periapsis, if e_z>0, omega is less than 180º if e_vector(3)<0 omega = 2*pi-omega; end if isnan(omega) omega=0; end nu_0 = acos(dot(e_vector,r)/(e*norm(r))); %True anomaly, if dot(r,v)>0, nu_0 is less than 180º if dot(r,v)<0 nu_0 = 2*pi-nu_0; end u_0 = acos(dot(n,r)/(norm(n)*norm(r))); %Argument of latitude at epoch, if r_z>0, nu_0 is less than 180º if r(3)<0 u_0=2*pi-u_0; end Pi = Omega+omega; %Longitude of periapsis, less than 360∫º l_0 = Omega+omega+nu_0; %True longitude at epoch, less than 360º end

2.19 PLANET POSITION AND VELOCITY function [r v] = PlanetPosition(n,t) kep = uplanet(t,n); DEG2RAD=pi/180; G=6.67259e-20; msun=1.988919445342813e+030; ksun=msun*G; KM=149597870.66; T=(t+36525)/36525.00; TT=T*T; TTT=T*TT; kep(1)=T*0; switch round(ibody) case 1 %Earth kep(1)=1.000000230; kep(2)=0.016751040-0.000041800*T-0.0000001260*TT; kep(3)=0.00; kep(4)=0.00; kep(5)=1.01220833333333333e+2+1.7191750*T+4.52777777777777778e- 4*TT+3.33333333333333333e-6*TTT; XM=3.599904975e+4-1.50277777777777778e-4*T - 3.33333333333333333e-6*TT; kep(6)=3.58475844444444444e2+XM*T; case 2 %Mars kep(1)=1.5236883990; kep(2)=0.093312900+0.0000920640*T-0.0000000770*TT; kep(3)=1.850333333333333330-6.75e-4*T+1.26111111111111111e-5*TT; kep(4)=4.87864416666666667e+1+7.70991666666666667e-1*T- 1.38888888888888889e-6*TT-5.33333333333333333e-6*TTT; kep(5)=2.85431761111111111e+2+1.069766666666666670*T+1.3125e- 4*TT+4.13888888888888889e-6*TTT; XM=1.91398585e+4+1.80805555555555556e-4*T+1.19444444444444444e- 6*TT; kep(6)=3.19529425e2+XM*T;

20 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

end kep(1)=kep(1)*KM; kep(3:6)=kep(3:6)*DEG2RAD; kep(6)=mod(kep(6),2*pi); phi=kep(6); for i=1:5 g=kep(6)-(phi-kep(2)*sin(phi)); g_1=(-1+kep(2)*cos(phi)); phi=phi-g/g_1 end theta=2*atan(sqrt((1+kep(2))/(1-kep(2)))*tan(phi/2)); kep(6)=theta; %Keplerian to cartesian car = KeptoCart(kep,mu); r=car(1:3); v=car(4:6); end

2.20 PLOT ORBIT function hobj = plotOrbit(kep5, mu) kep5 = kep5(1:5); convdeg = pi/180; cart = zeros(360,6); for i = 1:360 f = i*convdeg; cart(i,:) = KeptoCart([kep5 f],mu); end hobj = plot3(HAXIS,cart(:,1),cart(:,2),cart(:,3)); return

2.21 KEPLERIAN ELEMENTS TO CARTESIAN POSITION AND VELOCITY function out = KeptoCart(kep,mu,p) e=kep(2); i=kep(3); Omega=kep(4); Omega=kep(5); tho=kep(6); R(1,1) = cos(omega)*cos(Omega)-sin(omega)*cos(i)*sin(Omega); R(2,1) = cos(omega)*sin(Omega)+sin(omega)*cos(i)*cos(Omega); R(3,1) = sin(omega)*sin(i); R(1,2) = -sin(omega)*cos(Omega)-cos(omega)*cos(i)*sin(Omega); R(2,2) = -sin(omega)*sin(Omega)+cos(omega)*cos(i)*cos(Om) ega; R(3,2) = cos(omega)*sin(i); R(1,3) = sin(i)*sin(Omega); R(2,3) = -sin(i)*cos(Omega); R(3,3) = cos(i); r = p/(1+e*cos(tho)); xp = r*cos(tho); yp = r*sin(tho); wom_dot = sqrt(mu*p)/r^2; r_dot = sqrt(mu/p)*e*sin(tho); vxp = r_dot*cos(tho)-r*sin(tho)*wom_dot; vyp = r_dot*sin(tho)+r*cos(tho)*wom_dot; out(1) = R(1,1)*xp+R(1,2)*yp; out(2) = R(2,1)*xp+R(2,2)*yp;

21 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O. out(3) = R(3,1)*xp+R(3,2)*yp; out(4) = R(1,1)*vxp+R(1,2)*vyp; out(5) = R(2,1)*vxp+R(2,2)*vyp; out(6) = R(3,1)*vxp+R(3,2)*vyp; end

2.22 PORKCHOP PLOT

%Parameters mu=1.32712440018e11; %Gravitational parameter of the Sun AU=149597870; %Astronomical Unit conversion to metres % definition Departure_start_MJD2000=date2mjd2000([2027,01,01,00,00,00]); Departure_end_MJD2000=date2mjd2000([2050,12,31,00,00,00]); %Grid of time for Spacecraft departure Max_time = 200; %Margin of departure after departure_end Max_MJD2000 = Departure_end_MJD2000+Max_time; time_step=1; Grid_Dep=Departure_start_MJD2000:time_step:Departure_end_MJD2000; %Generate grid of time for transfer trans_time = 300; %Maximum transfer time Grid_TOF=10:time_step:trans_time; %Grid of TOF for i=1:length(Grid_Dep) %Iteration for every departure date %Parameters Departure_day=Grid_Dep(i); [r1 v1]=PlanetPosition(1,Departure_day); %Departure Earth position for j=1:length(Grid_TOF) %Iterative process for every TOF %Mars conditions at rendezvous TOF_days=Grid_TOF(j); %Time of flight [days] TOF_secs=TOF_days*24*3600; %Time of flight [s] Arrival_day=Departure_day+TOF_days; %Arrival date [days] [r2 v2]=PlanetPosition(2,Arrival_day);%Arrival Mars position %Velocities obtainment r1_AU = r1/AU; r2_AU = r2/AU; mu_AU = mu/(AU)^3; tm=1; [v_dep v_arr] = LambertSolver(r1,r2,TOF_secs,tm,mu); %DeltaV obtainment DeltaV_obtained = norm((v_dep)-v1)+norm((v_arr)-v2); DeltaV1_obtained = norm((v_dep)-v1); DeltaV2_obtained = norm((v_arr)-v2); end end DeltaV_max=10; %Maximum DeltaV Porkchop=zeros(length(Grid_Dep),length(Grid_TOF)); Porkchop(:,:)=NaN; Porkchop1=zeros(length(Grid_Dep),length(Grid_TOF)); Porkchop1(:,:)=NaN; Porkchop2=zeros(length(Grid_Dep),length(Grid_TOF)); Porkchop2(:,:)=NaN; for a=1:length(Grid_Dep) for b=1:length(Grid_TOF) if DeltaV(a,b)<=DeltaV_max Porkchop(a,b)=DeltaV(a,b); end if DeltaV1(a,b)<=DeltaV_max Porkchop1(a,b)=DeltaV1(a,b);

22 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

end if DeltaV2(a,b)<=DeltaV_max Porkchop2(a,b)=DeltaV2(a,b); end end end figure(1) contourf(Grid_Dep, Grid_TOF, Porkchop') %Porkchop for total DeltaV xlabel('Departure date [MJD2000]'); ylabel('TOF [days]'); cb=colorbar; ylabel(cb,'\Delta V [km/s]') figure(2) contourf(Grid_Dep, Grid_TOF, Porkchop1') %Porkchop for initial DeltaV xlabel('Departure date [MJD2000]'); ylabel('TOF [days]'); cb=colorbar; ylabel(cb,'\Delta V [km/s]') figure(3) contourf(Grid_Dep, Grid_TOF, Porkchop2') %Porkchop for final DeltaV xlabel('Departure date [MJD2000]'); ylabel('TOF [days]'); cb=colorbar; ylabel(cb,'\Delta V [km/s]')

2.23 DATE TO MJD2000 CONVERSION function mjd2000=date2mjd2000(date) Year=date(1); Month=date(2); Day=date(3); hours=date(4); min=date(5); sec=date(6); fracDay=(hours+(min+sec/60)/60)/24; jd=367*Year-floor(7*(Year+floor((Month+9)/12))/4)- floor(3*floor((Year+(Month-9)/7)/100+1)/4)+floor(275*Month/9)+Day+ 1721028.5+fracDay; mjd2000=jd - 2400000.5 - 51544.5; return

23 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

3 MARS SOCIETY COMPETITION CASE STUDY TABLES

In this section, all the developed tables so as to obtain the main materials estimation for the Mars society competition case study are presented.

Table 1. Weight budget for Starship and Super Heavy rocket

Weights estimation for S/C Data Estimation (% of Payload Mass) Mass [kg] Dry Mass of Starship - 120000 Payload 100 100000 Structures 75 75000 Thermal 16,1 16100 Power 21,4 21400 Tracking Telemetry & Command 16,1 16100 Attitude Control 21,4 21400 Margin 28,6 28600 Propellant Tanks 10% of propellant mass 120000 Propellant Mass - 1200000 Engines 6 raptor engines (1500 kg per engine) 9000 Gross Mass Summatory of subsystems 1727600

Weights estimation for HEAVY ROCKET Data Mass [kg] Dry Mass of Super Heavy 244500 Structure 230000 Propellant Mass 3000000 Engines (37 Raptor engines) 55500 Tanks 300000 Gross Mass 3830000

Table 2. Main materials estimation for Starship and Super Heavy rocket

Main materials used in one S/C Mass for one S/C common configuration [kg] Stainless-Steel (Nickel and chrom alloy) 75000 Carbon fiber composite 129000 Liquid oxygen 936000 Methane 264000

Main materials used in one ROCKET Mass for one ROCKET common configuration [kg] Stainless-Steel (Nickel and chrom alloy) 230000 Carbon fiber composite 355500 Liquid oxygen 2340000 Methane 660000

Main materials used in one Shuttle System Mass for one Starship+Super Heavy common configuration [kg] Stainless-Steel (Nickel and chrom alloy) 305000 Carbon fiber composite 484500 Liquid oxygen 3276000 Methane 924000

Fuel type Fuel percentage Liquid oxygen 78 Methane 22

24 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

Table 3. Summary of architecture vehicles

Type of shuttle Description Payload [kg] People capacity NUMBER OF SHUTTLES Shuttle_1 Shuttle used for Earth-Mars/Mars-Earth transfers (reusable) 60000 200 151 Shuttle_2 Shuttle used for Earth-Mars/Mars-Earth transfers (reusable) 150000 500 200

Type of launcher Description Payload [kg] People capacity NUMBER OF LAUNCHERS Launcher type I Launcher used for leaving Mars and docking with EMTS (reusable) 60000 200 TBD Launcher type II Launcher used for leaving Mars and docking with EMTS (reusable) 150000 500 467

Type of launcher Description Payload [kg] People capacity NUMBER OF LAUNCHERS Launcher type III Launcher used for leaving the Earth and docking with EMTS (reusable) 60000 200 TBD Launcher type IV Launcher used for leaving the Earth and docking with EMTS (reusable) 150000 500 467

Table 4. Weight budget for Shuttle 1 Weights estimation for S/C_1 Data Estimation (% of Payload Mass) Mass [kg] Payload 100 60000 Structures 75 45000 Thermal 16,1 9660 Power 21,4 12840 Tracking Telemetry & Command 16,1 9660 Attitude Control 21,4 12840 Margin 28,6 17160 Propellant Tanks 10% of propellant mass 240000 Propellant Mass - 2400000 Engines 12 raptor engines (1500 kg per engine) 18000 Gross Mass - 2825160

Table 5. Weight budget for Rocket 1 Weights estimation for ROCKET_1

Data Mass [kg] Dry Mass of Booster type I 460000 Structure 489000 Propellant Mass 6000000

Engines (74 Raptor engines) 111000 Tanks 600000 Gross Mass 7660000

25 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

Table 6. Main materials estimation for Shuttle 1 and Rocket 1

Main materials used Mass for one S/C_1 [kg] Mass per person [kg] Total Mass for building all needed S/C_1 [kg] Stainless-Steel (Nickel and chrom alloy) 67500 337,5 10125000 Carbon fiber composite 387000 1935 58050000 Fuel (liquid oxygen and methane) 3600000 18000 540000000 Liquid oxygen 2808000 14040 421200000 Methane 792000 3960 118800000

Main materials used Mass for one ROCKET_1 [kg] Mass per person [kg] Total Mass for building all needed ROCKET_1 [kg] Stainless-Steel (Nickel and chrom alloy) 489000 2445 73350000 Carbon fiber composite 711000 3555 106650000 Fuel (liquid oxygen and methane) 6000000 30000 900000000 Liquid oxygen 4680000 23400 702000000 Methane 1320000 6600 198000000

Main materials used in S/C_1 + Rocket_1 Mass for one S/C_1 + ROCKET_1 [kg] Mass per person [kg] Total Mass for building all needed S/C_1 + ROCKET_1 [kg] Stainless-Steel (Nickel and chrom alloy) 556500 2782,5 83475000 Carbon fiber composite 1098000 5490 164700000 Fuel (liquid oxygen and methane) 9600000 48000 1440000000 Liquid oxygen 7488000 37440 1123200000 Methane 2112000 10560 316800000

Table 7. Weight budget for Shuttle 2

Weights estimation for S/C_2 Data Estimation (% of Payload Mass) Mass [kg] Payload 100 150000 Structures 75 112500 Thermal 16,1 24150 Power 21,4 32100 Tracking Telemetry & Command 16,1 24150 Attitude Control 21,4 32100 Margin 28,6 42900 Propellant Tanks 10% of propellant mass 6,00E+05 Propellant Mass - 6,00E+06 Engines 30 raptor engines (1500 kg per engine) 4,50E+04 Gross Mass - 7,06E+06

Table 8. Weight budget for Rocket 2

Weights estimation for ROCKET_2 Data Mass [kg] Dry Mass of Booster type II 1150000 Structure 1222500 Propellant Mass 15000000 Engines (74 Raptor engines) 277500 Tanks 1500000 Gross Mass 19150000

26 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

Table 9. Main materials estimation for Shuttle 2 and Rocket 2

Main materials used Mass for one S/C_2 [kg] Mass per person [kg] Total Mass for building all needed S/C_2 [kg] Stainless-Steel (Nickel and chrom alloy) 168750 337,5 33750000 Carbon fiber composite 967500 1935 193500000 Fuel (liquid oxygen and methane) 9000000 18000 1800000000 Liquid oxygen 7020000 35100 1053000000 Methane 1980000 9900 297000000

Main materials used Mass for one ROCKET_2 [kg] Mass per person [kg] Total Mass for building all needed ROCKET_2 [kg] Stainless-Steel (Nickel and chrom alloy) 1222500 2445 244500000 Carbon fiber composite 1777500 3555 355500000 Fuel (liquid oxygen and methane) 15000000 30000 3000000000 Liquid oxygen 11700000 58500 1755000000 Methane 3300000 16500 495000000

Main materials used in S/C_2 + Rocket_2 Mass for one S/C_2 + ROCKET_2 [kg] Mass per person [kg] Total Mass for building all needed S/C_2 + ROCKET_2 [kg] Stainless-Steel (Nickel and chrom alloy) 1391250 2782,5 278250000 Carbon fiber composite 2745000 5490 549000000 Fuel (liquid oxygen and methane) 24000000 48000 4800000000 Liquid oxygen 18720000 93600 2808000000 Methane 5280000 26400 792000000

Table 10. Main materials budget for Shuttle 1 and 2, including Rocket 1 and 2

Main materials used in whole SHUTTLE systems production Total Mass for Shuttle_1 [kg] Total Mass for Shuttle_2 [kg] TOTAL MASS [kg] TOTAL MASS [Ton] Stainless-Steel (Nickel and chrom alloy) 2,78E+08 8,35E+07 3,62E+08 3,62E+05 Carbon fiber composite 5,49E+08 1,65E+08 7,14E+08 7,14E+05 LOX 3,74E+09 1,12E+09 4,87E+09 4,87E+06 Methane 1,06E+09 3,17E+08 1,37E+09 1,37E+06

Table 11. Weight budget for Launcher type I

Weights estimation for launchers type I Data Estimation (% of Payload Mass) Mass [kg] Payload 100 60000 Structures 75 45000 Thermal 16,1 9660 Power 21,4 12840 Tracking Telemetry & Command 16,1 9660 Attitude Control 21,4 12840 Margin 28,6 17160 Propellant Tanks 10% of propellant mass 25612,10394 Propellant Mass - 256121,0394 Engines 6 raptor engines (1500 kg per engine) 9000 Gross Mass - 457893,1433

Table 12. Main materials estimation for Launcher type I

Main materials used Mass for one Launcher type I configuration [kg] Mass per person [kg] Total Mass for building all needed launchers type I [kg] Stainless-Steel (Nickel and chrom alloy) 67500 337,5 TBD Carbon fiber composite 51918,15591 259,5907796 TBD Fuel (liquid oxygen and methane) 384181,5591 1920,907796 TBD Liquid oxygen 299661,6161 1498,30808 TBD Methane 84519,943 422,599715 TBD

27 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

Table 13. Weight budget for Launcher type II

Weights estimation for launchers type II Data Estimation (% of Payload Mass) Mass [kg] Payload 100 150000 Structures 75 112500 Thermal 16,1 24150 Power 21,4 32100 Tracking Telemetry & Command 16,1 24150 Attitude Control 21,4 32100 Margin 28,6 42900 Propellant Tanks 10% of propellant mass 6,40E+04 Propellant Mass - 6,40E+05 Engines 15 raptor engines (1500 kg per engine) 2,25E+04 Gross Mass - 1,14E+06

Table 14. Main materials estimation for Launcher type II

Main materials used Mass for one Launcher type II configuration [kg] Mass per person [kg] Total Mass for building all needed launchers type II [kg] Stainless-Steel (Nickel and chrom alloy) 168750 337,5 7,88E+07 Carbon fiber composite 129795,3898 259,5907796 6,06E+07 LOX 749154,0402 1498,30808 3,50E+08 Methane 211299,8575 422,599715 9,87E+07

Table 15. Weight budget for Launcher type III

Weights estimation for launchers type III Data Estimation (% of Payload Mass) Mass [kg] Payload 100 60000 Structures 70 42000 Thermal 16,1 9660 Power 21,4 12840 Tracking Telemetry & Command 16,1 9660 Attitude Control 21,4 12840 Margin 28,6 17160 Propellant Tanks 10% of propellant mass 148628,5634 Propellant Mass - 1486285,634 Engines 5 raptor engines (1500 kg per engine) 7500 Gross Mass - 1806574,197

28 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

Table 16. Weight budget for Booster of Launcher type III

Weights estimation for BOOSTER_1 Data Mass [kg] Dry Mass of Booster type III 294151,174 Structure 312695,4872

Propellant Mass 3836754,444 Engines 70979,95721 Tanks 383675,4444 Gross Mass 4898256,507

Table 17. Main materials estimation for Launcher type III

Main materials used Mass for one Launcher type III configuration [kg] Mass per person [kg] Total Mass for building all needed launchers type III [kg] Stainless-Steel (Nickel and chrom alloy) 63000 315 TBD Carbon fiber composite 234192,8451 1170,964226 TBD Fuel (liquid oxygen and methane) 2229428,451 11147,14226 TBD Liquid oxygen 1738954,192 8694,770959 TBD Methane 490474,2592 2452,371296 TBD

Main materials used Mass for one BOOSTER_1 [kg] Mass per person [kg] Total Mass for building all needed BOOSTER_1 [kg] Stainless-Steel (Nickel and chrom alloy) 312695,4872 1563,477436 TBD Carbon fiber composite 454655,4016 2273,277008 TBD Fuel (liquid oxygen and methane) 3836754,444 19183,77222 TBD Liquid oxygen 2992668,466 14963,34233 TBD Methane 844085,9776 4220,429888 TBD

Main materials used in launcher type III + BOOSTER_1 Mass for one launcher type III + BOOSTER_1 [kg] Mass per person [kg] Total Mass for building all needed launchers type III + BOOSTER_1 [kg] Stainless-Steel (Nickel and chrom alloy) 375695,4872 1878,477436 TBD Carbon fiber composite 688848,2467 3444,241233 TBD Fuel (liquid oxygen and methane) 6066182,895 30330,91447 TBD Liquid oxygen 4731622,658 23658,11329 TBD Methane 1334560,237 6672,801184 TBD

Table 18. Weight budget for Launcher type IV

Weights estimation for launchers type IV Data Estimation (% of Payload Mass) Mass [kg] Payload 100 150000 Structures 70 105000 Thermal 16,1 24150 Power 21,4 32100 Tracking Telemetry & Command 16,1 24150 Attitude Control 21,4 32100 Margin 28,6 42900 Propellant Tanks 10% of propellant mass 3,72E+05 Propellant Mass - 3,72E+06 Engines 10 raptor engines (1500 kg per engine) 1,50E+04 Gross Mass - 4,51E+06

29 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

Table 19. Weight budget for Booster of Launcher type IV Weights estimation for BOOSTER_2

Data Mass [kg] Dry Mass of Booster type IV 734767,3502 Structure 781089,6396 Propellant Mass 9583921,959

Engines 177302,5562 Tanks 958392,1959 Gross Mass 12235473,7

Table 20. Main materials estimation for Launcher type IV

Main materials used Mass for one Launcher type IV configuration [kg] Mass per person [kg] Total Mass for building all needed launchers type IV [kg] Stainless-Steel (Nickel and chrom alloy) 157500 3,15E+02 7,36E+07 Carbon fiber composite 5,80E+05 1,16E+03 2,71E+08 Fuel (liquid oxygen and methane) 5,57E+06 1,11E+04 2,60E+09 LOX 4347385,479 8694,770959 2030229019 Methane 1226185,648 2452,371296 572628697,6

Main materials used Mass for one BOOSTER_2 [kg] Mass per person [kg] Total Mass for building all needed BOOSTER_2 [kg] Stainless-Steel (Nickel and chrom alloy) 734767,3502 3673,836751 343136352,5 Carbon fiber composite 9761224,515 48806,12257 4558491849 Fuel (liquid oxygen and methane) 781089,6396 3905,448198 364768861,7 Liquid oxygen 609249,9189 3046,249595 284519712,1 Methane 171839,7207 859,1986036 80249149,58

Main materials used in launcher type IV + BOOSTER_2 Mass for one launcher type IV + BOOSTER_2 [kg] Mass per person [kg] Total Mass for building all needed launchers type IV + BOOSTER_2 [kg] Stainless-Steel (Nickel and chrom alloy) 892267,3502 3,99E+03 4,17E+08 Carbon fiber composite 10341081,63 49121,12257 4,83E+09 Fuel (liquid oxygen and methane) 6354660,767 5065,162424 2,97E+09 Liquid oxygen 4956635,398 24783,17699 2314748731 Methane 1398025,369 6990,126844 652877847,2

Table 21. Total weight budget for all vehicles

Main materials used in whole SHUTTLE systems production Total Mass for Shuttle_1 [kg] Total Mass for Shuttle_2 [kg] TOTAL MASS [kg] TOTAL MASS [Ton] Stainless-Steel (Nickel and chrom alloy) 2,78E+08 8,35E+07 3,62E+08 3,62E+05 Carbon fiber composite 5,49E+08 1,65E+08 7,14E+08 7,14E+05 LOX 3,74E+09 1,12E+09 4,87E+09 4,87E+06 Methane 1,06E+09 3,17E+08 1,37E+09 1,37E+06

Main materials used LAUNCHER II Mass for one LAUNCHER II [kg] Mass per person [kg] TOTAL MASS [kg] TOTAL MASS [Ton] Stainless-Steel (Nickel and chrom alloy) 1,69E+05 3,38E+02 7,88E+07 7,88E+04 Carbon fiber composite 1,30E+05 2,60E+02 6,06E+07 6,06E+04 LOX 7,49E+05 1,50E+03 3,50E+08 3,50E+05 Methane 2,11E+05 4,23E+02 9,87E+07 9,87E+04

Main materials used LAUNCHER IV Mass for one LAUNCHER IV [kg] Mass per person [kg] TOTAL MASS [kg] TOTAL MASS [Ton] Stainless-Steel (Nickel and chrom alloy) 8,92E+05 1,78E+03 4,17E+08 4,17E+05 Carbon fiber composite 1,03E+07 2,07E+04 4,83E+09 4,83E+06 LOX 4,96E+06 9,91E+03 2,31E+09 2,31E+06 Methane 1,40E+06 2,80E+03 6,53E+08 6,53E+05

TOTAL Main materials TOTAL MASS [kg] TOTAL MASS [Ton] Stainless-Steel (Nickel and chrom alloy) 8,57E+08 8,57E+05 Carbon fiber composite 5,60E+09 5,60E+06 LOX 7,53E+09 7,53E+06 Methane 2,12E+09 2,12E+06

30 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

4 ECONOMIC PLAN TABLES

In this section, the tables used so as to determine the total cost estimation are presented.

Table 22. Mars population and Starships sent to Mars per year

Year Mars population People transfered Number of Starships 2024 200 200 2

2027 1000 800 8 2029 9608,695652 8608,695652 86,08695652 2031 18217,3913 8608,695652 86,08695652 2033 26826,08696 8608,695652 86,08695652 2035 35434,78261 8608,695652 86,08695652 2037 44043,47826 8608,695652 86,08695652 2039 52652,17391 8608,695652 86,08695652 2041 61260,86957 8608,695652 86,08695652 2043 69869,56522 8608,695652 86,08695652 2045 78478,26087 8608,695652 86,08695652 2047 87086,95652 8608,695652 86,08695652

2049 95695,65217 8608,695652 86,08695652 2051 104304,3478 8608,695652 86,08695652

Table 23. Main materials price evolution data

Year Carbon fiber Stainless-steel LOX Methane 2012 80 2,5 13 1,2

2016 72 2,7 12,5 1,35 2020 90 3 13 1,75

Table 24. Fuel required per period Impulse velocity [m/s] Initial mass [kg] Fuel per transfer [kg] Fuel per all transfers [kg] 7283 1320000 1132891,665 2265783,329 6849 1320000 1109789,305 2219578,61 5756 1320000 1038167,545 8305340,361 6351 1320000 1079744,919 93937807,97 6772 1320000 1105402,12 96169984,42 7196 1320000 1128473,545 98177198,42 6361 1320000 1080388,551 93993803,95 5850 1320000 1045185,365 90931126,71 7008 1320000 1118566,796 97315311,21 7381 1320000 1137746,456 98983941,64 5893 1320000 1048337,126 91205329,96 5852 1320000 1045332,766 90943950,61 6420 1320000 1084151,036 94321140,1 6952 1320000 1115517,97 97050063,37

31 Bachelor Thesis: Analytical Study of SpaceX Mission Architecture to reach Mars Macía Fernández, O.

Table 25. Total cost estimation for performing Mars' colonization process

Item Quantity required Price per unit Total cost Crewed Starship 761 50.000.000,00 € 38.050.000.000,00 € Uncrewed Starship 305 40.000.000,00 € 12.200.000.000,00 € Super Heavy rocket 385 200.000.000,00 € 77.000.000.000,00 € LOX 8,24E+08 13,00 € 10.706.018.457,13 € CH4 2,32E+08 1,75 € 406.490.838,86 € Total cost 138.362.509.295,99 €

32