CylindricalCoordinateSystem - crowlogic/arb4j GitHub Wiki
The cylindrical coordinate system is a three-dimensional coordinate system that extends the two-dimensional polar coordinate system into three dimensions using a z-coordinate. This system is especially beneficial in situations involving cylindrical symmetry.
The three dimensions in cylindrical coordinates are:
- r (rho): The radial distance from the origin (the z-axis) to the point in question.
- θ (theta): The azimuthal angle in the x-y plane, measured counter-clockwise from the positive x-axis.
- z: The height above the x-y plane.
The conversion between Cartesian coordinates (x, y, z) and cylindrical coordinates (r, θ, z) are as follows:
-
From Cartesian to Cylindrical:
$$r = \sqrt{x^2 + y^2}$$
$$θ = \text{atan2}(y, x)$$ (atan2 is a variant of the arctangent function that takes two arguments instead of one. It returns values in the interval $(-π, π]$, which makes it useful for finding the angle of a vector in the plane.)
$$z = z$$
-
From Cylindrical to Cartesian:
$$x = r \cdot \cos(θ)$$
$$y = r \cdot \sin(θ)$$
$$z = z$$
The differential elements for volume (dV), surface area (dS), and length (dl) in cylindrical coordinates are:
-
Differential Volume element (dV):
$$dV = r \cdot dr \cdot dθ \cdot dz$$
-
Differential Surface Area elements (dS):
-
For the radial surface element, $dS_r$: $$dS_r = r \cdot dθ \cdot dz$$
-
For the azimuthal surface element, $dS_θ$: $$dS_θ = dr \cdot dz$$
-
For the axial surface element, $dS_z$: $$dS_z = r \cdot dr \cdot dθ$$
-
-
Differential Length elements (dl):
$$dl_r = dr$$
$$dl_θ = r \cdot dθ$$
$$dl_z = dz$$
In cylindrical coordinates, the gradient, divergence, and curl operators are given by:
-
Gradient (∇f):
$$∇f = \left(\frac{\partial f}{\partial r}\right) \hat{r} + \left(\frac{1}{r} \cdot \frac{\partial f}{\partial θ}\right) \hat{θ} + \left(\frac{\partial f}{\partial z}\right) \hat{z}$$
-
Divergence (∇⋅F):
$$∇⋅F = \frac{1}{r} \cdot \frac{\partial}{\partial r} (rF_r) + \frac{1}{r} \cdot \frac{\partial F_θ}{\partial θ} + \frac{\partial F_z}{\partial z}$$
-
Curl (∇xF):
$$∇×F = \left(\frac{1}{r} \cdot \frac{\partial F_z}{\partial θ} - \frac{\partial F_θ}{\partial z}\right) \hat{r} + \left(\frac{\partial F_r}{\partial z} - \frac{\partial F_z}{\partial r}\right) \hat{θ} + \left(\frac{1}{r} \cdot \frac{\partial}{\partial r} (rF_θ) - \frac{1}{r} \cdot \frac{\partial F_r}{\partial θ}\right) \hat{z}$$
Here, $\hat{r}$, $\hat{θ}$, and $\hat{z}$ represent the unit vectors in the cylindrical coordinate system in the r, θ, and z directions respectively. $F_r$, $F_θ$, and $F_z$ represent the components of a vector field F in the r, θ, and z directions respectively.
The Laplacian operator in cylindrical coordinates is given by:
Laplacian (Δf):
$$Δf = \frac{1}{r} \cdot \frac{\partial}{\partial r} (r \cdot \frac{\partial f}{\partial r}) + \frac{1}{r^2} \cdot \frac{\partial^2 f}{\partial θ^2} + \frac{\partial^2 f}{\partial z^2}$$
In all the above formulas, the partial derivative $\frac{\partial}{\partial r}$ means differentiation with respect to r, while keeping θ and z constant, and similarly for the others.