1 Introduction

In nature, organisms obtain the thrust needed for motion by swinging their bodies, which is a very universal phenomenon, e.g., when birds and insects fly and when fish and microorganisms swim. These movements are often accompanied by great deformation of the bodies [1], in which flexibility is the key factor. In recent years, scientists have performed considerable research on passive flexibility. By comparing the swimming efficiency of an artificial rigid robot dolphin and a real dolphin in nature, Gray [2] found that the efficiency of the former is only one-seventh of the efficiency of the latter. Iverson et al. [3] demonstrated that flexibility can improve the thrust generation and efficiency of the oscillating-foils in comparison to a rigid foil baseline. Zhu et al. [4] studied the wake symmetry of a self-propelled foil and found that increasing the flexibility of the foil can increase the symmetry of the wake and may also destroy the symmetry of the wake. In this experiment, increasing the flexibility of the foil will lead to a decrease in the attack angle and vorticity at the leading edge. At the same time, the flapping speed at the trailing edge will be increased, resulting in an increase in the vorticity at the tail end. ToshiyukiIn et al. [5] studied the wing passively maintains aerodynamics through flexibility. In many previous studies, passive flexibility has been shown to improve swimming performance [6,7,8,9]. However, the influence of the variable flexibility along the length direction on the filament thrust has not been explored to a large extent.

Interestingly, some flying animals, such as birds and flies, have variable flexibility in their wings, and this unevenly distributed flexibility can improve flight efficiency [10, 11]. Swimming and flying animals, ranging from whales to insects, have different shapes and different ways of moving, and their bodies begin to become highly flexible at about two-thirds from the head end [12]. For fish, although there are many factors (material, shape, interaction with a fluid, driving mode) that affect the generation of thrust and swimming efficiency, passive non-uniform flexibility is the main variable that controls the waveform [13, 14]. The research of Lucas et al. [15] showed that, with few exceptions, the motion performance of a model with variable flexibility is better than that of a model with uniform flexibility, and this result is not affected by the experimental conditions. The relationship between variable flexibility and exercise performance is very complicated, and how variable flexibility improves exercise performance is still unknown.

Experimentally, it has been impossible to control the driving and flexible distribution patterns of free-moving live fish and to accurately measure the forces and torques. To separate the influence of other factors and study the relationship between flexibility and swimming performance, researchers have proposed simplified experimental models. Peng et al. [16] carried out numerical simulation research on a filament with different fixation modes of the drive end and found that when the flexibility of the filament was exponentially distributed, the filament obtained the maximum thrust. Lucas et al. [15] studied the flexible distribution of a foil and found that when the fish moved at a uniform speed, the flexible distribution mode exhibited low flexibility in the first two-thirds of the body and high flexibility in the remainder of the body. However, during the acceleration process, fish bodies usually start to become highly flexible at one-third of their length. By optimizing the flexible distribution of the foil chord upwards, the propulsion efficiency of the foil has been improved by 69% at most [17]. The above experimental results show that the impact of flexibility on motion performance is very complex. Notably, in previous studies, the propulsor is in a static or uniform fluid, which is inconsistent with the fluid environment in most cases of fish in nature. Moreover, in the self-propelled model, the movement of the propulsor is given by an equation in the direction perpendicular to the advancement and cannot be adjusted adaptively according to the force of the flow field; therefore, the fluid–solid coupling effect in this direction may be ignored.

To fully explore the impact of the non-uniform stiffness on the swimming performance under biologically relevant conditions, in this work, we conduct a numerical simulation study on the model of a semi-free filament by using the immersed boundary method [18]. The filament is placed behind the flapping foil, and both of them are immersed in a uniform oncoming fluid [19]. Changing the flapping parameters of the foils can also change the vortex street modes of their wakes, including the BvK vortices and the reverse BvK wake [20]. The remainder of the article is organized as follows. In Sect. 2, we describe the formulations applied to the foil filament model and fluid. In Sect. 3, the influence of variable flexibility on the motion and performance of filaments is discussed. In Sect. 4 we summarize the work of this paper.

2 Computational model and method

2.1 Computational model

