# Conversion from Cartesian to Cylindrical Coordinates

1. Jun 25, 2006

### seaspecies

Hello.

I am interested in learning the mathematical derivation from Cartesian coordinates Navier-Stokes equation to cylindrical coordinates Navier-Stokes equation. These equations have similar forms to the basic heat and mass transfer differential governing equations. I’ve tried looking online and at a variety of fluid mechanics books and heat transfer books and they all simply skip the math and go straight into just stating the equations. It seems like it is too complicated that it is not worth saying. Or it might be so trivial that I might be missing something. Maybe it is not worth it but I am curious of how it is done.

I attached the part the I am most confused about as a jpeg. How do they equal?

$$\frac{\partial T^2}{\partial x^2}+\frac{\partial T^2}{\partial y^2}=\frac{1}{r}\frac{\partial}{\partial r}r\frac{\partial T}{\partial r}+\frac{1}{r^2}\frac{\partial T^2}{\partial\theta^2}$$

Thanks. I am sorry if I had any errors I am new here.

#### Attached Files:

• ###### equation.JPG
File size:
12.3 KB
Views:
563
Last edited: Jun 25, 2006
2. Jun 25, 2006

### seaspecies

So I've attached how far I've gotten but I am not sure if there are any tricks because I'm stuck.

$$\frac{\partial }{\partial x}=\frac{\partial }{\partial r}\frac{\partial r}{\partial x}=\frac{\partial }{\partial r}cos\theta$$

$$\frac{\partial }{\partial y}=\frac{\partial }{\partial r}\frac{\partial r}{\partial y}=\frac{\partial }{\partial r}sin\theta$$

$$\frac{\partial T}{\partial x}=\frac{\partial r}{\partial x}\frac{\partial T}{\partial r} = cos\theta\frac{\partial T}{\partial r}$$

$$\frac{\partial T}{\partial y}=\frac{\partial r}{\partial y}\frac{\partial T}{\partial r} = sin\theta\frac{\partial T}{\partial r}$$

$$\frac{\partial T^2}{\partial x^2}+\frac{\partial T^2}{\partial y^2} = sin\theta \frac{\partial }{\partial r} (sin\theta \frac{\partial T}{\partial r}) + cos\theta \frac{\partial }{\partial r} (cos\theta\frac{\partial T}{\partial r}) =? \frac{1}{r}\frac{\partial }{\partial r}r\frac{\partial T}{\partial r}+\frac{1}{r^2}\frac{\partial T^2}{\partial \theta^2}$$

** Edited so that LaTex would work. (I just figured it out )

on a side note, I am not sure if this warrents a new topic, but I see my engineering colleagues interchange d and $$\partial$$. I believe there is a difference mathamatically but what is it in particular and will it change the meaning the governing equations mathamatically?

#### Attached Files:

• ###### Equation2.JPG
File size:
30.5 KB
Views:
1,828
Last edited: Jun 25, 2006
3. Jun 25, 2006

### arildno

Well, usually, the topic of coordinate transformations would be taught in courses of vector analysis.
It is not particularly complicated (it should be easily understood), but the arithmetic can be quite messy if we wish to keep the notation on an intuitively clear level. Do you have a vector analysis textbook?

4. Jun 25, 2006

### HallsofIvy

Basically, changeing derivatives from one coordinate sytem to another is careful application of the chain rule.

Your
$$\frac{\partial }{\partial x}=\frac{\partial }{\partial r}\frac{\partial r}{\partial x}=\frac{\partial }{\partial r}cos\theta$$
is only partially correct.
Since in polar coordinates, x depends on two variables, r and $\theta$,
$$\frac{\partial \phi}{\partial x}= \frac{\partial r}{\partial x}\frac{\partial \phi}{\partial r}+ \frac{\partial \theta}{\partial x} \frac{\partial \phi}{\partial \theta}$$

$$r= \sqrt{x^2+ y^2}= \left(x^2+ y^2\right)^{\frac{1}{2}}[/itex] so [tex]\frac{\partial r}{\partial x}= \frac{1}{2}\left(x^2+ y^2\right)^{-\frac{1}{2}}\left(2x\right)= \frac{x}{\sqrt{x^2+ y^2}}= \frac{r cos(\theta)}{r}= cos(\theta)$$

