Introduction

The simulation of the musculoskeletal system is of great interest in a variety of fields, e.g., in the study of human movements, the design of effective treatments after injuries and the design of ergonomic workplaces. Consequently, strong efforts are currently being made towards the development of realistic digital human models, and the first corresponding software packages are available now. Here we mention among others the commercial packages AnyBodyFootnote 1 and Biomechanics of Bodies,Footnote 2 and the open-source packages OpenSimFootnote 3 and MSMS.Footnote 4

In such models, the skeleton is typically represented by a rigid multibody system. This is a widely accepted assumption due to the large differences in stiffness of hard bone tissue and soft muscle tissue. Concerning the modeling of the muscles, the state-of-the-art is the use of muscle models that date back to the early work of Hill [8]. These models are computationally cheap but may lack realism in simulations. In particular, the mass is not accounted for, which led to the introduction of so-called wobbling masses [5]. Detailed three-dimensional muscle models from continuum mechanics, on the other hand, are prohibitively expensive in a multibody context.

For these reasons, we introduce here a new muscle model that features mass, shape and elasticity and which is at the same time computationally attractive. The key idea is based on a one-dimensional cable structure that incorporates large deformation and thickness change. Such a fiber-based model may represent a complete muscle or it can be bundled with other fibers in order to mimic the real composition of muscles. Its spatial discretization requires much fewer degrees of freedom than a three-dimensional approach, and in this way the fiber-based model balances the need for more realism with computational efficiency.

Before further proceeding in this direction, we summarize the state-of-the-art in digital human modeling and related fields. Looking at Hill-type muscles in more detail, we observe that the muscle paths are often assumed to be the straight line between the muscle origin and the insertion point. In order to account for a more realistic geometry, the muscle paths can be enhanced by so-called via points [1, 3, 10, 19]. Another possibility to enhance the fidelity is to consider wrapping surfaces. Then the surfaces of the bones and other structures are additionally modeled and define constraints for the muscle paths. This approach leads to a shortest distance problem between the origin and the insertion point considering the wrapping surfaces as constraints [4, 13, 22]. Mechanically, Hill-type approaches represent line of action models where the material properties of the muscle–tendon complex are represented by lumped parameter systems [33]. For further studies on Hill-type muscles, we refer to [6, 14, 15, 27, 30, 31]

High fidelity models of muscles are based on nonlinear continuum mechanics. They are able to represent three-dimensional geometry, spatially varying features, the multiscale architecture of muscles, and multiphysics effects [2, 18, 26]. However, the increased modeling complexity and computational cost pose restrictions on the usability of continuum mechanics models. Therefore, many research works on continuum-mechanical models focus on specific aspects in single muscles, e.g., the mechanical behavior of tendon tissue [12], the effect of micromechanical features on the overall mechanics [24, 25], or the extension of continuum-mechanical models to include chemo-electro-physiological aspects [7, 17]. The coupling of microvibrations and macroscale deformation, which is an emerging topic in today’s orthopedic therapies, is discussed in [29]. While investigating these effects in isolation is important, the ultimate goal is to conduct high fidelity simulations of the musculoskeletal system as a whole.

In the present paper, we model a muscle as a three-dimensional continuum located around a one-dimensional curve in space. Starting from this geometric setting, we derive a one-dimensional cable model that incorporates large deformation and thickness change. The total stress tensor is additively decomposed into a passive, an active and a prestress contribution. In order to model the passive response, an incompressible Kelvin–Voigt material law for finite strains is used. The active stress contribution is modeled by the relations given in [18]. Considering the coupling of the skeleton and the muscles at the insertion points, we use classical rigid body coordinates for the bones and absolute displacement coordinates for the cable degrees of freedom. Thus there is no floating reference, as opposed to the typical approaches in flexible multibody dynamics [23, 28]. Instead, the large deformation model includes the rigid body modes directly. Furthermore, the contact dynamics on the lateral surface of the muscles and the rigid bodies are taken into account.

The paper is organized as follows. Based on nonlinear 3D continuum mechanics, we derive a cable model incorporating large deformations, incompressible hyper-elastic and viscous material response, prestressing, active stresses and thickness change of the cross-section in Sect. 2. In addition, the contact between two fibers is formulated by means of a penalty approach. In Sect. 3 we introduce a flexible multibody system framework and describe the coupling between the fibers and the rigid bodies. The discretization in space and a subsequent discretization in time of the governing equations are performed in Sect. 4. Furthermore, in this section we discuss the numerical treatment of the contact mechanics and present a safeguard algorithm in order to solve the nonlinear system of equations in an robust way. Numerical results of four examples are given in Sect. 5. While the first three examples serve as code verification examples, a simple upper limb model is simulated in the last example. Conclusions are drawn in Sect. 6.

Fiber-based model of skeletal muscle

In this section, we derive the fiber-based model, starting with the standard nonlinear equations of motion of a visco-elastic solid. To that end, we introduce additional kinematic and kinetic assumptions according to a cable model. In the next step, the weak formulation of the governing equations is stated. Finally, the contact between two fibers is formulated by means of a penalty approach.

Fundamentals of continuum mechanics

We model the homogenized muscle–tendon complex by means of continuum mechanics. Thus, the motion of a muscle is governed by the nonlinear elasticity problem. Let \({V_{0}}\subset \mathbb{R}^{3}\) be the initial configuration occupied by a muscle at the beginning of the simulation. We are interested in the deformation at all times \(t\in [0,T]\), where \(T>0\) is the simulation end time. For a material point \(\mathbf{X} \in {V_{0}}\), its position \(\mathbf{x}(\mathbf{X},t)\) in the deformed configuration \({V_{t}}\) is expressed in terms of a displacement vector field \(\mathbf{u}:{V_{0}}\times [0, T] \rightarrow \mathbb{R}^{3}\) such that

$$ \mathbf{x}(\mathbf{X},t) = \mathbf{X} + \mathbf{u}(\mathbf{X},t). $$
(1)

With these definitions, the deformation gradient \(\mathbf{F}: {V_{0}}\times [0, T] \rightarrow \mathbb{R}^{3}\otimes \mathbb{R}^{3}\) is defined by

$$ \mathbf{F} = \nabla _{X} \mathbf{x}(\mathbf{X},t) = \mathbf{I} + \nabla _{X} \mathbf{u}(\mathbf{X},t), $$
(2)

where \(\nabla _{X}\) is the gradient operator with respect to the initial configuration \({V_{0}}\) and \(\mathbf{I}\) the second order identity tensor. In the following we also use the right Cauchy–Green deformation tensor \(\mathbf{C}: {V_{0}}\times [0, T] \rightarrow \mathbb{R}^{3}\otimes \mathbb{R}^{3}\) defined by \(\mathbf{C} = \mathbf{F}^{\top }\mathbf{F}\). The motion of the muscle is governed by the linear balance of momentum, which reads in Lagrangian form

$$ \text{Div} (\mathbf{F} \cdot \mathbf{S}) + \mathbf{b}_{0} = \rho _{0} \ddot{\mathbf{u}}. $$
(3)

Here, \(\mathbf{S}:{V_{0}}\times [0, T] \rightarrow \mathbb{R}^{3}\otimes \mathbb{R}^{3}\) is the second Piola–Kirchhoff stress tensor, \(\mathbf{b}_{0}:{V_{0}}\rightarrow \mathbb{R}^{3}\) the body force acting on the volume of the muscle, and \(\rho _{0}:{V_{0}}\rightarrow \mathbb{R}\) the mass density. Furthermore, \(\ddot{\mathbf{u}}\) is the second time derivative of the displacement field.

We assume that the second Piola–Kirchhoff stress tensor can be additively decomposed into a passive, an active, and a prestress part,

$$ \mathbf{S} = \mathbf{S}^{p} + \mathbf{S}^{a} + \mathbf{S}^{pre}. $$
(4)

In the present paper, the passive contribution is determined by an incompressible visco-elastic Kelvin–Voigt material response [32]

$$ \begin{aligned} \mathbf{S}^{p} &= p \, \mathbf{C}^{-1} + \sum _{i=M,\,T} f^{i}(\gamma ^{M}) \left [\mu ^{i} \left (\mathbf{I} - \frac{1}{3}\mathbf{C}^{-1} \text{tr}\mathbf{C}\right ) + \eta ^{i} \,\mathbf{C}^{-1}\, \dot{\mathbf{C}} \, \mathbf{C}^{-1}\right ], \end{aligned} $$
(5)

with \(f^{M}(\gamma ^{M}) = \gamma ^{M}\) and \(f^{T}(\gamma ^{M}) = 1- \gamma ^{M}\). The function \(\gamma ^{M}:{V_{0}}\rightarrow [0,1]\) distinguishes between muscle (M) and tendon (T) material. The material parameters \(\mu ^{i}\in \mathbb{R}\) and \(\eta ^{i}\in \mathbb{R}\) with \(i = M,T\) are the shear modulus and viscosity, respectively. Furthermore, \(p:{V_{0}}\rightarrow \mathbb{R}\) is the volumetric stress response, which is not determined by the material law, due to the assumption of an incompressible material. For the active part, we follow [18] and use

(6)

where \(\alpha :[0,T]\rightarrow \mathbb{R}\) is the activation parameter, \(\lambda _{f}:{V_{0}}\times [0,T] \rightarrow \mathbb{R}\) is the fiber stretch, \(S_{max}\in \mathbb{R}\) is the maximal stress which can be produced at the optimal fiber stretch \(\lambda _{f}^{opt}\in \mathbb{R}\), \(\mathbf{M}\in {V_{0}}\rightarrow \mathbb{R}^{3}\otimes \mathbb{R}^{3}\) is defined by the dyadic product of the fiber direction in the initial configuration [9], and the parameters \(\nu \in \mathbb{R}\), \(\Delta W\in \mathbb{R}\) influence the shape of the active response function. Finally, the prestress \(\mathbf{S}^{pre}\) in (4) is assumed to be self-equilibrated, i.e., \(\text{Div} (\mathbf{F} \cdot \mathbf{S}^{pre}) = 0\) in the initial configuration \({V_{0}}\). In order to set up an initial-boundary value problem, the field equations above are supplemented by homogeneous initial conditions and boundary conditions on \(\Gamma _{0} = \partial {V_{0}}\). In the present paper we assume that the muscles are at rest at simulation start \(t=0\), i.e., the initial conditions read

