Jacobian

For the computation of the Shape Function Gradients it is necessary to evaluate the derivative of the shape functions, which are functions of the reference space coordinates \(\xi\) and \(\eta\), with respect to the real space coordinates \(x\) and \(y\):

\[\begin{split}\frac{\partial N_i^e(\xi, \eta)}{\partial x} \\ \frac{\partial N_i^e(\xi, \eta)}{\partial y}\end{split}\]

The trick is to use the chain rule like this:

\[\begin{split}\frac{\partial N_i^e(\xi, \eta)}{\partial \xi} &= \frac{\partial N_i^e(\xi, \eta)}{\partial x} \frac{\partial x}{\partial \xi} + \frac{\partial N_i^e(\xi, \eta)}{\partial y} \frac{\partial y}{\partial \xi} % \\[1ex] % \frac{\partial N_i^e(\xi, \eta)}{\partial \eta} &= \frac{\partial N_i^e(\xi, \eta)}{\partial x} \frac{\partial x}{\partial \eta} + \frac{\partial N_i^e(\xi, \eta)}{\partial y} \frac{\partial y}{\partial \eta}\end{split}\]

Subsequently this set of equation can be rewritten in matrix-vector-notation:

\[\begin{split}\begin{bmatrix} \dfrac{\partial N_i^e(\xi, \eta)}{\partial \xi} \\[1ex] \dfrac{\partial N_i^e(\xi, \eta)}{\partial \eta} \end{bmatrix} = \underbrace{ \begin{bmatrix} \dfrac{\partial x}{\partial \xi} & \dfrac{\partial y}{\partial \xi} \\[1ex] \dfrac{\partial x}{\partial \eta} & \dfrac{\partial y}{\partial \eta} \end{bmatrix} }_{\text{Jacobian } \boldsymbol{J}^{\mathrm{e}}} \begin{bmatrix} \dfrac{\partial N_i^e(\xi, \eta)}{\partial x} \\[1ex] \dfrac{\partial N_i^e(\xi, \eta)}{\partial y} \end{bmatrix}\end{split}\]

Now we can solve this for what we are looking for:

\[\begin{split}\begin{bmatrix} \dfrac{\partial N_i^e(\xi, \eta)}{\partial x} \\[1ex] \dfrac{\partial N_i^e(\xi, \eta)}{\partial y} \end{bmatrix} = (\boldsymbol{J}^{\mathrm{e}})^{-1} \begin{bmatrix} \dfrac{\partial N_i^e(\xi, \eta)}{\partial \xi} \\[1ex] \dfrac{\partial N_i^e(\xi, \eta)}{\partial \eta} \end{bmatrix}\end{split}\]

We know the form of the shape functions derivatives with respect to \(\xi\) and \(\eta\). So all that remains is to compute the Jacobian

\[\begin{split}\boldsymbol{J}^{\mathrm{e}} = \begin{bmatrix} \dfrac{\partial x}{\partial \xi} & \dfrac{\partial y}{\partial \xi} \\[1ex] \dfrac{\partial x}{\partial \eta} & \dfrac{\partial y}{\partial \eta} \end{bmatrix}\end{split}\]

To this end we do not know what the exact dependency of \(x\), \(y\) on \(\xi\), \(\eta\) are. By using the Shape Functions to approximate the real coordinates \(x\) and \(y\) we can introduce a dependency of \(x\) and \(y\) on \(\xi\) and \(\eta\).

\[\begin{split}x &= \boldsymbol{N}^{\mathrm{e}}(\xi, \eta) \boldsymbol{x}^{\mathrm{e}} = \sum \limits_{i=0}^{3} N_i^{\mathrm{e}}(\xi, \eta) x_i^{\mathrm{e}} \\[1ex] y &= \boldsymbol{N}^{\mathrm{e}}(\xi, \eta) \boldsymbol{y}^{\mathrm{e}} = \sum \limits_{i=0}^{3} N_i^{\mathrm{e}}(\xi, \eta) y_i^{\mathrm{e}}\end{split}\]

This approach is known as the isoparametric concept. Inserting this into the Jacobian yields

\[\begin{split}\boldsymbol{J}^{\mathrm{e}}(\xi, \eta) &= \begin{bmatrix} \dfrac{\partial \sum \limits_{i=0}^{3} N_i^{\mathrm{e}}(\xi, \eta) x_i^{\mathrm{e}}}{\partial \xi} & \dfrac{\partial \sum \limits_{i=0}^{3} N_i^{\mathrm{e}}(\xi, \eta) y_i^{\mathrm{e}}}{\partial \xi} \\[1ex] \dfrac{\partial \sum \limits_{i=0}^{3} N_i^{\mathrm{e}}(\xi, \eta) x_i^{\mathrm{e}}}{\partial \eta} & \dfrac{\partial \sum \limits_{i=0}^{3} N_i^{\mathrm{e}}(\xi, \eta) y_i^{\mathrm{e}}}{\partial \eta} \end{bmatrix} \\[1ex] &= \begin{bmatrix} \sum \limits_{i=0}^{3} \dfrac{\partial N_i^{\mathrm{e}}(\xi, \eta)}{\partial \xi} x_i^{\mathrm{e}} & \sum \limits_{i=0}^{3} \dfrac{\partial N_i^{\mathrm{e}}(\xi, \eta)}{\partial \xi} y_i^{\mathrm{e}} \\[1ex] \sum \limits_{i=0}^{3} \dfrac{\partial N_i^{\mathrm{e}}(\xi, \eta)}{\partial \eta} x_i^{\mathrm{e}} & \sum \limits_{i=0}^{3} \dfrac{\partial N_i^{\mathrm{e}}(\xi, \eta)}{\partial \eta} y_i^{\mathrm{e}} \end{bmatrix} \\[1ex] &= \begin{bmatrix} \dfrac{\partial N_0^{\mathrm{e}}(\xi, \eta)}{\partial \xi} & \dfrac{\partial N_1^{\mathrm{e}}(\xi, \eta)}{\partial \xi} & \dfrac{\partial N_2^{\mathrm{e}}(\xi, \eta)}{\partial \xi} & \dfrac{\partial N_3^{\mathrm{e}}(\xi, \eta)}{\partial \xi} \\[1ex] \dfrac{\partial N_0^{\mathrm{e}}(\xi, \eta)}{\partial \eta} & \dfrac{\partial N_1^{\mathrm{e}}(\xi, \eta)}{\partial \eta} & \dfrac{\partial N_2^{\mathrm{e}}(\xi, \eta)}{\partial \eta} & \dfrac{\partial N_3^{\mathrm{e}}(\xi, \eta)}{\partial \eta} \end{bmatrix} \begin{bmatrix} x_0^{\mathrm{e}} & y_0^{\mathrm{e}} \\[1ex] x_1^{\mathrm{e}} & y_1^{\mathrm{e}} \\[1ex] x_2^{\mathrm{e}} & y_2^{\mathrm{e}} \\[1ex] x_3^{\mathrm{e}} & y_3^{\mathrm{e}} \end{bmatrix}\end{split}\]

We now have the ingredients we need to implement a function that computes the Jacobian.

Element.jacobian(xi, eta)

Return the Jacobian of the element at the reference space position (xi, eta).

Parameters:
  • xi (float) – Reference space coordinate at which the Jacobian should be computed.
  • eta (float) – Reference space coordinate at which the Jacobian should be computed.
Returns:

The Jacobian of the element at position (xi, eta).

Return type:

numpy.ndarray