# Curvilinear Coordinates

Curvilinear Coordinates

The requirement for a boundary-following coordinate system and for a laterally variable grid resolution can both be met (for suitably smooth domains) by introducing an appropriate orthogonal coordinate transformation in the horizontal. Let the new coordinates be ${\displaystyle \xi (x,y)}$ and ${\displaystyle \eta (x,y)}$ where the relationship of horizontal arc length to the differential distance is given by:

${\displaystyle (ds)_{\xi }=\left({1 \over m}\right)d\xi }$

${\displaystyle (ds)_{\eta }=\left({1 \over n}\right)d\eta }$

Here, ${\displaystyle m(\xi ,\eta )}$ and ${\displaystyle n(\xi ,\eta )}$ are the scale factors which relate the differential distances ${\displaystyle (\Delta \xi ,\Delta \eta )}$ to the actual (physical) arc lengths.

It is helpful to write the equations in vector notation and to use the formulas for div, grad, and curl in curvilinear coordinates (see Batchelor, Appendix 2):

${\displaystyle \nabla \phi ={\hat {\xi }}m{\partial \phi \over \partial \xi }+{\hat {\eta }}n{\partial \phi \over \partial \eta }}$

${\displaystyle \nabla \cdot {\vec {a}}=mn\left[{\partial \over \partial \xi }\!\!\left({a \over n}\right)+{\partial \over \partial \eta }\!\!\left({b \over m}\right)\right]}$

${\displaystyle \nabla \times {\vec {a}}=mn\left|{\begin{matrix}{{\hat {\xi }}_{1} \over m}&{{\hat {\xi }}_{2} \over n}&{\hat {k}}\\{\partial \over \partial \xi }&{\partial \over \partial \eta }&{\partial \over \partial z}\\{a \over m}&{b \over n}&c\end{matrix}}\right|}$

${\displaystyle \nabla ^{2}\phi =\nabla \cdot \nabla \phi =mn\left[{\partial \over \partial \xi }\!\!\left({m \over n}{\partial \phi \over \partial \xi }\right)+{\partial \over \partial \eta }\!\!\left({n \over m}{\partial \phi \over \partial \eta }\right)\right]}$

where ${\displaystyle \phi }$ is a scalar and ${\displaystyle {\vec {a}}}$ is a vector with components ${\displaystyle a}$, ${\displaystyle b}$, and ${\displaystyle c}$.