$$ \begin{aligned} \mathbf{u}(\mathbf{X},0) = 0 \quad \text{and} \quad \dot{\mathbf{u}}( \mathbf{X},0) = 0\quad \text{for} \quad \mathbf{X} \in {V_{0}}. \end{aligned} $$
(7)

The displacement boundary conditions for a single muscle fiber are

$$ \begin{aligned} \mathbf{u}(\mathbf{X},t) = \hat{\mathbf{u}}(\mathbf{X},t) \text{ for } X \in \Gamma _{0}^{D}. \end{aligned} $$
(8)

Here, \(\hat{\mathbf{u}}: \Gamma _{0}^{D}\times [0,T] \rightarrow \mathbb{R}^{3}\) is a given displacement field on the Dirichlet boundary \(\Gamma _{0}^{D}\). In order to state the Neumann boundary conditions, we introduce the Cauchy traction \({\mathbf{t}}: \Gamma _{0}\times [0,T] \rightarrow \mathbb{R}^{3}\) on the boundary

$$ \begin{aligned} \mathbf{t} = \frac{1}{\det \mathbf{F}}\mathbf{F} \cdot \mathbf{S} \cdot \mathbf{n}_{0}, \end{aligned} $$
(9)

with \(\mathbf{n}_{0}:\Gamma _{0} \rightarrow \mathbb{R}^{3}\) being the unit exterior vector normal to the boundary surface \(\Gamma _{0}\). Then, the traction boundary condition states

$$ \begin{aligned} \mathbf{t}(\mathbf{X},t) = \hat{\mathbf{t}}(\mathbf{X},t) \text{ for } X \in \Gamma _{0}^{N}, \end{aligned} $$
(10)

where \(\hat{\mathbf{t}}: \Gamma _{0}^{N}\times [0,T] \rightarrow \mathbb{R}^{3}\) is the given traction vector on the Neumann boundary \(\Gamma ^{N}_{0}\).

Cable model for muscle fiber

In this section a cable model for the continuum mechanics setting introduced above is developed. To this end, we introduce the parameter domain \(P=[0,1]\times [0,1]\times [0,2\pi ]\) with the cable radius \(r\) and assume that the initial configuration \({V_{0}}\) of one muscle is parametrized by \(\mathbf{X}^{3D}: P \rightarrow {V_{0}}\) with

$$ \mathbf{X}^{3D}(\theta ^{1},\theta ^{2},\theta ^{3}) = \mathbf{X}( \theta ^{1}) + \, \left (\phi _{1}(\theta ^{2},\theta ^{3}) \mathbf{B}( \theta ^{1}) + \phi _{2}(\theta ^{2},\theta ^{3})\, \mathbf{N}(\theta ^{1}) \right )r_{0}(\theta ^{1}), $$
(11)

where \(\mathbf{X}(\theta ^{1}): [0,1] \rightarrow {\Omega _{0}}\) is a parametrization of the initial centerline curve \({\Omega _{0}}\), \(\mathbf{N}:[0,1] \rightarrow \mathbb{R}^{3}\) and \(\mathbf{B}:[0,1] \rightarrow \mathbb{R}^{3}\) are the normal vector and the binormal vector to \({\Omega _{0}}\) defined by

$$ \begin{aligned} \mathbf{B}(\theta ^{1}) = \frac{\mathbf{X}_{,\theta ^{1}} \times \mathbf{X}_{,\theta ^{1}\theta ^{1}}}{||\mathbf{X}_{,\theta ^{1}} \times \mathbf{X}_{,\theta ^{1}\theta ^{1}}||}, \qquad \mathbf{N}(\theta ^{1}) = \frac{\mathbf{X}_{,\theta ^{1}} \times \mathbf{B}}{||\mathbf{X}_{,\theta ^{1}} \times \mathbf{B}||}, \end{aligned} $$
(12)

and \(r_{0}:[0,1]\rightarrow \mathbb{R}\) is the initial radius of the cross-section. Furthermore, \(\mathbf{X}_{,\theta ^{1}}\) and \(\mathbf{X}_{,\theta ^{1}\theta ^{1}}\) denote the first and second derivative with respect to \(\theta ^{1}\). The shape of the cross-section is described by \(\phi _{1},\,\phi _{2}:[0,1]\times [0,2\pi ]\rightarrow \mathbb{R}\). In the present paper we consider only circular cross-sections by setting

$$ \begin{aligned} \phi _{1}(\theta ^{2},\theta ^{3}) = \theta ^{2} \cos (\theta ^{3}), \\ \phi _{2}(\theta ^{2},\theta ^{3}) = \theta ^{2} \sin (\theta ^{3}). \end{aligned} $$
(13)

The current configuration \({V_{t}}\) is parametrized by \(\mathbf{x}^{3D}: P \rightarrow {V_{t}}\) as

$$ \mathbf{x}^{3D}(\theta ^{1},\theta ^{2},\theta ^{3}) = \mathbf{x}( \theta ^{1}) + \left (\phi _{1}(\theta ^{2},\theta ^{3})\, \mathbf{b}( \theta ^{1}) + \phi _{2}(\theta ^{2},\theta ^{3})\, \mathbf{n}(\theta ^{1}) \right )r(\theta ^{1}), $$
(14)

where \(\mathbf{x}(\theta ^{1}): [0,1] \rightarrow {{{\Omega }}}\) is a parametrization of the deformed centerline curve \({\Omega }\), and \(r:[0,1]\rightarrow \mathbb{R}\) is the current radius of the cross-section. The normal vector \(\mathbf{n}(\theta ^{1})\) and the binormal vector \(\mathbf{b}(\theta ^{1})\) are defined analogously to (12). Thus, the base vectors \(\mathbf{G}_{i}=\frac{\partial \mathbf{X}^{3D}}{\partial \theta ^{i}}\) with \(i=1,2,3\) are given for the initial configuration by

$$ \begin{aligned} \mathbf{G}_{1} &= \mathbf{A}_{1} + r_{0}(\phi _{1} \mathbf{B}_{,\theta ^{1}} + \phi _{2} \mathbf{N}_{,\theta ^{1}}) + r_{0,\theta ^{1}}(\phi _{1} \mathbf{B} + \phi _{2} \mathbf{N}) \\ &= \mu _{0} \, \mathbf{A}_{1} + r_{0}\varphi _{0} \, (\phi _{1} \mathbf{N} - \phi _{2}\mathbf{B}) + r_{0,\theta ^{1}}(\phi _{1} \mathbf{B} + \phi _{2} \mathbf{N}), \\ \mathbf{G}_{2} &= r_{0}(\phi _{1,\theta ^{2}} \mathbf{B} + \phi _{2, \theta ^{2}} \mathbf{N}), \\ \mathbf{G}_{3} &= r_{0}(\phi _{1,\theta ^{3}} \mathbf{B} + \phi _{2, \theta ^{3}} \mathbf{N}), \end{aligned} $$

with \(\mu _{0} = 1 - \theta ^{2}\kappa _{0}\sin \theta ^{3}\), where \(\kappa _{0} = \mathbf{A}_{1,\theta ^{1}} \cdot \mathbf{N}\) is the curvature, and \(\varphi _{0} = \mathbf{B}_{,\theta ^{1}} \cdot \mathbf{N}\) the torsion. Furthermore, \(\mathbf{A}_{1} = \mathbf{X}_{,\theta ^{1}}\) is the tangent vector to the centerline curve in the initial configuration. Therefore, the components of the metric tensor \(G_{ij}=\mathbf{G}_{i} \cdot \mathbf{G}_{j}\) are

$$ \renewcommand{\arraystretch}{1.5} \begin{bmatrix} G_{11} & G_{12} & G_{13} \\ & G_{22} & G_{23} \\ sym & & G_{33} \end{bmatrix} = \begin{bmatrix} (\mu _{0})^{2} \mathbf{A}_{1} \cdot \mathbf{A}_{1} + \left ((r_{0} \varphi _{0})^{2}+(r_{0,\theta ^{1}})^{2}\right )(\theta ^{2})^{2} & \theta ^{2} r_{0,\theta ^{1}} r_{0} & r_{0}^{2}( \theta ^{2})^{2} \varphi _{0} \\ & r_{0}^{2} & 0 \\ sym & & r_{0}^{2} (\theta ^{2})^{2} \end{bmatrix} . $$
(15)

Due to (14), the base vectors in the current configuration are

$$ \begin{aligned} \mathbf{g}_{1} &= \mathbf{a}_{1} + r (\phi _{1} \mathbf{b}_{,\theta ^{1}} + \phi _{2} \mathbf{n}_{,\theta ^{1}}) + r_{,\theta ^{1}}(\phi _{1} \mathbf{b} +\phi _{2}\mathbf{n}) \\ &= \mu \, \mathbf{a}_{1} + r \varphi (\phi _{1} \mathbf{n} - \phi _{2} \mathbf{b}) + r_{,\theta ^{1}}(\phi _{1}\mathbf{b} +\phi _{2}\mathbf{n}), \\ \mathbf{g}_{2} &= r\,(\phi _{1,\theta ^{2}} \mathbf{b} + \phi _{2, \theta ^{2}} \mathbf{n}), \\ \mathbf{g}_{3} &= r\,(\phi _{1,\theta ^{3}} \mathbf{b} + \phi _{2, \theta ^{3}} \mathbf{n}), \end{aligned} $$
(16)

