Hydrogen emission spectrum and conversion to RGB

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
1
Points
0
Location
Moscow
The problem: display realistically coloured hydrogen exhaust from a nuclear thermal rocket, with realistic change of colour when exhaust temperature changes.

Being no physicist, that's what I've got so far:
http://www.midnightkite.com/color.html (wavelength to RGB)

Rydberg's equation ([ame="http://en.wikipedia.org/wiki/Rydberg_formula"]Rydberg formula - Wikipedia, the free encyclopedia[/ame])

The next obvious step is to calculate the "weights" for the emission lines basing off the known temperature (probably by blackbody curve ??) and to compute a weighted average of RGB triples corresponding to visible emission lines. BUT: I sense with a gut feeling that those "weights" won't sum to unity, and there can be some silly mistake in the steps. Would anybody with _real_ knowledge of physics please tell me if these steps are sound?
 

xlns

Member
Joined
Sep 12, 2010
Messages
43
Reaction score
0
Points
6
The problem: display realistically coloured hydrogen exhaust from a nuclear thermal rocket, with realistic change of colour when exhaust temperature changes.

Being no physicist, that's what I've got so far:
http://www.midnightkite.com/color.html (wavelength to RGB)

Rydberg's equation (Rydberg formula - Wikipedia, the free encyclopedia)

The next obvious step is to calculate the "weights" for the emission lines basing off the known temperature (probably by blackbody curve ??) and to compute a weighted average of RGB triples corresponding to visible emission lines. BUT: I sense with a gut feeling that those "weights" won't sum to unity, and there can be some silly mistake in the steps. Would anybody with _real_ knowledge of physics please tell me if these steps are sound?

Well, it's not a small feat to derive color of heated hydrogen from first principles. I'd rip off color photo of NERVA burning or just make it up :) Anyway, I did some thinking and this is the way I'd handle this. First, what temperature range are we talking about? If it's >5000K, we are talking plasma and I have no clue what happens there. At temps below, you are right to take Rydberg formula - there are many corrections to it, but none visible by naked eye. Since we can see only 1.8-3.1 eV, there shouldn't be many H transitions that are of interest for the problem at hand, this says 8 of those, also you have relative intensities. Along with relative intensities, which are related to quantum amplitudes of electronic transitions, you need to take into account population of individual levels. For a given temperature T, population of level

p(i) = g(i) e^(-E(i)/kT) / sum (g(i) e^(-E(i)/kT))

sum over all relevant energies, p(i) would be percentage of population of level i and g(i) is degeneracy of level. E(i) = e(i) - e(0) where e(i) are Rydberg energies. The hard part, spatial distribution of temperature, I'd take De Laval nozzle and it's temperature distribution. In my opinion, you would get way too long of a fire tail. I think that's because far behind nozzle, gas gets very diluted so atomic collision are no longer efficient mechanism for transforming atomic kinetic energy to electromagnetic radiation, even gas still has high temperature - but I may be wrong about that. Also, since atomic physics isn't quite my area of expertize, may be you should run this by top brass, along with my answer if you wish so. And finally, if you come up with a picture or something, it would be great if you post it here, I'd love to see it. Good luck!
 

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
1
Points
0
Location
Moscow
I take it that degeneracy of level i (hopefully not mine, but that of hydrogen) is the same as density of states... :) http://britneyspears.ac/physics/dos/dos.htm ...

At the moment I'm simplifying things a lot and am not modelling the distribution of temperatures in the nozzle or in the exhaust (heck, I'd like to model ramp-up of exhaust T and changing specific impulse, but put it off for now). It turns out hydrogen lamps are widely used for temp calibration, and they do change color noticeably while heating up to operating temps.

Programmatically, I suspect that drawing a few textures, each for its own temperature, and mixing them from the vessel's code will be the dumbest and hence the most probable solution to the graphical problem.

:cheers:

EDIT: from basic-level handbooks: [math]g(n) = n^2[/math]
The partition function [math]z=\sum{g(i)e^{-\epsilon/kT}}[/math]
Electron energy at level n: [math]\epsilon(n) = -13.60569193 eV/(n^2)[/math]
Boltzmann's [math]k = 8.617343e^-5 eV/K[/math]
To be continued... (and also to see how many mistakes I make :) )
 
Last edited:

xlns

Member
Joined
Sep 12, 2010
Messages
43
Reaction score
0
Points
6
I take it that degeneracy of level i (hopefully not mine, but that of hydrogen) is the same as density of states... :) http://britneyspears.ac/physics/dos/dos.htm ...

At the moment I'm simplifying things a lot and am not modelling the distribution of temperatures in the nozzle or in the exhaust (heck, I'd like to model ramp-up of exhaust T and changing specific impulse, but put it off for now). It turns out hydrogen lamps are widely used for temp calibration, and they do change color noticeably while heating up to operating temps.

Programmatically, I suspect that drawing a few textures, each for its own temperature, and mixing them from the vessel's code will be the dumbest and hence the most probable solution to the graphical problem.

:cheers:

EDIT: from basic-level handbooks: [math]g(n) = n^2[/math]
The partition function [math]z=\sum{g(i)e^{-\epsilon/kT}}[/math]
Electron energy at level n: [math]\epsilon(n) = -13.60569193 eV/(n^2)[/math]
Boltzmann's [math]k = 8.617343e^-5 eV/K[/math]
To be continued... (and also to see how many mistakes I make :) )

