Shape Function Gradients

Shape functions are used to approximate values of interest inside of an element using the nodal values. For solving the elasticity problem it is also necessary to approximate the gradient of those values of interest. Just like the shape functions form a matrix \(\boldsymbol{N}^{\mathrm{e}}\) that can multiplied with the nodal values to get the approximation the shape function gradients can be arranged in a matrix to yield \(\boldsymbol{B}^{\mathrm{e}}\).

\[\begin{split}\boldsymbol{B}^{\mathrm{e}} = \boldsymbol{\nabla}_\mathrm{S} \boldsymbol{N}^{\mathrm{e}} &= \begin{bmatrix} \dfrac{\partial}{\partial x} & 0 \\[1ex] 0 & \dfrac{\partial}{\partial y} \\[1ex] \dfrac{\partial}{\partial y} & \dfrac{\partial}{\partial x} \end{bmatrix} \begin{bmatrix} N_0^{\mathrm{e}} & 0 & N_1^{\mathrm{e}} & 0 & N_2^{\mathrm{e}} & 0 & N_3^{\mathrm{e}} & 0 \\ 0 & N_0^{\mathrm{e}} & 0 & N_1^{\mathrm{e}} & 0 & N_2^{\mathrm{e}} & 0 & N_3^{\mathrm{e}} \end{bmatrix} % \\ % &= \begin{bmatrix} \dfrac{\partial N_0^{\mathrm{e}}}{\partial x} & 0 & \dfrac{\partial N_1^{\mathrm{e}}}{\partial x} & 0 & \dfrac{\partial N_2^{\mathrm{e}}}{\partial x} & 0 & \dfrac{\partial N_3^{\mathrm{e}}}{\partial x} & 0 \\[1ex] 0 & \dfrac{\partial N_0^{\mathrm{e}}}{\partial y} & 0 & \dfrac{\partial N_1^{\mathrm{e}}}{\partial y} & 0 & \dfrac{\partial N_2^{\mathrm{e}}}{\partial y} & 0 & \dfrac{\partial N_3^{\mathrm{e}}}{\partial y} \\[1ex] \dfrac{\partial N_0^{\mathrm{e}}}{\partial y} & \dfrac{\partial N_0^{\mathrm{e}}}{\partial x} & \dfrac{\partial N_1^{\mathrm{e}}}{\partial y} & \dfrac{\partial N_1^{\mathrm{e}}}{\partial x} & \dfrac{\partial N_2^{\mathrm{e}}}{\partial y} & \dfrac{\partial N_2^{\mathrm{e}}}{\partial x} & \dfrac{\partial N_3^{\mathrm{e}}}{\partial y} & \dfrac{\partial N_3^{\mathrm{e}}}{\partial x} \end{bmatrix}\end{split}\]

The problem at this point is that we do not yet know what the differentiation of the shape functions \(N_{i}^{\mathrm{e}}\) – defined in terms of \(\xi\) and \(\eta\) – with respect to \(x\) and \(y\) looks like. To get to know how to do this take a look at the Jacobian. Using the Jacobian you are able to compute the derivatives of the shape functions with respect to the real coordinates and build the shape function gradient matrix \(\boldsymbol{B}^{\mathrm{e}}\) out of it.

Element.shape_function_gradient(xi, eta)

Return the shape function gradient matrix of the element at the reference space position (xi, eta).

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

The shape function gradient matrix of the element at position (xi, eta).

Return type:

numpy.ndarray