# Derivation of continuity equation for fluid through a variable area duct

I am attempting to derive the continuity equation for steady 1D flow through a variable area duct:

\begin{align*} \frac{\partial{(\rho uA})}{\partial{x}} = 0 \end{align*}

where $$\rho$$ is the density of the fluid,$$u$$ is the velocity in the x-direction, and A is the cross sectional area of the duct which is a function of x as well. To derive this I attempted the following:

For simplicity, I am going to work in $$R^2$$ with standard coordinates $$x,y$$. The duct will be aligned with the x axis and it will have variable y limits: $$y_1(x)$$ and $$y_2(x)$$ for the lower and upper surface respectively depending on x. Mathematically the duct is a set $$V$$ in $$R^2$$ with boundary $$\partial V$$. My density scalar field will only depend on x, my velocity vector field will only depend on x. Finally, the velocity vector field will be tangential to the boundary on the upper and lower surfaces of the duct.

From conservation of mass I get:

\begin{align*} \int_{\partial{V}} \rho v \cdot n dS = 0 \end{align*} where v is the velocity vector field, $$n$$ is the unit normal on the boundary.

Using the divergence theorem, \begin{align*} \int_{\partial{V}} \rho v \cdot n \ dS = \int_{V} \nabla \cdot \rho v \ dV = \int_{x}\int_{y} \frac{\partial {\rho u}}{\partial{x}} \ dy dx \end{align*} where $$u$$ is the x component of the velocity vector field.

Now, I come to the issue. At first, I wanted to commute the integral over $$y$$ through the $$\frac{\partial}{\partial{x}}$$ to get

\begin{align*} \int_{x} \frac{\partial {\rho u A}}{\partial{x}} \ dx \end{align*} where $$A = \int_{y_1(x)}^{y_2(x)}dy$$

Then I would argue that the integrand has to vanish and I would be done. However, I know the the y integral has variable limits that depend on x and so I would have to use the Leibniz integral rule. From that I get:

\begin{align*} \int_{x}\int_{y} \frac{\partial {\rho u}}{\partial{x}} \ dy dx = \int_{x} (\frac{d}{dx} \int_{y_1(x)}^{y_2(x)} \rho u \ dy - \frac{\partial{y_2}}{\partial{x}} \rho u + \frac{\partial{y_1}}{\partial{x}} \rho u) \ dx = \int_{x} (\frac{d}{dx} \rho u A \ - \frac{dA}{dx} \rho u) \ dx = \int_{x} \frac{d}{dx} \rho u \ dx \end{align*} where $$A = \int_{y_1(x)}^{y_2(x)}dy$$

If I argue that the integrand has to vanish, I get just the regular continuity equation so I am stumped on how the get the dependence on area.

You assume that the velocity field is unidirectional with dependence only on $$x$$, that is $$\mathbf{u} = u(x)\mathbf{e}_x$$. How can you say it is tangential to the lateral surfaces where $$y = y_2(x)$$ and $$y = y_1(x)$$? The normal vector at thesesurfaces varies with $$x$$ and is not everywhere orthogonal to the basis vector $$\mathbf{e}_x$$.

For there to be no flux through the lateral surfaces we have to assume that $$u$$ vanishes there. Under the assumption that $$u$$ is a function only of $$x$$ throughout the interior of $$V$$, this introduces a discontinuity that invalidates the application of the divergence theorem.

The desired result can be obtained by a simple one-dimensional mass balance over a control volume

$$V = \{(x',y): x \leqslant x '\leqslant x+ \delta, \,\, y_1(x') \leqslant y \leqslant y_2(x')\}$$

Conservation of mass requires that

$$[\rho u](x+ \delta) A(x+ \delta) - [\rho u](x) A(x) = 0$$

where $$A(x) = y_2(x) - y_1(x)$$.

Hence,

$$\left(\,[\rho u](x+ \delta) - [\rho u](x)\,\right) A(x) + [\rho u](x+\delta)\left(\,A(x+ \delta) - A(x)\,\right) = 0$$

Dividing both sides by $$\delta$$ and taking the limit as $$\delta \to 0$$, we get

$$\frac{d (\rho u A)}{dx} =\frac{d(\rho u)}{dx}A + \rho u \frac{dA}{dx} = 0$$

• For clarification, by discontinuity do you mean that on $\partial{V}$, $u$ is $0$ and then on $V$, $u$ is non zero so $u$ is not a smooth vector field on $\partial{V} \cup V$ and thus the divergence theorem is not applicable? Thank you in advance – Goose Jun 6 at 6:31
• @Goose: Yes. You have $u$ depending only on $x$ yet it must vanish at the boundary. This is a simple model that only approximates a physical situation. An inviscid fluid must be tangential to a boundary. A viscous fluid satisfies a no-slip condition and so a boundary layer would form. Think of $u$ here as a cross-sectional average velocity. – RRL Jun 6 at 6:47