1 Introduction

Fluid devices are widely used in the industry, such as in flow machines, mixers, separators, and valves, which means that optimization to increase their performance is of high interest.

Topology optimization method has been initially applied to fluid problems by Borrvall and Petersson (2003), where the energy (power) dissipation is minimized in order to design flow channels in bi-dimensional domains. In this case, a Stokes flow is considered with a material model based on the Darcy law (Brinkman model) (Vafai 2005), which creates a porous media (intermediate material between solid and fluid). This intermediate material is able to relax the optimization problem from binary values to real number values.

Since then, the topology optimization method in fluids has been applied to a wide variety of flows: Stokes (Borrvall and Petersson 2003), Darcy-Stokes (Guest and Prévost 2006) (Wiker et al. 2007), Navier-Stokes (Evgrafov 2004; Olesen et al. 2006), slightly compressible (Evgrafov 2006), non-Newtonian (Pingen and Maute 2010), turbulent (Yoon 2016), etc.

It has been extended to the design of various fluid devices, such as valves (Song et al. 2009), mixers (Andreasen et al. 2009), rectifiers (Jensen et al. 2012), and flow machine rotors (Romero and Silva 2014).

In the design of flow machine rotors, Romero and Silva (2014) model the fluid flow in a rotating reference frame in order to ease the visualization of the fluid motion over the impeller of centrifugal pumps, in which Coriolis and centrifugal terms appear. The effect of body forces, such as gravity force, and Coriolis and centrifugal inertial forces, has been analyzed by Deng et al. (2013a, b).

Besides the pseudo-density approach used by Borrvall and Petersson (2003), the “level-set method” (Duan et al. 2016; Zhou and Li 2008) and topological derivatives (Sokolowski and Zochowski 1999; Sá et al. 2016) have also been applied to topology optimization for fluid problems.

According to Deng et al. (2013b), the pseudo-density approach has a rapid and robust convergence, weakly depends on the initial distribution of the design variable, and allows dealing with multiple constraints. Therefore, it is the method selected for this work.

There is a specific large class of fluid flow problems called 2D swirl flow problems which presents an axisymmetric flow with (or without) flow rotation around the axisymmetric axis. Once solving a topology optimization problem for this class of problems using a 3D domain results in a quite high computational cost, the development of 2D swirl models is of high interest. Up to now, no work related to the application of a 2D swirl flow model (“2D axisymmetric model with swirl”) in topology optimization has been reported in literature. Some examples of fluid devices that can be designed by such models are hydrocyclones, some pumps and turbines, and fluid separators.

Thus, the main objective of this work is to propose a topology optimization formulation for 2D swirl flow fluid problems in order to design 2D swirl fluid devices. The objective is to minimize the relative energy dissipation considering the viscous and porous effects. The 2D swirl laminar fluid flow modelling is solved by using the finite element method. In the topology optimization formulation, a traditional material model defined by Borrvall and Petersson (2003) is adopted by considering nodal design variables.

The algorithm is implemented in the FEniCS platform, by using the adjoint method for calculating sensitivities (Farrell et al. 2013), an interior point optimization algorithm (IPOPT) for solving the optimization problem (Wächter and Biegler 2006), and the MUMPS for solving the equations of weak form of the problem (Amestoy et al. 2001).

This paper is organized as follows: in Section 2, the flow model for a 2D swirl flow is briefly derived. In Section 3, the weak formulation of the problem is presented together with the finite element modelling, sensitivities, and discrete forms. In Section 4, the topology optimization is stated by considering the Brinkman model. In Section 5, the numerical implementation is briefly described. In Section 6, numerical examples are presented. And in Section 7, some conclusions are inferred.

2 Equilibrium equations

The equilibrium equations considered in this work are the continuity equation and the Navier-Stokes equations, which are considered for laminar flow (i.e., for low Reynolds numbers), incompressible fluid, and negligible variations in viscosity (i.e., for a liquid without high differences in temperature, and velocities not as high as the speed of sound).

2.1 Continuity equation

In the case of an incompressible fluid, the continuity equation is given by (Munson et al. 2009)

$$ \nabla {\bullet}\boldsymbol{v}_{\text{abs}} = 0 $$
(1)

where vabs is the absolute velocity of the fluid and ∙ is used to denote the inner product.

2.2 Navier-Stokes equations

The Navier-Stokes equations correspond to the linear momentum equations. For laminar flow, incompressible fluid, negligible variations in viscosity, and stationary flow, they are given by (Munson et al. 2009)

$$ \rho \nabla \boldsymbol{v}_{\text{abs}}{\bullet}\boldsymbol{v}_{\text{abs}} = -\nabla p + \mu \nabla {\bullet}(\nabla \boldsymbol{v}_{\text{abs}} + {\nabla \boldsymbol{v}_{\text{abs}}}^{T}) + \rho \boldsymbol{f} $$
(2)

where ρ is the density of the fluid, p is the pressure, μ is the dynamic viscosity, and ρf is the force per unit volume acting on the fluid.

2.3 2D swirl flow model

By considering a rotating reference frame with a rotation of ω = ω0ez, the velocity and acceleration in the stationary frame need to be converted as (White 2011)