In the calculation model presented in this paper, the rigid pitching foil on the left and the flexible filament on the right are placed in a 2D incompressible viscous fluid from left to right (see Fig. 1). The rigid foil is actuated by the harmonic pitching motion with the fixed center of the semicircle. The motion equation is as follows:

$$\theta (t )= \theta {{\text{sin}(2\uppi }}ft ).$$
(1)

Here, θ(t) is the flapping angle of the foil, which changes with time, θ is the maximum flapping angle, and f is the rate of flapping. According to the given different parameter values of f and θ, the wakes of the foil will show different patterns, including BvK vortices and the reverse BvK vortices. The leading edge (LE) of the filament is fixed in the horizontal direction and is unrestricted in the vertical direction, while the remainder of the filament is free in both directions. After the wake of the foil is stabilized, the filament is placed horizontally in the vortex street along the incoming inflow direction (y = 0). The filament oscillates passively under the action of the surrounding fluids.

Fig. 1
figure 1

Diagrammatic sketch of the physical model. c: chord length of the flapping foil, d: diameter of the flapping wing head end (c = 1.0, d = 0.4); θ: the maximum pitching angle of the foil; L: filament length and its value is 1.0; \(U_{\infty }\): initial incoming flow speed and its value is 1.0; \(\mathcal{O}\) is the origin of the coordinate axis and the foil pitches around this point

The motion of the fluid–structure system is governed by the following equations:

$$\frac{\partial \varvec{u}}{{\partial t}} + \nabla \cdot (\varvec{uu}) = - \nabla {{p}} + \frac{1}{{Re}}\nabla^{2} \varvec{u} + \varvec{f},$$
(2)
$$\nabla \cdot \varvec{u} = 0,$$
(3)
$$\varvec{f} (\varvec{x},t )= \int {\varvec{F} (s,t )} \delta (\varvec{x} - \varvec{X} (s,t ) ) {\text{d}}s,$$
(4)
$$\varvec{U} (s,t )= \int {\varvec{u} (\varvec{x},t )} \delta (\varvec{x} - \varvec{X} (s,t ) ) {\text{d}}x.$$
(5)

Equations (2)–(5) are dimensionless by L and the initial flow velocity \(U_{\infty }\) (L = 1.0, \(U_{\infty }\) = 1.0), where u and p are the flow speed and fluid pressure, respectively; s is the curvilinear material coordinate and t is the time; F is the Eulerian force density; f is the Lagrangian force density. In addition, we define the Reynolds number as:

$${Re} = \frac{{\rho dU_{\infty}}}{u}.$$
(6)

The value of Re is taken as Re = 255 in the current work because animal collectives demonstrate Re values from 102 to 106 [21]. Here, \({{\rho }}\) is the density of the flow, d is the diameter of the LE of the flapping foil, and u is the dynamic viscosity. Other major dimensionless parameters used in this paper are defined as follows:

$$St = \frac{{fd}}{{U_{\infty } }},\,A_{d} = \frac{{2c \cdot \sin \theta }}{d},$$
(7)
$$D_{L} = \frac{D}{L},St_{A} = \,St \cdot A_{d},$$
(8)

where St and StA are both Strouhal numbers, but their definitions are different. The value of St depends on the flapping frequency of the foil, the value of StA depends on the frequency and amplitude at the same time, and Ad is the amplitude of the pitching foil. In addition, the filament and the flapping foil are separated by a distance DL in the x direction.

The immersion boundaries consist of two parts: one is the rigid boundary of the flapping foil, and the other is the flexible boundary of the filament. Therefore, the interaction force is defined as follows:

$$\user2{F} ({s,t} )= \user2{F}_1 ({s,t} )+ \user2{F}_2 ({s,t} ),$$
(9)

where F(s,t) is the interaction force between the immersed boundary and the fluid. F1(s,t) refers to the interaction force between the fluid and the rigid flapping foil and F2(s,t) refers to the interaction force between the fluid and the filament. Equation [22] for calculating the interaction force between surrounding fluids and filaments are as follows:

