Consider the 3D beam-type structure shown in Fig. 1a, which will be used for demonstrating specific features of the shape and topology optimization procedure. The beam is modeled by means of the FEM, whereby two types of element discretization are adopted, namely (i) a discretization by 3D continuum elements, see Fig. 1b, and (ii) a discretization by 1D beam elements in the longitudinal direction of the beam, combined with additional 2D continuum elements for a detailed modeling of the cross-sectional properties of a beam element, see Fig. 1c. For brevity, in the following these two types of discretization will be denoted as the “3D beam model” and the “2.5D beam model”, respectively.
The finite element discretizations for the 3D and 2.5D beam models are obtained by projecting a fixed, auxiliary mesh, defined in the parametric domain, onto the actual mesh in the physical domain, using Eqs. (5), (11), and (14) for 1D, 2D and 3D finite elements. This projection is schematically illustrated in Fig. 2, and enables obtaining an explicit relationship between the structural response of the beam structure and the parameters that control the geometry, i.e., the NURBS control points. Accordingly, analytical expressions can be derived for the parameter sensitivities governing the structural shape optimization, which will be presented in Sect. 5.
3D beam model
Given the knot vectors, the control points with their weights, and a fixed auxiliary mesh in the parametric domain, the discretization of the 3D finite element model is carried out by projecting the nodal coordinates \((\xi _n,\eta _n,\zeta _n)\) of the fixed, auxiliary mesh onto the nodal coordinates \((x_n,y_n,z_n)\) of the actual mesh in the physical domain, in correspondence with Eq. (14). Hence, for each isoparametric element e, its nodal coordinates can be cast into a vector:
$$\begin{aligned} \bar{\mathbf{p }}_e=[\mathbf{p} _1^{\text {T}},\mathbf{p} _2^{\text {T}},\ldots ,\mathbf{p} _{n_e}^{\text {T}}]^{\text {T}}, \end{aligned}$$
(16)
where the coordinates \(\mathbf{p} _n\) of node n, with \(n=1,2,\ldots ,n_e\), are obtained from Eq. (14), with \(n_e\) the total number of nodes of element e. The location of an arbitrary point \(\hat{\mathbf{p }}_e=[x,y,z]^{\text {T}}\) within the finite element e can be obtained from an interpolation of the coordinates of the element nodes \(\bar{\mathbf{p }}_e\) as:
$$\begin{aligned} \hat{\mathbf{p }}_e=\mathbf{N} _e \bar{\mathbf{p }}_e, \end{aligned}$$
(17)
with
$$\begin{aligned} \mathbf{N} _e=[N_1 \mathbf{I} _d \,\, N_2 \mathbf{I} _d \,\, \ldots \,\, N_{n_e} \mathbf{I} _d] , \end{aligned}$$
(18)
where \(N_n\), with \(n=1,2,\ldots ,n_e\), are the polynomial interpolation functions of the element, and \(\mathbf{I} _d\) represents the \(d \times d\) identity matrix, with d the number of degrees of freedom of the element node. By introducing the gradient operator \(\varvec{\partial }=[{\partial }/{\partial \xi _e},{\partial }/ {\partial \eta _e},{\partial }/{\partial \zeta _e}]^{\text {T}}\), the Jacobian matrix of element e follows as
$$\begin{aligned} \mathbf{J} _e= \varvec{\partial } \hat{\mathbf{p }}_e^{\text {T}} . \end{aligned}$$
(19)
Inserting Eq. (17) into Eq. (19), the Jacobian matrix \(\mathbf{J} _e\) can be directly expressed in terms of the nodal coordinates \(\bar{\mathbf{p }}_e\), i.e.,
$$\begin{aligned} \mathbf{J} _e= \bar{\mathbf{P }}_e \left( \varvec{\partial } \mathbf{N} _e^{\text {T}} \right) , \end{aligned}$$
(20)
with
$$\begin{aligned} \bar{\mathbf{P }}_e=\left[ \begin{array}{ccc} \bar{\mathbf{p }}_e^{\text {T}} &{} \quad \mathbf{0} &{}\quad \mathbf{0} \\ \mathbf{0} &{} \quad \bar{\mathbf{p }}_e^{\text {T}} &{}\quad \mathbf{0} \\ \mathbf{0} &{} \quad \mathbf{0} &{}\quad \bar{\mathbf{p }}_e^{\text {T}} \end{array} \right] , \end{aligned}$$
(21)
where \(\bar{\mathbf{p }}_e\) is given by Eq. (16). When denoting the displacement vector for an arbitrary point of the structure as \(\mathbf{s} =[s_x,s_y,s_z ]^{\text {T}}\), the corresponding strain vector \(\varvec{\epsilon }=[ \epsilon _{xx}, \epsilon _{yy}, 2\epsilon _{xy}, 2\epsilon _{xz}, 2\epsilon _{yz}, \epsilon _{zz} ]^{\text {T}}\) can be calculated as \( \varvec{\epsilon }=\mathbf{B} \mathbf{s} \), with the matrix \(\mathbf{B} \) given by:
$$\begin{aligned} \mathbf{B} = \left[ \begin{array}{cccccc} \partial / \partial x &{} 0 &{} \partial / \partial y &{} \partial / \partial z &{} 0 &{}0 \\ 0 &{} \partial / \partial y &{} \partial / \partial x &{} 0 &{} \partial / \partial z &{}0 \\ 0 &{} 0 &{}0 &{}\partial / \partial x &{} \partial / \partial y &{}\partial / \partial z \end{array} \right] ^{\text {T}} . \end{aligned}$$
(22)
At the element level, the matrix \(\mathbf{B} _e\) can be expressed as [5]
$$\begin{aligned} \mathbf{B} _e=\mathbf{B} _e^1 \frac{\partial }{\partial \xi _e} + \mathbf{B} _e^2 \frac{\partial }{\partial \eta _e} + \mathbf{B} _e^3 \frac{\partial }{\partial \zeta _e} , \end{aligned}$$
(23)
with
$$\begin{aligned} \mathbf{B} _e^c=\left[ \begin{array}{ccc} (\mathbf{J} _e^{-1})_{1c} &{} 0 &{} 0\\ 0 &{} (\mathbf{J} _e^{-1})_{2c} &{} 0\\ (\mathbf{J} _e^{-1})_{2c} &{} (\mathbf{J} _e^{-1})_{1c} &{} 0\\ (\mathbf{J} _e^{-1})_{3c} &{} 0 &{} (\mathbf{J} _e^{-1})_{1c}\\ 0 &{} (\mathbf{J} _e^{-1})_{3c} &{} (\mathbf{J} _e^{-1})_{2c}\\ 0 &{} 0 &{} (\mathbf{J} _e^{-1})_{3c} \end{array} \right] \quad \text {with} \quad c \in \{ 1,2,3 \} , \end{aligned}$$
(24)
where the index c refers to the column of the inverse of the Jacobian matrix, Eq. (20). Using Eqs. (16) to (24), the stiffness matrix \(\mathbf{k} _e\) of the isoparametric 3D element is computed as
$$\begin{aligned} \mathbf{k} _e= \int _{-1}^1 \int _{-1}^1 \int _{-1}^1 \left( \mathbf{B} _e \mathbf{N} _e \right) ^{\text {T}} \mathbf{Q} _e \mathbf{B} _e \mathbf{N} _e |\mathbf{J} _e| \mathrm{d}\xi _e \mathrm{d}\eta _e \mathrm{d}\zeta _e \, , \end{aligned}$$
(25)
with \(|\mathbf{J} _e|\) the determinant of the Jacobian matrix \(\mathbf{J} _e\). Here, the \(6 \times 6\) matrix \(\mathbf{Q} _e\) incorporates the constitutive properties of the element. In accordance with the SIMP approach used for topology optimization, the stiffness matrix is scaled by the relative density of the element via a power-law expression [2, 18, 23]
$$\begin{aligned} \mathbf{Q} _e=({\rho }_e)^p \mathbf{Q} , \end{aligned}$$
(26)
where \(\rho _e\) is the relative density of element e, p is a penalization factor with a typical value of 3 [2] that is also adopted in the present work, and \(\mathbf{Q} \) represents the constitutive behavior in a material point—taken here as linear-elastic—in accordance with \(\varvec{\sigma }=\mathbf{Q} \varvec{\epsilon }\), with the stress given by \(\varvec{\sigma }=[ \sigma _{xx}, \sigma _{yy}, \sigma _{xy}, \sigma _{xz}, \sigma _{yz}, \sigma _{zz} ]^{\text {T}}\). Finally, the global stiffness matrix \(\mathbf{K} \) is found by assembling the element stiffness matrices:
$$\begin{aligned} \mathbf{K} =\sum _{e=1}^{N} \mathbf{k} _e , \end{aligned}$$
(27)
with N the total number of elements and the sum operator representing the assembly procedure typically used in the finite element method. The global displacement vector \(\mathbf{u} \) is obtained by solving the system of equilibrium equations
$$\begin{aligned} \mathbf{K} \mathbf{u} = \mathbf{f} , \end{aligned}$$
(28)
where \(\mathbf{f} \) is the global force vector.
2.5D beam model
For the 2.5D beam model, standard 1D beam elements are used to discretize the beam in the longitudinal direction, while the cross-sectional properties of the beam elements are calculated from additional 2D FEM analyses. In this section, the 2.5D FEM approach originally presented in [12] is reviewed, see also [3,4,5,6, 11] for more details; these expressions serve as input for the computation of the shape and topology sensitivities used in the gradient-based optimization algorithm, see Sect. 5.
Beam finite element model
In the beam FEM model, the deformations are described by translations \(\varvec{\chi }=[ \chi _x, \chi _y, \chi _z ]^{\text {T}}\) and rotations \(\varvec{\varphi }=[ \varphi _x, \varphi _y, \varphi _z ]^{\text {T}}\) of a cross-sectional reference point. These deformations are grouped into a single vector as \(\mathbf{r} =[ \varvec{\chi }^{\text {T}}, \varvec{\varphi }^{\text {T}} ]^{\text {T}}\). In addition, the shear strains in the x- and y-directions and the normal strain in the z-direction are assembled as \(\varvec{\tau }=[ \tau _x, \tau _y, \tau _z ]^{\text {T}}\), and the curvatures about the three directions are given by \(\varvec{\kappa }=[ \kappa _x, \kappa _y, \kappa _z ]^{\text {T}}\). The above two deformation measures can be assembled into a single vector as \(\varvec{\psi }=[ \varvec{\tau }^{\text {T}}, \varvec{\kappa }^{\text {T}} ]^{\text {T}}\). Accordingly, the strain-displacement relation becomes \(\varvec{\psi }=\bar{\mathbf{B }} \mathbf{r} \), with the operator \(\bar{\mathbf{B }}\) given by
$$\begin{aligned} \bar{\mathbf{B }}=\mathbf{T} _r + \mathbf{I} _6 \frac{\partial }{\partial z} , \end{aligned}$$
(29)
with
$$\begin{aligned} \begin{aligned} \mathbf{T} _{r}=&\left[ \begin{array}{cc} \mathbf{0} _3 &\quad{} \mathbf{t} _r \\ \mathbf{0} _3 &\quad{} \mathbf{0} _3 \\ \end{array} \right] \end{aligned} \begin{aligned} \quad \text {and} \quad \mathbf{t} _r=&\left[ \begin{array}{ccc} 0 &\quad{} -1 &\quad{} 0\\ 1 &\quad{} 0 &\quad{} 0\\ 0 &\quad{} 0 &\quad{} 0\\ \end{array} \right] \end{aligned} . \end{aligned}$$
(30)
Further, \(\mathbf{I} _6\) is the \(6\times 6\) identity matrix, \(\mathbf{0} _3\) is the \(3 \times 3\) matrix null matrix, and the z-direction corresponds to the longitudinal direction of the beam, see Fig. 1.
From the strains and curvatures, the normal force and shear forces \(\mathbf{T} =[ T_x, T_y, T_z ]^{\text {T}}\) and bending moment and torsional moments \(\mathbf{M} =[ M_x, M_y, M_z ]^{\text {T}}\) can be determined as follows:
$$\begin{aligned} \varvec{\theta }=\mathbf{K} ^{\text {s}} \varvec{\psi } , \end{aligned}$$
(31)
with \(\varvec{\theta }=[ \mathbf{T} ^{\text {T}}, \mathbf{M} ^{\text {T}} ]^{\text {T}}\) and \(\mathbf{K} ^{\text {s}}\) representing the stiffness matrix of the beam cross section.
Analogous to Eq.(28) for a 3D beam model, the equilibrium equations for a 2.5D beam model are defined by
$$\begin{aligned} \bar{\mathbf{K }} \bar{\mathbf{u }} = \mathbf{f}, \end{aligned}$$
(32)
with
$$\begin{aligned} \bar{\mathbf{K }} = \sum _{e=1}^{N} \mathbf{k} _e^{\text {b}}, \end{aligned}$$
(33)
where the stiffness \(\mathbf{k} _e^{\text {b}},\) of the 1D beam element is computed as
$$\begin{aligned} \mathbf{k} _e^{\text {b}} = \int _{-1}^1 \left( \bar{\mathbf{B }}_e \mathbf{N} _e \right) ^{\text {T}} \mathbf{K} ^{\text {s}}_e \bar{\mathbf{B }}_e \mathbf{N} _e |\bar{\mathbf{J }}_e| \mathrm{d}\zeta _e . \end{aligned}$$
(34)
Here, \(\bar{\mathbf{K }}\) is the global stiffness matrix, \(\bar{\mathbf{u }}\) contains the nodal displacements and rotations of the beam, \(\mathbf{N} _e\) includes the interpolation functions for the beam displacements and rotations, the operator \(\mathbf{B} _e\) for each element e is given by Eq. (29), and \(|\bar{\mathbf{J }}_e|\) represents the determinant of the Jacobian matrix, with \(\bar{\mathbf{J }}_e\) expressed as
$$\begin{aligned} \bar{\mathbf{J }}_e= \left[ \begin{array}{ccc} 1 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 1 &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad {\partial z }/{\partial \zeta _e} \end{array} \right] , \end{aligned}$$
(35)
where \(\partial z/\partial \zeta _e\) is calculated from Eq. (17) using the beam interpolation functions. The derivation of the cross-sectional stiffness matrix \(\mathbf{K} ^{\text {s}}_e\) of the beam element, which appears in Eq. (34), is discussed in Sect. 3.2.2 below.
Cross-sectional stiffness
The displacements \(\mathbf{s} \) of an arbitrary point of the beam cross section can be expressed in terms of the rigid-body displacements and rotations \(\mathbf{r} \) of the cross-sectional reference point, complemented by the in-plane and out-of-plane warping displacements \(\mathbf{s} ^{\text {w}}\) associated with the deformation of the cross section, i.e.,
$$\begin{aligned} \mathbf{s} =\mathbf{Z} \mathbf{r} + \mathbf{s} ^{\text {w}} , \end{aligned}$$
(36)
with
$$\begin{aligned} \mathbf{Z} = \left[ \begin{array}{cccccc} 1 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad z &{}\quad -y \\ 0 &{}\quad 1 &{}\quad 0 &{}\quad -z &{}\quad 0 &{}\quad x \\ 0 &{}\quad 0 &{}\quad 1 &{}\quad y &{}\quad -x &{}\quad 0 \end{array} \right] , \end{aligned}$$
(37)
where x, y, and z are the coordinates of the specific location in the cross section, with x and y defined with respect to the location of the cross-sectional reference point. Using a FEM model for the cross section, the warping displacements \(\mathbf{s} ^{\text {w}}\) are discretized as
$$\begin{aligned} \mathbf{s} ^{\text {w}}=\mathbf{N} \hat{\mathbf{u }} , \end{aligned}$$
(38)
where \(\mathbf{N} \) contains the interpolation functions of the cross-sectional finite element and \(\hat{\mathbf{u }}\) represents the vector with the nodal warping displacements of the element. As will be shown below, it is convenient to isolate the partial derivative terms \(\partial / \partial z\) in the strain-displacement relation, which is done by combining \( \varvec{\epsilon }=\mathbf{B} \mathbf{s} \) with Eq. (22), resulting in
$$\begin{aligned} \varvec{\epsilon }=\hat{\mathbf{B }} \mathbf{s} + \mathbf{S} \frac{\partial \mathbf{s} }{\partial z} , \end{aligned}$$
(39)
with
$$\begin{aligned} \hat{\mathbf{B }}= \left[ \begin{array}{cccccc} \partial / \partial x &{} 0 &{} \partial / \partial y &{} 0 &{} 0 &{}0 \\ 0 &{} \partial / \partial y &{} \partial / \partial x &{} 0 &{} 0 &{}0 \\ 0 &{} 0 &{}0 &{}\partial / \partial x &{} \partial / \partial y &{}0 \end{array} \right] ^{\text {T}} , \end{aligned}$$
(40)
and
$$\begin{aligned} \mathbf{S} = \left[ \begin{array}{cccccc} 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 \end{array} \right] ^{\text {T}} . \end{aligned}$$
(41)
Substituting Eq. (38) into Eq. (36), and inserting the result into Eq. (39) leads to
$$\begin{aligned} \varvec{\epsilon }=\mathbf{S} \mathbf{Z} \left( \mathbf{T} _r + \mathbf{I} _6 \frac{\partial }{\partial z} \right) \mathbf{r} +\hat{\mathbf{B }} \mathbf{N} \hat{\mathbf{u }} + \mathbf{S} \mathbf{N} \frac{\partial \hat{\mathbf{u }}}{\partial z} , \end{aligned}$$
(42)
which uses the relation [5]
$$\begin{aligned} \hat{\mathbf{B }} \mathbf{Z} = \mathbf{S} \mathbf{Z} \mathbf{T} _r \, , \end{aligned}$$
(43)
with \(\mathbf{T} _r\) given by Eq. (30). Invoking the kinematic relation \(\varvec{\psi }=\bar{\mathbf{B }} \mathbf{r} \) with \(\bar{\mathbf{B }}\) given by Eqs. (29), (42) finally turns into
$$\begin{aligned} \varvec{\epsilon }=\mathbf{S} \mathbf{Z} \varvec{\psi } + \hat{\mathbf{B }} \mathbf{N} \hat{\mathbf{u }} + \mathbf{S} \mathbf{N} \frac{\partial \hat{\mathbf{u }}}{\partial z} . \end{aligned}$$
(44)
As a next step, the equilibrium equations for the beam cross section need to be formulated. In accordance with the variational framework presented in [3,4,5,6], equilibrium is described in terms of \(\hat{\mathbf{u }}\), \(\varvec{\psi }\) and \(\varvec{\theta }\) by the following set of partial differential equations:
$$\begin{aligned} {\left\{ \begin{array}{ll} \vspace{2mm} \mathbf{M} \displaystyle { \frac{\partial ^2 \hat{\mathbf{u }}}{\partial z^2} } + \left( \mathbf{C} -\mathbf{C} ^{\text {T}} \right) \displaystyle { \frac{\partial \hat{\mathbf{u }}}{\partial z} } + \mathbf{L} \displaystyle { \frac{\partial \varvec{\psi }}{\partial z} } - \mathbf{E} \hat{\mathbf{u }}-\mathbf{R} \varvec{\psi }=\mathbf{0} ,\\ \vspace{2mm} \mathbf{L} ^{\text {T}} \displaystyle { \frac{\partial \hat{\mathbf{u }}}{\partial z} } + \mathbf{R} ^{\text {T}}\hat{\mathbf{u }}+\mathbf{A} \varvec{\psi }=\varvec{\theta } ,\\ \vspace{2mm} \displaystyle { \frac{\partial \varvec{\theta }}{\partial z} } =\mathbf{T} _r^{\text {T}} \varvec{\theta } , \end{array}\right. } \end{aligned}$$
(45)
with
$$\begin{aligned} \begin{aligned}&\mathbf{A} =\sum _{e=1}^{N} \int _{-1}^1 \int _{-1}^1 \left( \mathbf{S} _e \mathbf{Z} _e \right) ^{\text {T}} \mathbf{Q} _e \mathbf{S} _e \mathbf{Z} _e |\hat{\mathbf{J }}_e| \mathrm{d}\xi _e \mathrm{d}\eta _e ,&\mathbf{R} =\sum _{e=1}^{N} \int _{-1}^1 \int _{-1}^1 \left( \hat{\mathbf{B }}_e \mathbf{N} _e\right) ^{\text {T}} \mathbf{Q} _e \mathbf{S} _e \mathbf{Z} _e |\hat{\mathbf{J }}_e| \mathrm{d}\xi _e \mathrm{d}\eta _e , \\&\mathbf{E} =\sum _{e=1}^{N} \int _{-1}^1 \int _{-1}^1 \left( \hat{\mathbf{B }}_e \mathbf{N} _e \right) ^{\text {T}} \mathbf{Q} _e \hat{\mathbf{B }}_e \mathbf{N} _e |\hat{\mathbf{J }}_e| \mathrm{d}\xi _e \mathrm{d}\eta _e ,&\mathbf{C} =\sum _{e=1}^{N} \int _{-1}^1 \int _{-1}^1 \left( \mathbf{S} _e \mathbf{N} _e\right) ^{\text {T}} \mathbf{Q} _e \hat{\mathbf{B }}_e \mathbf{N} _e |\hat{\mathbf{J }}_e| \mathrm{d}\xi _e \mathrm{d}\eta _e , \\&\mathbf{L} =\sum _{e=1}^{N} \int _{-1}^1 \int _{-1}^1 \left( \mathbf{S} _e \mathbf{N} _e\right) ^{\text {T}} \mathbf{Q} _e \mathbf{S} _e \mathbf{Z} _e |\hat{\mathbf{J }}_e| \mathrm{d}\xi _e \mathrm{d}\eta _e ,&\mathbf{M} =\sum _{e=1}^{N} \int _{-1}^1 \int _{-1}^1 \left( \mathbf{S} _e \mathbf{N} _e\right) ^{\text {T}} \mathbf{Q} _e \mathbf{S} _e \mathbf{N} _e |\hat{\mathbf{J }}_e| \mathrm{d}\xi _e \mathrm{d}\eta _e . \end{aligned} \end{aligned}$$
(46)
Note that the generalized loads \(\varvec{\theta }\) given by Eq. (31) are related to the stress components by \(\varvec{\theta }= \int _A \mathbf{Z} ^{\text {T}} \varvec{\sigma }_b \mathrm{d}A\), with \(\mathbf{Z} \) given by Eq. (37) and the stress \(\varvec{\sigma }_b\) presented by \(\varvec{\sigma }_b=[\sigma _{xz},\sigma _{yz},\sigma _{zz}]^{\text {T}}\). Further, the matrices \(\mathbf{A} \), \(\mathbf{R} \), \(\mathbf{E} \), \(\mathbf{C} \), \(\mathbf{L} \) and \(\mathbf{M} \) presented by Eq. (46) are determined from the FEM model at cross-sectional level. In Eq. (46), the matrix \(\mathbf{Z} _e\) is obtained from Eq. (37), whereby the x- and y-coordinates within a cross-sectional element are calculated from combining the element interpolation functions with the nodal coordinates of the element. The nodal coordinates of an arbitrary cross-sectional finite element e are computed via Eq. (16), where \(\mathbf{p} _n\) represents the nodal coordinates determined from Eq. (11), with the z-coordinate of the control points \(Z_{i,j,k}\) in Eq. (10) set to zero. Furthermore, the matrix \(\mathbf{S} _e \) is computed from Eq. (41), and \(\mathbf{Q} _e\) follows from Eq. (26), in which \(\rho _e\) refers to the relative material density in finite element e, and \(|\hat{\mathbf{J }}_e|\) is the determinant of the Jacobian matrix of the element. The Jacobian matrix has the usual form
$$\begin{aligned} \hat{\mathbf{J }}_e= \left[ \begin{array}{ccc} {\partial x}/{\partial \xi _e} &{} {\partial y}/{\partial \xi _e} &{}0 \\ {\partial x}/{\partial \eta _e} &{} {\partial y}/{\partial \eta _e} &{}0 \\ 0 &{} 0 &{}1 \end{array} \right] , \end{aligned}$$
(47)
which, by invoking Eqs. (10), (11), (16), (17), (18) and (19), can be expressed as a function of the element nodal coordinates (and thus as function of the NURBS control points):
$$\begin{aligned} \hat{\mathbf{J }}_e= \varvec{\hat{\partial }} \hat{\mathbf{p }}^{\text {T}}+\hat{\mathbf{J }}_\zeta =\bar{\mathbf{P }}_e \left( \varvec{\hat{\partial }} \mathbf{N} _e^{\text {T}} \right) +\hat{\mathbf{J }}_\zeta \quad \text {with} \quad \hat{\mathbf{J }}_\zeta =\left[ \begin{array}{ccc} 0 &{} 0 &{}0 \\ 0 &{} 0 &{}0 \\ 0 &{} 0 &{}1 \\ \end{array} \right] , \end{aligned}$$
(48)
with the derivative operator \(\varvec{\hat{\partial }}= [{\partial }/{\partial \xi _e},{\partial }/{\partial \eta _e},0]^{\text {T}}\) and the matrix \(\bar{\mathbf{P }}_e\) given by Eq. (21). After computing the inverse of the Jacobian matrix Eq. (48), the matrix \(\hat{\mathbf{B }}_e\) appearing in Eq. (46) can be developed from Eq. (40) as
$$\begin{aligned} \hat{\mathbf{B }}_e =\hat{\mathbf{B }}^1_e \frac{\partial }{\partial \xi _e} + \hat{\mathbf{B }}^2_e \frac{\partial }{\partial \eta _e} , \end{aligned}$$
(49)
where
$$\begin{aligned} \hat{\mathbf{B }}^c_e=\left[ \begin{array}{ccc} (\hat{\mathbf{J }}^{-1}_e)_{1c} &{} 0 &{} 0\\ 0 &{} (\hat{\mathbf{J }}^{-1}_e)_{2c} &{} 0\\ (\hat{\mathbf{J }}^{-1}_e)_{2c} &{} (\hat{\mathbf{J }}^{-1}_e)_{1c} &{} 0\\ 0 &{} 0 &{} (\hat{\mathbf{J }}^{-1}_e)_{1c}\\ 0 &{} 0 &{} (\hat{\mathbf{J }}^{-1}_e)_{2c}\\ 0 &{} 0 &{} 0 \end{array} \right] \quad \text {with} \quad c \in \{ 1,2 \} . \end{aligned}$$
(50)
In order to eliminate the rigid body motions and to ensure that the cross-sectional warping displacements satisfy the orthogonality conditions formulated in Ladevèze and Simmonds [16], El Fatmi [8] and Genoese et al. [10], the following constraint equations need to be satisfied:
$$ \left[ \begin{array}{cc} {\mathbf{D}} ^{\text {T}} &{} {\mathbf{0}} \\ {\mathbf{0}} &{} {\mathbf{D}} ^{\text {T} }\end{array} \right] \left[ \begin{array}{c} \hat{\mathbf{u }} \\ {\partial \hat{\mathbf{u }}}/{\partial z } \end{array} \right] = \left[ \begin{array}{c} {\mathbf{0}} \\ {\mathbf{0}} \end{array} \right] ,$$
(51)
with
$$\begin{aligned} \begin{aligned} \mathbf{D} =&\left[ \begin{array}{cccc} \mathbf{Z} _1^{\text {T}}, &{} \mathbf{Z} _2^{\text {T}}, &{} \cdots , &{} \mathbf{Z} _{n_n}^{\text {T}}\\ \end{array} \right] ^{\text {T}},\end{aligned}\end{aligned}$$
(52)
where \(n_n\) is the total number of element nodes in the FEM mesh and \(\mathbf{Z} _{n}\) is obtained by inserting the nodal coordinates of node n in Eq. (37). Formulating Eq. (45) in matrix-vector notation and incorporating the constraint relations, Eq. (51), results in the system of equilibrium equations [6]
$$\begin{aligned} \hat{\mathbf{K }} \mathbf{w} =\hat{\mathbf{f }} \Longleftrightarrow \begin{aligned} \left[ \begin{array}{cc} \mathbf{K} _{11} &{} \left( \mathbf{H} ^{\text {T}}-\mathbf{H} \right) \\ \mathbf{0} &{} \mathbf{K} _{11} \end{array} \right] \end{aligned} \begin{aligned} \left[ \begin{array}{c} \mathbf{w} _{1} \\ \mathbf{w} _{2} \end{array} \right] \end{aligned} = \begin{aligned} \left[ \begin{array}{c} \mathbf{f} _{1} \\ \mathbf{f} _{2} \end{array} \right] \end{aligned} , \end{aligned}$$
(53)
with
$$\begin{aligned} \begin{aligned} \mathbf{K} _{11}=&\left[ \begin{array}{ccc} \mathbf{E} &{} \mathbf{R} &{} \mathbf{D} \\ \mathbf{R} ^{\text {T}} &{} \mathbf{A} &{} \mathbf{0} \\ \mathbf{D} ^{\text {T}} &{} \mathbf{0} &{} \mathbf{0} \end{array} \right] \end{aligned} \quad \text {and} \quad \begin{aligned} \mathbf{H} =&\left[ \begin{array}{ccc} \mathbf{C} &{} \mathbf{L} &{} \mathbf{0} \\ \mathbf{0} &{} \mathbf{0} &{} \mathbf{0} \\ \mathbf{0} &{} \mathbf{0} &{} \mathbf{0} \end{array} \right], \end{aligned} \end{aligned}$$
(54)
where \(\mathbf{w} _1=[ \hat{\mathbf{u }}^{\text {T}}, \varvec{\psi }^{\text {T}}, \varvec{\lambda }_1^{\text {T}} ]^{\text {T}}\) and \(\mathbf{w} _2= [ \partial \hat{\mathbf{u }}^{\text {T}} / \partial z, \partial \varvec{\psi }^{\text {T}} / \partial z, \varvec{\lambda }_2^{\text {T}} ]^{\text {T}}\), are the solution vectors, in which \(\varvec{\lambda }_1\) and \(\varvec{\lambda }_2\) are Langrange multipliers that relate to the constraint equations, Eq. (51). In addition, the force vectors are formulated as \(\mathbf{f} _1=[ \mathbf{0} ^{\text {T}}, \varvec{\theta }^{\text {T}}, \mathbf{0} ^{\text {T}} ]^{\text {T}}\) and \(\mathbf{f} _2=[ \mathbf{0} ^{\text {T}}, ( \mathbf{T} _r^{\text {T}} \varvec{\theta } )^{\text {T}}, \mathbf{0} ^{\text {T}} ]^{\text {T}}\), the matrices \(\mathbf{A} \), \(\mathbf{R} \), \(\mathbf{E} \), \(\mathbf{C} \), \(\mathbf{L} \) can be calculated from Eq. (46), and the matrix \(\mathbf{D} \) is presented by Eq. (52).
For computational convenience, a \(6 \times 6\) matrix \(\mathbf{W} \) is constructed by column-wise assembling the solutions of Eq. (53) for 6 different right-hand sides, which are distinguished by successively setting one specific entry of \(\varvec{\theta }\) to unity and the remaining 5 entries to zero. Accordingly, for an arbitrary force vector \(\varvec{\theta }\), with the definition of \(\varvec{\theta }\) given below Eq. (31), the solution vector \(\mathbf{w} =[\mathbf{w} _1, \mathbf{w} _2]^{\text {T}}\) can be straightforwardly computed as
$$\begin{aligned} \mathbf{w} =\mathbf{W} \varvec{\theta } . \end{aligned}$$
(55)
In addition, by equating the external complementary virtual work to the internal complementary virtual work, the compliance matrix \(\mathbf{F} _{\text{s}}\) of the cross section follows as [6]
$$\begin{aligned} \mathbf{F} _{\text{s}}=\mathbf{W} ^{\text {T}} \begin{aligned} \left[ \begin{array}{cc} \mathbf{G} _{11} &{} \mathbf{H} ^{\text {T}}\\ \mathbf{H} &{} \mathbf{G} _{22} \end{array} \right] \end{aligned} \mathbf{W} =\mathbf{W} ^{\text {T}} \mathbf{G} \mathbf{W} , \end{aligned}$$
(56)
with
$$\begin{aligned} \begin{aligned} \mathbf{G} _{11}=&\left[ \begin{array}{ccc} \mathbf{E} &{} \mathbf{R} &{} \mathbf{0} \\ \mathbf{R} ^{\text {T}} &{} \mathbf{A} &{} \mathbf{0} \\ \mathbf{0} &{} \mathbf{0} &{} \mathbf{0} \end{array} \right] \end{aligned} \text {and} \quad \begin{aligned} \mathbf{G} _{22}=&\left[ \begin{array}{ccc} \mathbf{M} &{} \mathbf{0} &{} \mathbf{0} \\ \mathbf{0} &{} \mathbf{0} &{} \mathbf{0} \\ \mathbf{0} &{} \mathbf{0} &{} \mathbf{0} \end{array} \right], \end{aligned} \end{aligned}$$
(57)
where the matrices \(\mathbf{A} \), \(\mathbf{R} \), \(\mathbf{E} \), \(\mathbf{M} \) are provided by Eq. (46), and the matrix \(\mathbf{H} \) is given by Eq. (54). Finally, the stiffness matrix of the element cross section used in Eq. (31) can be calculated via \(\mathbf{K} ^{\text {s}}=\mathbf{F} _{\text{s}}^{-1}\), with \(\mathbf{F} _{\text{s}}\) in accordance with Eq. (56).