Season 2, Episode 5: Why Should I Care About Surface Tension?

What do the blood in your blood vessels, the waves on a beach, and bubbles from a bubble bath have in common? They’re all fluids, interacting with other fluids in complex ways that can be modeled by computers! Join expert Alex Barrett and guests Cole Barker and Christina Niavi to learn more about the important role surface tension plays in interactions between fluids, and the many important applications of modeling these complicated processes.

In Plain English now has a Discord server! Join here to chat with other listeners, past experts, and guests about science, suggest new episode topics, and more!

Remember to follow In Plain English on Facebook , Twitter, and Instagram to keep up with the latest announcements! If you are able, please consider becoming a Patron to help support In Plain English!

And check out our Where to Listen page to subscribe to our podcast on your favorite platform!

Photo Credit: Bavand Keshavarz, CC BY-SA 4.0, via Wikimedia Commons

Article PDF

Episode Transcript

Jamie Moffa: All right. Hello, everyone, and welcome to Season 2, Episode 5 of In Plain English. On today’s episode, we’re going to be discussing the paper, “A Continuum Method for Modeling Surface Tension” by J.U. Brackbill et. al. Our expert today who’s going to be presenting this paper is Alex Barrett. Alex, welcome to the podcast.

Alex Barrett: Hello. Thanks for having me on again, as an expert this time.

JM: Would you like to remind the audience what it is that you do?

AB: So I am a PhD candidate at the University of Minnesota working in the Computational Hypersonics Research Laboratory under Graham V. Candler, and I do work on computational modeling of multi-phase flows.

JM: Awesome. Joining us today as our non-expert guests are Cole Barker and Christina Niavi. Cole, Christina, would you each like to briefly introduce yourselves?

Cole Barker: Hi, I’m Cole. I am currently a barista at a coffee shop here in St. Louis, and met Jamie on the Bernie Sanders campaign.

Christina Niavi: Hi, everyone. I’m Christina. I’m a PhD candidate at Emory University in Atlanta. I’m a third year and I study immunology. So I really have no idea what is happening here today.

JM: All right. Well, let’s get started so we can figure out what’s happening.

AB: Before I even get into anything that is directly about the paper, I am going to just give a bit of an overview of what is computational fluid dynamics and what the current methods are for how they’re solved and how the programs developed for this work.

Fluids as a whole field is represented almost entirely by a set of equations called the Navier-Stokes equations, which is just a set of three equations, a conservation of mass, conservation of momentum, and conservation of energy. So basically throughout all of the time and space of the entire system you’re working in, you cannot create energy, mass, or momentum, or lose it without some external force applied to the system. These three conservation laws are pretty important for everything that happens, and they are actually one of the millennium problems, which are just a series of problems that have been put forth as there are no current analytical solutions for these, and it pays out a million dollars if you can solve it.

In order to solve these equations, we have to do approximation to be able to plug it into a computer and actually solve for it, because it’s a differential equation, so you’ve got derivatives in all three primary directions as well as time, and then even further derivatives for certain components of the equations.

JM: Maybe you could just explain why that makes them, why that’s difficult to solve for.

AB: Okay, so take a plot of a simple function like y equals x squared. The derivative of this function with respect to x would be the slope of that line, so the derivative is just a slope, and a partial derivative is a slope with respect to a single component, so you could do the slope of something with respect to x, y, z, time, etc. The problem is with the Navier-Stokes equations, we only have the slope calculations. We don’t have that original equation, and because of how intertwined all of the components are, you can’t just do a simple backing things out because you have x that’s dependent on y and t and z, and all the terms are dependent on each other, so, and you can’t just make these nice solutions without heavy simplification. So there are certain cases where it can be done, but it’s eliminating a large chunk of what actually drives the flow, including surface tension, which is what the paper is trying to look into.

Going from there, the idea of what computational fluid dynamics solvers are doing is creating a way to do small sections of the problem that is where we start looking at, okay, if I have this large region of space, how do I break this down into small enough components that I can accurately represent the physics of the problem that I’m trying to solve?

