Clément Moreau

Laetitia Giraldi

Hermes Gadêlha

The asymptotic coarse-graining formulation of slender-rods, bio-filaments and flagella

The inertialess fluid-structure interactions of active and passive inextensible filaments and slenderrods are ubiquitous in nature, from the dynamics of semi-flexible polymers and cytoskeletal filaments to cellular mechanics and flagella. The coupling between the geometry of deformation and the physical interaction governing the dynamics of bio-filaments is complex. Governing equations negotiate elastohydrodynamical interactions with non-holonomic constraints arising from the filament inextensibility. Such elastohydrodynamic systems are structurally convoluted, prone to numerical erros, thus requiring penalisation methods and high-order spatiotemporal propagators. The asymptotic coarse-graining formulation presented here exploits the momentum balance in the asymptotic limit of small rod-like elements which are integrated semi-analytically. This greatly simplifies the elastohydrodynamic interactions and overcomes previous numerical instability. The resulting matricial system is straightforward and intuitive to implement, and allows for a fast and efficient computation, over than a hundred times faster than previous schemes. Only basic knowledge of systems of linear equations is required, and implementation achieved with any solver of choice. Generalisations for complex interaction of multiple rods, Brownian polymer dynamics, active filaments and non-local hydrodynamics are also straightforward. We demonstrate these in four examples commonly found in biological systems, including the dynamics of filaments and flagella. Three of these systems are novel in the literature. We additionally provide a Matlab code that can be used as a basis for further generalisations.

I. INTRODUCTION

The fluid-structure interactions of semi-flexible filaments are found everywhere in nature [START_REF] Ss Antman | Nonlinear Problems of Elasticity[END_REF][START_REF] Alberts | Molecular Biology of the Cell[END_REF][START_REF] Howard | Mechanics of motor proteins and the cytoskeleton[END_REF], from the mechanics of DNA strands and the movement of polymer chains to complex interaction involving cytoskeletal microtubules and actin cross-linking architectures and filament-bundles and flagella [START_REF] Gadêlha | Nonlinear instability in flagellar dynamics: a novel modulation mechanism in sperm migration?[END_REF][START_REF] Camalet | Self-organized beating and swimming of internally driven filaments[END_REF][START_REF] Bourdieu | Spiral defects in motility assays: A measure of motor protein force[END_REF][START_REF] Goldstein | Nonlinear dynamics of stiff polymers[END_REF][START_REF] Fu | Beating patterns of filaments in viscoelastic fluids[END_REF][START_REF] Yu | Experimental investigations of elastic tail propulsion at low reynolds number[END_REF][START_REF] Olson | Modeling the dynamics of an elastic rod with intrinsic curvature and twist using a regularized Stokes formulation[END_REF][START_REF] Tornberg | Simulating the dynamics and interactions of flexible fibers in stokes flows[END_REF][START_REF] Kantsler | Fluctuations, Dynamics, and the Stretch-Coil Transition of Single Actin Filaments in Extensional Flows[END_REF][START_REF] Sanchez | Spontaneous motion in hierarchically assembled active matter[END_REF][START_REF] Brangwynne | Microtubules can bear enhanced compressive loads in living cells because of lateral reinforce-ment[END_REF][START_REF] Plouraboue | Identification of internal properties of fibers and micro-swimmers[END_REF][START_REF] Heussinger | Statics and dynamics of the wormlike bundle model[END_REF][START_REF] Claessens | Helical twist controls the thickness of factin bundles[END_REF][START_REF] Mireille | Actin-binding proteins sensitively mediate f-actin bundle stiffness[END_REF]. The elastohydrodynamics of filaments permeate different branches in mathematical sciences, physics and engineering, and their cross-fertilising intersects with biology and chemistry. The wealth of theoretical and experimental studies on the movement of semi-flexible filaments, termed here as filaments, is extensive, thus reflecting the fundamental importance of the physical interactions marrying fluid and elastic phenomena. Hitherto the elastohydrodynamics of active and passive filaments have shed new light into bending, buckling, active matter and self-organisation, as well as bulk material properties of interacting active and passive fibres across disciplines [START_REF] Gadêlha | Nonlinear instability in flagellar dynamics: a novel modulation mechanism in sperm migration?[END_REF][START_REF] Camalet | Self-organized beating and swimming of internally driven filaments[END_REF][START_REF] Bourdieu | Spiral defects in motility assays: A measure of motor protein force[END_REF][START_REF] Goldstein | Nonlinear dynamics of stiff polymers[END_REF][START_REF] Fu | Beating patterns of filaments in viscoelastic fluids[END_REF][START_REF] Yu | Experimental investigations of elastic tail propulsion at low reynolds number[END_REF][START_REF] Olson | Modeling the dynamics of an elastic rod with intrinsic curvature and twist using a regularized Stokes formulation[END_REF][START_REF] Tornberg | Simulating the dynamics and interactions of flexible fibers in stokes flows[END_REF][START_REF] Kantsler | Fluctuations, Dynamics, and the Stretch-Coil Transition of Single Actin Filaments in Extensional Flows[END_REF][START_REF] Sanchez | Spontaneous motion in hierarchically assembled active matter[END_REF][START_REF] Hines | Bend propagation in flagella. II. Incorporation of dynein cross-bridge kinetics into the equations of motion[END_REF][START_REF] Coy | The counterbend dynamics of cross-linked filament bundles and flagella[END_REF][START_REF] Schoeller | From flagellar undulations to collective motion: predicting the dynamics of sperm suspensions[END_REF].

The movement of semi-flexible filaments bridges complex fluid and elastic interactions within a hierarchy of different approximations [START_REF] Lauga | The hydrodynamics of swimming microorganisms[END_REF]. Here, we focus on systems governed by low Reynolds number inertialess hydrodynamics [START_REF] Purcell | Life at low reynolds number[END_REF]. Both the hydrodynamic and elastic interactions of filaments are greatly simplified by exploiting the filament slenderness [START_REF] Ss Antman | Nonlinear Problems of Elasticity[END_REF][START_REF] Lauga | The hydrodynamics of swimming microorganisms[END_REF], reducing the dynamics to effectively a one-dimensional system [START_REF] Hines | Bend propagation in flagella. I. Derivation of equations of motion and their simulation[END_REF]. A variety of model families have been developed exploiting such slenderness property, and thus it would be a challenging task * hermes.gadelha@york.ac.uk to review the wealth of theoretical and empirical developments to date here. Instead we direct the reader to excellent reviews on the subject [START_REF] Lauga | The hydrodynamics of swimming microorganisms[END_REF][START_REF] Thomas R Powers | Dynamics of filaments and membranes in a viscous fluid[END_REF][START_REF] Michael | Flapping and bending bodies interacting with fluid flows[END_REF][START_REF] Brennen | Fluid mechan-ics of propulsion by cilia and flagella[END_REF].

