 We're now going to derive the differential equation of mass conservation also known as the continuity equation. And what we're going to do we're going to begin by considering a little tiny infinitesimal control volume. Okay, so there is our control volume. Now what I'm going to do is I'm going to write out an expression for the mass flux in the x direction. And we're going to use the Taylor series expansion in order to express this. And we'll have mass flux coming in on the back surface coming in here. And we'll have mass flux leaving this surface here. So let me write out an expansion Taylor series expansion for the mass flux. And now on the front surface we know mass flux is going to be rho u times a. But if it's a Taylor series expansion we have to add in the change. So this is assuming that we're expanding this about the very center of our control volume cube. Okay, so there we have mass flux coming in on the back surface and mass flux leaving the front surface. And this we are going to apply for all three directions. The other thing that we have is we can look at our continuity equation or the conservation of mass for our little differential element here. So I'm going to write that out. And we know from all of our control volume analysis that that is zero. So that is what we did in our control volume analysis. And for the second term here we're going to use the Taylor series expansion. Oops, I should have written that in there. This is a Taylor series expansion. And it is used quite often whenever you're deriving differential element equations like you would use here with the finite difference method or a numerical approach. But this term here we're going to look at in a moment. Before we get to that let's take a look at the first term here. And this first term we can re-express that as being the time rate of change of and it's going to be just the volume of the differential element. So it's the density and the volume of the differential element is dx dy dz. So we can replace that first term and then for the second term we have to look at mass flux coming into and out of each of the surfaces in our little tiny cube. So let's take a look at the second term in our control volume equation. And what we had was an integral over the control surfaces of rho v dot da. So I can look at mass flux in the x direction to begin with and just like when we did with control volume analysis we had to look at the sign of which the flow was coming in. And so the left hand surface is going to have a situation where if I draw out a sign we have a velocity coming the area vector is pointing out in that direction velocity in that direction. So the dot product there is going to result in a negative value. And then for the right hand surface the dot product for that one is going to be positive. And similarly we could do the same for the y face and then again for the z or z face. Okay so when we expand all of this and do it for the x the y the z face and then we bring in the time rate of change of the mass of the control volume our continuity equation for our little element starts to look something like this. And that can be rearranged to the following. And what we're going to do here the volume is going to cancel out. Okay so we get to this point. Now what can we do with this equation here? Well the partial rho partial t that's fine but it's this one that we're going to take a look at. And we're going to look at some of the vector operators that we've covered thus far. And the ones we're going to look at is going to be the gradient and divergence operators. So if you recall gradient and gradient was defined as being and divergence what we had was del dot sum vector. So I'm going to apply it to an arbitrary vector a and remember the divergence or del dot operator takes a vector and converts it into a scalar. So what we have we can use these two operators looking back at our equation we're going to use the divergence operator to recast that. So let's go ahead and do that. And what we end up with is something that looks like the following. So if we look back at our equation we can see the divergence of rho times the vector v is exactly what we have for the second part of our equation. And consequently we can rewrite continuity to look something like this. So that is an important equation. And what this is is the equation of continuity and also known as conservation of mass. But it has been cast in a manner that can be applied as a differential. So a differential equation partial differential equation. And it is one of the equations that is used for doing fluid fluid mechanic analysis of differential elements. So which then leads to things like numerical methods or it could also lead to closed form solutions for the governing equations of motion. It would be one of the two that we work with. So that is continuity. Now what we're going to do we're going to take a look at how to simplify this equation. And then we'll move into some examples and then we'll look at the momentum equation.