Ok, you got all the ingredients to take a reasonable shot at this. Do note that you may add any constant to [math]\epsilon(n) = C - 13.60569193 eV/(n^2)[/math] so you can handle numerics easier. Good luck!
 

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
1
Points
0
Location
Moscow
Okay, with a few re-normalizations, NIST's transition probabilities and CIE's eye sensitivity curve achieved the result (attached).

Steps:
1. Get shares of atoms at each of the "relevant" levels (3 through 9).
2. Re-normalize basic transition probabilities so the maximum [math]A_{n2}[/math] is set to unity. (at the moment there is no estimate of energy density [math]\rho[/math] and I don't know [math]B_{n2}[/math] coefficients.
3. Multiply the shares from step 1 by transition ratios from step 2. These are pseudo-intensities (well, I could make it into photon counts per mole, but WTH).
4. Pre-compute RGB values for each of 7 Balmer line wavelengths, accounting for eye sensitivity curve (maximum at 555 nm).
5. Add up RGB values for each of the R, G, B channels weighted by pseudo-intensities from step 3.
6. Apply gamma correction [math]R*=R^\gamma[/math] etc.
7. Scale R, G, B values so that the maximum is 1.
8. Convert doubles into 0-255 integers...
 

Attachments

  • Hydrogen colors demo.pdf
    56.8 KB · Views: 12

RisingFury

OBSP developer
Addon Developer
Joined
Aug 15, 2008
Messages
6,427
Reaction score
492
Points
173
Location
Among bits and Bytes...
I have a picture of hydrogen plasma on my phone from one of the experiments I did at university, I'll post it when I get home. I know that the phone camera isn't the best way to measure colors and I don't know what temperature the plasma was at, but it seems far more bluish then your table.
 

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
1
Points
0
Location
Moscow
The formulae I concocted gave a huge bias towards red AFAIR, would be thankful for the pic. Folks who have used hydrogen lamps down here also commented about characteristic blueishness (that was before I made the table)... Suppose I'll have to dig up Landau-Lifschitz (or whatever passes for standard physics text nowadays) and get the correct formula for transition probs.

P.S. If there's plasma at 2900K, my calculations are screwed anyway - isn't plasma a continuous emitter?

P.P.S. The next time around I'll be using CIE X,Y,Z color space for wavelength conversion, and possibly alpha channel, too, to represent intensity.
 
Last edited:

xlns

Member
Joined
Sep 12, 2010
Messages
43
Reaction score
0
Points
6
The formulae I concocted gave a huge bias towards red AFAIR, would be thankful for the pic. Folks who have used hydrogen lamps down here also commented about characteristic blueishness (that was before I made the table)... Suppose I'll have to dig up Landau-Lifschitz (or whatever passes for standard physics text nowadays) and get the correct formula for transition probs.

P.S. If there's plasma at 2900K, my calculations are screwed anyway - isn't plasma a continuous emitter?

P.P.S. The next time around I'll be using CIE X,Y,Z color space for wavelength conversion, and possibly alpha channel, too, to represent intensity.

Although I though you nailed it, 'couse Google picture search on "hydrogen plasma" has a number of pink plasmas, but blue ones appear too. Also, in astronomical pictures, hydrogen is always pink. Anyway, I don't think you are far off, but this "blue" problem may be interesting to look at - I hope Fury finds the time to post his pic. Ok, it may be a number of things: first, it may be contamination. Other influence not taken into account is that even on high temperatures, there is significant percentage of molecular hydrogen; but I doubt that may reproduce blueness - molecular and vib-rot spectra aren't so energetic to be blue (2.5-3eV).

Also, there is no explicit formula for those transition probabilities - they are calculated as integral of hydrogen electron wave functions of level 2 and c.c. of w.f. of level n with electric dipol operator in-between (something like |<n|D|2|>|^2) IIRC. I'll check my literature, but also - could you please post link to transition amplitudes you've used? I'd like to take a look.

As for plasma,2900K is high, but you are still good, IMO - 1 in 100 may be ionized in my estimate.
 

RisingFury

OBSP developer
Addon Developer
Joined
Aug 15, 2008
Messages
6,427
Reaction score
492
Points
173
Location
Among bits and Bytes...
Hydrogen plasma:
DSC00013.JPG

DSC00014.JPG


Neon plasma:
DSC00015.JPG


Partial neon spectrum:
DSC00017.JPG



Like I said, I don't know how calibrated colors are on my phone and I know the CCD cam can pick up near IR and part of UV spectrum... also, the CCD chip isn't equally sensitive to blue light as it is to red, so colors might be off...
 

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
1
Points
0
Location
Moscow
Re: transition probabilities - they were taken from CRC Handbook of Chemistry and Physics citing NIST. Was away from the 'Net when calculating the colors, thus did not use NIST's site (http://www.nist.gov/pml/data/atomspec.cfm). A lame excuse, I know.

Re: photos. A) Blessed are the times of ubiquitous cameras, and B) now I know what to use for my light saber...

The NIST handbook (http://www.nist.gov/pml/data/handbook/index.cfm) gives the following reference along with the probs:

NIST Transition Probabilities Bibliographic Reference # 8637

Transition probabilities for one electron atoms,
J. Baker, Natl. Inst. Stand. Technol. Technical Note 1612, 8 pp. (Washington, DC, 2008)
 
Last edited:
Top