Recall the continuity equation based on the conservation of mass:

To derive a differential form, consider the fluid element as a small cube with sides .

Pressure inside the element is constant. Since the element is small, the volume integral in the continuity equation can be written as

Let’s consider the second term of the continuity equation describing mass flow rate. Let’s start with the direction.

Inflow to the left face is given as:

Outflow from the right face is:

The net mass flowrate is then:

Similarly, in the and directions, we have

Combining all three directions and substituting back into the continuity equation gives us:

or simply

For steady flows:

For incompressible flows:

Example

Given:

Determine if the flow is incompressible.

For incompressible flows, we have:

Then:

Integrating: