Hostname: page-component-745bb68f8f-cphqk Total loading time: 0 Render date: 2025-02-12T02:51:58.326Z Has data issue: false hasContentIssue false

Optimal undulatory swimming for a single fish-like body and for a pair of interacting swimmers

Published online by Cambridge University Press:  20 January 2017

Audrey P. Maertens*
Affiliation:
Center for Ocean Engineering, Massachusetts Institute of Technology, 77 Massachusetts Avenue, Cambridge, MA 02139, USA
Amy Gao
Affiliation:
Center for Ocean Engineering, Massachusetts Institute of Technology, 77 Massachusetts Avenue, Cambridge, MA 02139, USA
Michael S. Triantafyllou
Affiliation:
Center for Ocean Engineering, Massachusetts Institute of Technology, 77 Massachusetts Avenue, Cambridge, MA 02139, USA
*
Present address: EPFL, LMH, Avenue de Cour 33 bis, 1007 Lausanne, Switzerland. Email address for correspondence: audrey.maertens@epfl.ch

Abstract

We establish through numerical simulation conditions for optimal undulatory propulsion for a single fish, and for a pair of hydrodynamically interacting fish, accounting for linear and angular recoil. We first employ systematic two-dimensional (2-D) simulations to identify conditions for minimal propulsive power of a self-propelled fish, and continue with targeted 3-D simulations for a danio-like fish; all at Reynolds number 5000. We find that the Strouhal number, phase angle between heave and pitch at the trailing edge, and angle of attack are principal parameters. For 2-D simulations, imposing a deformation based on measured displacement for carangiform swimming provides, at best, efficiency of 35 %, which increases to 50 % for an optimized motion; for a 3-D fish, the efficiency increases from 22 % to 34 %. Indeed, angular recoil has significant impact on efficiency, and optimized body bending requires maximum bending amplitude upstream of the trailing edge. Next, we turn to 2-D simulation of two hydrodynamically interacting fish. We find that the upstream fish benefits energetically only for small distances. In contrast, the downstream fish can benefit at any position that allows interaction with the upstream wake, provided its body motion is timed appropriately with respect to the oncoming vortices. For an in-line configuration, one body length apart, the efficiency of the downstream fish can increase from 50 % to 60 %; for an offset arrangement it can reach 80 %. This proves that in groups of fish, energy savings can be achieved for downstream fish through interaction with oncoming vortices, even when the downstream fish lies directly inside the jet-like flow of an upstream fish.

Type
Papers
Copyright
© 2017 Cambridge University Press 

1 Introduction

The grace and agility of swimming fish and marine mammals have excited the curiosity of scientists for a long time. For example, the Northern pike (Enox lucius) can reach accelerations up to $25g$ (Harper & Blake Reference Harper and Blake1990), while the European eel (Anguilla anguilla) annually swims over 5000 km across the Atlantic Ocean while fasting (Ginneken et al. Reference Ginneken, Antonissen, Miller, Booms, Eding, Verreth and Thillart2005): fish employing body undulation as their primary means of propulsion greatly surpass all engineered vehicles in terms of fast-starting and manoeuvering capabilities. In the hope of shedding light to the fluid mechanisms behind the aquatic animals’ extraordinary performance, biologists, hydrodynamicists and engineers have observed fish swimming (Gray Reference Gray1933; Videler & Hess Reference Videler and Hess1984; Tytell Reference Tytell2004), measured their metabolic rates (Bainbridge Reference Bainbridge1961; Webb Reference Webb1971), proposed hydrodynamic principles and scaling laws (Gero Reference Gero1952; Lighthill Reference Lighthill1960; Triantafyllou, Triantafyllou & Gopalkrishnan Reference Triantafyllou, Triantafyllou and Gopalkrishnan1991; Gazzola, Argentina & Mahadevan Reference Gazzola, Argentina and Mahadevan2014; van Weerden, Reid & Hemelrijk Reference van Weerden, Reid and Hemelrijk2014), and built robots replicating the function of fish (Triantafyllou & Triantafyllou Reference Triantafyllou and Triantafyllou1995; Stefanini et al. Reference Stefanini, Orofino, Manfredi, Mintchev, Marrazza, Assaf, Capantini, Sinibaldi, Grillner and Walln2012; Sefati et al. Reference Sefati, Neveln, Roth, Mitchell, Snyder, Maciver, Fortune and Cowan2013; Ijspeert Reference Ijspeert2014).

With the increase in available computational power, computational fluid dynamics (CFD) provides an attractive alternative means of studying fish swimming. CFD is indeed a unique complement to experiments on live fish that can potentially give access to full three-dimensional (3-D) flow structures as well as local forces and power (Deng et al. Reference Deng, Xu, Chen, Dai, Wu and Tian2013). Since the viscous simulations of a two-dimensional self-propelled anguilliform swimmer by Carling, Williams & Bowtell (Reference Carling, Williams and Bowtell1998), a variety of methods have been developed to simulate fish swimming. These methods range from arbitrary Eulerian–Lagrangian methods with deformable mesh (Kern & Koumoutsakos Reference Kern and Koumoutsakos2006), to immersed boundary methods (Borazjani & Sotiropoulos Reference Borazjani and Sotiropoulos2008; Shirgaonkar, MacIver & Patankar Reference Shirgaonkar, MacIver and Patankar2009; Liu, Yu & Tong Reference Liu, Yu and Tong2011; Bergmann, Iollo & Mittal Reference Bergmann, Iollo and Mittal2014), to multiparticle collision dynamics methods (Reid et al. Reference Reid, Hildenbrandt, Padding and Hemelrijk2012) and viscous vortex particle methods (Eldredge Reference Eldredge2006). However, the application of CFD to the study of fish swimming is still in its infancy, and a number of modelling decisions need to be made. Once these modelling and numerical questions have been resolved, CFD becomes a very powerful tool providing unmatched detail of the flow properties, while allowing wide parametric searches through systematic changes in the body geometry or the swimming kinematics. As a result, there has recently been a number of publications reporting efforts in optimizing fish shape and/or swimming motion (Kern & Koumoutsakos Reference Kern and Koumoutsakos2006; Toki & Yue Reference Toki and Yue2012; Eloy Reference Eloy2013; van Rees, Gazzola & Koumoutsakos Reference van Rees, Gazzola and Koumoutsakos2013). In this paper we first present a methodology for simulating fish swimming in which the impact of modelling choices are carefully quantified. We use this methodology to investigate efficient swimming for an undulating body.

In addition to optimizing their self-generated flow structures, fish may be able to use the flow patterns from another swimming fish to save energy. Indeed, it has been shown by Liao et al. (Reference Liao, Beal, Lauder and Triantafyllou2003a ) that fish can use vortices to reduce the cost of locomotion, but whether energy saving is an important reason for schooling has long been a matter of discussion. Weihs (Reference Weihs1973) is one of the few papers proposing a hydrodynamic theory of schooling, viz. that fish can save energy by swimming in a ‘diamond’ configuration, taking advantage of areas of reduced average oncoming velocity that form between adjacent propulsive wakes. Partridge & Pitcher (Reference Partridge and Pitcher1979) later commented that saithe (Pollachius virens), herring (Clupea harengus) and cod (Gadus morhua) do not swim in the diamond pattern, which led Pitcher (Reference Pitcher and Pitcher1986) to write that ‘no valid evidence of hydrodynamic advantage has been produced, and existing evidence contradicts most aspects of the only quantitative testable theory published’. Yet, as pointed out by Abrahams & Colgan (Reference Abrahams and Colgan1987), such conclusions may be premature because they ignore the potential trade-offs involved in school functions. Indeed, despite the difficulty of assessing the importance of energy saving in schooling due to the dynamic nature of schools, there has been experimental evidence that fish located in the rear part of a school spend less energy than those in the front (Killen et al. Reference Killen, Marras, Steffensen and McKenzie2012). A recent paper suggests that, in a fish school, individuals in every position have reduced costs of swimming, compared to when they swim at the same speed but alone (Marras et al. Reference Marras, Killen, Lindstrom, Mckenzie, Steffensen and Domenici2014). Further, the recent finding that ibises in a flock position themselves and phase their motion such that they can take advantage of the vortices left by the ibis in front of them, suggests that analogous mechanisms might be found for fish schools as well (Portugal et al. Reference Portugal, Hubel, Fritz, Heese, Trobe, Voelkl, Hailes, Wilson and Usherwood2014).

A number of recent computational studies have also been completed with the goal of investigating the flow structures between schooling fish and the interactions between fish in different swimming arrangements (Zhu & Peskin Reference Zhu and Peskin2003; Dong & Lu Reference Dong and Lu2007; Alben Reference Alben2009; Daghooghi & Borazjani Reference Daghooghi and Borazjani2015; Hemelrijk et al. Reference Hemelrijk, Reid, Hildenbrandt and Padding2015). Alben (Reference Alben2009) studied the case of both side-by-side and in-line flags, finding that the timing of flapping, which depended on the distance between the flags, was very important for both. For the hydrodynamically richer in-line case, the drag force was increased for synchronous flapping, which correlated with constructive interaction between the two vortex wakes. However, Hemelrijk et al. (Reference Hemelrijk, Reid, Hildenbrandt and Padding2015) found that even when fish do not pay any attention to their timing, they were able to save more energy when schooling in diamond, rectangular, phalanx and in-line formations than when swimming alone. Daghooghi & Borazjani (Reference Daghooghi and Borazjani2015) ran 3-D simulations to investigate the validity of two hypotheses on the increased efficiency of schooling fish: the channelling effect and vortex capture. They found significant evidence that the channelling effect, in which the required thrust force is decreased due to the proximity of other fish, was responsible for the observed gains in efficiency. In this paper we investigate the mechanisms by which two fish swimming as a pair can save energy, and the importance of timing and positioning.

In § 2, we discuss modelling considerations for the simulation of fish swimming and briefly present the governing equations and numerical details specific to fish swimming simulations. We use the model and numerical method to optimize the gait of an undulating fish-like foil in open water (§ 3) and the positioning and timing for a pair of undulating fish-like foils (§ 4).

2 Methods: modelling and simulations

Aquatic animals exhibit a wide variety of designs and propulsion modes. However, most fish and cetaceans generate thrust by bending their bodies into a backward-travelling wave that extends to the caudal fin, a type of swimming often classified as body and/or caudal fin (BCF) locomotion (Sfakiotakis, Lane & Davies Reference Sfakiotakis, Lane and Davies1999). In the present paper, we investigate the efficiency of BCF propulsion, with particular examples drawn from eels that undulate their whole body (anguilliform motion), as well as saithe and mackerel that only undulate the aft third of their body (carangiform motion) (Breder Reference Breder1926). For expedient calculations, and since the swimming motion bends the body as a plate, i.e. it is quasi-two-dimensional, we first use 2-D simulations to investigate the impact of various kinematic parameters and then compare the results with 3-D simulations of a danio-shaped body.

2.1 Fish shape and swimming motion

In order to capture the main parameters of BCF swimming while keeping the problem complexity manageable, we model the main body of the fish and its caudal fin but not the other fins or details on the body such as scales, finlets and other protrusions. We represent a swimming fish by a neutrally buoyant undulating body of length $L=1$ , as illustrated in figure 1. For the 2-D simulations, a NACA0012 shape is chosen at rest, whereas a danio-shaped body, shown in figure 2, is used for the 3-D simulations. The body propels itself at average speed $U_{s}$ in a fluid of kinematic viscosity $\unicode[STIX]{x1D708}$ and density $\unicode[STIX]{x1D70C}$ by oscillating its mid-line in the transverse direction $y$ . The leading edge of the body at rest is located at $x=0$ and its trailing edge at $x=1$ . In 2-D simulations, we will refer to the body as a ‘fish’ rather than a flexible foil to avoid confusion with the caudal fin, and with non-self-propelled flexible foils used as propulsors.

Figure 1. Schematic showing the fish model parameters. An elongated body of length $L$ undulates in a flow of speed $U_{s}$ with a wave travelling backward at speed $f\unicode[STIX]{x1D706}$ and amplitude $a$ at the trailing edge.

Figure 2. Three-dimensional fish geometry based on a giant danio.

We employ travelling wave kinematics that resemble those observed in fish according to either carangiform or anguilliform swimming, and include recoil. The lateral displacement, $h$ , of a point located at $x$ along the foil is given at time $t$ by the sum of body deformation $h_{0}$ , recoil $B$ and steering $y_{1}$ :

(2.1) $$\begin{eqnarray}\displaystyle h(x,t) & = & \displaystyle h_{0}(x,t)+B(x,t)+y_{1}(x)\nonumber\\ \displaystyle & = & \displaystyle a_{0}A(x)\sin (2\unicode[STIX]{x03C0}(x/\unicode[STIX]{x1D706}-ft+\unicode[STIX]{x1D719}))+B(x,t)+y_{1}(x)\nonumber\\ \displaystyle & = & \displaystyle g(x)\sin (2\unicode[STIX]{x03C0}(ft+\unicode[STIX]{x1D713}(x)))+y_{1}(x),\end{eqnarray}$$

where $A(x)$ , with $A(1)=1$ , is the envelope of the prescribed backward travelling wave of wavelength $\unicode[STIX]{x1D706}$ and frequency $f$ ,

(2.2) $$\begin{eqnarray}B(x,t)=(a_{r}+b_{r}x)\sin (2\unicode[STIX]{x03C0}(ft+\unicode[STIX]{x1D719}_{r}))\end{eqnarray}$$

is the recoil term due to the hydrodynamic forces on the fish, and

(2.3) $$\begin{eqnarray}y_{1}(x)=C(x^{2}+\unicode[STIX]{x1D6FE}x+\unicode[STIX]{x1D6FD})\end{eqnarray}$$

can be used for steering (see appendix B) by adding camber to the fish, while $\unicode[STIX]{x1D6FE}$ and $\unicode[STIX]{x1D6FD}$ ensure that linear and angular momentum are conserved through the deformation. The recoil term represents periodic solid body transversal displacement and rotation. The amplitude of the translation is $a_{r}$ , while the amplitude of the rotation is $\arctan (b_{r})$ . The steering term $y_{1}$ is necessary to ensure stability but, in the steady regime, $y_{1}\ll a_{0}$ (typically $C<0.025$ ).

The parameter $a_{0}$ determines the amplitude of the deformation $h_{0}$ at the trailing edge. It is adjusted through a feedback control loop to ensure that the average net drag on the foil is 0, as described in appendix B. $h_{0}(x,t)$ can be used without the recoil and steering terms in order to fully prescribe the kinematics of the swimmer, in which case $h(x,t)=h_{0}(x,t)$ . For a freely moving body with prescribed deformation, the recoil is computed from the hydrodynamic forces on the body. In the latter case, the envelope of the actual displacement is given by $g(x)$ , with peak to peak amplitude at the trailing edge given by $a=2g(1)$ .

The prescribed kinematics of a carangiform swimmer, based on the experimental observation of steadily swimming saithe (Videler & Hess Reference Videler and Hess1984; Videler Reference Videler1993), is often modelled without recoil ( $B=0$ ) as:

(2.4a-c ) $$\begin{eqnarray}a_{0}=0.1,\quad A(x)=A_{c}(x)=1-0.825(x-1)+1.625(x^{2}-1),\quad \unicode[STIX]{x1D706}=1.\end{eqnarray}$$

This motion is for example used in Dong & Lu (Reference Dong and Lu2007), Borazjani & Sotiropoulos (Reference Borazjani and Sotiropoulos2008) and, in the rest of the paper, will be referred to as the carangiform gait. Assuming $B=0$ , experimental observations of American eels (Tytell & Lauder Reference Tytell and Lauder2004) provide that anguilliform motion can be represented by:

(2.5a-c ) $$\begin{eqnarray}a_{0}=0.1,\quad A(x)=A_{a}(x)=1+0.323(x-1)+0.310(x^{2}-1),\quad \unicode[STIX]{x1D706}=1.\end{eqnarray}$$

Figure 3(a) shows the prescribed envelope $A(x)$ for the carangiform (respectively anguilliform) swimmer defined in (2.4) (respectively (2.5)). Figure 3(b) illustrates the resulting mid-line displacement in the presence of the recoil term.

Figure 3. Carangiform and anguilliform motion for $f=1.8$ and $a_{0}=0.1$ at Reynolds number $\mathit{Re}=5000$ with recoil. (a) Prescribed amplitude envelopes, (b) mid-line displacement.

2.2 Kinematic parameters

The goal of this paper is to identify kinematic parameters that minimize the self-propelled swimming power $P_{in}$ for a given speed (Reynolds number) and body shape. In order to quantify the fitness of each motion, the quasi-propulsive efficiency $\unicode[STIX]{x1D702}_{QP}$ is used, which compares $P_{in}$ to the useful power, i.e. the resistance $R$ of the rigid–straight towed body at the same speed $U_{s}$ times the speed: $\unicode[STIX]{x1D702}_{QP}=RU_{s}/\overline{P_{in}}$ . Indeed, as discussed in Maertens, Triantafyllou & Yue (Reference Maertens, Triantafyllou and Yue2015), the Froude propulsive efficiency is not appropriate here as it is zero for a self-propelled body. Therefore, $R$ is calculated by towing a rigid body in the still flow with the prescribed velocity $U_{s}$ .

For rigid flapping foils, the parameters that characterize the motion and its performance have been extensively studied (Anderson et al. Reference Anderson, Streitlien, Barrett and Triantafyllou1998; Read, Hover & Triantafyllou Reference Read, Hover and Triantafyllou2003). The principal kinematic parameters are the Strouhal number and the maximum nominal angle of attack, and, to a lesser degree, the heave amplitude to chord ratio, and the phase angle between heave and pitch; all, typically, measured at 25 % of the chord. The Strouhal number is a wake parameter, since it characterizes the dynamics of the (unstable) wake (Triantafyllou et al. Reference Triantafyllou, Triantafyllou and Gopalkrishnan1991; Triantafyllou, Triantafyllou & Grosenbaugh Reference Triantafyllou, Triantafyllou and Grosenbaugh1993); hence the width of the wake must, in principle, be used as the characteristic length. However, the width of the wake is unavailable beforehand, so this characteristic length is approximated typically by the peak to peak motion of the trailing edge. Hence, for an undulating flexible foil, we define the Strouhal number, heave amplitude, pitch angle and nominal angle of attack at the trailing edge. These parameters and others used throughout this paper are summarized in table 1. While the motion cannot be characterized by these parameters alone, they play an important role in determining the swimming efficiency.

