In this work, the electromechanically coupled beam dynamics is approximated within the constrained discrete variational scheme with the null space projection. The Lagrange–d’Alembert principle in Eq. (
14) can be extended to constrained systems by enforcing the constraints via Lagrange multipliers as
$$\begin{aligned}&\delta \int _{0}^{T} \left[ L( {\mathbf {q}}, \dot{{\mathbf {q}}}) - {\mathbf {g}}^T({\mathbf {q}})\cdot \varvec{\lambda }\right] dt \nonumber \\&\quad + \int _{0}^{T}{\mathbf {f}}^{\mathrm{ext}}( t) \cdot \delta {\mathbf {q}}dt=0, \end{aligned}$$
(63)
where
\({\mathbf {q}}\) is the configuration,
\(L( {\mathbf {q}}, \dot{{\mathbf {q}}})\) is the Lagrangian,
\({\mathbf {g}}\) represents holonomic constraints,
\(\varvec{\lambda }\) is the Lagrangian multiplier and
\({\mathbf {f}}^{\mathrm{ext}}(t)\) is the external force. By considering the electrical effect in geometrically exact beam, the electric potential
\(\phi _o\) and the incremental variables
\((\alpha , \beta )\) in Eq. (
45) are treated as the electrical degrees of freedom
\(\varvec{\phi }=\begin{bmatrix} \phi _o&\alpha&\beta \end{bmatrix}\) such that the configuration of the beam model is extended to
$$\begin{aligned} {\mathbf {q}}=\begin{bmatrix} \varvec{\varphi }&{\mathbf {d}}_1&{\mathbf {d}}_2&{\mathbf {d}}_3&\varvec{\phi }\end{bmatrix}^T. \end{aligned}$$
(64)
According to the kinematic assumptions in geometrically exact beams, the directors have to fulfill the orthogonal constraints
$$\begin{aligned} {\mathbf {g}}( {\mathbf {q}})=\begin{bmatrix} \frac{1}{2}({\mathbf {d}}_1^T {\mathbf {d}}_1-1) \\ \frac{1}{2}({\mathbf {d}}_2^T {\mathbf {d}}_2-1)\\ \frac{1}{2}({\mathbf {d}}_3^T {\mathbf {d}}_3-1) \\ {\mathbf {d}}_1^T{\mathbf {d}}_2\\ {\mathbf {d}}_1^T{\mathbf {d}}_3\\ {\mathbf {d}}_2^T{\mathbf {d}}_3 \end{bmatrix}={\mathbf {0}}. \end{aligned}$$
(65)
The continuous Lagrangian contains the difference between the kinetic energy
\(T(\dot{{\mathbf {q}}}) \) and the internal potential energy
\(V({\mathbf {q}})\)$$\begin{aligned} L({\mathbf {q}}, \dot{{\mathbf {q}}})= T(\dot{{\mathbf {q}}}) -V({\mathbf {q}}). \end{aligned}$$
(66)
Since the electrical variables do not contribute to the kinetic energy, the kinetic energy for geometrically exact beams is computed as
$$\begin{aligned} T= \int _c \left( \frac{1}{2} A_{\rho } \left| \dot{\varvec{\varphi }} \right| ^2 + \frac{1}{2} \sum _{i=1}^{2} M^i_{\rho }\left| \dot{{\mathbf {d}}}_i \right| ^2 \right) ds, \end{aligned}$$
(67)
where
\(A_{\rho }\) is the mass density per reference arc-length and
\(M^i_{\rho }\) are the principle mass moments of inertia of cross section. In accordance with the configuration defined in Eq. (
64), the component of the consistent mass matrix corresponding to the electrical degree of freedom
\(\varvec{\phi }\) will be zero.
For the coupled hyperelastic material in DEA, the internal potential energy is computed by an integration of the beam strain energy density
\( \Omega _b\) in Eq. (
62) over the beam center line
$$\begin{aligned} V({\mathbf {q}}) = \int _c \Omega _b (s) ds. \end{aligned}$$
(68)
The external force
\({\mathbf {f}}^{\mathrm{ext}}\) contains all non-conservative forces, such as the viscoelastic effect in this work. Based on the Kelvin–Voigt model in Eq. (
61), the non-conservative work contributed by the viscoelastic effect is given by
$$\begin{aligned} W^{\mathrm{vis}}=\int _{B_0} {\mathbf {P}}^{\mathrm{vis}}: {\mathbf {F}}dV, \end{aligned}$$
(69)
where the work is computed from the two conjugate quantities being the first Piola–Kirchhoff stress
\({\mathbf {P}}^{\mathrm{vis}}\) from the Kelvin–Voigt model and the deformation gradient
\({\mathbf {F}}\). In this case, the external force corresponding to the viscoelastic effect can be formulated as
$$\begin{aligned} {\mathbf {f}}^{\mathrm{vis}}({\mathbf {q}},\dot{{\mathbf {q}}})=\frac{\partial W^{\mathrm{vis}}}{\partial {\mathbf {q}}}&= \int _{B_0} \frac{\partial W^{\mathrm{vis}}}{\partial {\mathbf {F}} } : \frac{\partial {\mathbf {F}}}{\partial {\mathbf {q}} } dV \nonumber \\&= \int _c \int _{\Sigma } {\mathbf {P}}^{\mathrm{vis}}: \frac{\partial {\mathbf {F}}}{\partial {\mathbf {q}} }dAds. \end{aligned}$$
(70)
The beam is first spatially discretized with the 1D finite elements, where one-dimensional Lagrange-type linear shape functions are applied in the discretization of beam configuration
\({\mathbf {q}}\) in Eq. (
64). In this case, the beam directors are directly discretized in space together with the beam centroids, see [
22] for instance. Then the variational integration scheme, see e.g. [
16], is applied to temporally discretize the action of the dynamic system, by which the good long term energy behavior can be obtained. In the variational integration scheme, the action integral within the time interval
\((t_n,t_{n+1})\) is approximated with the discrete Lagrangian
\(L_d\) as
$$\begin{aligned}&\int _{t_n}^{t_{n+1}} L({\mathbf {q}}, \dot{{\mathbf {q}}})dt \approx L_d({\mathbf {q}}_n,{\mathbf {q}}_{n+1}) \nonumber \\&\quad = \Delta t L(\frac{{\mathbf {q}}_{n+1}+{\mathbf {q}}_n}{2},\frac{{\mathbf {q}}_{n+1}-{\mathbf {q}}_n}{\Delta t}), \end{aligned}$$
(71)
where the discrete Lagrangian
\(L_d\) is computed by applying the finite difference approximation to the velocity
\(\dot{{\mathbf {q}}}\) and the midpoint rule to the configuration
\({\mathbf {q}}\), i.e.
$$\begin{aligned} \dot{{\mathbf {q}}}\approx \frac{{\mathbf {q}}_{n+1}-{\mathbf {q}}_n}{\Delta t}, \;\;\;\;\; {\mathbf {q}}\approx \frac{{\mathbf {q}}_{n+1}+{\mathbf {q}}_n}{2} . \end{aligned}$$
(72)
After the temporal discretization, the discrete Euler–Lagrange equations can be obtained by taking the variation of the discrete action and requiring stationarity. To eliminate the constraint forces
\(\varvec{\lambda }\) from the system, see e.g. [
6], the nodal reparametrization
\({\mathbf {q}}_{n+1} = {\mathbf {F}}_d ({\mathbf {u}}_{n+1}, {\mathbf {q}}_{n})\) and the discrete null space matrix
\({\mathbf {P}}_d\) are applied to the discrete Euler–Lagrange equations leading to
$$\begin{aligned}&{\mathbf {P}}_d^T({\mathbf {q}}_n) \left[ \frac{\partial L_d({\mathbf {q}}_{n-1}, {\mathbf {q}}_{n})}{\partial {\mathbf {q}}_{n}} \right. \nonumber \\&\quad \left. +\, \frac{\partial L_d\left( {\mathbf {q}}_{n}, {\mathbf {F}}_d ({\mathbf {u}}_{n+1}, {\mathbf {q}}_{n})\right) }{\partial {\mathbf {q}}_{n}} + {\mathbf {f}}_n^{\mathrm{ext-}} + {\mathbf {f}}_{n-1}^{\mathrm{ext+}} \right] = {\mathbf {0}}, \end{aligned}$$
(73)
where
\({\mathbf {u}}_{n+1}\) is the generalized configuration acting as the unknown variable,
\({\mathbf {f}}_n^{\mathrm{ext-}}\) and
\({\mathbf {f}}_{n-1}^{\mathrm{ext+}}\) are the discrete generalized external forces evaluated as
$$\begin{aligned}&{\mathbf {f}}_n^{\mathrm{ext-}}=\frac{\Delta t}{2} {\mathbf {f}}^{\mathrm{vis}} \left( \frac{{\mathbf {q}}_{n+1}+{\mathbf {q}}_n}{2},\frac{{\mathbf {q}}_{n+1} -{\mathbf {q}}_n}{\Delta t}\right) ,\nonumber \\&{\mathbf {f}}_{n-1}^{\mathrm{ext+}}=\frac{\Delta t}{2} {\mathbf {f}}^{\mathrm{vis}} \left( \frac{{\mathbf {q}}_{n-1}+{\mathbf {q}}_n}{2},\frac{{\mathbf {q}}_{n-1} -{\mathbf {q}}_n}{\Delta t}\right) . \end{aligned}$$
(74)