# Gradient and Divergence in Orthonormal Curvilinear Coordinates

Gradient and Divergence in Orthonormal Curvilinear Coordinates Swapnil Sunil Jain Aug 7, 2006

Gradient and Divergence in Orthonormal Curvilinear Coordinates

In rectangular coordinates (where $f=f(x,y,z)$), an infinitesimal   length vector $d\vec{l}$ is given by

 $\displaystyle d\vec{l}=dx\hat{x}+dy\hat{y}+dz\hat{z}$

 $\displaystyle\nabla=\frac{\partial}{\partial x}\hat{x}+\frac{\partial}{% \partial y}\hat{y}+\frac{\partial}{\partial z}\hat{z}$
 $\displaystyle df=\nabla f\circ d\vec{l}=\frac{\partial f}{\partial x}dx+\frac{% \partial f}{\partial y}dy+\frac{\partial f}{\partial z}dz$

Similarly in orthonormal curvilinear coordinates ( where $f=f(q_{1},q_{2},q_{3})$), the infinitesimal length vector is given by11See my article Unit Vectors in Curvilinear Coordinates for an insight into this expression.

 $\displaystyle d\vec{l}=h_{1}dq_{1}\hat{q}_{1}+h_{2}dq_{2}\hat{q}_{2}+h_{3}dq_{% 3}\hat{q}_{3}$

where

 $\displaystyle h_{i}=\sqrt{\sum_{k}\Big{(}\frac{\partial\vec{x}_{k}}{\partial q% _{i}}\Big{)}^{2}}\mbox{ and }\hat{q}_{i}=\frac{1}{h_{i}}\Big{(}\frac{\partial% \vec{x}_{k}}{\partial q_{i}}\Big{)}\mbox{ for }i\in{1,2,3}$

So if

 $\displaystyle\nabla=\alpha\frac{\partial}{\partial q_{1}}\hat{q}_{1}+\beta% \frac{\partial}{\partial q_{2}}\hat{q}_{2}+\gamma\frac{\partial}{\partial q_{3% }}\hat{q}_{3}$

then since we know that

 $\displaystyle df=\frac{\partial f}{\partial q_{1}}dq_{1}+\frac{\partial f}{% \partial q_{2}}dq_{2}+\frac{\partial f}{\partial q_{3}}dq_{3}$

and

 $\displaystyle df=\nabla F\circ d\vec{l}=\alpha h_{1}\frac{\partial f}{\partial q% _{1}}dq_{1}+\beta h_{2}\frac{\partial f}{\partial q_{2}}dq_{2}+\gamma h_{3}% \frac{\partial f}{\partial q_{3}}dq_{3}$

this implies that

 $\displaystyle\alpha=\frac{1}{h_{i}};\beta=\frac{1}{h_{2}};\gamma=\frac{1}{h_{3}}$

Hence,

 $\displaystyle\nabla$ $\displaystyle=$ $\displaystyle\frac{1}{h_{1}}\frac{\partial}{\partial q_{1}}\hat{q}_{1}+\frac{1% }{h_{2}}\frac{\partial}{\partial q_{2}}\hat{q}_{2}+\frac{1}{h_{3}}\frac{% \partial}{\partial q_{3}}\hat{q}_{3}$ $\displaystyle=$ $\displaystyle\sum_{i}\frac{1}{h_{i}}\frac{\partial}{\partial q_{i}}\hat{q}_{i}$

## Divergence in Curvilinear Coordinates

In the previous section  we concluded that in curvilinear coordinates, the gradient operator $\nabla$ is given by

 $\displaystyle\nabla=\sum_{i}\frac{1}{h_{i}}\frac{\partial}{\partial q_{i}}\hat% {q}_{i}$

Then for $\vec{F}=F_{1}\hat{q}_{1}+F_{2}\hat{q}_{2}+F_{3}\hat{q}_{3}$, the divergence of $\vec{F}$ is given by

 $\displaystyle\nabla\circ\vec{F}=\Big{(}\sum_{i}\frac{1}{h_{i}}\frac{\partial}{% \partial q_{i}}\hat{q}_{i}\Big{)}\circ\vec{F}$

which is not equal to

 $\displaystyle\Big{(}\sum_{i}\frac{1}{h_{i}}\frac{\partial}{\partial q_{i}}\hat% {q}_{i}\Big{)}\circ\vec{F}\neq\sum_{i}\frac{1}{h_{i}}\frac{\partial F_{i}}{% \partial q_{i}}$

