Tuesday, May 28, 2019

What do I do? 6: Rocket nozzles

When people find out that I am doing a PhD in Chemistry, they often ask, somewhat foolishly (by those who aren't really that interested), what it is I do.  I then find myself in a position of trying perform a juggling act to find the balance between a number of things.  How in detail do they want me to go?  Where's the right place between talking over their head, and sounding like a condescending jerk.  Are they actually interested, or are they just being polite.  Based on their background, what parts will they find most interesting?  On top of that, I need to plot a coherent course through my thought process so that if they are interested, they don't get lost in the maze inside my head.

So, I've decided to write it down, and see if I can make a logical series of articles about what I do, starting with the background information that's needed, eventually ending up on what I do day to day. Today I'm going to talk about designing a laval nozzle.


3D printed cross section of the first nozzle I designed that worked


So I'm changing up from what I've been talking about in this series so far, and I'm looking at getting more into the background needed to understand what my main PhD project has been.  I want to talk about something that I spent a little more than a year of my life learning enough math and going through trial and error until I came up with something that works.  My first major project in my lab was to write a computer program that would perform the math to calculate the contour of a de Laval nozzle, which is the same type of nozzle that is used on the bottom of rocket ships.

Why is it used on the bottom of rocket ships, and why do we want it in our lab?  The answer is the same.  De Laval nozzles are designed to have a wall that shapes the cloud of gas expanding out through them into a uniform flow, all molecules in the flow going the same direction, with the same speed, pressure, and temperature.  In thermodynamics, this type of flow is called isentropic.  Having the uniform flow is useful for rocket ships, because then all of the expansion is used as thrust in the direction the ship wants to go, yielding the highest efficiency for the engine.  For our experiment, we're not so interested in the supersonic speed of the expanding gas so much as we are the cooling properties, and the uniformity of the flow after exiting the nozzle.  I'll talk more about why we care in a later post.

Designing the nozzle, despite the fact that it's a solved problem that they've been doing since the 60's, was not trivial for me.  It involved a lot of math that I hadn't really ever learned, fluid dynamics, most of which I hadn't even heard of before, and combing through old textbooks and papers trying to put together an algorithm that was only ever partially reported in any one place. I found a lot of interesting information in an old NACA paper talking about the design, that included their FORTRAN script.  (NACA is the organization that later became NASA). After months of teaching myself the math I needed to be able to solve the problem, I finished a script that calculated the core of the nozzle, or the shape that it would be if life were ideal and the gas didn't interact with the walls of the nozzle.  It looks like this.
The black line is the shape of the core of the nozzle.  The hundreds of green and red lines that are there are the "characteristics" that I calculated in order to find where that black line was.  The characteristic lines are calculated so that the mass flux (amount of mass passing through them over time) of each line is exactly the same.  By calculating those lines, then matching them so the flux is equal across all of them, I was able to find my ideal core.  All told, to find this single nozzle, I calculated something like 1.2 million points.  But since I programmed the computer to do it, it only takes about 20 seconds.

Once I had the core, I had to go back, and adjust where the wall needed to be to account for the fact that we do not in fact live in an ideal world (sorry to disappoint you).  To do that, I needed to learn even more fluid dynamics, and more thermodynamics.  But once I did that, and solved the problem, it adds another 20 seconds to my program, and gives me an adjustment to the contour that follows more or less the same shape, but slightly bigger.

When I got this final shape working, I was pretty excited.  It had been a long time coming.  And finally, it was time to have my theoretical work turned into something physical.  I 3D printed a cross section of the first nozzle (to keep on my desk to show off how awesome I am), and sent the design to the machine shop to be made out of metal.  Here's what it looks like.


Kind of hard to see.  That's why I made the cross section print.  It was amazing to finally have something I could hold in my hands that was a result of all the work I'd been doing.  The final test, to make sure that I had done everything correctly, was to actually install the nozzle in the experiment, and measure the flow at many points throughout the chamber, to test that we were seeing a uniform flow coming out that we could use in our experiment.  We have an apparatus built specifically for that, which I may talk about later.  But the payoff is that the flow does work. If you were to look at the stream going past you with the nozzle on the right, the pressure inside it looks like the gif below over the course of about 40 microseconds (we pulse it, instead of flow continually).  There are a few frames where we get really good uniform flow, which is exactly what the design goal was.

This was an extremely challenging project (mostly because I didn't know enough math when I started to be able to do it), but when I saw the final result, it was totally worth it.  And since this is a rocket nozzle, the fact that I designed and made it makes me a rocket scientist, which is a fun fact I can use in 2 truths and a lie some day.

Friday, May 10, 2019

What do I do? 5: Microwave Spectroscopy in France

When people find out that I am doing a PhD in Chemistry, they often ask, somewhat foolishly (by those who aren't really that interested), what it is I do.  I then find myself in a position of trying perform a juggling act to find the balance between a number of things.  How in detail do they want me to go?  Where's the right place between talking over their head, and sounding like a condescending jerk.  Are they actually interested, or are they just being polite.  Based on their background, what parts will they find most interesting?  On top of that, I need to plot a coherent course through my thought process so that if they are interested, they don't get lost in the maze inside my head.

So, I've decided to write it down, and see if I can make a logical series of articles about what I do, starting with the background information that's needed, eventually ending up on what I do day to day. Today I'm going to talk about microwave spectroscopy.

You may remember my general post about spectroscopy, where I talked about how the energy of different regions of the electromagnetic spectrum correspond to the spacing between energy levels for different types of motion in the molecule.  Last time I talked about infrared spectroscopy, where we were looking at vibrational energy ladders.  This week, I want to talk about my main project in France, using a microwave spectrometer.  Microwaves you'll remember correspond to the rotation of a molecule.

Why am I interested in the rotational energy states of a molecule? A major benefit of rotational spectroscopy is that it is 100% dependent on the structure of the molecule.  If you can properly analyze what you are seeing in the spectrum, you can recreate the shape of the molecule.  Vice versa, with the structure of the molecule, you can perfectly predict what the spectrum will look like (that's a  slight lie.  In theory you should be able to...).  And because no two molecules are identical (if they are, we call them the same molecule), this spectrum acts like a fingerprint for the molecule, and can be used to identify the molecule with certainty.  This comes in handy when you want to monitor a reaction in real time, and need to be able to tell multiple molecules apart.  It also comes in handy when trying to identify what molecules we're seeing with our telescopes.  Rotational spectra can also give information like temperature, pressure, and concentration.  In the main experiment I do in California, we can use it to watch how the amount present of a particular molecule changes over time.  There are two challenges with using rotational spectroscopy this way.

The first problem is that going from a spectrum of the molecule to the structure of the molecule is extremely difficult if you know nothing about the molecule.  For anything that is not a straight line of atoms, the spectrum produced is complicated.  Here's an example of a small portion of the spectrum of vinyl cyanide, a relatively small molecule (smallecule) with only 7 atoms.


All of those are part of the fingerprint of vinyl cyanide.  To be fair, this spectrum is transitions that involve vibrational and rotational quantum states, but I have the spectrum for just pure rotation, and it is not any more clear than that.  There is so much data in these measurements, that my monitor doesn't have a fraction of the pixels it would need to display all of it at once.  If you zoom in further, there are even more lines hiding inside of other ones.  Imagine what it would look like if you had more than one molecule in the mixture, instead of just vinyl cyanide.

Ok Zach.  So you can't use rotational spectroscopy on unknown molecules.  But if you know what molecule you have, you can predict what the spectrum will look like.  So using it to monitor your reactions should be easy.

hahahahaha.  *tears of laughter and sadness...

If we could solve the quantum mechanical equations (schrodinger in particular) for the molecules, you would be right.  But there is really only 1 molecule we can do that for.  H2+.  Yep.  Not even H2 with both it's electrons.  H2 as long as it only has 1 electron.  The predictions we can make for other molecules range from pretty good to not even close.  In order to figure out the exact shape of a molecule, to the point needed for predicting it's spectrum, you need to fit it to experimental data.

The stage is now set for what I'm doing here in the lab in France.  Our goal here is to select molecules that look interesting, or are relevant, or haven't been studied, and actually measure the rotational spectra, then fit the computational guesses of the structure of those molecules to our data, so predictions in other regions get better.  I jokingly call it stamp collecting, because we're collecting molecular data.

We have two experiments set up to allow us to do this study.  We have one cell for studying stable molecules, and one for producing a plasma discharge, and studying the crazy things that makes.  While I've been here, I've helped build both set ups, and I've used them for studying multiple molecules, and have been working on the analysis of the data.  Work done here then can be compared to telescope data to identify features in them, or used in labs like my California lab for studies of kinetics.

Experimental setup at ISMO.  The cell lit up at the front (with a plasma) is for studying molecules produced in a plasma, while the cell in the back is used for studying stable molecules.

Next week I'm going to change gears, and write about fluid dynamics, particularly the math that I did in designing a rocket nozzle.