---
title: "Derive differential continuity equation"
subject: "Applied Computational Fluid Dynamics"
chapter: 2
key: "semester_7/applied_computational_fluid_dynamics:continuity-equation-differential-form"
source: https://www.bctengineer.com/q/semester_7/applied_computational_fluid_dynamics/continuity-equation-differential-form
site: BCT Engineering
---

# Derive differential continuity equation

Applied Computational Fluid Dynamics · Chapter 2: Governing Equations and Numerical Foundations

- Asked in: year not given, 6 marks
- Video: [Derivation of the Continuity Equation for Fluid Flow](https://www.youtube.com/watch?v=yc8nXie25sc) — Fluid Matters
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/applied_computational_fluid_dynamics/continuity-equation-differential-form
- Whole chapter: https://www.bctengineer.com/md/semester_7/applied_computational_fluid_dynamics/chapter-2

## Question

Derive the continuity equation in differential form for three-dimensional unsteady compressible flow in Cartesian coordinates. Reduce it for steady and for incompressible flow.

## Short answer

For a fixed cube, net mass outflow plus time-rate density change gives d(rho)/dt + div(rho V)=0. Steady flow drops the time term; incompressible flow becomes div V=0.

## Answer

The continuity equation expresses **conservation of mass**: mass is neither created nor destroyed.

#### Derivation
Take a fixed small control volume (a cube) of sides $dx,\ dy,\ dz$ with density $\rho$ and velocity components $u,v,w$.

```text
        y
        ^   +---------+
        |  /         /|
        | +---------+ |   mass in  : rho*u dy dz
        | |         | |   at x face
        | |         | +   mass out : [rho*u +
        | |         |/      d(rho*u)/dx dx] dy dz
        | +---------+
        +-------------> x
```

Net mass efflux in the x-direction:
$$
\left[\rho u+\frac{\partial(\rho u)}{\partial x}dx\right]dy\,dz-\rho u\,dy\,dz=\frac{\partial(\rho u)}{\partial x}dx\,dy\,dz
$$
Similarly for y and z. Total net outflow of mass per unit time:
$$
\left[\frac{\partial(\rho u)}{\partial x}+\frac{\partial(\rho v)}{\partial y}+\frac{\partial(\rho w)}{\partial z}\right]dx\,dy\,dz
$$
Rate of decrease of mass inside the element is $-\dfrac{\partial\rho}{\partial t}dx\,dy\,dz$. Equating the two and dividing by the volume:
$$
\frac{\partial\rho}{\partial t}+\frac{\partial(\rho u)}{\partial x}+\frac{\partial(\rho v)}{\partial y}+\frac{\partial(\rho w)}{\partial z}=0
$$
or in vector form
$$
\frac{\partial\rho}{\partial t}+\nabla\cdot(\rho\vec V)=0
$$

#### Special cases
- **Steady flow** ($\partial\rho/\partial t=0$):
$$
\frac{\partial(\rho u)}{\partial x}+\frac{\partial(\rho v)}{\partial y}+\frac{\partial(\rho w)}{\partial z}=0
$$
- **Incompressible flow** ($\rho$ constant):
$$
\frac{\partial u}{\partial x}+\frac{\partial v}{\partial y}+\frac{\partial w}{\partial z}=\nabla\cdot\vec V=0
$$
This means the velocity field is divergence-free, and volume is conserved for a fluid element.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. The continuity equation expresses conservation of:
   A. Momentum
   B. Energy
   C. Angular momentum
   D. Mass
   Answer: D. Mass is neither created nor destroyed in the control volume. (Key point: Principle behind continuity)

2. In the derivation, the net mass outflow is equated to:
   A. The rate of decrease of mass inside the element, -d(rho)/dt dx dy dz
   B. The rate of increase of pressure
   C. Zero in all cases
   D. The viscous force on the element
   Answer: A. Net outflow equals the rate at which mass inside the element decreases. (Key point: Derivation balance)

3. For steady compressible flow, the continuity equation becomes:
   A. d(rho)/dt = 0 only
   B. d(rho u)/dx + d(rho v)/dy + d(rho w)/dz = 0
   C. du/dx + dv/dy + dw/dz = 0 only
   D. rho u = constant in all directions
   Answer: B. The d(rho)/dt term vanishes but density stays inside the derivatives. (Key point: Steady flow form)

4. For incompressible flow the equation reduces to:
   A. d(rho)/dt = 0
   B. div(rho V) = rho
   C. du/dx + dv/dy + dw/dz = 0, a divergence-free velocity
   D. V = constant
   Answer: C. With constant density, rho cancels, leaving div V = 0 so volume of a fluid element is conserved. (Key point: Incompressible form)

## Related in Applied Computational Fluid Dynamics

- [Find velocity component from continuity](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Acontinuity-missing-velocity-component) — Applied Computational Fluid Dynamics, chapter 2
- [Integral continuity for a compressing duct](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Aintegral-continuity-duct-numerical) — Applied Computational Fluid Dynamics, chapter 2
- [Streamline and acceleration of a flow field](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Astreamline-acceleration-numerical) — Applied Computational Fluid Dynamics, chapter 1
- [Plane Poiseuille flow from Navier-Stokes](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Aplane-poiseuille-flow-numerical) — Applied Computational Fluid Dynamics, chapter 2
- [Euler equation, Bernoulli and Pitot tube](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Aeuler-equation-pitot-numerical) — Applied Computational Fluid Dynamics, chapter 2
- [Enthalpy formulation and heat transfer equation](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Aenthalpy-energy-equation-heat-transfer) — Applied Computational Fluid Dynamics, chapter 2

## Related in other subjects

- [Continuity equation in Cartesian coordinates](https://www.bctengineer.com/question.md?key=semester_4%2Ffluid_mechanics_mechanical%3Acontinuity-equation-cartesian-derivation) — Fluid Mechanics, chapter 4
- [Derive continuity equation for unsteady pipe flow](https://www.bctengineer.com/question.md?key=semester_4%2Fhydraulics%3Acontinuity-equation-unsteady-pipe-flow) — Hydraulics, chapter 4
- [General heat conduction equation in Cartesian coordinates](https://www.bctengineer.com/question.md?key=semester_5%2Fheat_transfer%3Ageneral-heat-conduction-equation-cartesian) — Heat Transfer, chapter 2
- [Continuity in cylindrical coordinates, radial flow](https://www.bctengineer.com/question.md?key=semester_4%2Ffluid_mechanics_mechanical%3Acontinuity-cylindrical-radial-flow) — Fluid Mechanics, chapter 4
