1 Introduction

Engaging in computer simulations to model fluid-structure interaction phenomena not only grants valuable insights into the complex behavior of solids within fluid flows but also serves as a powerful tool for predicting their consequential effects. By harnessing the capabilities of computational simulations, researchers and engineers can unravel intricate interactions that are otherwise challenging to observe experimentally. This approach allows for a comprehensive exploration of phenomena such as aeroelasticity, turbomachinery dynamics, and biomechanics, offering an in-depth understanding of the underlying mechanisms governing these systems. The ability to simulate and analyze these intricate processes plays a pivotal role in optimizing the performance and reliability of diverse systems in practical applications.

Among the applications of fluid-structure interaction, flapping wing aerodynamics has gathered significant interest due to its potential applications in various fields, including Micro Air Vehicles (MAVs), biomimicry, and aerospace engineering. Understanding the complex interplay between fluid dynamics and structural mechanics is crucial for optimizing the performance of flapping wing systems. Computational simulations have emerged as valuable tools for explaining these dynamics. Recent advancements in FSI simulations of flapping wings show several different ways of dealing with the subject. De Rosis et al. [1] propose a novel approach combining the lattice Boltzmann method, finite element analysis, and immersed boundary method to investigate the aeroelastic behavior of flexible flapping wings. Their study provides insights into the intricate coupling between fluid flow and structural deformation, offering a comprehensive understanding of flexible wing dynamics. Taha et al. [2] give an accurate and complete review of the flight dynamics and control mechanisms of flapping-wing Micro Air Vehicles (MAVs). While not a direct simulation study, this review contextualizes the challenges and advancements in the field, providing valuable insights into the design and operation of flapping wing systems. Shyy et al. [3] present an overview of recent advancements in flapping wing aerodynamics and aeroelasticity. Their review covers a wide range of topics, including experimental studies, computational simulations, and biomimetic applications, serving as a valuable resource for researchers seeking to understand the underlying principles governing flapping-wing dynamics. Hassanalian et al. [4] propose a novel methodology for sizing the wings of bio-inspired flapping wing MAVs. Through a combination of theoretical analysis and prototype testing, they demonstrate the effectiveness of their approach in optimizing wing design for improved aerodynamic performance. This study highlights the importance of computational simulations in guiding the design process of flapping wing systems. Takizawa et al. [5] present a sequentially coupled space-time FSI analysis of bio-inspired flapping-wing aerodynamics, focusing on MAV applications. Their study employs advanced numerical techniques to simulate the fluid-structure interaction dynamics, showing a deep understanding of aerodynamic performance and structural response of flapping wings under varying operating conditions. Kawakami et al. [6] investigate the fluid-structure interaction dynamics of flexible flapping wings in the Martian environment. By considering the unique aerodynamic challenges posed by the Martian atmosphere, their study sheds light on the feasibility of using flapping wing systems for aerial exploration of Mars. This work underscores the importance of adapting flapping wing designs to different operating environments. Barucca [7], in his master thesis, develops a fluid-structure interaction solver specifically tailored for analyzing flexible flapping wings. His study offers an interesting tool for studying flapping wing aerodynamics. In conclusion, the role of FSI simulations is crucial in advancing our understanding of the aerodynamics and aeroelasticity of flapping wings.

The challenges inherent in obtaining analytical solutions for most FSI problems, coupled with the limitations and costs associated with laboratory experiments, drive the utilization of numerical simulations. These simulations, made feasible by advancements in computer technology, offer a detailed and sophisticated analysis of the intricate interactions between fluids and solids.

Within this context, our goal is to apply a fluid-structure interaction framework, entirely built on free software, to compare the results obtained from our simulations with data experimentally obtained from a flapping wing. The paper is organized as follows: Sect. 2 briefly introduces the two main approaches to FSI problems, monolithic and partitioned. Since our framework is based on the partitioned approach, Sect. 3 focuses on the way the structural and the fluid solver may interact during a fluid-structure interaction simulation. Section 4 describes the toolset used for our simulation, focusing on the multibody dynamics solver MBDyn, used as the structural solver. Section 5 describes the experimental apparatus (taken from [8]) of a spanwise flexible flapping wing in pure heave immersed in a water flow, how the experimental apparatus has been modeled within our framework, and the results obtained. The conclusions are drawn Sect. 6.

2 FSI approaches

Numerical methods for solving FSI problems fall into two broad classes: monolithic [9] and partitioned approaches. The distinction between these techniques varies across fields, primarily based on how many solvers are employed to find a solution.

In the monolithic approach, the whole problem is treated as a unified entity and solved simultaneously using a specialized ad hoc solver [10]. This approach presents the fluid and structure dynamics as a single system of equations, solved concurrently by a unified algorithm, with implicit interface conditions embedded in the solution procedure. While capable of achieving high accuracy by solving the system exactly, the monolithic approach may demand more resources and expertise to develop and maintain a specialized code tailored to a specific model.

Conversely, in the partitioned approach, the fluid and solid domains are considered separate computational fields, each with its dedicated mesh, necessitating independent solutions (refer to Fig. 1). Explicit use of interface conditions facilitates the exchange of information between fluid and structure solutions: in particular, the structural domain provides information on the movement of the interface (displacements or velocities, \(\textbf{v}\) in Fig. 1), whereas the fluid solver returns information about the loading on the interface (forces or stresses, \(\sigma\) in Fig. 1), meaning that the flow remains constant while solving the structural equations and vice versa, ensuring a consistent computational process [11].