Table 1. Kinematic and other dimensionless parameters.

Changing the amplitude of motion and Strouhal number can be achieved through parameters like $a_{0}$ and $f$ (though, for a given motion and average velocity, there is a unique amplitude that ensures a steady velocity) but, in general, the pitch amplitude $\unicode[STIX]{x1D703}_{max}$ and maximum angle of attack $\unicode[STIX]{x1D6FC}_{max}$ cannot be directly controlled. Therefore, when optimizing the swimming gait, it is important to choose a parametrization that allows to adjust the pitch and angle of attack amplitudes independently of the heave amplitude and Strouhal number. This is best done by changing parameters that control the derivative of the prescribed envelope $A(x)$ at the trailing edge.

In this study, the wavelength of the travelling wave is fixed, equal to the body length, and the average swimming speed is adjusted to ensure a Reynolds number $\mathit{Re}=5000$ . Fish body shape is also fixed, while the linear and angular recoil terms are computed by integration of the hydrodynamic forces. The lateral flexing motion $h_{0}(x,t)$ (i.e. the lateral motion after the linear and angular recoil are subtracted) is characterized by four parameters: the frequency, amplitude and two parameters controlling the shape of $A(x)$ , the envelope of the unsteady bending motion. With prescribed frequency, the amplitude is automatically adjusted to satisfy self-propulsion at $\mathit{Re}=5000$ , while the two remaining parameters are varied systematically in order to identify the values that minimize the swimming power (equivalently, maximize the quasi-propulsive efficiency $\unicode[STIX]{x1D702}_{QP}$ ). In order to explore a wide range of motions, two different parametrizations are used for $A(x)$ : a quadratic envelope and a Gaussian envelope (see details in § 3.1).

2.3 Governing equations and numerical implementation

The motion of a self-propelled swimming body is determined by the coupled fluid–body dynamics. The physical parameters are non-dimensionalized by the fish body length $L$ , its intended average cruising speed $U_{s}$ and the density of water  $\unicode[STIX]{x1D70C}$ .

In order to solve the coupled fluid/body problem described above, we adapted the second-order boundary data immersion method (BDIM) presented in Maertens & Weymouth (Reference Maertens and Weymouth2015). The validation of the numerical method used in the present paper for simulating self-propelled undulating bodies is presented in appendix A. For the two-dimensional simulations, constant velocity $\boldsymbol{u}=\boldsymbol{U}_{s}$ is used on the inlet ( $x=-6$ ), periodic boundary conditions on the upper and lower boundaries ( $y=\pm 2.4$ ) and a zero gradient exit condition with global flux correction ( $x=7$ ). As shown in appendix A, the domain is large enough, such that the boundaries do not impact the results of the simulation. The Cartesian grid is uniform near the fish and uses a 2 % geometric expansion ratio for the spacing in the far field, as illustrated in figure 4. As discussed in appendix A, the grid spacing near the fish is $\text{d}x=\text{d}y=1/160$ for the optimization procedures, which allows reasonable accuracy and fast iterations. The optimized kinematics are then simulated using a finer grid with $\text{d}x=\text{d}y=1/320$ in order to guarantee an error of less than 10 %. Similarly, the fine grid is used for all the two-fish simulations.

The three-dimensional simulations are run on a $6\times 3\times 3$ domain with constant velocity $\boldsymbol{u}=\boldsymbol{U}_{s}$ on the inlet, a zero gradient exit condition with global flux correction, and periodic boundary conditions along $y$ and $z$ boundaries. The Cartesian grid is uniform near the fish with grid size $\text{d}x=\text{d}y=\text{d}z=1/100$ and uses a 4 % geometric expansion ratio for the spacing in the far field.

Figure 4. Flow configuration for the undulating NACA0012 simulations. The vorticity field for the carangiform motion with $f=1.8$ and zero mean drag is shown as an example.

The fluid and body equations are integrated over the fluid and body domains, respectively $\unicode[STIX]{x1D6FA}_{f}$ and $\unicode[STIX]{x1D6FA}_{b}$ , with a kernel of radius $\unicode[STIX]{x1D716}=2\,\text{d}x$ . The BDIM equations for the smoothed velocity field $\boldsymbol{u}_{\unicode[STIX]{x1D716}}$ are valid over the complete domain $\unicode[STIX]{x1D6FA}=\unicode[STIX]{x1D6FA}_{f}\cup \unicode[STIX]{x1D6FA}_{b}$ and enforce the no-slip boundary condition at the interface. These equations, integrated from time $t$ to time $t_{+}=t+\unicode[STIX]{x0394}t$ , are:

(2.6) $$\begin{eqnarray}\left.\begin{array}{@{}c@{}}\boldsymbol{u}_{\unicode[STIX]{x1D716}}(t_{+})=\boldsymbol{v}(t_{+})+\left(\unicode[STIX]{x1D707}_{0}^{\unicode[STIX]{x1D716}}(d)+\unicode[STIX]{x1D707}_{1}^{\unicode[STIX]{x1D716}}(d){\displaystyle \frac{\unicode[STIX]{x2202}}{\unicode[STIX]{x2202}n}}\right)(\boldsymbol{u}_{\unicode[STIX]{x1D716}}(t)-\boldsymbol{v}(t_{+})+\boldsymbol{R}_{\unicode[STIX]{x0394}t}-\boldsymbol{\unicode[STIX]{x2202}}\boldsymbol{P}_{\unicode[STIX]{x0394}t}),\\ \unicode[STIX]{x1D735}\boldsymbol{\cdot }\boldsymbol{u}_{\unicode[STIX]{x1D716}}(t_{+})=0,\end{array}\right\}\end{eqnarray}$$

where $\boldsymbol{v}$ is the velocity field associated with the closest body, $\hat{n}$ the unitary normal to the closest fluid/solid boundary (pointing toward the fluid) and $d$ the signed distance to the closest boundary ( $d>0$ within the fluid, $d<0$ inside a body). $\unicode[STIX]{x1D707}_{0}^{\unicode[STIX]{x1D716}}$ and $\unicode[STIX]{x1D707}_{1}^{\unicode[STIX]{x1D716}}$ are respectively the zeroth and first central moments of the smooth delta kernel (see Maertens & Weymouth (Reference Maertens and Weymouth2015) for more details). $\boldsymbol{\unicode[STIX]{x2202}}\boldsymbol{P}_{\unicode[STIX]{x0394}t}$ , the pressure impulse, and $\boldsymbol{R}_{\unicode[STIX]{x0394}t}$ , accounting for all the non-pressure terms, are defined as:

(2.7a,b ) $$\begin{eqnarray}\boldsymbol{R}_{\unicode[STIX]{x0394}t}(\boldsymbol{u})=\int _{t_{0}}^{t_{0}+\unicode[STIX]{x0394}t}\left[-(\boldsymbol{u}\boldsymbol{\cdot }\unicode[STIX]{x1D735})\boldsymbol{u}+\unicode[STIX]{x1D708}\unicode[STIX]{x1D6FB}^{2}\boldsymbol{u}\right]\text{d}t,\quad \boldsymbol{\unicode[STIX]{x2202}}\boldsymbol{P}_{\unicode[STIX]{x0394}t}=\int _{t_{0}}^{t_{0}+\unicode[STIX]{x0394}t}\frac{1}{\unicode[STIX]{x1D70C}}\unicode[STIX]{x1D735}_{p}\,\text{d}t.\end{eqnarray}$$

In order to simplify the equations of motion, we consider motion within the $(x,y)$ plane, such that the translational velocity of the body centre of mass (COM), $\boldsymbol{v}_{c}$ , is a two-dimensional vector $(v_{c}^{x},v_{c}^{y})$ , and its rotation velocity is $\unicode[STIX]{x1D714}_{b}=\unicode[STIX]{x1D714}_{b}^{z}$ . We then define the generalized velocity $\boldsymbol{V}$ , location $\boldsymbol{X}$ , and force $\boldsymbol{F}$ vectors, as well as the generalized mass matrix $\unicode[STIX]{x1D648}$ :

(2.8a-d ) $$\begin{eqnarray}\boldsymbol{V}=\left(\begin{array}{@{}c@{}}v_{c}^{x}\\ v_{c}^{y}\\ \unicode[STIX]{x1D714}_{b}\end{array}\right),\quad \boldsymbol{X}=\left(\begin{array}{@{}c@{}}x\\ y\\ \unicode[STIX]{x1D703}\end{array}\right),\quad \boldsymbol{F}=\left(\begin{array}{@{}c@{}}F_{h}^{x}\\ F_{h}^{y}\\ M_{c}^{z}\end{array}\right),\quad \unicode[STIX]{x1D648}=\left(\begin{array}{@{}ccc@{}}m & 0 & 0\\ 0 & m & 0\\ 0 & 0 & I_{c}\end{array}\right),\end{eqnarray}$$

where $\boldsymbol{F}_{h}$ is the hydrodynamic force on the body, $m$ is the mass of the body which has density $\unicode[STIX]{x1D70C}_{b}=\unicode[STIX]{x1D70C}$ and $I_{c}$ its moment of inertia with respect to the COM, computed at each time step. The motion of the body is governed by:

(2.9) $$\begin{eqnarray}\frac{\text{d}}{\text{d}t}(\unicode[STIX]{x1D648}\boldsymbol{V})=\boldsymbol{F}.\end{eqnarray}$$

The coupled dynamic equations are discretized using a sequentially staggered Euler explicit integration scheme with Heun’s corrector. Sequentially staggered schemes are computationally efficient but, for large added mass, they become unconditionally unstable (Förster, Wall & Ramm Reference Förster, Wall and Ramm2007), regardless of the particular scheme used. In order to stabilize the numerical scheme, we introduce the virtual added mass matrix  $\unicode[STIX]{x1D648}_{\boldsymbol{a}}$ .

The virtual added mass, which is used in an implicit added mass scheme (Connell & Yue Reference Connell and Yue2007; Zhu & Shoele Reference Zhu and Shoele2008; Peng & Zhu Reference Peng and Zhu2009), can eliminate the instability due to large added mass, but its exact value will not affect the results. In the case of an undulating fish, the coefficients of the matrix can be estimated from the added mass of the straight fish body at zero angle of attack, which has been done here. In the present simulations, only the terms necessary to the stability have been used and it has been assessed that the exact value chosen for the added mass does not impact the results, as long as it is large enough to ensure stability but not so large as to damp the system. The virtual added mass used is a diagonal matrix with value $[0~11m~13m]$ .

We also define the total mass as:

(2.10) $$\begin{eqnarray}\unicode[STIX]{x1D648}_{\boldsymbol{T}}=\unicode[STIX]{x1D648}+\unicode[STIX]{x1D648}_{\boldsymbol{a}}.\end{eqnarray}$$

With these new definitions, we integrate (2.9) over a time step $\unicode[STIX]{x0394}t$ in the form:

(2.11) $$\begin{eqnarray}\boldsymbol{V}(t+\unicode[STIX]{x0394}t)=\boldsymbol{V}(t)+\unicode[STIX]{x1D648}_{\boldsymbol{T}}^{-1}\int _{t}^{t+\unicode[STIX]{x0394}t}\left[\boldsymbol{F}+\unicode[STIX]{x1D648}_{\boldsymbol{ a}}\frac{\text{d}\boldsymbol{V}}{\text{d}\unicode[STIX]{x1D70F}}\right]\text{d}\unicode[STIX]{x1D70F}.\end{eqnarray}$$

At each time step $t_{n}$ , the fluid and body velocities, $\boldsymbol{u}_{n}=\boldsymbol{u}_{\unicode[STIX]{x1D716}}(t_{n})$ and $\boldsymbol{v}_{n}=\boldsymbol{v}(t_{n})$ respectively, are calculated from the velocities and forces at the previous time steps according to (2.6) and (2.11) (for additional details, see Maertens Reference Maertens2015).

2.4 The importance of recoil

Equation (2.11) determines the recoil $B(x,t)$ resulting from the prescribed flexing $h_{0}(x,t)$ and the related hydrodynamic forces $\boldsymbol{F}$ . Due to the significant added complexity incurred by the recoil term, most of the earlier simulation studies neglected it (Dong & Lu Reference Dong and Lu2007; Borazjani & Sotiropoulos Reference Borazjani and Sotiropoulos2008). However, the amplitude of this term, and its impact on the estimated swimming power, are substantial (Reid et al. Reference Reid, Hildenbrandt, Padding and Hemelrijk2012), as illustrated below.

We consider first the carangiform motion of (2.4) with frequency $f=2.1$ . Figure 5(a) shows the dimensionless linear and angular momentum for the self-propelled fish, including the recoil, as determined by the hydrodynamic forces and adaptive amplitude $a_{0}$ . The angular and transverse momentum are larger than the longitudinal momentum, but the three amplitudes are comparable. However, the non-dimensional moment of inertia of the fish is much smaller than its mass:

(2.12a,b ) $$\begin{eqnarray}m=0.081,\quad I_{c}=0.0045,\end{eqnarray}$$

where the mass and moment of inertia are non-dimensionalized by the length $L$ and density $\unicode[STIX]{x1D70C}$ . Therefore, whereas the linear momentum results in velocities smaller than 3 % of the free-stream $U_{s}$ , the rotation of the fish generates velocities at the trailing edge up to 40 % of the free stream, as shown in figure 5(b). This observation suggests that, whereas the longitudinal motion of the fish might be negligible, the transverse motion and specifically the angular recoil, are important.

Figure 5. (a) Linear and angular momentum and (b) corresponding velocities for a neutrally buoyant self-propelled NACA0012 with carangiform motion at frequency $f=1/T=2.1$ .

In order to further illustrate this result, figure 6 shows the quasi-propulsive efficiency as a function of frequency for the carangiform and anguilliform motions with and without recoil. The figure shows that, at all frequencies, the undulation with recoil requires up to 40 % more power than the undulation without recoil. Therefore, simulations that do not allow for recoil are likely to underestimate the swimming power, as discussed in Reid et al. (Reference Reid, Hildenbrandt, Padding and Hemelrijk2009). The figure also shows that the optimal frequency without recoil might differ from the optimal frequency with recoil. In the cases studied here, the optimal frequency for the carangiform undulation without recoil is around $f=1.6$ , while with recoil it is around $f=2.1$ .

Figure 6. Quasi-propulsive efficiency as a function of frequency for the carangiform and anguilliform motions with and without recoil.

In summary, we have shown here that the impact of the angular recoil of the fish on swimming performance is significant. In order to estimate meaningful values of fish swimming efficiency, it is critical to allow for recoil.

2.5 Gait optimization procedure

Toki & Yue (Reference Toki and Yue2012) and Eloy (Reference Eloy2013) combined an evolutionary algorithm with Lighthill’s potential flow slender-body model to simultaneously optimize the shape and kinematics, using, respectively, 22 and 9 parameters. In this paper, we employ viscous simulations that are far more demanding computationally, hence we use only two parameters, which allows us to find an optimum with a reduced number of evaluations, and also facilitates the visualization and interpretation of the results.

For a given kinematic parametrization and frequency, the two parameters controlling the envelope $A(x)$ are optimized using derivative-free optimization (Rios & Sahinidis Reference Rios and Sahinidis2013). We apply the BOBYQA algorithm that performs bound-constrained optimization using an iteratively constructed quadratic approximation for the objective function (Powell Reference Powell2009). For each set of parameters, the viscous simulation is run for 15 non-dimensional time units, and the average power coefficient $\overline{C_{P}}$ across the last 10 undulation periods is calculated. Note that, as can be seen on figure 36(b) of appendix A, the instantaneous power coefficient can be negative. Indeed, animals have the capability to store energy in their tendons and hence recover energy during the oscillatory cycle (Roberts & Azizi Reference Roberts and Azizi2011). Although this recovery may not be 100 %, under optimal conditions our estimate averaging the power coefficient regardless of the instantaneous sign provides a good estimate of the power consumed.

Based on the values of $\overline{C_{P}}$ , the implementation of BOBYQA provided by the NLopt free C library (Johnson Reference Johnson2013) interfaced with Matlab computes the next set of parameters. In order to avoid finding a local minimum due to numerical noise, after the algorithm has converged, it is run again using the previously found minimum as a starting point.

3 Efficiency of swimming in open water

The goal in this section is to identify undulatory gaits that require the minimum amount of power ( $\overline{P_{in}}$ ) to drive an elongated body at speed $U_{s}$ , such that the Reynolds number is $\mathit{Re}=5000$ . In other words, we want to maximize the quasi-propulsive efficiency $\unicode[STIX]{x1D702}_{QP}$ of the self-propelled undulating body and identify the key parameters under the constraints of fixed body size and shape, as well as Reynolds number. We first consider a two-dimensional NACA0012-shaped fish and then apply the results to a three-dimensional danio-shaped body.

3.1 Gait optimization for a two-dimensional foil

For several values of undulation frequency, we optimize the deformation envelope $A(x)$ . $A(x)$ has been traditionally modelled by a quadratic function, of the form:

(3.1) $$\begin{eqnarray}A(x)=1+c_{1}(x-1)+c_{2}(x^{2}-1).\end{eqnarray}$$

Unlike $c_{1}$ and $c_{2}$ , $A(0)$ and $A(1/2)$ can be restricted to a rectangle and are easy to interpret as the envelope amplitude at the leading edge and mid-chord respectively. Therefore, in the figures, each envelope is represented by $A(0)$ and $A(1/2)$ , the amplitude at the trailing edge being by definition $A(1)=1$ .

First, we fix the undulation frequency to $f=1.8$ and optimize the quadratic envelope $A(x)$ , restricting $A(0)$ to positive values. Figure 7(a) shows the efficiency as a function of $A(0)$ and $A(1/2)$ . The carangiform envelope used in previous sections is denoted by a black square, and the anguilliform gait through a diamond. It is clear that the envelopes above the dashed line, which are concave envelopes with a peak upstream from the trailing edge, have good efficiency. The efficiency decreases very quickly below the dashed line, as the envelope becomes convex with an increasing amplitude at the trailing edge. Therefore, the envelope traditionally used to model carangiform swimming is inefficient, whereas the anguilliform envelope, which is closer to a straight line, is much more efficient. Among the concave envelopes, $A(0)=0$ seems best, together with $1\leqslant A(1/2)\leqslant 1.7$ , where the efficiency reaches a value of 48 %. Since the optimal quadratic gait saturates the constraint $A(0)\geqslant 0$ , we then fix the leading edge amplitude to $A(0)=0$ and optimize the undulation frequency $f$ and the second envelope parameter $A(1/2)$ . Figure 7(b) shows the efficiency as a function of $f$ and $A(1/2)$ . Here again, around the optimal point, the efficiency is not very sensitive to the exact value of $f$ and $A(1/2)$ . The optimal quadratic envelope ( $A(0)=0$ , $A(1/2)=1$ , $A(1)=1$ ) has a maximum amplitude at $x=3/4$ and reaches an efficiency of $\unicode[STIX]{x1D702}_{QP}=49\,\%$ around $f=1.6$ .

Figure 7. $\unicode[STIX]{x1D702}_{QP}$ as a function of $A(0)$ or $f$ and $A(1/2)$ for quadratic envelopes. The black dots show the location of the points that have been used to build the thin-plate smoothing spline (tpaps function in Matlab with smoothing parameter $p=0.999$ ) represented in colour. (a) Fixed frequency $f=1.8$ . The carangiform and anguilliform motions are respectively denoted by a black square and a black diamond, and a dashed line shows the location of linear envelopes (points below this line correspond to convex envelopes, while above it the envelopes are concave). (b) Fixed leading edge value $A(0)=0$ . Note that the thin-plate smoothing is only accurate in regions with a sufficient density of points.

Traditional models for swimming motion ignore recoil and therefore identify body deformation with displacement. However, while a quadratic convex envelope can reasonably be used to describe the displacement envelope of undulating fish, the curvature envelope in saithe and mackerel has a distinctive peak around the peduncle section (Videler & Hess Reference Videler and Hess1984). The results from figure 7 also suggest that the efficiency is higher if the deformation is largest upstream of the trailing edge rather than at the trailing edge itself. Such envelopes can be better modelled by a Gaussian function of the form:

(3.2) $$\begin{eqnarray}A(x)=\exp \left(-\left(\frac{x-x_{1}}{\unicode[STIX]{x1D6FF}}\right)^{2}+\left(\frac{1-x_{1}}{\unicode[STIX]{x1D6FF}}\right)^{2}\right),\end{eqnarray}$$

where $x_{1}$ parametrizes the location of the peak and $\unicode[STIX]{x1D6FF}$ its width, as shown in figure 8. With the Gaussian function, it is easy to change the pitch and angle of attack amplitudes at the tail by adjusting the location and width of the peak. Since the Gaussian envelope is always positive, the entire $(x_{1},\,\unicode[STIX]{x1D6FF})$ space can be used to search for an optimal gait without running into degenerate gaits.

Figure 8. Definition of the parameters for a Gaussian envelope.

Figure 9 shows the curvature amplitude for various envelopes. The curvature amplitude $C(x)$ is given by:

(3.3) $$\begin{eqnarray}\displaystyle C(x) & = & \displaystyle \max _{t}\frac{\unicode[STIX]{x2202}^{2}h}{\unicode[STIX]{x2202}x^{2}}(x,t)\nonumber\\ \displaystyle & = & \displaystyle a_{0}\sqrt{(A^{\prime \prime }-A(2\unicode[STIX]{x03C0}/\unicode[STIX]{x1D706})^{2})^{2}+(A^{\prime }2\unicode[STIX]{x03C0}/\unicode[STIX]{x1D706})^{2}}.\end{eqnarray}$$

It can in particular be seen that while the traditional carangiform envelope leads to a curvature that is minimum at 0.25 from the leading edge and maximum at the trailing edge. This is very different from the curvature observed in saithe and mackerel (Videler & Hess Reference Videler and Hess1984). A Gaussian envelope, on the other hand, can lead to a very small curvature for $x<0.4$ with a peak around $x=0.8{-}0.9$ . This curvature profile is in much better agreement with the curvature reported in Videler & Hess (Reference Videler and Hess1984). Moreover, the curvature peak corresponds to the peak of the Gaussian, which will later be referred to as the area where the body deformation is largest.

Figure 9. (a) Deformation and (b) curvature for various quadratic and Gaussian envelopes. The carangiform envelope is the one defined in (2.4): $A(x)=1-0.825(x-1)+1.625(x^{2}-1)$ . The optim. quadratic envelop is the most efficient quadratic envelop identified in figure 7: $A(x)=1+3(x-1)-2(x^{2}-1)$ . The optim. Gauss envelopes are the most efficient Gaussian envelopes identified for $f=1.5$ and $f=2.4$ respectively, with parameters summarized in table 2.

Figure 10 shows the efficiency as a function of $x_{1}$ and $\unicode[STIX]{x1D6FF}$ in the neighbourhood of the optimal envelope (in the sense of requiring minimum input power) for five frequencies ranging from $f=1.5$ to $f=2.7$ . For all frequencies, the efficiency decreases very rapidly as $\unicode[STIX]{x1D6FF}$ is decreased below its optimal value, while the efficiency is much less sensitive to increases above this optimal value. Moreover, while for all frequencies it is possible to find a region in the $(x_{1},\,\unicode[STIX]{x1D6FF})$ space that reaches an efficiency of 50 % (see table 2 for details), the optimal envelope clearly depends on the frequency. Note that, for a given motion, the angle of attack also changes with frequency. Since we hope to find an efficient angle of attack by optimizing the envelope, it is not surprising that the optimum is frequency dependent.

Figure 10. $\unicode[STIX]{x1D702}_{QP}$ as a function of $x_{1}$ and $\unicode[STIX]{x1D6FF}$ near the optimum for Gaussian envelopes. (a) $f=1.5$ , (b) $f=1.8$ , (c) $f=2.1$ , (d) $f=2.4$ , (e) $f=2.7$ , (f) colour bar. The black dots show the location of the points that have been used to build the thin-plate smoothing spline (tpaps function in Matlab with smoothing parameter $p=0.999$ ) represented in colour. Note that the thin-plate smoothing is only accurate in regions with a sufficient density of points.

At low frequency, gaits with undulations of the entire body ( $x_{1}=0.73$ and $\unicode[STIX]{x1D6FF}=0.52$ at $f=1.5$ ) are most efficient, while at high frequency, the undulations should be restricted to a narrow region ( $\unicode[STIX]{x1D6FF}=0.21$ at $f=2.7$ ) located around 25 % of the trailing edge ( $x_{1}=0.88$ at $f=2.7$ ). However, for all frequencies, the optimized deformation envelope $A(x)$ , shown in figure 11(a), is qualitatively similar to the curvature envelope from Videler & Hess (Reference Videler and Hess1984), with a small amplitude at the leading edge, a peak of amplitude 0.1 located 10 %–30 % from the trailing edge, and a sharp decrease in amplitude at the trailing edge. The corresponding displacement envelopes $g(x)$ are shown in figure 11(b). The displacement envelopes are qualitatively similar to the carangiform displacement envelope from Videler & Hess (Reference Videler and Hess1984), with an amplitude close to $g(0)=0.02$ at the leading edge (for from 1.8 to 2.7), a minimum amplitude around $x=0.25$ and a maximum amplitude at the trailing edge.

Figure 11. Optimized (a) prescribed deformation envelopes and (b) displacement envelopes for the Gaussian parametrization. $\unicode[STIX]{x1D706}=1$ and $f=[1.5,1.8,2.1,2.4,2.7]$ .

The similarity between optimized envelopes (both deformation and displacement) and envelopes observed in fish suggest, while the motion traditionally used to model carangiform swimming is inefficient, the actual motion of carangiform swimmers could be close to optimal. It is also interesting to note that, since quadratic envelopes can only result in functions with a wide peak, they can reach the same efficiency as the Gaussian envelopes at low frequency ( $f=1.5$ ), but not at high frequency ( $f>2$ ) where a sharp peak is needed to mitigate the large pitch and angle of attack caused by fast transverse motion of the tail.

3.2 Characterization of efficient swimming gaits for a two-dimensional fish

We showed in the previous section that, by changing the location and width of the peak in a Gaussian deformation envelope, a very efficient gait can be designed for a large range of undulation frequencies.

Figure 12 shows the deformed fish for three optimized gaits. As expected from figure 11, at $f=1.5$ the entire length of the fish undergoes noticeable deformation and displacement, resulting in a swimming motion that is similar to that of an anguilliform swimmer, with a moderate curvature along the entire body: the deformation of the fish matches the large wavelength trajectory of the trailing edge and thus avoids the efficiency loss associated with a large angle of attack. At higher frequency, the front half of the fish undergoes virtually no deformation, resulting in a swimming motion very similar to a carangiform ( $f=2.1$ ) or even a thunniform ( $f=2.7$ ) swimmer. At this frequency, the region that would correspond to the peduncle deforms with a very large curvature caused by the sharp peak in the Gaussian envelope. This allows the deformation of the fish to match the small wavelength trajectory of the trailing edge and thus avoid the efficiency loss associated with a large angle of attack.

Figure 12. Superimposed body outlines over one undulation period for three frequencies.

Figure 13 shows the deformed fish and vorticity snapshots for the five optimized gaits at $t/T=0~(\text{mod }1)$ , where $T=1/f$ is the undulation period. With a Gaussian deformation envelope, a peak width specifically tailored to the undulation frequency allows for reduced angle of attack at all frequencies. Specifically, as the undulation frequency increases, the angle of attack at the trailing edge, induced by the tail displacement increases. In order to recover a small and efficient angle of attack, the (already negative) slope of the deformation envelope must be decreased, which can only be done by a sharper peak. As for thrust-producing flapping foils, a reverse Kármán vortex street forms in the wake. The width and wavelength of the reverse Kármán vortex street decreases with increasing undulation frequency, and secondary small vortices develop at low frequency.

Figure 13. Snapshots of vorticity for optimized gaits at $t/T=0~(\text{mod }1)$ . (a) $f=1.5$ , (b) $f=1.8$ , (c) $f=2.1$ , (d) $f=2.4$ , (e) $f=2.7$ , (f) colour bar.

Table 2 summarizes the parameters and properties of the five optimized gaits. The quasi-propulsive efficiency $\unicode[STIX]{x1D702}_{QP}$ of these undulatory gaits is of prime interest. The efficiency reaches 57 % for $f=2.7$ , whereas the least efficient frequency, $f=1.5$ , reaches $\unicode[STIX]{x1D702}_{QP}=49\,\%$ . Another important parameter is the Strouhal number, which is close to $St=0.35$ . The consistency of the Strouhal number for the optimized envelopes across frequencies suggests that, for a given Reynolds number, there exists an optimal Strouhal number that can be reached with a large range of frequencies. Like the Strouhal number, the maximum pitch angle $\unicode[STIX]{x1D703}_{max}$ and maximum angle of attack $\unicode[STIX]{x1D6FC}_{max}$ are almost constant across the five optimized gaits, with a value close to $\unicode[STIX]{x1D703}_{max}=31^{\circ }$ and $\unicode[STIX]{x1D6FC}_{max}=17^{\circ }$ . The corresponding phase angle between the heave and pitch of the trailing edge is $\unicode[STIX]{x1D713}=82^{\circ }$ . The results from this optimization show that, as in rigid flapping foils, the efficiency of undulating fish is primarily driven by the Strouhal number, angle of attack, heave motion (or pitch motion) and heave–pitch phase angle, all at the trailing edge. The optimal Strouhal number, pitch angle and angle of attack can be attained by tuning the envelope peak for each frequency.

Table 2. Parameters and properties of gaits with optimized Gaussian envelopes. Motion parameters are the frequency $f$ , peak location $x_{1}$ , peak width $\unicode[STIX]{x1D6FF}$ and amplitude $a_{0}$ . Properties are the peak to peak displacement amplitude at the trailing edge $a$ , maximum pitch angle at the trailing edge $\unicode[STIX]{x1D703}_{max}$ , maximum angle of attack $\unicode[STIX]{x1D6FC}_{max}$ , heave and pitch phase angle $\unicode[STIX]{x1D713}$ , Strouhal number $St$ , time-averaged power coefficient $\overline{C_{P}}$ and the quasi-propulsive efficiency $\unicode[STIX]{x1D702}_{QP}$ .

Figure 14 shows the pressure field and body velocity for the optimized envelopes with frequency $f=[1.5,2.1,2.7]$ at their respective time of minimum and maximum power. For $f=1.5$ (figure 14 a,b) and $f=2.7$ (figure 14 e,f), there are three distinct sections along the upper side of the fish: high pressure near the leading edge, low pressure in the middle and high pressure near the trailing edge (and the opposite on the other side). In figures 14(b), 14(f), these sections almost exactly match transverse velocity of respectively positive, negative and positive sign, resulting in very large instantaneous swimming power. Conversely, in figure 14(a,e), the sign of the transverse velocity is reversed, resulting in a significant negative swimming power. For $f=2.1$ , the pressure changes along the fish are smaller, and the pressure is close to zero along a large portion of the fish. Moreover, unlike for $f=2.7$ , the sign changes in pressure do not match the sign changes in transverse velocity. For instance, at $t/T=0$ , the pressure along the bottom side of the fish near the trailing edge is positive (not shown here), which would result in a positive swimming power. Therefore, the minimum power is reached at a later time $t/T=0.12$ , at which point the amplitude is largest in areas where the pressure is close to zero, resulting in a very small power. Similarly, the maximum power reached at $t/T=0.34$ is not as large as for $f=2.7$ because the sections of high pressure do not exactly match the sections of large transverse velocity.