$$\user2{F}_2(s,t) = \user2{F}_{s} (s,t) + \user2{F}_{b} (s,t) = \frac{{\partial T\varvec{\hat{\tau} }}}{{\partial s}} + \frac{{\partial E_{b} }}{{\partial \user2{X}}},$$
(10)
$$T = K_{s} \left( {\left| {\frac{{\partial \varvec{X}}}{{\partial s}}} \right| - 1} \right),$$
(11)
$$\varvec{\hat{\tau }} = \frac{{\frac{{\partial \varvec{X}}}{{\partial s}}}}{{\left| {\frac{{\partial \varvec{X}}}{{\partial s}}} \right|}},$$
(12)
$$E_{b} = \frac{1}{2}K_{b} \int {\left| {\frac{{\partial ^{2} \varvec{X}(s,t)}}{{\partial s^{2} }}} \right|} ^{2} \text{d}s,$$
(13)

where \(\varvec{F}_{s} (s,t )\) and \(\varvec{F}_{b} (s,t )\) are the stretching and compression force and the bending force, respectively; \(\varvec{\hat{\tau }}\) is the unit tangent vector defined at each point of the filament; \(E_{b}\) is the bending energy, which is defined by Eq. (12). The interaction force between the pitching foil and fluids is computed by the following equation [23]:

$$\int {\left[ {\int {\varvec{F}_{1}{\text{(}}s,t{\text{)}}\delta {\text{(}}\varvec{x} - \varvec{X}{\text{(}}s,t{\text{))d}}s} } \right]} \delta {\text{(}}\varvec{x} - \varvec{X}{\text{(}}s,t{\text{))d}}\varvec{x} = \frac{{\varvec{U}_{b}{\text{(}}s,t{\text{)}} - \varvec{U}{\text{(}}s,t{\text{)}}}}{{\Delta t}},$$
(14)

where \(\varvec{U}_{b} ({s,t} )\) is the actual velocity of the foil and \(\varvec{U} ({s,t} )\) is the intermediate velocity of the foil based on the flow speed. Ks and T are the stretching coefficient and the tension of the filament (Ks= 1 × 102). Kb is the dimensional bending rigidity of the filament. The smaller the value of Kb is, the more flexible the filament is. \(\hat{K}_{b}\) is the dimensionless form of Kb and is defined as follows: \(\hat{K}_{b}\) = Kb/(\({{\rho }}_{ 0}\) U2L3) (\({{\rho }}_{ 0}\) is the fluid mass density). In this paper, the value range of \(\hat{K}_{b}\) is 10−5< \(\hat{K}_{b}\) < 10−3, which is referred to in previous studies [24].

For the structure, a no-slip boundary condition is applied on the flexible filaments and the rigid foil surfaces. At LE (s = 0) of the filament, the boundary condition is:

$$\user2{X}(s = 0,t = 0) = (x_{0} ,0),\user2{X}(s = 0,t) = x_{0} ,\frac{{\partial ^{2} \varvec{X}}}{{\partial s^{2} }} = (0,0)^{\text{T}}.$$
(15)

For the free end (s = L) of the filament, the boundary condition is

$$T = 0, \frac{{\partial ^{2} \user2{X}}}{{\partial s^{2} }} = (0,0)^{\text{T}}, \, \frac{{\partial ^{3} \user2{X}}}{{\partial s^{3} }} = (0,0)^{\text{T}}.$$
(16)

The no-slip condition is imposed on the outer boundary of the fluid. In this study, the calculation area is rectangular with the dimensions of −5L < x < 20L and −8L < y < 8L. The computational grid in this paper is a reference to a previous study [25]. The grid is composed of 280 × 160 spatial nodes, the grid width is \(\Delta {x} = \Delta {y} = 0.025{L}\), and the time step length is dt = 0.002.

The present Navier–Stokes (N–S) solver and filament solver are validated by simulating an oscillating cylinder immersed in a uniform inflow and simulating the motion of a tethered filament behind the stiff cylinder, respectively, in Lin’s work [19]. The numerical simulation results show that the solver used in this study is accurate.

2.2 Filament design