as one would think! The real expression can be derived the following way,

 $\displaystyle=\sum_{i}\Big{[}\Big{(}\frac{1}{h_{i}}\frac{\partial}{\partial q_% {i}}\hat{q}_{i}\Big{)}\circ\vec{F}\Big{]}$ $\displaystyle=\sum_{i}\Big{[}\Big{(}\frac{1}{h_{i}}\hat{q}_{i}\Big{)}\circ\Big% {(}\frac{\partial\vec{F}}{\partial q_{i}}\Big{)}\Big{]}$ $\displaystyle=\sum_{i}\Big{[}\Big{(}\frac{1}{h_{i}}\hat{q}_{i}\Big{)}\circ\Big% {(}\frac{\partial}{\partial q_{i}}\Big{(}\sum_{j}F_{j}\hat{q}_{j}\Big{)}\Big{)% }\Big{]}$
 $\displaystyle=\sum_{i}\Big{[}\Big{(}\frac{1}{h_{i}}\hat{q}_{i}\Big{)}\circ\Big% {(}\sum_{j}\frac{\partial}{\partial q_{i}}\Big{(}F_{j}\hat{q}_{j}\Big{)}\Big{)% }\Big{]}$ $\displaystyle=\sum_{i}\Big{[}\Big{(}\frac{1}{h_{i}}\hat{q}_{i}\Big{)}\circ\Big% {(}\sum_{j}\hat{q}_{j}\frac{\partial F_{j}}{\partial q_{i}}+F_{j}\frac{% \partial\hat{q}_{j}}{\partial q_{i}}\Big{)}\Big{]}$
 $\displaystyle=\sum_{i}\Big{[}\Big{(}\frac{1}{h_{i}}\hat{q}_{i}\Big{)}\circ\Big% {(}\sum_{j}\hat{q}_{j}\frac{\partial F_{j}}{\partial q_{i}}+\sum_{j}F_{j}\frac% {\partial\hat{q}_{j}}{\partial q_{i}}\Big{)}\Big{]}$ $\displaystyle=\sum_{i}\Big{[}\Big{(}\frac{1}{h_{i}}\hat{q}_{i}\Big{)}\circ\sum% _{j}\hat{q}_{j}\frac{\partial F_{j}}{\partial q_{i}}+\Big{(}\frac{1}{h_{i}}% \hat{q}_{i}\Big{)}\circ\sum_{j}F_{j}\frac{\partial\hat{q}_{j}}{\partial q_{i}}% \Big{]}$
 $\displaystyle=\underbrace{\sum_{i}\Big{[}\Big{(}\frac{1}{h_{i}}\hat{q}_{i}\Big% {)}\circ\sum_{j}\hat{q}_{j}\frac{\partial F_{j}}{\partial q_{i}}\Big{]}}_{% \mbox{call it A}}+\underbrace{\sum_{i}\Big{[}\Big{(}\frac{1}{h_{i}}\hat{q}_{i}% \Big{)}\circ\sum_{j}F_{j}\frac{\partial\hat{q}_{j}}{\partial q_{i}}\Big{]}}_{% \mbox{call it B}}$
 $\displaystyle A$ $\displaystyle=$ $\displaystyle\sum_{i}\Big{[}\Big{(}\frac{1}{h_{i}}\hat{q}_{i}\Big{)}\circ\sum_% {j}\hat{q}_{j}\frac{\partial F_{j}}{\partial q_{i}}\Big{]}$ $\displaystyle=$ $\displaystyle\sum_{i}\Big{[}\frac{1}{h_{i}}\sum_{j}\underbrace{(\hat{q}_{i}% \circ\hat{q}_{j})}_{\delta_{ij}}\frac{\partial F_{j}}{\partial q_{i}}\Big{]}$ $\displaystyle=$ $\displaystyle\sum_{i}\frac{1}{h_{i}}\frac{\partial F_{i}}{\partial q_{i}}$
 $\displaystyle B$ $\displaystyle=$ $\displaystyle\sum_{i}\Big{[}\Big{(}\frac{1}{h_{i}}\hat{q}_{i}\Big{)}\circ\sum_% {j}F_{j}\frac{\partial\hat{q}_{j}}{\partial q_{i}}\Big{]}$