Figure 14. Snapshots of pressure field with arrows showing the body velocity. (a,b) Optimized Gaussian envelope at $f=1.5$ ; (c,d) optimized Gaussian envelope at $f=2.1$ ; (e,f) optimized Gaussian envelope at $f=2.7$ . (a,c) $t/T=0.12~(\text{mod }1)$ (minimum power for $f=1.5$ and $f=2.1$ ); (e) $t/T=0~(\text{mod }1)$ (minimum power for $f=2.7$ ); (b,d) $t/T=0.34~(\text{mod }1)$ (maximum power for $f=1.5$ and $f=2.1$ ; (f) $t/T=0.29~(\text{mod }1)$ (maximum power for $f=2.7$ ).

It must be pointed out that there are additional parameters affecting the efficiency of an undulating fish, since the efficiency ranges from $\unicode[STIX]{x1D702}_{QP}=0.49$ at $f=1.5$ to $\unicode[STIX]{x1D702}_{QP}=0.57$ at $f=2.7$ . This trend runs contrary to results from Shen et al. (Reference Shen, Zhang, Yue and Triantafyllou2003) who found that a slip ratio around $s_{r}=0.8$ ( $f=1.2$ ) is optimal for a body undergoing travelling wave motion of constant amplitude, in order to reduce separation effects and turbulence intensity. In our case, however, these results do not strictly apply because the undulations have a non-constant envelope, and especially for higher frequency are confined to a small section of the fish.

3.3 Application to a three-dimensional danio-shaped swimmer

We have so far modelled a fish by a two-dimensional fish-like flexible foil. However, fish have a highly three-dimensional geometry. In particular, most carangiform and thunniform swimmers are characterized by a region of reduced depth, around 20 % from the trailing edge, the peduncle. In order to model this region of reduced added mass with a two-dimensional geometry, it might be more appropriate to model a fish with a separate foil for the tail, as illustrated in figure 15. The fish model shown in this figure undulates with the optimized gait at frequency $f=2.4$ identified earlier, and the performance ( $\unicode[STIX]{x1D702}_{QP}=0.54$ ) is very close to that obtained with a single foil, indicating that the results are robust to changes in the geometry.

Figure 15. Snapshot of the vorticity field around a two-dimensional fish with a separate tail fin.

In the rest of this section, we consider a simplified three-dimensional fish shape, shown in figure 2, which is based on a giant danio (Devario aequipinnatu). For this geometry, we fix the undulation frequency to $f=2.4$ and optimize a Gaussian envelope for quasi-propulsive efficiency (for a fixed swimming speed $U_{s}$ , we minimize the expended power $\overline{P_{in}}$ ). In figure 16 we compare how $\unicode[STIX]{x1D702}_{QP}$ changes with the envelope parameters $x_{1}$ and $\unicode[STIX]{x1D6FF}$ for a two-dimensional fish and for the three-dimensional shape. The efficiency is generally lower with the three-dimensional shape, but the dependence on $x_{1}$ and $\unicode[STIX]{x1D6FF}$ is very similar for both geometries: the most efficient gaits are for $0.8<x_{1}<0.9$ and $0.2<\unicode[STIX]{x1D6FF}<0.3$ with a sharp decrease in efficiency for $\unicode[STIX]{x1D6FF}<0.2$ . This shows that, even though three-dimensional effects reduce the swimming efficiency, most of the conclusions about BCF swimming drawn from the two-dimensional study extend to three-dimensional shapes.

Figure 16. $\unicode[STIX]{x1D702}_{QP}$ as a function of $x_{1}$ and $\unicode[STIX]{x1D6FF}$ near the optimum for (a) 2-D and (b) 3-D geometries with $f=2.4$ . The black dots show the location of the points that have been used to build the thin-plate smoothing spline (tpaps function in Matlab with smoothing parameter $p=0.999$ ). Note that the thin-plate smoothing is only accurate in regions with a sufficient density of points.

The parameters and properties of the optimized gait for $f=2.4$ are compared to those of the carangiform gait $A_{c}(x)$ in table 3. Like in the 2-D case, the optimization decreases the power consumption by 50 % compared with the carangiform gait. As in two dimensions, the optimized gait manages to bring the phase angle between the heave and pitch motion of the trailing edge close to $90^{\circ }$ , which significantly reduces the angle of attack. As a result, the optimized gait for the three-dimensional fish shape have a pitch angle, phase angle and angle of attack very close to the optimized gait for the two-dimensional fish. However, since the 3-D effects reduce the thrust produced by the undulating motion, the Strouhal number is higher than in two dimensions, especially for the carangiform gait.

Figure 17. Prescribed deformation envelope $a_{0}A(x)$ and displacement envelope $g(x)$ for (a) carangiform gait with $f=3$ and (b) optimized gait with $f=2.4$ . Frequencies have been selected such that the displacement amplitude at the trailing edge is the same.

Figure 18. Superimposed body outlines over one undulation period for (a) the carangiform motion and (b) the optimized gait.

Table 3. Parameters and properties of 3-D undulating gaits. Properties are the peak to peak displacement amplitude at the trailing edge $a$ , maximum pitch angle at the trailing edge $\unicode[STIX]{x1D703}_{max}$ , maximum angle of attack $\unicode[STIX]{x1D6FC}_{max}$ , heave and pitch phase angle $\unicode[STIX]{x1D713}$ , Strouhal number $St$ , time-averaged power coefficient $\overline{C_{P}}$ and the quasi-propulsive efficiency $\unicode[STIX]{x1D702}_{QP}$ . The optimized gait at $f=2.4$ is compared to the carangiform gait at $f=3$ , for which the amplitude at the trailing edge is the same.

Figure 17 shows the deformation envelope $A(x)$ and the displacement envelope $g(x)$ for the carangiform gait at $f=3$ and for the optimized gait. Similarly to the observations made for the two-dimensional body shape, the optimal gait has maximum displacement at the trailing edge, but maximum deformation (curvature) around $x=0.85$ , which corresponds to the peduncle.

The superimposed body outlines for the optimized gait shown in figure 18(b) also look very similar to the body outlines of the optimized motions in two dimensions: the deformation of the tail follows the trajectory of the trailing edge, resulting in an efficient low angle of attack. The body outlines for the carangiform motion, on the other hand, show that the pitch of the tail is out of phase with its velocity (phase angle far from $90^{\circ }$ ), which results in a very inefficient gait, with a large angle of attack.

Finally, we show the flow structure around the 3-D fish model for both gaits in figure 19. The performance difference between the two gaits is accompanied by noticeable differences in the wake structure of the two swimmers. For both gaits, figures 19(a) and 19(b) show wakes comprised of two interconnected vortex loops per cycle, together with other smaller structures. In particular, the structure in the wake of the optimized motion is complex, with many vortex tubes interlaced with each other. Indeed, as can also be seen in the vorticity field at $z=0$ (figure 19 d), the deformation at the peduncle is quite large for the optimized gait, resulting in vortex tubes separating from the main body and then interacting with the structures shed from the tail.

Figure 19. Snapshots of the flow around a three-dimensional fish with (a,c,e,g) a carangiform and (b,d,f,h) an optimized gait. (a,b) Three-dimensional vortical structures visualized using the $\unicode[STIX]{x1D706}_{2}$ -criterion; (c,d) $z$ component of the vorticity in the $z=0$ plane; (e,f) pressure in the $z=0$ plane; (g,h) pressure in the $z=0.06$ plane.

Borazjani & Sotiropoulos (Reference Borazjani and Sotiropoulos2010) also observed in their 3-D simulations that the 2-D wake structure, dominated by a single vortex pair (or ring in three dimensions), transitions to vortex loops wrapping around each other for Strouhal number greater than $St=0.3$ . Dong, Mittal & Najjar (Reference Dong, Mittal and Najjar2006) showed that the same phenomenon happens to elliptical flapping foils of finite aspect ratio: at low aspect ratio/large Strouhal number, two vortex rings are shed each cycle. As the aspect ratio increases or the Strouhal number decreases, the tip vortices do not merge together any more and the wake consists of interconnected loops. As the Strouhal number further decreases or the aspect ratio increases, the three-dimensional effects become even weaker and the linkage between tip vortices disappears. At this point, the 3-D wake looks similar to the (reverse) Kármán vortex street observed in two dimensions.

In the carangiform example shown here, the tip vortices merge, while with the optimized gait, which has a lower Strouhal number and angle of attack, they do not. At higher Reynolds number, the Strouhal number would be smaller and a wake similar to that observed in two dimensions would probably emerge. Figure 19(c,d) shows that, near the tail, the vorticity in the $z=0$ plane looks very similar to that behind a 2-D foil. However, under the influence of the tip vortices, the vortex sheets shed by the tail do not evolve into two strong vortices as in two dimensions. As a result, whereas the pressure field around the undulating fish-like shape is very similar to the pressure around an undulating airfoil, the pressure signature in the wake shown at the plane $z=0$ is very weak (figure 19 e,f). However, the pressure signature in the plane $z=0.06$ , just above the peduncle, is much stronger (figure 19 g,h), and could potentially be used by a downstream fish to reduce its swimming energy.

Figure 20 shows a magnified view of the vortex structures generated by the carangiform motion. A red line shows the formation of a clear vortex ring at the trailing edge of the tail between figures 20(a) and 20(c). In figure 20(e), the vortex ring is fully formed and detached from the tail. Since the vortex rings are oblique, they produce a large transverse velocity, which is inefficient and results in waste of energy. We also see a spanwise narrowing of the vortex rings as they convect downstream, as also observed in the simulations of Blondeaux et al. (Reference Blondeaux, Fornarelli, Guglielmini, Triantafyllou and Verzicco2005) and Dong et al. (Reference Dong, Mittal and Najjar2006) for a respectively rectangular and elliptical pitching and heaving foil.

Figure 20. (a,c,e) Side view and (b,d,f) top view of the vortex structures at several time steps for the carangiform gait. (a,b) $t/T=0.1~(\text{mod }1)$ ; (c,d) $t/T=0.4~(\text{mod }1)$ ; (e,f) $t/T=0.7~(\text{mod }1)$ . A red line shows the formation of a vortex ring.

Figure 21 shows a magnified view of the vortex structures generated by the optimized gait. The structure of the wake is more intricate than for the carangiform motion. In particular, instead of one set of interconnected vortex tubes, there are two sets of tubes, marked in red and green in the figure. The loop marked in red is the same as observed for the carangiform gait, but at this lower Strouhal number, it never fully closes into a clearly defined vortex ring. The tubes marked in green are formed upstream of the tail and are shed from the body as a result of the large curvature at the peduncle. The resulting vortex tubes are interlaced with the vortex loops from the tail with which they have a phase difference of close to $180^{\circ }$ .

Figure 21. (a,c,e) Side view and (b,d,f) top view of the vortex structures at several time steps for the optimized gait. (a,b) $t/T=0.1~(\text{mod }1)$ ; (c,d) $t/T=0.4~(\text{mod }1)$ ; (e,f) $t/T=0.7~(\text{mod }1)$ . A red line shows a vortex shed from the tail that never fully develops into a ring, while green lines show the vortices shed from the body.

For a three-dimensional fish shape with two-dimensional undulation, as for a two-dimensional foil, the Strouhal number, pitch angle (or heave motion), nominal angle of attack and phase angle at the trailing edge are the primary parameters for efficient swimming. The key is to decrease the (already negative) slope of the deformation envelope in order to reduce the angle of attack to efficient values. These two-dimensional considerations only depend on fish geometry through its impact on recoil. Moreover, the optimization leads to a lower Strouhal number and angle of attack, which reduces the three-dimensional effects observed behind the non-optimized gait, such as formation of inefficient oblique vortex ring chains. With the optimized gait, the production of thrust is also distributed between the body and the tail, which sheds vortex structures with opposite phase. It has been shown with turbines, for instance, that distributing the thrust production (or energy capture) could significantly improve the efficiency, and it is possible that fish use the same process. Finally, while we used a simplified fish geometry with a two-dimensional undulation, fish can also rely on three-dimensional motion of their dorsal and pectoral fins to fine tune their swimming motion and save energy (Drucker & Lauder Reference Drucker and Lauder2001; Lauder & Madden Reference Lauder and Madden2007).

4 Energy saving for two fish swimming in close proximity

The experimental study by Gopalkrishnan et al. (Reference Gopalkrishnan, Triantafyllou, Triantafyllou and Barrett1994) and the theoretical study by Streitlien, Triantafyllou & Triantafyllou (Reference Streitlien, Triantafyllou and Triantafyllou1996) demonstrated that flapping rigid foils placed within a Kármán street can extract significant energy from the flow through vorticity control. Subsequently, it was documented that live fish swimming within a Kármán vortex street formed behind a cylinder tend to synchronize their motion to the oncoming cylinder vortices. This allows them to significantly reduce the energy spent to hold station (Liao et al. Reference Liao, Beal, Lauder and Triantafyllou2003a ,Reference Liao, Beal, Lauder and Triantafyllou b ; Akanyeti & Liao Reference Akanyeti and Liao2013), or even generate propulsive force with no input power as evidenced by the passive propulsion of anaesthetized fish (Beal et al. Reference Beal, Hover, Triantafyllou, Liao and Lauder2006). The phenomenon of fish Kármán gaiting has been explained by the faculty of fish to sense and harness the energy of the vortices.

Since a foil or a fish can extract energy from the vortices in a Kármán street, in principle there is no reason why they could not extract energy from the vortices in a reverse Kármán street. Boschitsch, Dewey & Smits (Reference Boschitsch, Dewey and Smits2014) recently showed that the net propulsive efficiency of a pitching foil located behind a similarly pitching foil could be anywhere between 0.5 and 1.5 times that of an isolated foil, depending on the phase. This indicates that the energy extracted from the vortices in a reverse Kármán street more than compensates for the effect of increased drag caused by the jet forming in a reverse Kármán street (unlike the energetically beneficial drag wake forming behind a bluff body). Despite the strong evidence that it is possible to harness the energy of individual vortices within a reverse Kármán street, there is no conclusive evidence that fish actually do harness this energy. Liao summarizes in his review of fish swimming in altered flows that no hydrodynamic or physiological data exist to evaluate the hypothesis that fish can increase swimming performance by taking advantage of the wake of other members (Liao Reference Liao2007).

Due to the difficulty of experimentally measuring the swimming power of individual fish in a school, simulations can provide valuable information to help clarify this issue. Hence, we consider next a pair of self-propelled undulating fish-like foils. We have shown in the previous section that a two-dimensional fish, undulating in open water, can attain a quasi-propulsive efficiency of 57 % by optimizing its gait. The goal in this section is to determine whether, by working as a pair, fish can further reduce the power required to travel at constant speed $U_{s}$ . Indeed, a few recent computational studies have yielded compelling evidence that fish can take advantage of certain physical mechanisms to swim more efficiently in a school (Deng & Shao Reference Deng and Shao2006; Daghooghi & Borazjani Reference Daghooghi and Borazjani2015; Hemelrijk et al. Reference Hemelrijk, Reid, Hildenbrandt and Padding2015). It is assumed that both fish swim with the same undulation frequency and deformation envelope, each with the amplitude that allows it to swim at the desired speed. For a given frequency, the deformation envelope is the optimal envelope in open water identified in table 2. Efficiency might be further increased by using a specific schooling gait, but this is beyond the scope of this paper.

4.1 Flow in the wake of a self-propelled undulating fish

The reverse Kármán vortex street behind a self-propelled undulating fish is characterized by its periodic structure, with vortices moving parallel to the $y=0$ axis in stable formation. The vorticity snapshot in figure 22(a) shows that the vortices decrease in strength under the effect of diffusion, but this is a slow process and the wake is primarily characterized by its periodicity. Figure 22(b) shows that the vortices generate patches of faster flow along the $y=0$ axis and slower flow away from the centreline. The time-averaged flow (figure 22 c,d) is characterized by four shear layers of alternating sign, resulting in a jet along the centreline with strips of slowed-down flow on either side; consistent with the momentumless wake, on average, of a self-propelled body (Triantafyllou et al. Reference Triantafyllou, Triantafyllou and Grosenbaugh1993).

Figure 22. Wake behind a self-propelled undulating fish for the optimized gait with Gaussian envelope and $\unicode[STIX]{x1D706}=1$ at frequency $f=1.5$ . (a) Instantaneous vorticity field; (b) instantaneous $x$ -velocity field; (c) time-averaged vorticity field; (d) time-averaged $x$ -velocity field.

The vorticity at longitudinal distance $d$ from the trailing edge in the wake of an undulating fish can be modelled as:

(4.1) $$\begin{eqnarray}\unicode[STIX]{x1D714}(d,y,t)=\unicode[STIX]{x1D714}_{y}(y,t)\unicode[STIX]{x1D714}_{d}(d)\sin (2\unicode[STIX]{x03C0}(\unicode[STIX]{x1D719}_{1}(d)-ft)),\quad \unicode[STIX]{x1D719}_{1}(d)=d/\unicode[STIX]{x1D706}_{w}+\unicode[STIX]{x1D719}_{w},\end{eqnarray}$$

where the frequency $f$ is given by the undulation frequency and the wavelength $\unicode[STIX]{x1D706}_{w}$ and phase $\unicode[STIX]{x1D719}_{w}$ of the wake need to be determined. For the five optimized gaits with Gaussian envelope and $\unicode[STIX]{x1D706}=1$ presented in § 3.1, we estimated from the vorticity field the phase $\unicode[STIX]{x1D719}_{1}$ at several distances $d$ along the wake. In figure 23(a) we show the phase $\unicode[STIX]{x1D719}_{1}$ as a function of the distance $d$ , as well as the least squares linear fit for each swimming gait. The coefficients for the linear fit are summarized in table 4. For all the gaits, the phase is essentially proportional to the distance $d$ , with a coefficient of proportionality very close to the undulation frequency $f$ . Since $\unicode[STIX]{x1D706}_{w}=fc_{w}$ , where $c_{w}$ is the speed at which the vortices travel in the wake, this result shows that the vortices travel at the same speed as the free stream. Moreover, for the five gaits considered, the phase at $d=0$ is approximately 0.25, which means that the vortices are shed by the fish when the trailing edge has maximum transverse velocity. Finally, we confirm these observations by plotting $\unicode[STIX]{x1D719}_{1}$ as a function of $fd$ in figure 23(b). Assuming $c_{w}=1$ , the least squares estimate ( $\pm$ standard deviation) of the phase $\unicode[STIX]{x1D719}_{w}$ is:

(4.2) $$\begin{eqnarray}\unicode[STIX]{x1D719}_{w}=0.24\pm 0.02.\end{eqnarray}$$

From now on, $\unicode[STIX]{x1D706}_{w}=1/f$ and $\unicode[STIX]{x1D719}_{w}=0.25$ will be used to estimate the phase $\unicode[STIX]{x1D719}_{1}$ encountered by a downstream fish whose leading edge is located at distance $d$ from the upstream fish.

Figure 23. Vorticity phase in the wake of self-propelled undulating fish as a function of (a) distance, $d$ , and (b) frequency times distance, $fd$ . For each frequency, the optimized gait with Gaussian envelope is used.

Table 4. Parameters of the gaits used in the wake vorticity phase estimate and fitted phase and wavelength for the vorticity in the wake. An estimate of the phase $\unicode[STIX]{x1D719}_{w}$ assuming a phase speed $c_{w}=\unicode[STIX]{x1D706}_{w}/f=1$ is also provided.

4.2 Effect of phase and distance for two fish in line

Here we consider two fish-like foils following each other and undulating at frequency $f=1.5$ with the optimized gait for this frequency, as illustrated in figure 25. The amplitude of undulation, $a_{0}$ , is adjusted independently for each fish to ensure that both fish are in a stable position and produce zero net thrust on average. We vary the distance $d$ between the trailing edge of the upstream fish and the leading edge of the downstream fish, as well as $\unicode[STIX]{x1D719}$ , the phase of the downstream fish motion as defined in (2.1). An important parameter will be $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}$ , the phase difference between the motion of the downstream fish leading edge and the vortices it encounters: $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=\unicode[STIX]{x1D719}-\unicode[STIX]{x1D719}_{1}(d)$ . In order to measure the impact of the pair configuration on each fish, we define $R(C_{P})$ (respectively $R(a_{0})$ ), the ratio of the power coefficient (respectively amplitude) in the pair configuration over the power coefficient (respectively amplitude) for the corresponding gait in open water.

Since the goal is to minimize expended power, $R(C_{P})$ is what should be minimized. However, it is interesting to determine whether a reduction in expended power results from a reduction in drag or from a pure reduction in swimming power. Since both fish are self-propelled, the drag is always zero, so the net drag on the fish cannot be used as an indicator of drag reduction. Instead we use the swimming amplitude as an indicator of drag: fish swim in order to overcome drag; if drag is reduced, then a smaller swimming motion will be sufficient to overcome the drag.

Both fish can benefit from swimming in pair, but the trends are very different. The swimming power and amplitude of the upstream fish is virtually independent of the phase of the downstream fish, as shown in figure 24(a). For large separations $d$ , the downstream fish does not impact the upstream fish whose efficiency is then almost the same as in open water. However, as the downstream fish gets close ( $d<0.5$ ), the high pressure around the leading edge of the downstream fish ‘pushes’ the upstream one, regardless of their phase difference. As a result, the upstream fish can reduce its swimming amplitude, expending less power than it would in open water. At $d=0.25$ , the undulation amplitude is reduced by 10 %, resulting in 28 % energy saving, corresponding to a quasi-propulsive efficiency (based on the towed drag in open water) of $\unicode[STIX]{x1D702}_{QP}=69\,\%$ .

Figure 24. Time-averaged power coefficient $\overline{C_{P}}$ and amplitude $a_{0}$ for (a) the upstream fish as a function of distance $d$ and (b) the downstream fish as a function of phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}$ . The solid (respectively dashed) line marks the average value with respect to the phase (respectively distance) and the shaded area indicates the range of values reached across the various distances (respectively phases).

Figure 25. Snapshot of the vorticity field for two fish undulating at $f=1.5$ with separation distance $d=1$ and optimal phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0.83$ at time $t/T-\unicode[STIX]{x1D719}=0.25~(\text{mod }1)$ . The colour axis is the same as in figure 13.

