## Sunday, July 4, 2010

### 9. Derivation of the Continuity Equation in Spherical Coordinates

We start by selecting a spherical control volume dV. As shown in the figure below, this is given by
where r, θ, and φ stand for the radius, polar, and azimuthal angles, respectively. The azimuthal angle is also referred to as the zenith or colatitude angle.

The differential mass is

We will represent the velocity field via

In an Eulerian reference frame mass conservation is represented by accumulation, net flow, and source terms in a control volume.

### Accumulation

The accumulation term is given by the time rate of change of mass. We therefore have
$\bg_white \120dpi \frac{\partial \rho}{\partial t}r^2 \sin \theta {\rm d}r {\rm d}\theta {\rm d}\phi$

The net flow through the control volume can be divided into that corresponding to each direction.

Starting with the radial direction, we have
The inflow area Ain is a trapezoid whose area is given by
The key term here is the sine term. Note that the mid segment is the average of the bases (parallel sides). Upon expansion of Ain, and in the limit of vanishing dθ, we have
substitution into Ain yields
where high order terms have been dropped.

The outflow in the radial direction is
$\bg_white \120dpi \dot m_{\rm out}=\left(\rho u +\frac{\partial \rho u}{\partial r}{\rm d}r \right )A_{\rm out}$
but
where
and
By only keeping the lowest (second & third) order terms in the resulting expression, we have
Note, that in the expression for Aout, we kept both second order and third order terms. The reason for this is that this term will be multiplied by "dr" and therefore, the overall order will be three. In principle, one must carry all those terms until the final substitution is made, and only then one can compare terms and keep those with the lowest order.

At the outset, the net flow in the radial direction is given by

### Polar Flow (θ)

The inflow in the polar direction is
where

The outflow in the θ direction is
where
Upon expansion, and keeping both second and third order terms, we get

Finally, the net flow in the polar direction is

### Azimuthal Flow (φ)

The inflow in the azimuthal direction is given by
with
while the outflow is
and

At the outset, the net flow in the polar direction is

### Continuity Equation

Now, by collecting all mass fluxes we have
which, upon dividing by dV and combining terms, reduces to

Cite as:
Saad, T. "9. Derivation of the Continuity Equation in Spherical Coordinates". Weblog entry from Please Make A Note. http://pleasemakeanote.blogspot.com/2010/02/9-derivation-of-continuity-equation-in.html

1. Thanks a lot for the derivation, I was having some issues picturing the spherical element.

A better way of doing it is by doing the grouping done in the last line using the product rule when you calculate each difference in mass flow rate.

Also if you leave some second order terms, when you divide by dV, then you can say and as dx_k go to 0, those terms go away.

2. There is an error in the last line. In polar coordinates, it should be derivative of ro*v*sin(theta) wrt theta instead of derivative of just ro*v wrt theta.

3. yes, thanks for catching that typo.

4. pls explain it i m not able to unnderstand how did u make dis diagram amd draw its coordinate and y did u do dis

5. What software did you use to draw the element?

Was trying to do it in Visio, but it rather complicated so I'm thinking that there must be a software already out there with this capability.

And thanks for the derivation, very nice job!

Thanks!

1. Thanks for stopping by. I used Canvas to draw the element. I have since moved away from commercial software and I currently use inkscape. Aside from some of its bugs, it is a great free vector graphics software for drawing illustrations similar to this one.

6. Hello,

Thanks for diligent work. I couldn't still understand the way you calculated the volume ,dV.