Using the following equality22The proof of this identity is left as an exercise for the reader.

 $\displaystyle\frac{\partial\hat{q}_{j}}{\partial q_{i}}=\frac{\hat{q}_{i}}{h_{% j}}\frac{\partial h_{i}}{\partial q_{j}}\qquad\forall i\neq j$

we can write $B$ as

 $\displaystyle B$ $\displaystyle=$ $\displaystyle\sum_{i}\Big{[}\Big{(}\frac{1}{h_{i}}\hat{q}_{i}\Big{)}\circ\sum_% {j}F_{j}\Big{(}\hat{q}_{i}\frac{1}{h_{j}}\frac{\partial h_{i}}{\partial q_{j}}% \Big{)}\Big{]}\qquad\forall i\neq j$ $\displaystyle=$ $\displaystyle\sum_{i}\Big{[}\frac{1}{h_{i}}\sum_{j}F_{j}\underbrace{(\hat{q}_{% i}\circ\hat{q}_{i})}_{1}\frac{1}{h_{j}}\frac{\partial h_{i}}{\partial q_{j}}% \Big{]}\qquad\forall i\neq j$ $\displaystyle=$ $\displaystyle\sum_{i}\Big{[}\frac{1}{h_{i}}\sum_{j}F_{j}\frac{1}{h_{j}}\frac{% \partial h_{i}}{\partial q_{j}}\Big{]}\qquad\forall i\neq j$ $\displaystyle=$ $\displaystyle\sum_{i\neq j}\frac{F_{j}}{h_{j}h_{i}}\frac{\partial h_{i}}{% \partial q_{j}}$ $\displaystyle=$ $\displaystyle\sum_{i\neq 1}\frac{F_{1}}{h_{1}h_{i}}\frac{\partial h_{i}}{% \partial q_{1}}+\sum_{i\neq 2}\frac{F_{2}}{h_{2}h_{i}}\frac{\partial h_{i}}{% \partial q_{2}}+\sum_{i\neq 3}\frac{F_{3}}{h_{3}h_{i}}\frac{\partial h_{i}}{% \partial q_{3}}$
 $\displaystyle\Rightarrow\nabla\circ\vec{F}$ $\displaystyle=$ $\displaystyle A+B$ $\displaystyle=$ $\displaystyle\sum_{i}\frac{1}{h_{i}}\frac{\partial F_{i}}{\partial q_{i}}+\sum% _{i\neq 1}\frac{F_{1}}{h_{1}h_{i}}\frac{\partial h_{i}}{\partial q_{1}}+\sum_{% i\neq 2}\frac{F_{2}}{h_{2}h_{i}}\frac{\partial h_{i}}{\partial q_{2}}+\sum_{i% \neq 3}\frac{F_{3}}{h_{3}h_{i}}\frac{\partial h_{i}}{\partial q_{3}}$ $\displaystyle=$ $\displaystyle\Big{[}\frac{1}{h_{1}}\frac{\partial F_{1}}{\partial q_{1}}+\frac% {1}{h_{2}}\frac{\partial F_{2}}{\partial q_{2}}+\frac{1}{h_{3}}\frac{\partial F% _{3}}{\partial q_{3}}\Big{]}$ $\displaystyle+\Big{[}\frac{F_{1}}{h_{1}h_{2}}\frac{\partial h_{2}}{\partial q_% {1}}+\frac{F_{1}}{h_{1}h_{3}}\frac{\partial h_{3}}{\partial q_{1}}\Big{]}$ $\displaystyle+\Big{[}\frac{F_{2}}{h_{2}h_{1}}\frac{\partial h_{1}}{\partial q_% {2}}+\frac{F_{2}}{h_{2}h_{3}}\frac{\partial h_{3}}{\partial q_{2}}\Big{]}$ $\displaystyle+\Big{[}\frac{F_{3}}{h_{3}h_{1}}\frac{\partial h_{1}}{\partial q_% {3}}+\frac{F_{3}}{h_{3}h_{2}}\frac{\partial h_{2}}{\partial q_{3}}\Big{]}$
 $\displaystyle\nabla\circ\vec{F}$ $\displaystyle=$ $\displaystyle\Big{[}\frac{1}{h_{1}}\frac{\partial F_{1}}{\partial q_{1}}+\frac% {F_{1}}{h_{1}h_{2}}\frac{\partial h_{2}}{\partial q_{1}}+\frac{F_{1}}{h_{1}h_{% 3}}\frac{\partial h_{3}}{\partial q_{1}}\Big{]}$ $\displaystyle+\Big{[}\frac{1}{h_{2}}\frac{\partial F_{2}}{\partial q_{2}}+% \frac{F_{2}}{h_{2}h_{1}}\frac{\partial h_{1}}{\partial q_{2}}+\frac{F_{2}}{h_{% 2}h_{3}}\frac{\partial h_{3}}{\partial q_{2}}\Big{]}$ $\displaystyle+\Big{[}\frac{1}{h_{3}}\frac{\partial F_{3}}{\partial q_{3}}+% \frac{F_{3}}{h_{3}h_{1}}\frac{\partial h_{1}}{\partial q_{3}}+\frac{F_{3}}{h_{% 3}h_{2}}\frac{\partial h_{2}}{\partial q_{3}}\Big{]}$

