1 Introduction

Numerical simulations of unbounded flows typically resort to truncated domains that represent only a finite portion of the open flow field. Such domain truncation is implemented through the introduction of an artificial boundary at a chosen spatial truncation threshold, which must be carefully selected to appropriately balance model accuracy in the region(s) of interest with the corresponding computational cost. Nonetheless, flow disturbances necessarily interact with these synthetic boundaries as they traverse them, leading to unphysical scattering effects that may contaminate the interior resolved flow with numerical artifacts if the truncation is too severe or if the enforced artificial BC are not well-matched to the characteristics of the unconfined flow [1, 2]. Such considerations are important in computational approximations of any open flow, but are particularly relevant when real or apparent body forces may interact with the flow disturbances. For example, in swirling flows, the characteristics of hydrodynamic waves mediated by the apparent Coriolis and centrifugal forces lead to interference effects and complex dispersion behavior [3]. Because of this, matching flow characteristics and minimizing feedback along artificial boundaries in swirling flows is not trivial.

The groundwork for addressing these challenges was laid out in the seminal study of Ruith et al. [4], who applied the classical one-dimensional radiative BC for hyperbolic systems [5] (analogous to the so-called “non-reflecting” BC from aeroacoustics [6]) to low and high entrainment swirling flow fields. The resulting condition, which will hereafter be referred to as the convective BC, enforces the following relation along the boundary,

$$\begin{aligned} \frac{\partial \varvec{u}}{\partial t}+C\varvec{n}\varvec{\cdot }\varvec{\nabla }\varvec{u}=0, \end{aligned}$$
(1)

where \(\varvec{u}\left( \varvec{x},t\right) =\left[ u_x,u_r,u_\theta \right] ^\textrm{T}\) is the velocity vector (here, in cylindrical coordinates), \(C(\varvec{x})\) is an assumed wave propagation speed function that may vary along the boundary, and \(\varvec{n}\) is the outward normal unit vector along the boundary. The convective BC supposes a locally-hyperbolic, one-dimensional disturbance propagation near the boundary, which neglects certain dispersive characteristics of flow perturbations and is incompatible with large amplitude disturbances or irregular near-boundary flow profiles [5]. The crux of Eq. (1) is selecting a definition for C that approximates a passive convection condition and so minimizes unphysical wave reflections at the artificial boundary (see [7] Ch. 4 for a thorough overview of this issue). In general, this selection process is nontrivial and expensive, as any choice may only be validated a posteriori. However, Eq. (1) loses its dependence on C when \(\partial \varvec{u}/\partial t\rightarrow 0\), thereby reducing to a Neumann condition for each velocity component. Hence, for the laminar Grabowski–Berger vortex flows investigated by Ruith et al. [4, 8], the very low oscillation amplitudes and nearly one-dimensional parallel flow along their artificial boundary rendered their results insensitive to any particular choice of C, skirting a key challenge of the convective BC. Consequently, the convective BC has been applied in several subsequent studies involving laminar swirling flows [9,10,11,12].

A popular, parameter-free alternative to the convective BC is the free outflow BC, which arises naturally in weak (integral) formulations of the incompressible Navier–Stokes equations. While the convective BC seeks passivity by directly modeling a free advection condition, the free outflow condition seeks passivity indirectly by neutralizing normal stress terms in the momentum equation that would interfere with free advection. For Newtonian flows, the free outflow BC corresponds to the Neumann-like requirement that,

$$\begin{aligned} \mu \varvec{n}\varvec{\cdot }\varvec{\nabla }\varvec{u}-\varvec{n}p=0. \end{aligned}$$
(2)

where \(\mu \) is the dynamic viscosity and p is the gauge pressure. Note that, as discussed by Gresho et al. [13], the free outflow BC (2) is distinct from the more restrictive and less transparent traction-free BC (often called the stress-free BC), which requires all fluid traction components to vanish along the boundary. In contrast, Eq. (2) only neutralizes the normal traction component, while respecting the important continuity of shear traction arising from gradients of the normal velocity [14, 15]. Nonetheless, satisfying Eq. (2) along the boundary does not necessarily approximate a passive condition when real or apparent body forces are present. As will be emphasized in this paper, inhomogeneities such as centrifugal or Coriolis forces can induce physical normal stress gradients, which are not accounted for in the free outflow BC. In these cases, the free outflow BC manifests unphysical velocity gradients in order to satisfy the vanishing normal traction constraint. Despite this, the free outflow BC has seen productive use in the swirling flow literature [16,17,18].

Due to the shortcomings of both artificial BC reviewed above, it is often necessary to complement truncation with external sponge layers in order to regularize the outgoing flow and damp backscattered disturbances. In the sponge region, fictitious dissipative sink terms are introduced to avoid ill-posedness and ensure that the properties of the exiting flow more closely satisfy the approximations of the chosen artificial BC [e.g. [16, 19]]. Sponge layers help to circumvent the aforementioned issues associated with domain truncation and artificial BC in exchange for (1) increased computational overhead due to the appended unphysical portion of space that must be simulated and (2) nontrivial heuristic design considerations required to ensure that the specified sponge parameters and the choice of artificial BC do not contaminate the resolved portion of the flow.