In a nutshell, two theoretical descriptions are popularly used: the discrete and continuous formulation. In discrete models, such as the beads model, gears model, n-links model, or similarly worm-like chain models (see [START_REF] Plouraboue | Identification of internal properties of fibers and micro-swimmers[END_REF][START_REF] Heussinger | Statics and dynamics of the wormlike bundle model[END_REF][START_REF] Schoeller | From flagellar undulations to collective motion: predicting the dynamics of sperm suspensions[END_REF][START_REF] Michael | Flapping and bending bodies interacting with fluid flows[END_REF][START_REF] Alouges | Self-propulsion of slender micro-swimmers by curvature control: N-link swimmers[END_REF][START_REF] Alouges | Can magnetic multilayers propel artificial microswimmers mimicking sperm cells?[END_REF][START_REF] Giraldi | Controllability and optimal strokes for N-link micro-swimmer[END_REF][START_REF] Giraldi | Optimal design of the three-link purcell swimmer[END_REF][START_REF] Delmotte | A general formulation of Bead Models applied to flexible fibers and active filaments at low Reynolds number[END_REF][START_REF] Cosentino Lagomarsino | Hydrodynamic Induced Deformation and Orientation of a Microscopic Elastic Filament[END_REF][START_REF] Montenegro-Johnson | Spermatozoa scattering by a microchannel feature: an elastohydrodynamic model[END_REF][START_REF] Charles | Computer simulation of flagellar movement x: doublet pair splitting and bend propagation modeled using stochastic dynein kinetics[END_REF][START_REF] Johnson | Flagellar hydrodynamics[END_REF]), the filament is broken into a discrete number of units, such as straight segments, spheres or ellipsoids. The elastic interaction coupling neighboring nodes/joints is described via constitutive energy functionals or via discrete elastic connectors encoding the filament's resistance to bending. The shape of each discrete unit defines the hydrodynamical interaction, i.e. hydrodynamics of spheres for the beads and gear model, and slender-body hydrodynamics for straight rod-like elements. Continuous models, on the other hand, recur to partial differential equation (PDE) systems to describe the combined action from fluid-structure interactions [START_REF] Tornberg | Simulating the dynamics and interactions of flexible fibers in stokes flows[END_REF][START_REF] Hines | Bend propagation in flagella. II. Incorporation of dynein cross-bridge kinetics into the equations of motion[END_REF]. The dynamics arises through the total balance of contact forces and moments along the filament [START_REF] Ss Antman | Nonlinear Problems of Elasticity[END_REF]. This formalism results invariably in a nonlinear PDE system coupling a hyperdiffusive fourth-order PDE with a second-order boundary value problem (BVP) required to ensure inextensibility via Lagrange multipliers [START_REF] Gadêlha | Nonlinear instability in flagellar dynamics: a novel modulation mechanism in sperm migration?[END_REF][START_REF] Tornberg | Simulating the dynamics and interactions of flexible fibers in stokes flows[END_REF][START_REF] Hines | Bend propagation in flagella. II. Incorporation of dynein cross-bridge kinetics into the equations of motion[END_REF], in addition to six boundary conditions and initial configuration for closeness. The geometrical coupling guarantees that the order of the PDE remains unchanged under transformation of variables, from the position of filament centerline X(s, t) at an arclength s and time t relative to a fixed frame of reference, to tangent angle θ(s, t) or curvature κ(s, t) of the filament [START_REF] Goldstein | Nonlinear dynamics of stiff polymers[END_REF][START_REF] Wiggins | Flexive and propulsive dynamics of elastica at low reynolds number[END_REF]. While the equivalence between discrete and continuous models is generally not available, both theoretical frameworks suffer from numerical instability and stiffness arising from the nonlinear geometrical coupling between the filament's curvature and its inextensibility constraint [START_REF] Tornberg | Simulating the dynamics and interactions of flexible fibers in stokes flows[END_REF][START_REF] Klapper | Biological Applications of the Dynamics of Twisted Elastic Rods[END_REF]. Nonlinearities originated from curvature are well known to drive numerical instability in moving boundary systems, as found in pattern formation of interfacial flows driven by surface tension [START_REF] Thomas | Removing the stiffness from interfacial flows with surface tension[END_REF], as well as in elastic and fluid stresses in shells and fluid membranes [START_REF] Thomas | Removing the Stiffness of Curvature in Computing 3-D Filaments[END_REF][START_REF] Rodrigues | A semi-implicit finite element method for viscous lipid membranes[END_REF]. The latter often requires numerical regularisation, such as the small-scale decomposition [START_REF] Thomas | Removing the stiffness from interfacial flows with surface tension[END_REF][START_REF] Thomas | Removing the Stiffness of Curvature in Computing 3-D Filaments[END_REF].

Contact forces of inextensible filaments are not determined constitutively [START_REF] Stuart S Antman | Nonlinear problems of elasticity[END_REF], and require Lagrange multipliers to ensure strict length constraints. The resulting systems in both discrete and continuous models are thus prone to numerical instabilities [5, 15, 16, 21, 24-28, 33, 35-37, 39]. This is despite the fact that discrete models automatically satisfy the length constraint by construction [START_REF] Camalet | Self-organized beating and swimming of internally driven filaments[END_REF][START_REF] Plouraboue | Identification of internal properties of fibers and micro-swimmers[END_REF][START_REF] Schoeller | From flagellar undulations to collective motion: predicting the dynamics of sperm suspensions[END_REF][START_REF] Hines | Bend propagation in flagella. I. Derivation of equations of motion and their simulation[END_REF][START_REF] Lauga | The hydrodynamics of swimming microorganisms[END_REF][START_REF] Delmotte | A general formulation of Bead Models applied to flexible fibers and active filaments at low Reynolds number[END_REF][START_REF] Cosentino Lagomarsino | Hydrodynamic Induced Deformation and Orientation of a Microscopic Elastic Filament[END_REF][START_REF] Charles | Computer simulation of flagellar movement x: doublet pair splitting and bend propagation modeled using stochastic dynein kinetics[END_REF][START_REF] Christopher P Lowe | Dynamics of filaments: modelling the dynamics of driven microfilaments[END_REF], or equivalently the tangent angle formulation θ(s, t) for continuous models [START_REF] Camalet | Self-organized beating and swimming of internally driven filaments[END_REF][START_REF] Hines | Bend propagation in flagella. I. Derivation of equations of motion and their simulation[END_REF][START_REF] Wiggins | Trapping and wiggling: elastohydrodynamics of driven microfilaments[END_REF][START_REF] Young | Hydrodynamic interactions between two semiflexible inextensible filaments in Stokes flow[END_REF], which intrinsically preserves lengths by definition. In continuum models, penalization strategies are required to regularize length errors that vary dynamically [START_REF] Gadêlha | Nonlinear instability in flagellar dynamics: a novel modulation mechanism in sperm migration?[END_REF][START_REF] Tornberg | Simulating the dynamics and interactions of flexible fibers in stokes flows[END_REF][START_REF] Montenegro-Johnson | Spermatozoa scattering by a microchannel feature: an elastohydrodynamic model[END_REF]. The number of boundary conditions is large, and the non-linear coupling makes complex boundary systems challenging [START_REF] Montenegro-Johnson | Spermatozoa scattering by a microchannel feature: an elastohydrodynamic model[END_REF], as we discuss below. The latter imposes severe spatiotemporal discretisation constraints, increases the computational time and numerical errors, especially for deformations involving large curvatures.

The aim of this paper is to resolve the bottleneck arising from the interaction between the hyperdiffusive elastohydrodynamics and the inextensibility constraint. For this, we consider a hybrid continuum-discrete approach. The coarse-graining formulation is a direct consequence of the asymptotic integration of the moment balance system along coarse-grained rod-like elements. No explicit length constraint is required, and the resulting linear system is structurally stable and does not require explicit computation of the unknown force distribution aforementioned. Numerical implementation is straightforward and allows for faster computation, over than a hundred times faster, with increasingly better performance for tolerance to error below 1%. This greatly decreases the implementation complexity, the number of boundary conditions required, computational time and numerical stiffness. The coarse-graining framework can be readily applied to systems that would be prohibitive using the classical system, as we discuss in section IV. Furthermore, we show that the coarse-graining implementation is simple, and generalisations for complex interaction of multiple rods, Brownian polymer dynamics, active filaments and nonlocal hydrodynamics are straightforward.

This paper is structured as follows: first, we describe the momentum balance for an inextensible filament embedded in an inertialess fluid, and re-derive the classical elastohydrodynamic system in Section II. For this, we employ the standard elastic theory for slender-rods and lowest order hydrodynamic approximation for slender-bodies, i.e. Resistive Forces Theory [START_REF] Gray | The propulsion of sea-urchin spermatozoa[END_REF]. In Section III, we introduce the asymptotic coarse-graining formulation. In Section IV, we contrast the classical elastohydrodynamics and the coarse-graining formulations and their respective numerical performances. Finally, we abandon the classical elastohydrodynamic formulation and explore several systems with the coarse-graining approach in Section V. We investigate the buckling instability of a bio-filament [START_REF] Bourdieu | Spiral defects in motility assays: A measure of motor protein force[END_REF][START_REF] Tornberg | Simulating the dynamics and interactions of flexible fibers in stokes flows[END_REF], magnetically-driven micro-swimmers [START_REF] Alouges | Can magnetic multilayers propel artificial microswimmers mimicking sperm cells?[END_REF][START_REF] Giraldi | Local controllability of the two-link magneto-elastic micro-swimmer[END_REF][START_REF] Gutman | Simple model of a planar undulating magnetic microswimmer[END_REF][START_REF] Gadêlha | On the optimal shape of magnetic swimmers[END_REF], the counterbend phenomenon for effectively one-dimensional filament-bundles [START_REF] Coy | The counterbend dynamics of cross-linked filament bundles and flagella[END_REF][START_REF] Gadêlha | The counterbend phenomenon in flagellar axonemes and cross-linked filament bundles[END_REF][START_REF] Gadelha | The filament-bundle elastica[END_REF] and the driven motion of a two-filament bundle assembly. Except from the magnetic swimmer, the other bio-filament systems are entirely novel in the literature. We also provide the Matlab code via github free repository that can be used as a basis for further generalisations. The link to this repository is available at the end of the paper.

II. CLASSICAL ELASTOHYDRODYNAMIC FILAMENT THEORY

Consider an inextensible elastic rod of length L, parametrised by its arclength. The position of a point of arclength s on the filament is denoted by x(s). The filament can experience two types of forces [START_REF] Ss Antman | Nonlinear Problems of Elasticity[END_REF]: contact forces n(s) within the filament, and external forces, that have a force density f (s) (by unit of length) ? later this will incorporate the hydrodynamic interaction. The second Newton's law ensures the momentum balance:

n s + f = 0, (1)
m s + x s × n = 0, (2)
where the subscripts denote derivatives with respect to arclength s, m(s) is the contact moment, and external moments are neglected. The dynamical system (1)-( 2) is further specified by the geometry of the deformation and the constitutive relations characterising the filament.

Here we focus on inextensible, unshearable hyperelastic filaments undergoing planar deformations. Thus the contact forces are not defined constitutively whilst the bending moment is linearly related to the local curvature [START_REF] Ss Antman | Nonlinear Problems of Elasticity[END_REF]. The position of the filament centerline is denoted by x(s, t). The Frenet basis moving with the filament is given by (e , e ⊥ ), tangent and normal vector respectively. The angle between the x-axis of frame of reference and e is θ, where the normal vector to the plane in which deformation occurs is e z , see Figure 1. The filament is characterised by a bending stiffness E b , and thus elastic moments are simply m(s) = E b θ s e z . The latter can be used in conjuction with (2), using θ ss e ⊥ = x sss , to get

n(s) = -E b x sss e ⊥ + τ e , (3)
where τ (s) is the unknown Lagrange multiplier. The hydrodynamical friction experienced by a slender-body in low Reynolds number regime can be simplified asymptotically by employing the Resistive Force Theory [START_REF] Gray | The propulsion of sea-urchin spermatozoa[END_REF], in which hydrodynamic friction is related with to velocity via an anisotropic operator

f (s) = -ξ(e ⊥ • x t )e ⊥ -η(e • x t )e , (4)
where η and ξ are the parallel and perpendicular drag coefficients, respectively. Using (1) and nondimensionalizing the system with respect to the length scale L, time scale ω -1 , force density E b /L 3 , and noticing that e = x s , the dimensionless elatohydrodynamic equation for a passive filament deforming in a viscous environment reads:

Sp 4 x t = -x ssss -(γ -1)(x s • x ssss )x s + (τ x ss + γτ s x s ), (5)
with the dimensionless parameters Sp = L(ωξ/E b ) 1/4 and γ = ξ/η. The unknown line tension is obtained by invoking the inextensibility constraint

∂ ∂t (x s • x s ) = 0, (6)
which together with (1) provides a nonlinear secondorder boundary value problem for the line tension, or Lagrange multiplier,

γτ ss -(x ss •x ss )τ = -3γ(x sss •x sss )-(3γ +1)(x ss •x ssss ). (7)
In practice, however, this inextensibility condition is prone to numerical errors [START_REF] Tornberg | Simulating the dynamics and interactions of flexible fibers in stokes flows[END_REF] causing the filament length to vary over time. A penalisation term is thus added on the right-hand side of [START_REF] Goldstein | Nonlinear dynamics of stiff polymers[END_REF] to remove spurious incongruousnesses of the tangent vector [START_REF] Gadêlha | Nonlinear instability in flagellar dynamics: a novel modulation mechanism in sperm migration?[END_REF][START_REF] Tornberg | Simulating the dynamics and interactions of flexible fibers in stokes flows[END_REF][START_REF] Montenegro-Johnson | Spermatozoa scattering by a microchannel feature: an elastohydrodynamic model[END_REF].

The non-linear, geometrically exact elastohydrodynamical system Eqs. ( 5) and ( 7) requires a set of initial and boundary conditions for closeness. At the filament boundaries, either the force/torque are specified or the endpoints kinematics is imposed. Here we consider the distal end free from external forces and moments ∀t, -x sss (L, t) + τ x s (L, t) = 0, x ss (L, t) = 0.

At the proximal end, several scenarios may be considered: (i) Free torque and force condition, thus the above equations are satisfied at s = 0. (ii) Pivoting, pinned or hinged condition: the extremity has a fixed position but it is free rotate around it, x t (0, t) = 0, x ss (0, t) = 0. (iii) Clamped condition: the extremity has a fixed position and orientation, x t (0, t) = 0, x st (0, t) = 0. Finally, initial conditions are required for closeness. Boundary conditions for the Lagrange multiplier τ boundary value problem [START_REF] Goldstein | Nonlinear dynamics of stiff polymers[END_REF] are derived from the above boundary constraints accordingly, and are generally unknown. Thus the PDE system Eqs. ( 5) and ( 7) is solved simultaneously.

III. ASYMPTOTIC COARSE-GRAINED ELASTOHYDRODYNAMICS

In this section we describe the asymptotic coarsegraining formulation by integrating the moment balance system (1)- [START_REF] Alberts | Molecular Biology of the Cell[END_REF]. The aim of this formulation is to bypass the complexity arising from the unknown contact forces (3), not defined constitutively, thus requiring the Lagrange multiplier τ to ensure inextensibility [START_REF] Goldstein | Nonlinear dynamics of stiff polymers[END_REF]. Integrating the balance of contact forces over the whole filament (1), we get

n(L) -n(0) + L 0 f (s) ds = 0,
where external contact forces are given by n(L) = n(0) = 0. The filament is conveniently divided in N rod-like segments with ∆s = L/N . In the asymptotic limit of a small nonzero ∆s, the filament can be coarse-grained via a semi-Riemann sum

N i=1 i∆s (i-1)∆s f (s) ds = N i=1 F i = 0, (8)
so that F i represents the total contact force experienced by the i-th element. For a filament free from external torques, m(L) = m(0) = 0, the total moment balance (2) simply reads N i=1 i∆s (i-1)∆s

x s (s) × n(s) ds = 0.

After partial integration, and exploiting the force balance (1), we find

N i=1 i∆s (i-1)∆s (x(s) -x 0 ) × f (s)ds = N i=1 M i,x0 = 0, (9)
which is independent of n(s). Similarly, M i,x0 is the i-th moment about x 0 = x(0). As required, the total moment balance above is independent of the bending moment.

Integration by parts of ( 2) for the j-th element instead introduces the effect of the elastic bending moments via

N i=j M i,xj = m j , (10)
where m j = m((j -1)L/N ) and j = 2, . . . , N . Here, it is convenient to write the moment M i,xj relative to x j , whilst m j is the bending moment contribution from the j-th element and, as previously, it is linearly related to the curvature m(s) = E b θ s e z . Distinct finite difference approximations maybe employed for θ s [START_REF] Gadêlha | Nonlinear instability in flagellar dynamics: a novel modulation mechanism in sperm migration?[END_REF][START_REF] Tornberg | Simulating the dynamics and interactions of flexible fibers in stokes flows[END_REF][START_REF] Delmotte | A general formulation of Bead Models applied to flexible fibers and active filaments at low Reynolds number[END_REF]. For simplicity, we use the backward difference formulae,

m i = κ α i e z = κ (θ i -θ i-1 )e z , (11)
where κ = E b /∆s. The contact force f (s) in ( 8)-( 10) is given by the hydrodynamic coupling (4).

We introduce now the geometry of deformation for centerline x(s, t) for the the coarse-grained elastohydrodynamic system. It is convenient to describe filament centerline in terms of the tangent angle θ, see Fig. 1, where x(s, t) = x 0 + L 0 (cos θ, sin θ)ds, so that in the coarsegraining limit, we have

x i = x 0 + i-1 k=1 (cos θ k , sin θ k )∆s ( 12
)
for i = 1, . . . , N , thus

x i = x((i -1)L/N ) = (x i , y i ),
where θ k is the angle between e x and e k, of the k-th element, e k, = (cos θ k , sin θ k ), e k,⊥ = (-sin θ k , cos θ k ), thus ensuring inextensibility intrinsically. Due to the curvature dependence in [START_REF] Olson | Modeling the dynamics of an elastic rod with intrinsic curvature and twist using a regularized Stokes formulation[END_REF], it is simpler to define the tangent angle in terms of the backward difference angle,

α i = θ i -θ i-1 , i.e.
the angle between e i-1, and e i, ,

θ i = i k=1 α k , (13)
by setting α 1 = θ 1 . This reduces the filament centerline x(s, t) to only N + 2 parameters (x 0 , y 0 , α 1 , . . . , α N ) (see [START_REF] Alouges | Self-propulsion of slender micro-swimmers by curvature control: N-link swimmers[END_REF]). The total force balance (8) and torque balance ( 9), together with N -1 equations for the internal moment balance [START_REF] Olson | Modeling the dynamics of an elastic rod with intrinsic curvature and twist using a regularized Stokes formulation[END_REF], further closes the elastohydrodynamic system with N + 2 scalar equations. The resistive force theory approximation (4) allows for further analytical progress, as described in the seminal work by Gray and Hancock [START_REF] Gray | The propulsion of sea-urchin spermatozoa[END_REF], by expressing the anisotropic operator in terms of tangent angle. Thus F i and M i,xj can be integrated analytically over the coarsegrained elements and expressed in terms of ( ẋi , θi ), where the overdots represent time derivatives. For simplicity, we assume linear interpolation of the shape function along the length s of each coarse-grained element. Thus from [START_REF] Kantsler | Fluctuations, Dynamics, and the Stretch-Coil Transition of Single Actin Filaments in Extensional Flows[END_REF] the velocity of the centreline can be expressed as

ẋi (s) = ẋi + (s -(i -1)∆s) θi e i,⊥ .
At the fixed frame of reference, the contact forces over the i-th coarse-element reads [START_REF] Alouges | Can magnetic multilayers propel artificial microswimmers mimicking sperm cells?[END_REF][START_REF] Giraldi | Local controllability of the two-link magneto-elastic micro-swimmer[END_REF]

F i = η∆s Λ(θ i ) T ẋi ∆s θi , (14)
where

Λ(θ) =   -cos 2 θ -γ sin 2 θ (γ -1) cos θ sin θ (γ -1) cos θ sin θ -γ cos 2 θ -sin 2 θ 1 2 sin θ -1 2 cos θ   .
Similarly, the contact moment at the i-th element relative to x j takes the form

M i,xj = η∆s   ∆s x i -x j y i -y j   T G(θ i )   ẋi ẏi ∆s θi   e z (15)
with

G(θ) =   -1 2 cos θ 1 2 sin θ -1 3 (1-γ) cos θ sin θ -cos 2 θ-γ sin 2 θ -1 2 cos θ γ cos 2 θ+sin 2 θ (γ-1) cos θ sin θ -1 2 sin θ   , ( 16
)
where the above set of 3N variables

X 3N = (x 1 , . . . , x N , y 1 , . . . , y N , θ 1 , . . . , θ N ) can be reduced to N + 2 variables X = (x 1 , y 1 , θ 1 , . . . , α N ) via X 3N =
QX, as described in detail in the Appendix. The coarse-grained elastohydrodynamics ( 8)-( 15) reduces to a nondimensional system of ordinary differential equations

Sp 4 AQ Ẋ = B, ( 17
)
where Sp is the "sperm number" as defined in ( 5), following the same recalling used for the classical system in the previous section. The general form of the matrices A and B are also defined in the Appendix.

IV. COMPARISON BETWEEN THE CLASSICAL AND COARSE-GRAINED FORMULATIONS

The classical elastohydrodynamic system is solved using the numerical scheme used in [START_REF] Tornberg | Simulating the dynamics and interactions of flexible fibers in stokes flows[END_REF][START_REF] Montenegro-Johnson | Spermatozoa scattering by a microchannel feature: an elastohydrodynamic model[END_REF][START_REF] Gadêlha | Nonlinear instability in flagellar dynamics: a novel modulation mechanism in sperm migration[END_REF], briefly described here for comparison purpose. The system (5)-( 7) couples nonlinearly a fourth-order partial differential equations with a second-order boundary value problem for the unknown line tension, yielding severe constraints for the time-stepping size if all terms are treated explicitly [START_REF] Tornberg | Simulating the dynamics and interactions of flexible fibers in stokes flows[END_REF][START_REF] Gadêlha | Nonlinear instability in flagellar dynamics: a novel modulation mechanism in sperm migration[END_REF]. This is resolved by employing a secondorder implicit-explicit method (IMEX) [START_REF] Ascher | Implicitexplicit methods for time-dependent partial differential equations[END_REF], where only the higher-order terms are treated implicitly, and before any previous time level is available, the second-order IMEX is replaced by the first-order IMEX [ibid]. The arclength discretization is uniform with N intervals, while second-order divided differences are used to approximate spatial derivatives, in which skew operators are applied at the boundaries [START_REF] Tornberg | Simulating the dynamics and interactions of flexible fibers in stokes flows[END_REF][START_REF] Gadêlha | Nonlinear instability in flagellar dynamics: a novel modulation mechanism in sperm migration[END_REF]. The timestep thus can be chosen to be the same order of magnitude as the grid spacing, yielding a first-order constraint for timestepping. Each iteration is made in two steps: first the boundary value problem for the Lagrange multiplier τ , Eq. ( 7), is solved for a given filament configuration x at time t n , from which Eq. ( 5) can be timestepped to obtain new filament configuration x at t n+1 . Theoretical and empirical validation of this scheme is provided in Refs. [START_REF] Tornberg | Simulating the dynamics and interactions of flexible fibers in stokes flows[END_REF][START_REF] Montenegro-Johnson | Spermatozoa scattering by a microchannel feature: an elastohydrodynamic model[END_REF][START_REF] Gadêlha | Nonlinear instability in flagellar dynamics: a novel modulation mechanism in sperm migration[END_REF].

The coarse-grained elastohydrodynamic system [START_REF] Claessens | Helical twist controls the thickness of factin bundles[END_REF] does not require evaluation of Lagrange multipliers. The inextensibility is satisfied by model construction, while the asymptotic corse-graining allows for a straightforward semi-analytic relation between the filament kinematics and the elastohydrodynamic forces and torques. The ODE system ( 17) is straightforward to implement using any solver or numerical scheme of choice. To illustrate this, we solved (17) using the built-in ode15s Matlab solver, which uses a variable-order, variablestep method based on the numerical differentiation formulas of orders 1 to 5 [START_REF] Lawrence | The Matlab ODE suite[END_REF]. All computations for both the classical and coarse-grained formulation were conducted on an Intel Core i5-6500 processor 3.20 GHz, using Matlab software.

In what follows, we study the transient dynamics of a filament decaying from an initial configuration [START_REF] Coy | The counterbend dynamics of cross-linked filament bundles and flagella[END_REF][START_REF] Wiggins | Flexive and propulsive dynamics of elastica at low reynolds number[END_REF][START_REF] Wiggins | Trapping and wiggling: elastohydrodynamics of driven microfilaments[END_REF], set to be a half-circle and a parabola. The filament thus unbends to its straight equilibrium configuration. Fig. 2 contrasts the coarse-grained filament configuration and difference angle α for N = 5 and N = 50. A remarkable agreement between the dynamics of a very coarse filament (with only 5 segments) and N = 50 is observed. Indeed, the bulk-part elastohydrodynamics is well captured by the the coarser system. This is despite the shape inaccuracies associated with high curvatures. The shape discrepancies are continuously reduced as the the filament approaches the equilibrium state. A higher number of segments smoothes the elastohydrodynamic hyperdiffusion profile, thus acting as an effective spatial spline interpolation for each filament configuration in time (compare the angle plots in Fig. 2). De facto, the FIG. 3. Comparison between the classical and of the coarse-grained systems for increasing N . A fine discretisation for the classical solution is fixed for all cases. (a-c) show the aspect compare the classical (red) and the corse-grained (black) for N = 10, 30, 75, as indicated on the Dmax plot. The right-hand column exposes the detailed shape of small parts of the filaments, indicated by the small gray rectangles. The good accuracy of the corse-grained solution is observed even for very small number of segments N . coarse-grained system is able to capture the filament elastohydrodynamics with excellent accuracy even for very coarse filaments when compared with the classical system. This is agreement with Fig. 3 which depicts the discrepancy between the classical, x c , and the coarsegrained, x cg , solutions via

D max = max s,t |x c -x cg |,
so that D max = 0 if the agreement is exact [START_REF] Gadêlha | Nonlinear instability in flagellar dynamics: a novel modulation mechanism in sperm migration?[END_REF]. For D max ≈ 0.1 or less, the agreement is observed to be very good, as illustrated by the shapes in (a)-(c) for an increasing N (Fig. 3). For D max < 0.05 the difference between the classical and coarse-grained solutions is almost undistinguishable, see for example the detailed insets in Fig. 3(b,c) on the right column. D max decays approximately with 1/N in Fig 3, as expected from linear interpolation of curves. The dynamics is thus weakly influenced by the coarse-graining refinement level of the system. This feature may be exploited to reduce the dimensionality of the linear system while keeping a reasonable accuracy of the dynamics. By construction the asymptotic integrals along coarse-grained segments will tend to zero for infinitesimal ∆s, as detailed in Eqs. [START_REF] Fu | Beating patterns of filaments in viscoelastic fluids[END_REF] and [START_REF] Yu | Experimental investigations of elastic tail propulsion at low reynolds number[END_REF]. This introduces a higher bound for N . For N > 80, or equivalently for ∆s/L < 1%, the system becomes numerically stiff and requires an excessive timestepping refinement.

We further compare the computational time of both formulations in Table IV. We focus on the numerically stiff regime of the classical system, occurring at low sperm number Sp, for effectively stiff filaments, and high curvatures. N = 70 was used for all simulations of the coarse-grained model. The classical system however requires distinct spatiotemporal discretisations according to total length error associated to each parameter regime [START_REF] Tornberg | Simulating the dynamics and interactions of flexible fibers in stokes flows[END_REF], chosen to give the smallest computing time. Table IV shows that the coarse-grained model has a maximum time duration of 3 seconds for Sp = 2. The computational time for the coarse-grained system increases as the Sp is reduced, although the accretion is marginal. On the other hand, the classical system suffers dramatically from numerical stiffness. For the lowest length-error tolerance imposed, 1%, the computational time increases by a factor of 74 for the half-circle case when Sp is reduced. The time required for the the parabola is on the order of hours. The latter is exacerbated when length-error tolerance is reduced to 0.01%. In this case, even for Sp = 4, the computational times surpasses one hour to solve the parabola initial shape. De facto, this regime is known to be numerically challenging, as one approaches the limit of validity of the resistive-force theory. Elastic forces and torques are very large compared to the viscous dissipation, characterised by a snap-through, fast unbending of the filament towards the relaxation state, thus requiring very fine time-stepping to resolve this fast transient phase.

V. BIO-APPLICATIONS

In this section we apply the coarse-grained formulation for a variety of elastohydrodynamic systems and boundary conditions found in biology, emphasising the simplicity and robustness of this approach. We focus on the filament buckling problem (Subsection V A), well known for its numerical stiffness, instability and challenges associated with boundary forces. We also study the magnetic actuation of swimming filament (Subsection V B) and the dynamics of cross-linked filament-bundles and flagella (Subsection V C), including explicit elastic coupling among coarse-grained filaments. Other interactions, via boundary forces/torques or their distribution along the filament, such as in gravitational and electromagnetic effects, as well as background flows, may be accounted effortlessly within this formulation.

A. Filament buckling instability

The coarse-grained system Eq. ( 17) is particularly suitable for non-trivial boundary constraints, such as in a fixed or moving boundary cases. In such situations, either the position (angle) or the force (torque) is imposed at the extremities. Here we consider an initially straight filament with the proximal end, s = 0, pinned, so that the position is fixed but free from external torques. The distal boundary, s = 1, moves with an imposed velocity towards the proximal end, although free from external torques. Post-transient dynamics, at the steady-state, leads to the celebrated Euler-elastica boundary value problem which admits exact solutions in terms of elliptic functions [START_REF] Ss Antman | Nonlinear Problems of Elasticity[END_REF][START_REF] Gadelha | The filament-bundle elastica[END_REF]. In this limit, contact forces balance exactly the the imposed load, and the shape is defined by the torque balance [START_REF] Ss Antman | Nonlinear Problems of Elasticity[END_REF][START_REF] Gadelha | The filament-bundle elastica[END_REF]. The transient dynamics of a filament buckling in a viscous fluid however depends to the distribution of both contact forces and torques that evolves in time. This requires the evaluation of unknown boundary forces at the proximal end, s = 0, while the distal end, s = 1, follows prescribed kinematics. We consider that the two endpoints are driven towards each other at a constant speed. This is a nontrivial task within the classical elastohydrodynamic formulation, as the usual separation between Eqs. ( 5) and ( 7) for the customary free force/torque condition is not possible. Instead, the unknown tension line at the boundary, required for the inextensibility constraint, is nonlinearly coupled with the hyperdiffusive elastohydrodynamics ( 5). This difficulty is augmented by the fact that the buckling instability is instigated by excessive compressive force distribution to a critical level in which the filament cannot uphold and buckles. This occurs via a pitchfork bifurcation with equal chances to buckle in either direction, as θ → -θ is also a solution [START_REF] Gadelha | The filament-bundle elastica[END_REF]. The initial straight configuration thus requires an infinitesimal bias to trigger the unstable modes dynamically.

The buckling phenomena is however straightforward within the coarse-grained framework. For this, we introduce unknown contact forces, respectively, for the proximal and distal ends P 0 and P N , and associated moments in the coarse-grained system Eq. ( 17), which reduces to

N i=1 F i + P 0 + P N = 0 N i=j M i,xj + L N,xj = m j δ j , (18)
for j = 1, . . . , N and δ j is defined δ 1 = 0 and δ j =1 = 1, where L N,xi is the moment induced by P N with respect to the point x i , L N,xi = (x N +1 -x i ) × P N . The unknown forces are supplemented by the kinematic constraints ẋ0 = (k/2, 0) and ẋN = (-k/2, 0), where k is positive parameter. The detailed form of the linear system may be found in the Appendix, section VII C. Fig. 4 depicts the shape evolution for the first three initially unstable modes at the onset of the instability and beyond, for Sp = 2, 4, 8 from Eqs. [START_REF] Mireille | Actin-binding proteins sensitively mediate f-actin bundle stiffness[END_REF]. They capture the fast transient solutions for an effectively stiff filament, Sp = 2 (also the numerically stiff case), which rapidly collapses into the static, steady-state Euler-elastica solutions for the first two modes, top and middle plots in Fig. 4 for Sp = 2. Complex mode competition is easily accessible. This is demonstrated by the third mode dynamics (bottom row). The coarse-grained system thus unveils the cascade of unstable modes towards the stable shape, see third-mode for Sp = 8. For Sp = 2, these transitions occur via fast distal-proximal travelling waves, with distinct wave duration and speed, as demonstrated by the spatiotemporal-α profiles. As Sp increases, more unstable modes are instigated, giving rise to a wide diversity of nonlinear phenomena and interactions among the Here N = 36 and k = 1.5. The filament is displayed at regular intervals of time, coloured from blue (beginning) to red (end). Three different initial conditions lead to different outcomes. The colormap graphs show time on the x-axis and link number (discrete arclength) on the y-axis. The colours show the curvature (angles) over time, from blue for a highly negative curvature to red for a highly positive one. The filament quickly takes a waveform with fewer waves as time goes on. The higher the sperm number is, the longer it takes for the waves to vanish (note that the total time on the graphs is longer as the sperm number increases).

participating modes, in particular mode-coupling competition, see for exemple Sp = 4, 8 in Fig. 4. Investigation of mode stability at advanced, nonlinear stages is also possible using this formulation, for instance, by studying the energy landscape and bifurcation diagrams. Despite the current gap in the literature, detailed nonlinear investigation of the buckling phenomenon in a viscous environment is outside the scope of the present paper and will be explored elsewhere.

B. Magnetic swimmer

Following recent resurgence of interest on magnetically driven elastic fibres for the purpose of locomotion at micro or macro-scale [START_REF] Gadêlha | On the optimal shape of magnetic swimmers[END_REF][START_REF] Alouges | Purcell swimmer controlled by external magnetic fields[END_REF][START_REF] Dreyfus | Microscopic artificial swimmers[END_REF], we solve the coarsegraining of a magnetic filament under the influence of an external magnetic field. In this section, we consider a magnetic filament with a homogeneous magnetic moment µ along its arclength, directed towards the tangential direction, under the action of an uniform, time-varying sinusoidal oscillatory magnetic field H(t). The new terms arising from external torques are thus straightforward, as it only requires the addition of a distribution of the magnetic moments in Eq. ( 17), m m i = µ i e i, × H, and reads

N i=1 F i = 0 N i=j (M i,xj + m m i ) = m j δ j , for j = 1 . . . N . (19)
Fig. 5 shows an example of a partially magnetised swimmer moving according to the applied sinusoidal magnetic field, with N = 20 and Sp = 4, starting from a straight configuration for approximately 5 cycles. The coarsegrained system is numerically cheap, as it has a reduced number of mesh points. Thus it allows for optimisation studies involving the continuous evaluation of objective function across a large parameter space. Previous studies demonstrated that the classical system leads to very expensive numerical simulations [START_REF] Montenegro-Johnson | Spermatozoa scattering by a microchannel feature: an elastohydrodynamic model[END_REF][START_REF] Gadêlha | On the optimal shape of magnetic swimmers[END_REF], making any parameter search very challenging. This open new possibilities for investigations within control theory, as well as optimal control [START_REF] Giraldi | Local controllability of the two-link magneto-elastic micro-swimmer[END_REF][START_REF] Giraldi | Addentum to local controllability of the two-link magnetoelastic micro-swimmer[END_REF] by using this approach.

C. Cross-linked filament bundles and flagella

In this section we focus on biological systems involving time-dependent load distributions. This could arise, for example, via mechano-sensory coupling in biological structures and biochemical landscapes. Flagella and cilia found in eukaryotes are perfect exemplars of the latter [START_REF] Gaffney | Mammalian sperm motility: Observation and theory[END_REF]. They are composed by a geometrical arrangement of semi-flexible filaments interconnected by elastic linking proteins, called axoneme [START_REF] Fred | The structural basis of ciliary bend formation: radial spoke positional changes accompanying microtubule sliding[END_REF]. Its generic form is composed by 9 + 2 microtubule doublets surrounding a central pair [START_REF] Gadêlha | The counterbend phenomenon in flagellar axonemes and cross-linked filament bundles[END_REF][START_REF] Charles B Lindemann | The counterbend phenomenon in dynein-disabled rat sperm flagella and what it reveals about the interdoublet elasticity[END_REF][START_REF] Pelle | Mechanical properties of the passive sea urchin sperm flagellum[END_REF], observed in both motile and non-motile form. Flagella is a challenging mathematical system. It couples nanometric scales from the molecular motor biochemical activation with microscopic properties of the elastic structure, as observed for the purpose FIG. 5. Example of magnetic drive with a sinusoidal orthogonal magnetic field. One quarter of the length of the filament (i.e. the first five elements) is not magnetized, and the other part is constantly magnetized. Here Sp = 4, N = 20, M = 1, H(t) = cos(t)ey/15. On the left, the filament is displayed at regular intervals of time over a time period, coloured from blue (beginning) to red (end). On the right, the red line shows the position of the filament at the end of the simulation. The thin dotted and thick blue lines respectively show the trajectory of the non-magnetized end and the centroid of the filament.

of spermatozoa transport [START_REF] Gaffney | Mammalian sperm motility: Observation and theory[END_REF][START_REF] Ishimoto | Human sperm swimming in a high viscosity mucus analogue[END_REF]. A geometrical abstraction of this system based on the sliding filament mechanism was first proposed by Brokaw [START_REF] Brokaw | Flagellar Movement: A Sliding Filament Model[END_REF]. In the static case, for steady-state deformations, flagella is prone to the so-called counterbend phenomenon [START_REF] Gadêlha | The counterbend phenomenon in flagellar axonemes and cross-linked filament bundles[END_REF][START_REF] Charles B Lindemann | The counterbend phenomenon in dynein-disabled rat sperm flagella and what it reveals about the interdoublet elasticity[END_REF]. This occurs when distant parts of a passive flagellum (in absence of motor activity) bend in opposition to an imposed curvature elsewhere along the flagellum, for example, using the tip of a micropipete [START_REF] Pelle | Mechanical properties of the passive sea urchin sperm flagellum[END_REF][START_REF] Lindemann | The counterbend phenomenon in dyneindisabled rat sperm flagella and what it reveals about the interdoublet elasticity[END_REF][START_REF] Xu | Flexural rigidity and shear stiffness of flagella estimated from induced bends and counterbends[END_REF]. Theoretical models encoding the mean cross-linked filament-bundle mechanics where able to recover the counterbend phenomenon [START_REF] Gadêlha | The counterbend phenomenon in flagellar axonemes and cross-linked filament bundles[END_REF][START_REF] Gadelha | The filament-bundle elastica[END_REF], from which material parameters could be measured directly from the resulting counter-curvature. The dynamics of passive flagellar bundles have been investigated using linear theory [START_REF] Gadêlha | The counterbend phenomenon in flagellar axonemes and cross-linked filament bundles[END_REF], and prediction of countertravelling waves instigated by the non-local cross-linking moments reported. To date, a geometrically exact investigation is still lacking in the literature.

We consider the geometrically exact cross-linked filament bundle system for a passive bundle, that is a flagellum without molecular motor actuation, using the coarsegrained formulation. The sliding filament model [START_REF] Coy | The counterbend dynamics of cross-linked filament bundles and flagella[END_REF][START_REF] Brokaw | Flagellar Movement: A Sliding Filament Model[END_REF] is particularly cumbersome within the classical elastohydrodynamic framework [START_REF] Gadêlha | Nonlinear instability in flagellar dynamics: a novel modulation mechanism in sperm migration[END_REF]. The boundary conditions are non-local due to the accumulative dependence of sliding moments along the bundle, and generally unknown during the dynamics. This becomes even more challenging when the bundle is driven via the molecular motor activity [START_REF] Coy | The counterbend dynamics of cross-linked filament bundles and flagella[END_REF][START_REF] Oriola | Nonlinear amplitude dynamics in flagellar beating[END_REF], which may explain the reason why numerical investigation of geometrically exact bundle systems is still lacking, for both active and passive cases [START_REF] Oriola | Nonlinear amplitude dynamics in flagellar beating[END_REF]. The coarse-grained formulation breaks the contribution of the sliding filament moments for each segment simply as

m s j = κ s N i=j ∆s(θ i -θ 1 ), (20)
this last sum being a discretisation of the sliding displacement integrated along the part of the filament going from j∆s to L, and κ s an effective resistance to sliding between the sliding filaments [START_REF] Coy | The counterbend dynamics of cross-linked filament bundles and flagella[END_REF]. The balance of forces and moments then reads

N i=1 F i = 0 N i=j M i,xj = m j δ j + m s j , for j = 1 . . . N, (21)
and describes an effective sliding filament bundle free from forces/torques at endpoints. We consider instead that the bundle is fixed and angularly actuated at the proximal end. Thus the first three equations in Eq. ( 21) are replaced with the kinematic conditions ẋ1 = 0 and θ = a cos t for an angular amplitude a. Numerical solutions of the the coarse-graining system for a filament bundle angularly actuated at s = 0 with amplitude a = 0.4362 rad and κ s ∆s/κ = 0.06 is shown in Fig. 6. They confirm analytical prediction of counterwave phenomenon from linear theory reported in ( [START_REF] Coy | The counterbend dynamics of cross-linked filament bundles and flagella[END_REF], Fig. 2), where waves are instigated non-locally, and travel in opposition to the imposed angular oscillation. The wavespeed and amplitudes involved depend on the crosslinking elastohydrodynamic parameters and the sperm number, compare Sp = 7 and Sp = 15 in Fig. 6. It is worth noting that coarse-graining system in Eq. ( 21) allows for straightforward generalisation to include different motor-control hypothesis -central for the current flagella and cilia self-organisation current debate [START_REF] Coy | The counterbend dynamics of cross-linked filament bundles and flagella[END_REF][START_REF] Oriola | Nonlinear amplitude dynamics in flagellar beating[END_REF][START_REF] Sartori | Dynamic curvature regulation accounts for the symmetric and asymmetric beats of Chlamydomonas flagella[END_REF]. Finally, we consider the dynamics of two individual filaments embedded in a viscous fluid and coupled elastically via Hookean elastic springs, see Fig. 7. The system thus involves the geometrically non-linear elastohydrodynamics of two interacting elastic fibres. Once again, the classical elastohydrodynamic formulation is ill-posed. The discrete distribution of elastic springs introduces unknown point forces via Eqs. ( 5) and ( 7) for each filament. We consider that the two-filament assembly is angularly actuated at one end, see Fig. 7. We assume that the connecting elastic springs have an effective spring constant K connecting opposite nodes between the two filaments, FIG. 6. Simulation of the counterbend phenomenon for two different sperm numbers (parameters are chosen in order to match those used in [START_REF] Coy | The counterbend dynamics of cross-linked filament bundles and flagella[END_REF]: κ s ∆s/κ = 0.06, a = 0.4362 rad; and N = 50). The top row shows the behaviour of an actuated filament when no sliding resistance is added. The right column shows the same oscillation applied to the bundle model. For each case, the filament is displayed at regular intervals of time over a time period, coloured from blue (beginning) to red (end). The color plots show the curvature (angles α) with respect to the time in x and the arclength in y. The travelling curvature wave generated by the actuation is visible at the bottom of all of the color plots. For the counterbend case, a second travelling wave appears at the free end of the filament in the bundle case (bottom row).

placed at each coarse-grained segment junction for simplicity, see Fig. 7. The equilibrium bundle diameter is d 0 at rest. The elastic force F int i exerted by the i-th spring on the filament S (top filament) reads

F int i = K 1 - d 0 x i -x i (x i -x i ),
where primes refer to the second filament. The coarsegrained formulation for S and S is thus augmented by the elastic reactions from each connecting spring, and their associated moments along each filament. Hence the coupled system for the filaments S and S reads, respectively, N i=1

(F i + F int i ) = 0 N i=j (M i,xj + F int i × (x j -x i )) = m j δ j , N i=1 (F i -F int i ) = 0 N i=j (M i,xj -F int i × (x j -x i )) = m j δ j . (22)
The proximal end of both constituent filaments is fixed, but the angle at s = 0 of the filament S (top filament) is actuated via θ 1 (t) = a sin t. The filament S (bottom filament) is free from external actuation, thus its movement solely arises via the elastic coupling between them. A detailed description of the resulting two-filament system is provided in the appendix, section VII E. Fig. 7 shows numerical simulations for time evolution of the two-filament assembly, demonstrating the effectiveness of the connecting springs while transmitting bending moment from the top filament to the bottom one. A synchronous traveling wave of curvature is observed, see for exemple the tangent angle α of the centreline of the filament-pair in Fig. 7. The axial diameter d however evolves asymmetrically (middle plot in Fig. 7). The angular actuation of the top filament modify the diametral distance between the filaments near the base, in an oscillatory motion, from where axial waves are propagated down the structure. Axial extensional waves (light yellow regions) propagate more easily than compressional waves in the axial direction (light green regions). The resulting sliding displacement ∆ between the filamentpair is also depicted in the right graph in Fig. 7. Similarly to the radial distance, the relative sliding motion is concentrated towards the basal end, however, it is not propagated along the filament-pair. This is despite the fact that both filament are inextensible, and tangential motion is easily propagated. Conversion of curvature into relative sliding motion between the filaments is not observed nor the counterbend phenomenon observed in Fig. 6, see the light yellow region for ∆ ≈ 0 in Fig. 7. This suggests that simple elastic connectors between filaments are not effective while transmitting sliding moments. Instead, axial distortions are prevailed and prop-FIG. 7. Coupling between two filaments obtained with the coarse-grained approach. Here Sp = 4, a = 0.88 rad, K/κ = 1/25. On the top, the actuated filament is represented at regular intervals of time over half a time period, coloured from blue (beginning) to red (end). The three colormaps display three parameters with respect to time and arclength: the angle α of the centerline (left), the distance d between the two filaments (middle) and the distance ∆ between two facing nodes, normalised by their resting length d0. Note that the beginning time for the graphs has been chosen big enough to skip transient phase and display only steady state. A travelling wave of curvature generated by the actuation of the top filament is visible in graph at the bottom left. The graph at the bottom in the middle shows the distance between the two filaments. Moreover, the graph at the bottom right captures the sliding distance between the two filaments. agated along the filament-pair assembly. The connecting springs contribute to forces along its direction, but mostly on the radial direction, perpendicular to centreline. The elastic springs are hinged at each connecting node, thus the constituent filaments are free from bending moments arising from the interfilament sliding (in contrast with Fig. 6). This supports the so-called geometric clutch mechanism proposed by Lindemann [START_REF] Charles B Lindemann | A" geometric clutch" hypothesis to explain oscillations of the axoneme of cilia and flagella[END_REF], where axial displacements are central for flagellar mechanics. These results further show that the sliding filament mechanism present in flagellar systems [START_REF] Gadêlha | The counterbend phenomenon in flagellar axonemes and cross-linked filament bundles[END_REF][START_REF] Charles B Lindemann | The counterbend phenomenon in dynein-disabled rat sperm flagella and what it reveals about the interdoublet elasticity[END_REF][START_REF] Brokaw | Flagellar Movement: A Sliding Filament Model[END_REF] is far more complex than this simplistic two-filament crosslinked assembly [START_REF] Camalet | Self-organized beating and swimming of internally driven filaments[END_REF][START_REF] Coy | The counterbend dynamics of cross-linked filament bundles and flagella[END_REF][START_REF] Brokaw | Flagellar Movement: A Sliding Filament Model[END_REF][START_REF] Sartori | Dynamic curvature regulation accounts for the symmetric and asymmetric beats of Chlamydomonas flagella[END_REF][START_REF] Oriola | Subharmonic oscillations of collective molecular motors[END_REF].

VI. CONCLUSIONS

This paper studies inertialess fluid-structure interaction of inextensible filaments commonly found in biological systems. The nonlinear coupling between the geometry of deformation and the physical effects invariably results on intricate governing equations that negotiate elastohydrodynamical interactions with non-holonomic constraints, as a direct consequence of the filament inextensibility. As a result, the classical elastohydrodynamical for-mulation is prone to numerical instabilities, requires penalization methods and high-order spatiotemporal propagators. Here, we exploit the momentum balance in the asymptotic limit of small rod-like elements, from which the system can be integrated semi-analytically. This bypasses the bottleneck associated with the inextensibilty constraint, and does not require the use of Lagrange multipliers to solve the system. We further show the equivalence between the two formalisms, as well as a direct comparison between the their numerical performances. The coarse graining formalism was shown to outperform the classical approach, in particular for numerically stiff regimes where the classical system performs poorly. The coarse-graining structure also allowed faster computations, over than a hundred times faster than previous implementations. The coarse-graining approach is simple and intuitive to implement, and generalisations for complex interaction of multiple rods, active filaments, flagella, Brownian polymer dynamics and non-local hydrodynamics are straightforward.

We employed the coarse-grained formulation to study distinct biologically inspired systems: the buckling instability of bio-filaments, the magnetic actuation of a microswimmer and the dynamics of cross-linked filament bundles and flagella. With the exception of the mag-netic swimmer case, the results obtained here for the other systems are new in the literature. For the buckling problem, travelling waves are generated and propagated with different speeds, depending on the elastohydrodynamic properties of the filament and its interaction with other competing modes, Fig. 4; thus relevant to biological systems in which buckling is a naturally occurring phenomenon [START_REF] Bourdieu | Spiral defects in motility assays: A measure of motor protein force[END_REF]. The coarse-graining approach successfully captured the counterbend phenomenon in cross-linked filament-bundles [START_REF] Coy | The counterbend dynamics of cross-linked filament bundles and flagella[END_REF][START_REF] Gadêlha | The counterbend phenomenon in flagellar axonemes and cross-linked filament bundles[END_REF], Fig. 6, including geometrical nonlinearities. Finally, motivated by mathematical abstractions of flagellar systems [START_REF] Camalet | Self-organized beating and swimming of internally driven filaments[END_REF][START_REF] Sartori | Dynamic curvature regulation accounts for the symmetric and asymmetric beats of Chlamydomonas flagella[END_REF], we solved the dynamics of interactions between two individual filaments interconnected with elastic springs. Numerical simulations indicated that the sliding between the filaments is not instigated by changes in curvature, as assumed by the sliding-filament mechanism [START_REF] Brokaw | Flagellar Movement: A Sliding Filament Model[END_REF]. Instead, axial distortions are propagated along the two-filament assembly, in agreement with the geometric clutch hypothesis [START_REF] Charles B Lindemann | A" geometric clutch" hypothesis to explain oscillations of the axoneme of cilia and flagella[END_REF]. These modes of deformation are central for the molecular-motor control debate in flagellar systems [START_REF] Coy | The counterbend dynamics of cross-linked filament bundles and flagella[END_REF][START_REF] Sartori | Dynamic curvature regulation accounts for the symmetric and asymmetric beats of Chlamydomonas flagella[END_REF].

The results presented here offer new possibilities for theoretical investigations, for instance, on the elastohydrodynamic self-organisation of fibres, many interacting filaments, cytoskeleton modelling, manoeuvrability of micro-magnetic robots [START_REF] Giraldi | Local controllability of the two-link magneto-elastic micro-swimmer[END_REF][START_REF] Giraldi | Addentum to local controllability of the two-link magnetoelastic micro-swimmer[END_REF], as well as optimal strategy of deformation for micro-locomotion [START_REF] Wiezel | Energy-optimal small-amplitude strokes for multi-link microswimmers: Purcell's loops and taylor's waves reconciled[END_REF]. Only basic knowledge of systems of linear equations is required and implementation achieved with any solver of choice. We hope that the simplicity of the formalism, the numerical robustness and easy-to-implement generalisations will appeal to the biology, soft-matter and interdisciplinary community at large.

In the asymptotic description, the filament can be described with two different sets of parameters (see Fig. 1) :

• the N + 2 parameters X = (x 1 , y 1 , θ 1 , α 2 , . . . , α N ). • the 3N parameters X 3N = (x 1 , . . . , x N , y 1 , . . . , y N , θ 1 , . . . , θ N ),
The second set uses 3N parameters where N + 2 are sufficient. However, it makes the computations easier to read. Going from Ẋ to Ẋ3N can be done via the following transformation matrices :

Ẋ = P Ẋ3N and Ẋ3N = Q Ẋ with P =            1
. 0 -1 1            and Q =                     1 0 . . . . . . 1 0 Q1 0 1 . . . . . . 0 1 Q2 0 N,2 1
                    , 1
where Q1 and Q2 are N × N matrices whose elements are given by the general formula q i,j 1 = -∆s i-1 k=j sin k m=1 α m q i,j 2 = ∆s i-1 k=j cos k m=1 α m , with q i,j 1 = q i,j 2 = 0 if i ≥ j. The tildes recall that the nondimensionalisation has not yet been performed.

B. Matricial form of the ODE system

Using the explicit expressions of the different contributions [START_REF] Tornberg | Simulating the dynamics and interactions of flexible fibers in stokes flows[END_REF], ( 14) and [START_REF] Plouraboue | Identification of internal properties of fibers and micro-swimmers[END_REF], and after nondimensionalising, we can rewrite the system (8)- [START_REF] Olson | Modeling the dynamics of an elastic rod with intrinsic curvature and twist using a regularized Stokes formulation[END_REF] under matricial form:

Sp 4 AQ Ẋ = B. ( 24
)
where the terms are defined as follows:

• The matrix A is a (N + 2) × 3N matrix whose coefficients are given, for all i in {1, . . . N } and j in {i, . . . , N }, by a 1,i = -cos 2 θ i -γ sin 2 θ i ; a 2,i = (γ -1) cos θ i sin θ i ; a 1,N +i = (γ -1) cos θ i sin θ i ; a 2,N +i = -γ cos 2 θ i -sin 2 θ i ; a 1,2N +i = 1 2 sin θ i ; a 2,2N +i = -1 2 cos θ i ; a i+2,j = v(x i , x j ) M 1 (θ j ); a i+2,N +j = v(x i , x j ) M 2 (θ j ); a i+2,2N +j = v(x i , x j ) M 3 (θ j ); where v(x i , x j ) = 1 xj -xi ∆s yj -yi ∆s and M 1 , M 2 , M 3 are the columns of the matrix [START_REF] Heussinger | Statics and dynamics of the wormlike bundle model[END_REF]. If j < i, then a i+2,j = a i+2,N +j = a i+2,2N +j = 0.

• Q is the nondimensionalized version of the transformation matrix [START_REF] Purcell | Life at low reynolds number[END_REF]. It is defined by replacing Q1 and Q2 with Q 1 = Q1 /∆s and Q 2 = Q2 /∆s in the expression of Q.

• B is a column vector of size N + 2, given by B = 0 0 0 α 2 . . . α N T .

C. Buckling instability system

The resolution of the buckling problem requires to introduce two unknown contact forces P 0 and P N (see section V A). It yields four more scalar unknowns: P 0x , P 0y , P N x , P N y . We add four equations to the system (17) by embedding the buckling kinematic constraints ẋ0 = (k/2, 0) and ẋN = (-k/2, 0), where k is positive. We get a new system of (N + 6) scalar equations that can be expressed in matricial form:

A b Ẋb = B b , (25)
where

X b =      X P 0x P 0y P N x P N y      , B b =      B -k/2 0 k/2 0      , A b = Sp 4 AQ a T a 0 , (26) a

D. Magnetic swimmer

The matricial system describing a magnetically driven filament with the coarse-graining approach reads

Sp 4 AQ Ẋ = B + 1 κ C m . (28)
It is simply obtained by adding to the system (17), the magnetic effect vector C m = c 1 . . . E. Cross-linked filament bundle

The system [START_REF] Lauga | The hydrodynamics of swimming microorganisms[END_REF] describing a filament bundle with sliding resistance takes the following matricial form:

Sp 4 AQ Ẋ = B + κ s κ C s , (29)
with C s = c 1 . . . c N +2 T , with c s 1 = c s 2 = 0 and ∀j ∈ {1, . . . , N },

c s j+2 = ∆s N i=j θ i -θ 1 .
In the case of two interacting filaments, S and S , the new coupled dimensionless system of (2N + 4) equations reads

In the above equation, A, B, Q and X are defined as previously, referring to S or S depending on the indix. The interaction vectors C and C are defined as follows:

c 1 c 2 = 1 κ N j=1 F int j ; c 1 c 2 = -1 κ N j=1 F int j ; ∀i ∈ {1, . . . N }, c i+2 = 1 κ N j=i F int j × (x j -x i ), c i+2 = -1 κ N j=i F int j × (x j -x i ). ( 31
)
The above system describes a bundle with free endpoints. However, in the case studied in section 30, both filaments have a fixed proximal end, and the filament S is actuated at its proximal end (prescribed angle θ 1 ). We embed these boundary conditions in the system by replacing its first three lines by the constraint equations ẋ1 = 0, ẏ1 = 0, θ1 = a cos t, and its N + 3-th and N + 4th equations (i.e., the first two equations for the second filament) by the constraint equations ẋ 1 = 0 and ẏ 1 = 0.

FIG. 1 .

 1 FIG. 1. Parametrisation of the continuous and discrete filaments

FIG. 2 .

 2 FIG. 2. Relaxation dynamics of a filament from a half-circle configuration with 5 elements (dotted line) and 50 elements (continuous line) and Sp = 4. The filaments are drawn on the left plot at t = 0 (dark blue) and at regular time increment of 0.2. The colormaps on the right show the spatiotemporal transient dynamics of the angle αi = θi -θi-1 between consecutive elements, i.e. the discrete curvature. The colormap above (below) corresponds to the coarse-grained filament with N = 5 (N = 50) elements. Note that the values of α are smaller for the finer case, as refinement induces a smoother spatiotemporal map, hence smaller angle difference between segments.

FIG. 4 .

 4 FIG.4. Visualisation of the buckling phenomenon for three different sperm numbers (Sp= 2 on the left, Sp= 4 on the middle and Sp= 8 on the right). Here N = 36 and k = 1.5. The filament is displayed at regular intervals of time, coloured from blue (beginning) to red (end). Three different initial conditions lead to different outcomes. The colormap graphs show time on the x-axis and link number (discrete arclength) on the y-axis. The colours show the curvature (angles) over time, from blue for a highly negative curvature to red for a highly positive one. The filament quickly takes a waveform with fewer waves as time goes on. The higher the sperm number is, the longer it takes for the waves to vanish (note that the total time on the graphs is longer as the sperm number increases).

1 N

 1 θ k -N k=2 sin θ k . . . -sin θ N 0 k=1 cos θ k N k=2 cos θ k . . . cosθ N matrices A, B and Q are defined as in Appendix VII B.

c N +2 T , with c m 1 = c m 2 =

 2 0 and ∀i ∈ {1, . . . , N }, H y (t) cos θ k -H x (t)θ k ), H x (t) and H y (t) being the components of the magnetic field along the x-and y-axis.

Sp 4 (

 4

TABLE I .

 I Table IV demonstrates how the coarse-grained approach outperforms the classical elastohydrodynamic system. Computing times in seconds for the two relaxation tests and two different sperm numbers. Tolerance of the length error only applies to the classical system.

		Sp = 4
	Test	Coarse-grained Tolerance Classical
		system N =70 length error system
	Half-circle		1%	1.3
		2	0.1%	249
			0.01%	3750
	Parabola		1%	90
		1.5	0.1%	1820
			0.01%	> 1h
		Sp = 2
	Test	Coarse-grained Tolerance Classical
		system N =70 length error system
	Half-circle		1%	97
		3	0.1%	850
			0.01%	> 1h
	Parabola		1%	> 1h
		1.7	0.1%	> 1h
			0.01%	> 1h

ACKNOWLEDGMENTS

The authors thank J.-B. Pomet for fruitful discussion.

AUTHOR CONTRIBUTIONS

C.M. conducted the research, wrote the paper, and performed the numerical simulations. L.G. designed and conducted the research, and wrote the paper. H.G. designed and conducted the research, and wrote the paper.

COMPETING INTERESTS

We declare we have no competing interests.

DATA ACCESSIBILITY

The Matlab codes used to run the simulations presented in this paper are available on github via this link: https://github.com/Clementmoreau/Filament.

FUNDING STATEMENT

The authors were partially funded by the CNRS through the project Défi InFIniti-AAP 2017.