So a couple of the main methods that are used for this are finite difference, where you just have a series of points that are usually in a xyz uniform lattice, you’re measuring the flow at those singular points. You’re able to use the neighboring points to create an input and an output so that you can calculate, okay, if it is at this state, taking the information from neighboring points at this relative distance, it should have changed this much for variables like fluid velocity, density, pressure, etc.

Another method is finite volume, which is similar, but instead of having a lattice of points, we have a lattice of cells, which you can picture the lattice of points, the cells are just now the volumes contained by a set of those points. I guess a good way to describe it would be take a bunch of four by four Lego bricks, and if you build a bigger cube out of them, each Lego brick would be a cell in the mesh.

JM: So I’m trying to envision how this is working, or what this is being applied to. Would it be possible to give an example, just to sort of ground listeners in what you might be using this to figure out?

AB: Yeah, I’m gonna use a car wind tunnel as a good example, because that has a good visual parallel. So in car wind tunnels, you’ll often see them do like a, they’ll have a stream of smoke that they blow across the car to show how fluid is traveling around the vehicle. What we’re doing in computational CFD is we’re trying to do something very similar, but computationally, and the mesh is just a way to calculate the flow over the region.

JM: That helps me, I’m not sure if it helps Cole or Christina, but now I’m envisioning the streams of smoke going over a car and just replacing that with a mesh.

AB: Yeah, or like if you go outside on a cold day and you can see your breath, because you can see how your breath is flowing away from you and out of your mouth, and we’re trying to recreate that sort of idea computationally. The nice thing with the computer or doing it computationally is we can visually see what the velocity is, what the density is, rather than have to have a marker like smoke.

CB: So going back to the car wind tunnel example, instead of using smoke, there would be what sensors on the car that are collecting data, and then—

AB: So that would be under the experimental end of studies so that you can use certain sensors and testing equipment to get physical properties in the real world. In computational fluid dynamics, we’d be trying to take an entirely computational representation of the air around the car, and we would be initializing, say, a certain velocity of air, and then the computer calculates at every single point that you are looking at what the properties are expected to be at those locations.

So actually, what you were saying is something that is used often to prove the validity of a CFD software is if it can match experimental measurements, then it is assumed to be producing, or if it can do that consistently, then it is assumed to be correctly simulating the flow field.

CB: I think I’m tracking.

AB: Going back to the different methods, a big one is finite volume, which is like the Lego brick cube that I described, and basically for each of those smaller cubes, each face of the cube has some amount or has some flux across it, which determines how much of a quantity is going into that cell and how much is going out of that cell, and that is used to calculate the time-advanced properties for, again, density, velocity, energy, pressure, within each of those cells, which are the cells are treated as a singular unit that—where the entire cell has a certain value for each variable.

CN: Let me ask a very, very beginner question here. So from what I understand of what is fluid dynamics and computational in this case, fluid dynamics, so what you’re trying to do with these equations is that you’re trying to predict all the different features of the fluid flow, as you said, like velocity and everything, and that’s applicable from what I know in engineering and biology as well. I know some things. So pretty much it’s a prediction mechanism, right?

AB: Yes, it’s a method for—the goal of it is to create methods and models that can be used to predict stuff so that you don’t have to build a test apparatus every single time you want to test something. A lot of the stuff that I’m doing is related to aerospace engineering, so aircraft and spacecraft reentry is a big one, but it has been used for a huge variety of fields as there’s a lot of fluids in life.

JM: I mean, for our biologically inclined friends, it’s very useful. Sometimes—your blood vessels can be modeled this way because you’ve got fluid that’s flowing through a space and it can be useful. Sometimes you can get a pocket in your blood vessel called an aneurysm, and I imagine this sort of thing can be useful—

AB: There was a professor at the university I’m at who used to actually model or do fluid modeling of aneurysms. That’s a big one. I was at a conference last summer where one of the big, or one of the main speakers was actually talking about how fluid—talking about fluid modeling for coughing and how like an expulsion of air will be able to pick up more viscous fluids in the airway and how that sheet of fluid or of more viscous fluid breaks up and moves. Actually, it has a lot of application for pandemic modeling.

CN: For sure. Yes, actually, that was what I had in mind and thank you Jamie for going towards the biological examples.