Recently, a variant of the free outflow BC (Eq. (2)), designed to compensate for centrifugal pseudo-forces in swirling flows without requiring additional treatment, was proposed in [20]. This modified BC may be written as,

$$\begin{aligned} \mu \varvec{n}\varvec{\cdot }\varvec{\nabla }\varvec{u}-\varvec{n}\left( p-p_o\right) =0, \end{aligned}$$
(3)

where \(p-p_o=\tilde{p}\) is the modified gauge pressure and \(p_o(r,t)\) is a scalar potential defined only along the open boundary that characterizes the local axisymmetric centrifugal pressure variations via the relation,

$$\begin{aligned} \varvec{\nabla }p_o=\frac{d p_o}{d r}=\frac{\rho u_\theta ^2}{r}. \end{aligned}$$
(4)

Here, \(\rho \) is the fluid density, \(u_\theta \) is the azimuthal component of the velocity in cylindrical coordinates, and r is the radial coordinate from the center of rotation. Equation (4), derived from Stokes’ theorem for the irrotational vector field \(\varvec{\nabla }p_o\), amounts to a radial equilibrium condition for the centrifugal component of the hydrostatic stress along the open boundary. A unique solution to Eq. (4) is then identified by setting \(\tilde{p}=p\) (i.e. \(p_o=0\)) at the outermost point in r. For axisymmetric flow, Eq. (3) exactly compensates the centrifugal pressure gradient experienced by a rotating fluid element as it crosses an open boundary that is single-valued in r. On the other hand, if the flow is three-dimensional, Eq. (3) is significantly constrained by the requirement that \(p_o\) both (i) is a scalar potential and (ii) satisfies Eq. (4). This prevents the modified outflow BC from fully compensating the centrifugal pressure gradient, and it totally neglects the influence of any other real or apparent forces. In particular, the modified outflow BC does not mitigate the influence of the Coriolis force, raising issues when inertial wave scattering is of concern. Equation (4) also cannot be correctly applied in many geometries since the scalar potential argument requires the open boundary to be axisymmetric and single-valued in r. These deficiencies will be addressed by the generalization of Eq. (3) developed and analyzed in this paper.

To review, the definition of physically-consistent synthetic boundary treatments in open flows is an important issue that crucially affects computational accuracy and cost. Such issues are exacerbated in swirling flows due to the action of physical pressure gradients along the artificial boundary stemming from centrifugal and Coriolis pseudo-forces. The present paper contributes to this area by generalizing (3) to allow for arbitrary geometries and generic body (pseudo-)forces in Sect. 2 and demonstrating that this “balanced outflow BC” is more passive in comparison to other BC for open swirling flows in Sect. 3. Finally, Sect. 4 summarizes the contributions of this work and provides perspectives for further research.

2 Formulation of the balanced outflow boundary condition

The main contribution of this article is a new variant of the free outflow BC that intrinsically counteracts pressure scattering from generic body (pseudo-)forces along truncated boundaries without additional numerical parameters. Unlike the axisymmetric condition (3) proposed in [20], this “balanced outflow BC” compensates for three-dimensional hydrostatic stresses and is not restricted to boundaries that are single-valued in the radial coordinate. Generalizing Eq. (3), this condition may be written as,

$$\begin{aligned} \mu \varvec{n}\varvec{\cdot }\varvec{\nabla }\varvec{u}-\varvec{n}\left( p-\phi _o\right) =0, \end{aligned}$$
(5)

where \(p-\phi _o=\tilde{p}\) is the modified gauge pressure and the quantity \(\phi _o(\varvec{x},t)\) is supported only along the artificial boundary, where it describes the local hydrostatic stress induced by real or apparent body forces (e.g. centrifugal and Coriolis forces in the case of swirling flows) along the boundary. These contributions are identified using the equilibrium force balance,

$$\begin{aligned} \varvec{\nabla }\varvec{\cdot }\varvec{\sigma }_o=\varvec{f}_o, \end{aligned}$$
(6)

where \(\varvec{f}_o\) represents the body (pseudo-)force vector along the open boundary. For example, in unforced swirling flow, centrifugal and Coriolis terms act along the radial and azimuthal directions, respectively, yielding the apparent force,

$$\begin{aligned} \varvec{f}=-\frac{\rho u_\theta ^2}{r}\varvec{e}_r+\frac{\rho u_ru_\theta }{r}\varvec{e}_\theta , \end{aligned}$$
(7)

where \(\varvec{e}_i\) is the unit vector along direction i.