$$ \boldsymbol{v}_{\text{abs}} = \boldsymbol{v}_{\mathit{ref}} + \boldsymbol{v} + \boldsymbol{\omega }{\wedge}\mathbf{s} $$
(3)
$$ \boldsymbol{a}_{\text{abs}} = \boldsymbol{a}_{\mathit{ref}} + \boldsymbol{a} + 2\boldsymbol{\omega}{\wedge}\boldsymbol{v} + \boldsymbol{\omega}{\wedge}(\boldsymbol{\omega}{\wedge}\mathbf{s}) + \dot{\boldsymbol{\omega}}{\wedge}\mathbf{s} $$
(4)

where ω is the rotational speed of the reference system, s is a position in the flow, vabs and aabs are the absolute velocity and acceleration, ∧ is used to denote cross product, v and a are the relative velocity and acceleration, and vref and aref are the velocity and acceleration of the origin of the rotating reference frame (in this case, the origin is the center of rotation, therefore vref = 0 and aref = 0 ).

By assuming stationary flow (\(\dot {\boldsymbol {\omega }} = \mathbf {0}\)) and substituting (3) and (4) in (2), it is possible to derive the Navier-Stokes equations for a rotating reference frame

$$ \rho \nabla \boldsymbol{v}{\bullet}\boldsymbol{v} = \nabla{\bullet}\boldsymbol{T} + \rho \boldsymbol{f} - 2\rho(\boldsymbol{\omega }{\wedge}\boldsymbol{v}) - \rho\boldsymbol{\omega }{\wedge}(\boldsymbol{\omega}{\wedge}\mathbf{s}) $$
(5)

where T is the stress tensor given by

$$ \ \ \ \ \ \boldsymbol{T} = 2\mu \mathbf{\epsilon} - p\boldsymbol{I} , \mathbf{\epsilon} = \frac{1}{2}(\nabla \boldsymbol{v} + \nabla{\boldsymbol{v}}^{T}) $$
(6)

As can be noted above, two terms appear in the equations in relation to the stationary frame equations: the Coriolis force (− 2ρ(ωv) ) and the centrifugal inertial force (− ρω∧(ωs)).

Since the continuity equation should be valid in any reference frame, the continuity equation for a rotating reference frame is given by

$$ \nabla {\bullet}\boldsymbol{v} = 0 $$
(7)

In topology optimization, the material can be considered as a porosity in the flow. By considering the Brinkman model for a porous media (Vafai 2005), a resistance force directly proportional to the fluid velocity in relation to the porous media appears. Therefore, the Navier-Stokes equations for a rotating reference frame according to the Brinkman model become

$$ \rho \nabla \boldsymbol{v}{\bullet}\boldsymbol{v} = \nabla {\bullet}\boldsymbol{T} + \rho \boldsymbol{f} - 2\rho (\boldsymbol{\omega }{\wedge}\boldsymbol{v}) - \rho \boldsymbol{\omega }{\wedge}(\boldsymbol{\omega }{\wedge}\mathbf{s}) - \kappa (\alpha )\boldsymbol{v}_{\text{mat}} $$
(8)

where κ(α) is the absorption coefficient (“inverse permeability”), vmat is the velocity in relation to the porous material (vmat = (vr, v𝜃ωmatr, vz), where ωmat is the rotation of the porous media relative to the reference frame), and α is the pseudo-density (design variable), which attains values between 0 (solid) and 1 (fluid).

By considering a cylindrical coordinate system, the position and velocity become

$$ \mathbf{s} = (r,\ \theta,\ z) = r\boldsymbol{e}_{r}(\theta) + z\boldsymbol{e}_{z} $$
(9)
$$ \boldsymbol{v} = (v_{r},\ v_{\theta},\ v_{z}) = v_{r}\boldsymbol{e}_{r}(\theta) + v_{\theta}\boldsymbol{e}_{\theta } + v_{z}\boldsymbol{e}_{z} $$
(10)

The 2D swirl flow model denotes a case in which the coordinates are assumed as bi-dimensional (2D), however, with 3D velocity components. Figure 1 shows the computational domain in this type of model, consisting of a simplification of the 3D domain Π in a 2D domain Ω, while maintaining all the velocity components. Therefore,

$$ \mathbf{s} = (r,\ 0,\ z) = r\boldsymbol{e}_{r} + z\boldsymbol{e}_{z} $$
(11)
$$ \boldsymbol{v} = (v_{r},\ v_{\theta},\ v_{z}) = v_{r}\boldsymbol{e}_{r} + v_{\theta}\boldsymbol{e}_{\theta } + v_{z}\boldsymbol{e}_{z} $$
(12)
Fig. 1
figure 1

Example of a 2D swirl flow model

By assuming axisymmetry, the derivatives in relation to 𝜃 become zero (i.e., \(\frac {\partial (\ )}{\partial \theta } = 0\)).

Thus, the boundary value problem can be stated as follows.