JM: That’s just what I’m grasping for.

CN: It’s definitely very interesting with the different viscosity of different fluids.

AB: Yep, so things like how the mucus gets from the airways out into the air. Can use it to show how effective a mask can be, for example. Also, and this one, this example is a little more for Cole, but probably most of the bar equipment that you use that has any fluid running through it has probably been modeled with fluid solvers. While fluids is still a very in development field for a lot of complicated, or a lot more complicated flows, a lot of things, especially with water and other similar incompressible fluids, those are much easier to model. Or pipe flow is one of the first things that most engineering students learn about fluids.

CN: Yeah, you’re right. It was like from the very beginning what people used in engineering applications. I will throw in here my Greek roots because I was really like impressed once I went to a museum back in Greece that, it was about ancient Greek technology and like 90 percent of all those first engineering applications like automatic doors or anything else would be many of them like 90 percent with fluidics-based. So it’s just like the first thing that people grasped and like used. So it’s amazing and we’re still using it and it’s so advanced today, of course.

AB: Yeah, fluids have historically been a huge, huge factor for driving a lot of things. Agriculture, Roman civilization managed to figure out how to actually have flowing water for fountains and such and that was all just gravitational fluids. We’re now, as time has moved forward, we’ve been getting more and more invested in how do we mathematically represent what’s happening with fluids and now we’re finally getting to the point where enough work has been, or enough prior work has been built up and computers are getting strong enough that we can start simulating closer and closer to the actual full Navier-Stokes equations.

Hopefully that all gives a good general background on what’s happening and how all this fluid stuff works, and how things are set up for CFD solvers to actually simulate the fluid, and what they do, and a little bit of why.

CN: Yeah, that is truly interesting. How many things we can, or try at least a little bit [inaudible] like simulate nowadays. Again, I will go back to the biology because that’s what I can talk about, but I did try not in a similar way, but trying a prediction model of how a cell in my case, a biological cell, works once and instead of going through all the experiments with the model organisms and everything, we’re just doing an equation and we’re getting, of course, not a definite answer. In our case, we had to still validate if the model works, but yeah, you can get some success rate and it’s great because it solves a lot of big issues of, as we said, actually building the models for everything. It’s amazing.

AB: Yeah, just computational—being able to simulate things computationally allows generally for a lot faster and a lot cheaper iteration processes. So if you’re not certain if something will work, you don’t have to spend, you know, half a million dollars building a prototype, you can spend half a million dollars on a computer system that you can then run hundreds of thousands of models through in—or have different models or configurations, setups of anything in a couple days.

Now, the time scale is going to depend on how good your computer is. They can range from, you can run CFD on even like a cruddy laptop, it’s going to take forever, but you can run it. And then on the high end, you have supercomputer clusters, which the person that did the coughing model simulation ran that on the largest computational computer cluster in the world. You have these massive differences in scales on computer size and capability. And the computer really just ends up becoming a factor in how quickly do you want this to run because, or how quickly do you need it to run is really more the factor because it’s always deadlines that drive everything.

Yeah, really simple stuff can run that super quick on pretty much anything as you start adding in more and more components and more and more complexity or you start making the, especially if you really start making the mesh smaller and smaller, then you start needing to run on these larger and larger systems because at a certain point, if it takes you two weeks to run a test on your computer, it starts to become a little less worthwhile.

CB: So when you’re using this, where are you getting the inputs from?

AB: So that can vary. Let’s go back to the car in a wind tunnel example. The input conditions for this, or for that, would be the velocity that you’re intending the car to travel, at whatever altitude conditions that you’re looking at. So probably sea level that gives you the density, the velocity, you’re probably going to do a couple tests in different temperatures. So you have a temperature parameter, and that really gives you everything that you need because you can then solve for other things like pressure and energy from those existing information

With jet engines, actually, I ran into while I was flying back from the holiday, I ended up sitting next to someone who works for a jet engine company and they were going up to Northern Canada to do cold weather tests on jet engines to get physical data for how those engines perform. The cold weather is indicative of how conditions are in upper atmosphere at where large planes fly at.