In this study, there are three types of flexible distribution modes for filaments. Uniform distribution: The flexibility of filaments is the same from the LE to the trailing edge (TE), as shown in Fig. 2a. Continuous distribution: The flexibility of the filament varies according to the rule of functions, including linear, square and exponential functions, as shown in Fig. 2b. The segmented flexible distribution: the stiffness of the left part of the filament is \(\hat{K}_{b 1}\), and the stiffness of the right part (1-α)L of the filament is \(\hat{K}_{b 2}\), as shown in Fig. 2c.

Fig. 2
figure 2

Three flexible distribution modes of the filament. a Uniform distribution, \(\hat{K}_{b}\) = k; b Continuous variation distributions: (1) linear and square distributions \(\hat{K}_{b}\) = nx2 + bx + 0.001, (2) changes according to an exponential composite function, \(\hat{K}_{b}\) = exp(hx); c Segmented flexible distribution, the stiffness of the left part (αL) of the filament is \(\hat{K}_{b 1}\) = b1, and the stiffness of the right part (L-αL) of the filament is \(\hat{K}_{b2}\)= b2. L is the length of the filament, 0 < α<1

3 Results and discussion

3.1 Influence of the variable flexibility on the motion pattern of the filament

By setting different pitching parameters, the flapping foil can generate different wakes, including BvK vortex streets and the reverse BvK vortex streets. In this part, we compared 6 sets of data (see Table 1) to explore the influence of flexibility on the motion pattern of filaments. In the experiments of group A and group B, the flapping foil oscillation produces BvK vortex streets. The flexibility of the filaments is uniform, but the filaments in group B are more flexible. In group A, the filament swings between vortex streets. The filament is always swinging back and forth between adjacent vortex cores, the counterclockwise whirlpool (positive vorticity) will always pass through the underside of the filaments (−y direction), and the clockwise vortices (negative vorticity) always pass through the upper side of the filament (+y direction). Figure 3a-d shows the instantaneous vorticity contours and filament shapes at 0.1T, 0.4T, 0.7T and 1.0T (a complete swing cycle). This state of motion is referred to as M1. Figure 3e shows the curve of the y-coordinate of LE and TE of the filament changing with time. The solid-line and dotted-line curves represent the trajectory of the LE and TE of the filament, respectively.

Table 1 Physical parameter settings in the comparative experiment
Fig. 3
figure 3

Instantaneous vorticity contours and filament shapes within a complete swing cycle in motion state M1. a 0.1T, b 0.4T, c 0.7T, d 1.0T and e the curve of the Y-coordinate of the filament changing with time. The solid-line and dotted-line curves represent the trajectory of the LE and TE of the filament, respectively

In group B, the motion state of the filament is completely different from that of A. The filament always keeps swinging outside the vortex streets and will not return to the middle position of the vortex streets. Both the positive and negative vortices pass only from one side of the filament (the upper or lower side). When the leading edge of the filament meets the negative vortex, the filament will begin to move upwards. When encountering a positive vortex, the filament begins to move downwards. This state of motion is referred to as M2. Figure 4a–d shows the instantaneous vorticity contours and filament shapes at 0.1T, 0.4T, 0.7T and 1.0T (a complete swing cycle). Figure 4e shows the y coordinate curve of the filament changing with time. Compared with A, it can be seen that when the filament moves on the side of the vortex street, the flapping amplitude is smaller. When other parameters are the same, changing the flexibility of the filament will change its motion state. To verify the universality of this result, we performed four other comparative experiments. In groups C and D, the flapping foil oscillation produces a reverse BvK wake, and the flexibility of the filament is uniform in group C. From the y-coordinate of the LE and TE of the filament changes with time, as shown in Fig. 5a, we can see that the motion state of the filament is M1. In group D, the flexibility of the filaments changes according to the linear equation (\(\hat{K}_{b}\) = bx + 0.001). From the LE to the TE, the flexibility of the filament increases gradually along the length, and Fig. 5b shows the curve of the y-coordinates of the LE and TE of the filament. According to the curve, we can see that the motion state is M2. In groups E and F, the pitching foil produces a BvK wake. The flexibility of the filaments in the E group is uniform, but in the F group, it is composed of two parts. The stiffness of the first half (0.5L, L is the filament length) of the filament is \(\hat{K}_{b 1}\) = 10−3, and the stiffness of the remainder of the filament is \(\hat{K}_{b2}\) = 10−5. The curves of the y-coordinates of the LE and TE of the filaments of the two groups are shown in Fig. 5c and d, respectively. The motion state of group E is M1, and the motion state of group F is M2. The above numerical results show that changing the flexibility of the filament will also change the motion state of the filament.