Figure 26. Snapshot of the velocity and pressure field for two fish undulating at $f=1.5$ with separation $d=1$ and optimal phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0.83$ . (a,b) $x$ -velocity; (c,d) $y$ -velocity; (e,f) pressure and arrows showing the velocity of the fish. (a,c,e) Upstream fish at $t/T=0.25~(\text{mod }1)$ ; (b,d,f) downstream fish at $t/T-\unicode[STIX]{x1D719}=0.25~(\text{mod }1)$ . The same colour axis as in figure 14 is used for the pressure, and the same as in figure 22(b) is used for the velocity (centred in $0$ for the $y$ -velocity).

For the downstream fish, the situation is very different. Even when the upstream fish is several chord lengths ahead, the downstream fish encounters its wake. The performance of the downstream fish is determined by its interaction with the vortices of the wake. It appears from figure 24(b) that the swimming power of the downstream fish depends primarily on the phase difference $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}$ between its undulation and the encountered vortices. Regardless of the distance $d$ , the swimming power of the downstream fish is low if $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}$ is between 0.7 and 1, and it is high if $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}$ is between 0.1 and 0.5. As for the upstream fish, the reduced swimming power is the result of a reduced undulation amplitude $a_{0}$ but, for the downstream fish, the reduction in $C_{P}$ is weaker than the reduction in amplitude. A maximum energy saving of 24 % is reached at $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0.85$ , corresponding to an efficiency of $\unicode[STIX]{x1D702}_{QP}=65\,\%$ .

Figure 25 shows the vorticity field around the two fish undulating with frequency $f=1.5$ at distance $d=1$ for the phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0.83$ , close to the minimum amplitude and power coefficient. At $t/T-\unicode[STIX]{x1D719}=0.25$ , the downstream fish approaches the negative vortex (at $x=-0.1$ on its left) as it is initiating the rotation of its ‘head’ (leading edge) to the right. This acceleration of the head causes a low pressure on the left side of the head, as shown in figure 26(e). Due to its position, the approaching negative vortex causes an increase in the longitudinal velocity, as shown in figure 26(b), which results in an increased stagnation pressure (figure 26 f). However, this vortex also generates a large transverse velocity with negative sign, as shown in figure 26(d). As a result, the effects of the head motion are amplified by the incoming vortex, displacing the stagnation point downstream on the right side and deepening the low pressure on the left side (figure 26 f). While the energy required by the fish to rotate its head is increased, the drag is decreased, despite the faster flow encountered by the fish.

At the same time, the positive vortex located at $x=0.2$ on the right side of the fish thickens the boundary layer and significantly accelerates the flow in a region where the fish undulation already accelerates it (figure 26 a,b). This interaction between the vortex and the fish results in a very large pressure drop around $x=0.3$ that also contributes to the reduction in drag while increasing the swimming power. The vortices are convected downstream at a speed which is substantially lower than the phase speed of the fish deformation. Further downstream, the distance between the vortices and the fish increases, and their interaction becomes weaker. At the trailing edge, the phase between the vortices and the fish motion is close to $\unicode[STIX]{x03C0}$ , such that the positive vortex reaches $x=1$ as the trailing edge of the fish is at its leftmost position. This vortex will be shed just downstream of the same sign vortex shed by the upstream fish. The resulting wake configuration is unstable and it takes several body lengths for the wake to reorganize into two pairs of opposite sign vortices per cycle.

The results presented in this section are consistent with the experimental results from thrust-producing rigid pitching foils in an in-line configuration (Boschitsch et al. Reference Boschitsch, Dewey and Smits2014). We found that for small separation distance the propulsive efficiency of the upstream fish is greatly improved thanks to drag reduction. We also showed that the efficiency of the downstream fish only weakly depends on the separation distance, the primary parameter being the phase difference between the wake from the upstream fish and the undulating motion of the downstream fish. If the undulation amplitude was fixed, the downstream fish would experience an increased drag and decreased power for $0\leqslant \unicode[STIX]{x0394}\unicode[STIX]{x1D719}\leqslant 0.5$ , whereas it would experience a decreased drag and increase power for $0.5\leqslant \unicode[STIX]{x0394}\unicode[STIX]{x1D719}\leqslant 1$ . For a self-propelled fish, the energetic benefits of a reduced amplitude resulting from a reduced drag overcome the power increase caused by the vortices.

4.3 Effect of frequency for two undulating fish in line

Next, we fix the distance between the two fish to $d=1$ and vary their undulation frequency. For frequencies $f=[1.5,1.8,2.1]$ , their optimized Gaussian envelope is used, for which the parameters are summarized in table 4. Figure 27 shows that most of the conclusions drawn in § 4.2 still hold as the undulation frequency is increased. While the upstream fish is mostly unaffected by the presence and phase of the downstream fish, the undulation amplitude of the downstream fish is largest for $0\leqslant \unicode[STIX]{x0394}\unicode[STIX]{x1D719}\leqslant 0.5$ and smallest for $0.5\leqslant \unicode[STIX]{x0394}\unicode[STIX]{x1D719}\leqslant 1$ . However, the exact value of the optimal phase depends on the frequency, and the correlation between amplitude and power coefficient becomes weaker as $f$ increases. For instance, at $f=2.1$ , the amplitude is minimum for $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0.85$ , but the power coefficient is minimum for $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0$ . Whereas with $f=1.5$ most phases result in an increased amplitude and power coefficient, with $f=1.8$ and $f=2.1$ , the amplitude and power coefficient of the downstream fish never exceed that of the upstream fish. Therefore, at these frequencies, it is always beneficial to swim in the wake of an undulating fish, despite the jet-like flow encountered in this area.

Figure 27. Ratio of (a) amplitude and (b) power coefficient as a function of frequency $f$ and phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}$ for two fish swimming in line at distance $d=1$ . The ratios are defined with respect to the corresponding gait in open water. The black dots show the location of the points that have been used to build the thin-plate smoothing spline (tpaps function in Matlab with smoothing parameter $p=0.999$ ) represented in colour. Note that the thin-plate smoothing is only accurate in regions with a sufficient density of points.

At frequency $f=1.8$ , the results for the optimal phase, shown in figure 28, are very similar to those described in the previous section for $f=1.5$ , with the vortices from the upstream fish reinforcing the effects of the body undulation. However, the wake at this frequency is narrower; therefore the vortices are closer to the fish and they lose more strength through their interaction with the boundary layer. Moreover, since the distance between two consecutive vortices is proportional to the undulation frequency, the vortices are spaced closer to each other. The resulting wake is dominated by two single vortices shed by the downstream fish, each accompanied by weaker vortices of opposite sign from the upstream fish. This is identical to the destructive vortex interaction mode of a flapping foil within a Kármán street in Gopalkrishnan et al. (Reference Gopalkrishnan, Triantafyllou, Triantafyllou and Barrett1994), which has been associated with increased efficiency.

Figure 28. Snapshot of the vorticity, velocity and pressure field for two fish undulating at $f=1.8$ with separation distance $d=1$ and optimal phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0.87$ . (a,b) Vorticity; (c,d) $x$ -velocity; (e,f) $y$ -velocity; (g,h) pressure and arrows showing the velocity of the fish. (a,c,e,g) Upstream fish at $t/T=0.25~(\text{mod }1)$ ; (b,d,f,h) downstream fish at $t/T-\unicode[STIX]{x1D719}=0.25~(\text{mod }1)$ . The same colour axis as in figure 14 is used for the pressure, and the same as in figures 22(a) and 22(b) for vorticity and velocity (centred in 0 for the $y$ -velocity).

Figure 29 illustrates the case of the downstream fish undulating with the phase providing the worse swimming efficiency for $f=1.8$ . In this configuration, the vortices from the upstream fish counteract the effects of the undulating motion of the downstream fish. As the fish turns its head to the right, displacing the stagnation point to the right and causing a low pressure on the left side of the head, the positive $y$ -velocity caused by the approaching positive vortex has the opposite effect. The high velocity caused by the vortices along the fish cancels the low velocity from the undulating motion. Finally, when the vortices from the upstream fish reach the trailing edge, they merge with the same sign vortices from the downstream fish. The resulting wake is very stable and is a classical reverse Kármán vortex street much wider than the one behind a single fish. This corresponds precisely to the constructive interaction mode of a flapping foil within a Kármán street in Gopalkrishnan et al. (Reference Gopalkrishnan, Triantafyllou, Triantafyllou and Barrett1994), which has been shown to have reduced efficiency. Note that here the organization of the vortices cannot be used to quantify the momentum in the wake, since the total momentum is zero for a self-propelled body, but can be used to quantify the energy shed in the wake.

Figure 29. Snapshots of (a) vorticity, (b) $x$ -velocity and (c) pressure field for two fish undulating at $f=1.8$ with separation distance $d=1$ and phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0.38$ at $t/T-\unicode[STIX]{x1D719}=0.25~(\text{mod }1)$ . The same colour axis as in figure 22(a) is used for the vorticity and the same as figure 14 for the pressure.

As the frequency increases further, the vortices from the upstream fish lose even more energy through interaction with the boundary layer of the downstream fish; therefore for each period of oscillation the wake behind the two fish contains a pair of single vortices, as shown in figure 30. Moreover, since the efficiency of the downstream fish mostly depends on the phase of the leading edge with respect to the arrival of the upstream fish reverse Kármán street vortices, the phase of the trailing edge with respect to the incoming vortices in the optimal configuration changes with frequency.

Figure 30. Snapshot of the vorticity field for two fish undulating at $f=2.1$ with separation distance $d=1$ and phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0$ . The same colour axis is used as in figure 22(a).

For all the frequencies considered here, a self-propelled fish can save energy by undulating behind another self-propelled fish undulating at the same frequency, reaching efficiencies close to $\unicode[STIX]{x1D702}_{QP}=70\,\%$ . When the motion of the downstream fish is phased appropriately with respect to the incoming vortex street, the vortices can reinforce the effect of the undulation. Whereas for a fixed amplitude this phase would result in an increased swimming power, the reduction in drag results in an overall decreased swimming power.

4.4 Fish undulating in the reduced velocity region of the wake

We have so far considered the case of a pair of fish swimming in an in-line configuration. Since our fish model has a feedback controller ensuring its stability in $y$ , it is also possible to impose an asymmetric configuration with an offset in the $y$ direction. Indeed, according to Weihs’ theory (Weihs Reference Weihs1973), the only way for a fish to save energy in a school is to swim in the region of reduced velocity located between two wakes. We have already shown that a fish can reduce its drag and save energy by swimming directly in the wake of another self-propelled fish and will now investigate if additional savings are possible by swimming in areas of reduced flow velocity. Figure 22(d) shows that, even with a single fish upstream, the flow on either side of the wake is slower than the free stream: for $f=1.5$ the average flow is slowest at $y=\pm 0.17$ . With the downstream fish offset from the upstream fish by $\unicode[STIX]{x0394}y=0.17$ , we vary the phase difference $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}$ in order to see if the downstream fish can also save energy when swimming at this location.

Figure 31 shows that, even when the downstream fish is offset from the vortex street, its swimming performance greatly varies with the phase. However, it is easier for the fish to save energy in this region of reduced flow velocity than directly behind the upstream fish. Directly behind the upstream fish, only 30 % of the phases result in energy savings, and by using the unsteadiness of the wake, the quasi-propulsive efficiency at $f=1.5$ can be brought up from 50 % to 60 %. When undulating in the region of reduced flow velocity, it is easier to save energy since over 70 % of the phases result in energy savings. The energy savings can even be very large since $\unicode[STIX]{x1D702}_{QP}=80\,\%$ is possible for $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0.65$ .

Figure 31. Ratio of undulation amplitude $a_{0}$ and time-averaged power coefficient $\overline{C_{P}}$ as a function of phase for two fish undulating at $f=1.5$ with longitudinal separation distance $d=1$ . In-line fish and fish at an offset $\unicode[STIX]{x0394}y=0.17$ are compared.

Figure 32 shows that, at the optimal phase, the leading edge of the downstream fish reaches its leftmost position at the same time as it reaches a positive vortex. Figure 33(b) shows that the leading edge of the downstream fish exactly passes through the region where the longitudinal velocity is smallest. As a result, the stagnation pressure is greatly reduced (figure 33 d). Moreover, the region of accelerated flow between the negative vortex and the fish ( $x=0.4$ ) reinforces the accelerated region caused by the undulation, which we showed earlier is beneficial.

Figure 32. Snapshot of the vorticity field for two fish undulating at $f=1.5$ with longitudinal separation distance $d=1$ , transverse separation $\unicode[STIX]{x0394}y=0.17$ and optimal phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0.65$ at time $t/T-\unicode[STIX]{x1D719}=0.1~(\text{mod }1)$ . The colour axis is the same as in figure 13.

Figure 33. Snapshot of the (a,b) $x$ -velocity and (c,d) pressure field for two fish undulating at $f=1.5$ with longitudinal separation distance $d=1$ , transverse separation $dy=0.17$ and optimal phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0.65$ . (a,c) Upstream fish, $t/T=0.1~(\text{mod }1)$ ; (b,d) downstream fish, $t/T-\unicode[STIX]{x1D719}=0.1~(\text{mod }1)$ . The same colour axis as in figure 14 is used for the pressure, and the same as in figure 22(b) for the velocity.

5 Discussion

5.1 Optimal BCF propulsion and the role of fish shape

The total lateral displacement of a live swimming fish is maximum at the trailing edge, but, once recoil is subtracted, it becomes apparent that the body deformation is largest around the peduncle. We show that efficiency indeed improves when the envelope of the body deformation is largest upstream of the trailing edge, separating the main body from a region that has roughly the length of the caudal fin. The high curvature of the peduncle region allows the (equivalent) caudal fin area to pitch independently from the motion of the body, in order to control the timing of trailing edge vortex shedding. As the peak of the Gaussian describing the fish bending motion becomes sharper, the curvature imposed by the envelope in the peduncle section becomes much larger than the curvature caused by the travelling wave. This is particularly noticeable for $f=2.7$ , at which frequency the undulations are mostly restricted to what would be the peduncle and tail sections for a fish.

The increase of the curvature in the peduncle region corresponding with a decreased stride length and increased swimming frequency is essential, allowing the instantaneous deformation of the fish to match the trailing edge trajectory (figure 12). This serves to avoid the efficiency loss associated with a large angle of attack at the tail and a reverse Kármán vortex street forms in the wake, consistent with previous studies of efficient thrust production in oscillating foils (Triantafyllou et al. Reference Triantafyllou, Triantafyllou and Gopalkrishnan1991; Anderson et al. Reference Anderson, Streitlien, Barrett and Triantafyllou1998). The width and wavelength of the reverse Kármán vortex street decreases with increasing undulation frequency, and secondary small vortices develop at low frequency.

Fish employing the carangiform and thunniform swimming modes generally have a narrow peduncle, and our results suggest that there is function associated with this form. The narrow peduncle allows for sharp bending of the tail, even at an angle with respect to the body deformation (providing a discontinuous slope), such as in the optimal motion at high frequency. Tunas, for example, have a special anatomy at the peduncle that allows powerful tendons to actuate the tail with substantial torque. This allows for the independent control of the tail in manipulating vorticity formed upstream of the tail along the body (Zhu et al. Reference Zhu, Wolfgang, Yue and Triantafyllou2002) or from externally generated vortices. Wolfgang et al. (Reference Wolfgang, Anderson, Grosenbaugh, Yue and Triantafyllou1999) demonstrated experimentally and numerically that high flexibility of the peduncle region allows for the caudal fin to precisely redirect vorticity shed upstream for optimal propulsion.

In the simulations conducted here, the high curvature in the peduncle region serves the same purpose in allowing the fish to control the angle of attack at the tail and shed vortices in an energy efficient way. We show, similar to Borazjani & Sotiropoulos (Reference Borazjani and Sotiropoulos2010), that the optimal kinematics is mostly independent of body shape. Indeed, the key parameters are two-dimensional in essence and even a two-dimensional geometry can help assess the energetic performance of swimming kinematics. It would also be interesting, in a future study, to apply our optimization procedure to a wide range of Lighthill, Reynolds and Strouhal numbers and compare the resulting values of tail incidence, slip ration and stride length with those observed in nature, similar to Eloy (Reference Eloy2013).

5.2 Proposed schooling theory and comparison with Weihs’ theory

To our knowledge, the only existing hydrodynamic theory of schooling has been proposed by Weihs (Reference Weihs1973). This theory provides useful insight based on time-averaged flow considerations, but does not factor in the potential benefits of energy extraction from the vortices. According to Weihs, a fish swimming directly behind another fish would experience higher relative velocity and would therefore have to spend extra energy. On the contrary, a fish swimming between two adjacent fish wakes would experience a reduced relative speed, allowing it to save energy. This strategy is known as flow refuging (Liao Reference Liao2007) or drafting. Deng & Shao (Reference Deng and Shao2006) demonstrated in simulation that indeed, a fish swimming between two adjacent fish wakes reduces its power consumption. However, Hemelrijk et al. (Reference Hemelrijk, Reid, Hildenbrandt and Padding2015) show through simulating infinite schools of fish that it is possible for fish to save energy in a variety of additional configurations, including the in-line one. Similarly, we have shown in this paper that it is possible for a fish to save energy regardless of whether it swims directly behind another fish or at a lateral offset that allows it to benefit from a reduced flow velocity. The phase difference between its undulation and the wake vortices, $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}$ , determines whether its drag is reduced or enhanced. When swimming directly behind another fish, where the averaged flow is faster than the free stream, the fish cannot save energy through drafting, and must therefore capture energy from individual vortices in order to save energy. We show that, by using the transverse velocity of the individual vortices to amplify the pressure effects of the undulating motion, the fish can reduce its drag and swimming power. Conversely, swimming in the region of the wake where the flow is, on average, slower, does not guarantee a reduced drag. However, we observed that it is possible save more energy by undulating in the region of reduced velocity than directly behind another fish, due to the possibility of taking advantage of both drafting and individual vortex energy capture. Up to 81 % quasi-propulsive efficiency can be reached for a fish undulating with proper phase in the region of reduced flow velocity, compared with a maximum of 66 % for a fish swimming directly behind another fish (table 5).