So we have a lot of this information that exists because like gas properties are fairly set in stone at this point and you can get different mixtures of gases and that’s all been solved out or found experimentally. And so then you just set the velocity that you’re trying to travel at, or with multi-phase modeling like what the paper talks about, you can then set you know an initial location for a droplet in question.

So now to get to the stuff that the paper actually talks about. The idea of the paper is to look at how to solve for a multi-phase system. So multi-phase flows, these are everywhere. The coughing model that we were talking about, a real easy one to, a really easy place to see multi-phase flows is the beach. You have ocean spray interacting with the air so when you see the waves curling over and how that spray breaks up and spreads out on the wave crest, that’s multi-phase modeling. Water getting into the sand causing quick sand, that’s multi-phase modeling. Bubbles is multi-phase modeling. This sort of stuff is everywhere. It’s used in things like sprays for everything from injector engines to a spray bottle for spraying your plants or your cat if they are misbehaving. Just to show that kind of multi-phase stuff is everywhere, and it’s everywhere but it’s really complicated.

Because—I’m gonna just use a bubble because that’s a really good example for I think at least mentally. So you know how bubbles have that thin sheet of fluid encasing a pocket of air. So let’s say we take that conceptually and replace the air in the bubble with something else. So we still have that thin film separating the air and the fluid inside the bubble. That thin film is the biggest problem for multi-phase fluid calculations because of surface tension. It is a singular interface point where you go from air to not air. It’s singular line which is really bad for computational modeling because you can’t really solve for that without a lot of really complicated work. So one thing would be to just put the grid line around there but then you have to figure out how to move the grid as your bubble moves.

So the most common method is to use what is called a volume of fluid, where every cell has a value assigned to it based on how much of a given fluid there is or a given phase there is at a given time. So if you think of that bubble that we’ve been talking about and then just break it up into a bunch of little cubes, there’s going to be some cubes that don’t have a full value for, of either one or zero. There’ll be a fractional value, and so that would be recorded as a cell that has multiple phases in it so it becomes an interface cell. What the method in this paper is trying to do is take that sharp interface between the two phases and spread it out over a narrow region so that it’s easier for the method to calculate as a gradient rather than a singular point, because it’s a lot easier to mathematically calculate that. So that kind of is explaining what they show in figure one, where it’s like we have this interface, what if we make it a bit, that interface a bit wider, which then because now we have a gradient which can think of a gradient just like you would an artistic gradient where it slowly transitions from 100% of one thing to 100% of the other.

CN: I have a question that I don’t know if it makes sense but I will ask anyway. So you said that we’re trying to make this teeny tiny interface. How do you define the dimensions maybe of this interface?

AB: Good question. This is actually a huge component of multi-phase flows, is how do you define the interface? In the method that paper is talking about on page two equation 11, basically they are described as at any given point in space you have a function that can be used to describe the phase which is called a spatial indicator function. If it’s in—I’m going to just use a two-phase model because it simplifies things heavily. Basically you have fluid one which is the bubble and then fluid zero which is the air surrounding the bubble. If you randomly pick a point and it’s in the bubble then it will have a value of one and if you pick a point, if you end up with a point that’s outside the bubble: zero. The interface is defined as the point at which the interface indicator goes from one to zero which is, there is no dimension to the interface because it is a step function.

It is a discontinuous function and that discontinuity is the mathematical problem. We have a surface discontinuity where, at the points where it switches between the phases, it just happens instantly. The method in here is saying okay we can’t calculate the interface with no width, so let’s give it some width, a narrow band so that of like two to four cells usually, which gives you a much smoother line. Because if you were to plot the phase in a single direction, instead of it going straight up you would have now a smooth curve between the two.

JM: The issue is basically that you can’t divide by zero right? Like they’re running into a problem of like there’s—if there’s no width to this, you’re trying to divide something by nothing and then mathematics goes “aaaah I panic.”

AB: Yes that is effectively what is happening. There are other ways to divide by zero, or get around the dividing by zero problem as you put it. One is you, like I said earlier you can put that mesh location right there and then you technically have, because a lot of this stuff is based off of fluxes, you now can set a boundary flux at that mesh location which keeps the two separate. Again this comes with the problem of you have to figure out how to actually move the mesh which is a whole separate field of study called adaptive mesh refinement. It has been done but it is much more complicated.

