--- title: "Curvilinear coordinates" sort_title: "Curvilinear coordinates" date: 2021-03-03 categories: - Mathematics - Physics layout: "concept" --- In a 3D coordinate system, the isosurface of a coordinate (i.e. the surface where that coordinate is constant while the others vary) is known as a **coordinate surface**, and the intersections of the surfaces of different coordinates are called **coordinate lines**. A **curvilinear** coordinate system is one where at least one of the coordinate surfaces is curved, e.g. in cylindrical coordinates the line between $$r$$ and $$z$$ is a circle. If the coordinate surfaces are mutually perpendicular, it is an **orthogonal** system, which is generally desirable. A useful attribute of a coordinate system is its **line element** $$\dd{\ell}$$, which represents the differential element of a line in any direction. For an orthogonal system, its square $$\dd{\ell}^2$$ is calculated by taking the differential elements of the old Cartesian $$(x, y, z)$$ system and writing them out in the new $$(x_1, x_2, x_3)$$ system. The resulting expression will be of the form: $$\begin{aligned} \boxed{ \dd{\ell}^2 = \dd{x}^2 + \dd{y}^2 + \dd{z}^2 = h_1^2 \dd{x_1}^2 + h_2^2 \dd{x_2}^2 + h_3^2 \dd{x_3}^2 } \end{aligned}$$ Where $$h_1$$, $$h_2$$, and $$h_3$$ are called **scale factors**, and need not be constants. The equation above only contains quadratic terms because the coordinate system is orthogonal by assumption. Examples of orthogonal curvilinear coordinate systems include [spherical coordinates](/know/concept/spherical-coordinates/), [cylindrical polar coordinates](/know/concept/cylindrical-polar-coordinates/), and [cylindrical parabolic coordinates](/know/concept/cylindrical-parabolic-coordinates/). In the following subsections, we derive general formulae to convert expressions from Cartesian coordinates to the new orthogonal system $$(x_1, x_2, x_3)$$. ## Basis vectors Consider the the vector form of the line element $$\dd{\ell}$$, denoted by $$\dd{\vu{\ell}}$$ and expressed as: $$\begin{aligned} \dd{\vu{\ell}} = \vu{e}_x \dd{x} + \vu{e}_y \dd{y} + \vu{e}_z \dd{z} \end{aligned}$$ We can expand the Cartesian differential elements, e.g. $$\dd{y}$$, in the new basis as follows: $$\begin{aligned} \dd{y} = \pdv{y}{x_1} \dd{x_1} + \pdv{y}{x_2} \dd{x_2} + \pdv{y}{x_3} \dd{x_3} \end{aligned}$$ If we write this out for $$\dd{x}$$, $$\dd{y}$$ and $$\dd{z}$$, and group the terms according to $$\dd{x}_1$$, $$\dd{x}_2$$ and $$\dd{x}_3$$, we can compare it the alternative form of $$\dd{\vu{\ell}}$$: $$\begin{aligned} \dd{\vu{\ell}} = \vu{e}_1 \:h_1 \dd{x_1} + \vu{e}_2 \:h_2 \dd{x_2} + \vu{e}_3 \:h_3 \dd{x_4} \end{aligned}$$ From this, we can read off $$\vu{e}_1$$, $$\vu{e}_2$$ and $$\vu{e}_3$$. Here we only give $$\vu{e}_1$$, since $$\vu{e}_2$$ and $$\vu{e}_3$$ are analogous: $$\begin{aligned} \boxed{ h_1 \vu{e}_1 = \vu{e}_x \pdv{x}{x_1} + \vu{e}_y \pdv{y}{x_1} + \vu{e}_z \pdv{y}{x_1} } \end{aligned}$$ ## Gradient In an orthogonal coordinate system, the gradient $$\nabla f$$ of a scalar $$f$$ is as follows, where $$\vu{e}_1$$, $$\vu{e}_2$$ and $$\vu{e}_3$$ are the basis unit vectors respectively corresponding to $$x_1$$, $$x_2$$ and $$x_3$$: $$\begin{gathered} \boxed{ \nabla f = \vu{e}_1 \frac{1}{h_1} \pdv{f}{x_1} + \vu{e}_2 \frac{1}{h_2} \pdv{f}{x_2} + \vu{e}_3 \frac{1}{h_3} \pdv{f}{x_3} } \end{gathered}$$
## Divergence The divergence of a vector $$\vb{V} = \vu{e}_1 V_1 + \vu{e}_2 V_2 + \vu{e}_3 V_3$$ in an orthogonal system is given by: $$\begin{aligned} \boxed{ \nabla \cdot \vb{V} = \frac{1}{h_1 h_2 h_3} \Big( \pdv{(h_2 h_3 V_1)}{x_1} + \pdv{(h_1 h_3 V_2)}{x_2} + \pdv{(h_1 h_2 V_3)}{x_3} \Big) } \end{aligned}$$
## Laplacian The Laplacian $$\nabla^2 f$$ is simply $$\nabla \cdot \nabla f$$, so we can find the general formula by combining the two preceding results for the gradient and the divergence: $$\begin{aligned} \boxed{ \nabla^2 f = \frac{1}{h_1 h_2 h_3} \bigg( \pdv{}{x_1}\Big(\! \frac{h_2 h_3}{h_1} \pdv{f}{x_1} \!\Big) + \pdv{}{x_2}\Big(\! \frac{h_1 h_3}{h_2} \pdv{f}{x_2} \!\Big) + \pdv{}{x_3}\Big(\! \frac{h_1 h_2}{h_3} \pdv{f}{x_3} \!\Big) \bigg) } \end{aligned}$$ ## Curl The curl of a vector $$\vb{V}$$ is as follows in a general orthogonal curvilinear system: $$\begin{aligned} \boxed{ \begin{aligned} \nabla \times \vb{V} &= \frac{\vu{e}_1}{h_2 h_3} \Big( \pdv{(h_3 V_3)}{x_2} - \pdv{(h_2 V_2)}{x_3} \Big) \\ &+ \frac{\vu{e}_2}{h_1 h_3} \Big( \pdv{(h_1 V_1)}{x_3} - \pdv{(h_3 V_3)}{x_1} \Big) \\ &+ \frac{\vu{e}_3}{h_1 h_2} \Big( \pdv{(h_2 V_2)}{x_1} - \pdv{(h_1 V_1)}{x_2} \Big) \end{aligned} } \end{aligned}$$
## Differential elements The point of the scale factors $$h_1$$, $$h_2$$ and $$h_3$$, as can seen from their derivation, is to correct for "distortions" of the coordinates compared to the Cartesian system, such that the line element $$\dd{\ell}$$ retains its length. This property extends to the surface $$\dd{S}$$ and volume $$\dd{V}$$. When handling a differential volume in curvilinear coordinates, e.g. for a volume integral, the size of the box $$\dd{V}$$ must be corrected by the scale factors: $$\begin{aligned} \boxed{ \dd{V} = \dd{x}\dd{y}\dd{z} = h_1 h_2 h_3 \dd{x_1} \dd{x_2} \dd{x_3} } \end{aligned}$$ The same is true for the isosurfaces $$\dd{S_1}$$, $$\dd{S_2}$$ and $$\dd{S_3}$$ where the coordinates $$x_1$$, $$x_2$$ and $$x_3$$ are respectively kept constant: $$\begin{aligned} \boxed{ \begin{aligned} \dd{S_1} &= h_2 h_3 \dd{x_2} \dd{x_3} \\ \dd{S_2} &= h_1 h_3 \dd{x_1} \dd{x_3} \\ \dd{S_3} &= h_1 h_2 \dd{x_1} \dd{x_2} \end{aligned} } \end{aligned}$$ Using the same logic, the normal vector element $$\dd{\vu{S}}$$ of an arbitrary surface is given by: $$\begin{aligned} \boxed{ \dd{\vu{S}} = \vu{e}_1 h_2 h_3 \dd{x_2} \dd{x_3} + \vu{e}_2 h_1 h_3 \dd{x_1} \dd{x_3} + \vu{e}_3 h_1 h_2 \dd{x_1} \dd{x_2} } \end{aligned}$$ Finally, the tangent vector element $$\dd{\vu{\ell}}$$ takes the following form: $$\begin{aligned} \boxed{ \dd{\vu{\ell}} = \vu{e}_1 h_1 \dd{x_1} + \vu{e}_2 h_2 \dd{x_2} + \vu{e}_3 h_3 \dd{x_3} } \end{aligned}$$ ## References 1. M.L. Boas, *Mathematical methods in the physical sciences*, 2nd edition, Wiley.