Table 5. Efficiency for a pair of undulating fish in various advantageous configurations. The undulation frequency $f$ , longitudinal separation $d$ , transverse distance $\unicode[STIX]{x0394}y$ and the phase difference $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}$ between the leading edge of the downstream fish and the vortices in the wake of the upstream fish are considered.

In the present study, the number of fish has been limited to two, in order to investigate the basic mechanisms of fish swimming interactions. In large schools with hundreds of fish, the flow is likely to be much more complex, and there might be some hydrodynamic phenomena specific to large schools. However, the mechanisms identified with two fish certainly transfer to larger schools. For instance, swimming fish are largely unaffected by the fish swimming behind them, unless they have a very close follower, in which case it is beneficial to them. Even in a large school, fish encounter vortices as well as areas of reduced or increased flow velocity that they can use for their own benefit. The values of how much energy is saved can probably not be generalized, but the observed mechanisms can. Moreover, it is not expected that the number of vortices would increase linearly with the number of fish. Indeed, swimming fish interacting with vortices tend to reorganize the incoming vortices with their own shed vortices, such that there is only one pair of strong vortices left behind them, from which following fish can harness energy. It would be interesting to progressively increase the number of fish and investigate whether, after a certain number of fish following each other, the flow field converges.

The energy contained in individual vortices can be harnessed in several ways. For a flapping foil in a Kármán vortex street, it is well known that the efficiency increases if the foil vortices destructively interact with the oncoming vortices, while the thrust can be enhanced if the foil vortices constructively interact with the oncoming vortices (Gopalkrishnan et al. Reference Gopalkrishnan, Triantafyllou, Triantafyllou and Barrett1994; Streitlien et al. Reference Streitlien, Triantafyllou and Triantafyllou1996). Similarly, at the tail of the downstream fish, we observed that constructive interactions between the oncoming wake vortices and the vortices shed at the trailing edge were associated with reduced efficiency, while destructive interactions correlated with increased efficiency.

While this is consistent with the findings of Hemelrijk et al. (Reference Hemelrijk, Reid, Hildenbrandt and Padding2015) in that the timing of the head is important when swimming directly behind another fish, the mechanism that we find responsible for the increased efficiency is different. Hemelrijk claims that the fish gains a hydrodynamic advantage when both vortices from the oncoming vortex street are captured on the same side of the head. This is impossible under the parameters of our simulation, but we find that the following fish is still able to increase its efficiency at the head using appropriate timing. However, for a fish swimming within a wake, interactions occur not only between the wake vortices and the vortices shed at the fish’s trailing edge, but also between the oncoming wake vortices and vortices emanating from the boundary layer of the fish. The interactions between the fish body and the oncoming vortices can result in enhanced thrust and/or improved efficiency. We show that the downstream fish can reduce its drag by consistently turning its head in a manner that employs the oncoming vortex flow to increase the transverse velocity across the head, amplifying the pressure field created at the head. While this increases the power consumed by the fish to rotate its head, the pressure drag at the head is decreased substantially to result in an overall improvement to the efficiency.

While reduced drag implies a reduced undulation amplitude for open-water self-propelled swimming, the correlation with energy saving is not as straightforward within a school, because the vortices impact both the drag and the swimming power. Since the quasi-propulsive efficiency is defined as $RU_{s}/\bar{P}_{in}$ , the power consumed must be reduced for an increased efficiency. However, it can be directly or indirectly reduced. Directly, the power is reduced when vortices along the body of the fish exert force in the direction the fish is oscillating, thereby doing work on the fish. Indirectly, the vortices can help to reduce the overall drag on the fish, therefore reducing the amount of work the fish must perform to self-propel. If the undulation amplitude was kept constant, phases $0\leqslant \unicode[STIX]{x0394}\unicode[STIX]{x1D719}\leqslant 0.5$ would result in an increased drag and decreased power, and the reverse would apply to phases $0.5\leqslant \unicode[STIX]{x0394}\unicode[STIX]{x1D719}\leqslant 1$ . The energy benefits of a reduced amplitude generally more than compensate for the increased swimming power, such that drag reduction tends to result in power reduction. However, the phase resulting in the smallest amplitude usually does not coincide exactly with the optimal one. This suggests that multiple mechanisms are important for the efficiency of the downstream foil. In particular, the drag is mostly governed by the interaction between the head of the fish and the vortices, whereas the power is mostly governed by the interaction between these vortices and the tail, where the transverse velocities are much larger. The exact value of the optimal phase, therefore, depends on the undulation frequency and the gait.

In summary, a fish undulating in a vortex street cannot be considered as a rigid body with a propeller, located inside a jet. Regardless of the exact location of the fish in the vortex street, constructive interactions between the undulating body and the individual vortices can result in enhanced thrust, while destructive interactions result in increased swimming power. The exact value of the optimal phase depends on the gait details but, in general, the drag reduction configurations are the most advantageous, and it is easier to reduce drag when undulating in a region of averaged reduced flow velocity, even in an asymmetric configuration. Additional power savings might be possible by adjusting the gait to the configuration of the vortices, as observed by Liao et al. (Reference Liao, Beal, Lauder and Triantafyllou2003a ) in fish swimming behind a cylinder.

6 Summary and conclusions

We established through 2-D and 3-D numerical simulations the conditions for optimal propulsion in undulatory fish swimming, first for a single self-propelled fish and then for a pair of identically shaped self-propelled fish moving in line or at an offset, separated axially by a distance $d$ .

First, we considered the problem of optimal propulsion of an undulating, self-propelled fish-like body, fully accounting for linear and angular recoil. We employed 2-D simulations to conduct an extensive parametric search and then, by employing targeted 3-D simulations, we established that properties found in two dimensions are qualitatively similar to those for 3-D simulations.

In summary, the assumptions we employed in order to render the study feasible are:

  1. (a) Simulations were conducted at a Reynolds number of 5000.

  2. (b) For the 2-D simulations, we modelled the fish body as an undulating NACA0012, while a danio-shaped body was used for 3-D simulations. We modelled the main body of the fish and its caudal fin but not the other fins or details on the body, such as other fins, finlets, eyes and other protrusions and scales.

  3. (c) The motion of the fish consists of a steady axial translation at a prescribed speed, and a lateral body deformation in the form of a travelling wave of constant frequency $f$ and wavelength $\unicode[STIX]{x1D706}=1$ . Free axial rigid body motion as well as lateral and angular recoil were permitted and studied for their effect on propulsive efficiency.

  4. (d) The bending envelope was chosen to be either a quadratic or a Gaussian function of the length along the fish. Indeed, the total displacement envelope of live carangiform and anguilliform swimmers can be approximated by a quadratic function, but, after subtraction of the recoil, the envelope of body deformation is best approximated by a Gaussian function. For both functions, two parameters were sufficient to specify the shape of the envelope, with a third parameter, $a_{0}$ , to control the amplitude of the envelope.

  5. (e) To maximize the quasi-propulsive efficiency (i.e. to minimize the energy expended), the two parameters used to specify the shape for each envelope (3.1) and (3.2) were varied using an optimization scheme.

  6. (f) A proportional-integral-derivative (PID) controller adjusts the amplitude of oscillation $a_{0}$ until self-propulsion is obtained and, additionally, maintains the heading of the fish by adjusting the camber.

The conclusions for optimal 2-D swimming are as follows:

  1. (a) As with rigid flapping foils, the Strouhal number, phase angle between heave and pitch at the trailing edge and nominal angle of attack are the principal parameters affecting the efficiency of propulsion.

  2. (b) Angular recoil has a significant impact on the efficiency of propulsion and hence must always be accounted for.

  3. (c) A Gaussian envelope enables a body deformation with high curvature in the region where the peduncle of the fish would be. This effectively allows the caudal fin to pitch independently with respect to the peduncle motion, and this extra degree of freedom allows for the control of flow patterns forming upstream of that position. Hence, whereas the convex profile traditionally used to model carangiform swimming provides quasi-propulsive efficiency of approximately 35 %, an optimized profile results in efficiency of 57 %.

  4. (d) As the swimming frequency increases, the peak of the Gaussian envelope should become sharper in order to compensate the large angle of attack generated by the lateral motion of the tail. As a result, optimal motion at low frequency is very similar to anguilliform swimming, with moderate bending of the entire body, while optimal motion at high frequency looks like thunniform swimming, with very large bending around the peduncle.

For 3-D swimming of a danio-shaped fish, which explicitly models the peduncle and caudal fin, the optimality conditions were observed to be very close qualitatively to those of 2-D swimming, although the efficiency was consistently lower:

  1. (a) Angular recoil has significant impact on efficiency, as in 2-D swimming.

  2. (b) Similarly to finite aspect ratio rigid flapping foils, the Strouhal number and maximum angle of attack are principal parameters affecting efficiency: For higher values of the Strouhal number the wake is also found to bifurcate, from a single row of connected vortex rings to a double row of vortex rings, resulting in reduced efficiency, as well as a complex three-dimensional structure in the wake. As expected, optimization reduces the Strouhal number to be closer to the optimal range, and hence the effect of wake bifurcation is also reduced. Within our parametric space, the Strouhal number was not reduced below 0.4, and hence the effect of a bifurcating wake was not totally eliminated. It is expected that by, for example, increasing the span of the caudal fin, which reduces the required thrust coefficient, further increase in efficiency is possible.

  3. (c) The sharp curvature of the envelope of body deformation at the peduncle affects efficiency significantly. The efficiency increases from 22 % for a convex imposed motion to 34 % for an optimized body deformation with large deformation around the peduncle; both at Reynolds number 5000.

  4. (d) For optimized body deformation, heave and pitch motion at the trailing edge have a phase angle close to $90^{\circ }$ , as for a 2-D swimming fish, while the corresponding angle of attack is $17^{\circ }$ . The parametric dependence of the envelope shape is also qualitatively similar to two dimensions (figure 17).

  5. (e) The simplified fish geometry gives important insight about how the two-dimensional deformation of the body and tail affect swimming efficiency of a BCF swimmer. We believe that these results generalize to a wide range of fish body shapes. However, fish have multiple fins with complex three-dimensional motions that they use to control the flow, and it would be interesting to investigate these mechanisms as well.

The resulting wake has a periodic 3-D structure with coherent vortices that another fish can use to save energy by properly timing its motion. However, the three-dimensional flow around a fish is far more complex than the flow around a two-dimensional foil. Since the three-dimensional effects mostly result in a loss of efficiency, the optimization reduces these effects while distributing the production of thrust between the body and the tail (resulting in $\unicode[STIX]{x1D702}_{QP}=34\,\%$ ).

Turning to the 2-D swimming of two identical, self-propelled fish in close proximity, the geometric models and assumptions employed for a single fish optimization were used, under the following additional conditions: both fish swim at the same speed and at a constant distance; the downstream fish is either directly behind the upstream fish, or at a lateral offset. Both fish also have the same deformation envelope, optimized in open water, but the amplitude of motion of each fish is adjusted separately to achieve self-propulsion. The power of each fish is compared with the power required when swimming alone. The following results are obtained:

  1. (a) The upstream fish may benefit from the mere presence of the downstream fish for very short relative distances. For example, a 28 % energy saving at a distance of $d=0.25$ is achieved, but as the distance increases this is quickly reduced.

  2. (b) The downstream fish can benefit energetically even at axial distances equal to several times the body length, both in-line and in an offset position. This proves that energy saving is achieved through interaction with individual vortices as opposed to taking advantage of reduced oncoming flow (drafting), because in the in-line position the downstream fish is in a region of averaged increased relative velocity, which would be expected to cause an increase in drag.

  3. (c) The axial force on the downstream fish is mostly affected by the interaction between the head of the fish and the oncoming vortices, whereas the power required to sustain the undulating motion is affected by the interaction between these vortices and the body motion downstream from the head. The critical parameter for efficiency is the phasing between the head motion and the arrival of the vortices, since in general, a reduced drag results in a greater power reduction.

  4. (d) For the in-line arrangement, when fixing the relative distance to one body length, $d=1$ , and varying the frequency, the efficiency of the downstream fish can increase to 62 % for the optimal phase between the head motion and the arrival of the upstream fish vortices.

  5. (e) For the offset arrangement, at $\unicode[STIX]{x0394}y=0.17$ , efficiency increases further, as the downstream fish also exploits the reduction in oncoming velocity. Still, an optimized phase is required, which makes it possible the reach a quasi-propulsive efficiency 81 %, even though the fish can only interact with every other vortex produced by the upstream fish. It is expected that the efficiency of the downstream fish would increase further if there were two fish in the front, spaced by $\unicode[STIX]{x0394}y=0.34$ and perfectly synchronized.

  6. (f) Although the upstream fish vortices interact with the downstream fish over its entire length, as described above, it is remarkable that, at the tail of the downstream fish, the upstream and downstream fish vortices interact following the rules of Gopalkrishnan et al. (Reference Gopalkrishnan, Triantafyllou, Triantafyllou and Barrett1994), viz. constructive interaction results in reduced efficiency, while destructive interaction provides increased efficiency.

  7. (g) Since the 3-D wake behind an undulating fish body has a similar periodic structure with coherent vortices, it seems reasonable to extrapolate the present results to actual fish. However, the 3-D vortex structures are far more complex than the 2-D vortex street, therefore the energy savings are likely to be less than those observed in the idealized 2-D case.

Hence, we can conclude that swimming power can be reduced by swimming in a group for any position of the downstream fish; and for the upstream fish when positioned at close distances from the downstream fish. For the downstream fish, it can improve its thrust by interacting with oncoming vortices, and since reduced drag also reduces the power required to swim, this results in an increase of efficiency. On the contrary, bad timing leads to enhanced drag and swimming power. The schooling theory by Weihs (Reference Weihs1973) predicts that a fish swimming directly behind another fish would experience increased drag and have to expend more power than in open water. We show here that an additional consideration must be made on energy capture from the oncoming vortices, which depends on the phasing of the undulating motion with respect to the vortex street. When swimming in an offset location, energy savings can be maximized by simultaneously extracting energy from individual vortices and taking advantage of reduced oncoming flow velocity.

Acknowledgements

The authors wish to acknowledge support from the Singapore-MIT Alliance for Research and Technology through the CENSAM Program, and from the MIT Sea Grant Program.

Appendix A. Numerical method validation

Problems previously studied with BDIM include ship flows and flexible wavemaker flows (Weymouth et al. Reference Weymouth, Dommermuth, Hendrickson and Yue2006), shedding of vorticity from a rapidly displaced foil (Wibawa et al. Reference Wibawa, Steele, Dahl, Rival, Weymouth and Triantafyllou2012) and a cephalopod-like deformable jet-propelled body (Weymouth & Triantafyllou Reference Weymouth and Triantafyllou2013). In Maertens & Weymouth (Reference Maertens and Weymouth2015) we have demonstrated the ability of BDIM to handle several moving bodies and generalized the original method to accurately simulate the flow around streamlined foils at Reynolds numbers of the order of $\mathit{Re}=10^{4}$ . Figure 34 shows the error in the friction and pressure drag on a NACA0012 at Reynolds number $\mathit{Re}=5000$ as a function of grid resolution. At the finest resolution, the error is well within 10 %.

Figure 34. Time-averaged friction and pressure drag (respectively $CDf$ and $CDp$ ) on a NACA0012 at Reynolds number $\mathit{Re}=5000$ and angle of attack $0^{\circ }$ and $5^{\circ }$ as a function of grid resolution. The relative error $E(\text{d}x)$ is computed with respect to XFOIL: $E(\text{d}x)=C_{D_{\mathit{BDIM}}}/C_{D_{\mathit{XFOIL}}}-1$ .

In order to validate the code for simulating undulating foils, the force and power resulting from a fully imposed kinematics are compared with results reported in the literature. Finally, a convergence study and sensitivity analysis on a self-propelled undulating foil are performed.

A.1 Undulating NACA0012 with fully imposed kinematics

Using a fully imposed carangiform undulation:

(A 1) $$\begin{eqnarray}h(x,t)=(0.1-0.0825(x-1)+0.1625(x^{2}-1))\sin (2\unicode[STIX]{x03C0}(x-ft)),\end{eqnarray}$$

the undulation frequency is varied from $f=0.5$ to $f=2$ and the resulting time-averaged force and power coefficients are compared to the values from Dong & Lu (Reference Dong and Lu2007) in figure 35. Note that in these simulations the kinematics is fully imposed, not allowing for recoil.

Figure 35. Time-averaged drag and power coefficients for an undulating NACA0012 as a function of frequency, compared with values from Dong & Lu (Reference Dong and Lu2007).

Similarly to Dong & Lu (Reference Dong and Lu2007), we find that the average power coefficient, slightly negative at $f=0.5$ , increases to around 0.25 at $f=2$ , and that the drag is positive for $f<1.6$ and negative for $f>1.6$ . The good agreement between our method and the results from Dong & Lu (Reference Dong and Lu2007) serves as a validation of the force and power calculation routines for an undulating foil, and indicates that both drag a power coefficient are estimated within a 10 % accuracy.

A.2 Self-propelled undulating NACA0012

We now ensure that the simulation results presented here are independent of the grid parameters. In this section we consider the carangiform motion with frequency $f=2.1$ .

Figure 36. (a) Drag and (b) pressure coefficient on an undulating NACA0012 with carangiform motion at $f=1/T=2.1$ . Various grids and constraints are compared. Grid 2 is twice as fine as grid 1, while the computational domain of grid 3 is twice as large as that of grid 1.

Figure 36 shows the evolution of power and drag coefficients during an undulation period $T=1/f$ for various configurations. By comparing the free undulation and the fixed $x$ case, we first notice that fixing the $x$ location of the foil does not impact the power, confirming the observations from Bale et al. (Reference Bale, Hao, Bhalla and Patankar2014). The amplitude of the drag oscillations are a bit larger for the case with fixed $x$ location, as would be expected, but this does not impact any of the results discussed in this paper. On the other hand, precluding all recoil completely changes the phase and amplitude of the power and drag coefficients. Figure 36 also shows that the power and drag coefficients estimated on grid 1 (introduced in § 2.3) are very close to those estimated on a grid twice as fine (grid 2, $\text{d}x=\text{d}y=1/320$ ) and a grid twice as large (grid 3, $x\in [-12,\,14]$ , $y\in [-4,\,4]$ ). Table 6 summarizes the mean and maximum power, maximum drag and undulation amplitude $a_{0}$ for all these cases.