$$ \begin{array}{rlllllllllllllll} \rho \nabla \boldsymbol{v}{\bullet}\boldsymbol{v} = \nabla {\bullet}\boldsymbol{T} + \rho \boldsymbol{f} &- 2\rho (\boldsymbol{\omega }{\wedge}\boldsymbol{v}) - \\ & \rho \boldsymbol{\omega }{\wedge}(\boldsymbol{\omega}{\wedge}\mathbf{s}) - \kappa (\alpha )\boldsymbol{v}_{\text{mat}} && \text{ in } {\Omega} \\ \nabla {\bullet}\boldsymbol{v} &= 0 && \text{ in } {\Omega}\\ \boldsymbol{v} &= \boldsymbol{v}_{in} && \text{ on } {\Gamma}_{\text{in}}\\ \boldsymbol{v} &= \mathbf{0} && \text{ on } {\Gamma}_{\text{wall}}\\ {v_{r}} = {0} &\text{ and } \frac{\partial (\ )}{\partial r } = {0} && \text{ on } {\Gamma}_{\text{sym}}\\ \boldsymbol{T} {\bullet} \boldsymbol{n} = \mathbf{0} {\text{ or } (\boldsymbol{v}_{rz,t} } & {= \mathbf{0}\text{ and }\boldsymbol{n}{\bullet} \boldsymbol{T} \boldsymbol{n} = 0)} && \text{ on } {\Gamma}_{\text{out}} \end{array} $$
(13)

where Ω, Γin, Γwall, Γsym, and Γout are shown in Fig. 2. On the inlet boundary (Γin), a fixed velocity is imposed. On the walls (Γwall), the no-slip condition is imposed. On the symmetry axis (Γsym), the derivatives in relation to the r coordinate are considered to be zero, as well as the radial velocity. On the outlet boundary (Γout), depending on the numerical example, a different boundary condition is used and explicitly indicated. The first outlet boundary condition is stress free, which would mean that the flow is open to the atmosphere: Tn = 0 (Neumann boundary condition). The second boundary condition consists of an internal flow, by imposing a velocity in which its radial (vr) and axial (vz) components are perpendicular to the outlet (Dirichlet boundary condition) (i.e., the tangential components of the velocity in the “2D plane” (vrz,t) are equal to zero), and imposing zero normal stress on the interface (nTn = 0) (Neumann boundary condition). This last imposition means that the pressure is weakly imposed with a zero value on the boundary (see Appendix B for the derivation considering 2D swirl flow, which is quite similar to the one shown in Barth and Carey (2007) for 2D flow). If, instead, the outlet pressure was strongly imposed (Dirichlet boundary condition) for the analyzed numerical examples, it could, as opposed to the weak imposition of the pressure value, lead to sharp spikes of negative pressure right before the outlet, which characterizes an ill-posed boundary condition.

Fig. 2
figure 2

Boundaries for 2D swirl flow devices

3 Finite element method

3.1 Weak formulation

In order to derive the weak form of equations (7) and (8) by the weighted-residual and Galerkin methods as a mixed (velocity-pressure) formulation, they should be multiplied by test functions for pressure (wp) and velocity (\(\boldsymbol {w}_{v} = \left [\begin {array}{llllllllllll}{w}_{v,r}\\{w}_{v,\theta }\\{w}_{v,z} \end {array}\right ]\)) and integrated in the whole 2D swirl domain. Therefore, by considering a 2D swirl flow,

$$ {R}_{c} = \displaystyle{\int}_{\Omega }[\nabla{\bullet}\boldsymbol{v}]\boldsymbol{w}_{p}rd{\Omega} $$
(14)

where c stands for “continuity equation” and m stands for “linear momentum equation” (i.e., Navier-Stokes equations).

Note that, in the above equations, the multiplicative constant 2π related to the conversion from the 3D domain to the 2D domain is omitted, since it does not influence when solving the weak problem.

Since the two test functions are independent from each other, the two equations can be summed in order to form a single equation for the weak form, as

$$ F = {R}_{c} + {R}_{m} = 0 $$
(16)

The derivation is further detailed in Appendix A.

3.2 Finite element modelling

For the velocity-pressure formulation to be stable, Taylor-Hood elements are chosen (see Fig. 3): 1st degree interpolation for pressure (P1 element) and 2nd degree interpolation for velocity (P2 element). For the design variable, 1st degree interpolation (P1 element) is chosen.

Fig. 3
figure 3

Finite elements choice for pressure, velocity, and design variable

4 Formulation of the topology optimization problem

4.1 Material model

According to Borrvall and Petersson (2003), as the aim of the material model is to relax the design variable α to attain values between 0 (solid) and 1 (fluid), the idea is to choose a function α in order to provide intermediate values for the absorption coefficient κ(α) (Borrvall and Petersson 2003). Therefore, a convex interpolation function is used:

$$ \kappa (\alpha) = \kappa_{\max} + (\kappa_{\min} - \kappa_{\max})\alpha \frac{1 + q}{\alpha + q} $$
(17)

where κmin and κmax are, respectively, the minimum and the maximum values of κ(α). The parameter q is the penalization parameter, which controls the convexity of κ(α) (q > 0). It determines the intermediary (“gray”) part of the optimized structure, which represents an intermediary behavior between the full flow and the porous flow given by the material model resistance force. The choice of κmax is important, given that a low value can cause the fluid to penetrate in solid regions and a too high value can cause a stagnation in the topology evolution. A high value of q (penalization parameter) means that the transition between solid and fluid is less “relaxed,” closer to a straight line, as shown in Borrvall and Petersson (2003)’s material model (see Fig. 4). The choice of q depends on the fluid flow problem, where a higher value of q tends to create a more discrete solution. A low value of q means that intermediary values of α present a low resistance to the flow, for example, with q = 0.01, regions with α = 0.6 (“gray”) would act as regions of α = 1.0 (solid) and the final solution could present “gray” regions, given that they have the same behavior. Thus, to obtain a discrete solution, in most cases, it is necessary to use high values of q.