In Eq. (6), the tensor \(\varvec{\sigma }_o\) represents an unknown physical stress generated explicitly by body (pseudo-)forces on the artificial boundary, such that \(\phi _o={{\,\textrm{Tr}\,}}\left( \varvec{\sigma }_o\right) \) is the first invariant. A (non-unique) solution to Eq. (6) may be found by setting \(\varvec{\sigma }_o=\frac{1}{2}\left( \varvec{\nabla }\varvec{w}_o+\left( \varvec{\nabla }\varvec{w}_o\right) ^\textrm{T}\right) \) where \(\varvec{w}_o=\left[ w_{x},w_{r},w_{\theta }\right] _o^\textrm{T}\) is some vector defined only along the open boundary. Note that \(\varvec{\sigma }_o\) and \(\varvec{w}_o\) are only introduced formally; they are never actually constructed and do not appear in the final constraint. Further, since Eq. (5) only requires the trace of \(\varvec{\sigma }_o\), this symmetric definition for \(\varvec{\sigma }_o\) is taken without loss of generality in the final constraint, as any non-symmetric rank-2 tensor can be expanded as the sum of a symmetric tensor and a skew symmetric tensor with zero trace. Substituting this expression for \(\varvec{\sigma }_o\) into Eq. (6) and applying appropriate vector identities yields the following elliptic equation for \(\varvec{w}_o\),

$$\begin{aligned} \varvec{\nabla }\left( \varvec{\nabla }\varvec{\cdot }\varvec{w}_o\right) -\frac{1}{2}\varvec{\nabla }\times \left( \varvec{\nabla }\times \varvec{w}_o\right) =\varvec{f}_o. \end{aligned}$$
(8)

Then, taking the divergence of Eq. (8) to find the projection onto the mean normal stress (i.e. the pressure) along the boundary returns a Poisson equation for \(\phi _o=\varvec{\nabla }\varvec{\cdot }\varvec{w}_o\),

$$\begin{aligned} \nabla ^2\phi _o=\varvec{\nabla }\varvec{\cdot }\varvec{f}_o. \end{aligned}$$
(9)

It should be noted that \(\phi _o\) is independent of any rotational stresses induced by \(\varvec{f}_o\) since these do not affect the hydrostatic stress distribution and therefore do not directly contribute to pressure scattering effects. To uniquely define \(\phi _o\) and enforce a consistent reference for the modified gauge pressure \(\tilde{p}\), Eq. (9) is complemented by appropriate BC along the outer edge of the artificial boundary. For the axisymmetric case, such BC correspond to a homogeneous Dirichlet constraint imposed at the point where the artificial boundary meets the physical boundary. Likewise, for the three-dimensional case, the BC on \(\phi _o\) are enforced along the curve where the artificial and physical boundary surfaces intersect.

By solving Eq. (9), the equilibrium hydrostatic stresses arising from generic body (pseudo-)forces may be incorporated into the normal stress balance along the open boundary via Eq. (5). Hence, in the case of swirling flow with \(\varvec{f}_o\) is given by Eq. (7), Eq. (4) corresponds to a radial equilibrium condition for \(p_o\), while Eq. (9) corresponds to a radial and azimuthal equilibrium condition (or, as it is known in the rotating flows community, a geostrophic condition) for \(\phi _o\). Note that, unlike \(p_o\), which can vary only along r and t according to Eq. (4), \(\phi _o\) can vary freely in three spatial dimensions and time according to Eq. (9) along the artificial boundary surface. However, if the flow is also axisymmetric and the artificial boundary shape is compatible, Eq. (3) is an equivalent special case of Eq. (5), and Eq. (4) may be derived from Eq. (8).

Finally, it is worth highlighting that this approach of balancing the free outflow condition in order to account for hydrostatic inhomogeneities due to body (pseudo-)forces is not particular to swirling flows. The same approach can be applied to a diverse range of physical situations where open boundaries are present. For example, the \(\varvec{f}_o\) on the right-hand side of Eq. (9) can be replaced with expressions associated with buoyancy, electrical, magnetic, or other forces to properly balance the resulting hydrostatic inhomogeneities.

3 Analysis and numerical examples

In the following, example calculations are performed to assess the performance of the balanced outflow BC (Eq. (5)) in comparison to other open BCs. Two canonical configurations are considered: Poiseuille flow in a rotating pipe (Sect. 3.1) and the Grabowski-Berger vortex (Sect. 3.2). For simplicity, this work considers constant-density, Newtonian swirling flows governed by the dimensionless unforced Navier–Stokes equations,

$$\begin{aligned} \frac{\partial \varvec{u}}{\partial t}+\varvec{u}\varvec{\cdot }\varvec{\nabla }\varvec{u}=-\varvec{\nabla }p+\frac{1}{Re}\varvec{\nabla }^2\varvec{u},\qquad \varvec{\nabla }\varvec{\cdot }\varvec{u}=0, \end{aligned}$$
(10)