Fig. 4
figure 4

Instantaneous vorticity contours and filament shapes within a complete swing cycle in motion state M2: a 0.1T, b 0.4T, c 0.7T, d 1.0T and e the curve of the Y-coordinate of the filament changing with time. The solid-line and dotted-line curves represent the trajectory of the LE and TE of the filament, respectively

Fig. 5
figure 5

Curves of Y-coordinate of the filament changing with time. a Group C, the motion state is M1; b Group D, the motion state is M2; c Group E, the motion state is M1 and d Group F, the motion state is M2

3.2 Comparison of the drag coefficients of continuous variable flexible filaments

In this section, we compare the swimming performance of uniform flexible filaments and variable flexible filaments by the drag coefficient. The time average drag coefficient of the filament is defined as:

$$\overline{C_d} = \frac{{\int_{t}^{t + T} {\left( {\int_{0}^{L} {\varvec{F_{x}} } {\text{d}}s} \right){\text{d}}t} }}{{\frac{ 1}{ 2}\rho U_{\infty }^{2} LT}} ,$$
(17)

where Fx is the component of the Lagrangian force density in the x-direction. In the BvK vortex streets (the corresponding pitching parameters of the pitching foil are St = 0.12 and \({A}_{d}\) = 2.1), the value of \(\overline{C_d}\) decreases as the stiffness of the filament increases, as shown in Fig. 6. To achieve the best swimming performance, we explore three different functional laws (linear function, quadratic function, exponential composite function) of the flexible distribution of a filament. For both linear and quadratic distributions, given by \(\hat{K}_{b}\) = nx2 + bx + 0.001 (x is the arc length along the filament, 0 < x < L). Referring to the study of Moore [26], we optimize the parameter space (n, b) to minimize the corresponding drag coefficient of the filament. The optimal linear and quadratic distributions are shown in Fig. 7. When the filament flexibility changes according to the optimal linear function, the value of \(\overline{C_d}\) is 8.53. When the filament flexibility changes according to the optimal square function, the value of \(\overline{C_d}\) is 8.54. We also explored an optimal exponential composite stiffness distribution, \(\hat{K}_{b}\) = 0.001exp(hx). According to the research method of Godoy-Diana et al. [27], we optimize the parameter h to minimize the corresponding drag coefficient of the filament. The optimal exponential composite function distribution is shown in Fig. 6, and its corresponding drag coefficient value is 8.59. Therefore, when the flexibility of the filament is in the optimal linear distribution, its drag reduction effect is the best (see Table 2). In the reverse BvK wake (the corresponding flapping parameters of the pitching foil are St = 0.22 and \({A}_{d}\) = 1.29), the numerical simulation is carried out according to the same experimental method as the method in the BvK vortex streets. We find that when the flexibility of the filament changes according to the optimal linear distribution (\(\overline{C_d}\) = 8.0), the value of \(\overline{C_d}\) is still lower than quadratic and exponential composite function distributions(see Table 3). However, the drag coefficient increases as the stiffness of the filament increases (see Fig. 8).

Fig. 6
figure 6

Line chart of the drag coefficient changing with flexibility in the BvK wake (St = 0.12,\(A_{d}\) = 2.1)

Fig. 7
figure 7

Optimal linear (n = 0, b = − 0.001), quadratic (n = 0.0008, b = − 0.0018) and exponential compound (c = − 10) stiffness distributions

Table 2 Values of resistance coefficient corresponding to different flexible distribution of filament (in the BvK wake)
Table 3 Values of resistance coefficient corresponding to different flexible distribution of filament (in there verse BvK wake)
Fig. 8
figure 8

