pyoculus.utils.cyl_cart_transform.dinvJ_matrix
- pyoculus.utils.cyl_cart_transform.dinvJ_matrix(vec: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], r: float, phi: float, z: float) array
Computes the matrix due to the evolution of the basis in cylindrical coordinates.
The Christoffel symbols \(\Gamma^k_{ij} = \frac{\textbf{e}_i}{x^j}\cdot g^{km}\textbf{e}_m\), where \(g^{km}\) is the inverse metric tensor, are used to compute the derivative of the basis vectors. Then for a vector \(X = X^i\textbf{e}_i\), the covariant derivative is given by:
\[\nabla_i X^k = \partial_i X^k - \Gamma^k_{ij} X^j.\]To get the partial derivatives such as \(\partial_\phi v^r\), we can use the above formula, the independance of basis of \(\nabla v\) and a change of basis to get the desired components. We can write the part we need to substract in matrix form as:
\[\text{to write}.\]- Parameters:
vec (array) – The vector \(v\) in cartesian coordinates.
r (float) – The radial coordinate.
phi (float) – The azimuthal coordinate.
z (float) – The vertical coordinate.
- Returns:
The matrix due to the evolution of the basis in cylindrical coordinates.
- Return type:
array