Fig. 1
figure 1

Scheme of Partitioned approach: fluid solver (F) and structural solver (S) exchange data through a coupling element

The partitioned approach necessitates the inclusion of a third software module, referred to as a coupling algorithm, to address interaction aspects. This algorithm manages the exchange of boundary conditions between the fluid and solid components. Specifically, forces or stresses generated by the fluid solver at the wet surface are transmitted to the solid component, while, conversely, displacements or velocities computed by the solid solver at the interface are sent to the fluid component. Ultimately, the combined solutions of the fluid and structural problems yield the fluid-structure interaction (FSI) solution.

This approach offers the advantage of maintaining software modularity and supporting diverse and efficient solution techniques for fluid and structural equations.

Existing solvers, ranging from commercial to academic and open-source codes, can be employed as long as they can exchange data and guarantee the usage of well-validated software codes in fluid-structure interaction problems.

Additionally, as opposed to monolithic procedures, partitioned approaches entail lower programming efforts, as only the coupling of existing solvers, rather than the solvers themselves, needs to be implemented.

However, the challenge lies in defining and implementing algorithms that ensure accurate and efficient fluid-structure interaction solutions with minimal code modification. Notably, the partitioned approach requires the fluid solver to possess Arbitrary Lagrangian–Eulerian (ALE) capabilities, as the interface location between the fluid and structure domains changes over time.

3 Coupling strategies

In the realm of interface multi-physics coupling, such as FSI, the boundary surface is shared between the two sides of the simulation. Meaningful and numerically stable results are contingent upon the agreement between the two sides of the interface, as the output values of one simulation become input values for the other and vice versa. Two broad categories of solution strategies emerge: weakly coupled (explicit) and strongly coupled (implicit) approaches, often denoted as explicit and implicit methods in the literature.

3.1 Explicit coupling schemes

Explicit coupling involves a fixed number of iterations, typically one per time step, without convergence checks. In a serial-explicit coupling scheme, the fluid solver uses the old time step boundary values to compute values for the next time step.

$$\begin{aligned} d_f^{(n+1)} = S_f\left( d_s^{(n)}\right) \end{aligned}$$
(1)

When the fluid solver completes the time step, data are passed to the structural solver:

$$\begin{aligned} d_s^{(n+1)} = S_s\left( d_f^{(n+1)} \right) \end{aligned}$$
(2)

Notice that Eq. (1) uses values computed at \(t^n\), while Eq. (2) uses values computed at \(t^{(n+1)}\). The order of execution might be inverted.

While explicit coupling may not guarantee an exact solution, it performs well when the interaction between fluid and solid is weak, as seen in aeroelastic simulations [12].

3.2 Implicit coupling schemes

Implicit coupling entails iterative methods to enforce agreement among the variables at the interface. In serial (staggered) coupling, solvers wait for each other, using interface values at the same time step \((n+1)\), but one of them relies on data from the previous iteration.

$$\begin{aligned} d_f^{(n+1),i+1}= & {} S_f\left( d_s^{(n+1),i}\right) \end{aligned}$$
(3a)
$$\begin{aligned} d_s^{(n+1),i+1}= & {} S_s\left( d_f^{(n+1),i+1} \right) \end{aligned}$$
(3b)

Equation (3) show that, in contrast with explicit coupling, both solvers use interface values at time step \(n+1\), but one of them uses data from the previous iteration. If run in parallel mode [13], the system becomes:

$$\begin{aligned} d_f^{(n+1),i+1}= & {} S_f\left( d_s^{(n+1),i}\right) \end{aligned}$$
(4a)
$$\begin{aligned} d_s^{(n+1),i+1}= & {} S_s\left( d_f^{(n+1),i} \right) \end{aligned}$$
(4b)

In parallel coupling [13], solvers can operate concurrently, both using interface values at time step \(n+1\) and both relying on data from the previous iteration.

Implicit methods, as opposed to explicit ones, are generally applicable to various fluid-structure interaction problems. When the coupling between fluid and structure is strong, explicit coupling may encounter numerical instabilities. Reducing the coupling time step size might not always resolve this issue, as highlighted in [14]. Implicit methods offer a solution to these instabilities, although multiple coupling iterations may be necessary in each time step until convergence is achieved on both sides of the interface.

Additionally, implicit methods require post-processing techniques, commonly referred to as acceleration, to ensure the convergence of the solution for a single time step in the coupled partitioned FSI problem.

A fixed-point equation must be solved, in fact:

$$\begin{aligned} H(d_s){} & {} S_s \circ S_f(d_s) \end{aligned}$$
(5a)
$$\begin{aligned} d_s= & {} H(d_s) \end{aligned}$$
(5b)
$$\begin{aligned} R(d){} & {} H(d) - d = 0 \end{aligned}$$
(5c)

Equation (5a) represents the composition of the solid and the fluid solution, while Eq. (5b) represents the resulting fixed point equation. As the execution order can be switched, in Eq. (5c), where the residual is defined, the input data \(d_s\) is generically substituted with d.

Acceleration techniques are essential for achieving convergence in implicit schemes involving the solution of a fixed-point equation. These techniques are crucial to stabilizing the iterations and obtaining accurate solutions for coupled partitioned FSI problems.

The basic approach to solve the fixed point equation is to perform the corresponding fixed-point iteration (FPI):

$$\begin{aligned} x_{i+1} = H(x_i) \quad i=1,2,\ldots \end{aligned}$$
(6)

which is known to converge if the mapping H is a contraction, but this is not the general case in FSI computations [13].

Iterations can be stabilized by performing an FPI with under-relaxation, a good choice for easy, stable problems. However, under-relaxation is outperformed by more sophisticated quasi-Newton coupling schemes. Equation (5c) could be solved iteratively with a Newton method [15]:

$$\begin{aligned} R(d_k):= & {} r_k \end{aligned}$$
(7a)
$$\begin{aligned} R(d_k) + \left. \frac{\partial R}{\partial d}\right| _{d_k} {\cdot } \left( d_{k+1} - d_k \right)= & {} 0 \end{aligned}$$
(7b)
$$\begin{aligned} d_k + \left( \left. \frac{\partial R}{\partial d} \right| _{d_k} \right) ^{-1} {\cdot } \left( -r_k \right)= & {} d_{k+1} \end{aligned}$$
(7c)

The residual at iteration k is defined in Eq. (7a). If the Jacobian matrix of the equation is known, a Newton iteration can be performed as in Eq. (7b). The updated values can be computed using Eq. (7c).

In situations where:

  • Black-box systems are considered (i.e., the Jacobian is unknown),

  • The cost of a function evaluation is sufficiently high that numerical estimation of the Jacobian is prohibitive,

there exist several matrix-free methods that use only information derived from the consecutive iterations and that build an approximation based on those values. This approach is known as quasi-Newton method [16]. At each time step, the coupling algorithm enforces matching conditions at the wet surface up to a convergence criterion. If not sufficiently met, another iteration within the same time step is performed. The fixed point formulation itself induces a criterion based on the current residual \(r_{k+1}\).

The most common relative convergence criterion, defined in Eq. (8), is particularly useful when different quantities (e.g., forces and displacements) are compared together to evaluate convergence:

$$\begin{aligned} \frac{\Vert r_{k+1} \Vert }{\Vert {\tilde{d}}_{k+1} \Vert } \le \epsilon _{rel} \end{aligned}$$
(8)

The present work adopts the partitioned approach, specifically delving into its two coupling strategies, strong and weak, with a preference for the former due to its solution accuracy.

4 Toolset

The simulations presented here involve the Multibody Dynamics solver MBDyn and the multiphysics coupling library preCICE [17], exploiting the already developed adapter between preCICE and OpenFOAM [18].

4.1 MBDyn

MBDyn is a free and open-sourceFootnote 1 general-purpose Multibody Dynamics solver developed at the Department of Aerospace Science and Technology of Politecnico di Milano. For comprehensive information about MBDyn, the official documentation on the software website (mbdyn.org) is the primary resource.

MBDyn enables the creation of a model for simulating multi-body dynamics, encompassing the study of interconnected rigid or flexible bodies with large translational and rotational displacements. It can simulate linear and non-linear dynamics of rigid and flexible bodies (including geometrically exact and composite-ready beam and shell finite elements, component mode synthesis elements, and lumped elements) subjected to kinematic constraints, external forces, and control subsystems [19].

In more detail, MBDyn models comprise three fundamental elements: nodes, elements, and forces.

Nodes form the basic building blocks of an MBDyn model, defining kinematic degrees of freedom and corresponding equilibrium equations. Structural nodes, with six degrees of freedom representing position and orientation, describe rigid-body motion.

Elements constitute the components of the multi-body model. They write contributions to node equations and represent connectivity and constitutive properties. There exist many types of elements in MBDyn. Here, the focus is placed on the ones used in an FSI simulation: beams, bodies, and forces.

When dealing with slender bodies, a 1D finite element model, together with a form of mapping between the interface (wet surface) and the model to exchange kinematics and dynamics information, can be an efficient strategy. This can be performed in MBDyn using the beam and external structural mapping elements.

A Finite Volume approach is employed to model the beam element, as described in [20]. The beam element is defined by three nodes and a reference line. Each beam node is related to a structural node (nodes 1 to 3 in Fig. 2) by an offset (\(o_1\) to \(o_3\)) and a relative orientation.

Fig. 2
figure 2

MBDyn beam model, taken from the input manual

A 6D constitutive law at each evaluation point relates internal forces and moments to linear and angular strains. MBDyn accommodates various constitutive laws, including linear elastic or viscoelastic laws, allowing users to define properties such as isotropic or anisotropic beam sections: the entire \(6 \times 6\) constitutive matrix can be provided.

In dynamic simulations, linear elastic or viscoelastic laws are generally used. The simplest case, a linear elastic constitutive law, is represented in Eq. (9), in which a diagonal matrix relates the internal forces and moments to the linear and angular strains of the beam.

$$\begin{aligned} \small \begin{Bmatrix} N \\ T_2 \\ T_3 \\ M_1 \\ M_2 \\ M_3 \end{Bmatrix} = \begin{bmatrix} EA &{} 0 &{} &{} \ldots &{} &{} 0 \\ &{} \chi _{GA_2} &{} &{} &{} &{} &{} \\ &{} &{} \chi _{GA_3} &{} &{} &{} \\ &{} &{} &{} GJ_1 &{} &{} \vdots \\ &{} &{} &{} &{} EJ_2 &{} 0 \\ &{} sym. &{} &{} &{} &{} EJ_3 \end{bmatrix} \cdot \begin{Bmatrix} \epsilon _1 \\ \gamma _2 \\ \gamma _3 \\ \kappa _1 \\ \kappa _2 \\ \kappa _3 \end{Bmatrix} \end{aligned}$$
(9)

Equation (9) represents the relationship between the generalized stresses (axial and shear force components and torsional and bending moment components) and deformations (linear and angular strains) in the reference section.

The simplest example of linear viscoelastic constitutive law uses a damping matrix, namely a matrix that multiplies the time derivatives of the linear and angular strains, proportional to the stiffness matrix of Eq. (9).

In the context of FSI simulations, the description above allows the user to define a section constitutive law that is independent of the shape of the beam itself. The aerodynamic and structural aspects are handled by two distinct elements of the model: the interface mesh defines the aerodynamic forces, and the beam constitutive law defines the structural properties.

The body element describes lumped rigid bodies or point masses, providing inertial properties in connection with structural elements: for example, in a beam element, two bodies are added to the beam to account for lumped inertia.

The force element is a general means to introduce a right-hand side term to the equations of motion.

The external structural mapping element facilitates communication with external software, allowing the computation of forces applied to a pool of interface nodes. It involves defining points, generating a linear mapping matrix, and using it during the simulation to map forces and motion between the interface and structural nodes [21].

The constant matrix mapping computes the position \(x_\text {int}\) and the velocity \({\dot{x}}_\text {int}\) of the interface points as functions of the position \(x_\text {mbd}\) and velocity \({\dot{x}}_\text {mbd}\) points rigidly offset from structural nodes (Eq. 10):

$$\begin{aligned} x_\text {int}= & {} H {\cdot } x_\text {mbd} \end{aligned}$$
(10a)
$$\begin{aligned} {\dot{x}}_\text {int}= & {} H {\cdot } {\dot{x}}_\text {mbd} \end{aligned}$$
(10b)

The same H matrix of Eq. (10) is used to map back the forces onto the structural nodes based on the preservation of the virtual work done in the two domains (Eq. 11):

$$\begin{aligned} \delta x_\text {mbd}^T \cdot f_\text {mbd}= & {} \delta x_\text {int}^T \cdot f_\text {int} \end{aligned}$$
(11a)
$$\begin{aligned} \delta x_\text {int}^T \cdot f_\text {int}= & {} \delta x_\text {mbd}^T \cdot H^T \cdot f_\text {int} \end{aligned}$$
(11b)

which implies that the mapping matrix can be used both ways, to map forces (Eq. 12) and displacements (Eq. 10):

$$\begin{aligned} f_\text {mbd} = H^T {\cdot } f_{\text {int}} \end{aligned}$$
(12)

When performing a fluid-structure interaction simulation with strong coupling, MBDyn may need to compute multiple iterations of the same time step to reach global convergence. This is achieved within the external structural mapping element. The process involves iterative exchanges of predicted kinematics and computed forces until both MBDyn and the external solver achieve convergence.

This feature has been particularly useful in building an adapter to couple MBDyn with the library preCICE (see Sect. 4.3).

4.2 preCICE

The preCICE [17] software libraryFootnote 2 is an open-source tool designed to implement the connection of single-physics solvers, enabling the creation of partitioned multi-physics simulations such as fluid-structure interaction, conjugated heat transfer, and solid-solid interaction, among others.

The key objective is to couple existing solvers in a black-box fashion, requiring only minimal information about the solver and involving the exchange of information only at interface nodes.

In a nutshell, preCICE operates by influencing the input and monitoring the output of solvers, referred to as participants. This interaction is performed through an adapter, essentially a “gluecode” attached to the respective solver, responsible for communicating information with the preCICE library.

The preCICE library manages all the necessary actions for executing a coupled simulation, including:

  • Implementing the coupling strategy,

  • Defining and verifying convergence criteria,

  • Establishing communication between participants,

  • Computing data mapping between non-conforming meshes.

The adopted coupling strategy in preCICE is the partitioned approach (refer to Sect. 3), accommodating both explicit (Sect. 3.1) and implicit (Sect. 3.2) coupling.

While volume coupling is feasible, preCICE is primarily tailored for simulations sharing a common surface boundary. Notably, the meshes of the two sides of the simulation don’t require node-to-node coincidence, so it might be necessary to map variables at the interface, preserving the geometry (i.e., no gaps or superpositions at the interface) and the mass and energy balances.

Two kinds of mapping are available:

  • Consistent the value of a node at the one grid is the same as the value of the corresponding node (or nodes) at the other grid. For example, in FSI simulations, the mapping of displacements is consistent: in the simplest case, all fluid nodes experience the same displacement of a single solid node; otherwise, an interpolation is performed.

  • Conservative in the same conditions as before, forces are mapped in an additive manner. The value of the force at a specific structural node is shared among multiple fluid nodes.

Alongside the mapping strategy, a method must be defined to perform such computations. The available ones include nearest-neighbor, nearest-projection, and radial basis function (RBF).

For the latter method, preCICE incorporates various basis functions, Gaussian and thin plate splines being the most commonly used.

4.3 Adapter and validations

An adapter to connect MBDyn to preCICE has been developed. Information concerning the code, configuration instructions, and examples can be found here: https://public.gitlab.polimi.it/DAER/mbdyn/-/wikis/preCICE-MBDyn-adapter.

The coupling between MBDyn and preCICE has been validated in [22] through the well-known set of benchmarks by Turek and Hron ( [23] and [24]): a 2D model describing a laminar incompressible flow around an elastic flap, connected to a rigid cylinder (see Fig. 3 for reference).

Fig. 3
figure 3

Turek-Hron FSI2: fluid solution

Three parametrizations of the same structural and fluid domain (see [23] for details) consider different values for the Reynolds number, the mass ratio (i.e. the ratio between the density of the fluid and the density of the solid), and the elastic modulus for the flap.

A summary of the results obtained for the FSI2 benchmark is reported in Tables 1 and 2. Other results can be found in [22].

Table 1 FSI2 results (displacements)
Table 2 FSI2 results (forces)

The results in Table 1 and 2 are presented in a way that is consistent with the original paper [23]. The comparison shows that the relative error between the benchmark and the study is around \(0.5\%\) for the frequencies and \(1\%\) for the overall vertical displacement amplitude. The relative error in the horizontal overall displacement amplitude is instead around \(19\%\). The comparison of the forces shows a good agreement in the mean drag (\(0.2\%\)) while a higher discrepancy in the lift (\(15\%\)) and drag amplitude (\(62\%\)).

The setup has also been applied to hydroelastic pronblems (see for example [25] and [26]) where the numerical issue named added mass effect is significant for both strongly and weakly coupled partitioned approaches to the solution of FSI problems. Weakly coupled algorithms give good results in aeroelasticity studies when light and compressible fluids are involved [14]. However, they are known to become unstable, especially when fluid and structure densities are comparable and when the structure is particularly slender [27], as in hydroelastic applications. Under the same conditions, strongly coupled algorithms may exhibit convergence problems and must be carefully tested and tuned.

5 Numerical application

The initial integration of preCICE-MBDyn coupling for fluid-structure interaction analysis yielded promising results. For this reason, the computational setup described in the previous section is now applied to the experimental configuration described by Heathcote et al. [8].

5.1 Problem description

In their comprehensive study, Heathcote et al. meticulously investigated hydroelastic phenomena using water tunnel experiments focusing on the impact of spanwise wing flexibility. The authors explored the behavior of a rectangular wing oscillating in pure heave, examining crucial performance metrics, including thrust, lift, and propulsive efficiency.

The experimentation exhibits the different effects of spanwise flexibility on the aerodynamic performance of the wing. Notably, the authors observed that introducing a certain degree of spanwise flexibility led to noticeable enhancements in thrust coefficient and reductions in power-input requirements under specific oscillating frequencies. A favorable combination resulted in a notable increase in overall efficiency, a finding of significant importance in the realms of aerodynamics and fluid mechanics.

Furthermore, the authors clarified the intricate interplay between wing flexibility and aerodynamic outcomes, showing some of the complexity underlying the mechanisms governing these phenomena. They found that for Strouhal numbers exceeding 0.2, the introduction of spanwise flexibility introduced a modest yet perceptible increase in thrust coefficient while concurrently diminishing power input, thus culminating in heightened efficiency. This phenomenon was attributed, in part, to the establishment of a more robust trailing-edge vortex system, indicative of the intricate aerodynamic dynamics at play.

However, the study also underlined the delicate balance inherent in wing flexibility, cautioning against excessive degrees of spanwise flexibility. Indeed, the authors observed that a far greater degree of flexibility proved counterproductive, resulting in detrimental effects such as significant phase delays in wing tip displacement and the emergence of fragmented vorticity patterns. These adverse outcomes contributed to a marked reduction in thrust coefficient and a concomitant decline in efficiency, highlighting the non-linear nature of FSI dynamics and the critical importance of optimal design considerations.

Importantly, the findings presented by the authors showed how different choices impact the design and optimization of flapping-wing Micro Air Vehicles (MAVs). By clarifying the beneficial effects of flexibility within a specific range of Strouhal numbers (\(0.2< Sr < 0.4\)), their work provided valuable insights into leveraging aerodynamic principles to develop more efficient and agile MAVs.

In general, physical experimentation can be costly, time-consuming, and strongly dependent on the specimen. Being capable of building a digital twin of a physical setup would reduce cost and time, anticipate information availability, and allow easier and faster design space exploration and optimization. For this reason, the preCICE-MBDyn framework described here has been used to compare numerical results to the experimental results.

5.2 Experimental setup

Before describing the FSI model and the simulation, a brief introduction of the experimental setup is necessary.

The study considers rectangular wings with a NACA 0012 profile (as shown in Fig. 4) with different section properties. The main part of the section is composed of polydimethylsiloxane rubber (PDMS), while the section core is composed of a 1mm thick metal plate.

The wing with a steel core is considered flexible, and the one with an aluminum core is considered highly flexible.

Fig. 4
figure 4

Representation of wing section properties: \(1 \,\text {mm}\) metal core and PDMS structure

Each wing has the following dimensions: chord \(c=100\) mm and span \(b=300\) mm.

The experimental setup is depicted in Fig. 5. The origin of the reference system is at the wing root mid-chord location. The stream velocity is in the x direction, the span is in the z direction, and the flapping motion occurs in the y direction. The same reference has been used in the simulations. The displacement of the root section is given by:

$$\begin{aligned} s = a_{ROOT} \sin (\omega t) \end{aligned}$$
Fig. 5
figure 5

Schematic of the spanwise flexible wing: flow direction and reference frame

The flow velocity \(U_0\) is in the range \(1\div 3\) m s\(^{-1}\). The experiments consider different combinations of the following dimensionless parameters:

  • Reynolds number

    $$\begin{aligned} {Re = \frac{\rho U_0 c}{\mu }} \end{aligned}$$
    (13)
  • Garrick reduced frequency

    $$\begin{aligned} {k_G = \frac{\pi f c}{U_0}} \end{aligned}$$
    (14)
  • Strouhal number at mid-span

    $$\begin{aligned} {S_r = \frac{2f a_\text {MID}}{U_0}} \end{aligned}$$
    (15)

in particular, the experiments are carried out in the following ranges:

  • \(Re=1\times 10^4\) to \(3\times 10^4\)

  • \(k_G=0\) to 7

The results give information concerning the ratio \(a_\text {TIP} / a_\text {ROOT}\), where \(a_\text {TIP}\) is the amplitude of the (harmonic) displacement at the tip, and tip phase lag \(\phi\).

Besides, data concerning the average thrust coefficient,

$$\begin{aligned} {C_T = \frac{T}{\frac{1}{2}\rho U_0^2c}} \end{aligned}$$
(16)

over a finite number of cycles and the mean power input coefficient,

$$\begin{aligned} {{\bar{C}}_P = \frac{F_y v}{\frac{1}{2}\rho U_0^3c}} \end{aligned}$$
(17)

are also provided.

5.3 Computational setup

The experimental setup described in [8] has been modeled in the framework described above, using MBDyn as the structural solver, OpenFOAM as the fluid dynamics solver, and preCICE as the interface layer for the coupled simulation.

The following versions of the codes have been used:

  • OpenFOAM v22.12

  • preCICE 2.5

  • MBDyn develop branch at December 2022

5.3.1 Structural model

An MBDyn cantilever beam model composed of three-node beam3 elements [20] has been developed, as outlined in Fig. 6.

Fig. 6
figure 6

Multibody structural model representation: a cantilever made of 5 beam elements

The structural model is composed of 5 MBDyn beam elements for a total of 11 structural nodes. Considering the difference in Young moduli (250 kPa for the PDMS, as opposed to 70 GPa for the aluminum) and the comparable thickness of the layers, the bending and torsional stiffness of the wing is entirely attributed to the 1 mm metal plate.

The stiffness matrix of each beam element is presented in Eq. (18), where w represents the chord and h is the thickness of the metallic lamina.

$$\begin{aligned} \small \begin{bmatrix} Ewh &{} &{} 0 &{} \ldots &{} &{} 0 \\ &{} \frac{5}{6}Gwh &{} &{} &{} &{} &{} \\ &{} &{} \frac{5}{6}Gwh &{} &{} &{} \\ &{} &{} &{} \frac{G}{3}wh^3 &{} &{} \vdots \\ &{} &{} sym. &{} &{} \frac{E}{12}wh^3 &{} \\ &{} &{} &{} &{} &{} \frac{E}{12}hw^3 \end{bmatrix} \end{aligned}$$
(18)

The overall inertia of the structure is provided by rigid body elements attached to the nodes of each beam (see Fig. 7).

Fig. 7
figure 7

Multibody inertial model: a rigid body Body attached to node 2 of the beam

A body element is attached to each of the structure’s nodes, carrying the mass of the corresponding beam chunk (of both the metal and PDMS portions).

The wing motion is prescribed using a total pin joint element attached to the wing root, which moves the root node harmonically, with frequency \(\omega\), along the y direction. At the beginning of each simulation, the prescribed motion is modulated with the smoothing function

$$\begin{aligned} f(t) = \frac{1}{2}\left( 1-\cos \left( \frac{{\pi }t}{\tau }\right) \right) \end{aligned}$$
(19)

for \(0 \le t \le \tau\) to ease convergence.

The final step of the structural setup consists of generating the mapping matrix which connects the MBDyn multibody model, topologically one-dimensional and thus composed of a string of nodes and beams, to the wet surface.

For this reason, an interface mesh of around 7000 cells (see Fig. 8) has been created. The nodes of the interface mesh are connected to the MBDyn nodes through the mapping matrix H, described in Sect. 4.1 (Eq. 10). The mapping is computed at the beginning of the simulation and used throughout the FSI computation.

Fig. 8
figure 8

Interface mesh nodes used for the structural mapping and as wet surface in the FSI simulation

5.3.2 Fluid model

The fluid domain is represented by a box of size \(1.5\times 0.6\times 0.5\) m. The origin of the reference frame is the one described in Fig. 5. The boundary conditions are:

  • Constant inlet velocity for the face at \(x=-0.25\) m,

  • Constant pressure for the face at \(x=1.25\) m,

  • Symmetry plane at the root of the wing (\(z=0\) m),

  • Slip walls for the other external surfaces,

  • No-slip wall for the wing surface.

The mesh of the wing with NACA 0012 airfoil has been built with the tool snappyHexMesh (see Fig. 9). Different mesh sizes have been considered, from 700 thousand elements to 1.3 million elements, all with \(100\%\) boundary layer coverage.

Transient simulations with the wing fixed and steady inlet velocity have been carried out for a Reynolds number of 30,000 on the different meshes in order to assess the mesh quality. The computed lift (\(C_L\)), with its standard deviation (\(\sigma _{C_L}\)) and drag (\(C_D\)) coefficients are compared to the expected values in Table 3. The expected values of \(C_L\) and its standard deviation are zero, as the airfoil is symmetric at zero angle of attack and a steady condition is considered. The expected value of the drag coefficient, as measured in [8] and in previous experiments reported there, ranges from 0.0245 to 0.028. For each mesh size, the value of the \(C_D\), chosen as a measure of the fitness of the mesh, is well within the range of experimental values. Although technically speaking yet not at convergence, to reduce the overall computation time for the rest of the analyses, we considered the medium mesh size (1 M elements) fit for our purposes.

Fig. 9
figure 9

Detail of the fluid mesh with boundary layer and wet surface in the FSI simulation

Table 3 Steady lift and drag values

All the coupled simulations are performed using the OpenFOAM solver pimpleFOAM and laminar model, as the flow at the Reynolds numbers of the experiments (from 10,000 to 30,000) can be considered laminar [28, 29]. A deeper study concerning the effects of different turbulent models is envisaged as a future investigation. However, for the values of Re studied, the laminar model provided acceptable results.

5.3.3 Coupling model

The coupling model concerns how the fluid and structural solvers are interconnected and how convergence is reached. The main parameters defined in preCICE are:

  • Strong coupling (see Sect. 3.2) because of the added mass effect,

  • Staggered simulation the structural solver is executed first, the fluid solver second. This gave us better performance,

  • IQN-ILS coupling strategy [30] which guarantees fewer iterations,

  • Time extrapolation of interface data for faster convergence,

  • Residual control relative measure \(1\times 10^{-4}\) on forces,

  • Time step the time step is controlled by preCICE and is fixed to \(\Delta t = 0.1\) ms, to guarantee \(CFL<1\).

The time step selection derives from the observation that loose coupling of fluid and structural part, in the context of incompressible flow and slender structures, frequently yields unstable computations [31] and, for those methods, time step selection is relevant. Stability limits for strongly coupled algorithms have a different relation to the time step. Simulations show that reducing the time step is no beneficial to increased instability. The added mass effect is inherent in the coupling itself [32], implicit methods behave differently in incompressible regime: the number or sub-iterations required to reach convergence during a single time step may increase when the time step decreases [14]. Given those limitations we chose to work with a single time-step which allows to keep CFL close to 1 in each point of the fluid domain. Increasing this time step might risk to make the fluid flow, and its mesh deformation, unstable. A lower time step does not guarantee a better coupling.

5.3.4 Initialization

The first steps of a coupled simulation can be critical in terms of convergence. For this reason, the following precautions have been taken into consideration to ease the beginning of the simulation:

  • The fluid domain is initialized with a fully developed steady state solution,

  • The wing root oscillation is driven by MBDyn in terms of frequency and amplitude,

  • The structure is loaded progressively: initially, only a fraction of the magnitude of the fluid forces is passed to the structure. The magnitude increases during the first 100 ms of the simulation up to \(100\%\).

5.4 Simulations

Within the wide range of combinations of parameters considered in the experimental studies, in this initial analysis, we focused on the wing with a steel core at Reynolds number 30,000, which corresponds to an inlet fluid velocity of 0.3 ms\(^{-1}\), varying the flapping frequency from a minimum of 0.75 Hz to a maximum of 1.75 Hz (which corresponds to \(k_G=1.82\)).

From the coupled simulations, we extracted the information concerning the root MBDyn node (i.e., the node whose movement is driven by a sinusoidal law) and the tip node. Figure 10 shows the displacements at \(k_G=1.82\). The same data can be collected by placing probes in the preCICE configuration file.

After the initial transient, the structure response shows a cyclic behavior.

Fig. 10
figure 10

Simulation data: time evolution of root and tip displacements

By measuring the rotation of the tip node along the beam axis, we verified that the wing can be considered torsionally rigid, as Fig. 11 shows the pitch angle at \(k_G=1.82\).

Fig. 11
figure 11

Simulation data: time evolution of tip pitch angle

The simulations performed allowed us to compare some of the results presented in [8] with the measures obtained in the framework MBDyn-preCICE-OpenFOAM.

5.5 Results

Through a series of simulations, our study aimed to clarify some key aspects of wing behavior, particularly focusing on the relationship between structural properties, dynamic behavior, and simulation convergence. Our investigation has been compared to some of the data published in [8], first analyzing the oscillation amplification of the steel wing tip, as shown in Fig. 12.

Fig. 12
figure 12

Simulation results: tip amplitude amplification over reduced frequency \(\left( K_G\right)\) at Reynolds number 30,000

In comparing simulation results against experimental benchmarks, we observed a remarkable agreement in the ratio of tip-to-root amplitudes, showing the accuracy of our computational approach in capturing the fundamental characteristics of wing motion.

However, a discrepancy emerged when analyzing the phase lag between the root and tip of the wing (see Fig. 13). This disparity can be attributed to the oversimplification of the damping term within the structural model, which probably fails to account for the viscoelastic properties of the polydimethylsiloxane (PDMS) component. In our model, we considered only the contribution of the metal core to the structure’s stiffness (see Sect. 5.3.1), an assumption that appeared to be correct according to the results in terms of amplitude. For the damping, we used the previously mentioned contribution, with the damping matrix proportional to the stiffness matrix, the proportionality coefficient (\(\beta\) in the Figure) varying from a minimum of \(10^{-4}\) to a maximum of \(10^{-2}\), as shown in Fig. 13, which appears too simplistic.

Despite this limitation, the variation in damping values did not significantly influence the maximum amplification ratio of tip versus root displacement, underscoring the robustness of the computational framework in capturing macroscopic wing behavior.

Fig. 13
figure 13

Simulation results: tip phase lag over reduced frequency \(\left( K_G\right)\) at Reynolds number 30,000

Furthermore, our investigation into simulation convergence sheds some light on the effectiveness of different coupling parameters and convergence criteria, as shown in Fig. 14. Notably, the staggered coupling approach, coupled with convergence on forces and Inverse Quasi-Newton (IQNILS) acceleration (see Sect. 3.2), facilitated relative convergence on forces throughout the simulation domain.

The observed trend, where initial timesteps required a higher number of iterations (6–8) while subsequent time steps converged with only two iterations, highlights the effectiveness of the more sophisticated acceleration techniques once the pseudo-Jacobian has been adequately populated and the enhancement in convergence efficiency given by time extrapolation of coupling data.

Fig. 14
figure 14

Simulation results: convergence measures. time evolution of coupling residuals (above) and number of coupling iterations (below)

Examining the drag force evolution during simulation revealed intriguing patterns in force dynamics (Fig. 15). The cumulative sum of interface forces along the x-axis exhibited residual noise, particularly evident in localized fluctuations within the drag force profile. Despite the presence of such noise, the overall impact on simulation outcomes remained modest, as tighter convergence criteria would entail exponentially more iterations without guaranteeing substantial improvements in accuracy. This observation underscores the pragmatic trade-off between computational efficiency and precision in fluid-structure simulations.

Fig. 15
figure 15

Simulation results: time evolution of drag force and of the root displacement, showing that drag presents double frequency with respect to the root displacement. On the right, detail on small residual noise

In conclusion, our study offers valuable insights into the intricate interplay between structural dynamics, aerodynamic forces, and simulation convergence in flapping wing systems. While certain limitations exist, such as the simplified representation of viscoelastic damping, our findings lay the groundwork for future refinements in computational modeling techniques, ultimately advancing our understanding of bio-inspired flight mechanisms and facilitating the design of innovative aerial vehicles.

5.6 Issues and future work

In this Section, we analyze the difficulties encountered in the simulations and the directions of future research.

5.6.1 Challenges with mesh deformation

Our fluid-structure interaction simulations have encountered significant hurdles primarily related to mesh deformation. Currently, within our framework, the usable OpenFOAM meshMotionSolver method is displacement Laplacian with a mesh Diffusivity parametrization employing inverse Distance.

This configuration initially seemed promising. However, we soon faced limitations in overall motion and mesh deformation, particularly concerning highly flexible wing configurations. Despite attempts to mitigate these issues through subcycling in the fluid domain based on the Courant Number, achieving satisfactory results remained difficult.

5.6.2 Exploring overset mesh solutions

In an attempt to address the complexities of mesh deformation, we delved into overset mesh methodologies. Initially, we conducted tests using a rigid wing to establish overset parameters effectively. Subsequently, we transitioned to flexible wing simulations, where we configured the deformation between the wet surface and the chimera mesh employing, as before, displacement Laplacian as the OpenFOAM mesh MotionSolver and uniform diffusivity as parametrization.

These tests yielded insights into the challenges of overset mesh strategies. While the approach appeared promising, it also introduced higher computational costs and exacerbated the difficulty of coupling convergence (i.e., more iterations at each time step). Notably, results were consistent with the ones obtained with a single mesh for \(K_G=1\), but issues arose with higher frequencies, underscoring the need for further refinement.

5.6.3 Future directions and exploration

Looking forward, our focus now shifts towards exploring alternative solutions to enhance our fluid-structure simulations. Investigating different motion solvers, such as the ones based on Radial Basis Functions, presents a promising way of addressing the challenges encountered in the previous simulations. Additionally, we aim to better exploit fluid-solid coupling mechanisms, particularly in integrating the deformation of the fluid surrounding the structure using MBDyn mapping. By refining our approaches and leveraging innovative techniques, we hope to overcome current limitations and advance the efficacy of fluid-structure simulations in diverse applications.

6 Conclusions

In conclusion, our study has demonstrated the effectiveness of Multibody Dynamics in the context of fluid-structure interaction, particularly in simulating the behavior of slender or thin bodies using elements such as beams and shells.

By adopting this approach, we achieved a simpler overall model with fewer degrees of freedom compared to a complete Finite Element Method (FEM) simulation. Our comparison with experimental results on a flexible flapping wing immersed in water has yielded valuable insights.

While initial findings appear promising and provide valuable data for refining the simulation setups, challenges persist, notably in addressing the high deformations characteristic of highly flexible wings.

Our future attempts will include a broader spectrum of conditions to be tested and compared, further refining our understanding of fluid-structure interactions.

Additionally, efforts will focus on tackling issues such as domain deformation at the interface, where the adoption of mesh motion solvers such as overset and deformations based on Radial Basis Functions (RBF) methods holds significant potential for enhancing the accuracy and fidelity of our simulations.

Through these activities, we aim to improve and enhance the features of our framework, paving the way for more comprehensive and accurate modeling techniques in the study of flexible structures interacting with fluid environments.