summaryrefslogtreecommitdiff
path: root/source/know/concept/curvilinear-coordinates/index.md
blob: 9cae6432561a5105006e714380b0b3dbed423ca8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
---
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}$$

<div class="accordion">
<input type="checkbox" id="proof-grad"/>
<label for="proof-grad">Proof</label>
<div class="hidden">
<label for="proof-grad">Proof.</label>
For a direction $\dd{\ell}$, we know that
$\idv{f}{\ell}$ is the component of $\nabla f$ in that direction:

$$\begin{aligned}
    \dv{f}{\ell}
    = \pdv{f}{x} \dv{x}{\ell} + \pdv{f}{y} \dv{y}{\ell} + \pdv{f}{z} \dv{z}{\ell}
    = \nabla f \cdot \bigg( \dv{x}{\ell}, \dv{y}{\ell}, \dv{z}{\ell} \bigg)
    = \nabla f \cdot \vu{u}
\end{aligned}$$

Where $\vu{u}$ is simply a unit vector in the direction of $\dd{\ell}$.
We thus find the expression for the gradient $\nabla f$
by choosing $\dd{\ell}$ to be $h_1 \dd{x_1}$, $h_2 \dd{x_2}$ and $h_3 \dd{x_3}$ in turn:

$$\begin{gathered}
    \nabla f
    = \vu{e}_1 \dv{x_1}{\ell} \pdv{f}{x_1}
    + \vu{e}_2 \dv{x_2}{\ell} \pdv{f}{x_2}
    + \vu{e}_3 \dv{x_3}{\ell} \pdv{f}{x_3}
\end{gathered}$$
</div>
</div>


## 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}$$

<div class="accordion">
<input type="checkbox" id="proof-div"/>
<label for="proof-div">Proof</label>
<div class="hidden">
<label for="proof-div">Proof.</label>
As preparation, we rewrite $\vb{V}$ as follows
to introduce the scale factors:

$$\begin{aligned}
    \vb{V}
    &= \vu{e}_1 \frac{1}{h_2 h_3} (h_2 h_3 V_1)
    + \vu{e}_2 \frac{1}{h_1 h_3} (h_1 h_3 V_2)
    + \vu{e}_3 \frac{1}{h_1 h_2} (h_1 h_2 V_3)
\end{aligned}$$

We start by taking only the $\vu{e}_1$-component of this vector,
and expand its divergence using the following vector identity:

$$\begin{gathered}
    \nabla \cdot (\vb{U} \: f)
    = \vb{U} \cdot (\nabla f) + (\nabla \cdot \vb{U}) f
\end{gathered}$$

Inserting the scalar $f = h_2 h_3 V_1$
the vector $\vb{U} = \vu{e}_1 / (h_2 h_3)$,
we arrive at:

$$\begin{gathered}
    \nabla \cdot \Big( \frac{\vu{e}_1}{h_2 h_3} (h_2 h_3 V_1) \Big)
    = \frac{\vu{e}_1}{h_2 h_3} \cdot \Big( \nabla (h_2 h_3 V_1) \Big)
    + \Big( \nabla \cdot \frac{\vu{e}_1}{h_2 h_3} \Big) (h_2 h_3 V_1)
\end{gathered}$$

The first right-hand term is easy to calculate
thanks to our expression for the gradient $\nabla f$.
Only the $\vu{e}_1$-component survives due to the dot product:

$$\begin{aligned}
    \frac{\vu{e}_1}{h_2 h_3} \cdot \Big( \nabla (h_2 h_3 V_1) \Big)
    = \frac{\vu{e}_1}{h_1 h_2 h_3} \pdv{(h_2 h_3 V_1)}{x_1}
\end{aligned}$$

The second term is more involved.
First, we use the gradient formula to observe that:

$$\begin{aligned}
    \nabla x_1
    = \frac{\vu{e}_1}{h_1}
    \qquad \quad
    \nabla x_2
    = \frac{\vu{e}_2}{h_2}
    \qquad \quad
    \nabla x_3
    = \frac{\vu{e}_3}{h_3}
