Author Topic: Rocket chemistry math for a video game  (Read 7086 times)

Rocket chemistry math for a video game
« on: 08/04/2015 10:07 am »
Long story short, I am a game developer making a space-based game and I am having a rather difficult time trying to understand rocket fuels and the volume/mass ratios.

After research I've learned that LOH:LOX volume ratio for fuel should be 2.7:1. Now, I could just implement it in the game as-is, but I'd rather understand why this is. Perhaps someone smarter than me can point to where my math goes wrong?

2*H2 + O2 = 2*H2O

Density of liquid H2 is 71 kg/m3
Density of liquid O2 is 1141 kg/m3
This means that the Hydrogen tank needs to be 1141/71=16 times larger to contain the same mass of liquid.

Since I need 2 hydrogen molecules for every oxygen molecule, this means that I actually need 16*2=32 times the volume to store the hydrogen than I do to store oxygen. And yet I know that the space shuttle used only a 2.7:1 tank volume ratio of H2 to O2.

I know I must be missing something very obvious... can someone please point out what that is?
« Last Edit: 08/04/2015 11:26 am by Galactic Penguin SST »

Offline QuantumG

  • Senior Member
  • *****
  • Posts: 9266
  • Australia
  • Liked: 4489
  • Likes Given: 1126
Re: Chemistry math for a video game
« Reply #1 on: 08/04/2015 10:52 am »
First of all, mixture ratios are oxidizer:fuel. So, for LOX/RP1, the mixture ratio is 2.56 parts liquid oxygen by mass to 1 part RP1. The space shuttle used a LOX/LH2 mixture ratio of 6:1. What this means is that for every kg (or pound, or ounce or whatever measure you care to use) of liquid hydrogen you need 6 kg (or pound, or ounce or whatever) of liquid oxygen. Thing is, RP1 and LH2 and LOX all have different densities. RP1 is between 0.81 and 1.02 g/ml. LH2 is about 0.071 g/ml. LOX is about 1.14 g/ml. So you can think of RP1 and LOX as being around the same density of water, and your intuition of what 2.56:1 means is probably pretty good.. but LH2 is only about 7% of the density of water, so even though there's six times as much LOX as LH2 by mass in that mixture ratio, that still means the volume of the LH2 is going to be about 42 times the volume of the LOX.
Human spaceflight is basically just LARPing now.

Re: Chemistry math for a video game
« Reply #2 on: 08/04/2015 11:08 am »
Thanks QuantumG. I think I am just misunderstanding how density works... Mass of Hydrogen is 1, mass of Oxygen is 16, very close to the 1141/71 ratio. Assuming that means that 1L of liquid H2 contains roughly the same number of molecules as 1L of O2... then logically I'd need 2 tanks of H2 for every tank of O2, or 71*2=142 kg of H2 for every 1141 kg of O2. This makes more sense, and the mass ratio of O2 to H2 becomes 1141:142, or 8:1. Volume is 1:2 (1 tank of O2 for 2 tanks of H2). Plugging in the optimal mass ratio of 6:1, 1141/6=190. Now 190/71=2.67. So I guess that's what I was getting wrong.

Offline kevin-rf

  • Elite Veteran
  • Senior Member
  • *****
  • Posts: 8823
  • Overlooking the path Mary's little Lamb took..
  • Liked: 1318
  • Likes Given: 306
Re: Rocket chemistry math for a video game
« Reply #3 on: 08/04/2015 01:04 pm »
Also a rocket engines never burn fuels in a stoichiometric mixture (exact ratio of fuel/oxidizer), but usually burn either fuel rich, or oxidizer rich.

LH/LOX and Kero/LOX rockets usually burn fuel rich for different reasons. 

LH is usually burned LH rich to improve ISP, at a loss of thrust. You can burn LOX rich to improve thrust but take an ISP hit. If using LH, high ISP is the name of the game.

Kero/LOX takes an ISP hit, but this is to keep the metals in the engine from burning. Metal burns in these conditions and it is quite spectacular. For the highest Kero ISP and performance you want to burn Oxidizer rich, specifically Oxidizer Rich Stage combustion. It is a tricky devil to master and can lead to spectacular failures.