Fig. 4
figure 4

Illustration of Borrvall and Petersson (2003)’s material model

4.2 Topology optimization problem

Thus, the topology optimization problem is formulated as shown below.

where Ωα is the area of the design domain, f is the specified volume fraction, \(V_{0} = \displaystyle {\int }_{{\Omega }_{\alpha }}2\pi rd{\Omega }_{\alpha }\) is the volume of the design domain, and Φrel(p(α),v(α),α) is the objective function.

4.3 Objective function

The objective function is chosen as the energy dissipation defined in Borrvall and Petersson (2003), which is composed of a viscosity effect (related to viscous heating), an external body force effect, and a porosity effect. In a rotating reference frame, for the case, there are no external body forces (ρf = (0, 0, 0)) and not considering inertial body forces, relative energy dissipation can be given as the viscosity and porosity effects,

$$ \begin{array}{llllll} {\Phi}_{\text{rel}} & = \displaystyle{\int}_{\Omega }\left[\frac{1}{2}\mu (\nabla \boldsymbol{v} + {\nabla \boldsymbol{v}}^{T}){\bullet}(\nabla \boldsymbol{v} + {\nabla \boldsymbol{v}}^{T}) \right]2\pi rd{\Omega} \\ & + \displaystyle{\int}_{\Omega }\kappa (\alpha )\boldsymbol{v}_{\text{mat}}{\bullet}\boldsymbol{v}2\pi rd{\Omega} \end{array} $$
(19)

For reference, the discrete form of the objective function is presented in Appendix C.2.

4.4 Sensitivity analysis

The sensitivity of a functional Φrel = Φrel((v,p),α) given the weak form F((v,p),α) = 0 (16) can be obtained by the adjoint method as the following equations

$$ \left( \frac{d{\Phi}_{\text{rel}}}{d\alpha}\right)^{\text{*}} = \left( \frac{\partial {\Phi}_{\text{rel}}}{\partial \alpha}\right)^{\text{*}} - \left( \frac{\partial F}{\partial\alpha}\right)^{\text{*}}{\lambda}_{\Phi } $$
(20)
$$ \left( \frac{\partial \boldsymbol{F}}{\partial (\boldsymbol{v}, p)}\right)^{\text{*}}{\lambda }_{\Phi } = \left( \frac{\partial {\Phi}_{\text{rel}}}{\partial (\boldsymbol{v}, p)}\right)^{\text{*}} \text{(adjoint equation)} $$
(21)

where * represents conjugate transpose, and λΦ is the adjoint variable, corresponding to the Lagrange multiplier of the weak form.

For reference, the discrete form of the sensitivity is presented in Appendix C.3.

5 Numerical implementation of the optimization problem

For the implementation of the optimization method, the FEniCS platform (Logg et al. 2012) is used, in which it is possible to define high-level expressions, coupled with the dolfin-adjoint library (Farrell et al. 2013), which allows derivation of adjoint models, and interior-point optimization algorithm (IPOPT Wächter and Biegler 2006, through the Python library PyIPOPT). The solution to the finite element method is performed by using the Newton-Raphson method and the solver is MUMPS (multifrontal massively parallel sparse direct solver) (Amestoy et al. 2001).

The flowchart in Fig. 5 shows the interconnection between the software packages.

Fig. 5
figure 5

Flowchart of the topology optimization problem

For reference, the discrete forms of the equations are presented in Appendices CD and E.

6 Numerical examples

In the following numerical results, the fluid is considered as water, with a dynamic viscosity (μ) of 0.001 Pa s, and a density (ρ) of 1000.0 kg/m3.

Structured meshes are chosen with rectangular partitions composed of four triangles each (Fig. 6).

Fig. 6
figure 6

“Crossed triangular elements” - Triangular elements distributed in a rectangular partition

In order to scale the equations to increase the convergence rate of the calculation of the weak form, functionals, and sensibilities, the MMGS (millimeters-grams-seconds) unit system is used (i.e., the length and mass units are multiplied by a 103 factor).

The convergence criterion for simulation with MUMPS is based on residuals: absolute tolerance of 10− 7 and relative tolerance of 10− 7. For the optimization, the convergence criterion is based on a desired relative tolerance of 10− 10 for the optimality error of the IPOPT barrier problem that essentially corresponds to the maximum norm of each KKT condition (Wächter and Biegler 2006).

External body forces are not considered for the numerical examples (ρf = (0, 0, 0)).

For the nozzle and hydrocyclone-type device examples, the outlet boundary condition is chosen as p = 0 Pa. For the two-outlet and two-way channel examples, the outlet boundary is considered as open to the atmosphere (Tn = 0).

In the following examples, the letter n is used to denote rotation in revolutions per minute, and the greek letter ω is used to denote rotation in radian per second.

