## Sunday, February 22, 2009

### 8. Derivation of the Continuity Equation in Cylindrical Coordinates

This is one of my favorite derivations. Although it would sound a bit intimidating at first, as none of the standard textbooks carry out the derivation in curvilinear coordinates; it is rather easy to obtain. And guess what? the math is quite rewarding!
So we first have to start by selecting a convenient control volume. The idea here is to pick a volume whose sides are parallel per say to the coordinates. For cylindrical coordinates, one may choose the following control volume

Again, as we did in the previous post, we need to account for all the fluid that is accumulating, and flowing through this control volume, namely:
Rate of Rate of Flow In = Accumulation  + Rate of Flow Out
or
Accumulation + Flow Out - Flow In = 0

First, let’s get some basics laid out. The velocity field will be described as
$\bg_white&space;\150dpi&space;\small&space;\mathbf{u}&space;=&space;u&space;\mathbf{e}_{r}&space;+&space;v&space;\mathbf{e}_{\theta}&space;+&space;w&space;\mathbf{e}_z$
I always prefer to use u, v, and w instead of ur, utheta, and uz to save on subscripts, although the latter nomenclature is a bit more descriptive… we’ll get used to it. Now, by construction, the volume of the differential control volume is
$\bg_white&space;\150dpi&space;\small&space;d\mathcal{V}&space;=&space;r&space;d&space;r&space;d\theta&space;dz$
while the mass of fluid in the control volume is
$\bg_white \150dpi \small d\mathcal{M} = \rho d\mathcal{V}$
The rate of change of mass or accumulation in the control volume is then
$\bg_white&space;\150dpi&space;\small&space;\frac{\partial&space;\rho}{\partial&space;t}&space;r&space;d&space;r&space;d&space;\theta&space;d&space;z$
For the net flow through the control volume, we deal with it one face at a time. Starting with the r faces, the net inflow is
$\bg_white&space;\150dpi&space;\small&space;{\dot&space;m}_{r,in}&space;=&space;\rho&space;u&space;r&space;d\theta&space;dz$
while the outflow in the r direction is
$\bg_white \150dpi \small {\dot m}_{r,out} = \left(\rho u + \frac{\partial \rho u}{\partial r}dr\right)(r + dr) d\theta dz$
So that the net flow in the r direction is
\bg_white \150dpi \small \begin{align*} {\dot m}_{r,out} - {\dot m}_{r,in} = & \rho u dr d\theta dz\\ & + \frac{\partial \rho u}{\partial r}r dr d\theta dz \\ & + \frac{\partial \rho u}{\partial r} dr^2 d\theta dz \end{align*}
Being O(dr^2), the last term in this equation can be dropped so that the net flow on the r faces is
$\bg_white \150dpi \small {\dot m}_{r,out} - {\dot m}_{r,in} = \frac{1}{r}\rho u d\mathcal{V} + \frac{\partial \rho u}{\partial r}d\mathcal{V} + O(dr^2)$
The net flow in the theta direction is slightly easier to compute since the areas of the inflow and outflow faces are the same. At the outset, the net flow in the theta direction is
$\bg_white \150dpi \small {\dot m}_{\theta,net}= \frac{1}{r}\frac{\partial \rho v}{\partial \theta}d\mathcal{V}$
We now turn our attention to the z direction. The face area is that of a sector of angle d\theta:

then, the inflow at the lower z face is
$\bg_white \150dpi \small \dot{m}_{z,in} = \rho w A_z = \rho w r dr d\theta$
while the outflow at the upper z face is
\bg_white \150dpi \small \begin{align*} \dot{m}_{z,out} & = \left(\rho w + \frac{\partial \rho w}{\partial z}dz \right)A_z \\ & = \rho w r dr d\theta + \frac{\partial \rho w}{\partial z}r dr d\theta dz \end{align*}
Finally, the net flow in the z direction is
$\bg_white \150dpi \small \dot{m}_{z,out} - \dot{m}_{z,in} = \frac{\partial \rho w}{\partial z}r dr d\theta dz$
Now we can put things together to obtain the continuity equation
$\bg_white \150dpi \small \frac{\partial \rho}{\partial t}d\mathcal{V} + \frac{1}{r}\rho u d\mathcal{V} + \frac{\partial \rho u}{\partial r}d\mathcal{V} + \frac{1}{r} \frac{\partial \rho v}{\partial \theta}d\mathcal{V} + \frac{\partial \rho w}{\partial z}d\mathcal{V} = 0$
dividing by dV and rearranging the r components of the velocity
$\bg_white \150dpi \small \frac{\partial \rho}{\partial t} + \frac{1}{r}\frac{\partial (r \rho u)}{\partial r} + \frac{1}{r} \frac{\partial \rho v}{\partial \theta} + \frac{\partial \rho w}{\partial z} = 0$
Voila!
[Previous: Continuity Eq. in Cartesian Coordinates]

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