Line chart of the drag coefficient changing with flexibility in the reverse BvK wake (St = 0.22,\(A_{d}\) = 1.29)

3.3 Segmented flexible distribution

Fish-like filament models with segmented stiffness distributions are considered to improve the motion performance. Previous experimental research results show that the body stiffness of many propulsors decreases along the length from the head to the tail, and the body becomes highly flexible from almost the same point [28]. To explore the segmental flexibility distribution characteristics of propulsors and their influence on swimming performance, we conducted a numerical simulation on the segmented stiffness distribution filaments in the BvK wake and the reverse BvK vortex streets. The stiffness of the filament is divided into two parts: the stiffness of the first part of the filament (left side) is \(\hat{K}_{b 1}\), and the stiffness of the second part of the filament is \(\hat{K}_{b2}\) (right side), as shown in Fig. 2c. Zhu et al. [4] showed that an increase in flexibility can result in a reduction in the vorticity production at the leading edge because of the decrease in the effective angle of attack, but it also enhances vorticity production at the trailing edge because of the increase in the trailing-edge flapping velocity. The competition between these two opposing effects eventually determines the strength of vortex circulation, which governs the propulsion efficiency. Inspired by this finding, we set a greater stiffness to the leading edge of the filament, i.e.,\(\hat{K}_{b 1}\) = 10−3, making the trailing edge highly flexible, i.e., \(\hat{K}_{b2}\) = 5 × 10−5. We assume that the length of the leading end (\(\hat{K}_{b 1}\) = 10−3) of the filament is αL. And the length of the trailing end (\(\hat{K}_{b2}\) = 10−5) of the filament is (1−α)L (0 < α<1, L is the total length of the filament). We found that in the BvK wake, when the value space of α is [0.85,0.9], the value of \(\overline{C_d}\) is the lowest, as shown in Fig. 8a. In the reverse BvK vortices, the same results as in the BvK wake are observed, as shown in Fig. 8b.

However, we do not obtain similar results under some other flow conditions. We consider that the optimal flexible distribution is related to the flow field conditions. Thus, numerical calculations are performed under different flow conditions to explore whether this conclusion is true. Finally, the parameter values that correspond to this conclusion are determined. As shown in Figs. 9 and 10, in parameter space A1, when the value space of α is [0.85,0.9], the value of \(\overline{C_d}\) is the lowest.

Fig. 9
figure 9

Line graph of the drag coefficient of the filament changing with the segment proportion. a In the BvK wake and b In the reverse BvK vortex streets

Fig. 10
figure 10

Motion state graph on the Ad vs. St map. open square stands for the motion state of M1. Open circle stands for the motion state of M2. Dashed line: the dividing line of the parameter space A1, in that region, when the value space of α is [0.85,0.9], the value of \(\overline{C_d}\) is the lowest, where StA is the Strouhal number StA = St × Ad. In the slash area in the upper right corner, the flapping foil produces an asymmetrical wake

4 Conclusions

We have explored the effect of nonuniform flexibility on the motion performance of a semi-free filament in the wake of a flapping foil through numerical research. Our results indicate that the motion state of the filament will alter with a change in the flexibility of the filament, from moving in the vortex street to moving on the side of the wake. In BvK vortices, the drag coefficient of the filament decreases with increasing flexibility. In the reverse BvK vortices, the opposite result is observed. The value of \(\overline{C_d}\) increases with the flexibility of the filament. However, in these two types of vortex streets, when the flexibility of the filaments changes linearly, the drag coefficient is the smallest, which is better than the uniform flexible distribution. In nature, the front part of the fish’s body is relatively less flexible, and the back part is relatively more flexible. Moreover, many experiments have proven that this flexible distribution pattern of fish can achieve better swimming performance. To obtain a clearer understanding of the flexible distribution characteristics, we explored the segmental distribution model of elastic filaments. The results show that when the value of α is [0.85,0.9] (the specific value depends on the flow field conditions), the value of \(\overline{C_d}\) is the smallest. In other words, the drag reduction effect of the filament is optimal when the filament starts to become highly flexible at 85%–90% along the length direction.