where Re is the Reynolds number. In the analysis and each example, all walls are treated with Dirichlet no-slip BCs, the domain inlet is treated with specified Dirichlet inflow BCs, and the central axis is treated with three-dimensional symmetry BCs [21, Ch. 18]. The artificial boundary, termed the “open” boundary, is treated in separate cases using different BCs, whose accuracy and performance are then compared. These include the convective BC (Eq. (1)), the free outflow BC (Eq. (2)), the modified outflow BC (Eq. (3)), and the balanced outflow BC (Eq. (5)) proposed in Sect. 2. Note that, in this paper and related literature, the term “outflow” BC is often used to describe conditions that support a passive exchange of mass and momentum across artificially truncated boundaries whether or not this exchange actually features a substantial outward mass flux.

The solution approach for Eq. (10) is more straightforward when the equations are written in their state-space form,

$$\begin{aligned} \mathcal {M}\frac{\partial \varvec{q}}{\partial t}+\mathcal {R}\left( \varvec{q}\right) =0, \end{aligned}$$
(11)

where \(\mathcal {M}\) is the mass operator, \(\mathcal {R}\) is the steady residual operator, and \(\varvec{q}=[\varvec{u},p,\phi _o]^\textrm{T}\) is the state vector with the balanced outflow BC (with free outflow BC or convective BC, \(\phi _o\) is omitted from \(\varvec{q}\) or, for the modified outflow BC, replaced with \(p_o\)). Hence, to solve Eq. (11) in the steady regime, a Newton iteration technique is used to find the equilibrium solution \(\varvec{q}\) that satisfies,

$$\begin{aligned} \mathcal {R}\left( \varvec{q}\right) =0. \end{aligned}$$
(12)

Since this paper considers axisymmetric flow geometries, the most elementary (i.e. “base”) solutions are axisymmetric states that satisfy \(\mathcal {R}_0\left( \varvec{q}\right) =0\), where the subscript indicates a restriction of the 3-D operator to its axisymmetric (zero azimuthal wavenumber) Fourier component. Finding such base states consists of iteratively solving the linear system,

$$\begin{aligned} \mathcal {J}_0\left( \varvec{q}\right) \delta \varvec{q}=\mathcal {R}_0\left( \varvec{q}\right) , \end{aligned}$$
(13)

and then updating the state vector as \(\varvec{q}\leftarrow \varvec{q}-\delta \varvec{q}\) until the \(L_2\) norm of \(\mathcal {R}_0\) converges within a tolerance of \(10^{-12}\). Here, \(\mathcal {J}_m=\partial \mathcal {R}(\varvec{q})/\partial \varvec{q}_m\) is the Jacobian operator for the Fourier component with azimuthal wavenumber m. Since the definitions of the operators \(\mathcal {R}\) and \(\mathcal {J}\) include the BC of each particular case outlined above, the differences among the base states for different BC indicate how the BC influence the solutions in a time-independent manner.

To study the linear dynamics of unsteady, three-dimensional perturbations to these axisymmetric base states, this study adopts global stability analysis. This approach considers the time-asymptotic evolution of infinitesimal disturbances of the form,

$$\begin{aligned} \varvec{q}'\left( x,r,\theta ,t\right) \propto \text{ Re }\left\{ \varvec{\hat{q}}_m\left( x,r\right) \exp \left[ \left( \sigma +\textrm{i}\omega \right) t+\textrm{i}m\theta \right] \right\} , \end{aligned}$$
(14)

where \(\sigma \) is the growth/decay rate, \(\omega \) is the pulsation frequency, and m is the azimuthal wavenumber. Such disturbances represent eigenvectors of the generalized global eigenvalue problem,

$$\begin{aligned} \lambda \mathcal {M}\varvec{\hat{q}}_m+\mathcal {J}_m\left( \varvec{q}\right) \varvec{\hat{q}}_m=0, \end{aligned}$$
(15)

where \(\lambda =\left( \sigma +\textrm{i}\omega \right) \) is the eigenvalue. In case \(\sigma >0\), the flow is linearly unstable and spontaneously self-excites intrinsic dynamics. Conversely, if \(\sigma <0\), the flow is linearly stable and responds to extrinsic excitation as a passive noise amplifier. Thus, changing BCs leads to corresponding changes in the linear dynamics that directly expose how the BCs influence the structure, growth rate, and frequency of the dominant perturbation.

In the examples, the open-source finite element software package FreeFEM (v4.14) [22] is used to triangulate each example geometry and project a weak formulation of the continuous problem onto Taylor–Hood \(\mathbb {P}2\)\(\mathbb {P}1\) finite elements. Cylindrical coordinates are adopted with the metric singularity at \(r=0\) eliminated after multiplication by r and the incorporation of 3-D symmetry constraints along the axis. In the interest of reproducibility, a simple standalone FreeFEM script that can replicate the results of Sect. 3.1 is included in the Supplementary Material, and the full source code used to produce this work is openly available in the ff-bifbox repository at https://github.com/cmd8/ff-bifbox/. Further details about the solution approach and its implementation in FreeFEM may be found there, as well as in earlier studies [20, 23, 24].

3.1 Example 1: Poiseuille flow in a rotating pipe