These results confirm that, while fixing the $x$ location of the foil will not impact our swimming efficiency estimates, the foil should be let free to heave and pitch. Therefore, a foil fixed in $x$ , free to heave and pitch under the influence of the hydrodynamic forces will be used throughout this chapter. Moreover, the estimates on grid 1 being very close to those on a finer and larger grid, grid 1 (5 points across the boundary layer) will be used for the optimization procedures with a fish in open water, whereas grid 2 (10 points across the boundary layer) will be used for visualization and for a swimming pair.

Table 6. Mean and maximum amplitude of power coefficient, amplitude of drag coefficient and undulation amplitude for a NACA0012 with carangiform amplitude at $f=2.1$ and 0 drag.

Appendix B. Feedback controller

In steady state, the time-averaged velocity of a swimming fish is constant and the mean forces on the swimmer are 0. In order to ensure that the system converges toward a steady state in which the swimming velocity is the prescribed velocity $U_{s}$ , we designed a PID controller that adjusts the thrust by tuning the amplitude of the swimming gait $a_{0}$ and the mean camber $C$ . If the fish is fully self-propelled, the time-averaged linear momentum in $x$ is used as feedback (referred to as displacement control) for  $a_{0}$ .

Since the amplitude of the oscillations in $v_{c}^{x}$ is very small, in most cases we actually fix the fish in $x$ in order to reduce the PID convergence time. In this case (referred to as force control), the time-averaged drag is used as feedback. However, it is important to let the fish move freely in heave and pitch under the effect of the hydrodynamic forces. In order to ensure stability of the fish in heave and pitch, the time-averaged linear momentum in $y$ is used as the input to a PID controller that tunes the camber parameter $C$ of the $y_{1}(x)$ function defined in (2.3).

For a self-propelled fish with flapping frequency $f=1/T$ , we define the error as:

(B 1) $$\begin{eqnarray}\boldsymbol{e}(t_{n})=f\mathop{\sum }_{k=n_{0}}^{n-1}m\boldsymbol{v}_{c}(t_{k})(t_{k+1}-t_{k}),\end{eqnarray}$$

where $n_{0}$ is the first index $k$ such that $t_{k}\geqslant t_{n}-T$ . If the $x$ motion is fixed and force control is used, $F_{h}^{x}$ replaces $mv_{c}^{x}$ in the calculation of $e^{x}$ .

The integral of the error is calculated as:

(B 2) $$\begin{eqnarray}\boldsymbol{e}_{i}(t_{n})=\mathop{\sum }_{k=0}^{n}\boldsymbol{e}(t_{k})(t_{k+1}-t_{k}),\end{eqnarray}$$

and its derivative is:

(B 3) $$\begin{eqnarray}\boldsymbol{e}_{d}(t_{n})=f\left[\frac{(t_{n_{0}}-(t_{n}-T))\boldsymbol{e}(t_{n_{0}-1})+((t_{n}-T)-t_{n_{0}-1})\boldsymbol{e}(t_{n_{0}})}{t_{n_{0}}-t_{n_{0}-1}}\right].\end{eqnarray}$$

At the beginning of each time step, the parameters $a_{0}$ from (2.1) and $C$ from (2.3) are updated as:

(B 4) $$\begin{eqnarray}\left.\begin{array}{@{}c@{}}a_{0}(t_{n})=\max [a_{0}(t_{n-1})+(t_{n}-t_{n-1})(K_{p}^{x}e^{x}(t_{n})+K_{i}^{x}e_{i}^{x}(t_{n})+K_{d}^{x}e_{d}^{x}(t_{n})),0],\\ C(t_{n})=-(K_{p}^{y}e^{y}(t_{n})+K_{i}^{y}e_{i}^{y}(t_{n})+K_{d}^{y}e_{d}^{y}(t_{n})),\end{array}\right\}\end{eqnarray}$$

where $e^{x}$ and $e^{y}$ denote respectively the $x$ and $y$ components of the error vector $\boldsymbol{e}$ . As a result, if the fish is too slow or produces a negative thrust, $a_{0}$ increases, which will increase its swimming speed or thrust. Similarly, if the fish tends to move towards its right ( $y>0$ ), then $C$ will be negative (head turned towards its left), which will bring it back toward $y=0$ .

The gain coefficients used in this study are

(B 5) $$\begin{eqnarray}\displaystyle & \text{for force control in }x:\quad K_{p}^{x}=5,\quad K_{i}^{x}=5,\quad K_{d}^{x}=5, & \displaystyle\end{eqnarray}$$
(B 6) $$\begin{eqnarray}\displaystyle & \text{for displacement control in }x:\quad K_{p}^{x}=5,\quad K_{i}^{x}=1,\quad K_{d}^{x}=100, & \displaystyle\end{eqnarray}$$
(B 7) $$\begin{eqnarray}\displaystyle & \text{for displacement control in }y:\quad K_{p}^{y}=8,\quad K_{i}^{y}=10,\quad K_{d}^{y}=12. & \displaystyle\end{eqnarray}$$

References

Abrahams, M. V. & Colgan, P. W. 1987 Fish schools and their hydrodynamic function: a reanalysis. Environ. Biol. Fish. 20 (1), 7980.Google Scholar
Akanyeti, O. & Liao, J. C. 2013 A kinematic model of Karman gaiting in rainbow trout. J. Expl Biol. jeb.093245.CrossRefGoogle ScholarPubMed
Alben, S. 2009 Wake-mediated synchronization and drafting in coupled flags. J. Fluid Mech. 641, 489496.Google Scholar
Anderson, J. M., Streitlien, K., Barrett, D. S. & Triantafyllou, M. S. 1998 Oscillating foils of high propulsive efficiency. J. Fluid Mech. 360, 4172.Google Scholar
Bainbridge, R. 1961 Problems of fish locomotion. In Symp. Zool. Soc. Lond., vol. 5, pp. 1332.Google Scholar
Bale, R., Hao, M., Bhalla, A. P. S. & Patankar, N. A. 2014 Energy efficiency and allometry of movement of swimming and flying animals. Proc. Natl Acad. Sci. 111 (21), 75177521.CrossRefGoogle ScholarPubMed
Beal, D. N., Hover, F. S., Triantafyllou, M. S., Liao, J. C. & Lauder, G. V. 2006 Passive propulsion in vortex wakes. J. Fluid Mech. 549, 385402.CrossRefGoogle Scholar
Bergmann, M., Iollo, A. & Mittal, R. 2014 Effect of caudal fin flexibility on the propulsive efficiency of a fish-like swimmer. Bioinspir. Biomim. 9 (4), 046001.Google Scholar
Blondeaux, P., Fornarelli, F., Guglielmini, L., Triantafyllou, M. S. & Verzicco, R. 2005 Numerical experiments on flapping foils mimicking fish-like locomotion. Phys. Fluids 17 (11), 113601.Google Scholar
Borazjani, I. & Sotiropoulos, F. 2008 Numerical investigation of the hydrodynamics of carangiform swimming in the transitional and inertial flow regimes. J. Expl Biol. 211 (10), 15411558.CrossRefGoogle ScholarPubMed
Borazjani, I. & Sotiropoulos, F. 2010 On the role of form and kinematics on the hydrodynamics of self-propelled body/caudal fin swimming. J. Expl Biol. 213 (1), 89107.Google Scholar
Boschitsch, B. M., Dewey, P. A. & Smits, A. J. 2014 Propulsive performance of unsteady tandem hydrofoils in an in-line configuration. Phys. Fluids 26 (5), 051901.CrossRefGoogle Scholar
Breder, C. M. 1926 The locomotion of fishes. Zoologica 4, 159297.Google Scholar
Carling, J., Williams, T. L. & Bowtell, G. 1998 Self-propelled anguilliform swimming: simultaneous solution of the two-dimensional Navier–Stokes equations and Newton’s laws of motion. J. Expl Biol. 201 (23), 31433166.CrossRefGoogle ScholarPubMed
Connell, B. S. H. & Yue, D. K. P. 2007 Flapping dynamics of a flag in a uniform stream. J. Fluid Mech. 581, 3367.Google Scholar
Daghooghi, M. & Borazjani, I. 2015 The hydrodynamic advantages of synchronized swimming in a rectangular pattern. Bioinspir. Biomim. 10 (5), 056018.Google Scholar
Deng, H.-B., Xu, Y.-Q., Chen, D.-D., Dai, H., Wu, J. & Tian, F.-B. 2013 On numerical modeling of animal swimming and flight. Comput. Mech. 52 (6), 12211242.CrossRefGoogle Scholar
Deng, J. & Shao, X.-m. 2006 Hydrodynamics in a diamond-shaped fish school Project supported by the National Lab of Hydrodynamics of China. J. Hydrodyn. B 18 (3), 438442.Google Scholar
Dong, G.-J. & Lu, X.-Y. 2007 Characteristics of flow over traveling wavy foils in a side-by-side arrangement. Phys. Fluids 19 (5), 057107.CrossRefGoogle Scholar
Dong, H., Mittal, R. & Najjar, F. M. 2006 Wake topology and hydrodynamic performance of low-aspect-ratio flapping foils. J. Fluid Mech. 566, 309343.Google Scholar
Drucker, E. G. & Lauder, G. V. 2001 Locomotor function of the dorsal fin in teleost fishes: experimental analysis of wake forces in sunfish. J. Expl Biol. 204 (17), 29432958.Google Scholar
Eldredge, J. D. 2006 Numerical simulations of undulatory swimming at moderate Reynolds number. Bioinspir. Biomim. 1 (4), S19.Google Scholar
Eloy, C. 2013 On the best design for undulatory swimming. J. Fluid Mech. 717, 4889.Google Scholar
Förster, C., Wall, W. A. & Ramm, E. 2007 Artificial added mass instabilities in sequential staggered coupling of nonlinear structures and incompressible viscous flows. Comput. Meth. Appl. Mech. Engng 196 (7), 12781293.Google Scholar
Gazzola, M., Argentina, M. & Mahadevan, L. 2014 Scaling macroscopic aquatic locomotion. Nat. Phys. 10 (10), 758761.CrossRefGoogle Scholar
Gero, D. R. 1952 The hydrodynamic aspects of fish propulsion. Fish propulsion 1601, 132.Google Scholar
Ginneken, V. v., Antonissen, E., Miller, U. K., Booms, R., Eding, E., Verreth, J. & Thillart, G. v. d. 2005 Eel migration to the Sargasso: remarkably high swimming efficiency and low energy costs. J. Expl Biol. 208 (7), 13291335.CrossRefGoogle Scholar
Gopalkrishnan, R., Triantafyllou, M. S., Triantafyllou, G. S. & Barrett, D. 1994 Active vorticity control in a shear flow using a flapping foil. J. Fluid Mech. 274, 121.CrossRefGoogle Scholar
Gray, J. 1933 Studies in animal locomotion. I. The movement of fish with special reference to the eel. J. Expl Biol. 10 (1), 88104.CrossRefGoogle Scholar
Harper, D. G. & Blake, R. W. 1990 Fast-Start Performance of Rainbow Trout Salmo Gairdneri and Northern Pike Esox Lucius. J. Expl Biol. 150 (1), 321342.CrossRefGoogle Scholar
Hemelrijk, C., Reid, D., Hildenbrandt, H. & Padding, J. 2015 The increased efficiency of fish swimming in a school. Fish and Fisheries 16 (3), 511521.Google Scholar
Ijspeert, A. J. 2014 Biorobotics: using robots to emulate and investigate agile locomotion. Science 346 (6206), 196203.Google Scholar
Johnson, S. G.2013 The NLopt nonlinear-optimization package, http://ab-initio.mit.edu/nlopt.Google Scholar
Kern, S. & Koumoutsakos, P. 2006 Simulations of optimized anguilliform swimming. J. Expl Biol. 209 (24), 48414857.Google Scholar
Killen, S. S., Marras, S., Steffensen, J. F. & McKenzie, D. J. 2012 Aerobic capacity influences the spatial position of individuals within fish schools. Proc. Biol. Sci. 279 (1727), 357364.Google Scholar
Lauder, G. V. & Madden, P. G. A. 2007 Fish locomotion: kinematics and hydrodynamics of flexible foil-like fins. Exp. Fluids 43 (5), 641653.Google Scholar
Liao, J. C. 2007 A review of fish swimming mechanics and behaviour in altered flows. Phil. Trans. R. Soc. B: Biol. Sci. 362 (1487), 19731993.Google Scholar
Liao, J. C., Beal, D. N., Lauder, G. V. & Triantafyllou, M. S. 2003a Fish exploiting vortices decrease muscle activity. Science 302 (5650), 15661569.CrossRefGoogle ScholarPubMed
Liao, J. C., Beal, D. N., Lauder, G. V. & Triantafyllou, M. S. 2003b The Karman gait: novel body kinematics of rainbow trout swimming in a vortex street. J Expl Biol. 206 (6), 10591073.CrossRefGoogle Scholar
Lighthill, M. J. 1960 Note on the swimming of slender fish. J. Fluid Mech. 9 (02), 305317.Google Scholar
Liu, G., Yu, Y.-L. & Tong, B.-G. 2011 Flow control by means of a traveling curvature wave in fishlike escape responses. Phys. Rev. E 84 (5), 056312.Google ScholarPubMed
Maertens, A. P.2015 Fish swimming optimization and exploiting multi-body hydrodynamic interactions for underwater navigation. PhD thesis, Department of Mechanical Engineering, Massachusetts Institute of Technology.Google Scholar
Maertens, A. P., Triantafyllou, M. S. & Yue, D. K. P. 2015 Efficiency of fish propulsion. Bioinspir. Biomim.; (submitted) (under review).CrossRefGoogle ScholarPubMed
Maertens, A. P. & Weymouth, G. D. 2015 Accurate Cartesian-grid simulations of near-body flows at intermediate Reynolds numbers. Comput. Meth. Appl. Mech. Engng 283, 106129.Google Scholar
Marras, S., Killen, S. S., Lindstrom, J., Mckenzie, D. J., Steffensen, J. F. & Domenici, P. 2014 Fish swimming in schools save energy regardless of their spatial position. Behav. Ecol. Sociobiol. 18.Google ScholarPubMed
Partridge, B. L. & Pitcher, T. J. 1979 Evidence against a hydrodynamic function for fish schools. Nature 279 (5712), 418419.Google Scholar
Peng, Z. & Zhu, Q. 2009 Energy harvesting through flow-induced oscillations of a foil. Phys. Fluids 21 (12), 123602.Google Scholar
Pitcher, T. J. 1986 Functions of shoaling behaviour in teleosts. In The Behaviour of Teleost Fishes (ed. Pitcher, T. J.), pp. 294337. Springer.Google Scholar
Portugal, S. J., Hubel, T. Y., Fritz, J., Heese, S., Trobe, D., Voelkl, B., Hailes, S., Wilson, A. M. & Usherwood, J. R. 2014 Upwash exploitation and downwash avoidance by flap phasing in ibis formation flight. Nature 505 (7483), 399402.Google Scholar
Powell, M. J. D.2009 The BOBYQA algorithm for bound constrained optimization without derivatives. Cambridge NA Report NA2009/06, University of Cambridge, Cambridge.Google Scholar
Read, D. A., Hover, F. S. & Triantafyllou, M. S. 2003 Forces on oscillating foils for propulsion and maneuvering. J. Fluids Struct. 17 (1), 163183.Google Scholar
van Rees, W. M., Gazzola, M. & Koumoutsakos, P. 2013 Optimal shapes for anguilliform swimmers at intermediate Reynolds numbers. J. Fluid Mech. 722, R3.Google Scholar
Reid, Daniel A. P., Hildenbrandt, H., Padding, J. T. & Hemelrijk, C. K. 2009 Flow around fishlike shapes studied using multiparticle collision dynamics. Phys. Rev. E 79 (4), 046313.Google Scholar
Reid, D. A. P., Hildenbrandt, H., Padding, J. T. & Hemelrijk, C. K. 2012 Fluid dynamics of moving fish in a two-dimensional multiparticle collision dynamics model. Phys. Rev. E 85 (2), 021901.Google Scholar
Rios, L. M. & Sahinidis, N. V. 2013 Derivative-free optimization: a review of algorithms and comparison of software implementations. J. Glob. Optim. 56 (3), 12471293.Google Scholar
Roberts, T. J. & Azizi, E. 2011 Flexible mechanisms: the diverse roles of biological springs in vertebrate movement. J. Expl Biol. 214 (3), 353361.CrossRefGoogle ScholarPubMed
Sefati, S., Neveln, I. D., Roth, E., Mitchell, T. R. T., Snyder, J. B., Maciver, M. A., Fortune, E. S. & Cowan, N. J. 2013 Mutually opposing forces during locomotion can eliminate the tradeoff between maneuverability and stability. PNAS 110 (47), 1879818803.CrossRefGoogle ScholarPubMed
Sfakiotakis, M., Lane, D. M. & Davies, J. B. C. 1999 Review of fish swimming modes for aquatic locomotion. IEEE J. Ocean. Engng 24 (2), 237252.Google Scholar
Shen, L., Zhang, X., Yue, D. K. P. & Triantafyllou, M. S. 2003 Turbulent flow over a flexible wall undergoing a streamwise travelling wave motion. J. Fluid Mech. 484, 197221.Google Scholar
Shirgaonkar, A. A., MacIver, M. A. & Patankar, N. A. 2009 A new mathematical formulation and fast algorithm for fully resolved simulation of self-propulsion. J. Comput. Phys. 228 (7), 23662390.Google Scholar
Stefanini, C., Orofino, S., Manfredi, L., Mintchev, S., Marrazza, S., Assaf, T., Capantini, L., Sinibaldi, E., Grillner, S., Walln, P. et al. 2012 A novel autonomous, bioinspired swimming robot developed by neuroscientists and bioengineers. Bioinspir. Biomim. 7 (2), 025001.Google Scholar
Streitlien, K., Triantafyllou, G. S. & Triantafyllou, M. S. 1996 Efficient foil propulsion through vortex control. AIAA J. 34 (11), 23152319.Google Scholar
Toki, G. & Yue, D. K. P. 2012 Optimal shape and motion of undulatory swimming organisms. Proc. R. Soc. Lond. B 279 (1740), 30653074.Google Scholar
Triantafyllou, G. S., Triantafyllou, M. S. & Grosenbaugh, M. A. 1993 Optimal thrust development in oscillating foils with application to fish propulsion. J. Fluids Struct. 7 (2), 205224.Google Scholar
Triantafyllou, M. S. & Triantafyllou, G. S. 1995 An efficient swimming machine. Sci. Am. 272, 6470.Google Scholar
Triantafyllou, M. S., Triantafyllou, G. S. & Gopalkrishnan, R. 1991 Wake mechanics for thrust generation in oscillating foils. Phys. Fluids A 3 (12), 28352837.Google Scholar
Tytell, E. D. 2004 The hydrodynamics of eel swimming II. Effect of swimming speed. J. Expl Biol. 207 (19), 32653279.Google Scholar
Tytell, E. D. & Lauder, G. V. 2004 The hydrodynamics of eel swimming I. Wake structure. J. Expl Biol. 207 (11), 18251841.CrossRefGoogle ScholarPubMed
Videler, J. J. 1993 Fish Swimming. Springer.Google Scholar
Videler, J. J. & Hess, F. 1984 Fast continuous swimming of two pelagic predators, Saithe (Pollachius virens) and Mackerel (Scomber scombrus): a kinematic analysis. J. Expl Biol. 109 (1), 209228.Google Scholar
Webb, P. W. 1971 The swimming energetics of trout II. Oxygen consumption and swimming efficiency. J. Expl Biol. 55 (2), 521540.Google Scholar
van Weerden, J. F., Reid, D. A. P. & Hemelrijk, C. K. 2014 A meta-analysis of steady undulatory swimming. Fish Fish 15 (3), 397409.Google Scholar
Weihs, D. 1973 Hydromechanics of fish schooling. Nature 241 (5387), 290291.CrossRefGoogle Scholar
Weymouth, G. D., Dommermuth, D. G., Hendrickson, K. & Yue, D. K.-P. 2006 Advancements in Cartesian-grid methods for computational ship hydrodynamics. In 26th Symposium on Naval Hydrodynamics, Rome, Italy, 17–22 September 2006.Google Scholar
Weymouth, G. D. & Triantafyllou, M. S. 2013 Ultra-fast escape of a deformable jet-propelled body. J. Fluid Mech. 721, 367385.CrossRefGoogle Scholar
Wibawa, M. S., Steele, S. C., Dahl, J. M., Rival, D. E., Weymouth, G. D. & Triantafyllou, M. S. 2012 Global vorticity shedding for a vanishing wing. J. Fluid Mech. 695, 112134.Google Scholar
Wolfgang, M. J., Anderson, J. M., Grosenbaugh, M. A., Yue, D. K. & Triantafyllou, M. S. 1999 Near-body flow dynamics in swimming fish. J. Expl Biol. 202 (17), 23032327.Google Scholar
Zhu, L. & Peskin, C. S. 2003 Interaction of two flapping filaments in a flowing soap film. Phys. Fluids 15 (7), 19541960.Google Scholar
Zhu, Q. & Shoele, K. 2008 Propulsion performance of a skeleton-strengthened fin. J. Expl Biol. 211 (13), 20872100.CrossRefGoogle ScholarPubMed
Zhu, Q., Wolfgang, M. J., Yue, D. K. P. & Triantafyllou, M. S. 2002 Three-dimensional flow structures and vorticity control in fish-like swimming. J. Fluid Mech. 468, 128.Google Scholar
Figure 0

