EP 58 · 21:34

Velocity fields, divergence and incompressibility

From What OpenAI Actually Did to Navier-Stokes

Episode
5/19
Watch What OpenAI Actually Did to Navier-Stokes
In this chapter

Fluid motion is described using a velocity field: a vector at every point in space and time showing the direction and speed of flow there, rather than tracking individual particles. Not every arbitrary arrangement of vectors is physically valid for a fluid; the divergence of the field must be zero, meaning no point can act as a source or sink that creates or destroys fluid. This zero-divergence condition is the incompressibility constraint, one of the two Navier-Stokes equations, and it explains why fluid speeds up when squeezed through a narrower cross-section, as in a pipe or a tornado's core.

  1. 01

    A tornado's velocity field is used as an example where vector magnitude (shown by arrow color) is strongest near the axis and weakens with distance, explaining why outer winds feel weaker than the eye.

  2. 02

    Two invalid velocity field examples are given: particles emanating from a single point (negative divergence, likened to a supernova) and particles converging into a flat sheet (positive divergence, likened to a black hole collapse), both disallowed for fluids.

  3. 03

    The narrowing pipe example (compared to a wine bottle with its base cut off) is used to connect zero divergence to the engineering continuity equation, where fluid speeds up as cross-sectional area shrinks.

  4. 04

    Compressible fluids like air, which expand or contract with temperature, are explicitly distinguished from the incompressible fluids (like water) that the Navier-Stokes equations as presented here describe.

Transcript

2,742 words · auto-generated from the episode video

21:34doesn't really make sense here. So instead of tracking individual molecules, we are going to track the velocity of the fluid itself. Okay. At different spots. And it turns out this has all of the necessary information that we need. >> Interesting. >> Okay. This is what we're doing. On the left hand side you see a video of sort of dust particles let's say that are in a chunk of a river. Okay. So we can see the dust particles that are moving from left to right. >> Now I don't want to worry about all of the dust particles. So instead what I worry about is what is the velocity of the particles at that point. And those can be represented by little arrows that

22:15just represent where the dust particles are going at that point. Now crucially the dust particles are moving but this velocity field that I've made of a bunch of arrows that are representing all of the velocities th that thing is stationary >> you see >> because it just represents this is the the direction in which I'm moving okay this is the central >> element >> that we are worried about >> okay >> okay this is a velocity field >> it's a field because it has a value at every point in space and time um and it's a velocity So it's got a vector. It's a vector field. Okay. And usually this thing is represented as a U. We don't want to use V for some reason. I

22:55think it's a historical reason. So in every case the U that we're going to see later on in this episode, that is a velocity field. It's a vector field everywhere in space. And it represents what the velocity is at that particular moment. So if I have a velocity vector that's pointed in this direction, that means water is moving past in this direction. If on the other hand it's over here then that means water is moving towards that arrow where the arrow is pointing >> and the component parts that make this velocity field are >> some position in 3D space which is our x y and z. So we know like where in this cube >> the velocity field that we're specifically referring to exists and then time allows us to create the arrow

23:36of time. Yeah. Of the direct like at that point >> at that point it's moving in this direction right yeah and it could change right maybe I I introduce a flow and then it starts moving in some other direction and so the velocity field can change. Um this is a very simple case right of just like particles water moving from left to right. There can be other more complicated cases. For example, this is the velocity field of a tornado. >> If I were to look like up the axis of a tornado, it's rotating around. And so imagine if you're looking like up through the eye of the tornado, you would see particles and clouds and everything moving >> around you, right? Like in a circle above you. And the velocity field for

24:17that looks like a bunch of arrows that are sort of circulating around. >> Mhm. >> Okay. >> Mhm. And the the color of these arrows represents how strong the velocity is. Okay? So the vector is big near the eye and as you move farther and farther away from the axis of the tornado, the vector field diminishes in magnitude cuz things are moving slower. >> This this makes sense. This is why when you have, you know, a tornado or a hurricane approaching you, if you live on the coast, the outer parts you you can feel it coming. >> Yeah. >> Because the outer parts are a little bit slower than the inner parts. >> Yeah. when you get to the inner parts then it's like okay then the palm tree is like >> on the side >> on the side right um and so this is the basic object in modern fluid mechanics