Also, the porous medium is assumed with the same rotation as the reference frame; therefore, in these cases, vmat = v. Also, κmin = 0 kg/(m3 s).

The post-processing of the optimized topology is done by thresholding the nodal values of the design variable with a simple step function:

$$ \alpha_{\text{th}} = \left\{\begin{array}{lllllll}1\text{ (fluid), if }\alpha \geqslant 0.5\\0\text{ (solid), if }\alpha < 0.5 \end{array}\right. $$
(22)

Then, the solid material (α = 0) is cut off from the original mesh (see Fig. 7), enabling the final simulation to be performed with the original Navier-Stokes equations (i.e., not including the Brinkman model).

Fig. 7
figure 7

Post-processing of an optimized topology

This is done in order to analyze without the effect of the material model, which influences a zone around the porous media. In all optimized topologies, the final values of α are close to the bounds (i.e., to α = 0 and α = 1). The Measure of non-discreteness (Sigmund 2007) can be used to evaluate how close the values of α are close to the bounds. It can be given by

$$ M_{ND} = \frac{\displaystyle{\int}_{\Omega } 4 \alpha (1 - \alpha) 2 \pi r d {\Omega}}{\displaystyle{\int}_{\Omega } 2 \pi r d {\Omega}} $$
(23)

where MND = 0% for a fully discrete topology (α = 0 or α = 1), and MND = 100% for a fully gray topology (α = 0.5).

The Reynolds number for the numerical examples is given by \(\text {Re} = \frac {v_{c}L}{\nu }\), where vc is a characteristic velocity of the fluid flow, L is a characteristic dimension, and ν is the kinematic viscosity. In this work, L is considered as the diameter of the design domain, for the nozzle in Section 6.1; the height of the design domain, for the hydrocyclone-type device and the two-oulet channel in Sections 6.2 and 6.3; and the width of the design domain, for the two-way channel example in Section 6.4. The characteristic velocity (vc) is given by max(|vabs|) in the domain.

The pressure head is calculated from the following equation:

where Q is the flow rate and hz is the height. Since the gravitational force is not considered in the design, hz = 0.

In this work, the boundary (Γ) can be divided into four parts: Γwall, Γin, Γout, and Γsym. On the wall (Γwall), the velocity can only be in the tangential direction (𝜃) due to the no-slip condition (vabs = vabs,𝜃e𝜃); therefore, since n = nrer + nzez, it can be said that vabsn = 0 on the walls. Also, since the rotation is given in the z direction (ω = ω0ez) and vabs = v + ωs, the inner product (ωs) ∙n is zero; therefore, vabsn = vn. On the symmetry axis (Γsym), vn = 0. Then, equation (24) becomes

$$ \begin{array}{llllll} H = \frac{1}{Q} & \left[ \displaystyle{\int}_{{\Gamma}_{\text{in}} }\left( \frac{p}{\rho g} + \frac{{v}_{\text{abs}}^{2}}{2g} + h_{z}\right) \boldsymbol{v}{\bullet}\boldsymbol{n}2\pi rd{\Gamma} \right. \\ & + \left. \displaystyle{\int}_{{\Gamma}_{\text{out}} }\left( \frac{p}{\rho g} + \frac{{v}_{\text{abs}}^{2}}{2g} + h_{z}\right) \boldsymbol{v}{\bullet}\boldsymbol{n}2\pi r d{\Gamma} \right] \end{array} $$
(25)

The plots of the optimized topologies consider the values of the design variable α in the center of each finite element.

In the numerical examples, the specified fluid volume fraction (f ) is chosen as 30%.

The initial guess for the design variable is mainly chosen as a uniform distribution of α = f − 1, where f is the specified volume fraction and 1% is a margin set in order to guarantee that the initial guess does not violate the volume constraint (because of the numerical accuracy of the calculations). Some numerical examples use a previous converged topology as the initial guess to better condition the topology. The initial guess is explicitly indicated for all numerical examples, and it has been assessed that it does not significantly influence the optimized topologies (such as for “all fluid,” “all solid,” “all gray” (volume fraction), and “random” initial guesses).

In the material model, κmin is chosen as 0 kg/(m3/s) for all examples.

A continuation scheme in the optimization parameters is performed in order to better condition the solution to the fluid problem, with a maximum number of allowed optimization iterations defined for each continuation step (in the range of 10 to 800). In the beginning of each continuation step, the IPOPT algorithm is restarted.

6.1 Nozzle

The first example is the design of a nozzle. A nozzle is a device used to control the characteristics of a fluid flow entering or leaving another fluid device. In this case, the flow is considered as entering without rotation in a nozzle rotating around its own axis with the same rotation as the reference frame (ω0). By using the 2D swirl flow model, the design domain may be selected as in Fig. 8. The material distribution is being optimized on the rotating walls of the nozzle.

Fig. 8
figure 8

Design domain for a nozzle

The mesh is chosen with 40 radial and 80 axial rectangular partitions of crossed triangular elements, totaling 6521 nodes and 12,800 elements (see Fig. 9). The input parameters and dimensions of the design domain that are used are shown in Table 1.

Fig. 9
figure 9

Mesh used in the design of a nozzle

Table 1 Parameters used for the topology optimization of a nozzle

In order to analyze the influence of the wall rotation in the optimized topology, a series of optimizations is performed for a sequence of wall rotations. Figure 10 shows the objective function (relative energy dissipation) value in relation to the wall rotation and corresponding optimized topologies. The objective function value shown corresponds to the post-processed topology (22). The maximum Reynolds number is evaluated as 1040 (for 50 rpm, the values used for the Reynolds number are max(|vabs|) = 0.052 m/s, L = 20 mm, ν = 10− 6 m2/s ). In the case of a rotating pipe with constant diameter, the Reynolds number is defined in Nagib et al. (1969) with an average axial velocity. According to Nagib et al. (1969), the Reynolds number should be below about 1000 for laminar flow. In the case of the optimizations of a nozzle, since the diameter is not constant and the maximum velocity value is used in the Reynolds number definition, the flow should be laminar for all of optimized nozzles.

Fig. 10
figure 10

Effect of the wall rotation in the design of a nozzle

As can be seen in Fig. 10, for 0 rpm, there is a solid region around the inlet, which is similar to Borrvall and Petersson (2003)’s diffuser. The optimization schemes are shown in Table 2. Table 3 shows the values of the objective function and pressure head for the optimized topologies of Fig. 10. As can be noticed in Table 3, the negative pressure head shows that the device is passive. It can also be noticed that the pressure head slightly increased from 10 to 20 rpm, due to the larger inlet zone, and from 30 to 40 rpm, since the change in diameter became slightly smoother for 40 rpm (see Fig. 10).

Table 2 Reference parameters for the optimization schemes (steps) for the nozzle
Table 3 Values of the objective function and pressure head for the optimized topologies of the nozzle after post-processing

As can be seen in Fig. 10, the rotation has the effect of enforcing a less smooth change in diameter, and the increase of rotation seems to prioritize an initial area with larger diameter.

Figure 11 shows the convergence curve for a Reynolds number of 420 (20 rpm wall rotation) (i.e., for the 3rd point of Fig. 10). The convergence values of the relative energy dissipation (objective function) are shown.

Fig. 11
figure 11

Convergence curve for the nozzle optimized for a Reynolds number of 420 (20 rpm wall rotation)

In order to assert the effectiveness of the material model to block the fluid flow, the relative velocity field is plotted in Fig. 12 for a Reynolds number of 420 (20 rpm wall rotation). As expected, the velocity is extremely small in the solid region of the optimized topology, showing that the material model is effective to block the fluid flow.

Fig. 12
figure 12

Plot of the relative velocity field (\(\lvert {\boldsymbol {v}}\rvert = \sqrt {{v_{r}^{2}} + v_{\theta }^{2} + {v_{z}^{2}}}\) (m/s)) in logarithmic scale for a Reynolds number of 420 (20 rpm wall rotation). The boundary line of the optimized topology is indicated in bold

Figure 13 shows the topology optimization result for a Reynolds number of 420 (20 rpm wall rotation), the pressure/velocity distributions for the post-processed result, and the 3D representation of the optimized topology. The topology optimization result is highly discrete, with a measure of non-discreteness (MND) of 1.98%.

Fig. 13
figure 13

Topology optimization result of a nozzle for a Reynolds number of 420 (20 rpm wall rotation). The pressure and velocities are computed in the post-processed result

Figure 13d shows the effect of the acceleration of the inlet fluid due to the rotating walls: first, the fluid enters without rotation (v𝜃 < 0), then the tangential velocity is increased, getting closer to the velocity on the walls (v𝜃 = 0).

Figure 13b shows that the pressure is reduced after the reduction in the nozzle cross-sectional area, but slightly increases to 0 Pa near the outlet.

6.2 Hydrocyclone-type device

The second example is the design of a hydrocyclone-type device. It differs from a real hydrocyclone device from the sense that it considers a single-phase flow (instead of a two-phase flow) entering under rotation (ωin) with a single inlet and a single outlet. By using the 2D swirl flow model, the design domain may be selected as in Fig. 14. The material distribution is being optimized on the static walls of the hydrocyclone-type device (ω0 = 0 rad/s).

Fig. 14
figure 14

Design domain for a hydrocyclone-type device

The mesh is chosen with 40 radial and 80 axial rectangular partitions of crossed triangular elements, totaling 6521 nodes and 12,800 elements. The input parameters and dimensions of the design domain that are used are shown in Table 4.

Table 4 Parameters used for the topology optimization of a hydrocyclone-type device

In order to analyze the influence of the rotation of the inlet in the optimized topology, a series of optimizations is performed for a sequence of inlet rotations. In this case, the first topology (0 rpm) considers the 30% volume fraction initial guess and the subsequent rotations consider the optimized topology of the immediately previous rotation. Figure 15 shows the objective function (relative energy dissipation) value in relation to the inlet rotation and corresponding optimized topologies. The objective function value shown corresponds to the post-processed topology (22). The maximum Reynolds number is evaluated as 795, which shows that the flow must still be laminar in all results (for 50 rpm, the values used for the Reynolds number are max(|vabs|) = 0.053 m/s , L = 15 mm , ν = 10− 6 m2/s). The initial guesses for the optimizations under rotation are the optimized topologies for each immediately lower rotation shown in Fig. 15. The optimization schemes are shown in Table 5.

Fig. 15
figure 15

Effect of the inlet rotation in the design of a hydrocyclone-type device

Table 5 Reference parameters for the optimization schemes (steps) for the hydrocyclone-type device

As can be seen in Fig. 15, the rotation has the effect of pulling up the channel to about 45 in relation to the inlet. Also, near the inlet, a ring shape (considering that it is an axisymmetric domain) starts to form when there is inlet rotation.

Table 6 shows the values of the objective function and pressure head for the optimized topologies of Fig. 15. As can be noticed in Table 6, the negative pressure head shows that the device is passive.

Table 6 Values of the objective function and pressure head for the optimized topologies of the hydrocyclone-type device after post-processing

Figure 16 shows the convergence curve for a Reynolds number of 285 (inlet rotation of 10 rpm) (i.e., for the 2nd point of Fig. 15). The convergence values of the relative energy dissipation (objective function) are shown.

Fig. 16
figure 16

Convergence curve for the hydrocyclone-type device optimized for a Reynolds number of 285 (10 rpm inlet rotation)

Figure 17 shows the topology optimization result for a Reynolds number of 285 (10 rpm inlet rotation), the pressure/velocity distributions for the post-processed result, and the 3D representation of the optimized topology. The topology optimization result is highly discrete, with a measure of non-discreteness (MND) of 2.56%.

Fig. 17
figure 17

Topology optimization result of a hydrocyclone-type device for a Reynolds number of 285 (10 rpm inlet rotation). The pressure and velocities are computed in the post-processed result

Figure 17c and d shows that, due to the inlet rotation, the outlet flow velocity is concentrated near the wall.

6.3 Two-outlet channel

The two-outlet channel problem consists of a single entrance of rotating fluid flow with two possible outlets, aiming to verify which of the two outlets the fluid should exit for lower relative energy dissipation. By using the 2D swirl flow model, the design domain may be selected as in Fig. 18. The material distribution is being optimized on the static walls of the two-outlet channel (ω0 = 0 rad/s).

Fig. 18
figure 18

Design domain for a two-outlet channel

The mesh is chosen with 40 radial and 80 axial rectangular partitions of crossed triangular elements, totaling 6521 nodes and 12,800 elements. The input parameters and dimensions of the design domain that are used are shown in Table 7.

Table 7 Parameters used for the topology optimization of a two-outlet channel

In order to analyze the influence of the flow rate and inlet rotation in the optimized topology, a series of optimizations is performed for a sequence of flow rates and inlet rotations. Figure 19 shows the objective function (relative energy dissipation) value in relation to flow rate and inlet rotation and corresponding optimized topologies. The objective function value shown corresponds to the post-processed topology (22). The maximum Reynolds number is evaluated as 148.5, which shows that the flow must still be laminar in all results (for 20 rpm and flow rate of 0.015 L/min, the values used for the Reynolds number are max(|vabs|) = 9.9 × 10− 3 m/s , L = 15 mm , ν = 10− 6 m2/s ). The optimization schemes are shown in Table 8.

Fig. 19
figure 19

Effect of the inlet rotation and flow rate in the design of a two-outlet channel

Table 8 Reference parameters for the optimization schemes (steps) for the two-outlet channel

As can be seen in Fig. 19, the flow is always choosing the upper outlet for smaller relative energy dissipation. Also, it can be noticed that the optimized topology is not a straight line connecting inlet and outlet, showing that the optimized channel bends at low rotations and higher inlet velocities. This bend becomes less pronounced at higher rotations and lower flow rates. The behavior of this bending effect is most probably due to the nature of the fluid used in the optimization (water), since it has a high inertial effect due to its high density (1000.0 kg/m3), and a low viscous friction effect due to its low viscosity (0.001 Pa s).

Table 9 shows the values of the objective function and pressure head for the optimized topologies of Fig. 19.

Table 9 Values of the objective function and pressure head for the optimized topologies of the two-outlet channel after post-processing

Figure 20 shows the convergence curve for a Reynolds number of 99 (0.01 L/min and 10 rpm inlet rotation) (i.e., for the 2nd point of the 10 rpm curve of Fig. 14). The convergence values of the relative energy dissipation (objective function) are shown.

Fig. 20
figure 20

Convergence curve for the two-outlet channel optimized for a Reynolds number of 99 (0.01 L/min and 10 rpm inlet rotation)

Figure 21 shows the topology optimization result for a Reynolds number of 99 (0.01 L/min and 10 rpm inlet rotation), the pressure/velocity distributions for the post-processed result, and the 3D representation of the optimized topology. The topology optimization result is highly discrete, with a measure of non-discreteness (MND) of 3.19%.

Fig. 21
figure 21

Topology optimization result of two-outlet channel for a Reynolds number of 99 (0.01 L/min and 10 rpm inlet rotation). The pressure and velocities are computed in the post-processed result

6.4 Two-way channel

The two-way channel problem consists of two non-rotating fluid inlets passing through rotating channels: one coming from an inner radius and the other coming from an outer radius, with opposing outlets. The flow rates of the two inlets are chosen as the same; therefore, since each inlet area is different (due to being located at different radii), the inlet velocity at the smaller radius is higher than the one located at the larger radius. This is significantly different from a normal 2D two-way channel problem, in which both inlet velocities would be the same for equal flow rates. By using the 2D swirl flow model, the design domain may be selected as in Fig. 22. The material distribution is being optimized on the rotating walls of the two-way channel.

Fig. 22
figure 22

Design domain for a two-way channel

Since the flow rate is equally divided for each inlet, \(Q_{1} = Q_{2} = \frac {Q}{2}\).

The aspect ratio’s effect is considered as (RextRint) : H, for different external radii (Rext).

The mesh is chosen with 50 ∼ 100 radial and 80 axial rectangular partitions of crossed triangular elements, totaling 8131 ∼ 16,181 nodes and 16,000 ∼32,000 elements. The input parameters and dimensions of the design domain that are used are shown in Table 10.

Table 10 Parameters used for the topology optimization of a two-way channel

In order to analyze the influence of the aspect ratio in the optimized topology, a series of optimizations is performed for three different aspect ratios. Figure 23 shows the objective function (relative energy dissipation) value in relation to the wall rotation for each aspect ratio. The objective function value shown corresponds to the post-processed topology (22). The maximum Reynolds number is evaluated as 1500, which shows that the flow must still be laminar in all results (for 50 rpm and 0.5 L/min, the values used for the Reynolds number are max(|vabs|) = 0.1 m/s , L = 15 mm , ν = 10− 6 m2/s). The optimization schemes are shown in Table 11.

Fig. 23
figure 23

Effect of the aspect ratio in the design of a two-way channel

Table 11 Reference parameters for the optimization schemes (steps) for the two-way channel

As can be seen in Fig. 23, for a 30% volume fraction, the inlets and their neighbor outlets form different channels based on the imposed rotation. It shows that the inner inlet velocity (higher) dominates the channel formation for higher aspect ratios (1.5:1 and 1:1) and low rotations (0 rpm). However, increasing the flow rate makes it more difficult for the flow to cross to higher/lower radii, forcing it to bend to the closest outlets, forming circular ring shapes (since the domain is axisymmetric). Lower aspect ratios (1:2) show the formation of two channels due to proximity. Nonetheless, increasing the flow rate shows the same effect observed for higher aspect ratios (1.5:1 and 1:1). As can be observed for 1.5:1 and 1:1 at 0 rpm, there are small fluid zones near the inner radius outlets. These zones do not have any flow rate and represent only an attempt of the optimization algorithm to create channels that linked them to an inlet.

Table 12 shows the values of the objective function and pressure head for the optimized topologies of Fig. 23. As can be noticed, some values of pressure head are positive, which means that the liquid is being pumped in these cases.

Table 12 Values of the objective function and pressure head for the optimized topologies of the two-way channel after post-processing

Figure 24 shows the convergence curve for an aspect ratio of 1:1 and a Reynolds number of 707 (30 rpm wall rotation) (i.e., for the 4th point of the 1:1 curve of Fig. 23). The convergence values of the relative energy dissipation (objective function) are shown.

Fig. 24
figure 24

Convergence curve for the two-way channel optimized for an aspect ratio of 1:1 and a Reynolds number of 707 (30 rpm wall rotation)

Figure 25 shows the topology optimization result for an aspect ratio of 1:1 and a Reynolds number of 707 (30 rpm wall rotation), the pressure/velocity distributions for the post-processed result, and the 3D representation of the optimized topology. The topology optimization result is highly discrete, with a measure of non-discreteness (MND) of 5.88%.

Fig. 25
figure 25

Topology optimization result of a two-way channel for an aspect ratio of 1:1 and a Reynolds number of 707 (30 rpm wall rotation). The pressure and velocities are computed in the post-processed result

Figure 25c shows that there is a clear difference in velocity magnitude for the inner (higher velocity) and outer (lower velocity) radii inlets. The effect of the rotating channels can be observed in Fig. 25d, where the tangential velocity is equal to the channel rotation near the walls.

7 Conclusions

In this work, a topology optimization scheme based on 2D swirl flow model is developed to design flow devices such as hydrocyclones, some pumps and turbines, and fluid separators, which present an axisymmetric flow with (or without) flow rotation around the axisymmetric axis. This formulation avoids the need of 3D models that have high computational cost to design these devices.

The numerical examples show some conceptual cases in order to demonstrate the use of the 2D swirl flow model in topology optimization. The results illustrate the effect of a rotating reference frame, the effect of a rotating inlet, the effect of a flow rate coupled with a rotating inlet, and the effect of inner and outer radii inlets and outlets. As can be noticed, a sufficiently high-flow rotation has the effect of slowing the radial and axial velocity components effect in the optimized topologies.

In most of the numerical examples, the pressure head is negative, showing that these devices are passive in relation to the fluid flow. However, in some of the numerical examples, the rotation could reach positive pressure heads, which means that the liquid is being pumped. Therefore, this formulation allows the development of novel fluidic devices such as hydrocyclones, separators, and pumps.

As future work, the use of the 2D swirl flow model in specific applications is suggested such as in pump/turbine design, the use of non-Newtonian fluid flows, and turbulence models.