Okay, now I see where you got your expression above- but it isn't complete.

$$\theta= tan^{-1}\frac{y}{x}[/itex] so [tex]\frac{\partial \theta}{\partial x}= \frac{1}{1+ \frac{y^2}{x^2}}\left(-\frac{y}{x^2}\right)= \frac{-y}{x^2+ y^2}= \frac{-r sin(\theta)}{r^2}= -\frac{1}{r}sin(\theta)[/itex] That gives [tex]\frac{\partial \phi}{\partial x}= cos(\theta)\frac{\partial \phi}{\partial r}- \frac{1}{r}sin(\theta)\frac{\partial \phi}{\partial \theta}$$

Once again, it really just the chain rule, carefully applied.

Now, make sure you have plenty of time and paper, take a deep breath, and do it again to find $\frac{\partial^2 \phi}{\partial x^2}$!

5. Jun 25, 2006

### seaspecies

Question

Hello. Thanks for the reply. I am wondering if this is mathematically viable:
Assuming:
$$\frac{\partial \phi}{\partial x}= \frac{\partial r}{\partial x}\frac{\partial \phi}{\partial r}+ \frac{\partial \theta}{\partial x} \frac{\partial \phi}{\partial \theta}$$ (1)

and

Assuming:
$$\frac{\partial}{\partial x}= \frac{\partial r}{\partial x}\frac{\partial}{\partial r}+ \frac{\partial \theta}{\partial x} \frac{\partial}{\partial \theta}$$ (2)

Would the following work?
$$\frac{\partial^2 \phi}{\partial x^2} = \frac{\partial}{\partial x}\frac{\partial \phi}{\partial x}$$ (3)

Plugging equation 1 and 2 into equation 3.

$$\frac{\partial^2 \phi}{\partial x^2} = (\frac{\partial r}{\partial x}\frac{\partial}{\partial r}+ \frac{\partial \theta}{\partial x} \frac{\partial}{\partial \theta}) (\frac{\partial r}{\partial x}\frac{\partial \phi}{\partial r}+ \frac{\partial \theta}{\partial x} \frac{\partial \phi}{\partial \theta})$$

$$\frac{\partial^2 \phi}{\partial x^2} = \frac{\partial r}{\partial x}\frac{\partial}{\partial r} \frac{\partial r}{\partial x}\frac{\partial \phi}{\partial r} + \frac{\partial r}{\partial x}\frac{\partial}{\partial r} \frac{\partial \theta}{\partial x} \frac{\partial \phi}{\partial \theta} + \frac{\partial \theta}{\partial x}\frac{\partial}{\partial \theta} \frac{\partial r}{\partial x}\frac{\partial \phi}{\partial r} + \frac{\partial \theta}{\partial x}\frac{\partial}{\partial \theta} \frac{\partial \theta}{\partial x} \frac{\partial \phi}{\partial \theta}$$

$$\frac{\partial^2 \phi}{\partial x^2} + \frac{\partial^2 \phi}{\partial y^2} = \frac{\partial r}{\partial x}\frac{\partial}{\partial r} \frac{\partial r}{\partial x}\frac{\partial \phi}{\partial r} + \frac{\partial r}{\partial x}\frac{\partial}{\partial r} \frac{\partial \theta}{\partial x} \frac{\partial \phi}{\partial \theta} + \frac{\partial \theta}{\partial x}\frac{\partial}{\partial \theta} \frac{\partial r}{\partial x}\frac{\partial \phi}{\partial r} + \frac{\partial \theta}{\partial x}\frac{\partial}{\partial \theta} \frac{\partial \theta}{\partial x} \frac{\partial \phi}{\partial \theta} + \frac{\partial r}{\partial y}\frac{\partial}{\partial r} \frac{\partial r}{\partial y}\frac{\partial \phi}{\partial r} + \frac{\partial r}{\partial y}\frac{\partial}{\partial r} \frac{\partial \theta}{\partial y} \frac{\partial \phi}{\partial \theta} + \frac{\partial \theta}{\partial y}\frac{\partial}{\partial \theta} \frac{\partial r}{\partial y}\frac{\partial \phi}{\partial r} + \frac{\partial \theta}{\partial y}\frac{\partial}{\partial \theta} \frac{\partial \theta}{\partial y} \frac{\partial \phi}{\partial \theta}$$