Er, this method was developed so that you can solve for the surface tension over an interface without having to precisely reconstruct the interface location and in a mathematical sense, and then calculate from there all of the interfacial properties.

So as I mentioned the interface is what we’re trying to solve for. The main result of having this interface is surface tension, like how many drops of water can you put onto a penny before the drop collapses and spills off the penny. And you can see like that lovely bubble that forms on top of the penny when you do that. But we also know that if you look at things like carbonation bubbles in soda, the bubble doesn’t just collapse on itself. The surface tension is trying to pull the bubble together and then that is counteracted by a higher pressure on the inside of the bubble. So what the entirety of the mathematical model to solve for this is: you have to find a way to balance the pressure difference across the interface with the surface tension force of the interface. At any given point in time there is some balance of these factors and this has to change with time as well. So but for now you can just treat it as a single point in time and everything is solved at that point in time and then step forward.

This paper only focuses on inviscid and incompressible fluids so incompressible means—there’s probably there’s probably some object near you like a table or your phone, where if you just squeeze it between your hands, nothing really happens, it just kind of stays the exact same shape. So incompressible, can’t be compressed. As opposed to, you know, if you take an empty bottle you can, and you breathe into it you can kind of force more air into it so that it doesn’t you can’t squeeze the bottle anymore. So that’s kind of the idea of compressibility.

And then inviscid is, what if there was no viscosity? So viscosity is things like how much a fluid will stick together. Like syrup, maple syrup fairly viscous fluid. Water has actually got a fairly high viscosity due to surface tension, or due to hydrogen bonds. But fluids that do not stick to themselves well has have a very low viscosity.

JM: Acetone has a pretty low viscosity. I’m just remembering that from like chemistry lab and washing things out with acetone and it, and it like smooths out very nicely as opposed to water like beads up.

AB: So that would be an example of a low viscosity fluid. It’s basically just going more towards that acetone fluid state to a massive extreme, where there is no viscosity. And this really simplifies things down, because this means that under completely static conditions, the pressure jump across the interface is directly equal to the surface tension at that point. So in the bubble case, whatever the surface tension is is exactly the same as the pressure jump across. That’s what this whole method is trying to model, is figuring out, okay can we solve either part of this inequality to then put into, in this case, a simplified form of the Navier-Stokes momentum equation?

A lot of the, a lot of this paper is the math that goes into solving and deriving these equations and these components of the equations, but the main equation in all of this, that all of the derivation leads to, is that the surface tension force is equal to a constant times the curvature of the interface in the normal direction of the surface scaled by some indicator function, which in this case is the gradient of, I believe they use density or the smooth density.

I know that’s gonna, that’s a little confusing, but remember how we were talking about that smoothed interface a little while ago? This smoothed interface can now be used to smooth out properties. So they’ve set, or they’ve taken the density of the flow and applied this smoothing function to that, so now we have a smooth density curve between the inside the bubble and outside of the bubble, and so that that’s used to basically say, wherever this curve is sharpest, that’s where the surface tension force is applied the largest. And that’s normalized so it scales between 0 and 1.

The curvature is a big part of this equation, so with the bubble it’s a curved surface right? That curved surface has a mathematical number or value that can be applied to every single point along there that says this is how sharp this curve is, relative to the center point of the arc. So you have to calculate this value. There are a lot of ways again to calculate this. If you reconstruct the surface you can calculate directly from that reconstructed line.

CB: So I have a quick question on the gradient. I have two different ways that I’m like thinking of it and I’m wondering if one is better than the other. I’m thinking of like going from the inside of the bubble towards the interface, you’re going from you know zero percent to a hundred percent. And then the other way I’m thinking of it is—well I guess the first way would be going from zero percent to a hundred percent and then beyond that you know it’s just nothing. The other way then would be going from zero percent towards the interface at a hundred percent and then going back towards zero percent on the other side of the interface. Is there—