with \(\mu = 1 - \theta ^{2}\kappa \sin \theta ^{3}\), \(\kappa = \mathbf{a}_{1,\theta ^{1}} \cdot \mathbf{n}\), and \(\varphi = \mathbf{b}_{,\theta ^{1}} \cdot \mathbf{n}\). Furthermore, \(\mathbf{a}_{1} = \mathbf{x}_{,\theta ^{1}}\) is the tangent vector to the centerline in the current configuration. Thus, the components of the metric are given by

$$ \renewcommand{\arraystretch}{1.5} \begin{bmatrix} g_{11} & g_{12} & g_{13} \\ & g_{22} & g_{23} \\ sym & & g_{33} \end{bmatrix} = \begin{bmatrix} \mu ^{2} \mathbf{a}_{1} \cdot \mathbf{a}_{1} + (r^{2}\varphi ^{2}+(r_{, \theta ^{1}})^{2})(\theta ^{2})^{2} & \theta ^{2} r_{, \theta ^{1}} r & r^{2}(\theta ^{2})^{2} \varphi \\ & r^{2} & 0 \\ sym & & r^{2}(\theta ^{2})^{2} \end{bmatrix} . $$
(17)

The volume elements are given by the determinants of the respective metric coefficient matrices,

$$\begin{gathered} \begin{aligned} \det ([G_{ij}]) &= G_{11}\,G_{22}\,G_{33}-G_{22}\,(G_{13})^{2}-G_{33} \,(G_{12})^{2} =(\mu _{0})^{2} ||\mathbf{A}_{1}||^{2}r_{0}^{4}(\theta ^{2})^{2}, \end{aligned} \end{gathered}$$
(18)
$$\begin{gathered} \begin{aligned} \det ([g_{ij}]) &= g_{11}\,g_{22}\,g_{33}-g_{22}\,(g_{13})^{2} - g_{33} \,(g_{12})^{2} = \mu ^{2} ||\mathbf{a}_{1}||^{2} r^{4}(\theta ^{2})^{2}. \end{aligned} \end{gathered}$$
(19)

Next, we formulate the incompressibility constraint on the cross-section level. This reads

$$ \begin{aligned} \int _{\theta ^{3}=0}^{2\pi } \int _{\theta ^{2}=0}^{1} \sqrt{\det ([G_{ij}])} \, \text{d}\theta ^{2} \text{d}\theta ^{3} = \int _{\theta ^{3}=0}^{2 \pi } \int _{\theta ^{2}=0}^{1} \sqrt{\det ([g_{ij}])} \, \text{d} \theta ^{2} \text{d}\theta ^{3}. \end{aligned} $$
(20)

Inserting (18) and (19), we immediately obtain the relation

$$ \begin{aligned} r = \sqrt{\frac{||\mathbf{A}_{1}||}{||\mathbf{a}_{1}||}} r_{0}. \end{aligned} $$
(21)

This relation can be interpreted as follows. The expression \(\frac{||\mathbf{a}_{1}||}{||\mathbf{A}_{1}||}\) is the ratio of the lengths of the tangent vectors to the centerline curves in the initial and the current configurations and therefore represents the stretch of the centerline curve. In case of an elongation of the centerline curve, the cross-section is supposed to shrink. Therefore, the inverse of the stretch appears in (21). Due to circular cross-sections, the area scales quadratically with the radius. This leads to the square root in (21). Furthermore, we note that, once the tangent vector in the current configuration \(\mathbf{a}_{1}\) is known, the radius of the circular cross-section in the current configuration can be computed.

Passive stress response

In order to proceed with the passive stress response in local coordinates, we introduce some more notation. The dual basis vectors to \(\mathbf{G}_{i}\) are denoted by \(\mathbf{G}^{j}\) and fulfill

$$ \mathbf{G}_{i} \cdot \mathbf{G}^{j} = \textstyle\begin{cases} 0 \quad {\text{for } i\neq j,} \\ 1 \quad {\text{for } i=j.} \end{cases} $$
(22)

Furthermore, the contravariant coefficients of the metric are \(G^{ij} = \mathbf{G}^{i} \cdot \mathbf{G}^{j}\).

The right Cauchy–Green deformation tensor is given in local coordinates as \(\mathbf{C} = \sum _{i=1}^{3}\sum _{j=1}^{3} g_{ij} \, \mathbf{G}^{i} \otimes \mathbf{G}^{j}\), whereas the inverse tensor is given by \(\mathbf{C}^{-1} =\sum _{i=1}^{3}\sum _{j=1}^{3} g^{ij} \,\mathbf{G}_{i} \otimes \mathbf{G}_{j}\). The trace is given by \(\text{tr}\mathbf{C} = \sum _{i=1}^{3}\sum _{j=1}^{3} G^{ij}g_{ij}\). In the present model, we assume that the radii \(r_{0}(\theta ^{1})\) as well as \(r(\theta ^{1})\) do not vary rapidly along the muscle fiber such that \(r_{0,\theta ^{1}}=r_{,\theta ^{1}}\approx 0\). Furthermore, bending and torsion is neglected. Thus, the right Cauchy–Green deformation tensor is approximated by

$$ \begin{aligned} \mathbf{C} &\approx ||\mathbf{a}_{1}||^{2} \; \mathbf{G}^{1} \otimes \mathbf{G}^{1} + r^{2} \, \mathbf{G}^{2} \otimes \mathbf{G}^{2} + ( \theta ^{2})^{2} r^{2} \, \mathbf{G}^{3} \otimes \mathbf{G}^{3}, \end{aligned} $$
(23)

and the inverse is given by

$$ \begin{aligned} \mathbf{C}^{-1} &\approx \frac{1}{||\mathbf{a}_{1}||^{2}} \; \mathbf{G}_{1} \otimes \mathbf{G}_{1} + \frac{1}{r^{2}} \, \mathbf{G}_{2} \otimes \mathbf{G}_{2} + \frac{1}{(\theta ^{2})^{2}r^{2}} \, \mathbf{G}_{3} \otimes \mathbf{G}_{3}. \end{aligned} $$
(24)

The time derivative of the right Cauchy–Green deformation tensor is given by

$$ \begin{aligned} \dot{ \mathbf{C}} &= 2 (\dot{\mathbf{a}_{1}}\cdot {\mathbf{a}_{1}}) \; \mathbf{G}^{1} \otimes \mathbf{G}^{1} - r^{2}(\dot{\mathbf{a}_{1}} \cdot \mathbf{a}^{1}) \, \mathbf{G}^{2} \otimes \mathbf{G}^{2} - ( \theta ^{2})^{2} r^{2}(\dot{\mathbf{a}_{1}}\cdot \mathbf{a}^{1}) \, \mathbf{G}^{3} \otimes \mathbf{G}^{3}, \end{aligned} $$
(25)

due to

$$ \begin{aligned} \frac{d}{dt}r^{2} &= \frac{d}{dt}\left ( \frac{||\mathbf{A}_{1}||}{||\mathbf{a}_{1}||}\right )r_{0} = - \frac{||\mathbf{A}_{1}||}{||\mathbf{a}_{1}||^{3}} \dot{\mathbf{a}_{1}} \cdot {\mathbf{a}_{1}} =-r^{2} \dot{\mathbf{a}_{1}}\cdot \frac{\mathbf{a}_{1}}{||\mathbf{a}_{1}||^{2}} = -r^{2} \dot{\mathbf{a}_{1}}\cdot \mathbf{a}^{1}. \end{aligned} $$
(26)

The passive contribution of the second Piola–Kirchhoff stress tensor is given by

$$ \begin{aligned} \mathbf{S}^{p} & \approx S^{p,11} \mathbf{G}_{1} \otimes \mathbf{G}_{1} + \mathbf{S}^{p,22} \mathbf{G}_{2} \otimes \mathbf{G}_{2} + S^{p,33} \mathbf{G}_{3} \otimes \mathbf{G}_{3}, \end{aligned} $$
(27)

with

$$ \begin{aligned} S^{p,11} &= \frac{p}{||\mathbf{a}_{1}||^{2}} + \sum _{i=M,\,T} f^{i}( \gamma ^{M})\left [\mu ^{i} \left (\frac{1}{||\mathbf{A}_{1}||^{2}}- \frac{\text{tr}\mathbf{C}}{3||\mathbf{a}_{1}||^{2}}\right ) + 2 \eta ^{i} \frac{\mathbf{a}_{1} \cdot \dot{\mathbf{a}}_{1}}{||\mathbf{a}_{1}||^{4}} \right ], \\ S^{p,22} &= \frac{p}{r^{2}} + \sum _{i=M,\,T} f^{i}(\gamma ^{M}) \left [\mu ^{i}\left (\frac{1}{r_{0}^{2}}- \frac{\text{tr}\mathbf{C}}{3r^{2}}\right ) - \eta ^{i} \frac{\mathbf{a}^{1} \cdot \dot{\mathbf{a}}_{1}}{r^{2}}\right ], \\ S^{p,33} &= \frac{p}{(\theta ^{2})^{2}r^{2}} + \sum _{i=M,\,T} f^{i}( \gamma ^{M})\left [\mu ^{i}\left ( \frac{1}{r_{0}^{2}(\theta ^{2})^{2}}- \frac{\text{tr}\mathbf{C}}{3(\theta ^{2})^{2}r^{2}}\right ) - \eta ^{i} \frac{\mathbf{a}^{1} \cdot \dot{\mathbf{a}}_{1}}{(\theta ^{2})^{2}r^{2}} \right ]. \end{aligned} $$
(28)

Due to the slenderness of a muscle fiber, it is natural to introduce the common assumption in cable models of vanishing stress in radial direction, i.e., \(S^{p,22} \approx 0\). The enforcement of this assumption allows us to statically condensate the volumetric response