Figure 1. Schematic showing the fish model parameters. An elongated body of length $L$ undulates in a flow of speed $U_{s}$ with a wave travelling backward at speed $f\unicode[STIX]{x1D706}$ and amplitude $a$ at the trailing edge.

Figure 1

Figure 2. Three-dimensional fish geometry based on a giant danio.

Figure 2

Figure 3. Carangiform and anguilliform motion for $f=1.8$ and $a_{0}=0.1$ at Reynolds number $\mathit{Re}=5000$ with recoil. (a) Prescribed amplitude envelopes, (b) mid-line displacement.

Figure 3

Table 1. Kinematic and other dimensionless parameters.

Figure 4

Figure 4. Flow configuration for the undulating NACA0012 simulations. The vorticity field for the carangiform motion with $f=1.8$ and zero mean drag is shown as an example.

Figure 5

Figure 5. (a) Linear and angular momentum and (b) corresponding velocities for a neutrally buoyant self-propelled NACA0012 with carangiform motion at frequency $f=1/T=2.1$.

Figure 6

Figure 6. Quasi-propulsive efficiency as a function of frequency for the carangiform and anguilliform motions with and without recoil.

Figure 7

Figure 7. $\unicode[STIX]{x1D702}_{QP}$ as a function of $A(0)$ or $f$ and $A(1/2)$ for quadratic envelopes. The black dots show the location of the points that have been used to build the thin-plate smoothing spline (tpaps function in Matlab with smoothing parameter $p=0.999$) represented in colour. (a) Fixed frequency $f=1.8$. The carangiform and anguilliform motions are respectively denoted by a black square and a black diamond, and a dashed line shows the location of linear envelopes (points below this line correspond to convex envelopes, while above it the envelopes are concave). (b) Fixed leading edge value $A(0)=0$. Note that the thin-plate smoothing is only accurate in regions with a sufficient density of points.

Figure 8

Figure 8. Definition of the parameters for a Gaussian envelope.

Figure 9

Figure 9. (a) Deformation and (b) curvature for various quadratic and Gaussian envelopes. The carangiform envelope is the one defined in (2.4): $A(x)=1-0.825(x-1)+1.625(x^{2}-1)$. The optim. quadratic envelop is the most efficient quadratic envelop identified in figure 7: $A(x)=1+3(x-1)-2(x^{2}-1)$. The optim. Gauss envelopes are the most efficient Gaussian envelopes identified for $f=1.5$ and $f=2.4$ respectively, with parameters summarized in table 2.

Figure 10

Figure 10. $\unicode[STIX]{x1D702}_{QP}$ as a function of $x_{1}$ and $\unicode[STIX]{x1D6FF}$ near the optimum for Gaussian envelopes. (a) $f=1.5$, (b) $f=1.8$, (c) $f=2.1$, (d) $f=2.4$, (e) $f=2.7$, (f) colour bar. The black dots show the location of the points that have been used to build the thin-plate smoothing spline (tpaps function in Matlab with smoothing parameter $p=0.999$) represented in colour. Note that the thin-plate smoothing is only accurate in regions with a sufficient density of points.

Figure 11

Figure 11. Optimized (a) prescribed deformation envelopes and (b) displacement envelopes for the Gaussian parametrization. $\unicode[STIX]{x1D706}=1$ and $f=[1.5,1.8,2.1,2.4,2.7]$.

Figure 12

Figure 12. Superimposed body outlines over one undulation period for three frequencies.

Figure 13

Figure 13. Snapshots of vorticity for optimized gaits at $t/T=0~(\text{mod }1)$. (a) $f=1.5$, (b) $f=1.8$, (c) $f=2.1$, (d) $f=2.4$, (e) $f=2.7$, (f) colour bar.

Figure 14

Table 2. Parameters and properties of gaits with optimized Gaussian envelopes. Motion parameters are the frequency $f$, peak location $x_{1}$, peak width $\unicode[STIX]{x1D6FF}$ and amplitude $a_{0}$. Properties are the peak to peak displacement amplitude at the trailing edge $a$, maximum pitch angle at the trailing edge $\unicode[STIX]{x1D703}_{max}$, maximum angle of attack $\unicode[STIX]{x1D6FC}_{max}$, heave and pitch phase angle $\unicode[STIX]{x1D713}$, Strouhal number $St$, time-averaged power coefficient $\overline{C_{P}}$ and the quasi-propulsive efficiency $\unicode[STIX]{x1D702}_{QP}$.

Figure 15

Figure 14. Snapshots of pressure field with arrows showing the body velocity. (a,b) Optimized Gaussian envelope at $f=1.5$; (c,d) optimized Gaussian envelope at $f=2.1$; (e,f) optimized Gaussian envelope at $f=2.7$. (a,c) $t/T=0.12~(\text{mod }1)$ (minimum power for $f=1.5$ and $f=2.1$); (e) $t/T=0~(\text{mod }1)$ (minimum power for $f=2.7$); (b,d) $t/T=0.34~(\text{mod }1)$ (maximum power for $f=1.5$ and $f=2.1$; (f) $t/T=0.29~(\text{mod }1)$ (maximum power for $f=2.7$).

Figure 16

Figure 15. Snapshot of the vorticity field around a two-dimensional fish with a separate tail fin.

Figure 17

Figure 16. $\unicode[STIX]{x1D702}_{QP}$ as a function of $x_{1}$ and $\unicode[STIX]{x1D6FF}$ near the optimum for (a) 2-D and (b) 3-D geometries with $f=2.4$. The black dots show the location of the points that have been used to build the thin-plate smoothing spline (tpaps function in Matlab with smoothing parameter $p=0.999$). Note that the thin-plate smoothing is only accurate in regions with a sufficient density of points.

Figure 18

Figure 17. Prescribed deformation envelope $a_{0}A(x)$ and displacement envelope $g(x)$ for (a) carangiform gait with $f=3$ and (b) optimized gait with $f=2.4$. Frequencies have been selected such that the displacement amplitude at the trailing edge is the same.

Figure 19

Figure 18. Superimposed body outlines over one undulation period for (a) the carangiform motion and (b) the optimized gait.

Figure 20

Table 3. Parameters and properties of 3-D undulating gaits. Properties are the peak to peak displacement amplitude at the trailing edge $a$, maximum pitch angle at the trailing edge $\unicode[STIX]{x1D703}_{max}$, maximum angle of attack $\unicode[STIX]{x1D6FC}_{max}$, heave and pitch phase angle $\unicode[STIX]{x1D713}$, Strouhal number $St$, time-averaged power coefficient $\overline{C_{P}}$ and the quasi-propulsive efficiency $\unicode[STIX]{x1D702}_{QP}$. The optimized gait at $f=2.4$ is compared to the carangiform gait at $f=3$, for which the amplitude at the trailing edge is the same.

Figure 21

Figure 19. Snapshots of the flow around a three-dimensional fish with (a,c,e,g) a carangiform and (b,d,f,h) an optimized gait. (a,b) Three-dimensional vortical structures visualized using the $\unicode[STIX]{x1D706}_{2}$-criterion; (c,d) $z$ component of the vorticity in the $z=0$ plane; (e,f) pressure in the $z=0$ plane; (g,h) pressure in the $z=0.06$ plane.

Figure 22

Figure 20. (a,c,e) Side view and (b,d,f) top view of the vortex structures at several time steps for the carangiform gait. (a,b) $t/T=0.1~(\text{mod }1)$; (c,d) $t/T=0.4~(\text{mod }1)$; (e,f) $t/T=0.7~(\text{mod }1)$. A red line shows the formation of a vortex ring.

Figure 23

Figure 21. (a,c,e) Side view and (b,d,f) top view of the vortex structures at several time steps for the optimized gait. (a,b) $t/T=0.1~(\text{mod }1)$; (c,d) $t/T=0.4~(\text{mod }1)$; (e,f) $t/T=0.7~(\text{mod }1)$. A red line shows a vortex shed from the tail that never fully develops into a ring, while green lines show the vortices shed from the body.

Figure 24

Figure 22. Wake behind a self-propelled undulating fish for the optimized gait with Gaussian envelope and $\unicode[STIX]{x1D706}=1$ at frequency $f=1.5$. (a) Instantaneous vorticity field; (b) instantaneous $x$-velocity field; (c) time-averaged vorticity field; (d) time-averaged $x$-velocity field.

Figure 25

Figure 23. Vorticity phase in the wake of self-propelled undulating fish as a function of (a) distance, $d$, and (b) frequency times distance, $fd$. For each frequency, the optimized gait with Gaussian envelope is used.

Figure 26

Table 4. Parameters of the gaits used in the wake vorticity phase estimate and fitted phase and wavelength for the vorticity in the wake. An estimate of the phase $\unicode[STIX]{x1D719}_{w}$ assuming a phase speed $c_{w}=\unicode[STIX]{x1D706}_{w}/f=1$ is also provided.

Figure 27

Figure 24. Time-averaged power coefficient $\overline{C_{P}}$ and amplitude $a_{0}$ for (a) the upstream fish as a function of distance $d$ and (b) the downstream fish as a function of phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}$. The solid (respectively dashed) line marks the average value with respect to the phase (respectively distance) and the shaded area indicates the range of values reached across the various distances (respectively phases).

Figure 28

Figure 25. Snapshot of the vorticity field for two fish undulating at $f=1.5$ with separation distance $d=1$ and optimal phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0.83$ at time $t/T-\unicode[STIX]{x1D719}=0.25~(\text{mod }1)$. The colour axis is the same as in figure 13.

Figure 29

Figure 26. Snapshot of the velocity and pressure field for two fish undulating at $f=1.5$ with separation $d=1$ and optimal phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0.83$. (a,b) $x$-velocity; (c,d) $y$-velocity; (e,f) pressure and arrows showing the velocity of the fish. (a,c,e) Upstream fish at $t/T=0.25~(\text{mod }1)$; (b,d,f) downstream fish at $t/T-\unicode[STIX]{x1D719}=0.25~(\text{mod }1)$. The same colour axis as in figure 14 is used for the pressure, and the same as in figure 22(b) is used for the velocity (centred in $0$ for the $y$-velocity).

Figure 30

Figure 27. Ratio of (a) amplitude and (b) power coefficient as a function of frequency $f$ and phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}$ for two fish swimming in line at distance $d=1$. The ratios are defined with respect to the corresponding gait in open water. The black dots show the location of the points that have been used to build the thin-plate smoothing spline (tpaps function in Matlab with smoothing parameter $p=0.999$) represented in colour. Note that the thin-plate smoothing is only accurate in regions with a sufficient density of points.

Figure 31

Figure 28. Snapshot of the vorticity, velocity and pressure field for two fish undulating at $f=1.8$ with separation distance $d=1$ and optimal phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0.87$. (a,b) Vorticity; (c,d) $x$-velocity; (e,f) $y$-velocity; (g,h) pressure and arrows showing the velocity of the fish. (a,c,e,g) Upstream fish at $t/T=0.25~(\text{mod }1)$; (b,d,f,h) downstream fish at $t/T-\unicode[STIX]{x1D719}=0.25~(\text{mod }1)$. The same colour axis as in figure 14 is used for the pressure, and the same as in figures 22(a) and 22(b) for vorticity and velocity (centred in 0 for the $y$-velocity).

Figure 32

Figure 29. Snapshots of (a) vorticity, (b) $x$-velocity and (c) pressure field for two fish undulating at $f=1.8$ with separation distance $d=1$ and phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0.38$ at $t/T-\unicode[STIX]{x1D719}=0.25~(\text{mod }1)$. The same colour axis as in figure 22(a) is used for the vorticity and the same as figure 14 for the pressure.

Figure 33

Figure 30. Snapshot of the vorticity field for two fish undulating at $f=2.1$ with separation distance $d=1$ and phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0$. The same colour axis is used as in figure 22(a).

Figure 34

Figure 31. Ratio of undulation amplitude $a_{0}$ and time-averaged power coefficient $\overline{C_{P}}$ as a function of phase for two fish undulating at $f=1.5$ with longitudinal separation distance $d=1$. In-line fish and fish at an offset $\unicode[STIX]{x0394}y=0.17$ are compared.

Figure 35

Figure 32. Snapshot of the vorticity field for two fish undulating at $f=1.5$ with longitudinal separation distance $d=1$, transverse separation $\unicode[STIX]{x0394}y=0.17$ and optimal phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0.65$ at time $t/T-\unicode[STIX]{x1D719}=0.1~(\text{mod }1)$. The colour axis is the same as in figure 13.

Figure 36

Figure 33. Snapshot of the (a,b) $x$-velocity and (c,d) pressure field for two fish undulating at $f=1.5$ with longitudinal separation distance $d=1$, transverse separation $dy=0.17$ and optimal phase $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}=0.65$. (a,c) Upstream fish, $t/T=0.1~(\text{mod }1)$; (b,d) downstream fish, $t/T-\unicode[STIX]{x1D719}=0.1~(\text{mod }1)$. The same colour axis as in figure 14 is used for the pressure, and the same as in figure 22(b) for the velocity.

Figure 37

Table 5. Efficiency for a pair of undulating fish in various advantageous configurations. The undulation frequency $f$, longitudinal separation $d$, transverse distance $\unicode[STIX]{x0394}y$ and the phase difference $\unicode[STIX]{x0394}\unicode[STIX]{x1D719}$ between the leading edge of the downstream fish and the vortices in the wake of the upstream fish are considered.

Figure 38

Figure 34. Time-averaged friction and pressure drag (respectively $CDf$ and $CDp$) on a NACA0012 at Reynolds number $\mathit{Re}=5000$ and angle of attack $0^{\circ }$ and $5^{\circ }$ as a function of grid resolution. The relative error $E(\text{d}x)$ is computed with respect to XFOIL: $E(\text{d}x)=C_{D_{\mathit{BDIM}}}/C_{D_{\mathit{XFOIL}}}-1$.

Figure 39

Figure 35. Time-averaged drag and power coefficients for an undulating NACA0012 as a function of frequency, compared with values from Dong & Lu (2007).

Figure 40

Figure 36. (a) Drag and (b) pressure coefficient on an undulating NACA0012 with carangiform motion at $f=1/T=2.1$. Various grids and constraints are compared. Grid 2 is twice as fine as grid 1, while the computational domain of grid 3 is twice as large as that of grid 1.

Figure 41

Table 6. Mean and maximum amplitude of power coefficient, amplitude of drag coefficient and undulation amplitude for a NACA0012 with carangiform amplitude at $f=2.1$ and 0 drag.