The pressure-driven flow in a rotating pipe is a useful first example because the analytical solution, which consists of a parallel axisymmetric flow featuring a parabolic axial velocity profile and a superposed azimuthal solid body vortex, can be compared directly against numerical results. It also provides a concrete illustration of the main issue with the free outflow BC in swirling flow as well as the benefits of the alternatives. The present case adopts length and velocity scales equal to the pipe diameter and the volume-averaged velocity through the pipe and parameterizes the tangential velocity of the pipe wall by S. This yields the analytical solution,

$$\begin{aligned} \varvec{U}(r)=\left[ U_x(r),U_r(r),U_\theta (r)\right] ^\textrm{T}=\left[ 2(1-4r^2),0,2Sr\right] ^\textrm{T}, \end{aligned}$$
(16)

where the accompanying analytical pressure gradient is \(\varvec{\nabla }P=-32Re^{-1}\varvec{e}_x+4S^2r\varvec{e}_r\). Example numerical results are obtained at \(Re=1000\) for a truncated pipe of length \(L=1\) over the parameter range \(0\le S\le 2\). The meridional plane of the flow domain is meshed onto a uniform grid with \(101\times 51\) vertices distributed uniformly in the radial and axial directions, respectively, and the inflow BC and initial conditions are set to the analytical solution. While the results are not qualitatively sensitive to the specified parameters, the interested reader can explore other parameter conditions using the FreeFEM script provided in the Supplementary Material. Note that, since this example focuses exclusively on steady axisymmetric states, the convective BC is independent of C in Eq. (1), and the modified outflow BC (3) is equivalent to the balanced outflow BC (5).

Fig. 1
figure 1

Results for the steady axisymmetric flow in a rotating pipe as obtained with each of the examined artificial BC applied along the artificial downstream boundary \(\Gamma _o\). Note that, due to axisymmetry, the results obtained with the balanced outflow BC (5) and the modified outflow BC (3) are equivalent

Steady numerical solutions are computed using the Newton iteration routine described by Eq. (13). The resulting outlet velocity profiles obtained with each BC are presented in Fig. 1 at \(S=0\) and \(S=2\) alongside a plot of S against the integrated absolute velocity error along the open boundary. The results indicate that the free outflow BC (2) substantially underperforms the other BCs in terms of accuracy. As noted in the Introduction, this occurs because this BC explicitly links the normal gradient of the axial velocity to the pressure inhomogeneity along the open boundary. More specifically, the analytical solution (16) cannot satisfy the x-component of Eq. (2) along a streamwise boundary when \(S\ne 0\) because

$$\begin{aligned} \frac{\partial U_x}{\partial x}-P=(0)-\left( 2\,S^2r^2-\frac{2\,S^2}{3}\right) \ne 0, \end{aligned}$$

where the constant of integration for P ensures a consistent zero-average reference for the gauge pressure over the open boundary. Therefore, in a scenario where nonzero swirl induces a centrifugal pressure gradient along the open boundary, the free outflow condition generates unphysical flow gradients along the outlet to balance the pressure variation, as shown in Fig. 1.

This phenomenon is not an issue for the convective BC (Eq. (1)), which is independent of the pressure and reduces to a simple Neumann constraint on each velocity component in the steady case. The compatibility of Eq. (1) with the analytical solution in this case can easily be verified since \(\varvec{n}\varvec{\cdot }\varvec{\nabla }\varvec{U}=\partial \varvec{U}(r)/\partial x=\varvec{0}\). Likewise, the balanced outflow BC (Eq. (5)) is analytically valid because it intrinsically compensates for the induced pressure gradients through the definition of \(\phi _o\). Since Eq. (9) gives \(\nabla ^2\phi _o=-4S^2\) for \(\varvec{f}_o\) determined by substituting the analytical solution (16) into Eq. (7), the x-component of Eq. (5) yields,

$$\begin{aligned}&\frac{\partial U_x}{\partial x}-(P-\phi _o)=(0)-\left[ \left( 2S^2r^2\right) -\left( 2S^2r^2-\frac{S^2}{2}\right) -\frac{S^2}{2}\right] =0, \end{aligned}$$

where the constant of integration for \(\tilde{p}\) ensures a consistent zero-average reference for the modified gauge pressure over the open boundary. Results for the modified outflow BC (3) are equivalent to the balanced outflow BC (5) for this axisymmetric case and may be similarly analyzed since Eq. (4) yields \(dp_o/dr=-4S^2r\), implying \(p_o=\phi _o\).

Regarding computational effort, there are no significant differences among the considered BCs. A marginal (0.1%) increase in problem size relative to the free outflow BC is noted for the balanced outflow BC (and modified outflow BC) due to the extra degrees of freedom added for \(\phi _o\) along the open boundary. The convective BC, which does not involve p, also has one additional degree of freedom representing an integral constraint that is added to uniquely define the pressure. The reader is referred to the FreeFEM script in the Supplementary Material for more information on these details.

3.2 Example 2: Grabowski–Berger vortex

