


Given the need to store a defined mass of Liquid Hydrogen (lH_{2}) and Liquid Oxygen (lO_{2}), you can calculate the required tank volume from the following:
Density of lH_{2} rho_lH_{2} = 0.0708 gm/cc = 0.002558 lbs/in^{3} Density of lO_{2} rho_lO_{2} = 1.14 gm/cc = 0.041185 lbs/in^{3}
You can calculate tank volume by dividing fuel mass by density.
Here's how I worked through that for the Descent Stage:
Desc_Prop_Weight = Desc_Landed_Weight * EXP( Delta_V_Desc / ( ISP_Desc * g ) )  Desc_Landed_Weight ISP_Desc = 444.4 rl_10_mixture = 5.0 Desc_Fuel_Weight = Desc_Prop_Weight / (1 + rl_10_mixture) Desc_Oxy_Weight = Desc_Prop_Weight  Desc_Fuel_Weight g (English units) = 32.174 ft/sec^{2}
Awright, awright, don't give me a hard time about the difference between "weight" and "mass."
Once you have the volumes, deciding the shape of the tanks is something of an arcane art. You have to decide on spherical vs. cylindrical tanks, and how best to squoosh them into the available space without resorting to black magic.
If you want to calculate how long a cylindrical tank might be, here's a formula for computing tank length, given total volume, number of cylindrical tanks, and radius of the tank. I'm assuming a cylindrical section of radius rad_desc_oxy_tank_c, with hemispherical ends. Careful: if the length comes out negative it means your radius is too big.
len_desc_oxy_tank = (vol_desc_oxy_tank / num_desc_oxy_tanks  4/3 * PI() * rad_desc_oxy_tank_c^{3}) / ( PI() * rad_desc_oxy_tank_c^{2})
That's the length of the constant section, not total length including the end caps. If you want the overall length, add the diameter of the cylinder to len_desc_oxy_tank.
For the descent stage, I iterated on tank radius until a cluster of 6 hydrogen tanks around a central oxygen tank came out to have the correct total outside diameter to match up with the engine cluster below and the habitat module above.
Here are some handy geometric formulas for fiddling with cylindrical tanks:
Volume of Sphere = 4/3* PI * r^{3} Radius = (3/4 * Vol / PI)^{1/3} Area of Circle = PI * r^{2}
If you want to go whole hog and figure out the amount of aluminum you'll need to keep these gas molecules flying in formation with the rest of the spaceship, you'll need this:
Aluminum 2024 elasticity_al2024 1.06*10^{7} yield_stress_al2024 45000 ult_stress_al2024 61000 rho_al2024 0.1 lb/in^{3}
I used a tank pressure of 50 psi, assuming the tanks boil off at that pressure.

