1 Introduction
Fluid–structure interaction (FSI) problems highlight a natural dichotomy in the simulation approaches for solids and fluids, where fluid problems tend to be solved using Eulerian-frame methods (Chorin Reference Chorin1967; Hirt, Amsden & Cook Reference Hirt, Amsden and Cook1974; Versteeg & Malalasekera Reference Versteeg and Malalasekera1995; Tannehill, Anderson & Pletcher Reference Tannehill, Anderson and Pletcher1997) and solids with Lagrangian approaches (Zienkiewicz & Taylor Reference Zienkiewicz and Taylor1967; Sulsky, Chen & Schreyer Reference Sulsky, Chen and Schreyer1994; Hoover Reference Hoover2006; Belytschko et al. Reference Belytschko, Liu, Moran and Elkhodary2013). An FSI simulation method must therefore bridge the gap between these two perspectives. For example, one set of FSI approaches treats both fluid and solid phases in a Lagrangian frame, with a finite-element representation in the solid and an adaptive Lagrangian mesh in the fluid (Rugonyi & Bathe Reference Rugonyi and Bathe2001; Bathe Reference Bathe2007; Froehle & Persson Reference Froehle and Persson2015), or with both phases treated with a mesh-free approach (Rabczuk et al. Reference Rabczuk, Gracie, Song and Belytschko2010). An alternative methodology is to treat the fluid on a fixed Eulerian mesh and the solid with Lagrangian points, such as the family of immersed boundary methods developed by Peskin (Reference Peskin1972a,Reference Peskinb, Reference Peskin1977, Reference Peskin2002), which have been extensively used to simulate membranes (Griffith et al. Reference Griffith, Luo, McQueen and Peskin2009; Fai et al. Reference Fai, Griffith, Mori and Peskin2013), and obstacles (Coquerelle & Cottet Reference Coquerelle and Cottet2008; Gazzola et al. Reference Gazzola, Chatelain, van Rees and Koumoutsakos2011; Engels et al. Reference Engels, Kolomenskiy, Schneider and Sesterhenn2015) via Brinkman volume penalization.
A fully Eulerian method whereby fluid and solid are both computed on a fixed grid has its advantages. Computation time benefits arise from both phases being treated on a single fixed background grid. The handling of multiple objects interacting or of topological changes to objects can be done with level set fields (Osher & Sethian Reference Osher and Sethian1988; Sethian Reference Sethian1999; Osher & Fedkiw Reference Osher and Fedkiw2003) rather than requiring complex on-the-fly Lagrangian remeshing. In addition, certain common conditions such as incompressibility are easier to implement in an Eulerian form. Lastly, fixed-grid approaches are well suited to numerical analysis, such as a von Neumann stability analysis (LeVeque Reference LeVeque2007).
The key challenge for a fully Eulerian FSI method is to develop an Eulerian description of the solid. In a small-strain limit, this can be achieved by writing the equations of linear elasticity in rate form, referred to as hypoelasticity (Truesdell Reference Truesdell1955), which has formed the basis of several numerical techniques (Udaykumar et al. Reference Udaykumar, Tran, Belk and Vanden2003; Rycroft & Gibou Reference Rycroft and Gibou2012; Rycroft, Sui & Bouchbinder Reference Rycroft, Sui and Bouchbinder2015). However, here, our aim is to develop a large-deformation description of the solid, the more general approach in solid mechanics (Gurtin, Fried & Anand Reference Gurtin, Fried and Anand2010; Belytschko et al. Reference Belytschko, Liu, Moran and Elkhodary2013). This has attracted interest over the past three decades, with a variety of different approaches being explored in the literature, such as the conservative first-order method of Plohr & Sharp (Reference Plohr and Sharp1988), the deformation gradient-based method of Liu & Walkington (Reference Liu and Walkington2001) and the initial point set (IPS) method of Dunne (Reference Dunne2006). See § 2.2 for further references and a comprehensive discussion.
In recent years, we have contributed to this field by developing an Eulerian-frame solid simulation approach called the reference map technique (RMT) (Kamrin Reference Kamrin2008; Kamrin & Nave Reference Kamrin and Nave2009; Kamrin, Rycroft & Nave Reference Kamrin, Rycroft and Nave2012; Valkov, Rycroft & Kamrin Reference Valkov, Rycroft and Kamrin2015), which is based on tracking the reference map field – i.e. where material started from – as the primary simulation variable on the Eulerian grid. The reference map field allows the finite deformation of the solid to be computed, from which the material stress is calculated according to a prescribed nonlinear constitutive law. This approach has shown the ability to simulate basic FSI and separately cover a span of desirable features. However, a single implementation covering all needed features for robust physical simulation – e.g. (i) numerical stability, (ii) good convergence properties for fluid and solid phases and (iii) desirable physical traits such as the ability to model incompressible materials, objects with sharp corners and activated media – has been lacking and non-trivial to produce. In this paper we present such a method and provide a variety of physical simulations using it, which extend our understanding of certain FSI problems.
To represent incompressible solids and fluids we have reformulated the numerical discretization using the projection method framework of Chorin (Reference Chorin1967, Reference Chorin1968). In this method, to integrate the velocity field forward by a time step, an intermediate velocity field is computed where the incompressibility constraint is temporarily relaxed. After this, a Poisson problem is solved for the pressure, which is used to project the velocity to be divergence free. The method has been extensively developed since Chorin’s original work (Brown, Cortez & Minion Reference Brown, Cortez and Minion2001). Here, we consider a modern second-order implementation developed by Almgren, Bell and coworkers (Bell, Colella & Glaz Reference Bell, Colella and Glaz1989; Puckett et al. Reference Puckett, Almgren, Bell, Marcus and Rider1997; Almgren et al. Reference Almgren, Bell, Colella, Howell and Welcome1998). The implementation uses the discretization of Colella (Reference Colella1990) for accurately calculating advective terms. It employs the approximate projection approach of Almgren, Bell & Szymczak (Reference Almgren, Bell and Szymczak1996) based on a finite-element discretization. The implementation was subsequently extended to two-phase flows using a level set method (Sussman et al. Reference Sussman, Almgren, Bell, Colella, Howell and Welcome1999), which was used to simulate an inkjet printer nozzle (Yu, Sakai & Sethian Reference Yu, Sakai and Sethian2003, Reference Yu, Sakai and Sethian2007). In our approach we deliberately keep the fluid component of the simulation to match this existing implementation, to emphasize that the reference map technique does not require any special treatment of the fluid. However, we show that the discretization techniques can be generalized to simulate solids via the RMT, and we find that the advective discretization is especially well suited to simulating the reference map update equations in a fashion more accurate than the approach of Valkov et al. (Reference Valkov, Rycroft and Kamrin2015).
The projection method removes the Courant–Friedrichs–Lewy (CFL) condition (Courant, Friedrichs & Lewy Reference Courant, Friedrichs and Lewy1967) associated with pressure waves. This makes it possible to simulate a wide variety of problems in an intermediate Reynolds number regime (and potentially for high Reynolds problems should an adaptive background grid be used). Following Valkov et al. (Reference Valkov, Rycroft and Kamrin2015), the level set field representing interface(s) is not explicitly updated, but is tied to where the boundary should be in the reference map field. However, here we switch to a regression-based extrapolation method, which is more stable, simpler and allows shapes with corners to be considered. Two physically motivated examples of a flexible rotor and a paddle are presented, and a variety of convergence and performance tests are provided in appendices B, C, D and E. Our numerical tests show that the method is first-order accurate for a typical fluid–solid simulation, with the interface being the largest source of error. With respect to the $L^{2}$ norm, second-order accuracy is achieved for a fluid-only discretization, and for a solid-only discretization with specific choices for numerical damping.
With the properties of the method established, we consider the flag-flapping stability problem, which has been studied extensively (Zhang et al. Reference Zhang, Childress, Libchaber and Shelley2000; Watanabe et al. Reference Watanabe, Suzuki, Sugihara and Sueoka2002; Zhu & Peskin Reference Zhu and Peskin2002; Connell & Yue Reference Connell and Yue2007). We can quantitatively reproduce the phase plot of stability for a thin flag (Connell & Yue Reference Connell and Yue2007) with very good accuracy for Reynolds numbers below 1000, and reasonably good accuracy for Reynolds numbers above 1000. Our method also makes it possible to simulate flags with substantial thickness, which show a different instability mechanism due to vortex shedding from the tip. The transition between the thin- and thick-flag behaviours is captured and studied with our method. We also augment the approach to allow internal actuation of the solid bodies. With this addition, the method is well suited to biolocomotion problems and we show an example of this by modelling a jellyfish-like swimmer. Another advantage of the method is the ability to perform many-body contact problems quickly but in a fashion that accurately balances momentum. We demonstrate this approach with two examples of many objects of various sizes and densities settling under gravity. All computer code to generate the results in this paper is released as open source software (appendix F).
2 Theory
2.1 Overview of the reference map technique
We begin by considering the solid material, which we model using the large-deformation hyperelastic framework (Lubliner Reference Lubliner2008; Gurtin et al. Reference Gurtin, Fried and Anand2010). As shown in figure 1(a), we introduce an undeformed reference configuration for the solid at time $t=0$ with coordinate system $\boldsymbol{X}$. We then consider a time-dependent map $\unicode[STIX]{x1D74C}(\boldsymbol{X},t)$ from the undeformed configuration to the deformed state in the physical frame at time $t$. The deformation gradient tensor is defined as
and represents how an infinitesimal element of the solid has been deformed and rotated. From here, a constitutive law
can be used to calculate the Cauchy stress $\unicode[STIX]{x1D748}_{s}$ in the physical frame, where $\unicode[STIX]{x1D73B}$ represents any internal state variables such as plastic deformation. The material velocity $\boldsymbol{v}(\boldsymbol{x},t)$ then satisfies
where $\unicode[STIX]{x1D748}=\unicode[STIX]{x1D748}_{s}$ in this case, $\unicode[STIX]{x1D70C}=\unicode[STIX]{x1D70C}_{s}/(\det \unicode[STIX]{x1D641})$ and $\unicode[STIX]{x1D70C}_{s}$ is the solid density in the undeformed configuration.
The most commonly used approach to simulate hyperelastic solids is to introduce a deforming mesh on the solid, and then solve for the nodal displacements, from which (2.1) can be used to compute the stress (Belytschko et al. Reference Belytschko, Liu, Moran and Elkhodary2013). However, here we take an alternative approach of introducing the reference map field in the physical frame $\unicode[STIX]{x1D743}(\boldsymbol{x},t)$ that represents the inverse mapping of $\unicode[STIX]{x1D74C}$. The field is initialized as $\unicode[STIX]{x1D743}(\boldsymbol{x},0)=\boldsymbol{x}$, and satisfies the advection equation
The deformation gradient tensor is computed from the reference map field according to
from which the Cauchy stress is evaluated. Equations (2.2), (2.3), (2.4) and (2.5) then form a minimal system of equations for finite-strain hyperelasticity in an Eulerian frame. The reference map $\unicode[STIX]{x1D743}(\boldsymbol{x},t)$ and velocity $\boldsymbol{v}(\boldsymbol{x},t)$ can be represented on a fixed grid. At each time step, equations (2.5) and (2.2) can be used to evaluate the Cauchy stress, after which (2.3) and (2.4) can be integrated forward in time. So far, this prescription is general, and could be solved using a variety of discretization approaches such as a finite-difference method, finite-volume method or a discontinuous Galerkin method.
2.2 Other related approaches
The reference map is a standard definition in solid mechanics (Gurtin et al. Reference Gurtin, Fried and Anand2010), and it has been used in problems of inverse design (Govindjee & Mihalic Reference Govindjee and Mihalic1996; Fachinotti, Cardona & Jetteur Reference Fachinotti, Cardona and Jetteur2008), but it is not widely employed as a primary simulation variable in the physical frame. Fixed-grid approaches by Plohr & Sharp (Reference Plohr and Sharp1988), Trangenstein & Colella (Reference Trangenstein and Colella1991) and Liu & Walkington (Reference Liu and Walkington2001) have been developed that use the deformation gradient tensor $\unicode[STIX]{x1D641}$ as a primary simulation variable. Takagi and coworkers have developed a related approach based on using the left Cauchy–Green deformation tensor $\unicode[STIX]{x1D63D}=\unicode[STIX]{x1D641}\unicode[STIX]{x1D641}^{\text{T}}$ as the primary simulation variable since this quantity features in many constitutive laws (Sugiyama et al. Reference Sugiyama, Ii, Takeuchi, Takagi and Matsumoto2011; Takagi et al. Reference Takagi, Sugiyama, Ii and Matsumoto2011; Ii et al. Reference Ii, Sugiyama, Takagi and Matsumoto2012). Methods based on $\unicode[STIX]{x1D641}$ and $\unicode[STIX]{x1D63D}$ have the advantage of requiring a single spatial derivative to compute acceleration, whereas our approach requires two, in (2.5) and (2.3). However, the reference map contains additional information for locating the boundary and has fewer components to store. Using $\unicode[STIX]{x1D641}$ requires that a gauge constraint is imposed to ensure that it remains a valid gradient of a material mapping.
Cottet, Maitre & Milcent (Reference Cottet, Maitre and Milcent2008) and Maitre et al. (Reference Maitre, Milcent, Cottet, Raoult and Usson2009) independently developed simulation approaches using the reference map, and stated its potential to be used as part of a general fluid–structure simulation. Further work by Milcent & Maitre (Reference Milcent and Maitre2016) simulated an immersed interface with full membrane elasticity. Bellotti & Theillard (Reference Bellotti and Theillard2019) coupled the reference map to the level set method for improved tracking of interfaces in two-phase flow simulation.
The IPS method of Dunne (Reference Dunne2006) is closely related to our approach. The IPS method is based on using finite elements to track the solid displacements $\boldsymbol{u}$ as the primary simulation variable. However, the reference map field (referred to by Dunne as the set of initial positions) emerges as part of the computational procedure, via the relationship $\boldsymbol{u}=\boldsymbol{x}-\unicode[STIX]{x1D743}$. The IPS method has been developed further (Dunne, Rannacher & Richter Reference Dunne, Rannacher and Richter2010; Richter Reference Richter2013; Wick Reference Wick2013), and has the advantage that the Eulerian field $\boldsymbol{u}$ can be used to track the deformation of the fluid–structure interface, in a similar manner to the approach we discuss in § 3.2.
2.3 Incompressible fluid–structure interaction
In this paper we employ the reference map technique to simulate incompressible fluid–structure interactions. We shall use the terms $\unicode[STIX]{x1D749}$, $\unicode[STIX]{x1D749}_{s}$ and $\unicode[STIX]{x1D749}_{f}$ to refer only to the deviatoric part of the stress, as the pressure field is now deformation independent and separately calculated. We make use of a globally defined velocity field $\boldsymbol{v}(\boldsymbol{x},t)$ that satisfies the incompressibility constraint
We consider a solid immersed within the fluid, and introduce a level set function $\unicode[STIX]{x1D719}(\boldsymbol{x},t)$ (Sethian Reference Sethian1999; Osher & Fedkiw Reference Osher and Fedkiw2003) that is the signed distance to the solid–fluid interface with the convention that $\unicode[STIX]{x1D719}<0$ in the solid and $\unicode[STIX]{x1D719}>0$ in the fluid. The reference map $\unicode[STIX]{x1D743}(\boldsymbol{x},t)$ is defined within the solid region only.
Let the fluid have density $\unicode[STIX]{x1D70C}_{f}$ and dynamic viscosity $\unicode[STIX]{x1D707}_{f}$. The fluid stress deviator at any gridpoint is given by
Kinematic viscosity is defined as $\unicode[STIX]{x1D708}_{f}=\unicode[STIX]{x1D707}_{f}/\unicode[STIX]{x1D70C}_{f}$. The deviatoric stress is then defined as a smooth transition between the fluid and solid stresses,
where
is a smoothed Heaviside function with a transition region of width $2\unicode[STIX]{x1D700}$. Here we use a twice-differentiable form for $H_{\unicode[STIX]{x1D700}}$ that has been employed in previous studies (Sussman, Smereka & Osher Reference Sussman, Smereka and Osher1994; Sussman et al. Reference Sussman, Almgren, Bell, Colella, Howell and Welcome1999; Yu et al. Reference Yu, Sakai and Sethian2003, Reference Yu, Sakai and Sethian2007). For more details on the choice of $\unicode[STIX]{x1D700}$ and the precise form of $H_{\unicode[STIX]{x1D700}}$, see appendix D. In order to calculate $\unicode[STIX]{x1D749}$ it is necessary to smoothly extend $\unicode[STIX]{x1D743}$ in the region $0<\unicode[STIX]{x1D719}<\unicode[STIX]{x1D700}$, which is done using extrapolation methods that will be described in the following section. The density is also defined as a smooth transition between the solid and fluid, as
Formally, our limit of interest is when $\unicode[STIX]{x1D700}\rightarrow 0$, when there is a sharp interface between the fluid and solid. In our numerical method, we choose $\unicode[STIX]{x1D700}$ to scale proportionally with the grid spacing, and thus we approach this limit as the simulation resolution is increased.
3 Numerical method
The numerical procedure is based on the projection method of Chorin (Reference Chorin1967, Reference Chorin1968) for solving the incompressible Navier–Stokes equations. Specifically, we consider a modern second-order method described by Almgren et al. (Reference Almgren, Bell, Colella, Howell and Welcome1998) that is especially effective at dealing with advection, and incorporates a number of algorithmic advancements from Chorin’s original treatment.
The simulation domain is a rectangle of size $W$ by $H$, and is divided into an $M\times N$ grid of rectangular cells of size $h_{x}$ by $h_{y}$. Following the work of Colella (Reference Colella1990), the velocity, the reference map and the level set are held at cell centres and are indexed as $\boldsymbol{v}_{i,j}$, $\unicode[STIX]{x1D743}_{i,j}$ and $\unicode[STIX]{x1D719}_{i,j}$, respectively, for $i=0,\ldots ,M-1$ and $j=0,\ldots ,N-1$ (figure 2a). The components of the velocity field are written as $\boldsymbol{v}=(u,v)$. Pressures are held at cell corners and are indexed as $p_{i,j}$ for $i=0,\ldots ,M$ and $j=0,\ldots ,N$. In addition, the grid is padded by two layers of cells in each direction whose values are populated to enforce different boundary conditions.
Superscripts are used to denote time steps. To advance the simulation forward from time step $n$ to $n+1$ with interval $\unicode[STIX]{x0394}t$, the following procedure is used. The reference map field is updated using
and an intermediate velocity $\boldsymbol{v}^{\ast }$ is computed using
Here, the advective derivatives $[(\boldsymbol{v}\boldsymbol{\cdot }\unicode[STIX]{x1D735})\unicode[STIX]{x1D743}]^{n+1/2}$ and $[(\boldsymbol{v}\boldsymbol{\cdot }\unicode[STIX]{x1D735})\boldsymbol{v}]^{n+1/2}$ are evaluated at the middle of the time step using a second-order explicit Godunov scheme, described in § 3.1. Once the advective derivatives are evaluated, equation (3.1) allows $\unicode[STIX]{x1D743}^{n+1}$ to be computed. This allows the time-centred reference map to be defined as $\unicode[STIX]{x1D743}^{n+1/2}=(\unicode[STIX]{x1D743}^{n}+\unicode[STIX]{x1D743}^{n+1})/2$ after which $\boldsymbol{v}^{\ast }$ is computed using (3.2). From here, the Poisson problem for pressure is evaluated using
Following Almgren et al. (Reference Almgren, Bell and Szymczak1996) and Puckett et al. (Reference Puckett, Almgren, Bell, Marcus and Rider1997), equation (3.3) is solved using a finite-element formulation, described in § 3.4. After this, the velocity is projected to be divergence free using
where the gradient of $p^{n+1}$ is evaluated using a second-order centred difference formula.
3.1 Advective terms
To evaluate the advective terms appearing in (3.1) and (3.2), a second-order explicit Godunov scheme is used. The same scheme is applied to both the velocity $\boldsymbol{v}$ and reference map $\unicode[STIX]{x1D743}$. Throughout this section, we denote $a$ to be a generic scalar component of either of these two fields. We also refer the reader to recent work by Jain & Mani (Reference Jain and Mani2017), which introduces an alternative numerical treatment for reference map advection.
3.1.1 Godunov upwinding
To begin, the gradients of the reference map and velocity at each cell centre are evaluated using the fourth-order monotonicity-limited scheme of Colella (Reference Colella1985) described in § A.1. Once the gradients are calculated at the centre of each cell, edge-centred velocities and reference maps are created at $t+\unicode[STIX]{x0394}t/2$ using Taylor expansions to each of the four edges, which are indexed using half-integers as shown in figure 2(b). As an example, an extrapolation of the reference map to a vertical edge from the left (with superscript $L$) is given by
where (2.4) has been substituted for the $\unicode[STIX]{x1D743}_{t}$ derivative. The extrapolation of the velocity from the left to this edge is
where (2.3) has been substituted to replace the $\boldsymbol{v}_{t,i,j}^{n}$ term, and $\boldsymbol{a}_{i,j}^{n}$ is defined according to
Equivalent procedures are used to compute extrapolations from the right, down and up with superscripts $R$, $D$ and $U$, respectively. To ensure tangential stability the terms with tildes in (3.5) and (3.6) are computed differently using the procedure in § A.2. After this procedure, each edge has velocities and reference maps from the two cells that adjoin it, and a Godunov upwinding procedure is used to select which values to use. On the vertical edge at $(i+1/2,j)$,
where $a$ is a generic component. Thus if the velocity field points rightward then the components are taken from the left cell, and if the velocity field points leftward then the components are taken from the right cell. The function ${\mathcal{F}}$ is used when the two velocities are ambiguous. For the horizontal velocity ${\mathcal{F}}(\unicode[STIX]{x1D6FD},\unicode[STIX]{x1D6FE})=0$ (Case A), and for all other components ${\mathcal{F}}(\unicode[STIX]{x1D6FD},\unicode[STIX]{x1D6FE})=(\unicode[STIX]{x1D6FD}+\unicode[STIX]{x1D6FE})/2$ (Case B). On an edge where a velocity boundary condition is applied (e.g. a no-slip condition) the corresponding edge velocity is set to exactly match the condition. In this paper we restrict to cases of localized solid objects that do not extend to the boundary and thus we do not apply special boundary condition treatment for edge reference map fields.
3.1.2 Marker-and-cell (MAC) projection
The edge velocities calculated in § 3.1.1 may not be precisely divergence free. We therefore apply an intermediate MAC projection step to ensure that the discrete flux entering any grid cell is exactly zero. Let $\boldsymbol{v}_{e}$ be the edge velocities, and let $q$ be a cell-centred scalar field. We aim to make
divergence free. Taking the divergence of (3.9) yields
which is discretized as
Edge-based densities appearing in this equation are computed via linear interpolation from the two adjacent grid cells. At boundaries where a velocity boundary condition is applied, any derivative on the left-hand side of (3.11) is omitted if it contains $q$ values that are out of range. If a pressure condition is applied, then a Dirichlet condition of $q=\unicode[STIX]{x0394}t\,p/2$ is applied, where the factor of two arises because the edge velocities are time centred.
Equation (3.11) results in a large linear system $\unicode[STIX]{x1D63C}q=b$ where $\unicode[STIX]{x1D63C}$ is a sparse matrix, $b$ is the source term and $q$ is a vector of the components $q_{i,j}$, which we solve using the geometric multigrid method with a standard V-cycle iteration (Demmel Reference Demmel1997). Since the $q$ field typically varies smoothly in time, the initial guess for the multigrid method is computed as a linear interpolation from the previous two time steps. Multigrid V-cycles are performed until the root mean squared (r.m.s.) element in the residual vector $r=\unicode[STIX]{x1D63C}q-b$ reaches a required tolerance $T_{MAC}$. We assume that velocities and densities are within several orders of magnitude of unity. Then an appropriate scale for an element of the residual is $r_{s}=4(h_{x}^{-2}+h_{y}^{-2})\unicode[STIX]{x0394}t$, and a tolerance of $T_{MAC}=10^{4}r_{s}\unicode[STIX]{x1D700}_{m}$ is used, where $\unicode[STIX]{x1D700}_{m}$ is the machine epsilon for double precision floating point arithmetic. Once the tolerance level is reached, one further V-cycle is performed to further improve accuracy. See appendices C and F for more details on the multigrid code library and performance.
3.1.3 Evaluation of the derivative
Once the MAC projection has been performed the time-centred advective terms for the velocity and reference maps are evaluated as
where $a$ is a generic field component.
3.2 Level set update and reference map extrapolation
The simulation makes use of a cell-centred level set function $\unicode[STIX]{x1D719}_{i,j}$ for tracking the fluid–solid boundary. The level set routine is stored in a narrow band of points of width $2\unicode[STIX]{x1D719}_{W}$ surrounding the interface (Sethian Reference Sethian1999; Rycroft & Gibou Reference Rycroft and Gibou2012) that is chosen to be large enough to contain the entire blur zone and perform finite-difference calculations at all points in this region. The level set is used to extrapolate the reference map fields in the narrow band, and to calculate the mixing of stress and density according to (2.8) and (2.10), respectively. Unlike typical applications of the level set method, the $\unicode[STIX]{x1D719}$ field is not explicitly updated, but is instead continually given by the reference map field using the procedure first described by Valkov et al. (Reference Valkov, Rycroft and Kamrin2015).
3.2.1 Level set construction
For a given shape, define a continuous function of the reference map $\unicode[STIX]{x1D719}_{0}(\unicode[STIX]{x1D743})$ such that $\unicode[STIX]{x1D719}_{0}<0$ for reference map values in the solid, $\unicode[STIX]{x1D719}_{0}>0$ for reference map values outside the solid and $\unicode[STIX]{x1D719}_{0}=0$ on the interface. During the time step, the reference map field $\unicode[STIX]{x1D743}^{n+1}$ is computed inside the solid using (3.1), from which the half-time-step reference map is defined as $\unicode[STIX]{x1D743}^{n+1/2}=(\unicode[STIX]{x1D743}^{n}+\unicode[STIX]{x1D743}^{n+1})/2$. Both fields are extended into the narrow band fluid region using the extrapolation methods described in § 3.2.2.
To construct the new level set function $\unicode[STIX]{x1D719}^{n+1/2}$, an auxiliary function $\unicode[STIX]{x1D713}^{n+1/2}$ is first computed in the narrow band such that $\unicode[STIX]{x1D713}^{n+1/2}=\unicode[STIX]{x1D719}_{0}(\unicode[STIX]{x1D743}^{n+1/2})$. The zero contour of $\unicode[STIX]{x1D713}^{n+1/2}$ will lie at the fluid–solid interface, but this function itself may not satisfy the signed-distance property. To recover the signed-distance property, the level set $\unicode[STIX]{x1D719}^{n+1/2}$ is constructed from $\unicode[STIX]{x1D713}^{n+1/2}$ using the reinitialization procedure described by Rycroft & Gibou (Reference Rycroft and Gibou2012). This procedure first considers points $(i,j)$ that straddle the interface, so that one of their orthogonal neighbours has a $\unicode[STIX]{x1D713}^{n+1/2}$ value of an opposite sign. Each straddling point is considered. The bicubic interpolant $\unicode[STIX]{x1D713}_{c}^{n+1/2}$ is computed, and the modified Newton–Raphson approach of Chopp (Reference Chopp2001, Reference Chopp2009) is used to find the shortest distance vector $\unicode[STIX]{x1D71F}\boldsymbol{x}$ from each straddling point to the interface $\unicode[STIX]{x1D713}_{c}^{n+1/2}(\boldsymbol{x})=0$, after which the level set function is initialized to $\pm |\unicode[STIX]{x1D71F}\boldsymbol{x}|$. In extremely rare cases the root-finding method can fail, in which case the routine falls back on the first-order method described by Sethian (Reference Sethian1999). For further details, see the paper by Rycroft & Gibou (Reference Rycroft and Gibou2012).
With the straddling points of $\unicode[STIX]{x1D719}^{n+1/2}$ now initialized, the remaining points are filled in using the second-order fast marching method of Sethian (Reference Sethian1999). In the fluid, the positive $\unicode[STIX]{x1D719}^{n+1/2}$ values are computed in order of increasing value, until reaching a cutoff $\unicode[STIX]{x1D719}_{W}$ that defines the width of the narrow band. The same procedure is used to fill in the negative $\unicode[STIX]{x1D719}^{n+1/2}$ values in the solid, until reaching a cutoff $-\unicode[STIX]{x1D719}_{W}$. After this procedure, the level set function is now a signed-distance function inside the narrow band. Note that these routines work reliably even if the function $\unicode[STIX]{x1D713}_{n+1/2}$ has a loss of regularity as some points: since the entire $\unicode[STIX]{x1D719}^{n+1/2}$ field is directly constructed, there is no possibility for instabilities to grow over time, as can happen in update procedures that use partial differential equations (PDEs). Identical methods are used to construct $\unicode[STIX]{x1D719}^{n+1}$ from $\unicode[STIX]{x1D743}^{n+1}$.
3.2.2 Extrapolation
During the construction of the level set function, a list of fluid grid points sorted in order of increasing value, $0<\unicode[STIX]{x1D719}_{1}<\unicode[STIX]{x1D719}_{2}<\cdots \,$ is constructed, which is used for extrapolating the reference map $\unicode[STIX]{x1D743}$ from the solid into the fluid narrow band. Previous approaches to do this have employed PDE-based methods by defining a normal vector $\boldsymbol{n}=\unicode[STIX]{x1D735}\unicode[STIX]{x1D719}$ and extrapolating outwards from the object in the direction of $\boldsymbol{n}$ (Aslam Reference Aslam2004; Rycroft & Gibou Reference Rycroft and Gibou2012). While these methods are well suited to mathematical analysis, they require considerable bookkeeping for performing the finite-difference calculations of $\unicode[STIX]{x1D719}$ and $\unicode[STIX]{x1D743}$ due to the fields only existing at certain grid locations. In previous work we have found this to be a source of difficulty (Valkov et al. Reference Valkov, Rycroft and Kamrin2015).
In the current work, we make use of the following alternative extrapolation procedure. Consider the points in increasing order of $\unicode[STIX]{x1D719}$ value. For a particular point $(i,j)$ at physical location $\boldsymbol{x}_{i,j}$:
(i) Set $r=3$.
(ii) Use least-squares regression to fit a linear map $\unicode[STIX]{x1D743}_{lm}(\boldsymbol{x})=\boldsymbol{A}x+\boldsymbol{B}y+\boldsymbol{C}$ using all available reference map values at $(i^{\prime },j^{\prime })$ such that $|i-i^{\prime }|\leqslant r,|j-j^{\prime }|\leqslant r$. Weight each value in the regression according to $\unicode[STIX]{x1D719}_{i,j}-\unicode[STIX]{x1D719}_{i^{\prime },j^{\prime }}$.
(iii) If the linear map is degenerate then increment $r$ and return to Step 2. Otherwise, continue.
(iv) Set $\unicode[STIX]{x1D743}_{i,j}=\unicode[STIX]{x1D743}_{lm}(\boldsymbol{x}_{i,j})$.
This procedure is simpler than the PDE-based methods since it does not require extensive bookkeeping. Since the method uses all available values in a neighbourhood, this repeated averaging results in substantial blurring if the extrapolation is continued far away from the interface. However, here, only values near the interface are required, and the averaging is beneficial, serving to damp out high-frequency modes that could be the source of instability. In Step 3, degeneracies occur only when the available points are colinear, in which case there is insufficient information to determine the linear map. In this case, Step 4 causes the algorithm to retry using more neighbouring points.
The approach described here makes it possible to simulate objects with sharp corners. The reference map is smoothly defined within the object, and using the above procedure allows it to be smoothly extended into the fluid domain from which solid stresses in the blur zone can be computed. The function $\unicode[STIX]{x1D719}_{0}(\unicode[STIX]{x1D743})$ that defines the object boundary need not be smooth itself, and can describe a shape with corners. (The IPS method of Dunne (Reference Dunne2006) has a similar capability to handle corners, although it is based on a harmonic continuation of the solid velocity, which is used to update the solid displacement field $\boldsymbol{u}$, from which the boundary can be located by examining $\boldsymbol{u}-\boldsymbol{x}$.)
3.3 Computation of stress
In order to evaluate the stress divergence terms that appear in (3.2) and (3.7), the stresses are first computed on the edges of each grid cell. The stress term in (3.7) is computed as
where $\unicode[STIX]{x1D749}_{x}=(\unicode[STIX]{x1D70F}_{xx},\unicode[STIX]{x1D70F}_{xy})$ and $\unicode[STIX]{x1D749}_{y}=(\unicode[STIX]{x1D70F}_{xy},\unicode[STIX]{x1D70F}_{yy})$ are the components acting on the vertical and horizontal edges, respectively.
3.3.1 Solid stress
To begin, the components of the Jacobian are computed using the second-order finite-difference formulae
after which the deformation gradient is evaluated as
From here, any constitutive law $\unicode[STIX]{x1D749}_{s}=\boldsymbol{f}(\unicode[STIX]{x1D641})$ could be used to evaluate the deviatoric stress, $\unicode[STIX]{x1D749}_{s}$. In the current work, we employ the plane-strain incompressible neo-Hookean law,
where $G$ is the small-strain shear modulus.
3.3.2 Fluid stress
To evaluate the fluid stress, the gradients of the velocity on vertical edges are computed as
Equivalent stencils are used to compute velocity gradients on horizontal edges, after which the fluid stress is given by
where $\unicode[STIX]{x1D707}_{f}$ is the viscosity. Equation (3.19) is our standard approach for computing the fluid stress. However, we have also investigated a simplified calculation. Since$\unicode[STIX]{x1D735}\boldsymbol{\cdot }\boldsymbol{v}=0$, it follows that in the bulk of the fluid, the second term in (3.19) has zero contribution to $\unicode[STIX]{x1D735}\boldsymbol{\cdot }\unicode[STIX]{x1D749}_{f}$. Hence an alternative formula is
This formula only requires evaluating the simpler stencil in (3.17). However, equation (3.20) is not strictly valid in the blur zone since taking the divergence in (2.8) results in a non-zero contribution from the second term of (3.19).
Once all edge stresses are computed, the divergence is computed using
3.4 Finite-element projection
To solve the Poisson problem in (3.3), we make use of a finite-element formulation. The pressure is comprised of piecewise bilinear elements, and the velocity and density are piecewise constant on the grid cells. For a given pressure element $\unicode[STIX]{x1D713}$ the weak formulation of (3.3) is
where $\unicode[STIX]{x1D6E4}_{1}$ is the section of the boundary where inflow and outflow conditions are prescribed. Consider a particular bilinear element function $\unicode[STIX]{x1D713}$ located at a pressure point $p_{i,j}$ in the bulk of the domain. The first term of (3.22) is
For the constant-density case when $\unicode[STIX]{x0394}t/\unicode[STIX]{x1D70C}$ can be taken out as a prefactor, the second term of (3.22) is
where
The expression in (3.24) can be generalized for the case of non-constant density. Dirichlet conditions on pressure may also be imposed as essential boundary conditions (Johnson Reference Johnson2009). The resultant linear system is solved using the same multigrid library introduced in § 3.1.2 using an error tolerance of $T_{FEM}=\unicode[STIX]{x1D706}_{a}10^{4}\unicode[STIX]{x1D700}_{m}$. In cases where no Dirichlet conditions are used, the pressure field is projected at each step so that it has zero mean.
3.5 Parameter choices and stability
Our test cases involve four physical parameters: solid shear modulus $G$, solid density $\unicode[STIX]{x1D70C}_{s}$, fluid viscosity $\unicode[STIX]{x1D707}_{f}$ and fluid density $\unicode[STIX]{x1D70C}_{f}$. In the solid, the shear wave speed is$c_{s}=\sqrt{G/\unicode[STIX]{x1D70C}_{s}}$. The CFL condition requires that the simulation time step be less than or equal to
In addition, performing a von Neumann stability analysis shows that the time step must be less than or equal to
in order to resolve the viscous fluid stress. Inside the solid, we find that simulating stress using only equation (3.16) results in an instability – this should be expected since we are effectively solving a hyperbolic system using centred finite differences. To rectify this, we incorporate an extra small artificial viscous stress inside the solid. Based on dimensional considerations, the artificial viscosity should satisfy
where $\unicode[STIX]{x1D705}_{e}$ is a dimensionless constant. In addition, we also find that artificial viscosity is useful in the fluid–solid transition region. We therefore define the extra viscous stress as
where $q$ is a dimensionless constant. Based on a variety of tests, we use $q=1$ and $\unicode[STIX]{x1D705}_{e}=0.4$ throughout the paper. Since the purpose of this extra stress is to stabilize the numerical system, we employ the simpler form of fluid stress given in (3.20). Since $\unicode[STIX]{x1D707}_{e}$ scales linearly with grid spacing, and the simpler fluid stress only introduces a discrepancy in the blur zone, any errors that are introduced will reduce to zero as the grid is refined. The corresponding time-step restriction is
With these definitions in place, the simulation time step $\unicode[STIX]{x0394}t$ is chosen to be smaller than the minimum of the three conditions in (3.26), (3.27) and (3.30), so that
Here, $\unicode[STIX]{x1D6FC}_{pad}$ and $\unicode[STIX]{x1D6FD}_{pad}$ are padding factors that are smaller than one. For this paper we use $\unicode[STIX]{x1D6FC}_{pad}=0.4$ and $\unicode[STIX]{x1D6FD}_{pad}=0.8$, so that the restrictions arising from the two physical stresses (I and II) are applied more stringently than the one for the artificial stress (III). Note that in the limit as $h_{x},h_{y}\rightarrow 0$, the artificial viscosity vanishes.
4 Results
Since our purpose is to demonstrate the numerical method as opposed to apply it to a specific problem, we make use of non-dimensionalized quantities for all of the results that we present. To connect the results to reality, the simulation parameters and output can be multiplied by appropriate length, time and mass scales. Our results also focus on the case of equal grid spacing, $h_{x}=h_{y}=h$.
4.1 A spinning flexible rotor
The first example demonstrates our method’s ability to handle sharp solid corners within a non-trivial FSI setting. It consists of a spinning flexible regular seven-pointed star that is centred on the origin and has vertices at $(L\cos (2\unicode[STIX]{x03C0}k/7),L\sin (2\unicode[STIX]{x03C0}k/7))$ for $k\in \mathbb{Z}$, with length scale $L=0.62$, density $\unicode[STIX]{x1D70C}_{s}=3$ and shear modulus $G=24$. The resolution is $800\times 800$, the simulation domain is $[\!-1,1\!)^{2}$ and periodic boundary conditions are used. The fluid and rotor are initially stationary. The region $r=|\boldsymbol{x}|<0.16$ is used as a pivot. To excite the fluid, the pivot is rotated with an oscillatory motion with angle $\unicode[STIX]{x1D703}(t)=\unicode[STIX]{x03C0}(1-\cos t)$. This is done by applying an external tether force to the pivot region of
where $r_{teth}=0.16$ and $\unicode[STIX]{x1D64D}_{\unicode[STIX]{x1D703}(t)}$ is a rotation matrix with angle $\unicode[STIX]{x1D703}(t)$. The spring constant is set to $K_{teth}=10^{-2}\unicode[STIX]{x1D70C}_{s}\unicode[STIX]{x0394}t^{-2}$, which ensures that the natural frequency of the tether satisfies the time-step restriction imposed by the method. The fluid has density $\unicode[STIX]{x1D70C}_{f}=1$ and viscosity $\unicode[STIX]{x1D707}_{f}=10^{-3}$. The r.m.s. angular velocity of the rotor is $\unicode[STIX]{x1D714}_{rms}=\unicode[STIX]{x03C0}/2$, and hence a characteristic tip velocity is $\unicode[STIX]{x1D714}_{rms}L$. Hence, we define the Reynolds number for this simulation as
The simulation was run from $t=0$ to $t=4\unicode[STIX]{x03C0}$ using 16 threads on a Linux computer with dual 10-core 2.2 GHz Intel Xeon E5-2630 processors. For the given parameters, the time step of $\unicode[STIX]{x0394}t=1.105\times 10^{-4}$ was determined by the extra viscous stress in the solid. Simulation output was saved at regular intervals of $\unicode[STIX]{x03C0}/150$. The total wall clock time for the simulation was $6.53$ h. A total of 114 000 time steps were performed, with each taking 206 ms to compute. A substantial fraction of the computation time is spent performing the two linear solves. The MAC projections take on average 13.75 V-cycles and require 43.1 ms per time step. The finite-element projections take on average 11.91 V-cycles and require 48.1 ms per time step.
Snapshots of vorticity $\unicode[STIX]{x1D714}=\frac{1}{2}(\unicode[STIX]{x2202}_{x}v-\unicode[STIX]{x2202}_{y}u)$ in the simulation are shown in figure 3. The vorticity is computed on each grid cell corner, using centred finite differences of the velocities in the four adjoining grid cells. As the star begins to rotate, each point deforms clockwise, and vortices are shed from the points, which are visible at $t=4\unicode[STIX]{x03C0}/15$. By $t=\unicode[STIX]{x03C0}$, the rotor is stationary, and the points are now deformed anti-clockwise due to the angular deceleration. As time progresses, the disturbance to the fluid becomes larger. By $t=2\unicode[STIX]{x03C0}$, the rotational symmetry of the fluid flow is lost, due to interactions across the periodic boundaries, which break the sevenfold symmetry. By $t=4\unicode[STIX]{x03C0}$, after two complete cycles of the oscillatory motion, there are vortices present throughout the fluid. Supplemental Movie 1 available at https://doi.org/10.1017/jfm.2020.353 shows the complete simulation. To visualize the fluid motion, the movie also shows a number of tracers with trajectories $\boldsymbol{x}(t)$. The tracers are initialized at random positions in the fluid and are updated using the ordinary differential equation
where $\boldsymbol{v}_{bic}$ is the bicubic interpolation of the velocity field, and the time integration is performed using the second-order improved Euler method (Süli & Mayers Reference Süli and Mayers2003).
4.2 Flag flapping
Besides numerical convergence, as a test of the robustness of our approach and its accuracy across Reynolds numbers, we consider the example of flag flapping, a problem that has been studied extensively from experimental, numerical and analytical perspectives (Zhang et al. Reference Zhang, Childress, Libchaber and Shelley2000; Watanabe et al. Reference Watanabe, Suzuki, Sugihara and Sueoka2002; Zhu & Peskin Reference Zhu and Peskin2002; Connell & Yue Reference Connell and Yue2007). Following the problem description and notation of Connell & Yue (Reference Connell and Yue2007), we introduce a thin filament of length $L$, thickness $h\ll L$, density $\unicode[STIX]{x1D70C}_{s}$ and Young’s Modulus $E$, clamped at its left endpoint and submerged in fluid of kinematic viscosity $\unicode[STIX]{x1D708}_{f}$ and density $\unicode[STIX]{x1D70C}_{f}$, flowing rightward with speed $V$ at infinity. (For consistency with Connell & Yue (Reference Connell and Yue2007) we fully adhere to their notation. However, we draw attention to the reader that $h$ (filament thickness) has a different meaning than $h$ (grid spacing) used in all other sections. Furthermore, $\unicode[STIX]{x1D707}$ (mass ratio) is distinct from $\unicode[STIX]{x1D707}_{f}$ (dynamic viscosity).) Three dimensionless numbers can be introduced to study the dynamical behaviour of the filament: the mass ratio $\unicode[STIX]{x1D707}=\unicode[STIX]{x1D70C}_{s}h/\unicode[STIX]{x1D70C}_{f}L$, Reynolds number $Re=VL/\unicode[STIX]{x1D708}_{f}$ and non-dimensional bending rigidity $K_{B}=EI/(\unicode[STIX]{x1D70C}_{f}V^{2}L^{3})$. Unlike the previous numerical approaches that consider the filament to be a one-dimensional beam, our method uses a true continuum solid formulation so we can consider cases beyond the thin filament limit, such as a thick flag for which the parameter $h$ does not necessarily satisfy $h\ll L$.
We first seek to determine if our method correctly captures the transition of the filament dynamics from stable to flapping in the limit of a thin filament. We consider a filament with $L=1$, $h=0.05$, $K_{B}=0.001$, in a fluid of density $\unicode[STIX]{x1D70C}_{f}=1$. To set $K_{B}$, we use the fact that in the linear elastic regime $E=3G$, and the moment of inertia is $I=h^{3}/12$. We vary $\unicode[STIX]{x1D70C}_{s}$ and $\unicode[STIX]{x1D708}_{f}$ in order to test a range of $\unicode[STIX]{x1D707}$ and $Re$. The simulation domain is set to be a $[-1,5]\times [\!-1,1\!)$ rectangle with assigned rightward velocity of speed $V=1$ on the left boundary, vanishing pressure on the right boundary and periodic boundary conditions on the top and bottom boundaries. We use a $1824\times 608$ grid to represent the domain. The filament is modelled as a rectangle $0<x<1$, $-h/2<y<h/2$ with semicircular end caps. The filament is anchored at $(0,0)$ using the tethering methodology described in § 4.1, with $\unicode[STIX]{x1D703}(t)=0$ and $r_{teth}=h/4$ in this case. We track the filament tip by introducing a tracer $\boldsymbol{x}(t)$ that starts from $(1,0)$ and is integrated according to (4.3). To prevent integration errors building up over time, the position of the tracer is periodically reset to satisfy $\unicode[STIX]{x1D743}_{bic}(\boldsymbol{x}(t))=(1,0)$ using a Newton–Raphson root-finding method, where $\unicode[STIX]{x1D743}_{bic}$ is the bicubic interpolant of the reference map field. The results of this section are based upon 556 simulations with different parameters that were run on a variety of Linux and Apple servers at Harvard University and the Lawrence Berkeley National Laboratory. Depending on parameters and computer speed, each simulation took approximately 3–12 days using 4–6 threads. Simulations with smaller $Re$ generally take longer, since resolving the fluid viscosity requires a smaller time step.
To systematically evaluate the behaviour of the filament, we store the perpendicular tip deflection $y(t)$ over the interval $t\in [120,160]$. Since the typical filament oscillation period is approximately 1.7, the simulations correspond to almost one hundred complete oscillations, and hence the interval $[120,160]$ is sufficient for the oscillation amplitude to reach a steady state. The normalized Fourier transform is given by
The maximum Fourier amplitude is given by
Typically the oscillation frequency is $2\unicode[STIX]{x03C0}/1.7\approx 4$, and the range of $k$ in (4.5) is chosen to broadly cover the possible values. If $A\approx 0$ the filament is in the stable (no-flapping) regime and otherwise the filament is flapping, with $A$ serving as a scalar measure of the amplitude of the dominant flapping mode. Since our initial conditions are symmetric, the breakage of symmetry occurs due to numerical noise introduced by the multigrid solver, on the scale of the parameters $T_{MAC}$ and $T_{FEM}$ introduced previously. We also investigated explicitly breaking symmetry by applying an initial perturbation to the perpendicular velocity in the filament tip, but the calculations of $A$ were insensitive to this. Connell & Yue (Reference Connell and Yue2007) proposed an analytical formula for the stable-to-flapping transition line
Connell & Yue (Reference Connell and Yue2007) validated this equation numerically using a direct fluid–filament coupling procedure, a procedure that itself was validated against experiments (Zhang et al. Reference Zhang, Childress, Libchaber and Shelley2000; Watanabe et al. Reference Watanabe, Suzuki, Sugihara and Sueoka2002). The above formula is obtained without consideration of certain effects, such as possible variations of tension along the flag and the presence of global lift forces attempting to realign the flag with the flow, although methods to include these phenomena exist in certain limits (Argentina & Mahadevan Reference Argentina and Mahadevan2005). In figure 4 we show the behaviour of $A$ from our numerical simulations together with the analytical phase boundary above. For Reynolds numbers below 1000, there is very good agreement between the locus where $A$ goes non-zero and the analytical curve. When $Re\geqslant 1000$ the transition predicted by the simulation happens at a slightly higher $\unicode[STIX]{x1D707}$ than predicted by (4.6). The most likely explanation for this is that numerical diffusion from the fluid advection effectively increases the fluid viscosity. However, other factors such as the finite domain size, the extensibility of the filament and the non-zero $h$ may also play a role.
The behavioural switch from stable to flapping is also quite evident in the long-time flow fields, shown in figure 5. Small values of $\unicode[STIX]{x1D707}$ and $K_{B}$ result in stable behaviour, characterized by a straight filament and fluid flow that is symmetric about the filament axis (figure 5a). Upon crossing the transition, periodic undulatory filament motions develop with a fluid vortex street shed from the filament (figure 5b). Increasing $Re$ and $\unicode[STIX]{x1D707}$ even further reveals a chaotic filamentary motion, which was also observed by Connell & Yue (Reference Connell and Yue2007) (figure 5c, Supplemental Movie 2). The chaotic regime coincides with a drop in $A$ shown in the top right of figure 4 because the tip deflection no longer has a clear single dominant oscillatory mode. Because the filament is modelled as a thin continuum body of isotropic elastic media as opposed to an inextensible beam, we observe filament extension in the initial moments of the simulation as the imposed fluid flow applies a net rightward traction.
We explore the importance of aspect ratio by introducing $R=h/L$ as an independent dimensionless group. We observe that as one departs from the $R\ll 1$ regime, adherence to (4.6) is diminished. In figure 6 we show results for $R^{-1}=10$ and 5. In general, thick flags have a smaller stable domain than would be predicted by the thin-filament limit. We can explain this effect at least in part with bluff-body dynamics. When $R$ is non-negligible, the thickness of the flag allows the solid geometry to act as a bluff body over which the fluid is driven to flow. Flow over a fixed cylinder of diameter $D$ undergoes a transition from a laminar flow to a periodic vortex street as $DV/\unicode[STIX]{x1D708}_{f}$ grows beyond ${\sim}50$ (Lienhard Reference Lienhard1966). In our case, the flag thickness acts like $D$, and once a vortex street is induced off the bluff back end of the flag, the oscillatory force it induces necessitates flapping. We reiterate that this physical source of oscillatory forcing emerges only when flags are thick enough to act as a bluff body. Consistent with this expectation, when $Vh/\unicode[STIX]{x1D708}_{f}=Re\times R>50$ we see only flapping states for any choice of $\unicode[STIX]{x1D707}$ or $Re$. Figures 7(a) and 7(b) show simulation snapshots of bulky flags with low and high mass ratios, respectively. Simulations of these two cases are shown in Supplemental Movie 3 and Supplemental Movie 4, respectively.
4.3 Tests for a range of elastic modulus
To demonstrate that the method works across a wide range of shear moduli, we consider a piston-like geometry where a flexible paddle is pushed through a fluid-filled cavity. The domain is $-1\leqslant x\leqslant 1$ and $0\leqslant y\leqslant 5$ and no-slip boundary conditions are used on all sides. The grid size is $160\times 400$, the fluid density is $\unicode[STIX]{x1D70C}_{f}=1$, the fluid viscosity is $\unicode[STIX]{x1D707}_{f}=10^{-3}$ and the solid density is $\unicode[STIX]{x1D70C}_{s}=2$.
A rectangular flexible paddle of width 1.6 and height 0.4 is initially centred at $(0,0.4)$. The displacement of the paddle is prescribed in a circular region of radius 0.15 centred on $(0.6,y_{p}(t))$, using the same tethering procedure as in (4.1). The simulation is run for a duration of $T=20$, and the circular region moves vertically according to $y_{p}(t)=0.4+4.2Y(t/T)$ where
Hence, for $0\leqslant t<10$, the paddle is dragged through the fluid, and for $10\leqslant t\leqslant 20$ the circular region is stationary and the paddle equilibrates.
Simulations are run using shear moduli from $G=1$ to $G=10^{7}$, following the standard choices for time step and extra solid viscosity described in the main text. Figure 8 shows a sequence of snapshots of pressure in the simulation with $G=100$. As the paddle is pushed through the cavity, it is bent downward due to the pressure of the fluid. Vortices are shed from the paddle tip, creating regions of low pressure visible at $t=10$ and $t=20$. Figure 9 shows a sequence of snapshots at $t=6.6$ for the full range of shear moduli. For $G=1$ and $G=10$ the paddle deforms so strongly that there is little pressure build-up in the upper part of the domain. However, for $G\geqslant 10^{3}$ the pressure build-up is large, and fluid must push through the thin gaps on either side of the paddle. For $G=10^{7}$, the paddle becomes near rigid, so that the fluid flow becomes almost symmetric even though the paddle’s motion is only prescribed on the right side. In these simulations the time step is set by the limit from the extra solid viscous term (3.30). The total number of time steps scales according to $\sqrt{G}$ and thus the simulation for $G=10^{7}$ takes approximately 3100 times more computational resources than that for $G=1$.
4.4 Solid actuation
The method also admits a simple approach for simulating actuated solids. This feature allows one to assign time-dependent internal deformations to subregions of a solid, which is useful for modelling active media such as swimmers. Unlike the tethering approach used in § 4.1, which assigns the full motion of a region by adding an external body force in that region, here what is done is to add extra internal stresses to achieve a desired shape change in a subdomain, without adding net external force. To actuate a particular (Lagrangian) solid region, $B_{a}$, one writes the desired actuated deformation gradient $\unicode[STIX]{x1D641}_{a}(\boldsymbol{X}\in B_{a},t)$, which can then be equivalently expressed in Eulerian frame as $\unicode[STIX]{x1D641}_{a}(\boldsymbol{X}=\unicode[STIX]{x1D743}_{a}(\boldsymbol{x}\in b_{a},t),t)$ for $b_{a}$ the image of $B_{a}$ in the Eulerian frame. At any point $\boldsymbol{x}\in b_{a}$, the constitutive relation is adjusted by replacing all references to $\unicode[STIX]{x1D641}(\boldsymbol{x},t)$ with $\unicode[STIX]{x1D641}(\boldsymbol{x},t)\unicode[STIX]{x1D641}_{a}(\boldsymbol{x},t)^{-1}$. In an isotropic hyperelastic system, for example, this effectively distorts the region’s rest configuration to the distortional state given by $\unicode[STIX]{x1D641}_{a}$. If at any moment in time a configuration of the actuated domain differs from the intended actuated configuration, a stress given by $\boldsymbol{f}(\unicode[STIX]{x1D641}(\boldsymbol{x},t)\unicode[STIX]{x1D641}_{a}(\boldsymbol{x},t)^{-1})$ emerges that moves the system toward the actuated deformation (where $\boldsymbol{f}$ is defined from (3.16)). One could in principle assign a stiffer response in the actuated domain if a faster conformation is desired, but we have found it to be sufficient to use the same underlying hyperelastic constitutive model in the actuated and passive subregions of the solid. This approach is similar to the multiplicative Kröner–Lee decomposition used in plasticity (Kröner Reference Kröner1960; Lee Reference Lee1969), where a tensorial state variable $\unicode[STIX]{x1D641}_{p}$ is introduced and the elastic deformation gradient, which produces the stress, is given by $\unicode[STIX]{x1D641}\unicode[STIX]{x1D641}_{p}^{-1}$. But unlike $\unicode[STIX]{x1D641}_{p}$, which evolves under a constitutive flow rule, here we assign $\unicode[STIX]{x1D641}_{a}(\boldsymbol{x},t)$ directly.
A similar, albeit reduced-dimensional approach has been used to model muscle contraction in swimming lampreys and other narrow-body swimmers. Tytell et al. (Reference Tytell, Hsu, Williams, Cohen and Fauci2010), simulated a lamprey swimming in a two-dimensional (2-D) geometry. The lamprey is modelled with three connected parallel filaments, the outer two of which obey a one-dimensional viscoelastic model with an additional user-defined contractile stress (McMillen, Williams & Holmes Reference McMillen, Williams and Holmes2008). Actuated bending of the lamprey occurs through asymmetric contraction of the filaments. An alternative approach, as used by Gazzola, Argentina & Mahadevan (Reference Gazzola, Argentina and Mahadevan2015) and Patel, Bhalla & Patankar (Reference Patel, Bhalla and Patankar2018), involves direct assignation of an external bending moment on the swimmer cross-section, which in a stiff limit equates to directly assigning the swimmer shape through time. The approach we describe above could be seen as a 2-D (or potentially 3-D) generalization of approaches like these, permitting possibly more through-thickness spatial variation in actuation. The implementation shown here could be made more realistic by including dissipation within the swimmer, neuro-muscular signalling, and contractile-only forcing as was done by Tytell et al. (Reference Tytell, Hsu, Williams, Cohen and Fauci2010), McMillen et al. (Reference McMillen, Williams and Holmes2008) and Patel et al. (Reference Patel, Bhalla and Patankar2018).
As an example, we consider a flapping swimmer (figure 10, Supplemental Movie 5). The swimmer is a rectangle of width $W=0.5$ and height $H=0.052$ with circular end caps, initially centred on $(0,-0.8)$, which we choose to be the location of the origin. We choose the actuated domain, $B_{a}$, to be a centred subregion within the swimmer, comprising a rectangle of width 0.28 and height 0.042 with circular end caps. The following actuation is applied:
where
and $d$ is the signed distance from the Eulerian boundary of $b_{a}$. By blurring the boundary of the actuated domain under $H_{\unicode[STIX]{x1D700}}(-d)$, it should be noted material positioned up to $\unicode[STIX]{x1D700}$ away from the true boundary of $b_{a}$ will receive some actuation stress. The parameters used in the simulation are $\unicode[STIX]{x1D714}=2\unicode[STIX]{x03C0}/8$, $\unicode[STIX]{x1D700}=2.5h_{x}$, and $\unicode[STIX]{x1D706}=(\log 2.2)/0.021$. Thus the maximum stretch on the top boundary is 2.2. The simulation uses a $1200\times 1200$ grid in $[\!-1.5,1.5\!)^{2}$ with periodic boundary conditions. The densities, dynamic viscosity, and solid shear modulus are $(\unicode[STIX]{x1D70C}_{f},\unicode[STIX]{x1D707}_{f},\unicode[STIX]{x1D70C}_{s},G)=(1,5\times 10^{-4},4,10)$.
By actuating the flapper in this fashion, the Lagrangian domain $B_{a}$, which comprises roughly half the area of the body, is forced to bend periodically in time. The unactuated portion of the swimmer remains passive and flaps as an elastic body in response to be being conjoined to the actuated region. The swimming flapper achieves a Reynolds numbers of $Re=V_{solid}^{max}~W/\unicode[STIX]{x1D708}_{f}\sim 200$. Its ability to translate its centre of mass by swimming evidences that this example is not near zero Reynolds number; vortex shedding can be seen for each flap.
4.5 Multi-body contact
Since the reference map technique does not employ moving meshes, it is particularly well suited to problems involving many objects coming into contact. This capability would be useful for a variety of problems, such as studying colloidal mixtures with soft, deformable particles.
To generalize the method to $N$ objects, we introduce independent reference maps $\unicode[STIX]{x1D743}^{(1)},\unicode[STIX]{x1D743}^{(2)},\ldots ,\unicode[STIX]{x1D743}^{(N)}$ with the ‘$(j)$’ suffix being used to denote any quantity associated with object $j$. For the purposes of exposition, we assume each field is defined as a separate globally defined function that is extrapolated separately, although in reality each reference map only need be defined in a local neighbourhood of each object. Each reference map is updated using (3.1). For a given $\unicode[STIX]{x1D743}^{(j)}$, the solid stress $\unicode[STIX]{x1D749}_{s}^{(j)}$ is computed using the methods of § 3.3.
When two or more objects come together, their blur zones may overlap, and thus it is necessary to generalize the definition of global stress that was given in (2.8). At a given point, define $\unicode[STIX]{x1D706}^{(j)}=1-H_{\unicode[STIX]{x1D700}}(\unicode[STIX]{x1D719}^{(j)})$ to be the solid fraction of object $j$. Then the stress is given by
If only one object is present, this definition exactly matches (2.8). If several objects are present, then they each contribute to the global stress, with the fluid stress filling any unassigned fraction. In rare situations (e.g. three objects meeting at a point) the solid fractions may total more than one. In this case, $\unicode[STIX]{x1D749}$ is taken as a weighted average of the solid stresses, and the fluid stress does not contribute at all. The global density field is defined using the same mixing procedure as in (4.10).
In our tests, we have found that independently updating $N$ reference maps and computing a global stress according to (4.10) is sufficient to perform multi-body simulations. However, since the simulation employs a single globally defined velocity field, it becomes problematic when shapes become very close together, since it is hard for them to separate as they move according to the same underlying velocity. Similar behaviour has been noted in the literature on the immersed boundary method (Lim & Peskin Reference Lim and Peskin2012; Krishnan, Shaqfeh & Iaccarino Reference Krishnan, Shaqfeh and Iaccarino2017), which also employs a single global velocity field for the movement of structures. To rectify this, we introduce a small contact stress (in addition to the stress of (4.10)) when the blur zones of two objects overlap, which penalizes the interfaces from becoming too close together. We first define a contact force function of
Now, consider the stress calculation at an edge that is within the blur zones of two or more solids. Consider a pair of the solids $(i)$ and $(j)$. Using finite differences, compute a unit normal vector
where $\Vert \cdot \Vert _{2}$ denotes the Euclidean norm. The contact stress is defined as
where $\unicode[STIX]{x1D702}=4$ is a dimensionless constant, the $G^{(i)}$ are object-dependent shear moduli, and the $\mathbf{1}$ term is included to make the stress trace free. In the rare case where the edge is within three or more solid blur zones, the calculation is repeated for each pair, and each contribution $\unicode[STIX]{x1D749}_{col}$ is added to the global stress.
These collision stress terms induce forces that push apart objects when they become close. Formulating the collision interaction as an additional stress is advantageous since it immediately ensures that total momentum of the entire simulation is numerically conserved. The method is not sensitive to the exact functional form of $f$ in (4.11). An alternative formulation is to directly use the transition function, $f(\unicode[STIX]{x1D6FC})=1-H_{\unicode[STIX]{x1D700}}(\unicode[STIX]{x1D6FC})$, but we find that the faster growth of the function in (4.11) when $\unicode[STIX]{x1D6FC}$ becomes smaller than $\unicode[STIX]{x1D700}$ yields better results in our test cases.
Figure 11 shows snapshots from a multi-body simulation in a non-periodic box $[-1,1]^{2}$ using a resolution of $1280\times 1280$ with fluid density $\unicode[STIX]{x1D70C}_{f}=1$ and dynamic viscosity $\unicode[STIX]{x1D707}_{f}=10^{-3}$. Forty-two squares with shear modulus $G=2$ and density $\unicode[STIX]{x1D70C}_{s}=3$ are inserted at random positions in the box, with side lengths chosen uniformly over the range $[0.1,0.4]$. Any squares that lie within a distance of $0.1$ of another square are rejected, and are chosen again. At $t=0$, each square is set to initially spin with angular velocity chosen uniformly from the range $[-5,5]$. A gravitational acceleration of $g=1.5$ in the negative $y$ direction is applied, so that the squares sediment at the bottom of the box. The full simulation is shown in Supplemental Movie 6.
A benefit of the reference map technique is that it can handle both neutrally buoyant solids, and solids that are lighter than the surrounding fluid, without any modification. To demonstrate this, we consider a second multi-body example with 75 solids made of rectangles of length 0.44, thickness 0.044 and rounded end caps, all of which are initially vertically aligned. The solid densities are randomly chosen uniformly over the range $[0.4,1.6]$ and a gravitational acceleration of $g=1$ in the negative $y$ direction is applied. A simulation grid of $640\times 1280$ is used on the domain $x\in [-0.75,0.75],y\in [-1.5,1.5]$, the dynamic viscosity is $\unicode[STIX]{x1D707}_{f}=2\times 10^{-3}$, the shear modulus is $G=1.3$, and the fluid density is $\unicode[STIX]{x1D70C}_{f}=1$. Figure 12 shows snapshots of the density, the deviation of pressure from the background gradient due to gravity on the fluid $p^{\prime }=p+\unicode[STIX]{x1D70C}_{f}gy$, and the vorticity at five time points. In the particular random sample chosen, the average rod density is $\bar{\unicode[STIX]{x1D70C}}_{s}\approx 0.904$. Thus the average density in the simulation is slightly lower than $\unicode[STIX]{x1D70C}_{f}$ and hence there is a small positive gradient in $p^{\prime }$ in the $y$ direction at $t=0$. The solids separate into two families, with solids with $\unicode[STIX]{x1D70C}_{s}<\unicode[STIX]{x1D70C}_{f}$ rising to the top of the domain, and solids with $\unicode[STIX]{x1D70C}_{s}>\unicode[STIX]{x1D70C}_{f}$ sinking to the bottom of the domain. While most rods have separated out by $t=40$, it takes a long time for the separation process to fully complete, since several rods are close to neutrally buoyant and the reduced gravity they experience is small. By $t=120$, all rods have completely separated into two families although there is still some residual movement visible. The density field, pressure deviation field, and vorticity field of the full simulation are shown in Supplemental Movie 7, Supplemental Movie 8, and Supplemental Movie 9, respectively.
5 Conclusion
Herein, we have presented a robustly accurate, yet straightforward to implement, reference map technique, which has allowed us to study a variety of FSI problems using a single background grid. It augments the multi-phase fluid framework of Almgren, Bell and coworkers (Bell et al. Reference Bell, Colella and Glaz1989; Puckett et al. Reference Puckett, Almgren, Bell, Marcus and Rider1997; Almgren et al. Reference Almgren, Bell, Colella, Howell and Welcome1998) by allowing general finite-deformation solid models to be coupled directly to a fluid. In doing so, it maintains a number of the advantages of working on a fixed Eulerian grid that are enjoyed in fluid simulation methods. The practicality and usefulness of this approach is demonstrated in various tests. It is shown to capture the flapping phase diagram for thin flags and the transition from thin- to thick-flag behaviours, which highlights the role of new mechanisms to initiate flapping. Additional physics, such as actuation of solids, is straightforward to implement with a user-described actuated deformation gradient. This capability is used to model a swimming object with realistic internal driving. The ability to model objects with sharp corners is typically a challenge in Eulerian approaches, but here it can be done by exploiting the reference map field near the edge of the object. We also present an improved contact algorithm, which we use to simulate situations with many soft interacting objects submerged in a fluid.
There are a number of future directions. One of clearest applications is in biomechanics, with the simulation of systems of many interacting, actuated cells. We also foresee modelling solids beyond hyperelasticity, such as plasticity, thermal material models and growth. These modifications can be done through the inclusion of new state variables in the solid and/or the addition of a heat diffusion equation; there are clear advantages to implementing thermal diffusion in the Eulerian frame. Beyond extensions to three dimensions, there are opportunities to use the approach for dimensionally reduced models such as membranes and shells by restricting the reference map to a lower dimensional set. Regarding contact modelling, the reference map field could be used to instruct formulations for more advanced contact problems, including friction and self-contact. Lastly, it is a major goal to extend the approach to allow for non-persistent material boundary sets, as occurs in fracture. It may be possible to represent crack surfaces through intersecting level set fields and to couple this capability with physical traction–separation relations to generate new surface material as cracks advance.
Acknowledgements
We thank the three anonymous reviewers for constructive feedback on this work. C.H.R. was partially supported by the Applied Mathematics Program of the U.S. DOE Office of Science Advanced Scientific Computing Research under contract number DE-AC02-05CH11231. Y.Y. acknowledges support from the National Science Foundation under Award No. DMS-1620434 and the Class of 1968 Junior Faculty Fellowship from Lehigh University. K.K. acknowledges support from Army Research Office grants W911NF-16-1-0440, W911NF-18-1-0118, and W911NF-19-1-0431.
Declaration of interests
The authors report no conflict of interest.
Supplementary movies
Supplementary movies are available at https://doi.org/10.1017/jfm.2020.353.
Appendix A. Additional numerical details
A.1 Monotonicity-limited derivative
The gradients of the reference map and velocity appearing in (3.5) are computed using the fourth-order monotonicity-limited scheme of Colella (Reference Colella1985). For the derivative of a generic component $a_{i,j}$ in the $x$ direction, finite differences
are introduced, from which the limiting slope is defined as
The second-order limited slope is then
from which the fourth-order monotonicity limited derivative is defined as
The $y$-derivative is evaluated similarly.
A.2 Tangential derivatives
To ensure stability, the tangential derivatives appearing in (3.5) and (3.6) are computed using
where the terms with tildes are computed using a preliminary Godunov upwinding step where stress, pressure and tangential derivatives are neglected (Yu et al. Reference Yu, Sakai and Sethian2003). Extrapolations to a vertical edge from the left are given by
and with extrapolations to the other edges given similarly. On each edge, with the selection procedure of (3.8) is used, with Case A used for $\tilde{\boldsymbol{v}}^{adv}=(\tilde{u} ^{adv},\tilde{v}^{adv})$ and Case B used for $\tilde{\unicode[STIX]{x1D743}}$ and $\tilde{\boldsymbol{v}}$.
Appendix B. Tests of convergence and accuracy
B.1 Overview of the test configurations
To study the accuracy of the numerical method, we performed a convergence test in the periodic domain $[\!-1,1\!)^{2}$ using an initial incompressible velocity field of
where
This velocity field is designed to have features with a variety of length scales. We simulated up to $t=0.5$, used a shear modulus of $G=1$, a fluid density of $\unicode[STIX]{x1D70C}_{f}=1$, and employed the standard choices for extra viscosity and time-step selection. Using the same initial velocity field, we ran tests using (i) fluid only, (ii) solid only, (iii) a circle of radius 0.6 centred on $(-0.1,0)$ and (iv) a square of side length 1.2 centred on $(-0.1,0)$. We examined the effect of viscosity and the fluid/solid density ratio.
The configurations of eight different tests are shown in table 1. In our tests, we also considered two different models for the scaling of the extra viscosity. Our primary tests A–F follow § 3.5 and choose it to scale linearly with the grid size. This procedure is consistent with standard numerical schemes; for example, in the second-order Lax–Wendroff method (Lax & Wendroff Reference Lax and Wendroff1960; LeVeque Reference LeVeque2002) the stabilizing diffusive term scales linearly with the grid spacing. However, we also considered alternative tests C’ and F’, whereby the extra viscosity is viewed as a physical dissipation within the solid and is therefore held constant rather than scaling with the grid spacing. It is chosen based on the $360\times 360$ grid and then held constant for the higher-resolution grids.
Due to the complexity of the governing equations, it is near impossible to write down an analytical solution to compare against for any test configuration. We therefore performed reference simulations using a $5040\times 5040$ grid. For each test, we then ran a suite of coarser simulations using $N\times N$ grids where $N\in \{2520,1680,1260,1008,840,720,630,560,504,420,360\}$ to compare against the reference results. Since each $N$ divides evenly into $5040$, the grid squares of these coarse simulations align with the reference simulations.
We calculated normalized error measures with respect to $L^{q}$ norms
where $A=4$ is the area of the domain, and the ‘ref’ and ‘coa’ subscripts refer to the reference and coarse simulation fields, respectively. The integral is calculated using a direct sum over the field values in the coarser simulation grid. The pressure field is cell cornered, and hence each coarse gridpoint exactly coincides with a reference gridpoint. The velocity field is cell centred, so some coarse gridpoints may not align with a reference gridpoint, in which case the reference value is computed using bilinear interpolation. The errors associated with this interpolation are $O(h^{3})$ and are small compared to the errors to be measured.
Figure 13 shows plots of the difference in velocity fields between the reference simulation and the simulation on the coarsest grid, for six of the convergence tests at $t=0.5$. The colours in the panels are normalized differently, with differences for tests A and C’ being much smaller than those for the other tests that are shown. In the fluid-only test A, the largest errors are present on the diagonal line $x=y$, where the initial vortices are located. Some higher errors are visible on thin curved lines, which is a consequence of the switching between cases in the advection discretization. Test C shows the errors for the solid-only simulation, which are about two orders of magnitude larger than test A. In test C’ where the extra viscosity is held fixed, the additional dissipation allows a closer match to be achieved. Tests D, F and F’ show that the largest errors are all near the fluid–solid interface. Unlike models C and C’, there is limited difference between models F and F’, since the errors near the interface dominate.
B.2 Calculating convergence rates
Figure 14 shows convergence plots for the velocity in the $L^{2}$, $L^{1}$ and $L^{\infty }$ norms, plus the pressure in the $L^{2}$ norm; our discussion focuses on velocity, since the pressure can be viewed as a Lagrange multiplier enforcing the incompressibility constraint. If the method is of order $s$, and the reference solution is treated as exact, then the errors scale according to
for some constant $B$ where $a$ is either $p$ or $\boldsymbol{v}$. However, in reality the reference solution will not be exact. In particular, one could apply Richardson extrapolation (Richardson Reference Richardson1911; Hairer, Nørsett & Wanner Reference Hairer, Nørsett and Wanner1993; Heath Reference Heath2002) and propose that the numerical solution has a Taylor series in $h$, so the leading-order error term is of the form $h^{s}$. Specifically, let $f(h)\in C^{1}(\unicode[STIX]{x1D6FA})$ be a representation of a component ($u$, $v$ or $p$) of the numerical solution computed with grid spacing $h$ so that it agrees with the numerical values at the grid points, and smoothly interpolates between them. Then
for some smooth functions $f_{0},f_{1}\in C^{1}(\unicode[STIX]{x1D6FA})$. Under this assumption the error scales according to
However, for the current method, equation (B 5) is not precisely true, since there are several steps in the numerical method are not Taylor expandable to higher order. The advective terms in the discretization rely on discrete switching between different cases, which manifests as the lines of higher error in tests A and C’ in figure 13. When a grid point leaves the solid, the $\unicode[STIX]{x1D743}$ switches from a time-integrated value to an extrapolated value, causing a small, discrete jump in the field, potentially contributing to errors near the boundary.
From figure 13 it is apparent that most of the errors in the domain are smooth, and regular. We therefore propose a model whereby the simulation domain is split into $\unicode[STIX]{x1D6FA}_{T}$ where the Richardson error model, equation (B 6), is applied, and $\unicode[STIX]{x1D6FA}_{S}$ where the original error model, equation (B 4), is applied. This leads to a three-parameter error model
where $\unicode[STIX]{x1D6FC}\in [0,1]$ is the proportion of the Richardson error correction. Taking the logarithm of (B 7) yields
where $C=\log B\in \mathbb{R}$. Define $X=\log h_{ref}$, and let $(x_{k},y_{k})$ be pairs $(\log h,\log E_{q}^{a}(h))$ for each lower resolution that was considered. Then $s$, $C$ and $\unicode[STIX]{x1D6FC}$ may be determined by solving the constrained nonlinear least squares problem
Equation (B 9) fits all 32 data sets in figure 14 accurately, and the Richardson term correctly captures how most data sets curve downwards. The convergence rates, and proportion of Richardson correction are shown in table 1. The fluid-only tests, A and B, are the most accurate, exhibiting clear second-order convergence across all metrics. Results for the solid-only test C are less accurate with error measures on the scale of $10^{-3}$, and a convergence rate of one is seen across all four metrics in table 1. This is due to the linear scaling of the extra viscosity, which effectively results in changing the physical parameters as the grid spacing changes, approaching the limit of a non-dissipative process as $h\rightarrow 0$. In test C’ where the extra viscosity is held fixed, and the physical parameters remain the same, a convergence rate of two is achieved in the $L^{1}$ and $L^{2}$ norms. Thus second-order accuracy of the solid discretization is achieved, but only for the case where damping is a fixed physical parameter. It remains an open question to find a second-order discretization for a perfectly non-dissipative solid.
The remaining tests, D, E, F and F’ all involve fluid–structure interaction. In the $L^{1}$ and $L^{2}$ norms, the convergence rate is approximately $1.3$ for tests D, E and F, and $1.0$ for test F’. As seen in figure 13 the largest deviations occur at the fluid–structure interface. Since the blur zone is defined in terms of grid points, its width shrinks at higher resolution. This involves altering the underlying equations over a region of size $O(h)$, and results in a lower rate of convergence. However, since the fluid and solid discretizations are independently second order, is likely that an alternative boundary treatment – perhaps using a sharp interface approach (Gibou & Fedkiw Reference Gibou and Fedkiw2005; Francois et al. Reference Francois, Cummins, Dendy, Kothe, Sicilian and Williams2006) – could yield improved results. Test E shows that a fluid–solid density ratio has little effect on the convergence rate. Test D shows that the square geometry does not affect the convergence rate in the $L^{2}$ and $L^{1}$ norms, but results in a lower convergence rate in the $L^{\infty }$ norm due to localized effects at the corners.
Appendix C. Performance tests over a range of resolutions
The simulations that are shown in the main text make use of high resolution to ensure accurate results. Here, we demonstrate that the method can work over a wide range of resolutions, and we examine its performance. We consider a three-pronged object whose boundary is described in polar coordinates by
The simulation domain is $|x|\leqslant 1,|y|\leqslant 1$ and no-slip boundary conditions are used on all sides. An $N\times N$ grid is used. Parameters of $\unicode[STIX]{x1D70C}_{f}=1$, $\unicode[STIX]{x1D70C}_{s}=3$, $\unicode[STIX]{x1D707}_{f}=10^{-2}$, $G=48$ are used, and the simulation duration is $T=4\unicode[STIX]{x03C0}$. The shape is parameterized with $(R,\unicode[STIX]{x1D6FC}_{3},\unicode[STIX]{x1D6FC}_{6})=(0.8,0.5,0.125)$. The shape is rotated via a pivot centred at the origin of radius 0.2, whose angle is set to
following the same pinning method as in (4.1) with a stiffness constant of $K_{teth}=10^{-1}\unicode[STIX]{x1D70C}_{s}\unicode[STIX]{x0394}t^{-2}$. The r.m.s. angular velocity for $T\in [0,2\unicode[STIX]{x03C0}]$ is $\unicode[STIX]{x1D714}_{rms}=\unicode[STIX]{x03C0}/2$, Hence, we define the Reynolds number to be
Figure 15 shows a snapshot of vorticity for six different time points for an intermediate resolution of $N=240$. Since the viscosity is higher by a factor of ten from the example in § 4.1, fewer vortices are visible. Figure 16 shows snapshots at $T=4\unicode[STIX]{x03C0}/3$ for a range of resolutions from $N=20$ to $N=1280$. At lower resolution, the accuracy of the solid deformation and the fluid flow is reduced, but the flow is qualitatively similar, and the simulation runs successfully.
Figure 17(a) shows a comparison of wall clock times for a Linux computer with dual 10-core 2.2 GHz Intel Xeon E5-2630 processors. The total simulation time varies over a large range, from 8.1 s for $N=20$ to 67.7 h for $N=800$ when using a single thread. Using multiple threads creates a substantial speedup, reducing the time for $N=800$ to 20.9 h for four threads and 9.4 h for 16 threads; these times correspond to parallel efficiencies of 80.1 % and 44.9 %, respectively. Some parts of the simulation (e.g. the extrapolation routine) are not threaded, and contribute to this loss of efficiency.
Figure 17(b) shows the time-step restrictions due to the liquid viscosity, the shear wave CFL condition and the extra solid viscosity. For small grid sizes, the time step is set by the extra solid viscosity, but for $n>640$ the fluid viscosity provides the strongest restriction. Because of this, the total work scales like $N^{3}$ for most of the data in figure 17(a), but will eventually transition to $N^{4}$ once the fluid viscosity becomes important.
A large fraction of the computation time is spent solving the two linear systems for the marker-and-cell projection (§ 3.1.2) and the finite-element projection (§ 3.4). These are solved using a C++/OpenMP multigrid library (appendix F). The library works on any grid size, and uses a hierarchy of grids where the grid dimensions are halved at each successive level. On very small grids, it is inefficient to use threads due to the performance overhead of thread initialization. Because of this, the library self-tunes prior to use to determine the grid level at which to enable threading. Figure 17(c) shows the average number of V-cycles that are performed to reach the required error tolerances, showing that there is limited variation as $N$ changes. Figure 17(d) shows the time required to perform a V-cycle as a function of $N$. As expected the single-threaded times scale like $N^{2}$, proportional to the degrees of freedom. For $N\leqslant 100$ the time for 16 threads is similar to the single-threaded performance, since the grids are not large enough for threading to be enabled. However, for large grids, threading results in more than a $10\times$ speedup. Across all simulation sizes and thread numbers, the MAC and finite-element linear systems each take between 20 %–30 % of the total computation time.
Appendix D. Effect of the blur zone
As described in § 2, the numerical method uses a transition region of width $2\unicode[STIX]{x1D700}$ to blur between the fluid and solid stresses at an interface. The form of the blurring function is given by (2.9) based on previous studies (Sussman et al. Reference Sussman, Smereka and Osher1994, Reference Sussman, Almgren, Bell, Colella, Howell and Welcome1999; Yu et al. Reference Yu, Sakai and Sethian2003, Reference Yu, Sakai and Sethian2007), and throughout the paper we use $\unicode[STIX]{x1D700}=2.5h$. Here, we explore the effect of the blur zone width, by running the three-pronged rotor of appendix C using different values of $\unicode[STIX]{x1D700}$.
Figure 18 shows close-ups of the vorticity field for four different values of $\unicode[STIX]{x1D700}$ at $t=2\unicode[STIX]{x03C0}$. At this time point, the clockwise motion of the rotor is arrested, which causes momentarily large shear stresses. If $\unicode[STIX]{x1D700}=0$, so that there is a hard transition between fluid and solid stress, then this creates numerical noise in the vorticity field near the interfaces. Since vorticity is based on first derivatives, the variations in the underlying velocity field are smaller. In these simulations the tethering force (4.1) is also smoothed using the same value of $\unicode[STIX]{x1D700}$, and hence numerical noise is also visible at the edge of the pivot region. Despite the noise, the simulation with $\unicode[STIX]{x1D700}=0$ runs adequately. As $\unicode[STIX]{x1D700}$ increases the noise at the interface is progressively blurred out. Figure 19(a) shows a plot of the maximum vorticity field in the simulation over time for differing values of blur zone width, highlighting the trade-off between additional noise for small $\unicode[STIX]{x1D700}$, and excessive blurring for large $\unicode[STIX]{x1D700}$. Our default value of $2.5h$ is an acceptable compromise between the two limits.
The precise form of smoothed delta and Heaviside functions has been studied in the literature, and we also considered the delta function studied by Tornberg & Engquist (Reference Tornberg and Engquist2003, Reference Tornberg and Engquist2004) where
Equation (D 1) satisfies several discrete moment conditions (Beyer & LeVeque Reference Beyer and LeVeque1992) and has better convergence properties for some problems. We calculated an associated Heaviside function using integration, and ran a variant of convergence test F from appendix B. The measured convergence exponents are within $\pm 0.03$ of the original test. Hence, for the current method, errors at the boundary are dominated by other processes, such as extrapolation. Designing better smoothing and extrapolation is an interesting avenue for further study.
Appendix E. Volume conservation
Since the reference map field represents an incompressible solid, the determinant of the deformation gradient $J=\det \unicode[STIX]{x1D641}$ should remain equal to unity throughout the simulation, but in the numerical scheme this property will only be maintained approximately. This issue is encountered in other incompressible fluid–structure interaction approaches, such as the immersed boundary method where the Lagrangian description of the solid is updated from the fluid velocity and may experience volumetric changes over time (Wang, Zhang & Liu Reference Wang, Zhang and Liu2009; Griffith Reference Griffith2012; Vadala-Roth et al. Reference Vadala-Roth, Acharya, Patankar, Rossi and Griffith2020).
To investigate the magnitude of volumetric deviations, we simulate the three-pronged rotor of appendix C and compute the field $J-1$. The field is evaluated on all cell corners in the interior of the solid, where the bilinear interpolation of $\unicode[STIX]{x1D719}$ is negative. Calculating $J$ requires the gradient of the reference map, which is computed at each cell corner using centred finite differences of the four adjoining cell-centred reference map fields, some of which may be based on extrapolation.
Figure 20 shows snapshots of $J-1$ for several simulation configurations. The top row shows three snapshots on a $240\times 240$ grid. Small volumetric deviations of the order of $10^{-2}$ are visible and are concentrated near the fluid–solid interface, and at the edge of the pivot region. Figure 19(b) shows a plot of $\Vert J-1\Vert _{2}$ as a function of time. The volumetric deviations grow rapidly up to $t=\unicode[STIX]{x03C0}/4$ but then remain relatively stable; in particular, for $t>2\unicode[STIX]{x03C0}$ when the pivot stops rotating, $\Vert J-1\Vert _{2}$ tends to a constant value. The volumetric deviations have the expected dependence on resolution: as shown in figures 19 and 20 the errors are larger for $N=160$ and smaller for $N=640$. The values of $\Vert J-1\Vert _{2}$ at $t=4\unicode[STIX]{x03C0}$ scale approximately like $h^{1.1}$, consistent with the convergence rates in table 1. We find that the MAC projection substantially improves the volume conservation of the reference map: switching off the projection results in larger deviations overall, plus a tendency for them to grow once the pivot stops rotating (figure 19). This can cause considerable errors near the pivot, as shown in the bottom right panel of figure 20.
Appendix F. Computer code
All results in this paper were created using a custom C++ code that uses OpenMP for multithreading. The code is released as an open source software package, IncRMT, via a GitHub repository at https://github.com/chr1shr/incrmt. As discussed in appendix C, a large fraction of the computation time is spent solving the MAC projection and finite-element projection to enforce incompressibility. This is done using the Templated Geometric Multigrid library, which is available on GitHub at https://github.com/chr1shr/tgmg.