The Grabowski–Berger vortex [25] is a canonical swirling flow model within the vortex breakdown literature [e.g. [8, 9, 16, 26]] and was used as a benchmark case for evaluating open BC in swirling flows by Ruith et al. [4]. It consists of a uniform axial flow with a superposed vortex core imposed at an upstream boundary that is then free to evolve within a theoretically semi-infinite domain. The lack of physical radial confinement is a significant difference from Example 1, as vortex flows are notoriously sensitive to radial confinement [4, 24, 27].

The Grabowski–Berger vortex profile may be expressed as,

$$\begin{aligned} \varvec{U}(r)&=\left[ U_x(r),U_r(r),U_\theta (r)\right] ^\textrm{T}=\left[ 1,0,\left. {\left\{ \begin{array}{ll} Sr\left( 2-r^2\right) ,&{} r\le 1 \\ S/r,&{} r>1 \end{array}\right. }\right\} \right] ^\textrm{T}, \end{aligned}$$
(17)

where S is a dimensionless swirl parameter. This profile is used as the inflow BC and also set as the initial condition throughout the flow domain for a fixed Reynolds number of \(Re=200\) and various S values. Solutions are obtained on a nonuniform computational mesh with \(2\times 10^5\) elements covering the region \(0\le x\le 30\) and \(0\le r\le 10\) and concentrated close to the central axis. Hence, the semi-infinite region is truncated to a finite cylindrical volume with an artificial BC along the outer radial and downstream axial boundaries.

Below, the performance of the considered BCs will be investigated in two different contexts. The first mirrors the nonlinear axisymmetric steady state analysis of the confined pipe flow in Sect. 3.1 for the radially unconfined Grabowski–Berger vortex flow. Then, the linear stability of the non-parallel steady axisymmetric state is considered for three-dimensional perturbations. As noted in the introduction, the laminar Grabowski–Berger vortex is a favorable case study for the convective BC, since the far-field flow is very nearly uniform and one-dimensional, making the choice of C in Eq. (1) less problematic. In this example, when considering convective BC, the definition for C is selected to match that used by Ruith et al. [4], i.e. \(C=0.6\) along the downstream axial boundary and \(C=0.1\) along the outer radial boundary.

3.2.1 Axisymmetric steady states

Using the same approach as the previous section, nonlinear steady axisymmetric states are computed for the considered BCs at \(S=0.85\) and \(S=1\). These cases correspond, respectively, to parameter conditions below and above the threshold value of \(S=0.890\) for breakdown of the Grabowski–Berger vortex at \(Re=200\) [16, Fig. 1]. In Fig. 2, these results are presented and directly compared against corresponding reference results obtained by replicating the calculations of Meliga et al. [16]. As in that study, these reference results are computed on a much larger mesh (\(0\le x\le 120\) and \(0\le r\le 60\)) and rely on thick axial and radial sponge layers to mitigate swirl-induced boundary scattering effects from the free outflow BC and ensure grid and truncation independence. Note that these comparisons are presented using logarithmically-spaced error contours.

Fig. 2
figure 2

Steady meridional streamline patterns and logarithmically-spaced contours of the local absolute velocity error magnitude obtained with each BC for the pre-breakdown (\(S=0.85\)) and post-breakdown (\(S=1\)) axisymmetric Grabowski–Berger vortex at \(Re=200\). Errors are calculated against the reference fields \(\varvec{u}_{\text {ref}}\) replicated from Meliga et al. [16] on the larger mesh. Note that, due to axisymmetry, the results obtained with the balanced outflow BC (5) and the modified outflow BC (3) are again equivalent

From Fig. 2, it is immediately apparent that, as in Example 1, the free outflow BC (2) leads to serious errors in the computed steady flow topology, since this constraint cannot consistently accommodate the swirl-induced pressure gradients along the open boundary. Hence, without additional treatment (for example, by sponge layers as in [16]), the free outflow BC is inappropriate for application along artificial boundaries in swirling flows. The convective BC (1) and balanced outflow BC (5), in contrast, yield accurate descriptions of the flowfield, with streamlines showing qualitatively correct behavior regarding vortex breakdown and contours indicating very small errors for both BC at these S values. Nonetheless, the convective BC generates larger errors than the balanced outflow BC, particularly near the artificial boundary and central axis. As shown in Table 1, the balanced outflow BC, which is again equivalent to the modified outflow BC in these axisymmetric calculations, yields the more quantitatively accurate approximation of this unbounded flow in both a local and integral sense.

Fig. 3
figure 3

Contours (logarithmic scale) of the magnitude of the local relative velocity error for the leading \(m=-1\) (a,c,e,g) and \(m=-2\) (b,d,f,h) eigenmodes of the reference Grabowski–Berger vortex base flow at \(S=1\) and \(S=1.3\), respectively, computed on the truncated mesh with each artificial BC. Errors are calculated against the reference eigenmodes \(\varvec{\hat{u}}_{\text {ref}}\) replicated from Meliga et al. [16] on the larger mesh