\end{aligned}$$

Because $\vu{e}_2 \cross \vu{e}_3 = \vu{e}_1$ in an orthogonal basis,
these gradients can be used to express the vector whose divergence we want:

$$\begin{aligned}
    \nabla x_2 \cross \nabla x_3
    = \frac{\vu{e}_2}{h_2} \cross \frac{\vu{e}_3}{h_3}
    = \frac{\vu{e}_1}{h_2 h_3}
\end{aligned}$$

We then apply the divergence and expand the expression using a vector identity.
In all cases, the curl of a gradient $\nabla \cross \nabla f$ is zero, so:

$$\begin{aligned}
    \nabla \cdot \frac{\vu{e}_1}{h_2 h_3}
    = \nabla \cdot \big( \nabla x_2 \cross \nabla x_3 \big)
    = \nabla x_3 \cdot (\nabla \cross \nabla x_2) - \nabla x_2 \cdot (\nabla \cross \nabla x_3)
    = 0
\end{aligned}$$

After repeating this procedure for the other components of $\vb{V}$,
we get the desired general expression for the divergence.
</div>
</div>


## 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}$$

<div class="accordion">
<input type="checkbox" id="proof-curl"/>
<label for="proof-curl">Proof</label>
<div class="hidden">
<label for="proof-curl">Proof.</label>
The curl is found in a similar way as the divergence.
We rewrite $\vb{V}$ like so:

$$\begin{aligned}
    \vb{V}
    = \frac{\vu{e}_1}{h_1} (h_1 V_1) + \frac{\vu{e}_2}{h_2} (h_2 V_2) + \frac{\vu{e}_3}{h_3} (h_3 V_3)
\end{aligned}$$

We expand the curl of its $\vu{e}_1$-component using the following vector identity:

$$\begin{gathered}
    \nabla \cross (\vb{U} \: f)
    = (\nabla \cross \vb{U}) f - \vb{U} \cross (\nabla f)
\end{gathered}$$

Inserting the scalar $f = h_1 V_1$
and the vector $\vb{U} = \vu{e}_1 / h_1$, we arrive at:

$$\begin{gathered}
    \nabla \cross \Big( \frac{\vu{e}_1}{h_1} (h_1 V_1) \Big)
    = \Big( \nabla \cross \frac{\vu{e}_1}{h_1} \Big) (h_1 V_1) - \frac{\vu{e}_1}{h_1} \cross \Big( \nabla (h_1 V_1) \Big)
\end{gathered}$$

Previously, when proving the divergence,
we already showed that $\vu{e}_1 / h_1 = \nabla x_1$.
Because the curl of a gradient is zero,
the first term disappears, leaving only the second,
which contains a gradient that turns out to be:

$$\begin{aligned}
    \nabla (h_1 V_1)
    = \vu{e}_1 \frac{1}{h_1} \pdv{(h_1 V_1)}{x_1}
    + \vu{e}_2 \frac{1}{h_2} \pdv{(h_1 V_1)}{x_2}
    + \vu{e}_3 \frac{1}{h_3} \pdv{(h_1 V_1)}{x_3}
\end{aligned}$$

Consequently, the curl of the first component of $\vb{V}$ is as follows,
using the fact that $\vu{e}_1$, $\vu{e}_2$ and $\vu{e}_3$
are related to each other by cross products:

$$\begin{aligned}
    \nabla \cross \Big( \frac{\vu{e}_1}{h_1} (h_1 V_1) \Big)
    = - \frac{\vu{e}_1}{h_1} \cross \Big( \nabla (h_1 V_1) \Big)
    = - \frac{\vu{e}_3}{h_1 h_2} \pdv{(h_1 V_1)}{x_2} + \frac{\vu{e}_2}{h_1 h_3} \pdv{(h_1 V_1)}{x_3}
\end{aligned}$$

If we go through the same process for the other components of $\vb{V}$
and add up the results, we get the desired expression for the curl.
</div>
</div>


## 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.