Research Update: MHD (magnetohydrodyanmics)

With all the other adventures going on in my life in the past 6 months, I’m frankly surprised I’ve made as much progress on my research as I have. A lot of that progress is likely due to the four weeks I spent in Hamburg, Germany (though even then, half the time I was gallivanting about Europe instead of working… 😉 )

Silly Science Content Warning: You will see nice big words like hydrodynamics. But fear not! That’s just the fancy name for how gases or fluids move… and the prefix ‘magneto’ just means that it also accounts for magnetic fields – I will often shorten it to ‘MHD’

So where do things stand since the last update? Well last time, I had submitted my first paper on column density profiles and was working on a new side of that research (using a chemistry solver in the simulations) as well as planning my trip to Germany.

Happily, at the beginning of September, after spending most of the summer working on two rounds of edits with the reviewer, my paper was published in the Astrophysical Journal (you can actually go see it here!) A lot of my research time after those edits was spent getting the chemistry solver to work within the simulations without crashing, or troubleshooting small details. For instance, I was trying to figure out why random elements would pop up in patches where they shouldn’t be.

At the same time, I was doing the whole wedding/honeymoon thing so a lot didn’t really get done.

IMG_1142By October, I was transitioning to working with a new code; I planned to use this code while in Germany. My simulations are run in a hydrodynamics code called FLASH. In my earlier attempts to put magnetic fields in my simulations, I kept running into bugs with the MHD solver that FLASH uses by default. Happily, my German collaborator/advisor found a new solver that was supposed to work without any bugs! Before I headed across the Atlantic, I was messing with the new code to be sure that I could use it.

I didn’t get all that far. I figured out that I needed to change versions of FLASH as well as went through and renamed a number of function calls so that they worked across versions. However, when I made it to Hamburg, I still didn’t have a simulation working.

In the first week I worked with my advisor in Germany to troubleshoot my code and after a relatively small fix (that took 4 days to find) I had a functioning magnetohydrodynamics simulation! YAY!

From there I did a number of small/short simulations to make sure that things were working correctly and I wasn’t getting results that seemed unreasonable. Once I had convinced myself that everything worked well, I began planning my official ‘suite of runs’… or in other words; deciding what I was going to change in each of my simulations so that I could actually learn something new. In a basic sense, this is like when you do a science experiment and only change one variable. Then you can compare between experiments and see what changes when you change that one thing. However, there are too many parameters to consider in these simulations to compare them each one by one. Instead, I needed to optimize my set of simulations so that I could compare as many different things as possible.IMG_2094

I wanted to compare different wind speeds, magnetic field strengths and magnetic field orientations. (Since magnetic fields can influence the way charged particles move, the direction of the fields can have a significant impact on my simulations.) I spent nearly an entire day putting together my list of 8 simulations.

Once that was done, I could start submitting the big simulations to the supercomputer!

Turns out, I was too ambitions at first and asked for too high of resolution – resulting in simulations that took forever. I had to adjust them and start again at lower resolution.

Now, I’ve nearly finished all of my runs and get to make fun plots! Like this!


This plot shows that as the simulation runs, the cloud begins to lose mass (as the variable ‘Mass Fraction’ decreases with time). However, for the runs with aligned magnetic fields (blue), meaning that the magnetic fields are pointing in the same direction as the wind is flowing, the clouds don’t lose as much mass as when the fields are perpendicular to the wind (transverse, orange). This is interesting because we actually would expect it to the the opposite! Transverse winds would seem to protect the cloud from getting destroyed as they would wrap around the cloud like a blanket as the wind rushes by, but it looks like they don’t! Then, comparing the blue and orange to the black line, we can see that either way, having magnetic fields does make the cloud loose less mass than if there are no magnetic fields (in the hydro only run).  Side Note: One of those lines is super short (the dashed orange one) because I haven’t finished that simulation yet so I don’t have all the data!

In the next two months I plan to finish writing up this work so that I can share it with advisors and collaborators and hopefully submit it by April!

That’s all the update for now!

6 thoughts on “Research Update: MHD (magnetohydrodyanmics)

  1. It is so easy to tell that you really love your work – you have so much passion when you talk about it, and your posts feel joyful (and educational).

    I’m curious – what is a “solver”?

    1. A “Solver” is a program or function in a program that calculates the solution to a set of equations. So an MHD solver, solves the equations for fluid motion that include a term for magnetic fields. A chemistry solver calculates the ratio of various elements by accounting for different kinds of reactions, which can be described by a set of equation.

      These are used in the simulations to figure out how the gas moves or what kinds of elements are in the gas – essentially recreating physics (from the equations we know to describe them) inside the simulation.

  2. I love how you share and explain your work. I know you love what you’re doing. I wish I could say I understand it all. But I don’t. Good luck as you press forward 👍😊🥰

  3. Yay! Learning new things! Finding new solutions! Doing fun plots! Its fun to read about your work and your progress!

  4. Wow, I checked outthe paper you published. Looks awesome, very “scientific”. And man am I glad you can explain things here, because I don’t think I’d get anything from trying to read that paper.

    I’m curious as to how big these “clouds” are – they’re galaxy outflows, right? So your simulations take a long time because their so big?

    1. The clouds are about 100 parsecs in radius…. so. BIG. However actual physical size isn’t all that important to the computer simulation. There are a certain number of boxes, and it doesn’t care whether those boxes are supposed to represent something 1 cm big or 1 parsec big.

      The actual reason that the simulations take a long time is that the time for the clouds to evolve is on the order of Millions of years, but the maximum time step for the simulations (so that they can calculate the physics as a it happens) is about 100 years. So the simulations are simulating 100 years of time for each 30 seconds it runs… but it has to do that ten thousand times (to get to a million years)… 30 seconds times ten thousand is about 3.5 days. 🙂

Comments are closed.