24:58it's not the velocity of water as though the entire ocean is a single baseball or entity that's just moving as one right it's no it's different parts of the fluid are moving in different ways and we can represent that using these little arrows that are in every single part of the fluid that's actually a really important mental picture for me to kind of reframe how to think about it Because my initial mental model is this is one discrete thing and we're trying to look at it as one discrete thing. >> Yeah. >> And what we're sort of saying is in order to get back to this idea of we want to be able to make predictions about a system. uh we need to look at it from this different vantage point which

25:38is uh velocity fields which help us look at uh points in space and the velocity at those points in space >> which then are also going to interact with each other over time. >> Exactly. Yeah. And so if we wanted to for example um calculate like what a dust particle is doing in that velocity field all we have to do is like follow the arrows right we can still recreate >> what we want which is like what like if I were to drop something what is the position of that thing right? All we have to do is follow the arrows. But the velocity field is something that holds all of the relevant information. That's the point. Yeah. And it becomes something that is a tenable object. It's something that we can understand and we don't have to worry about the 10 to the however many stuff that the fluid is

26:20made out of. >> It's less compute constrained for lack of a better way to put it as one way to put it. >> Yeah, that's certainly one way to put it. Yeah. And so before we start applying Newton's laws to this thing, let's try to understand this velocity field a little bit further. I just showed you two examples. The first one was water is moving from left to right. So all of the arrows are pointing from left to right or the tornado where the the clouds are moving in a a circle above you and so all of the arrows are pointing in kind of a circle, right? They're like circulating. Um in both of those we saw the particle picture and we were like, okay, that seems reasonable. Now I can imagine a fluid doing that, right? I can imagine the tornado and I can imagine stuff like this. Now are

27:01there velocity fields? Are there are there are there setups of arrows that we can make up that don't make any sense in the real world? >> Okay, the answer is yes. Let's look at these cases. Here are two cases. The first one on the left is a bunch of particles that are just like emanating from the center. >> The expansion of the universe. >> Yeah, it kind of looks like the expansion of the universe. Exactly. Right. It's like all of the all of the fluid is coming from somewhere in the center >> and then it's just like expanding out. >> Okay. How is that possible? Where is the fluid coming from? >> Yeah, >> right. That's not possible. >> Just like in empty space, it's just like there's like just stuff,

27:42>> right? Like what is the source? >> Right. Like if there was a hose, if if I saw a bunch of particles come from the bottom and then there was like a sprinkler head or something and then it moved. Then I'd be like, okay, but here I don't see that. It's just the things are just coming out. >> I understood, >> right? Doesn't make sense. >> Okay. >> Okay. First thing does make sense because somehow the fluid is being created in the center and it's just moving out, >> right? >> Okay. Second one on the right. All of the fluid is is moving into a single sheet. That yellow sheet, it's like a sheet of paper and the fluid is moving from the top into the sheet of paper and the fluid is moving from the bottom into the sheet of paper. How is that possible? Where is the fluid going? >> Yeah. Right. Right. Right. Cuz you would imag It should like go like it should

28:23continue. I mean, if I saw the if I saw it shoot out >> to the side, then I'd be like, "Okay, that's possible." But I'm not seeing >> of a wall or something. >> In that vector field, all of the arrows are pointing down and there's no point arrows pointing out. In the in the vector field on the left, all of the arrows are pointing out and there's nothing that's supplying the fluid to to have those arrows point out. And so just to be clear, we're sort of using these as sort of like an abstract theoretical or mental model to test the four corners of the sandbox of how to do this. >> Yeah. We're trying to we're trying to understand like we've created this concept of a velocity field. >> Yes. >> Now is any arbitrary vector field okay?

29:04>> Right. >> And the answer is no. Because on the left hand side that's an arbitrary vector field. Like if I were to create those arrows that are just emanating from the center, if that was an electric field around a positive charge, totally fine. >> But for fluids, that's not fine. >> It doesn't, right? It doesn't fluids. >> And so we can we can formalize this with mathematics. The property that encodes this is something called the divergence of an electric field. Okay. On the left hand side, we've got something that has a divergence of negative. Negative divergence. That means stuff is coming in into a singular point. Mhm. >> On the middle we've got a positive divergence >> like that I think like the collapsing of a black hole or just for my own >> visual 100%. On the on the middle that's