AB: Uh the first one is a little closer to how this is working, at least as far as the volume of fluid stuff goes. But the second one is closer to how the indicator function works. So—

CB: So they’re both they’re both helpful but for, for different things.

AB: Yes.

CB: Okay.

AB: So actually what you were saying with the, the second one would be the gradient of the gradient. You have this sharper point at, yeah the sharpest point in the line is going to be at that midpoint, so that would be the highest value in your gradient, so that’d be that—you could scale that to a hundred—you would scale that at a hundred percent. And then as you go away from that center point you then start going back down to zero where the indicator, where the volume of fluid is uniform and so the indicator of the gradient would be zero.

JM: Okay so this indicator function in the second way Cole was thinking about it, it’s not, like the value isn’t telling you which fluid you’re in, it’s just telling you: am I at the edge or am I like floating in the middle?

AB: It’s telling you how close you are to the assumed interface location.

CN: I have a question on a hypothetical scenario that I’m drawing next to me with, with my poor artistic skills. But let’s say we’re taking again the bubble. And let’s say that this bubble floats into the sea. And let’s say that this bubble has no air but has some other liquid inside it, and so the interface is the, the sheet of the bubble. So in this case you will have to first calculate the velocity of the water that hits the bubble, maybe the temperature that affects the water, all kinds of different forces like pressure on these liquids, those fluids as well? Or let’s say if it’s water, and like the guys that went to the north Canada, fluids are affected by the temperature, maybe also the water can turn to ice and also then this can have a different pressure on the bubble. So these are all factors like temperature, pressure, like velocity, viscosity, all things are factors for the curvature right?

AB: So in this, it does impact the bubble’s shape, but the curvature is primarily determined just by how the interface is shaped. So all of these factors do end up playing a role in the larger scale of solving for a multi-phase system, but it doesn’t directly apply to the curvature. The curvature is just a, is just the shape of the surface, of the interface surface. All the factors that you were talking about play a role in things like the Navier-Stokes equations that this stuff gets plugged into.

So we have now the curvature for the surface, and we’re able to solve for the surface tension force as a whole. Then we also have this, I think they go into another equation where they can solve for the velocity and pressure of the flow. And this is where it starts getting outside of specifically what this paper is doing, because the, the main impact of this paper is this surface tension region that they have calculated.

So once you have this surface tension force and a way to solve the pressure or the countering pressure, you now can plug this into whatever surface or, excuse me, whatever fluid simulation model you want to use. So they’ve given a couple of examples of how they plugged their model, or what they plugged this model into for MAC and ALE, which are just types of mesh-based solver methods.

So a lot of the stuff that I’ve been talking about has been in the context of finite volume because that’s what I work with. This can work in, this works beautifully in finite volume, and is still very common to this day. The conference I went to last summer, most of the people that were doing multi-phase were using this model, or a modified version of it. That’s part of the whole artistry of computational fluid dynamics, is you can take almost any mathematical model and shift it so that you can use it in a different solver framework. My PhD advisor has a equation that he likes to use in presentations where the quality of your simulation results is the sum of how good your models are, how good your mesh is, how good your solver is, and how good the person who’s putting all this together is. Because all of these are factors that really do change how good your results are.

I’m going to skip over a lot of the stuff in the derivation of the paper and go straight to the results. It’s mostly just, here are a bunch of different cases that we threw into the solver that we created, and here’s how they turned out, and do they or do they not match expected results. So the biggest one is the Rayleigh Taylor instability, which is basically, if you take a heavier fluid put it on top of a lighter fluid, so food dye on top of water, and you perturb the surface between them, the heavier fluid starts to break through and form these mushroom shapes as it descends and disperses into the water around it. The Rayleigh Taylor has become a classical test case for anytime you’re doing a surface tension model.

They also did quite a bit more with things like capillary flow. So if you’ve ever had a tube that is super super tiny, and you put it in water, the water sticking to the sides of the tube will actually cause it to flow out the top, and this is due to surface tension. You can model this capillary action through these surface tension models. And then they go on to apply it to things like low gravity and space flight after they’ve actually done all the, the hard work of putting the model together and validating that it does give accurate results.

CN: That’s really cool.

