Appendix 4.3

%AAE 450

%Adam Butt

%Single Stage To Orbit (SSTO) Analysis

%Matlab Code

close all

clear all

mpl1=8610; %Payload mass for the first stage [kg]

mpl_upper=23000; %Payload mass for the upper stage [kg]

mpl2=mpl1+mpl_upper; %Total payload mass for the second burn [kg]

Isp1=340; %Specific impulse delivered from a CH3OH/LOX engine [s]

%Isp2=365; %Specific impulse delivered from a CH4/LOX engine [s]

Isp2=Isp1; %Specific impulse delivered from a CH3OH/LOX engine [s]

g=9.81; %Gravitational constant [m/s^2]

deltav=5660; %Total delta v required to return to Earth [m/s]

r_mars=3397; %Mean radius of Mars [km]

r_orbit=150; %"Optimal" orbital radius from the Marsian surface [km]

omega_mars=0.975; %Angular velocity of Mars [rev/day]

ang_vel_mars=omega_mars/(3600*24.62); %Angular velocity of Mars [rev/s]

mu_mars=4.2828e4; %Marsian gravitational constant [km^3/s^2]

v_surf=(r_mars*ang_vel_mars)*1000; %Surface velocity at an equitorial marsian latitude [m/s]

v_orbit=(sqrt(mu_mars/(r_mars+r_orbit)))*1000; %Velocity at the "optimal" orbit [m/s]

rho_methane=423.503; %Density of Methane [kg/m^3]

rho_methanol=794.413; %density of Methanol [kg/m^3]

rho_LOX=1140.412; %Density of LOX [kg/m^3]

mol_methane=16.043; %Molecular weight of methane [kg/kgmol]

mol_methanol=32.042; %Molecular weight of methanol [kg/kgmol]

mol_LOX=31.999; %Molecular weight of liquid oxygen [kg/kgmol]

r1=1.1; %Optimal mixture ratio for Methanol/LOX

r2=3.5; %Optimal mixture ratio for Methane/LOX

%D=3.2; %Max tank diameter [m]

%D2=6;

%R1=.5*D; %Tank radius [m]

%R2=4;

%D2=2*R2;

lambda1=0.93; %Propellant mass fraction for a storable prop. stage

lambda2=lambda1; %Propellant mass fraction for a storable prop. stage

%lambda2=0.88; %Propellant mass fraction for a cryogenic prop. stage

finert1=1-lambda1; %Inert mass fraction

finert2=1-lambda2; %Inert mass fraction

deltav1=(v_orbit-v_surf)+0.05*deltav; %Delta v fraction for first stage + err for losses

deltav2=(deltav-deltav1)+.025*deltav; %Delta v fraction for second stage + err for g-loss

deltav_tot=deltav1+deltav2;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%"Stage 2"

mp2=(lambda2*mpl2*(exp(deltav2/(g*Isp2))-1))/(exp(deltav2/(g*Isp2))*(lambda2-1)+1);

%Propellant mass for second stage [kg]

min2=mp2/lambda2-mp2; %Inert mass for the second stage [kg]

mo2=mp2+mpl2+min2; %Initial mass for the second stage [kg]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%"Stage 1"

mp1=(lambda1*(mp2+mpl1)*(exp(deltav1/(g*Isp1))-1))/(exp(deltav1/(g*Isp1))*(lambda1-1)+1);

%Propellant mass for fisrt stage [kg]

min_lower=(mp1/lambda1-mp1)+min2; %Inert mass for the lower stage [kg]

min1=min_lower+0.1*min_lower %Total inert mass plus 10% redundancy [kg]

mo1=mp1+(mpl1+mp2)+min1 %Initial mass for the first stage [kg]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Tank sizing for Stage 1

m1_LOX=mp1*((3*mol_LOX)/(3*mol_LOX+2*mol_methanol)); %Mass of LOX for 1st stage [kg]

m1_methanol=mp1*((2*mol_methanol)/(3*mol_LOX+2*mol_methanol));

%Mass of Methanol for 1st stage [kg]

V1_LOX=(m1_LOX/rho_LOX); %Volume for 1st stage LOX tanks (2 tanks) [m^3]

V1_methanol=(m1_methanol/rho_methanol)/4; %Volume for 1st stage methanol tanks (2 tanks) [m^3]

%L1_LOX=(V1_LOX-(4/3)*pi*R1^3)/(.25*pi*D^2) %Length of 1st stage LOX tanks [m]

