Compute the coordinate transformation related variables for a surface mapping, \Psi,

\Psi : \Pi_{\mathrm{ref}}\to\Gamma

We get an instance of class CoordinateTransformationSurface. The transformations are its methods.

⭕ To access the source code, click on the [source] button at the right side or click on []. Dependence may exist. In case of error, check import and install required packages or download required scripts. ©

class coordinate_transformation_surface.CoordinateTransformationSurface(Psi, d_Psi, iJM=None)[source]

The surface coordinate transformation class.

  • Psi (function) –

    The mapping \Psi. It should be a function which returns three components of the mapping, i.e.,

    \Psi = (\Psi_x, \Psi_y, \Psi_z).

  • d_Psi (function) –

    The Jacobian matrix of \Psi, \mathcal{J}. It should be a function return the 6 (3*2) components of the Jacobian matrix, i.e.,

    ( \dfrac{\partial x}{\partial\varrho}, \dfrac{\partial x}{\partial\tau}), ( \dfrac{\partial y}{\partial\varrho}, \dfrac{\partial y}{\partial\tau}), ( \dfrac{\partial z}{\partial\varrho}, \dfrac{\partial z}{\partial\tau}).

  • iJM – The inverse Jacobian matrix.


>>> ctS = CoordinateTransformationSurface(Psi, d_Psi)
>>> rho = np.linspace(-1,1,20)
>>> tau = np.linspace(-1,1,20)
>>> rho, tau = np.meshgrid(rho, tau, indexing='ij')
>>> x, y, z = ctS.mapping(rho, tau)
>>> J = ctS.Jacobian_matrix(rho, tau)
>>> np.shape(J)
(3, 2, 20, 20)
>>> G = ctS.metric_matrix(rho, tau)
>>> np.shape(G)
(2, 2, 20, 20)
>>> g = ctS.metric(rho, tau)
>>> np.shape(g)
(20, 20)
Jacobian_matrix(rho, tau)[source]

A wrap of the input Jacobian matrix, d_Psi, i.e., \mathcal{J}.


Return the Jacobian matrix \mathcal{J}:

\mathcal{J} =
\dfrac{\partial x}{\partial \varrho} &
\dfrac{\partial x}{\partial \tau} \\
\dfrac{\partial y}{\partial \varrho} &
\dfrac{\partial y}{\partial \tau} \\
\dfrac{\partial z}{\partial \varrho} &
\dfrac{\partial z}{\partial \tau}

inverse_Jacobian_matrix(rho, tau)[source]

Compute the inverse Jacobian matrix, \mathcal{J}^{-1}.


Return the inverse Jacobian matrix \mathcal{J}^-1:

\mathcal{J}^{-1} =
\dfrac{\partial \varrho}{\partial x} &
\dfrac{\partial \varrho}{\partial y} &
\dfrac{\partial \varrho}{\partial z} \\
\dfrac{\partial \tau}{\partial x} &
\dfrac{\partial \tau}{\partial y} &
\dfrac{\partial \tau}{\partial z}

mapping(rho, tau)[source]

A wrap of the input mapping, Psi, i.e., \Psi.

  • rho\varrho.

  • tau\tau.


a tuple (x,y,z) = \Psi(\varrho,\tau).

metric(rho, tau)[source]

The metric g.

metric_matrix(rho, tau)[source]

Compute the metric matrix \mathcal{G}.


Return the metric matrix \mathcal{G}:

\mathcal{G} =
g_{1,1} &
g_{1,2} \\
g_{2,1} &

coordinate_transformation_surface.extract_surface_coordinate_transformations_of(ct, which_sides=None)[source]

We extract the six boundary coordinate transformations from a CoordinateTransformation instance representing a 3D mapping \Phi`.

\Phi: \Omega_{\mathrm{ref}}\to\Omega

  • ct (CoordinateTransformation) – A CoordinateTransformation instance that represents the mapping \Phi:\Omega_{\mathrm{ref}}\to\Omega.

  • which_sides – (default: None) We want to extract sub-mappings on which sides?


A tuple of 6 CoordinateTransformationSurface instances representing the north (\xi^-), south (\xi^+), west (\varsigma^-), east (\eta^+), back (\varsigma^-) and front (\varsigma^+) boundaries.

↩️ Back to Ph.D. thesis complements (ptc).