$$ p = -\sum _{i=M,\,T} f^{i}(\gamma ^{M}) \left [\mu ^{i} \left ( \frac{r^{2}}{r_{0}^{2}}-\frac{\text{tr}\mathbf{C}}{3} \right ) - \eta ^{i} \,\mathbf{a}^{1} \cdot \dot{\mathbf{a}}_{1}\right ]. $$
(29)

Due to (21), substitution of (29) into (28) yields

$$ \begin{aligned} S^{p,11} &= \sum _{i=M,\,T} f^{i}(\gamma ^{M}) \left [\mu ^{i} \left ( \frac{1}{||\mathbf{A}_{1}||^{2}}- \frac{||\mathbf{A}_{1}||}{||\mathbf{a}_{1}||^{3}}\right )+3\eta ^{i} \frac{\mathbf{a}^{1} \cdot \dot{\mathbf{a}}_{1}}{||\mathbf{a}_{1}||^{2}} \right ], \\ S^{p,22} &= S^{p,33} = 0. \end{aligned} $$
(30)

Active stress

We assume that the active stress is generated such that it acts only along the direction of the centerline curve. Therefore, we have

$$ \mathbf{S}^{a} = \gamma ^{M} S^{a} \mathbf{A}_{1} \otimes \mathbf{A}_{1}, $$
(31)

with

(32)

where \(\lambda _{\Omega }^{opt}\in \mathbb{R}\) is the optimal centerline stretch and the stretch of the centerline \({{\lambda _{\Omega }}}:\Omega \rightarrow \mathbb{R}\) is defined by

$$ \begin{aligned} {{\lambda _{\Omega }}} = \frac{\|\mathbf{a}_{1}\|}{\|\mathbf{A}_{1}\|}. \end{aligned} $$
(33)

Prestress

For the prestress contribution, we have

$$ \begin{aligned} \mathbf{S}^{pre} = \frac{\sigma _{0}}{||\mathbf{a}_{1}||^{2}} \mathbf{A}_{1} \otimes \mathbf{A}_{1}, \end{aligned} $$
(34)

where \(\sigma _{0} \in \mathbb{R}\) is an input parameter.

Thus, in total the second Piola–Kirchhoff stress tensor is given by

$$ \begin{aligned} \mathbf{S} = S^{11} \mathbf{A}_{1} \otimes \mathbf{A}_{1}, \end{aligned} $$
(35)

with

$$ \begin{aligned} S^{11} = \frac{\sigma _{0}}{||\mathbf{a}_{1}||^{2}} + \gamma ^{M} S^{a} + \sum _{i=M,\,T}\left [\mu ^{i} \left ( \frac{1}{||\mathbf{A}_{1}||^{2}} - \frac{||\mathbf{A}_{1}||}{||\mathbf{a}_{1}||^{3}} \right ) + 3\eta ^{i} \frac{ \mathbf{a}^{1} \cdot \dot{\mathbf{a}}_{1}}{||\mathbf{a}_{1}||^{2}} \right ]. \end{aligned} $$
(36)

Weak formulation

The weak formulation of the balance of momentum (3) reads as follows: Compute \(\mathbf{u}:{V_{0}}\rightarrow \mathbb{R}^{3}\) such that

$$ \underbrace{\int _{{V_{0}}} (\mathbf{F} \mathbf{S}) : \nabla _{X} {\pmb{\xi }}\text{d}X}_{ \text{inner forces}} + \underbrace{\int _{{V_{0}}} \rho _{0} \ddot{\mathbf{u}}\cdot {\pmb{\xi }}\text{d}X}_{ \text{inertia}} - \underbrace{\int _{{V_{0}}} \mathbf{b}_{0} \cdot {\pmb{\xi }}\text{d}X}_{ \text{body force}} - \underbrace{\int _{{\Gamma }} \mathbf{t} \cdot \left ({\pmb{\xi }}\circ \mathbf{X}(\mathbf{x})\right ) \,\text{d}s_{x}}_{ \text{coupling/contact}} = 0 $$
(37)

is fulfilled for all appropriate test functions \({\pmb{\xi }}:{V_{0}}\rightarrow \mathbb{R}^{3}\). Here, \({V_{0}}\) is the cable volume in the undeformed configuration, whereas \(\Gamma \) is the boundary surface in the current configuration and consists of the cross-sections at the cable ends and the lateral surface. For the weak formulation of the cable model, we consider only test functions which are constant over the cross-section. This allows us to preintegrate in (37) over the cable cross-section in the undeformed configuration and obtain

$$ \begin{aligned} \pi r_{0}^{2} \int _{{\Omega _{0}}} \left [ S^{11} (\mathbf{a}_{1} \cdot {\pmb{\xi }}_{,1}) + (\rho _{0} \ddot{\mathbf{u}} - \mathbf{b}_{0}) \cdot {\pmb{\xi }}\right ] \text{d}S - \int _{{\Gamma }} \mathbf{t} \cdot \left ({\pmb{\xi }}\circ \mathbf{X}(\mathbf{x})\right ) \, \text{d}s_{x} = 0, \end{aligned} $$
(38)

where \(S^{11}\) is given by (36) and now \({\pmb{\xi }}:{\Omega _{0}}\rightarrow \mathbb{R}^{3}\). In the following we will present our treatment of the integral over the boundary \({\Gamma }\), leading to coupling and contact terms. To this end, we consider the decomposition \({\Gamma }= {\Gamma }^{free} \cup \Gamma ^{c}\cup \Gamma ^{R-F}\cup \Gamma ^{F-F}\). On the free boundary \({\Gamma }^{free}\), we have the Neumann boundary condition \(\hat{\mathbf{t}} = 0\), i.e., we do not have to consider the integration over \({\Gamma }^{free}\) further. The coupling of the cable end cross-sections \(\Gamma ^{c}\) and a rigid body system will be presented in Sect. 3.2. The treatment of the contact surfaces \(\Gamma ^{R-F}\) between the lateral cable surfaces with the rigid body system is described in Sect. 3.3, whereas the contact surfaces \(\Gamma ^{F-F}\) between different lateral fiber surfaces are treated in Sect. 2.4.

Contact between fibers

In this section we discuss the contact between two muscles with centerlines \(\Omega _{1}\) and \(\Omega _{2}\). We remark that, for simplicity, only a single muscle was considered in the previous sections. To consider multiple fibers, the weak form of all individual fibers have to be summed up. When the muscles are treated as three-dimensional continua, the two-dimensional fiber–fiber contact surface is given by \(\Gamma ^{F-F}= {\Gamma }_{1} \cap {\Gamma }_{2}\). In order to simplify the situation, we use a curve–curve contact that considers the cross-sections. Furthermore, instead of the classical master–slave approach, we use the so-called two-half-pass approach first presented in [20, 21]. Therefore, in the weak form related to the fiber with centerline \(\Omega _{1}\), we use the approximation

$$ \int _{\Gamma ^{F-F}_{1}} \mathbf{t} \cdot {\pmb{\xi }}\,\text{d}s_{x} \approx \int _{\Omega ^{F-F}_{1}} \bar {\mathbf{t}}\cdot {\pmb{\xi }}\, \text{d}\mathbf{x}, $$
(39)

where the integration over the contact surface \(\Gamma ^{F-F}_{1}\) is replaced by a part of the centerline \(\Omega ^{F-F}_{1} \subset \Omega _{1}\) and the surface traction \(\mathbf{t}\) is replaced by the line force \(\bar {\mathbf{t}}: \Omega _{1}^{MM} \rightarrow \mathbb{R}^{3}\). In order to specify \(\Omega ^{F-F}_{1}\) and \(\bar {\mathbf{t}}\), we define the dimensionless gap function \(g: \Omega _{1} \rightarrow \mathbb{R}\),

$$ \begin{aligned} g(\mathbf{x})= \frac{d(\mathbf{x},\mathbf{y}(\mathbf{x}))}{r_{x}(\mathbf{x})+{r_{y}(\mathbf{y}(\mathbf{x}))}}-1, \end{aligned} $$
(40)

where \(d:\Omega _{1}\times \Omega _{2}\rightarrow \mathbb{R}^{+}\) is the distance of a point \(\mathbf{x} \in \Omega _{1}\) to the closest point \(\mathbf{y} \in \Omega _{2}\) on the second fiber involved in the contact,

$$ d(\mathbf{x},\mathbf{y}) = ||\mathbf{y}-\mathbf{x}||. $$
(41)

The radii of the muscles in the current configuration at \(\mathbf{x} \in \Omega _{1}\) and \(\mathbf{y}\in \Omega _{2}\) are denoted by \(r_{x} \in \mathbb{R}\) and \(r_{y} \in \mathbb{R}\), respectively. In view of the kinematics in (14), we note that the development of a contact zone between two cables is not possible. Thus, we allow that the muscle fibers penetrate each other by using an approach which can be interpreted as a penalty method. To this end, the contact curve is given by \(\Omega ^{F-F}_{1} = \{ \mathbf{x} \in \Omega _{1} \, | \, g(\mathbf{x})<0 \}\subset \Omega _{1}\) and the contact force \(\bar {\mathbf{t}}\) is determined by

$$ \bar {\mathbf{t}}= F(g) \, {\mathbf{n}}. $$
(42)

Here, the direction of the contact force is given by

$$ \mathbf{n} = \frac{\mathbf{y} - \mathbf{x}}{d(\mathbf{x},\mathbf{y})}, $$
(43)

whereas the magnitude is given by

$$\begin{aligned} F(g) = \textstyle\begin{cases} 0 &\text{if } 0\le g, \\ -\frac{\varkappa g}{1+\gamma g} &\text{if }-\frac{1}{\gamma } < g < 0 , \end{cases}\displaystyle \end{aligned}$$
(44)