CB: Yeah it definitely, yeah it definitely makes a lot more sense uh having you explain it.

CN: Yes absolutely!

CB: I was very intimidated by the paper, uh, because it was just a lot of equations, um that I didn’t understand at all.

AB: Yeah it’s, I think I had to read through this paper two or three times just to get the first bit of the math down.

CB: One of the questions I had written down is, they kept using the word color and substitute of interface and I was wondering if that was important at all?

AB: So you remember how I was talking about how we have that smooth interface line, or that smooth gradient line, now? That is often referred to as the color. That smooth representation is assigned to a separate variable that is deemed a color function. Yeah that’s really the big thing, and again, uh, I’m going to just use the idea of an artistic gradient because it actually works really well with that. You go from one color to another. It’s using the exact same idea of creating that smooth, smoothness between the two points.

CB: Okay yeah that makes, that makes perfect sense.

JM: So I was kind of thinking about them making this very thin boundary layer to figure out the, like, surface tension and the forces and everything. I was thinking about how like computers can’t actually like find the area under the curve directly, they have to make itty bitty little like slices.

AB: Yep, that that is the entire idea of fluid mechanics. So basically if we could do direct integration in that way we would be doing that entirely. But all of those, all the points, all of the cells that I’ve been talking about this entire time and that the paper refers to, those are those small boxes under the curve that are getting solved. There’s a lot of different methods that are used to figure out how to get a better curve under there within the boxes. I—just last week another student in the group gave a hackathon seminar for a day and a half on discontinuous Galerkin methods.

JM: That sounds like a Star Trek thing, like a Galerkin should be an alien.

AB: It does. But basically the idea behind it is instead of making each of these box, or each of these cells a single point, what if we added a bunch of points inside it so that we can get a smoother and even better line representation of what’s happening inside of each cell. There’s a lot of weird and wild development that’s happening with computational methods.

JM: Is that—and that’s different from just making lots of tinier cells?

AB: Yes, uh because you’re looking, you’re now using a, an additional model to figure out what’s happening inside the cells. But generally, one of the best ways to uh, or to improve the accuracy of a calculation is to refine your mesh, but that also comes with the lovely addition of substantially increased calculation time. Because let’s, let’s say you want to double your mesh size. So let’s, let’s just say you have a cube with eight cells per edge. Double that to 16, you now have to do eight times as many calculations.

JM: That’s a lot.

AB: Yeah it adds up very, very quickly.

JM: I’m also curious, because I’ve learned, like across different like disciplines, about different models people use. And so I’m curious about like, when you iterate these models over time to see how something’s changing, like what is a, what is the general time frame that you iterate over? Because like for example in computational biology when you’re trying to see how a protein is changing over time, that generally iterates over like nanoseconds. But in a previous episode where we talked about modeling how asteroids are moving through space the, the like time jumps in that were like millions of years, or thousands of years not millions, but you know. Where are we on the scale of nanoseconds to thousands of years?

AB: Yes.

JM: Okay, good.

AB: This is, this, it actually depends on the quality of your model, or on the quality of your simulation. Because so a lot of the stuff has been talking about spatial modeling. There’s a whole separate school for time modeling. With time modeling there is certain factors that are called, has been deemed the CFL number. Basically what that is, is it’s the wave propagation speed. So it’s usually related to the speed of sound in the fluid. Information can only travel in a fluid as fast as the speed of sound, or the speed of sound plus the velocity of fluid. That is the fastest any information can travel, that number is the maximum stability if you are doing a direct time step. Basically what it’s saying is: I am solving this time step and then solving the next time step from that existing information. That is a direct time step, and you can’t go faster than a CFL of one. There are methods called implicit methods where you are solving   the next time step at the same time as is the current step. Those you can have CFLs of into the thousands if you have a good one.

The time scale of a lot of these situations are nanoseconds to full seconds, uh sometimes both of those at the same time. Where like you’re trying to see what’s happening at a nanosecond time scale over 10 seconds or longer. If you’re solving that directly it’s a couple million to like a billion time steps, crazy orders of magnitude. With a lot of things where it’s, where you don’t need direct time accuracy—so if you’re solving for a hypersonic flow or a supersonic flow over a shape and you’re not changing anything, implicit time stepping is often used to achieve a static base flow. You ramp up the CFL to these larger numbers so you end up you end up converging much faster than you would if you’re just stepping directly.

