Spatial Derivatives of Shape Functions¶
The shape functions \(N_\alpha^e(\boldsymbol{r})\) introduced in Shape Functions and Finite Element Approximation are given as functions of the natural coordinates \(\boldsymbol{r}\), which are the local coordinates of an element. On the other hand, through the strain-displacement relation, the integrands in the weak form contain partial derivatives with respect to the physical coordinates (the reference configuration \(\boldsymbol{X}\) or the current configuration \(\boldsymbol{x}\)), namely \(\partial N_\alpha^e/\partial \boldsymbol{X}\) or \(\partial N_\alpha^e/\partial \boldsymbol{x}\). This section organizes the procedure for computing these spatial derivatives of shape functions from the element nodal coordinates and derivatives with respect to the natural coordinates.
Expression of Spatial Derivatives by the Chain Rule¶
Applying the chain rule under the interpolation formula \(\boldsymbol{X} = \sum_\alpha N_\alpha^e(\boldsymbol{r})\,\boldsymbol{X}^e_\alpha\) (previous section), and using the Jacobian matrix \(J_{ij} = \partial X_i/\partial r_j\) of the mapping from natural coordinates to physical coordinates, gives
Here, \(\partial \boldsymbol{N}^e/\partial \boldsymbol{X}\) and \(\partial \boldsymbol{N}^e/\partial \boldsymbol{r}\) are matrices in which row \(\alpha\) represents the partial-derivative vector for node \(\alpha\); each is an \(n_e \times 3\) matrix.
Construction of the Jacobian Matrix¶
Differentiating the interpolation formula with respect to \(\boldsymbol{r}\) gives
Thus, the Jacobian matrix can be constructed directly from the element nodal coordinates \(\boldsymbol{X}^e_\alpha\) and the natural-coordinate derivatives \(\partial \boldsymbol{N}^e/\partial \boldsymbol{r}\). The natural-coordinate derivatives are determined by the functional form of the shape functions and are implemented in advance for each element type.
The determinant of the Jacobian matrix \(\det(\partial \boldsymbol{X}/\partial \boldsymbol{r})\) is used in numerical integration to transform the volume element as \(dV = \det(\partial \boldsymbol{X}/\partial \boldsymbol{r})\,d\boldsymbol{r}\). If the determinant becomes \(0\), the element is degenerate and the computation fails.
Computational Flow¶
From the derivation above, computation of the spatial derivatives \(\partial \boldsymbol{N}^e/\partial \boldsymbol{X}\) can be divided into the following four stages.
- Compute natural-coordinate derivatives: Using the element type and the natural coordinates \(\boldsymbol{r}\) of the evaluation point as input, compute the natural-coordinate derivative matrix \(\partial \boldsymbol{N}^e/\partial \boldsymbol{r}\). Because the functional form of the shape functions differs by element type, processing branches according to the element type.
- Compute the Jacobian matrix: From the element nodal coordinates \(\boldsymbol{X}^e\) and \(\partial \boldsymbol{N}^e/\partial \boldsymbol{r}\), assemble the Jacobian matrix \(\partial \boldsymbol{X}/\partial \boldsymbol{r}\) using the equation in the previous section.
- Compute the inverse matrix and determinant: Compute the inverse \((\partial \boldsymbol{X}/\partial \boldsymbol{r})^{-1}\) and determinant of the Jacobian matrix. The determinant is used in the weighting for numerical integration.
- Compute spatial derivatives: From \(\partial \boldsymbol{N}^e/\partial \boldsymbol{r}\) and \((\partial \boldsymbol{X}/\partial \boldsymbol{r})^{-1}\), obtain the spatial derivatives \(\partial \boldsymbol{N}^e/\partial \boldsymbol{X}\) as their product.
These four stages branch according to the element type and spatial dimension (two or three dimensions), but the overall flow is common.
Common Treatment of Reference and Current Configurations¶
The procedure above can also be applied simply by replacing \(\boldsymbol{X}^e\) with the current nodal coordinates \(\boldsymbol{x}^e_\alpha = \boldsymbol{X}^e_\alpha + \boldsymbol{u}^e_\alpha\) to obtain the spatial derivatives \(\partial \boldsymbol{N}^e/\partial \boldsymbol{x}\) in the current configuration. Thus, the same procedure can be shared between the Total Lagrangian and Updated Lagrangian formulations by switching only the input nodal coordinates.
Related Topics¶
- Shape Functions and Finite Element Approximation — Definition of shape functions and element nodal coordinates
- Discretization of Internal Virtual Work — Construction of the B matrix from spatial derivatives
- Numerical Integration — Use of the Jacobian determinant in Gauss quadrature