with the penalty parameter \(\varkappa \in \mathbb{R}\) which has the dimension of force per length, and the dimensionless parameter \(\gamma \in \mathbb{R}\) determining the maximal possible penetration. In (44) we have chosen a rational functional relation for the contact force in dependence of the gap function. It has the desired property that \(F\rightarrow \infty \) for \(1+\gamma g \rightarrow 0\), e.g., the contact force becomes infinitely large if the penetration approaches a certain value. This excludes the nonphysical behavior that two fibers could cross each other, which could occur when using a linear functional relation for the contact traction. Due to the nominator in (44) configurations with too large penetration, e.g., when \(d < \left (r_{x}+r_{y}\right )\left (1-\frac{1}{\gamma }\right )\), are not admissible, see Fig. 1.

Fig. 1
figure 1

Illustration of the three possible contact configurations (equal radii \(r\) assumed): (I, green zone) The fiber centers \(\mathbf{y}_{1}\) and \(\mathbf{x}\) are well separated. No contact force present; (II, blue zone) The fibers with centers \(\mathbf{y}_{2}\) and \(\mathbf{x}\) are in contact. The contact force has a finite value; (III, red zone) The centers \(\mathbf{y}_{3}\) and \(\mathbf{x}\) are too close. This configuration is not admissible (Color figure online)

Coupling the cables with a rigid multibody system

In this section we describe our strategies to couple the cable model for muscles with a rigid body model representing bones. We start with the introduction of the rigid body system. Afterwards, the coupling at the muscle insertion points is considered. Finally, the contact along the muscles and the rigid bodies is treated.

Though the coupled system represents a flexible multibody system, our model does not use the wide-spread floating reference frame approach. Instead, minimal coordinates for the rigid body motion are combined with the large deformation of the cable model, which includes rotation and translation for the elastic fiber, cf. the absolute nodal coordinates, Shabana [23], and the approach taken by Lang et al. [11] for geometrically exact Cosserat rods.

Rigid body system

Let the state of the rigid-body system be described by the time-dependent configuration vector \({\mathbf{q}}(t)\in \mathbb{R}^{n}\) using minimal coordinates. The Lagrangian related to the rigid-body system is then given by

$$ \mathcal{L}_{RB}({\mathbf{q}}, \dot{{\mathbf{q}}}) = T_{RB}( \dot{{\mathbf{q}}}) - V_{RB}({\mathbf{q}}). $$
(45)

It is composed of the kinetic energy \(T_{RB}(\dot{{\mathbf{q}}}):\mathbb{R}^{n} \rightarrow \mathbb{R}\) and the potential energy \(V_{RB}({\mathbf{q}}):\mathbb{R}^{n} \rightarrow \mathbb{R}\). We introduce the action

$$ \begin{aligned} S_{RB}({\mathbf{q}}) &= \int _{0}^{T} \mathcal{L}_{RB}({\mathbf{q}}, \dot{{\mathbf{q}}}) \,\text{d}t. \end{aligned} $$
(46)

Then, the Lagrange–d’Alembert principle states

$$ \begin{aligned} \delta S_{RB} - \int _{0}^{T} \mathbf{F} \cdot \delta {\mathbf{q}}\, \text{d}t = 0, \end{aligned} $$
(47)

where \(\mathbf{F}\) is an external force acting on the system. Thus, the forced Euler–Lagrange equations are

$$ \begin{aligned} \frac{\partial \mathcal{L}_{RB}}{\partial {\mathbf{q}}} - \frac{d}{dt}\left ( \frac{\partial \mathcal{L}_{RB}}{\partial \dot{{\mathbf{q}}}} \right ) - \mathbf{F} &= 0. \end{aligned} $$
(48)

In the present paper we assume that the geometry of each rigid body is a right circular cylinder.

Coupling between fibers and rigid bodies

We assume a pointwise coupling of the end cross-sections \(\Gamma ^{c}\) at the end points of the centerline \(\Omega \) with the rigid body model, Fig. 2. Thus, the actual shapes of the end cross-sections are not taken into account. Let \(\mathbf{X}^{c} \in \Gamma ^{c}_{0}\) be a coupling point in the initial configuration at \(t=0\), i.e., a material point of a muscle fiber which is attached to the rigid body system. The coupling conditions at \(\mathbf{X}^{c}\) are

$$\begin{aligned} \hat{\mathbf{c}}^{RB}(\mathbf{X}^{c},{{{\mathbf{q}}}}(t)) &= \mathbf{X}^{c} + \mathbf{u}(\mathbf{X}^{c},t), \end{aligned}$$
(49a)
$$\begin{aligned} \mathbf{F}^{RB}(\mathbf{X}^{c},t) + \mathbf{F}^{M}(\mathbf{X}^{c},t) &=0, \end{aligned}$$
(49b)

which have to hold for all \(t\in [0,T]\). Here, \(\hat{\mathbf{c}}^{RB}:\mathbb{R}^{3}\times \mathbb{R}^{n} \rightarrow \mathbb{R}^{3}\) is the nonlinear position function of the rigid body system yielding the current position of \(\mathbf{X}^{c}\) for the configuration \({{{\mathbf{q}}}}(t)\). The right-hand side of (49a) is the current position of \(\mathbf{X}^{c}\) computed by the displacement \(\mathbf{u}(\mathbf{X}^{c},t)\) of the muscle fiber. Thus, equation (49a) ensures the compatibility of the deformation. In Sect. 4 we will use \(\mathbf{c} = \hat{\mathbf{c}}^{RB} - \mathbf{X}^{c}\) and reformulate (49a) appropriately as a constraint on the end positions of the muscles. Equation (49b) is the Newton’s second law, where \(\mathbf{F}^{RB}\) and \(\mathbf{F}^{M}\) are the respective forces at the coupling point. It will be considered by means of Lagrange multipliers in Sect. 4.

Fig. 2
figure 2

Schematic illustration of the degrees of freedom. Minimal coordinates for the rigid body motion are combined with the large deformation approach, which includes rotation and translation for the elastic fiber. There is no floating reference frame required. The initial configuration (black) of the system is described by (\(q_{1}(0)\), \(q_{2}(0)\)) and \(\mathbf{X}(\theta ^{1})\), whereas the current configuration (red) at time \(t\) is described by (\(q_{1}(t)\), \(q_{2}(t)\)) and \(\mathbf{x}_{t}(\theta ^{1}) = \mathbf{X}(\theta ^{1}) + \mathbf{u}_{t}( \theta ^{1})\) (Color figure online)

Contact between rigid bodies and muscles

Similarly to Sect. 2.4 we consider a cylinder–curve contact, where we take the cross-section of the curve and the cylinder into account. To this end we approximate the integral over the contact surface \(\Gamma ^{R-F}\) by

$$ \int _{\Gamma ^{R-F}} \mathbf{t} \cdot {\pmb{\xi }}\text{d}s_{x} \approx \int _{\Omega ^{R-F}} \bar {\mathbf{t}}\cdot {\pmb{\xi }} \text{d}\mathbf{x}. $$
(50)

The gap function is now defined as

$$ \begin{aligned} g(d,r_{RB},r_{x})=\frac{d}{r_{RB}+{r_{x}}}-1, \end{aligned} $$
(51)

where \(d\) is the distance of a point \(\mathbf{x} \in \Omega ^{R-F}\) to the closest point \(\mathbf{y} = \mathbf{y}_{0}-((\mathbf{x}-\mathbf{y}_{0})\cdot \mathbf{t}^{RB}) \mathbf{t}^{RB}\) on the cylinder axis. Here, \(\mathbf{y}_{0}\in \mathbb{R}^{3}\) is a point on the cylinder axis and \(\mathbf{t}^{RB} \in \mathbb{R}^{3}\) is the unit vector in the direction of the axis. In (51) \(r_{x}\in \mathbb{R}\) denotes the radius of the muscle cross-section at \(\mathbf{x}\), whereas \(r_{RB}\in \mathbb{R}\) is the radius of the cylinder involved in the contact. The contact traction \(\bar {\mathbf{t}}\) is computed by means of (42).

Numerical realization

In this section, we outline the numerical discretization of the coupled model with rigid bodies and elastic muscle fibers.

Semidiscretization in space

We employ a semidiscretization in space of the cable model by means of cubic Hermite basis functions. Thus, the cable middle curve and the displacement unknowns are approximated by \(C^{1}\)-continuous functions. On one element we have the decomposition

$$ \mathbf{x}(\xi ) \approx \sum _{i=1}^{4} \phi _{i}(\xi ) \mathbf{X}_{i} + \sum _{i=1}^{4} \phi _{i}(\xi ) \mathbf{u}_{i}, \; \xi \in [0,1], $$
(52)

where \(\mathbf{X}_{i}\) describe the initial geometry of the element, \(\mathbf{u}_{i}\) are the local unknowns, and \(\phi _{i}(\xi )\) are the cubic Hermite element shape functions

$$ \begin{aligned} \phi _{1}(\xi ) &= 1 + \xi ^{2}(2\xi -3), \\ \phi _{2}(\xi ) &= \xi (\xi (\xi -2)+1), \\ \phi _{3}(\xi ) &= -\xi ^{2}(2\xi -3), \\ \phi _{4}(\xi ) &= \xi ^{2}(\xi -1). \end{aligned} $$
(53)

The element shape functions are pieced together to basis functions \(\mathbf{N}_{i}\), \(i=1,\dots ,N_{s}\), and result in the usual way in a semidiscrete substructure for each fiber.

In the next step, the semidiscretized individual muscle fibers with unknown displacement variables \({\mathbf{u}}_{h}(t)\) need to be coupled with the rigid body dynamics \(\mathbf{q}(t)\) by means of the constraints (49a) and corresponding Lagrange multipliers, which incorporate (49b). For simplicity, we restrict the discussion of the coupled system to a single fiber, for which the resulting equations read