I’ve opened you all up to the world of computational fluid dynamics, and this information will now forever be burned into the back of your brain.

JM: I would love to know then um, what is the you know coolest or most interesting thing that each of you have like learned from reading this paper, and I guess for Alex like overall like what’s the coolest or most interesting thing that you think there is like coming up in this field?

CN: For me I’ll just go back to my biology. I definitely feel it’s, I’ll take the general idea, not the paper per se, I think it’s really important what we were saying before that especially in my case, that I can talk about living organisms, so they can just not do something to them, because you can now have a computation model and predict pretty much a very big part of it. So I think it all goes down to the applications and how much uh we can save time, cost, and also, in this case, at least in biology also using model organisms. So I think that’s the biggest take home message from me.It’s a very powerful tool to have. Of course there are like a lot of factors to take into account, and I’m not sure how you can control for everything, but it’s definitely very powerful tool in the right hands.

AB: Yeah no, the biological aspect is one that I don’t think about that often because it’s, I mean, I’m doing aerospace engineering research but it, it is really cool to see, and to have someone else be like, oh I could see how you could apply this to this this this and this. So it’s, it is really cool to be like okay, this is just a tiny piece of this bigger puzzle that’s being put together, and that it can, when someone makes something like this it does feed into biological models for, hey how does, how can we figure out this, this, or this?

CN: Yeah, but I mean in general, and I could visualize things like the aneurysm that we said before. It was easier for me to uh visualize something biological because my background. But it’s amazing like the, the spectrum of applications.

CB: I’m not really sure what the most important thing is for me, I just think it’s really, I, I really like how they took the problem of solving for the interface, which was not possible, and then they just uh kind of like expanded the range there a little bit to create this, you know modeling system that then gives them information to make better predictions with. Um I think that’s really cool.

AB: That method of uh smoothing out a discontinuity actually comes up quite often in a variety of simulation methods, because nature doesn’t always like to make things easy on us. It likes to just kind of be like what if I just went from this to this other thing. I mean another example I guess would be like a shock wave. That’s another discontinuity in fluids that oftentimes gets solved similar way.

Where this could go: there’s a lot of stuff that is coming up, it’s like, I’m using this as a tiny portion of what I’m working on, but just seeing how something this fundamental can go into some, into so many other factors with better methods, with more advanced computational capabilities, we can—this method is what, 30 years old? Since it’s been 30 years since this paper was published and it’s still in use. Like it’s incredible, where it’s like, yeah we solved the surface tension with the BKZ model, and it’s like wow it really held up. And then it’s like, okay you can still use it but you know, like I was saying earlier, it’s like, can do a ton with improving curvature modeling, can figure out how to use this in the con—or in conjunction with methods that allow for a narrower representation of the interface. A whole bunch of different modifications that can be made to this method to push what the methods and solvers are capable of doing, again in the right hands.

JM: Yeah, well this has been super cool. Thank you all for um discussing this. Thank you Alex for presenting that in a way that is much more accessible than the paper made it be.

AB: Well I did just explain a little bit of math.

JM: So yeah, and thank you all for listening to this episode of In Plain English. Again, we’ve been talking about the paper “A continuum method for modeling surface tension,” by J. U. Brackbill et. al. Um our expert for this paper has been Alex Barrett, and our guests have been Cole Barker and Christina Niavi. As always you can find this paper for free to download on our website at inplainenglishpod.org. You can now also find episode transcriptions there. You can also follow us on Twitter, Facebook, and Instagram @PlainEnglishSci, that’s P-L-A-I-N-E-N-G-L-I-S-H-S-C-I. Make sure to subscribe to In Plain English on Google Podcasts, Spotify, or wherever you get your podcast so that you never miss an episode, and you can become a supporter of this podcast on Patreon!

Thanks again for listening, and tune in next month for another episode of In Plain English.

[Outtro Music]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s