diff options
| author | Prefetch | 2023-06-09 19:52:54 +0200 | 
|---|---|---|
| committer | Prefetch | 2023-06-09 19:52:54 +0200 | 
| commit | 3138ead6bfd6e88e8cdbf9e4c32df64e18bc4595 (patch) | |
| tree | 8d4e51c7ee7d7e51d0d304b44284b48bcd93c14a | |
| parent | 0b6bada15afc0a3477316427e3fa145e78699d0c (diff) | |
Improve knowledge base
| -rw-r--r-- | source/know/concept/capillary-action/index.md | 2 | ||||
| -rw-r--r-- | source/know/concept/cylindrical-polar-coordinates/index.md | 273 | ||||
| -rw-r--r-- | source/know/concept/hilbert-space/index.md | 55 | ||||
| -rw-r--r-- | source/know/concept/material-derivative/index.md | 20 | ||||
| -rw-r--r-- | source/know/concept/orthogonal-curvilinear-coordinates/index.md | 250 | ||||
| -rw-r--r-- | source/know/concept/spherical-coordinates/index.md | 294 | 
6 files changed, 549 insertions, 345 deletions
diff --git a/source/know/concept/capillary-action/index.md b/source/know/concept/capillary-action/index.md index 4b9e76c..fea6ef8 100644 --- a/source/know/concept/capillary-action/index.md +++ b/source/know/concept/capillary-action/index.md @@ -58,7 +58,7 @@ $$\begin{aligned}      }  \end{aligned}$$ -The right-most side gives an alternative way of understanding $$\mathrm{Bo}$$: +The rightmost side gives an alternative way of understanding $$\mathrm{Bo}$$:  $$m$$ is the mass of a cube with side $$L$$, such that the numerator is the weight force,  and the denominator is the tension force of the surface.  In any case, capillary action can be observed when $$\mathrm{Bo \ll 1}$$. diff --git a/source/know/concept/cylindrical-polar-coordinates/index.md b/source/know/concept/cylindrical-polar-coordinates/index.md index 43b4684..3c54ef8 100644 --- a/source/know/concept/cylindrical-polar-coordinates/index.md +++ b/source/know/concept/cylindrical-polar-coordinates/index.md @@ -8,11 +8,11 @@ categories:  layout: "concept"  --- -**Cylindrical polar coordinates** are an extension of polar coordinates to 3D, -which describes the location of a point in space -using the coordinates $$(r, \varphi, z)$$. -The $$z$$-axis is unchanged from Cartesian coordinates, -hence it is called a *cylindrical* system. +**Cylindrical polar coordinates** extend polar coordinates $$(r, \varphi)$$ to 3D, +by describing the location of a point in space +using the variables $$(r, \varphi, z)$$. +The $$z$$-axis is unchanged from the Cartesian system, +hence it is called *cylindrical*.  Cartesian coordinates $$(x, y, z)$$  and the cylindrical system $$(r, \varphi, z)$$ are related by: @@ -20,78 +20,85 @@ and the cylindrical system $$(r, \varphi, z)$$ are related by:  $$\begin{aligned}      \boxed{          \begin{aligned} -            x &= r \cos\varphi \\ -            y &= r \sin\varphi \\ -            z &= z +            x +            &= r \cos{\varphi} +            \\ +            y +            &= r \sin{\varphi} +            \\ +            z +            &= z          \end{aligned}      }  \end{aligned}$$  Conversely, a point given in $$(x, y, z)$$ -can be converted to $$(r, \varphi, z)$$ -using these formulae: +can be converted to $$(r, \varphi, z)$$ using these formulae, +where $$\mathtt{atan2}$$ is the 2-argument arctangent, +which is needed to handle the signs correctly:  $$\begin{aligned}      \boxed{ -        r = \sqrt{x^2 + y^2} -        \qquad -        \varphi = \mathtt{atan2}(y, x) -        \qquad -        z = z +        \begin{aligned} +            r +            &= \sqrt{x^2 + y^2} +            \\ +            \varphi +            &= \mathtt{atan2}(y, x) +            \\ +            z +            &= z +        \end{aligned}      }  \end{aligned}$$ -The cylindrical polar coordinates form +Cylindrical polar coordinates form  an [orthogonal curvilinear system](/know/concept/orthogonal-curvilinear-coordinates/), -whose scale factors $$h_r$$, $$h_\varphi$$ and $$h_z$$ we want to find. -To do so, we calculate the differentials of the Cartesian coordinates: +whose **scale factors** $$h_r$$, $$h_\varphi$$ and $$h_z$$ we need. +To get those, we calculate the unnormalized local basis:  $$\begin{aligned} -    \dd{x} = \dd{r} \cos\varphi - \dd{\varphi} r \sin\varphi -    \qquad -    \dd{y} = \dd{r} \sin\varphi + \dd{\varphi} r \cos\varphi -    \qquad -    \dd{z} = \dd{z} -\end{aligned}$$ - -And then we calculate the line element $$\dd{\ell}^2$$, -skipping many terms thanks to orthogonality, - -$$\begin{aligned} -    \dd{\ell}^2 -    &= \dd{r}^2 \big( \cos^2(\varphi) + \sin^2(\varphi) \big) -    + \dd{\varphi}^2 \big( r^2 \sin^2(\varphi) + r^2 \cos^2(\varphi) \big) -    + \dd{z}^2 +    h_r \vu{e}_r +    &= \vu{e}_x \pdv{x}{r} + \vu{e}_y \pdv{y}{r} + \vu{e}_z \pdv{z}{r} +    \\ +    &= \vu{e}_x \cos{\varphi} + \vu{e}_y \sin{\varphi} +    \\ +    h_\varphi \vu{e}_\varphi +    &= \vu{e}_x \pdv{x}{\varphi} + \vu{e}_y \pdv{y}{\varphi} + \vu{e}_z \pdv{z}{\varphi}      \\ -    &= \dd{r}^2 + r^2 \: \dd{\varphi}^2 + \dd{z}^2 +    &= - \vu{e}_x \: r \sin{\varphi} + \vu{e}_y \: r \cos{\varphi} +    \\ +    h_z \vu{e}_z +    &= \vu{e}_x \pdv{x}{z} + \vu{e}_y \pdv{y}{z} + \vu{e}_z \pdv{z}{z} +    \\ +    &= \vu{e}_z  \end{aligned}$$ -Finally, we can simply read off -the squares of the desired scale factors -$$h_r^2$$, $$h_\varphi^2$$ and $$h_z^2$$: +By normalizing the **local basis vectors** +$$\vu{e}_r$$, $$\vu{e}_\varphi$$ and $$\vu{e}_z$$, +we arrive at these expressions:  $$\begin{aligned}      \boxed{ -        h_r = 1 -        \qquad -        h_\varphi = r -        \qquad -        h_z = 1 +        \begin{aligned} +            h_r +            &= 1 +            \\ +            h_\varphi +            &= r +            \\ +            h_z +            &= 1 +        \end{aligned}      } -\end{aligned}$$ - -With these factors, we can easily convert things from the Cartesian system -using the standard formulae for orthogonal curvilinear coordinates. -The basis vectors are: - -$$\begin{aligned} +    \qquad\qquad      \boxed{          \begin{aligned}              \vu{e}_r -            &= \cos\varphi \:\vu{e}_x + \sin\varphi \:\vu{e}_y +            &= \vu{e}_x \cos{\varphi} + \vu{e}_y \sin{\varphi}              \\              \vu{e}_\varphi -            &= - \sin\varphi \:\vu{e}_x + \cos\varphi \:\vu{e}_y +            &= - \vu{e}_x \sin{\varphi} + \vu{e}_y \cos{\varphi}              \\              \vu{e}_z              &= \vu{e}_z @@ -99,7 +106,52 @@ $$\begin{aligned}      }  \end{aligned}$$ -The basic vector operations (gradient, divergence, Laplacian and curl) are given by: +Thanks to these scale factors, we can easily convert calculus from the Cartesian system +using the standard formulae for orthogonal curvilinear coordinates. + + + +## Differential elements + +For line integrals, +the tangent vector element $$\dd{\vb{\ell}}$$ for a curve is as follows: + +$$\begin{aligned} +    \boxed{ +        \dd{\vb{\ell}} +        = \vu{e}_r \dd{r} +        + \: \vu{e}_\varphi \: r \dd{\varphi} +        + \: \vu{e}_z \dd{z} +    } +\end{aligned}$$ + +For surface integrals, +the normal vector element $$\dd{\vb{S}}$$ for a surface is given by: + +$$\begin{aligned} +    \boxed{ +        \dd{\vb{S}} +        = \vu{e}_r \: r \dd{\varphi} \dd{z} +        + \: \vu{e}_\varphi \dd{r} \dd{z} +        + \: \vu{e}_z \: r \dd{r} \dd{\varphi} +    } +\end{aligned}$$ + +And for volume integrals, +the infinitesimal volume $$\dd{V}$$ takes the following form: + +$$\begin{aligned} +    \boxed{ +        \dd{V} +        = r \dd{r} \dd{\varphi} \dd{z} +    } +\end{aligned}$$ + + + +## Common operations + +The basic vector operations (gradient, divergence, curl and Laplacian) are given by:  $$\begin{aligned}      \boxed{ @@ -113,7 +165,7 @@ $$\begin{aligned}  $$\begin{aligned}      \boxed{          \nabla \cdot \vb{V} -        = \frac{1}{r} \pdv{(r V_r)}{r} +        = \pdv{V_r}{r} + \frac{V_r}{r}          + \frac{1}{r} \pdv{V_\varphi}{\varphi}          + \pdv{V_z}{z}      } @@ -121,81 +173,124 @@ $$\begin{aligned}  $$\begin{aligned}      \boxed{ +        \begin{aligned} +            \nabla \times \vb{V} +            &= \quad \vu{e}_r \bigg( \frac{1}{r} \pdv{V_z}{\varphi} - \pdv{V_\varphi}{z} \bigg) +            \\ +            &\quad\: + \vu{e}_\varphi \bigg( \pdv{V_r}{z} - \pdv{V_z}{r} \bigg) +            \\ +            &\quad\: + \vu{e}_z \bigg( \pdv{V_\varphi}{r} + \frac{V_\varphi}{r} - \frac{1}{r} \pdv{V_r}{\varphi} \bigg) +        \end{aligned} +    } +\end{aligned}$$ + +$$\begin{aligned} +    \boxed{          \nabla^2 f -        = \frac{1}{r} \pdv{}{r}\Big( r \pdv{f}{r} \Big) +        = \pdvn{2}{f}{r} + \frac{1}{r} \pdv{f}{r}          + \frac{1}{r^2} \pdvn{2}{f}{\varphi}          + \pdvn{2}{f}{z}      }  \end{aligned}$$ + + +## Uncommon operations + +Uncommon operations include: +the gradient of a divergence $$\nabla (\nabla \cdot \vb{V})$$, +the gradient of a vector $$\nabla \vb{V}$$, +the advection of a vector $$(\vb{U} \cdot \nabla) \vb{V}$$ with respect to $$\vb{U}$$, +the Laplacian of a vector $$\nabla^2 \vb{V}$$, +and the divergence of a 2nd-order tensor $$\nabla \cdot \overline{\overline{\vb{T}}}$$: +  $$\begin{aligned}      \boxed{          \begin{aligned} -            \nabla \times \vb{V} -            &= \vu{e}_r \Big( \frac{1}{r} \pdv{V_z}{\varphi} - \pdv{V_\varphi}{z} \Big) +            \nabla (\nabla \cdot \vb{V}) +            &= \quad \vu{e}_r \bigg( \pdvn{2}{V_r}{r} + \frac{1}{r} \mpdv{V_\varphi}{r}{\varphi} + \mpdv{V_z}{r}{z} +            + \frac{1}{r} \pdv{V_r}{r} - \frac{1}{r^2} \pdv{V_\varphi}{\varphi} - \frac{V_r}{r^2} \bigg)              \\ -            &+ \vu{e}_\varphi \Big( \pdv{V_r}{z} - \pdv{V_z}{r} \Big) +            &\quad\: + \vu{e}_\varphi \bigg( \frac{1}{r} \mpdv{V_r}{\varphi}{r} + \frac{1}{r^2} \pdvn{2}{V_\varphi}{\varphi} +            + \frac{1}{r} \mpdv{V_z}{\varphi}{z} + \frac{1}{r^2} \pdv{V_r}{\varphi} \bigg)              \\ -            &+ \frac{\vu{e}_z}{r} \Big( \pdv{(r V_\varphi)}{r} - \pdv{V_r}{\varphi} \Big) +            &\quad\: + \vu{e}_z \bigg( \mpdv{V_r}{z}{r} + \frac{1}{r} \mpdv{V_\varphi}{z}{\varphi} + \pdvn{2}{V_z}{z} + \frac{1}{r} \pdv{V_r}{z} \bigg)          \end{aligned}      }  \end{aligned}$$ -The differential element of volume $$\dd{V}$$ -takes the following form: -  $$\begin{aligned}      \boxed{ -        \dd{V} -        = r \dd{r} \dd{\varphi} \dd{z} +        \begin{aligned} +            \nabla \vb{V} +            &= \quad \vu{e}_r \vu{e}_r \pdv{V_r}{r} +            + \vu{e}_r \vu{e}_\varphi \pdv{V_\varphi}{r} +            + \vu{e}_r \vu{e}_z \pdv{V_z}{r} +            \\ +            &\quad\: + \vu{e}_\varphi \vu{e}_r \bigg( \frac{1}{r} \pdv{V_r}{\varphi} - \frac{V_\varphi}{r} \bigg) +            + \vu{e}_\varphi \vu{e}_\varphi \bigg( \frac{1}{r} \pdv{V_\varphi}{\varphi} + \frac{V_r}{r} \bigg) +            + \vu{e}_\varphi \vu{e}_z \frac{1}{r} \pdv{V_z}{\varphi} +            \\ +            &\quad\: + \vu{e}_z \vu{e}_r \pdv{V_r}{z} +            + \vu{e}_z \vu{e}_\varphi \pdv{V_\varphi}{z} +            + \vu{e}_z \vu{e}_z \pdv{V_z}{z} +        \end{aligned}      }  \end{aligned}$$ -So, for example, an integral over all of space is converted like so: - -$$\begin{aligned} -    \iiint_{-\infty}^\infty f(x, y, z) \dd{V} -    = \int_{-\infty}^{\infty} \int_0^{2\pi} \int_0^\infty f(r, \varphi, z) \: r \dd{r} \dd{\varphi} \dd{z} -\end{aligned}$$ - -The isosurface elements are as follows, where $$S_r$$ is a surface at constant $$r$$, etc.: -  $$\begin{aligned}      \boxed{          \begin{aligned} -            \dd{S}_r = r \dd{\varphi} \dd{z} -            \qquad -            \dd{S}_\varphi = \dd{r} \dd{z} -            \qquad -            \dd{S}_z = r \dd{r} \dd{\varphi} +            (\vb{U} \cdot \nabla) \vb{V} +            &= \quad \vu{e}_r \bigg( U_r \pdv{V_r}{r} + \frac{U_\varphi}{r} \pdv{V_r}{\varphi} + U_z \pdv{V_r}{z} +            - \frac{U_\varphi V_\varphi}{r} \bigg) +            \\ +            &\quad\: + \vu{e}_\varphi \bigg( U_r \pdv{V_\varphi}{r} + \frac{U_\varphi}{r} \pdv{V_\varphi}{\varphi} + U_z \pdv{V_\varphi}{z} +            + \frac{U_\varphi V_r}{r} \bigg) +            \\ +            &\quad\: + \vu{e}_z \bigg( U_r \pdv{V_z}{r} + \frac{U_\varphi}{r} \pdv{V_z}{\varphi} + U_z \pdv{V_z}{z} \bigg)          \end{aligned}      }  \end{aligned}$$ -Similarly, the normal vector element $$\dd{\vu{S}}$$ for an arbitrary surface is given by: -  $$\begin{aligned}      \boxed{ -        \dd{\vu{S}} -        = \vu{e}_r \: r \dd{\varphi} \dd{z} -        + \vu{e}_\varphi \dd{r} \dd{z} -        + \vu{e}_z \: r \dd{r} \dd{\varphi} +        \begin{aligned} +            \nabla^2 \vb{V} +            &= \quad \vu{e}_r \bigg( \pdvn{2}{V_r}{r} + \frac{1}{r} \pdv{V_r}{r} + \frac{1}{r^2} \pdvn{2}{V_r}{\varphi} +            + \pdvn{2}{V_r}{z} - \frac{2}{r^2} \pdv{V_\varphi}{\varphi} - \frac{V_r}{r^2} \bigg) +            \\ +            &\quad\: + \vu{e}_\varphi \bigg( \pdvn{2}{V_\varphi}{r} + \frac{1}{r} \pdv{V_\varphi}{r} + \frac{1}{r^2} \pdvn{2}{V_\varphi}{\varphi} +            + \pdvn{2}{V_\varphi}{z} + \frac{2}{r^2} \pdv{V_r}{\varphi} - \frac{V_\varphi}{r^2} \bigg) +            \\ +            &\quad\: + \vu{e}_z \bigg( \pdvn{2}{V_z}{r} + \frac{1}{r} \pdv{V_z}{r} +            + \frac{1}{r^2} \pdvn{2}{V_z}{\varphi} + \pdvn{2}{V_z}{z} \bigg) +        \end{aligned}      }  \end{aligned}$$ -And finally, the tangent vector element $$\dd{\vu{\ell}}$$ of a given curve is as follows: -  $$\begin{aligned}      \boxed{ -        \dd{\vu{\ell}} -        = \vu{e}_r \dd{r} -        + \vu{e}_\varphi \: r \dd{\varphi} -        + \vu{e}_z \dd{z} +        \begin{aligned} +            \nabla \cdot \overline{\overline{\mathbf{T}}} +            &= \quad \vu{e}_r \bigg( \pdv{T_{rr}}{r} + \frac{1}{r} \pdv{T_{\varphi r}}{\varphi} + \pdv{T_{zr}}{z} +            + \frac{T_{rr}}{r} - \frac{T_{\varphi \varphi}}{r} \bigg) +            \\ +            &\quad\: + \vu{e}_\varphi \bigg( \pdv{T_{r \varphi}}{r} + \frac{1}{r} \pdv{T_{\varphi \varphi}}{\varphi} + \pdv{T_{z \varphi}}{z} +            + \frac{T_{r \varphi}}{r} + \frac{T_{\varphi r}}{r} \bigg) +            \\ +            &\quad\: + \vu{e}_z \bigg( \pdv{T_{rz}}{r} + \frac{1}{r} \pdv{T_{\varphi z}}{\varphi} + \pdv{T_{zz}}{z} +            + \frac{T_{rz}}{r} \bigg) +        \end{aligned}      }  \end{aligned}$$ +  ## References  1.  M.L. Boas,      *Mathematical methods in the physical sciences*, 2nd edition,      Wiley. +2.  B. Lautrup, +    *Physics of continuous matter: exotic and everyday phenomena in the macroscopic world*, 2nd edition, +    CRC Press. diff --git a/source/know/concept/hilbert-space/index.md b/source/know/concept/hilbert-space/index.md index 57926ce..42b9cb1 100644 --- a/source/know/concept/hilbert-space/index.md +++ b/source/know/concept/hilbert-space/index.md @@ -8,19 +8,20 @@ categories:  layout: "concept"  --- -A **Hilbert space**, also called an **inner product space**, is an -abstract **vector space** with a notion of length and angle. +A **Hilbert space**, also called an **inner product space**, +is an abstract **vector space** with a notion of length and angle. +  ## Vector space -An abstract **vector space** $$\mathbb{V}$$ is a generalization of the -traditional concept of vectors as "arrows". It consists of a set of -objects called **vectors** which support the following (familiar) -operations: +An abstract **vector space** $$\mathbb{V}$$ is a generalization +of the traditional concept of vectors as "arrows". +It consists of a set of objects called **vectors** +which support the following (familiar) operations: -+ **Vector addition**: the sum of two vectors $$V$$ and $$W$$, denoted $$V + W$$. -+ **Scalar multiplication**: product of a vector $$V$$ with a scalar $$a$$, denoted $$a V$$. ++ **Vector addition**: the sum of two vectors $$V$$ and $$W$$, denoted by $$V + W$$. ++ **Scalar multiplication**: product of a vector $$V$$ with a scalar $$a$$, denoted by $$a V$$.  In addition, for a given $$\mathbb{V}$$ to qualify as a proper vector  space, these operations must obey the following axioms: @@ -34,24 +35,26 @@ space, these operations must obey the following axioms:  + **Multiplication is distributive over scalars**: $$(a + b)V = aV + bV$$  + **Multiplication is distributive over vectors**: $$a (U + V) = a U + a V$$ -A set of $$N$$ vectors $$V_1, V_2, ..., V_N$$ is **linearly independent** if -the only way to satisfy the following relation is to set all the scalar coefficients $$a_n = 0$$: +A set of $$N$$ vectors $$V_1, V_2, ..., V_N$$ is **linearly independent** +if the only way to satisfy the following relation +is to set all the scalar coefficients $$a_n = 0$$:  $$\begin{aligned}      \mathbf{0} = \sum_{n = 1}^N a_n V_n  \end{aligned}$$ -In other words, these vectors cannot be expressed in terms of each -other. Otherwise, they would be **linearly dependent**. +In other words, these vectors cannot be expressed in terms of each other. +Otherwise, they would be **linearly dependent**. -A vector space $$\mathbb{V}$$ has **dimension** $$N$$ if only up to $$N$$ of -its vectors can be linearly indepedent. All other vectors in -$$\mathbb{V}$$ can then be written as a **linear combination** of these $$N$$ **basis vectors**. +A vector space $$\mathbb{V}$$ has **dimension** $$N$$ +if only up to $$N$$ of its vectors can be linearly indepedent. +All other vectors in $$\mathbb{V}$$ can then be written +as a **linear combination** of these $$N$$ **basis vectors**. -Let $$\vu{e}_1, ..., \vu{e}_N$$ be the basis vectors, then any -vector $$V$$ in the same space can be **expanded** in the basis according to -the unique weights $$v_n$$, known as the **components** of $$V$$ -in that basis: +Let $$\vu{e}_1, ..., \vu{e}_N$$ be the basis vectors, +then any vector $$V$$ in the same space can be **expanded** +in the basis according to the unique weights $$v_n$$, +known as the **components** of $$V$$ in that basis:  $$\begin{aligned}      V = \sum_{n = 1}^N v_n \vu{e}_n @@ -71,19 +74,20 @@ $$\begin{gathered}  \end{gathered}$$ +  ## Inner product -A given vector space $$\mathbb{V}$$ can be promoted to a **Hilbert space** -or **inner product space** if it supports an operation $$\Inprod{U}{V}$$ -called the **inner product**, which takes two vectors and returns a -scalar, and has the following properties: +A given vector space $$\mathbb{V}$$ can be promoted to a **Hilbert space** or **inner product space** +if it supports an operation $$\Inprod{U}{V}$$ called the **inner product**, +which takes two vectors and returns a scalar, +and has the following properties:  + **Skew symmetry**: $$\Inprod{U}{V} = (\Inprod{V}{U})^*$$, where $${}^*$$ is the complex conjugate.  + **Positive semidefiniteness**: $$\Inprod{V}{V} \ge 0$$, and $$\Inprod{V}{V} = 0$$ if $$V = \mathbf{0}$$.  + **Linearity in second operand**: $$\Inprod{U}{(a V + b W)} = a \Inprod{U}{V} + b \Inprod{U}{W}$$. -The inner product describes the lengths and angles of vectors, and in -Euclidean space it is implemented by the dot product. +The inner product describes the lengths and angles of vectors, +and in Euclidean space it is implemented by the dot product.  The **magnitude** or **norm** $$|V|$$ of a vector $$V$$ is given by  $$|V| = \sqrt{\Inprod{V}{V}}$$ and represents the real positive length of $$V$$. @@ -123,6 +127,7 @@ $$\begin{aligned}  \end{aligned}$$ +  ## Infinite dimensions  As the dimensionality $$N$$ tends to infinity, things may or may not diff --git a/source/know/concept/material-derivative/index.md b/source/know/concept/material-derivative/index.md index 7225053..d11287d 100644 --- a/source/know/concept/material-derivative/index.md +++ b/source/know/concept/material-derivative/index.md @@ -88,26 +88,6 @@ $$\begin{aligned}      }  \end{aligned}$$ -Where the advective term is to be evaluated in the following way in Cartesian coordinates: - -$$\begin{aligned} -    (\va{v} \cdot \nabla) \va{U} -    = -    \begin{bmatrix} v_x \\ v_y \\ v_z \end{bmatrix} -    \cdot -    \begin{bmatrix} -        \displaystyle\pdv{U_x}{x} & \displaystyle\pdv{U_x}{y} & \displaystyle\pdv{U_x}{z} \\ -        \displaystyle\pdv{U_y}{x} & \displaystyle\pdv{U_y}{y} & \displaystyle\pdv{U_y}{z} \\ -        \displaystyle\pdv{U_z}{x} & \displaystyle\pdv{U_z}{y} & \displaystyle\pdv{U_z}{z} -    \end{bmatrix} -    = -    \begin{bmatrix} -        v_x \displaystyle\pdv{U_x}{x} & v_y \displaystyle\pdv{U_x}{y} & v_z \displaystyle\pdv{U_x}{z} \\ -        v_x \displaystyle\pdv{U_y}{x} & v_y \displaystyle\pdv{U_y}{y} & v_z \displaystyle\pdv{U_y}{z} \\ -        v_x \displaystyle\pdv{U_z}{x} & v_y \displaystyle\pdv{U_z}{y} & v_z \displaystyle\pdv{U_z}{z} -    \end{bmatrix} -\end{aligned}$$ -  ## References diff --git a/source/know/concept/orthogonal-curvilinear-coordinates/index.md b/source/know/concept/orthogonal-curvilinear-coordinates/index.md index 675b83a..c7299ee 100644 --- a/source/know/concept/orthogonal-curvilinear-coordinates/index.md +++ b/source/know/concept/orthogonal-curvilinear-coordinates/index.md @@ -910,131 +910,6 @@ Dot-multiplying by $$\vu{e}_j$$ isolates the $$c_j$$-component and gives the des -## Divergence of a tensor - -It also possible to take the divergence of a 2nd-order tensor $$\overline{\overline{\mathbf{T}}}$$, -yielding a vector with these components in $$(c_1, c_2, c_3)$$: - -$$\begin{aligned} -    \boxed{ -        (\nabla \cdot \overline{\overline{\mathbf{T}}})_j -        = \sum_{k} \frac{1}{h_k} \pdv{T_{kj}}{c_k} -        + \sum_{k \neq j} \frac{T_{jk}}{h_j h_k} \pdv{h_j}{c_k} -        - \sum_{k \neq j} \frac{T_{kk}}{h_j h_k} \pdv{h_k}{c_j} -        + \sum_{k} \sum_{l \neq k} \frac{T_{lj}}{h_k h_l} \pdv{h_k}{c_l} -    } -\end{aligned}$$ - -{% include proof/start.html id="proof-div-tensor" -%} -From our earlier calculation of $$\nabla f$$, -we know how to express the del $$\nabla$$ in $$(c_1, c_2, c_3)$$. -Now we simply take the dot product and evaluate: - -$$\begin{aligned} -    \nabla \cdot \overline{\overline{\mathbf{T}}} -    &= \bigg( \vu{e}_1 \frac{1}{h_1} \pdv{}{c_1} + \vu{e}_2 \frac{1}{h_2} \pdv{}{c_2} + \vu{e}_3 \frac{1}{h_3} \pdv{}{c_3} \bigg) -    \\ -    &\quad\:\:\: \cdot \Big( T_{11} \vu{e}_1 \vu{e}_1 + T_{12} \vu{e}_1 \vu{e}_2 + T_{13} \vu{e}_1 \vu{e}_3 -    \\ -    &\qquad + T_{21} \vu{e}_2 \vu{e}_1 + T_{22} \vu{e}_2 \vu{e}_2 + T_{23} \vu{e}_2 \vu{e}_3 -    \\ -    &\qquad + T_{31} \vu{e}_3 \vu{e}_1 + T_{32} \vu{e}_3 \vu{e}_2 + T_{33} \vu{e}_3 \vu{e}_3 \Big) -    \\ -    &= \bigg( \sum_{j} \vu{e}_j \frac{1}{h_j} \pdv{}{c_j} \bigg) \cdot \bigg( \sum_{kl} T_{kl} \vu{e}_k \vu{e}_l \bigg) -    \\ -    &= \sum_{jkl} \vu{e}_j \cdot \frac{1}{h_j} \pdv{}{c_j} (T_{kl} \vu{e}_k \vu{e}_l) -\end{aligned}$$ - -We apply the product rule of differentiation -and use that $$\vb{c} \cdot (\vb{a} \vb{b}) = (\vb{c} \cdot \vb{a}) \vb{b}$$: - -$$\begin{aligned} -    \nabla \cdot \overline{\overline{\mathbf{T}}} -    &= \sum_{jkl} \bigg( (\vu{e}_j \cdot \vu{e}_k) \frac{1}{h_j} \pdv{T_{kl}}{c_j} \vu{e}_l -    + (\vu{e}_j \cdot \vu{e}_k) \frac{T_{kl}}{h_j} \pdv{\vu{e}_l}{c_j} -    + \Big( \vu{e}_j \cdot \pdv{\vu{e}_k}{c_j} \Big) \frac{T_{kl}}{h_j} \vu{e}_l \bigg) -    \\ -    &= \sum_{jkl} \bigg( \delta_{jk} \frac{1}{h_j} \pdv{T_{kl}}{c_j} \vu{e}_l + \delta_{jk} \frac{T_{kl}}{h_j} \pdv{\vu{e}_l}{c_j} -    + \Big( \vu{e}_j \cdot \pdv{\vu{e}_k}{c_j} \Big) \frac{T_{kl}}{h_j} \vu{e}_l \bigg) -    \\ -    &= \sum_{jl} \bigg( \frac{1}{h_j} \pdv{T_{jl}}{c_j} \vu{e}_l + \frac{T_{jl}}{h_j} \pdv{\vu{e}_l}{c_j} -    + \sum_{k} \Big( \vu{e}_j \cdot \pdv{\vu{e}_k}{c_j} \Big) \frac{T_{kl}}{h_j} \vu{e}_l \bigg) -\end{aligned}$$ - -Inserting our expressions for the derivatives of the basis vectors -in the last term, we find: - -$$\begin{aligned} -    \nabla \cdot \overline{\overline{\mathbf{T}}} -    &= \sum_{jl} \bigg( \frac{1}{h_j} \pdv{T_{jl}}{c_j} \vu{e}_l + \frac{T_{jl}}{h_j} \pdv{\vu{e}_l}{c_j} -    + \sum_{k} \vu{e}_j \cdot -    \Big( \frac{1}{h_k} \pdv{h_j}{c_k} \vu{e}_j - \delta_{jk} \sum_{m} \frac{1}{h_m} \pdv{h_k}{c_m} \vu{e}_m \Big) \frac{T_{kl}}{h_j} \vu{e}_l \bigg) -    \\ -    &= \sum_{jl} \bigg( \frac{1}{h_j} \pdv{T_{jl}}{c_j} \vu{e}_l + \frac{T_{jl}}{h_j} \pdv{\vu{e}_l}{c_j} -    + \sum_{k} \frac{T_{kl}}{h_j h_k} \pdv{h_j}{c_k} \vu{e}_l -    - \sum_{m} (\vu{e}_j \cdot \vu{e}_m) \frac{T_{jl}}{h_j h_m} \pdv{h_j}{c_m} \vu{e}_l \bigg) -    \\ -    &= \sum_{jl} \bigg( \frac{1}{h_j} \pdv{T_{jl}}{c_j} \vu{e}_l + \frac{T_{jl}}{h_j} \pdv{\vu{e}_l}{c_j} -    + \sum_{k} \frac{T_{kl}}{h_j h_k} \pdv{h_j}{c_k} \vu{e}_l - \frac{T_{jl}}{h_j h_j} \pdv{h_j}{c_j} \vu{e}_l \bigg) -    \\ -    &= \sum_{jl} \bigg( \frac{1}{h_j} \pdv{T_{jl}}{c_j} \vu{e}_l + \frac{T_{jl}}{h_j} \pdv{\vu{e}_l}{c_j} -    + \sum_{k \neq j} \frac{T_{kl}}{h_j h_k} \pdv{h_j}{c_k} \vu{e}_l \bigg) -\end{aligned}$$ - -Where we noticed that the latter two terms cancel out if $$k = j$$. -Next, rewriting $$\ipdv{\vu{e}_l}{c_j}$$: - -$$\begin{aligned} -    \nabla \cdot \overline{\overline{\mathbf{T}}} -    &= \sum_{jl} \bigg( \frac{1}{h_j} \pdv{T_{jl}}{c_j} \vu{e}_l -    + \frac{T_{jl}}{h_j} \Big( \frac{1}{h_l} \pdv{h_j}{c_l} \vu{e}_j - \delta_{jl} \sum_{m} \frac{1}{h_m} \pdv{h_l}{c_m} \vu{e}_m \Big) -    + \sum_{k \neq j} \frac{T_{kl}}{h_j h_k} \pdv{h_j}{c_k} \vu{e}_l \bigg) -    \\ -    &= \sum_{jl} \bigg( \frac{1}{h_j} \pdv{T_{jl}}{c_j} \vu{e}_l -    + \frac{T_{jl}}{h_j h_l} \pdv{h_j}{c_l} \vu{e}_j - \delta_{jl} \sum_{m} \frac{T_{jl}}{h_j h_m} \pdv{h_l}{c_m} \vu{e}_m -    + \sum_{k \neq j} \frac{T_{kl}}{h_j h_k} \pdv{h_j}{c_k} \vu{e}_l \bigg) -    \\ -    &= \sum_{jl} \frac{1}{h_j} \pdv{T_{jl}}{c_j} \vu{e}_l -    + \sum_{jl} \frac{T_{jl}}{h_j h_l} \pdv{h_j}{c_l} \vu{e}_j -    - \sum_{jm} \frac{T_{jj}}{h_j h_m} \pdv{h_j}{c_m} \vu{e}_m -    + \sum_{jl} \sum_{k \neq j} \frac{T_{kl}}{h_j h_k} \pdv{h_j}{c_k} \vu{e}_l -\end{aligned}$$ - -Renaming the indices such that each term contains $$\vu{e}_l$$, -we arrive at the full result: - -$$\begin{aligned} -    \nabla \cdot \overline{\overline{\mathbf{T}}} -    &= \sum_{jl} \bigg( \frac{1}{h_j} \pdv{T_{jl}}{c_j} -    + \frac{T_{lj}}{h_j h_l} \pdv{h_l}{c_j} -    - \frac{T_{jj}}{h_j h_l} \pdv{h_j}{c_l} -    + \sum_{k \neq j} \frac{T_{kl}}{h_j h_k} \pdv{h_j}{c_k} \bigg) \vu{e}_l -\end{aligned}$$ - -To isolate the $$c_m$$-component, we dot-multiply by $$\vu{e}_m$$ -and resolve the Kronecker delta $$\delta_{lm}$$: - -$$\begin{aligned} -    (\nabla \cdot \overline{\overline{\mathbf{T}}})_m -    &= (\nabla \cdot \overline{\overline{\mathbf{T}}}) \cdot \vu{e}_m -    \\ -    &= \sum_{jl} \delta_{lm} \bigg( \frac{1}{h_j} \pdv{T_{jl}}{c_j} -    + \frac{T_{lj}}{h_j h_l} \pdv{h_l}{c_j} -    - \frac{T_{jj}}{h_j h_l} \pdv{h_j}{c_l} -    + \sum_{k \neq j} \frac{T_{kl}}{h_j h_k} \pdv{h_j}{c_k} \bigg) -    \\ -    &= \sum_{j} \frac{1}{h_j} \pdv{T_{jm}}{c_j} -    + \sum_{j} \frac{T_{mj}}{h_j h_m} \pdv{h_m}{c_j} -    - \sum_{j} \frac{T_{jj}}{h_j h_m} \pdv{h_j}{c_m} -    + \sum_{j} \sum_{k \neq j} \frac{T_{km}}{h_j h_k} \pdv{h_j}{c_k} -\end{aligned}$$ - -The second and third terms cancel out for $$j = m$$, -so we can sum over $$j \neq m$$ instead. -{% include proof/end.html id="proof-div-tensor" %} - - -  ## Laplacian of a vector  The Laplacian $$\nabla^2 \vb{V}$$ of a vector $$\vb{V}$$ @@ -1168,6 +1043,131 @@ Which gives the desired formula after some simple index renaming and rearranging +## Divergence of a tensor + +It also possible to take the divergence of a 2nd-order tensor $$\overline{\overline{\mathbf{T}}}$$, +yielding a vector with these components in $$(c_1, c_2, c_3)$$: + +$$\begin{aligned} +    \boxed{ +        (\nabla \cdot \overline{\overline{\mathbf{T}}})_j +        = \sum_{k} \frac{1}{h_k} \pdv{T_{kj}}{c_k} +        + \sum_{k \neq j} \frac{T_{jk}}{h_j h_k} \pdv{h_j}{c_k} +        - \sum_{k \neq j} \frac{T_{kk}}{h_j h_k} \pdv{h_k}{c_j} +        + \sum_{k} \sum_{l \neq k} \frac{T_{lj}}{h_k h_l} \pdv{h_k}{c_l} +    } +\end{aligned}$$ + +{% include proof/start.html id="proof-div-tensor" -%} +From our earlier calculation of $$\nabla f$$, +we know how to express the del $$\nabla$$ in $$(c_1, c_2, c_3)$$. +Now we simply take the dot product and evaluate: + +$$\begin{aligned} +    \nabla \cdot \overline{\overline{\mathbf{T}}} +    &= \bigg( \vu{e}_1 \frac{1}{h_1} \pdv{}{c_1} + \vu{e}_2 \frac{1}{h_2} \pdv{}{c_2} + \vu{e}_3 \frac{1}{h_3} \pdv{}{c_3} \bigg) +    \\ +    &\quad\:\:\: \cdot \Big( T_{11} \vu{e}_1 \vu{e}_1 + T_{12} \vu{e}_1 \vu{e}_2 + T_{13} \vu{e}_1 \vu{e}_3 +    \\ +    &\qquad + T_{21} \vu{e}_2 \vu{e}_1 + T_{22} \vu{e}_2 \vu{e}_2 + T_{23} \vu{e}_2 \vu{e}_3 +    \\ +    &\qquad + T_{31} \vu{e}_3 \vu{e}_1 + T_{32} \vu{e}_3 \vu{e}_2 + T_{33} \vu{e}_3 \vu{e}_3 \Big) +    \\ +    &= \bigg( \sum_{j} \vu{e}_j \frac{1}{h_j} \pdv{}{c_j} \bigg) \cdot \bigg( \sum_{kl} T_{kl} \vu{e}_k \vu{e}_l \bigg) +    \\ +    &= \sum_{jkl} \vu{e}_j \cdot \frac{1}{h_j} \pdv{}{c_j} (T_{kl} \vu{e}_k \vu{e}_l) +\end{aligned}$$ + +We apply the product rule of differentiation +and use that $$\vb{c} \cdot (\vb{a} \vb{b}) = (\vb{c} \cdot \vb{a}) \vb{b}$$: + +$$\begin{aligned} +    \nabla \cdot \overline{\overline{\mathbf{T}}} +    &= \sum_{jkl} \bigg( (\vu{e}_j \cdot \vu{e}_k) \frac{1}{h_j} \pdv{T_{kl}}{c_j} \vu{e}_l +    + (\vu{e}_j \cdot \vu{e}_k) \frac{T_{kl}}{h_j} \pdv{\vu{e}_l}{c_j} +    + \Big( \vu{e}_j \cdot \pdv{\vu{e}_k}{c_j} \Big) \frac{T_{kl}}{h_j} \vu{e}_l \bigg) +    \\ +    &= \sum_{jkl} \bigg( \delta_{jk} \frac{1}{h_j} \pdv{T_{kl}}{c_j} \vu{e}_l + \delta_{jk} \frac{T_{kl}}{h_j} \pdv{\vu{e}_l}{c_j} +    + \Big( \vu{e}_j \cdot \pdv{\vu{e}_k}{c_j} \Big) \frac{T_{kl}}{h_j} \vu{e}_l \bigg) +    \\ +    &= \sum_{jl} \bigg( \frac{1}{h_j} \pdv{T_{jl}}{c_j} \vu{e}_l + \frac{T_{jl}}{h_j} \pdv{\vu{e}_l}{c_j} +    + \sum_{k} \Big( \vu{e}_j \cdot \pdv{\vu{e}_k}{c_j} \Big) \frac{T_{kl}}{h_j} \vu{e}_l \bigg) +\end{aligned}$$ + +Inserting our expressions for the derivatives of the basis vectors +in the last term, we find: + +$$\begin{aligned} +    \nabla \cdot \overline{\overline{\mathbf{T}}} +    &= \sum_{jl} \bigg( \frac{1}{h_j} \pdv{T_{jl}}{c_j} \vu{e}_l + \frac{T_{jl}}{h_j} \pdv{\vu{e}_l}{c_j} +    + \sum_{k} \vu{e}_j \cdot +    \Big( \frac{1}{h_k} \pdv{h_j}{c_k} \vu{e}_j - \delta_{jk} \sum_{m} \frac{1}{h_m} \pdv{h_k}{c_m} \vu{e}_m \Big) \frac{T_{kl}}{h_j} \vu{e}_l \bigg) +    \\ +    &= \sum_{jl} \bigg( \frac{1}{h_j} \pdv{T_{jl}}{c_j} \vu{e}_l + \frac{T_{jl}}{h_j} \pdv{\vu{e}_l}{c_j} +    + \sum_{k} \frac{T_{kl}}{h_j h_k} \pdv{h_j}{c_k} \vu{e}_l +    - \sum_{m} (\vu{e}_j \cdot \vu{e}_m) \frac{T_{jl}}{h_j h_m} \pdv{h_j}{c_m} \vu{e}_l \bigg) +    \\ +    &= \sum_{jl} \bigg( \frac{1}{h_j} \pdv{T_{jl}}{c_j} \vu{e}_l + \frac{T_{jl}}{h_j} \pdv{\vu{e}_l}{c_j} +    + \sum_{k} \frac{T_{kl}}{h_j h_k} \pdv{h_j}{c_k} \vu{e}_l - \frac{T_{jl}}{h_j h_j} \pdv{h_j}{c_j} \vu{e}_l \bigg) +    \\ +    &= \sum_{jl} \bigg( \frac{1}{h_j} \pdv{T_{jl}}{c_j} \vu{e}_l + \frac{T_{jl}}{h_j} \pdv{\vu{e}_l}{c_j} +    + \sum_{k \neq j} \frac{T_{kl}}{h_j h_k} \pdv{h_j}{c_k} \vu{e}_l \bigg) +\end{aligned}$$ + +Where we noticed that the latter two terms cancel out if $$k = j$$. +Next, rewriting $$\ipdv{\vu{e}_l}{c_j}$$: + +$$\begin{aligned} +    \nabla \cdot \overline{\overline{\mathbf{T}}} +    &= \sum_{jl} \bigg( \frac{1}{h_j} \pdv{T_{jl}}{c_j} \vu{e}_l +    + \frac{T_{jl}}{h_j} \Big( \frac{1}{h_l} \pdv{h_j}{c_l} \vu{e}_j - \delta_{jl} \sum_{m} \frac{1}{h_m} \pdv{h_l}{c_m} \vu{e}_m \Big) +    + \sum_{k \neq j} \frac{T_{kl}}{h_j h_k} \pdv{h_j}{c_k} \vu{e}_l \bigg) +    \\ +    &= \sum_{jl} \bigg( \frac{1}{h_j} \pdv{T_{jl}}{c_j} \vu{e}_l +    + \frac{T_{jl}}{h_j h_l} \pdv{h_j}{c_l} \vu{e}_j - \delta_{jl} \sum_{m} \frac{T_{jl}}{h_j h_m} \pdv{h_l}{c_m} \vu{e}_m +    + \sum_{k \neq j} \frac{T_{kl}}{h_j h_k} \pdv{h_j}{c_k} \vu{e}_l \bigg) +    \\ +    &= \sum_{jl} \frac{1}{h_j} \pdv{T_{jl}}{c_j} \vu{e}_l +    + \sum_{jl} \frac{T_{jl}}{h_j h_l} \pdv{h_j}{c_l} \vu{e}_j +    - \sum_{jm} \frac{T_{jj}}{h_j h_m} \pdv{h_j}{c_m} \vu{e}_m +    + \sum_{jl} \sum_{k \neq j} \frac{T_{kl}}{h_j h_k} \pdv{h_j}{c_k} \vu{e}_l +\end{aligned}$$ + +Renaming the indices such that each term contains $$\vu{e}_l$$, +we arrive at the full result: + +$$\begin{aligned} +    \nabla \cdot \overline{\overline{\mathbf{T}}} +    &= \sum_{jl} \bigg( \frac{1}{h_j} \pdv{T_{jl}}{c_j} +    + \frac{T_{lj}}{h_j h_l} \pdv{h_l}{c_j} +    - \frac{T_{jj}}{h_j h_l} \pdv{h_j}{c_l} +    + \sum_{k \neq j} \frac{T_{kl}}{h_j h_k} \pdv{h_j}{c_k} \bigg) \vu{e}_l +\end{aligned}$$ + +To isolate the $$c_m$$-component, we dot-multiply by $$\vu{e}_m$$ +and resolve the Kronecker delta $$\delta_{lm}$$: + +$$\begin{aligned} +    (\nabla \cdot \overline{\overline{\mathbf{T}}})_m +    &= (\nabla \cdot \overline{\overline{\mathbf{T}}}) \cdot \vu{e}_m +    \\ +    &= \sum_{jl} \delta_{lm} \bigg( \frac{1}{h_j} \pdv{T_{jl}}{c_j} +    + \frac{T_{lj}}{h_j h_l} \pdv{h_l}{c_j} +    - \frac{T_{jj}}{h_j h_l} \pdv{h_j}{c_l} +    + \sum_{k \neq j} \frac{T_{kl}}{h_j h_k} \pdv{h_j}{c_k} \bigg) +    \\ +    &= \sum_{j} \frac{1}{h_j} \pdv{T_{jm}}{c_j} +    + \sum_{j} \frac{T_{mj}}{h_j h_m} \pdv{h_m}{c_j} +    - \sum_{j} \frac{T_{jj}}{h_j h_m} \pdv{h_j}{c_m} +    + \sum_{j} \sum_{k \neq j} \frac{T_{km}}{h_j h_k} \pdv{h_j}{c_k} +\end{aligned}$$ + +The second and third terms cancel out for $$j = m$$, +so we can sum over $$j \neq m$$ instead. +{% include proof/end.html id="proof-div-tensor" %} + + +  ## References  1.  M.L. Boas,      *Mathematical methods in the physical sciences*, 2nd edition, diff --git a/source/know/concept/spherical-coordinates/index.md b/source/know/concept/spherical-coordinates/index.md index f037182..01c5a61 100644 --- a/source/know/concept/spherical-coordinates/index.md +++ b/source/know/concept/spherical-coordinates/index.md @@ -8,9 +8,9 @@ categories:  layout: "concept"  --- -**Spherical coordinates** are an extension of polar coordinates to 3D. +**Spherical coordinates** are an extension of polar coordinates $$(r, \varphi)$$ to 3D.  The position of a given point in space is described by -three coordinates $$(r, \theta, \varphi)$$, defined as: +three variables $$(r, \theta, \varphi)$$, defined as:  *   $$r$$: the **radius** or **radial distance**: distance to the origin.  *   $$\theta$$: the **elevation**, **polar angle** or **colatitude**: @@ -18,6 +18,10 @@ three coordinates $$(r, \theta, \varphi)$$, defined as:  *   $$\varphi$$: the **azimuth**, **azimuthal angle** or **longitude**:      angle from the positive $$x$$-axis, typically in the counter-clockwise sense. +Note that this is the standard notation among physicists, +but mathematicians often switch the definitions of $$\theta$$ and $$\varphi$$, +while still writing $$(r, \theta, \varphi)$$. +  Cartesian coordinates $$(x, y, z)$$ and the spherical system  $$(r, \theta, \varphi)$$ are related by: @@ -32,104 +36,142 @@ $$\begin{aligned}  \end{aligned}$$  Conversely, a point given in $$(x, y, z)$$ -can be converted to $$(r, \theta, \varphi)$$ -using these formulae: +can be converted to $$(r, \theta, \varphi)$$ using these formulae, +where $$\mathtt{atan2}$$ is the 2-argument arctangent, +which is needed to handle the signs correctly:  $$\begin{aligned}      \boxed{ -        r = \sqrt{x^2 + y^2 + z^2} -        \qquad -        \theta = \arccos(z / r) -        \qquad -        \varphi = \mathtt{atan2}(y, x) +        \begin{aligned} +            r +            &= \sqrt{x^2 + y^2 + z^2} +            \\ +            \theta +            &= \arccos(z / r) +            \\ +            \varphi +            &= \mathtt{atan2}(y, x) +        \end{aligned}      }  \end{aligned}$$ -The spherical coordinate system is +Spherical coordinates form  an [orthogonal curvilinear system](/know/concept/orthogonal-curvilinear-coordinates/), -whose scale factors $$h_r$$, $$h_\theta$$ and $$h_\varphi$$ we want to find. -To do so, we calculate the differentials of the Cartesian coordinates: +whose **scale factors** $$h_r$$, $$h_\theta$$ and $$h_\varphi$$ we need. +To get those, we calculate the unnormalized local basis:  $$\begin{aligned} -    \dd{x} &= \dd{r} \sin\theta \cos\varphi + \dd{\theta} r \cos\theta \cos\varphi - \dd{\varphi} r \sin\theta \sin\varphi +    h_r \vu{e}_r +    &= \vu{e}_x \pdv{x}{r} + \vu{e}_y \pdv{y}{r} + \vu{e}_z \pdv{z}{r}      \\ -    \dd{y} &= \dd{r} \sin\theta \sin\varphi + \dd{\theta} r \cos\theta \sin\varphi + \dd{\varphi} r \sin\theta \cos\varphi +    &= \vu{e}_x \sin{\theta} \cos{\varphi} + \vu{e}_y \sin{\theta} \sin{\varphi} + \vu{e}_z \cos{\theta}      \\ -    \dd{z} &= \dd{r} \cos\theta - \dd{\theta} r \sin\theta -\end  | 