Only the NK-15 (N-1 Rocket), NK-33 (N-1 upgrade, Antares), RD-170 (Energia/Buran), RD-171 (Zenit), RD-180 (Atlas V), and Be-4 (under development for Zeus) are the only Oxidizer Rich Staged Combustion to date. The SpaceX Merlin family, RS-27 (Delta II, III), MA-5 (Atlas Propulsion pack), and F-1 (Saturn V) are all examples of fuel rich kero rocket engines
« Last Edit: 08/04/2015 01:05 pm by kevin-rf »
If you're happy and you know it,
It's your med's!

Offline strangequark

  • Full Member
  • ****
  • Posts: 1072
  • Co-Founder, Tesseract Space
  • San Francisco, CA
  • Liked: 226
  • Likes Given: 12
Re: Rocket chemistry math for a video game
« Reply #4 on: 08/04/2015 04:08 pm »
Gotta jump in. "Oxidizer rich" in the context of staged combustion engines is talking about the mixture in the preburner, not the main combustion chamber.

The mixture ratio in the main combustion chamber is still fuel rich.
« Last Edit: 08/04/2015 04:09 pm by strangequark »

Offline nadreck

Re: Rocket chemistry math for a video game
« Reply #5 on: 08/04/2015 04:30 pm »
Gotta jump in. "Oxidizer rich" in the context of staged combustion engines is talking about the mixture in the preburner, not the main combustion chamber.

The mixture ratio in the main combustion chamber is still fuel rich.

I have to jump in here too, oxidizer rich is dependent on the fuel vs oxidizer and ultimately it is a matter of finding the highest ISP(and exhaust velocity) and the exhaust velocity while partially dependent on nozzle shape and combustion chamber pressure it is also related to average molecular weight and average chamber temperature.  When burning lighter hydrocarbons (CH4) or Hydrogen as fuel running fuel rich lowers the average molecular weight of the exhaust, however when burning heavier hydrocarbons extra O2 is often slightly bringing down the average molecular weight of the exhaust depending on ratio of carbon atoms to hydrogen atoms the mix of hydrocarbon compounds in the fuel which dictates the ratio of CO2 to H2O in the exhaust. However it is only a slight difference from the stoichiometric mixture ratio for hydrocarbons but a larger difference for Hydrogen/Oxygen. But for heavy hydrocarbons you do want to ensure that you don't leave any of the C3 or higher molecules unbroken as they weigh more than any of the exhaust products.
It is all well and good to quote those things that made it past your confirmation bias that other people wrote, but this is a discussion board damnit! Let us know what you think! And why!

Offline strangequark

  • Full Member
  • ****
  • Posts: 1072
  • Co-Founder, Tesseract Space
  • San Francisco, CA
  • Liked: 226
  • Likes Given: 12
Re: Rocket chemistry math for a video game
« Reply #6 on: 08/04/2015 05:17 pm »
Gotta jump in. "Oxidizer rich" in the context of staged combustion engines is talking about the mixture in the preburner, not the main combustion chamber.

The mixture ratio in the main combustion chamber is still fuel rich.

I have to jump in here too, oxidizer rich is dependent on the fuel vs oxidizer and ultimately it is a matter of finding the highest ISP(and exhaust velocity) and the exhaust velocity while partially dependent on nozzle shape and combustion chamber pressure it is also related to average molecular weight and average chamber temperature.  When burning lighter hydrocarbons (CH4) or Hydrogen as fuel running fuel rich lowers the average molecular weight of the exhaust, however when burning heavier hydrocarbons extra O2 is often slightly bringing down the average molecular weight of the exhaust depending on ratio of carbon atoms to hydrogen atoms the mix of hydrocarbon compounds in the fuel which dictates the ratio of CO2 to H2O in the exhaust. However it is only a slight difference from the stoichiometric mixture ratio for hydrocarbons but a larger difference for Hydrogen/Oxygen. But for heavy hydrocarbons you do want to ensure that you don't leave any of the C3 or higher molecules unbroken as they weigh more than any of the exhaust products.

All the main operational fuels are run fuel rich.