Table 1 Maximum local absolute velocity error amplitude \(E_{\max }=\max _{\varvec{x}}\left| \varvec{u}-\varvec{u}_{\text {ref}}\right| \) and volume-averaged absolute velocity error \(E_{\text {avg}}=\int \left| \varvec{u}-\varvec{u}_{\text {ref}}\right| \textrm{d}\varvec{x}/\int \textrm{d}\varvec{x}\) for the pre-breakdown (\(S=0.85\)) and post-breakdown (\(S=1\)) Grabowski–Berger vortex at \(Re=200\)

3.2.2 Three-dimensional stability analysis

Having determined the effect of the open BC on axisymmetric nonlinear steady states, this subsection now considers the effect of the open BC on the dominant three-dimensional unsteady structures that arise in simulations [e.g. [8]]. Due to the difficulty of isolating and quantitatively comparing such effects via nonlinear time-domain simulations, the approach taken here is to study this effect using linear analysis, as is quite common in the literature [e.g.[2, 6]]. This simplification is justifiable since each step of a nonlinear time-domain simulation involves solutions of linear problems where the BC must function consistently. Nonetheless, differences from the linear behavior may arise when large-amplitude disturbances interact with the boundary.

To prevent any differences in the base flow fields from affecting the linear results, global linear stability analysis is performed over reference Grabowski–Berger vortex base flow fields replicated from Meliga et al. [16] at \(Re=200\) and \(S=1\) and \(S=1.3\). The reference base flows, obtained on the much larger reference mesh, are then interpolated onto the smaller mesh, and eigenvalue calculations are performed on the truncated reference flow fields with each BC. In this manner, the present analysis considers a “best-case” scenario for accuracy, since the linear 3-D calculations are independent of any errors introduced at the base flow level. Indeed, as evidenced by the above results, such base flow errors are already significant enough to entirely preclude direct application of the free outflow BC (2) to truncated swirling flows, before even considering unsteady or three-dimensional effects. The free outflow BC will nevertheless be considered here in order to assess its performance independent of nonlinear effects.

Visualizations of the magnitude of the local relative velocity error between the reference eigenmodes and the truncated eigenmodes computed with each artificial BC are given in Fig. 3, along with information about the associated eigenvalues and maximum and integrated errors in Table 2. Note that, unlike the previous examples, the modified outflow BC (3) and its generalization, the balanced outflow BC (5), are distinct for the present non-axisymetric calculations. Because the eigenmodes’ phase and amplitude are arbitrary, this relative error e is computed as the normalized projection error between the truncated eigenmode obtained with each artificial BC and the corresponding reference eigenmode, with the reference eigenmode normalized by the global maximum of the perturbation velocity magnitude, i.e.

$$\begin{aligned} e=\frac{1}{\max _{\varvec{x}}|\varvec{\hat{u}}_{\text {ref}}|}\left| \varvec{\hat{u}}_{\text {ref}}-\frac{\langle \varvec{\hat{u}}_{\text {ref}}^\dagger ,\varvec{\hat{u}}_{\text {ref}}\rangle }{\langle \varvec{\hat{u}}_{\text {ref}}^\dagger ,\varvec{\hat{u}}\rangle }\varvec{\hat{u}}\right| =\frac{\left| \varvec{\hat{u}}_{\text {ref},\perp \varvec{\hat{u}}}\right| }{\max _{\varvec{x}}|\varvec{\hat{u}}_{\text {ref}}|}, \end{aligned}$$
(18)

where \(\varvec{\hat{u}}\) is the truncated eigenmode, \(\varvec{\hat{u}}_{\text {ref}}\) is the reference eigenmode, \(\varvec{\hat{u}}_{\text {ref}}^\dagger \) is the reference adjoint eigenmode, and \(\langle \bullet ,\bullet \rangle \) is the standard \(L_2\) inner product. Hence, unlike the absolute velocity error metrics given for the base flow, the projection errors indicated here are given on a relative basis with respect to the maximum amplitude of the reference mode.

Table 2 Eigenvalues \(\lambda =\sigma +\omega \textrm{i}\), maximum local relative velocity error \(e_{\max }=\max _{\varvec{x}}\left| \varvec{\hat{u}}_{\text {ref},\perp \varvec{\hat{u}}}\right| /\max _{\varvec{x}}|\varvec{\hat{u}}_{\text {ref}}|\), and volume-averaged relative velocity error \(e_{\text {avg}}=\int \left| \varvec{\hat{u}}_{\text {ref},\perp \varvec{\hat{u}}}\right| dx/(\max _{\varvec{x}}|\varvec{\hat{u}}_{\text {ref}}|\int \textrm{d}\varvec{x})\) for the leading \(m=-1\) and \(m=-2\) eigenmodes for the Grabowski–Berger vortex at \(Re=200\) and \(S=1\) and \(S=1.3\), respectively. The reference eigenvalues are \(\lambda =0.0379656+1.16094\textrm{i}\) and \(\lambda =0.0961360+2.53625\textrm{i}\), respectively