The
$$\frac{\partial}{\partial \theta}\frac{\partial \phi}{\partial r}$$
terms and its other combinations cancel out algebraically leaving only four terms

$$\frac{\partial^2 \phi}{\partial x^2} + \frac{\partial^2 \phi}{\partial y^2} = \frac{\partial r}{\partial x}\frac{\partial}{\partial r} \frac{\partial r}{\partial x}\frac{\partial \phi}{\partial r} + \frac{\partial \theta}{\partial x}\frac{\partial}{\partial \theta} \frac{\partial \theta}{\partial x} \frac{\partial \phi}{\partial \theta} + \frac{\partial r}{\partial y}\frac{\partial}{\partial r} \frac{\partial r}{\partial y}\frac{\partial \phi}{\partial r} + \frac{\partial \theta}{\partial y}\frac{\partial}{\partial \theta} \frac{\partial \theta}{\partial y} \frac{\partial \phi}{\partial \theta}$$

If this works, ultimately I get something like this which is so close but I can’t get rid of the sin and cos (4 of the 8 terms cancel out and 2 of the terms could be combined leaving only 3 terms left). Is there a mathamatical identity or any way to approach this?

$$sin\theta\frac{\partial}{\partial r} sin\theta\frac{\partial\phi}{\partial r} + cos\theta\frac{\partial}{\partial r} cos\theta\frac{\partial\phi}{\partial r} + \frac{1}{r^2}\frac{\partial^2 \phi}{\partial\theta^2}$$

which should ultimately equal the following if everything turns out well?

$$\frac{1}{r}\frac{\partial }{\partial r}r\frac{\partial \phi}{\partial r}+\frac{1}{r^2}\frac{\partial \phi^2}{\partial \theta^2}$$

Appendix:
$$\frac{\partial r}{\partial x}= \frac{1}{2}\left(x^2+ y^2\right)^{-\frac{1}{2}}\left(2x\right)= \frac{x}{\sqrt{x^2+ y^2}}= \frac{r cos(\theta)}{r}= cos(\theta)$$

$$\frac{\partial r}{\partial y}= \frac{1}{2}\left(x^2+ y^2\right)^{-\frac{1}{2}}\left(2y\right)= \frac{y}{\sqrt{x^2+ y^2}}= \frac{r sin(\theta)}{r}= sin(\theta)$$

Last edited: Jun 25, 2006
6. Jun 25, 2006

### arildno

No.
Understand what the symbols mean, before spewing them out.

7. Jun 25, 2006

### seaspecies

Dear Arildno, I am sorry for the confusion. I tried add more text and equations to show my logical flow. Thanks for your reply.

Dear HallsOfIvy, Thanks! It makes much more sense now. I am wonder if my method was what you meant by:
"Now, make sure you have plenty of time and paper, take a deep breath, and do it again"

If my last method would not work did you want me to take the following approach
$$\frac{\partial^2\phi}{\partial x^2}=\frac{\partial^2 r}{\partial x^2}\frac{\partial^2\phi}{\partial r^2} + \frac{\partial^2 \theta}{\partial x^2}\frac{\partial^2\phi}{\partial r^2}$$

And compute all the second derivatives. But then my final answer won't have a
$$\frac{\partial }{\partial r}r\frac{\partial \phi}{\partial r}$$

Thanks!

Last edited: Jun 25, 2006
8. Jun 26, 2006

### arildno

I'm sorry about my previous reply, here's how you migth do it:
We have the 2-D Laplacian:
$$\nabla^{2}\phi=\frac{\partial^{2}\phi}{\partial{x}^{2}}+\frac{\partial^{2}\phi}{\partial{y}^{2}},\nabla^{2}\equiv\nabla\cdot\nabla,\nabla=\vec{i}\frac{\partial}{\partial{x}}+\vec{j}\frac{\partial}{\partial{y}}$$