29:46a supernova type like the positive divergence stuff is moving out and on the right we've got a zero divergence. >> Okay. >> Okay. The only types of vector fields that are allowed for fluids are the ones with zero divergence. Okay. Because that means there is neither a sync nor a source. You can't create fluids out of nowhere. Mhm. >> So whatever fluid you have, it's got to come from somewhere and it's got to be going somewhere. >> Mhm. >> Okay. So that this is a key constraint. >> Mhm. >> For our vector field, >> for fluids specifically >> for for fluids specifically. For other things, it's totally fine. Like for example, if we were talking about the electric field on the left would be a negative charge, in the middle would be

30:28a positive charge. >> Fine. >> Fine. Totally fine. But for fluids, that's that can't be possible. >> So I think this is so an important point here. The idea is this concept of divergence uh applies differently based on the underlying subject matter that you're speaking to. And so as we've gone through this progression >> of testing uh vector fields, it only can work when the divergence is zero. >> Is zero. Yeah. Any nonzero divergence and it doesn't make sense. Another way of putting this is something called incompressibility. You cannot compress the fluid. Okay. Those are the fluids that we're talking about. And if we go to the next slide, those are our two Navier Stokes equations. You can already see that we've already got one of them.

31:08>> Okay. >> Okay. The second one is that the divergence of this fluid velocity field is zero. >> Yeah. Yeah. >> That's already the second Navier Stokes equation. >> Okay. >> So, we're already you would say halfway through >> and and can you remind me again, we have our uh I guess delta symbol and our U symbol equals zero. That's what you're referring to. >> That's the second one. The second one there that that's you would you would say the divergence of you is zero >> right which was that di diagram where we saw the center point everything moving in one direction >> everything moving in one direction stuff came in stuff is going out and everything is fine you're not creating or um destroying >> fluid >> out of nowhere yeah and um for engineers

31:50you might you might understand this with um the continuity equation like for example this is applied very directly if you've got a pipe that has a large um cross-section and you've got water coming in and then the pipe like narrows into a small cross-section. >> For our audio listeners, imagine a wine bottle on its side. >> Yes. Exactly. Wine bottle on the side, but its base has been cut off. Yes. >> And then now you've got water or wine coming in from the from the base. Right. As it exits the nozzle or as it exits the tip, it's going to be moving faster because all of that fluid has been jammed in. Right? You cannot create or destroy fluid. So the amount of fluid that's coming in has to equal the amount of fluid going out. But that means that if if I've got a larger cross-section,

32:32then in a single amount of time, I've got some amount of volume coming in. And with a smaller cross-section, that same amount of volume has to go out, which means the velocity has to increase. Right? This is the continuity equation in action. And a mathematically succinct way of putting it is that dou equals z. The divergence of the vector field is always zero. And it kind of makes intuitive sense for someone like me, which is when I look at the sort of the area of the cross-section and the wider part, there's just more space for stuff to move. And we have to move the same amount of volume through a smaller space. So it necessarily needs to accelerate right at that point in order to >> for the divergence of you to equal 0.

33:12>> Equal z. Yeah. For that for that fact to be true, you have to you have to account for this difference in velocity. Right. Right. Now crucially this is an independent thing from that first Navier Stokes equation which is going to be the topic for the next um for the next segment. >> Okay so >> okay this is an independent criteria >> okay >> if we didn't have this >> you could have different types of fluids >> you could have for example compressible fluids >> like air for example is kind of compressible >> in the sense that like if you heat it up it's going to expand and if you cool it down it's going to contract. Now that's not a divergence-free fluid. >> The Navier Stokes equations, these two have to do with fluids in the sense of

33:53like water that is really not compressible. The density is the same everywhere. You can't adjust the density. >> So the a key takeaway for one of the key takeaways for this is is the concept of this idea of incompressible. Yes. Which we've just defined from mathematical first principles. >> Yeah. But but it really it just means you can't you know you can't pack stuff in. The density is always constant, >> right? It's like one of those, have you seen those like stress thingies? >> Yeah. The little stress ball. >> Yeah. Where you like squeeze it and then the the the thing is going to like shoot out somewhere else. That's an incompressible fluid. Right. Because if I squish it, it's got to go somewhere else. >> Mhm. Mhm. Right. Okay. >> It's not like one of those foam things where you can just compress it. >> Mhm. Mhm. Right. Which is actually an

From the episode
  1. EP 58

    What OpenAI Actually Did to Navier-Stokes

    From Newton’s laws to finite-time blowup: what OpenAI’s Navier-Stokes claim means for fluid mathematics, scientific credit and AI research.

    What OpenAI Actually Did to Navier-Stokes

MathematicsPhysicsArtificial Intelligence