The calculations reveal that all BCs considered yield satisfactorily passive conditions that do not notably alter the leading unsteady and three-dimensional linear dynamics of the Grabowski–Berger vortex. In particular, the dominant eigenvalues of the truncated cases all match the eigenvalues of the corresponding reference cases to three or more significant digits, which is similar to the spatial accuracy of the discretization. Such eigenvalue insensitivity should be expected following intuition related to the so-called “wavemaker” region associated with high structural sensitivity of the instability [28]. Indeed, Qadri et al. [9] have shown that the wavemaker for the spiral instability of the Grabowski–Berger vortex is strongly localized to the central recirculation zone, meaning that errors near the artificial boundary do not actively contribute to the perturbation dynamics of this instability. This specific property of the Grabowski–Berger vortex is likely a key reason for the insensitivity of the convective BC to C reported by Ruith et al. [8].

Despite this insensitivity of the eigenvalues to the chosen BC, the eigenvector error contours shown in Fig. 3 do indicate some important differences regarding the behavior of the various BC in truncated simulations. First, it is notable that the free outflow BC (2) does not fail catastrophically as it did for the nonlinear base flow calculations. In fact, for the examined cases, the free outflow BC yields relatively low integrated errors compared to the other BC considered, though it also yields relatively high local errors along the artificial boundary. This suggests that the free outflow BC may still be applied for 3-D linear stability analysis in swirling flow, even when it is inappropriate for nonlinear timestepping of the 3-D system or axisymmetric base flow calculations. Second, the velocity fields obtained with the convective BC (1) are shown to exhibit markedly higher errors on the domain interior in comparison to those produced by the free outflow BC, the modified outflow BC, and balanced outflow BC. This indicates that, with the definition of C chosen by Ruith et al. [4], the convective BC is “less passive” than the alternatives. While it would likely be possible to tune C a posteriori in order to yield a comparably transparent convective BC, this discrepancy highlights the general difficulty associated with specifying a priori an appropriate C, since imperfections necessarily generate spurious waves that propagate inwards from the boundary. Third, the velocity fields obtained with the modified outflow BC (3) are shown to generate larger localized errors on the domain interior than the free outflow BC, even though the integrated and maximal error metrics are comparable. This issue is likely attributable to a failure of the partial pressure correction in non-axisymmetric conditions to prevent disturbance scattering from imperfectly-corrected centrifugal forces as well as neglected Coriolis forces. Finally, the balanced outflow BC (5) is observed to achieve similar overall performance to the free outflow BC, with smaller peak error and lower internal error but larger integrated error. Aside from its superior performance in terms of spurious wave transmission to the domain interior, the key advantages of (5) over the alternatives are that, unlike the free outflow BC (2), it functions consistently in both linear and nonlinear calculations, and, unlike the convective BC (1), it does not require any numerical parameters to be defined. Further, unlike the modified outflow BC (3), which corrects only for scattering from centrifugal forces and is significantly restricted to specific boundary geometries, the balanced outflow BC is applicable to truncated open flows in arbitrary geometries influenced by any external or apparent body forces.

4 Conclusion

This paper introduces a new balanced outflow boundary condition (BC) designed to accurately model artificially-truncated open flows that are influenced by real or apparent body forces. The proposed BC is formulated in a general manner, but the paper specifically focuses on applications involving unforced incompressible swirling flow, where body pseudo-forces arise due to the centrifugal and Coriolis effects. In this context, the balanced outflow BC corresponds to a free outflow BC with a geostrophic pressure correction that balances the hydrostatic stresses induced by the apparent forces. The proposed method does not notably affect computational expense, as the only additional unknowns appear along the surface of the artificial boundary. Subsequently, the accuracy of this BC is compared against the convective BC [4, 5] and the natural free outflow BC for two canonical examples of swirling flow: the Poiseuille flow in a rotating pipe and the Grabowski–Berger vortex flow.

Considering both nonlinear, steady, axisymmetric behavior and linear, unsteady, three-dimensional dynamics, the results demonstrate favorable performance and accuracy for the balanced outflow BC in comparison to the alternatives. In particular, though it is shown to be acceptable for linear stability calculations, the free outflow BC (Eq. (2)) introduces approximately O(S) local and global errors in nonlinear swirling flow computations without ad-hoc fixes (e.g. sponge layers) that significantly increase computational cost and modeling effort. Likewise, the convective BC (Eq. (1)) achieves good accuracy in both linear and nonlinear calculations, provided an a priori approximation of hyperbolic disturbance propagation behavior is available and valid along the truncated boundary. Finally, the proposed balanced outflow BC (Eq. (5)) is shown to yield accurate results for both linear and nonlinear calculations without requiring ad-hoc fixes along the boundary or additional assumptions about wave propagation behavior. Therefore, the balanced outflow BC is proposed as a substantial improvement over the current state of the art in open swirling flow modeling, particularly when dealing with non-uniform flow topologies and aggressively truncated domains. Future work may assess the limits of the geostrophic pressure balance assumption in rapidly swirling flows and explore applications of the balanced BC in broader classes of inhomogeneous open flows, such as may arise in magnetohydrodynamic and natural convection problems.