#### 30 comments:

1. Hi

I really need this equation & I dont know for what reason your blog is not working , is there anyway you can fix it or send it to me ????

2. Thanks buddy..i have been looking for these derivations in many texts...i used to get intimidated when i see the question in my exam..thank you..

3. thanks a lot.

4. Good and very descriptive derivation. Is there any chance you've ever worked through this derivation in spherical coordinates? I'm slogging through it now, and I think I must be getting it wrong because I'm coming up with some stupidly complicated equations. If you've worked through it already, I'd appreciate any help you could offer. Email me at kbranha AT yahoo DOT com if you can help. Thanks.

5. Thank you so much!

6. Thanks a lot! I have a question that why O(dr^2) can be dropped.

7. Ken, I posted the derivation of the continuity equation in Spherical coordinates. You can find it here: http://pleasemakeanote.blogspot.com/2010/02/9-derivation-of-continuity-equation-in.html

8. Orion, thanks a lot for your post.

As you know, dr, d\theta, and dz are all differential increments. Derivations that usually include such increments are valid in the limit as these increments approach zero. To be rigorous, one must carry out all these terms to the end. Those that do not cancel out will simply vanish in the limit. In this case, we know ahead of time that the higher order terms will vanish, so for simplicity, we don't carry them in the first place. Hope that clarifies things.

9. Thanks for work you are doing.

10. why does (1/r)*p*u+(dpu/dt)=(1/r)(drpu/dt) in the last line? thanks

11. I think that you are referring to the d/dr term not the d/dt term. If so, then expand the following:
(1/r)(drpu/dr) = (1/r) pu dr/dr + (1/r) r d(pu)/dr = (1/r) pu + d(pu)/dr

12. This was a very thorough derivation...I have about 5 texts on differential calculus and fluid mechanics and only one carries out any fundamental derivations that are not in cartesian coordinates (Bird Stewart and Lightfoot Transport Phenomena). Do you know of any solid texts that are thorough in this regard?

13. I have not seen this derivation in a reference system other than Cartesian coordinates. Thanks for the reference though.

14. Thanks for your work.Could you guide me on how to get the equation when body forces are considered.

15. You are AWESOME!!

16. I think there is a problem in your derivation.When you calculated the surface area in Z direction, you took dr as the height. Since you took dr equals to the edge, then that would be a regtangular but not a trapezoid. That is, given dr is the height, the way to calculate the area is dr*r*dtheta but not the way you present here although the results are the same.

17. The height of the trapezoid is dr*cos(dtheta)~dr with vanishing dtheta. Therefore, with vanishing dtheta, the height of the trapezoid becomes dr.
In your calculation A = dr*r*dtheta, you are assuming that the sector is a rectangle. This is only correct to second order. The area of that sector is:
A = (1/2)*(r+dr)^2*dtheta - (1/2)*r^2*dtheta
= r*dr*dtheta + (1/2)*dr^2*dtheta
which is exactely the area calculated by assuming that the sector is a trapezoid with height dr. To avoid any confusion, I've recalculated that area as a sector.

18. isn't mass balance " in - out = accumulation " . Why is it that you have taken it as out - in in all the directions?

1. You are correct and this is exactly what I've done. If you notice, the resulting equation is:
Accumulation + Out - In = 0.
You may have been mislead by a typo that I had in the first paragraph but have since fixed.

19. Thanks dude...I m looking for this from many dates....its is really good...thanks

20. Thanks really helped me with my engineering exams!

21. I am totally impressed. Keep up the good work.
Exceptional talent you have got

22. Can u jus elaborate the derivation of net flow in theta direction?

23. Thanks for sharing...

Best Wishes (:
Armin

24. thanks
i want mathematical modelling of condensation inside horizontal tube but i am not able to get it will yo please help me

25. I've done this derivation using an element centered on radial coordinate r so that inner cylindrical face is at (r-dr/2) and outer face is at (r + dr/2). Follow same procedure, get same result, but the O(dr)^2 does not appear.

26. Thanks a lot for the derivation. It is great that you are deriving something that most textbooks do not derive.

27. Can someone please explain the O(dr^2)?

28. Hi, can i know where you got this question from

29. seems like a very good work but I don't know why I can't view the main pictures showing the actual derivation