$$\begin{aligned} \mathbf{M}_{RB}({\mathbf{q}}) \,\ddot{{\mathbf{q}}}&= \mathbf{R}_{RB}({ \mathbf{q}},{\mathbf{u}}_{h}) -\mathbf{C}(\mathbf{q})^{T} \pmb{\lambda }, \end{aligned}$$
(54a)
$$\begin{aligned} \mathbf{M}_{M}\,\ddot{\mathbf{u}}_{h} &= \mathbf{R}_{h}(\mathbf{u}_{h}, \dot{\mathbf{u}}_{h}) + \mathbf{R}_{b} + \mathbf{B}^{T} \mathbf{\lambda }, \end{aligned}$$
(54b)
$$\begin{aligned} 0 & = \mathbf{c}(\mathbf{q}) - \mathbf{B} \mathbf{u}_{h} . \end{aligned}$$
(54c)

The Euler–Lagrange equations (48) for the rigid body system are reformulated in (54a). In (54b) the entries of mass matrix \(\mathbf{M}_{M}\) of a single fiber are given by

$$ \mathbf{M}_{M}[i,j] = \pi r_{0}^{2} \int _{\Omega }\rho _{0} \, \mathbf{N}_{i} \cdot \mathbf{N}_{j} \,\text{d}x, $$
(55)

whereas the inner force vector is given by