If we write the gradient operator $\nabla$ in terms of 2-D polar coordinates, we have:
$$\nabla=\vec{i}_{r}\frac{\partial}{\partial{r}}+\vec{i}_{\theta}\frac{\partial}{r\partial\theta}[/itex] Notice that the unit vectors varies with the angle (but not with the radius!); we have: [tex]\frac{\partial\vec{i}_{r}}{\partial\theta}=\vec{i}_{\theta},\frac{\partial\vec{i}_{\theta}}{\partial\theta}=-\vec{i}_{r}$$

Now, perform the dot product $\nabla\cdot\nabla$:
$$\nabla^{2}\equiv\nabla\cdot\nabla=\vec{i}_{r}\cdot\frac{\partial}{\partial{r}}(\vec{i}_{r}\frac{\partial}{\partial{r}}+\vec{i}_{\theta}\frac{\partial}{r\partial\theta})+\frac{1}{r}\vec{i}_{\theta}\cdot\frac{\partial}{\partial\theta}(\vec{i}_{r}\frac{\partial}{\partial{r}}+\vec{i}_{\theta}\frac{\partial}{r\partial\theta})$$

By applying the product rules of differentiation, remembering that the unit vectors are constant with respect with r and that $\vec{i}_{r}\cdot\vec{i}_{\theta}=0$, we end up with:
$$\nabla^{2}=\frac{\partial^{2}}{\partial{r}^{2}}+\frac{1}{r}\frac{\partial}{\partial{r}}+\frac{1}{r^{2}}\frac{\partial^{2}}{\partial\theta^{2}}=\frac{1}{r}\frac{\partial}{\partial{r}}(r\frac{\partial}{\partial{r}})+\frac{1}{r^{2}}}}\frac{\partial^{2}}{\partial\theta^{2}}$$
This is the desired repesentation of the Laplacian operator in polar coordinates.

Last edited: Jun 26, 2006
9. Jun 26, 2006

### seaspecies

Dear arildno,

Thanks! It makes much more sense now. I had to look back onto my old texts but I've got it figured out. Yet I am alittle confused on the last part. I tried figuring it out but I could not figure out how to combine the two terms into one:

$$\frac{\partial^{2}}{\partial{r}^{2}}+\frac{1}{r}\frac{\partial}{\partial{r}}=\frac{1}{r}\frac{\partial}{\partial{r}}(r\frac{\partial}{\partial{r}})$$

$$\nabla^{2}=\frac{\partial^{2}}{\partial{r}^{2}}+\frac{1}{r}\frac{\partial}{\partial{r}}+\frac{1}{r^{2}}\frac{\partial^{2}}{\partial\theta^{2}}=\frac{1}{r}\frac{\partial}{\partial{r}}(r\frac{\partial}{\partial{r}})+\frac{1}{r^{2}}}}\frac{\partial^{2}}{\partial\theta^{2}}$$

Thanks

Last edited: Jun 26, 2006
10. Jun 26, 2006

### arildno

Well:
$$\frac{\partial}{\partial{r}}(r\frac{\partial}{\partial{r}})=\frac{\partial{r}}{\partial{r}}\frac{\partial}{\partial{r}}+r\frac{\partial}{\partial{r}}(\frac{\partial}{\partial{r}})=\frac{\partial}{\partial{r}}+r\frac{\partial^{2}}{\partial{r}^{2}}$$

11. Jun 26, 2006

### seaspecies

Thanks! It all makes sense now. It was so simple I didn't see it. Thanks again!

12. Jun 26, 2006

### arildno

My pleasure!

13. Mar 20, 2007

### luckyyy

Hi Sir.....

what about this...i could not understand about ur conversion from cartisian to cylinrical coordinate, becoz it has a lot of mistakes, ...plz tell me the true method...

14. Mar 20, 2007

### cristo

Staff Emeritus
What do you mean? Please make your request more specific; state an exact question and the work you have done towards it.

15. Mar 21, 2007

### luckyyy

Luckyyy

i think, i did wrong something...but i am very intersting to solution of this, i spent many time to solve this but i could't....