%L1_methanol=(V1_methanol-(4/3)*pi*R1^3)/(.25*pi*D^2) %Length of 1st stage methanol tanks [m]

%L1_LOX_tot=2*R1+L1_LOX

%L1_methanol_tot=2*R1+L1_methanol

%R1_LOX=((3*V1_LOX)/(4*pi))^(1/3)

%R1_methanol=((3*V1_methanol)/(4*pi))^(1/3)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Tank sizing for Stage 2

m2_LOX=mp2*((3*mol_LOX)/(3*mol_LOX+2*mol_methanol)); %Mass of LOX for 2nd stage [kg]

m2_methanol=mp2*((2*mol_methanol)/(3*mol_LOX+2*mol_methanol));

%Mass of Methane for 2nd stage [kg]

V2_LOX=(m2_LOX/rho_LOX); %Volume for 2nd stage LOX tanks [m^3]

V2_methanol=(m2_methanol/rho_methanol)/4; %Volume for 2nd stage methane tanks [m^3]

%Cylindrical tanks

%L2_LOX=(4*V2_LOX)/(pi*D2^2) %Length of 2nd stage LOX tanks [m]

%L2_methanol=(4*V2_methanol)/(pi*D2^2) %Length of 2nd stage methane tanks [m]

%Cylindrical w/ hemispherical tops and bottoms

%L2_LOX=(V2_LOX-(4/3)*pi*R2^3)/(.25*pi*D2^2) %Length of 1st stage LOX tanks [m]

%L2_methanol=(V2_methanol-(4/3)*pi*R2^3)/(.25*pi*D2^2) %Length of 1st stage methanol tanks [m]

%L2_LOX_tot=2*R2+L2_LOX

%L2_methanol_tot=2*R2+L2_methanol

%Spherical tanks

%R2_LOX=((3*V2_LOX)/(4*pi))^(1/3)

%R2_methanol=((3*V2_methanol)/(4*pi))^(1/3)

%Toroidal tanks

r_meth=1.5;

R_methanol=(((V1_methanol+V2_methanol)*4)/2)/(2*pi^2*r_meth^2)

r_LOX=1.5;

R_LOX=((V1_LOX+V2_LOX)/2)/(2*pi^2*r_LOX^2)

%Methanol tanks (cylindrical w/ hemispherical tops and bottoms)

R1=1.1;

D=2*R1;

%L1_methanol=((V1_methanol+V2_methanol)-(4/3)*pi*R1^3)/(.25*pi*D^2);

%L1_methanol_tot=2*R1+L1_methanol

L1_methanol_tot=(4*(V1_methanol+V2_methanol))/(pi*D^2)

%LOX tanks (cylindrical)

D2=3;

R2=.5*D2;

V_LOX=(V1_LOX+V2_LOX)/4;

%L2_LOX=(V_LOX-(4/3)*pi*R2^3)/(.25*pi*D2^2)

%L2_LOX_tot=2*R2+L2_LOX

L2_LOX=(4*V_LOX)/(pi*D2^2)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

LOX_needed=m1_LOX+m2_LOX %Total mass of LOX to be produced

%Methane_needed=m2_methane %Total mass of Methane to be produced

Methanol_needed=m1_methanol+m2_methanol %Total mass of Methanol to be produced

V_total=V1_LOX+V1_methanol+V2_LOX+V2_methanol; %Total volume of the propellants [m^3]

mp_tot=mp1+mp2

%L_LOX_tot=2*R2_LOX+L1_LOX_tot

%L_methanol_tot=2*R2_methanol+L1_methanol_tot

Mt=(mp1+mp2)/450; %Mass of generic propellant produced per day [kg/day]

%Mt=(mp1)/450

Pe=0.145*(Mt)^1.238; %Elec. power in kilowatts required to produce propellant

Pe_sample_return=Pe-0.25*Pe;

Pe_washington=Pe-0.9*Pe;

Pe_final=1.5*Pe_washington

%Code to determine Hydrogen feedstock mass

clear all

close all

H2=5.5;

counter=1;

while H2>.00001

CH3OH=5.332*H2;

sum1(:,counter)=CH3OH;

H2O=5.662*H2;

O2=.88*H2O;

sum2(:,counter)=O2;

H2=H2O-O2;

counter=counter+1;

end

CH3OH_produced=sum(sum1)

O2_produced=sum(sum2)