$$ \mathbf{R}_{h}[j] = \pi r_{0}^{2} \int _{\Omega }S^{11} (\mathbf{g}_{1} \cdot \mathbf{N}_{j}') \, \text{d}x - \int _{\Omega ^{F-F}} \bar {\mathbf{t}}\cdot \mathbf{N}_{j} \,\text{d}x - \int _{\Omega ^{R-F}} \bar {\mathbf{t}}\cdot \mathbf{N}_{j} \,\text{d}x, $$
(56)

and the contribution due to body forces is

$$ \mathbf{R}_{b}[j] = - \pi r_{0}^{2} \int _{\Omega }\mathbf{b}_{0}\cdot \mathbf{N}_{j} \,\text{d}x. $$
(57)

The coupling conditions (49a) are rewritten in (54c) with a Boolean matrix \(\mathbf{B}\) that extracts those boundary nodes from \(\mathbf{u}_{h}\) that are subject to the corresponding constraints. Overall, the semidiscretized system (54a)–(54c) forms a differential-algebraic equation (DAE) with additional Lagrange multipliers \(\pmb{\lambda }\) and Jacobian matrix \(\mathbf{C}(\mathbf{q}) = \partial \mathbf{c}(\mathbf{q})/ \partial \mathbf{q}\). We remark that all integrals in Eqs. (55)–(57) are approximated by Gaussian quadrature.

The constraint (54c) allows us to directly eliminate the superfluous boundary nodes in the coupling interface. As a next step, we sketch this procedure that transforms the DAE (54a)–(54c) to a state space model. For this purpose, we partition the elastic displacements as \(\mathbf{u}_{h} = ( \mathbf{u}_{I}, \mathbf{u}_{D})\) with independent (or interior, respectively) variables \(\mathbf{u}_{I}\) and dependent (or Dirichlet boundary, respectively) variables \(\mathbf{u}_{D}\). Thus, \(\mathbf{B} = (\mathbf{0}, \mathbf{I}_{u_{D}})\) with an identity matrix \(I_{u_{D}}\) of the size of the boundary nodes, and the nullspace matrix of the constraint (54c) is then

$$ \mathbf{N}(\mathbf{q}) = \left ( \textstyle\begin{array}{c@{\quad }c} \mathbf{I}_{q} & \mathbf{0} \\ \mathbf{0} & \mathbf{I}_{u_{I}} \\ \mathbf{C}(\mathbf{q}) & \mathbf{0} \end{array}\displaystyle \right ). $$
(58)

In other words, it holds that \((\mathbf{C}(\mathbf{q}), - \mathbf{B}) \cdot \mathbf{N}(\mathbf{q}) = ( \mathbf{C}(\mathbf{q}), \mathbf{0}, -\mathbf{I}_{u_{D}}) \cdot \mathbf{N}( \mathbf{q}) \equiv \mathbf{0}\) for all states \(\mathbf{q}\). From the constraint (54c), we deduce the relations

$$ \mathbf{u}_{D} = \mathbf{c}(\mathbf{q}), \quad \dot{\mathbf{u}}_{D} = \mathbf{C}(\mathbf{q})\dot{\mathbf{q}}, \quad \ddot{\mathbf{u}}_{D} = \mathbf{C}(\mathbf{q})\ddot{\mathbf{q}} + \mathbf{C}_{q}(\mathbf{q})( \dot{\mathbf{q}},\dot{\mathbf{q}}). $$
(59)

By inserting these relations into the DAE (54a)–(54c) and premultiplying the dynamic equations by \(\mathbf{N}(\mathbf{q})^{T}\), we can eliminate the dependent variables and the Lagrange multipliers. To this end, the constant finite element mass matrix \(\mathbf{M}_{M}\) is partitioned into

$$ \mathbf{M}_{M} = \left ( \textstyle\begin{array}{c@{\quad }c} \mathbf{M}_{I} & \mathbf{H}^{T} \\ \mathbf{H} & \mathbf{M}_{D} \end{array}\displaystyle \right ) $$
(60)

according to the structure of \(\mathbf{u}_{h}\). The state space form then reads

$$\begin{aligned} \widetilde{\mathbf{M}}_{RB}({\mathbf{q}})\,\ddot{{\mathbf{q}}}+ \mathbf{C}(\mathbf{q})^{T} \mathbf{H} \,\ddot{\mathbf{u}}_{I} &= \mathbf{R}_{RB}({\mathbf{q}},(\mathbf{u}_{I}, \mathbf{c}(\mathbf{q})) - \mathbf{C}(\mathbf{q})^{T} \mathbf{M}_{D} \mathbf{C}_{q}(\mathbf{q})({ \mathbf{q}},\dot{\mathbf{q}}), \end{aligned}$$
(61a)
$$\begin{aligned} \mathbf{H}^{T} \mathbf{C}(\mathbf{q}) \,\ddot{{\mathbf{q}}}+ \mathbf{M}_{I} \,\ddot{\mathbf{u}}_{I} &= \widetilde{\mathbf{R}}_{h}({\mathbf{q}}, \dot{\mathbf{q}},\mathbf{u}_{I},\dot{\mathbf{u}}_{I}) - \mathbf{H}^{T} \mathbf{C}_{q}(\mathbf{q})({\mathbf{q}},\dot{\mathbf{q}}), \end{aligned}$$
(61b)

where \(\widetilde{\mathbf{M}}_{RB}({\mathbf{q}}) := \mathbf{M}_{RB}({\mathbf{q}}) + \mathbf{C}(\mathbf{q})^{T} \mathbf{M}_{D} \mathbf{C}(\mathbf{q}) \) and

$$ \widetilde{\mathbf{R}}_{h}({\mathbf{q}},\dot{\mathbf{q}},\mathbf{u}_{I}, \dot{\mathbf{u}}_{I}) := ( \mathbf{I}_{u_{I}}, \mathbf{0}) \cdot \left ( \mathbf{R}_{h}((\mathbf{u}_{I}, \mathbf{c}(\mathbf{q})), (\dot{\mathbf{u}}_{I}, \mathbf{C}(\mathbf{q})\dot{\mathbf{q}})) + \mathbf{R}_{b} \right ) . $$

The state space model requires the derivative term \(\mathbf{C}_{q}(\mathbf{q})(\dot{\mathbf{q}},\dot{\mathbf{q}})\) from the coupling condition. In our approach we find it more straightforward to use a formulation where the coupling condition is still explicitly given while the Lagrange multipliers are eliminated. This is possible due to the special partitioning of the displacements into \(\mathbf{u}_{h} = ( \mathbf{u}_{I}, \mathbf{u}_{D})\). We introduce velocity variables \(\mathbf{p} = \dot{\mathbf{q}}\) and \(\mathbf{v}_{h} = \dot{\mathbf{u}_{h}}\) and conclude from (54b) and (60) that

$$ \pmb{\lambda } = (\mathbf{H}, \mathbf{M}_{D}) \,\dot{\mathbf{v}}_{h} - \mathbf{B} \cdot \left (\mathbf{R}_{h}(\mathbf{u}_{h},\mathbf{v}_{h}) + \mathbf{R}_{b}\right ). $$
(62)

Then we insert this expression into (54a) and obtain, along with the differentiated coupling constraint for the velocities, the DAE formulation

$$\begin{aligned} \mathbf{M}_{RB}({\mathbf{q}}) \,\dot{\mathbf{p}} + \mathbf{C}(\mathbf{q})^{T} (\mathbf{H}, \mathbf{M}_{D}) \,\dot{\mathbf{v}}_{h} &= \widehat{\mathbf{R}}_{RB}({\mathbf{q}},{\mathbf{u}}_{h}, \mathbf{v}_{h}), \end{aligned}$$
(63a)
$$\begin{aligned} (\mathbf{M}_{I}, \mathbf{H}^{T}) \,\dot{\mathbf{v}}_{h} &= ( \mathbf{I}_{u_{I}}, \mathbf{0}) \cdot \left ( \mathbf{R}_{h}(\mathbf{u}_{h},\mathbf{v}_{h}) + \mathbf{R}_{b}\right ), \end{aligned}$$
(63b)
$$\begin{aligned} 0 & = \mathbf{c}(\mathbf{q}) - \mathbf{B} \mathbf{u}_{h} , \end{aligned}$$
(63c)
$$\begin{aligned} 0 & = \mathbf{C}(\mathbf{q})\mathbf{p} - \mathbf{B} \mathbf{v}_{h}, \end{aligned}$$
(63d)

where \(\widehat{\mathbf{R}}_{RB}({\mathbf{q}},{\mathbf{u}}_{h}, \mathbf{v}_{h}) := \mathbf{R}_{RB}({\mathbf{q}},{\mathbf{u}}_{h}) + \mathbf{C}(\mathbf{q})^{T} \mathbf{B} \cdot \left (\mathbf{R}_{h}(\mathbf{u}_{h},\mathbf{v}_{h}) + \mathbf{R}_{b}\right )\). Note that this formulation is completely equivalent to the original DAE (54a)–(54c) and the state space form (61a), (61b). It has a “GGL-like” structure, and by one-time differentiation of the constraints (63c) and (63d), an ordinary differential equation in all variables is obtained. The index of (63a)–(63d) is thus equal to 1. For a general constrained mechanical system, such a partitioning of the unknowns and also the special structure of the constraint equations do not hold, and consequently (63a)–(63d) cannot be derived.

Semidiscretization in time

We consider a uniform discretization of the time interval \([0, T]: (t^{0} ,\dots , t^{N_{t}} )\), with \(t^{i} = i\,\Delta t\), \(i = 0,\dots , N_{t}\), where \(\Delta t > 0\) is the time-step size and \(N_{t}\) the number of time-steps. We denote by \(\mathbf{u}_{h}^{i}\) the discrete displacement field at time-step \(t^{i}\). This notation applies to all discretized quantities. We use the backward Euler method for time discretization. Then, the fully discrete schema reads: Find (\({ \mathbf{q}}^{i+1}, {\mathbf{p}}^{i+1}, \mathbf{u}_{h}^{i+1}, \mathbf{v}_{h}^{i+1}\)) such that

$$ \begin{aligned} \mathbf{u}_{h}^{i+1} &= \mathbf{u}_{h}^{i} + \Delta t \mathbf{v}_{h}^{i+1}, \\ \mathbf{q}^{i+1} &= \mathbf{q}^{i} + \Delta t \mathbf{p}^{i+1}, \\ \mathbf{M}_{RB} \frac{{\mathbf{p}}^{i+1}-{\mathbf{p}}^{i}}{\Delta t} + \mathbf{C}(\mathbf{q}^{i+1})^{T} (\mathbf{H}, \mathbf{M}_{D}) \frac{\mathbf{v}_{h}^{i+1}-\mathbf{v}_{h}^{i}}{\Delta t} &= \widehat{\mathbf{R}}_{RB}({\mathbf{q}}^{i+1},{\mathbf{u}}_{h}^{i+1},{ \mathbf{v}}_{h}^{i+1}), \\ (\mathbf{M}_{I}, \mathbf{H}^{T}) \frac{\mathbf{v}_{h}^{i+1}-\mathbf{v}_{h}^{i}}{\Delta t} &= ( \mathbf{I}_{u_{I}}, \mathbf{0}) \cdot (\mathbf{R}_{h}(\mathbf{u}_{h}^{i+1},\mathbf{v}_{h}^{i+1}) + \mathbf{R}_{b}), \\ \mathbf{c}(\mathbf{q}^{i+1}) - \mathbf{B} {\mathbf{u}}_{h}^{i+1} &= 0, \\ \mathbf{C}({\mathbf{q}^{i+1}}){\mathbf{p}}^{i+1}- \mathbf{B} {\mathbf{v}}_{h}^{i+1} &= 0, \end{aligned} $$
(64)

with initial conditions \(\mathbf{q}^{0} = \mathbf{q}_{0}\), \({\mathbf{p}}^{0} = {\mathbf{p}}_{0}\), \(\mathbf{u}_{h}^{0} = \mathbf{u}_{h,0}\), \(\mathbf{v}_{h}^{0}= \mathbf{v}_{h,0}\). The nonlinear problem (64) is solved by Newton’s method in combination with a safeguard algorithm described in Sect. 4.4. The expressions for the tangent matrix are summarized in the Appendix.

Contact numerics

Here, we describe the numerical treatment of the contact between muscles. As all integrals, the last two integrals in (56) related to contact are approximated by quadrature. Therefore, we have

$$ \mathbf{R}_{h} = \sum _{k=1}^{n_{Q}} \tilde{\mathbf{t}}(\mathbf{x}_{k}) \cdot {\pmb{\xi }}(\mathbf{x}_{k}) \, ||\mathbf{g}_{1}(\mathbf{x}_{k})|| \, \omega _{k}, $$
(65)

where \(\mathbf{x}_{k} \in \mathbb{R}^{3}\) and \(\omega _{k}\in \mathbb{R}\) are the \(n_{Q}\) quadrature nodes and weights. In order to evaluate the contact traction \(\tilde{\mathbf{t}}\) between two fibers, we have to find the closest point \(\mathbf{y}(\xi )\) on each possible contact partner corresponding to the quadrature point \(\mathbf{x}_{k}\). The necessary condition for \(\mathbf{y}(\xi )\) to be a minimizer reads

$$ \begin{aligned} (\mathbf{y}(\xi )-\mathbf{x}_{k})\cdot \frac{d\mathbf{y}}{d\xi }(\xi ) = 0. \end{aligned} $$
(66)

In order to obtain \(\mathbf{y}(\xi )\) for a given point \(\mathbf{x}_{k}\), we remark that the centerline is discretized by Hermite shape functions (53), i.e., by piecewise cubic polynomials. Thus, we have to solve for each possible contact element a quintic equation in \(\xi \) of the form

$$ \begin{aligned} &(\mathbf{v}_{1} \cdot \mathbf{v}_{2} - \mathbf{x}_{k} \cdot \mathbf{v}_{2}) +(2\mathbf{v}_{1}\cdot \mathbf{v}_{3}+\mathbf{v}_{2} \cdot \mathbf{v}_{2}-2 \mathbf{x}_{k}\cdot \mathbf{v}_{3})\xi \\ &+3(\mathbf{v}_{1}\cdot \mathbf{v}_{4}+\mathbf{v}_{2}\cdot \mathbf{v}_{3}- \mathbf{x}_{k}\cdot \mathbf{v}_{4})\xi ^{2} +(4\mathbf{v}_{2}\cdot \mathbf{v}_{4}+2\mathbf{v}_{3}\cdot \mathbf{v}_{3}) \xi ^{3} \\ &+ 5 \mathbf{v}_{4} \cdot \mathbf{v}_{3}\,\xi ^{4} +3 \mathbf{v}_{4} \cdot \mathbf{v}_{4}\, \xi ^{5} = 0, \end{aligned} $$
(67)

with

$$ \begin{aligned} \mathbf{v}_{1} &= \mathbf{y}_{1}, \\ \mathbf{v}_{2} &= \mathbf{y}_{2}, \\ \mathbf{v}_{3} &= -3\mathbf{y}_{1}-2\mathbf{y}_{2}+3\mathbf{y}_{3}- \mathbf{y}_{4}, \\ \mathbf{v}_{4} &= 2\mathbf{y}_{1}+\mathbf{y}_{2}-2\mathbf{y}_{3}+ \mathbf{y}_{4}, \end{aligned} $$
(68)

and the local coefficients \(\mathbf{y}_{i} = \mathbf{Y}_{i} + \mathbf{u}^{y}_{i}\) describing the current position of the respective finite element. In order to have a robust method we would like to find all roots of (67). To this end, we use the Matlab function roots. After having found all roots we evaluate also the distance at the element borders and take the point with minimal distance as \(\mathbf{y}(\xi )\).

Safeguard algorithm

In each time-step the resulting nonlinear system (64) is solved using Newton’s method. However, in order to have a robust method we have to ensure that the contact penetrations do not become too large and not admissible. To this end, we employ a safeguard algorithm and scale the step-size of the Newton method by a factor \(\delta \le 1\) if necessary. Let the Newton iteration be

$$ \mathbf{u}^{i+1} = \mathbf{u}^{i} + \delta \Delta \mathbf{u}, $$
(69)

where \(\mathbf{u}^{i}\) and \(\mathbf{u}^{i+1}\) is the current and next iterate and \(\Delta \mathbf{u}\) the update. In view of (44), the contact traction becomes infinite whenever

$$ \epsilon (\delta ) := 1 + \left ( \frac{d(\delta )}{r_{1}(\delta )+r_{2}(\delta )}-1 \right )\gamma = 0 $$
(70)

at any spatial location \(x\). Thus, we have to ensure that \(\epsilon (\delta ) > 0\) for the contact between two fibers. However, the evaluation of the function \(\epsilon (\delta )\) requires the full evaluation of the contact algorithm. In order to avoid this costly evaluation, let \(e_{\epsilon }(\delta )\) be an estimate of \(\epsilon (\delta )\) such that \(\epsilon (\delta ) \ge e_{\epsilon }(\delta )\). Then, we want to determine \(\delta \in [0,1]\) such that

$$\begin{aligned} \min _{x}\left (\frac{\epsilon (\delta )}{\epsilon (0)}\right ) \ge \min _{x}\left (\frac{e_{\epsilon }(\delta )}{\epsilon (0)}\right ) > \bar {\delta }, \end{aligned}$$
(71)

with chosen parameter \(0<\bar {\delta }<1\). In our implementation we compute the estimate element-wise. Thus, for an element \(E\) we have

$$\begin{aligned} e_{\epsilon }(\delta ) = 1 + \gamma \left ( \frac{\min _{E} d-\delta (\max _{E} \|\Delta \mathbf{u}\| + \max _{\Omega \setminus \Omega _{E}} \|\Delta \mathbf{u}\|) }{\chi _{E}+\chi _{\Omega }}-1 \right ), \end{aligned}$$
(72)

with

$$ \begin{aligned} \chi _{E} &= \max _{E} r_{0} \sqrt{ \frac{\max _{E}||\mathbf{A}_{0}||}{\min _{E}||\mathbf{A} + \mathbf{u}^{i}|| - \delta \max _{E} ||\Delta \mathbf{u}'||}}, \\ \chi _{\Omega }&= \max _{\Omega \setminus \Omega _{E}} r_{0} \sqrt{ \frac{\max _{\Omega \setminus \Omega _{E}}||\mathbf{A}_{0}||}{\min _{\Omega \setminus \Omega _{E}}||\mathbf{A} + \mathbf{u}^{i}|| - \delta \max _{\Omega \setminus \Omega _{E}} ||\Delta \mathbf{u}'||}}. \end{aligned} $$
(73)

Here, \(\min _{E}\) and \(\max _{E}\) is the respective minimum and maximum on the considered element \(E\), whereas \(\min _{\Omega \setminus \Omega _{E}}\) and \(\max _{\Omega \setminus \Omega _{E}}\) is the respective minimum and maximum on all other fibers except the fiber containing element \(E\).

Numerical results

In this section we present the results of numerical computations.

Verification of the cable model

In this first example we verify our implementation of the cable model. To this end, we consider a single fiber with properties given in Table 1. The muscle ratio \(\gamma ^{M}\) follows the function

$$ \gamma ^{M}(\theta ) = 16(1-\theta )^{2}\theta ^{2}, $$
(74)

where \(\theta \in [0,1]\) is the dimensionless position in the fiber. Following the idea of a manufactured solution, we prescribe the motion of the fiber centerline as

$$ \mathbf{x}(\theta ,t) = \begin{bmatrix} \theta \\ 0 \\ 0 \end{bmatrix} + \begin{bmatrix} 0 \\ \cos \theta \\ \sin 8\theta \end{bmatrix} (1-\cos t), \quad \theta \in [0,1]. $$
(75)

For this chosen motion we compute the necessary body force by

$$ \mathbf{b}_{0} = -\text{Div}(\mathbf{F} \mathbf{S}) = - \frac{(\mathbf{F} \mathbf{S} \cdot \mathbf{A}^{1} \|\mathbf{A}_{1}\|)_{,1}}{\|\mathbf{A}_{1}\|} = - \frac{(S^{11} \mathbf{a}_{1} \|\mathbf{A}_{1}\|)_{,1}}{\|\mathbf{A}_{1}\|}. $$
(76)

For the actual computation of (76), we used the symbolic computation capabilities of Matlab. The resulting function is prescribed in our numerical calculation. We have conducted a convergence study of the error \(||u^{h}_{2}(0.5,t)-u_{2}(0.5,t)||_{L_{2}([0,T])}\) using computations with different spacial and temporal discretizations. Here,

$$ u_{2}(0.5,t) = \cos (0.5)(1-\cos t) $$

denotes the second component of the exact solution (75) in the middle of the cable, whereas \(u^{h}_{2}(0.5,t)\) is the corresponding numerical solution. The results of the convergence study are illustrated in Fig. 3. We observe the optimal linear convergence rate of the temporal discretization provided the spatial discretization is fine enough.

Fig. 3
figure 3

Results of the convergence study for the verification of implementation of the fiber model; \(N_{e}\) denotes the number of elements (Color figure online)

Table 1 Properties of the cable in Sect. 5.1

Verification of the contact integration

In this example we investigate the influence of the contact integration described in Sect. 4.3. To this end we consider the contact between a rigid cylinder and a homogeneous fiber. The model parameters are given in Table 2. We load the fiber by a distributed line load of \(b_{z} = -1000\) N/m. The initial and the deformed configurations are visualized in Figs. 4a and 4b, respectively. We study the effect of the integration and the number of elements on the displacement solution. To this end we observed the minimal vertical displacement (see Fig. 5). As a reference value we have taken the displacement obtained with the most quadrature points and 128 elements. We observe convergence with growing number of quadrature points for a fixed number of elements used. The error due to integration is less than \(1\%\) when 4 or more quadrature points are used. Furthermore, also the convergence with respect to the number of elements can be observed. When 32 elements or more are used, the error is below \(1\%\). Therefore, we will use 5 quadrature points per element for the contact integration in the following examples.

Fig. 4
figure 4

Problem geometry for the verification of the contact integration (Color figure online)

Fig. 5
figure 5

Dependency of the displacement on the integration schema

Table 2 Model parameters for the problem in Sect. 5.2

Spatial convergence of the contact between fibers

In this verification example we study the spatial convergence of the contact algorithm for the fiber–fiber contact. To this end, we consider the contact between two homogeneous fibers with material parameters given in Table 3. The initial configuration, where no contact is present, is depicted in Fig. 6a. The upper fiber is statically loaded by a uniform line load \(b_{z} = -5000\) N/m in vertical direction such that it deflects and comes in contact with the lower fiber. The deformed configuration after loading is depicted in Fig. 6b.

Fig. 6
figure 6

Problem geometry for the fiber–fiber contact test (Color figure online)

Table 3 Properties of the fibers in Sect. 5.3

We have solved the problem with different space discretizations and evaluated the displacement in the \(z\)-direction \(u^{h}_{z}(0.5)\) at the middle of the upper fiber. The results of the convergence study are illustrated in Fig. 7. As a reference value \(u^{ref}_{z}(0.5)\), we have taken the result obtained for the finest discretization. We observe the convergence of the error with growing number of elements used.

Fig. 7
figure 7

Results of the convergence study of the fiber contact problem

Upper limb model

We consider a strongly simplified model of the upper limb, consisting of three rigid bodies and five fibers modeling the biceps (two fibers) and triceps muscles (three fibers), see Fig. 8. The rigid body representing the upper arm is assumed to be fixed in space. The second rigid body representing the forearm is assumed to have only one rotational degree of freedom around the \(y\)-axis. The third rigid body is an additional wrapping surface in order to force the triceps fibers to bend around the elbow. The biceps and the triceps are modeled by two and three fibers lying (almost) in parallel, respectively. The radii of all muscles and the muscle ratio are assumed to be

$$ \begin{aligned} r(\theta ) &= r_{0} + 16r_{0}(1-\theta )^{2}\theta ^{2}~\mbox{m}, \\ \gamma ^{M} &= 16(1-\theta )^{2}\theta ^{2}, \end{aligned} $$
(77)

where \(\theta \in [0,1]\) is the dimensionless position along the fiber. The remaining model parameters are given in Table 4. We remark that the model parameters have been adapted from [18] and [13]. However, due to the lack of data, the parameters \(\eta \) and \(\sigma _{0}\), as well as the functions in (77), are an ad hoc choice of the authors. The prestress \(\sigma _{0}\) has been adapted such that forearm is nearly facing downwards in the initial configuration. Therefore, the results have to be understood in a qualitative way, showing the potentials of the proposed approach. We perform a dynamic forward simulation with the prescribed activation curves

$$ \begin{aligned} \alpha ^{bi}(t) &= 0.0704\tanh (\pi t) + 0.0608 \sin (\pi t), \\ \alpha ^{tri}(t) &= 0.008(1 - \cos (\pi t)), \end{aligned} $$
(78)

for the biceps and triceps fibers, respectively, see Fig. 9. The simulation end time is chosen to be \(T=8~\mbox{s} \). We have solved the problem with different discretizations in space and time. The discretization parameters and the elapsed computation time are given in Table 5. Here, \(N_{e}\) refers to the number of elements per fiber and \(N_{t}\) is the number of time-steps. Thus, we have used \({40,\,80,\,160,\,320}\) finite elements resulting in \({542,\,1022,\,1982,\,3902}\) degrees of freedom in the semidiscretized systems. All computations are performed on a personal computer with an AMD Ryzen 7 3700X 8-Core processor, which uses an Ubuntu 18.04 operating system.

Fig. 8
figure 8

Illustration of the upper limb model

Fig. 9
figure 9

Activation functions for the dynamic forward simulation of the upper limb model

Table 4 Upper limb model parameters
Table 5 Discretization parameters and timings for the upper limb model

The angle of rotation of the forearm is plotted over time in Fig. 10. Since the resulting curves virtually agree we conclude that the discretization error is low. We observe some oscillations in the beginning of the simulation, which are related to the initial conditions. Due to physical and numerical damping, these oscillations disappear after the first cycle. Figure 11 illustrates the forces in one biceps and one triceps fiber at the coupling point to the upper arm are plotted over time. For the same fibers, the internal forces are displayed over the fiber length for two times in Fig. 12. In Fig. 13 some snapshots in time of the upper limb model are plotted.

Fig. 10
figure 10

Rotation of the forearm over time for different discretizations

Fig. 11
figure 11

Forces in the fibers at the coupling point to the upper arm (Color figure online)

Fig. 12
figure 12

Forces along the fibers

Fig. 13
figure 13

Snapshots in time of the upper limb model (Color figure online)

Conclusion

A new fiber-based simulation framework for the forward-dynamics of the musculoskeletal system has been presented. All components including the muscles are represented by three-dimensional bodies. Due to their stiffness, bones are modeled as rigid bodies, whereas muscles are described by one-dimensional cables that are derived from continuum mechanics. The advantage of this approach lies in the relatively low computational cost compared to models accounting for full three-dimensional kinematics, without introducing too much assumptions like in lumped parameter models.

In the present approach the rigid bodies are restricted to be cylinders. In future work we plan to incorporate triangulated bone surfaces into our model. Furthermore, we would like to couple the present model with an electrochemical model on the microscopic level that captures the relevant effects of the actin–myosin binding process during muscle contraction [16]. So far, our focus has been on forward-dynamics, like for the simulation of the upper limb model. For realistic applications, however, the control of the biomechanical system becomes an important challenge. Currently, we are investigating the usage of both classical optimal control and reinforcement learning for this purpose. Finally, so far no attempt of validation against experimental data of the presented approach has been made. This important step will also be part of future work.