RP-1/LOX - Stoich: ~3.4, Typical: 2.4-2.8
H2/LOX - Stoich: 8, Typical 5-6
MMH/NTO - Stoich: 2.5, Typical: ~1.7
 
You're going to break down the heavy hydrocarbons anyway, as a result of temperature, not mixture ratio. 
« Last Edit: 08/04/2015 05:23 pm by strangequark »

Offline nadreck

Re: Rocket chemistry math for a video game
« Reply #7 on: 08/04/2015 06:06 pm »
Gotta jump in. "Oxidizer rich" in the context of staged combustion engines is talking about the mixture in the preburner, not the main combustion chamber.

The mixture ratio in the main combustion chamber is still fuel rich.

I have to jump in here too, oxidizer rich is dependent on the fuel vs oxidizer and ultimately it is a matter of finding the highest ISP(and exhaust velocity) and the exhaust velocity while partially dependent on nozzle shape and combustion chamber pressure it is also related to average molecular weight and average chamber temperature.  When burning lighter hydrocarbons (CH4) or Hydrogen as fuel running fuel rich lowers the average molecular weight of the exhaust, however when burning heavier hydrocarbons extra O2 is often slightly bringing down the average molecular weight of the exhaust depending on ratio of carbon atoms to hydrogen atoms the mix of hydrocarbon compounds in the fuel which dictates the ratio of CO2 to H2O in the exhaust. However it is only a slight difference from the stoichiometric mixture ratio for hydrocarbons but a larger difference for Hydrogen/Oxygen. But for heavy hydrocarbons you do want to ensure that you don't leave any of the C3 or higher molecules unbroken as they weigh more than any of the exhaust products.

All the main operational fuels are run fuel rich.

RP-1/LOX - Stoich: ~3.4, Typical: 2.4-2.8
H2/LOX - Stoich: 8, Typical 5-6
MMH/NTO - Stoich: 2.5, Typical: ~1.7
 
You're going to break down the heavy hydrocarbons anyway, as a result of temperature, not mixture ratio.

Actually C3 is the limiting carbon chain element as it is harder to break down than the heavier ones, however CO is still more likely as long as there is enough oxygen for that, CO is just under the weight of O2 though and in the case of fuel rich RP-1 yes you are right, it ends up being a little more efficient than oxydizer rich, but the limiting factors on either side of Stoich ratios are much closer with hydrocarbon than hydrogen. The most efficient for H2 and LOX would be 4 but because the density is so low a compromise to 5-6 is usually made.
It is all well and good to quote those things that made it past your confirmation bias that other people wrote, but this is a discussion board damnit! Let us know what you think! And why!

Offline R7

  • Propulsophile
  • Senior Member
  • *****
  • Posts: 2725
    • Don't worry.. we can still be fans of OSC and SNC
  • Liked: 992
  • Likes Given: 668
Re: Chemistry math for a video game
« Reply #8 on: 08/04/2015 06:40 pm »
LH2 is only about 7% of the density of water, so even though there's six times as much LOX as LH2 by mass in that mixture ratio, that still means the volume of the LH2 is going to be about 42 times the volume of the LOX.

No. Let O/F by mass be X:1, fuel density df and oxidizer density do.

Volumetric F/O (note the reverse!) ratio = (1/df)/(X/do)

For usual hydrolox engine the values are 6:1, df 71 and do 1141 (unit irrelevant it gets canceled away)

(1/71)/(6/1141) = 2.68
AD·ASTRA·ASTRORVM·GRATIA

Re: Rocket chemistry math for a video game
« Reply #9 on: 08/06/2015 05:47 am »
Thanks, guys! It all makes a lot more sense now.

Offline Ohsin

  • Full Member
  • ****
  • Posts: 1469
  • Liked: 1453
  • Likes Given: 2379
Re: Rocket chemistry math for a video game
« Reply #10 on: 08/06/2015 04:17 pm »
Is it for 'Indie Galactic Space Jam' ?
"Well, three cheers to Sharma, but our real baby is INSAT."

Tags:
 

Advertisement NovaTech
Advertisement Northrop Grumman
Advertisement
Advertisement Margaritaville Beach Resort South Padre Island
Advertisement Brady Kenniston
Advertisement NextSpaceflight
Advertisement Nathan Barker Photography
1