If we define $\Omega\equiv\Pi_{i}h_{i}$, we can further write the above expression as

 $\displaystyle\nabla\circ\vec{F}$ $\displaystyle=$ $\displaystyle\Big{[}\frac{h_{2}h_{3}}{\Omega}\frac{\partial F_{1}}{\partial q_% {1}}+\frac{F_{1}h_{3}}{\Omega}\frac{\partial h_{2}}{\partial q_{1}}+\frac{F_{1% }h_{2}}{\Omega}\frac{\partial h_{3}}{\partial q_{1}}\Big{]}$ $\displaystyle+\Big{[}\frac{h_{1}h_{3}}{\Omega}\frac{\partial F_{2}}{\partial q% _{2}}+\frac{F_{2}h_{3}}{\Omega}\frac{\partial h_{1}}{\partial q_{2}}+\frac{h_{% 1}F_{2}}{\Omega}\frac{\partial h_{3}}{\partial q_{2}}\Big{]}$ $\displaystyle+\Big{[}\frac{h_{1}h_{2}}{\Omega}\frac{\partial F_{3}}{\partial q% _{3}}+\frac{h_{2}F_{3}}{\Omega}\frac{\partial h_{1}}{\partial q_{3}}+\frac{h_{% 1}F_{3}}{\Omega}\frac{\partial h_{2}}{\partial q_{3}}\Big{]}$ $\displaystyle=$ $\displaystyle\frac{1}{\Omega}\Bigg{(}\Big{[}\frac{\partial F_{1}}{\partial q_{% 1}}h_{2}h_{3}+F_{1}h_{3}\frac{\partial h_{2}}{\partial q_{1}}+F_{1}h_{2}\frac{% \partial h_{3}}{\partial q_{1}}\Big{]}$ $\displaystyle+\Big{[}h_{1}\frac{\partial F_{2}}{\partial q_{2}}h_{3}+\frac{% \partial h_{1}}{\partial q_{2}}F_{2}h_{3}+h_{1}F_{2}\frac{\partial h_{3}}{% \partial q_{2}}\Big{]}$ $\displaystyle+\Big{[}h_{1}h_{2}\frac{\partial F_{3}}{\partial q_{3}}+\frac{% \partial h_{1}}{\partial q_{3}}h_{2}F_{3}+h_{1}\frac{\partial h_{2}}{\partial q% _{3}}F_{3}\Big{]}\Bigg{)}$ $\displaystyle=$ $\displaystyle\frac{1}{\Omega}\Big{(}\frac{\partial}{\partial q_{1}}(F_{1}h_{2}% h_{3})+\frac{\partial}{\partial q_{2}}(h_{1}F_{2}h_{3})+\frac{\partial}{% \partial q_{3}}(h_{1}h_{2}F_{3})\Big{)}$

Hence,

 $\displaystyle\nabla\circ\vec{F}$ $\displaystyle=$ $\displaystyle\frac{1}{\Omega}\sum_{i}\frac{\partial}{\partial q_{i}}\Big{(}% \frac{\Omega}{h_{i}}F_{i}\Big{)}\quad\mbox{ where }\Omega=\Pi_{i}h_{i}$
Title Gradient and Divergence in Orthonormal Curvilinear Coordinates GradientAndDivergenceInOrthonormalCurvilinearCoordinates1 2013-03-11 19:26:23 2013-03-11 19:26:23 swapnizzle (13346) (0) 1 swapnizzle (0) Definition