Abstract
One of the current challenges in fluid topology optimization is to address these turbulent flows such that industrial or more realistic fluid flow devices can be designed. Therefore, there is a need for considering turbulence models in more efficient ways into the topology optimization framework. From the three possible approaches (DNS, LES, and RANS), the RANS approach is less computationally expensive. However, when considering the RANS models that have already been considered in fluid topology optimization (Spalart–Allmaras, k–ε, and k–ω models), they all include the additional complexity of having at least two more topology optimization coefficients (normally chosen in a “trial and error” approach). Thus, in this work, the topology optimization method is formulated based on the Wray–Agarwal model (“WA2018”), which combines modeling advantages of the k–ε model (“freestream” modeling) and the k–ω model (“near-wall” modeling), and relies on the solution of a single equation, also not requiring the computation of the wall distance. Therefore, this model requires the selection of less topology optimization parameters, while also being less computationally demanding in a topology optimization iterative framework than previously considered turbulence models. A discrete design variable configuration from the TOBS approach is adopted, which enforces a binary variables solution through a linearization, making it possible to achieve clearly defined topologies (solid–fluid) (i.e., with clearly defined boundaries during the topology optimization iterations), while also lessening the dependency of the material model penalization in the optimization process (Souza et al. 2021) and possibly reducing the number of topology optimization iterations until convergence. The traditional pseudo-density material model for topology optimization is adopted with a nodal (instead of element-wise) design variable, which enables the use of a PDE-based (Helmholtz) pseudo-density filter alongside the TOBS approach. The formulation is presented for axisymmetric flows with rotation around an axis (“2D swirl flow model”). Numerical examples are presented for some turbulent 2D swirl flow configurations in order to illustrate the approach.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
When there are higher velocities in the fluid flow (i.e., higher Reynolds numbers), a turbulent behavior may be induced. The turbulent behavior is characterized for being chaotic, diffusive, dissipative, and intermittent (Saad 2007), and is present in most flows in nature. In order to model the turbulent behavior, there are essentially three approaches: DNS (Direct Numeric Simulation) (Orszag 1970), LES (Large Eddy Simulation) (Smagorinsky 1963; Deardorff 1970), and RANS (Reynolds-Averaged Navier–Stokes) (Reynolds 1895). The first approach (DNS) consists of considering the Navier–Stokes equations with a mesh resolution that is capable of considering the smallest scale vortices, which poses a high computational cost, while the second approach (LES) poses a somewhat smaller computational cost due to it filtering smaller scale vortices. However, the RANS approach poses a lower computational cost in relation to DNS and LES, due to it considering statistical time-averaging, which leads to the possibility of considering a coarser mesh in RANS with respect to DNS/LES (Celik 2003).
The topology optimization method applied for fluid flow is an optimization method that relies on spatially distributing the design variable that defines the solid/fluid material throughout a given design domain. It initially started with simpler flows (Stokes flows) (Borrvall and Petersson 2003), but was extended in the following years to more complex flow physics, such as Navier–Stokes flows (Evgrafov 2004; Olesen et al. 2006), non-Newtonian flows (Pingen and Maute 2010; Hyun et al. 2014; Romero and Silva 2017), thermal-fluid flows (Sato et al. 2018; Ramalingom et al. 2018), unsteady flows (Nørgaard et al. 2016), turbulent flows (Papoutsis-Kiachagias et al. 2011; Yoon 2016; Dilgen et al. 2018; Yoon 2020; Sá et al. 2021), etc. Specific applications have also been considered such as rectifiers (Jensen et al. 2012), valves (Song et al. 2009), mixers (Andreasen et al. 2009), and flow machine rotors (Romero and Silva 2014; Sá et al. 2018; Alonso et al. 2019; Sá et al. 2021). The topology optimization method may be implemented in various forms such as the “pseudo-density approach” (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). The “pseudo-density approach” is the one considered in this work, and is based on the inclusion of an interpolation function between the solid and fluid materials. When considering topology optimization with the “pseudo-density approach,” the design variable may be considered in different ways by the optimizer: the continuous approach, which allows the appearance of intermediary (“gray”) design variable values during topology optimization (such as MMA (Method of Moving Asymptotes) (Svanberg 1987) and IPOPT (Interior Point Optimization) (Wächter and Biegler 2006)), and the discrete approach, which allows the design variable to assume only one of two states (solid (0) or fluid (1)) (such as TOBS (Sivapuram and Picelli 2018; Sivapuram et al. 2018; Souza et al. 2021)). Using a discrete approach allows the design variable to be always discrete, meaning that it may become easier to achieve a discrete optimized topology than the continuous approach. Therefore, in this work, the discrete approach is considered, in the form of the TOBS algorithm.
One of the current challenges in fluid topology optimization is to address high Reynolds number flows (i.e., turbulent flows) such that industrial or more realistic fluid flow devices can be designed. This means that there is a need for considering turbulence models in more efficient ways into the topology optimization framework. The topology optimization of turbulent flows is mostly centered around RANS models, due to their reduced computational cost with respect to DNS/LES. The first turbulence model to be considered in topology optimization is the one-equation Spalart–Allmaras model (Spalart and Allmaras 1994), which does not require overly high resolution in wall-bounded flows with respect to two-equation turbulent models (Bardina et al. 1997) and also shows good convergence for simple flows (Bardina et al. 1997). In topology optimization, the Spalart–Allmaras equations are changed in order to take the solid material modeling into account (Papoutsis-Kiachagias et al. 2011; Kontoleontos et al. 2013; Papoutsis-Kiachagias and Giannakoglou 2016; Yoon 2016). The Spalart–Allmaras equation relies on the computation of the wall distance, which changes during topology optimization according to the design variable, meaning that this sensitivity also needs to be included in the turbulent flow topology optimization formulation. The wall distance can be considered by the solution of a modified Eikonal equation (Yoon 2016) or a stabilized Eikonal equation (Sá et al. 2021). Two equation turbulent models (k–ε and k–ω) have also been considered (Dilgen et al. 2018; Yoon 2020). One problem these turbulence models face is the amount of parameters that have to be adjusted for topology optimization besides the additional coefficient in the Navier–Stokes equations: in the case of the Spalart–Allmaras model, there are two additional coefficients (in the Spalart–Allmaras equation, and in the wall distance equation) (Yoon 2016); in the k–ε and k–ω models, there are also two additional coefficients (one for the equation of each variable, although some authors may try to simplify by a single additional coefficient) (Dilgen et al. 2018; Yoon 2020). From a combinatorial point of view, by considering that each coefficient amounts for “\(n_\text {pv}\)” possible values for topology optimization, the total amount of coefficients to be considered (in the three sets of equations: the Navier–Stokes equations, and the two equations required for the turbulent model) becomes elevated to the third power (“\(n_\text {pv}^3\)”). It can be reminded that although an empirical rule based on the Darcy number (Dilgen et al. 2018) can be used for the coefficient of the Navier–Stokes equations, it is not definitive, and higher or lower coefficient values may be necessary depending on the fluid flow problem. This means that adjusting these coefficients for topology optimization would rely on a “trial and error” approach, and may become a hassle the higher the quantity of adjustable topology optimization coefficients. It can also be mentioned that some topology optimization configurations may require finding specific coefficient values that are able to achieve a feasible and discrete optimized topology, which may not be easy to perform depending on the problem. In order to face this problem, it would be better for topology optimization if the turbulent model could be as simple as the Spalart–Allmaras model (i.e., a single-equation model that does not require the use of a wall function), not require the computation of the wall distance, and also achieve simulation results that approach simulations from the k–ε and k–ω models, which are often considered in the CFD community.
The Wray–Agarwal model is a single-equation turbulence model (similarly to the Spalart–Allmaras model), which combines the advantages of the k–ω model (“near-wall” modeling) and the k–ε model (“freestream” modeling). It is also partly based on the SST k–ω model. According to Wray and Agarwal (2015), the Wray–Agarwal model can lead to more accurate boundary layer separation predictions than the Spalart–Allmaras model, and it is also said to be competitive with the SST k–ω model for wall-bounded flows. The 2018 version of the Wray–Agarwal model (“WA2018”) is presented in Han et al. (2018), and its main advantage is that this variant does not require the computation of the wall distance. This fact alone means that less optimization parameters are needed to be calibrated “by hand” for topology optimization. Furthermore, since, in topology optimization, it is required to perform the computation of the forward model (i.e., the simulation) and the computation of the adjoint model, the matrix systems of equations to be solved are, when considering the Wray–Agarwal model (“WA2018”), less in quantity or smaller than the other mentioned turbulence models (when considering the forward and adjoint models), meaning that the Wray–Agarwal model (“WA2018”) would be less computationally demanding in a topology optimization iterative framework. Therefore, the Wray–Agarwal model (“WA2018”) is considered in this work. It can be highlighted that no previous work has considered the Wray–Agarwal model in topology optimization. In addition, the topology optimization implementation is performed by considering discrete design variable configurations, based on the TOBS approach. The TOBS approach enforces a binary variables solution through a linearization, which makes it possible to achieve clearly defined topologies (solid–fluid), while also lessening the dependency of the material model penalization in the topology optimization iterations (Souza et al. 2021).
When the fluid flow is characterized by an axisymmetric flow with a rotation around an axis (swirl flow), the fluid flow may be modeled by a “2D swirl flow model,” which is capable of modeling, for example, hydrocyclones, some pumps and turbines, and fluid separators. The main advantage of this type of model is that it simplifies the complete 3D fluid flow model (which is more computationally expensive), reducing the computational cost by using a 2D axisymmetric mesh. It can be highlighted that topology optimization has still not been applied to turbulent 2D swirl flow.
Therefore, the main objectives of this work are to include the turbulent flow modeling (Wray–Agarwal model) in the 2D swirl flow topology optimization formulation, and also to consider the TOBS approach (Sivapuram and Picelli 2018; Sivapuram et al. 2018). The objective of the optimization is to minimize the relative energy dissipation considering the viscous, turbulent, porous, and inertial effects (Borrvall and Petersson 2003; Yoon 2016; Alonso et al. 2019). The traditional material model of fluid topology optimization (Borrvall and Petersson 2003) is adopted by considering nodal design variables, which enables the use of a PDE-based pseudo-density filter with the TOBS approach. It can be reminded that an element-wise design variable would not feature a first derivative, which is a requirement for considering the Helmholtz pseudo-density filter formulation.
This paper is organized as follows: in Sect. 2, the fluid flow model for the turbulent 2D swirl flow is briefly derived; in Sect. 3, the topology optimization problem is stated by considering the Brinkman model; in Sect. 5, the numerical implementation is briefly described; in Sect. 6, some numerical examples are presented; and in Section 7, some conclusions are inferred.
2 Equilibrium equations
The fluid flow is modeled from the continuity and linear momentum (Navier–Stokes) equations, incompressible fluid, steady-state regime, and a turbulent model considered through a RANS (Reynolds-Averaged Navier–Stokes) approach.
2.1 2D swirl flow model
When considering a rotating reference frame, the continuity and Navier–Stokes equations according to the Brinkman model become (Munson et al. 2009; White 2011; Romero and Silva 2014)
where \({\varvec{v}}\) is the relative statistical time-averaged velocity of the fluid flow, p is the statistical time-averaged pressure of the fluid flow, \(\rho\) is the fluid density, \(\mu\) is the dynamic viscosity of the fluid, \(\rho {\varvec{f}}\) is the body force per unit volume acting on the fluid, \({\varvec{r}}\) is radial position in the fluid with respect to the rotation axis (in 2D swirl flow, it is equivalent to use \({\varvec{s}}\) (position of the fluid)), \({\wedge }\) is used to denote cross product, \(- \kappa (\alpha ) {\varvec{v}}_\text {mat}\) is the resistance force of the porous medium considered in topology optimization, \(\kappa (\alpha )\) is called inverse permeability (“absorption coefficient”), \({\varvec{v}}_{\text {mat}}\) is the velocity of the fluid in relation to the porous material (in 2D swirl flow, \({\varvec{v}}_{\text {mat}} = (v_{r},\ v_\theta - \omega _{\text {mat}}r,\ v_{z})\), where \(\omega _{\text {mat}}\) is the rotation of the porous material relative to the reference frame)), \(\alpha\) is the pseudo-density, which may achieve values given as 0 (solid) or 1 (fluid) (and is the design variable in topology optimization), \({\varvec{T}}_R\) is the Reynolds (turbulent) stress tensor from the RANS model being considered, and \({\varvec{T}}\) is the fluid stress tensor given by
The 2D swirl flow model (“2D axisymmetric model with swirl”) is based on the considerations of axisymmetrical flow and cylindrical coordinates (see Fig. 1), which means that the position and velocity are given by
From considering axisymmetry, the derivatives of the state variables (\({\varvec{v}}\) and p) in the \(\theta\) direction are set to zero (i.e., \(\frac{\partial v_r}{\partial \theta } = \frac{\partial v_{\theta }}{\partial \theta } = \frac{\partial v_z}{\partial \theta } = \frac{\partial p}{\partial \theta } = 0\)). Also, the definitions of the differential operators (i.e., gradient, divergent and curl) are given in cylindrical coordinates.
2.2 Wray–Agarwal turbulence model
The Wray–Agarwal turbulence model is a single-equation turbulence RANS model, which consists of a combination of the advantages of the near-wall modeling from the k–\(\omega\) model with the freestream modeling from the k–\(\varepsilon\) model (Wray and Agarwal 2015), being also partly based on the SST k–\(\omega\) model (Wray and Agarwal 2015). Wray and Agarwal (2015) show that the Wray–Agarwal turbulence model leads to more accurate boundary layer separation predictions than the Spalart–Allmaras model, and that it is also competitive with the SST k–\(\omega\) model for wall-bounded flows. Throughout the years, several evaluations, improvements, and variations have been developed (Han et al. 2015; Wray and Agarwal 2016; Zhang et al. 2016; Han et al. 2017, 2018). Particularly in this work, the 2018 version (referred in Han et al. (2018) as “WA2018”) is considered. The main advantage of the 2018 version is that it does not rely on the computation of the wall distance. Not needing to compute the wall distance is advantageous in a topology optimization point of view, because the wall distance computation requires an additional penalization term (Yoon 2016) in order to account for the modeled solid material, which needs to be calibrated (i.e., adequately chosen) for obtaining the optimized topology. An additional term to account for the attenuation of turbulence in the porous medium is included in this work by re-deducing the Wray–Agarwal model equations while including the attenuation of turbulence in the k–\(\omega\) model equations (in a similar fashion as Yoon (2016), Papoutsis-Kiachagias and Giannakoglou (2016), and Dilgen et al. (2018)). Therefore, the Wray–Agarwal model (2018) (Han et al. 2018) modified for topology optimization becomes
where \(R_\text {T}\) is the undamped eddy (turbulent) viscosity, and \(\lambda _{R_\text {T}}\) is an adjustable parameter for the intensity of the attenuation of turbulence inside the modeled solid material. The other terms of Eq. (7) are specified as follows (Han et al. 2018):
where \(\kappa = 0.41\) is the von Kármán constant, and \(\nu = \frac{\mu }{\rho }\) is the kinematic viscosity.
It can be noticed that the term that accounts for the attenuation of turbulence in the porous medium in Eq. (7) assumes that, inside a modeled solid material, RT = 0 m2/s.
With respect to the additional parameter \(\lambda _{R_\text {T}}\), it may be noticed that it is similar to the penalization parameters included in other turbulence models for topology optimization (Yoon 2016; Dilgen et al. 2018; Yoon 2020). Although some references assume all additional penalization parameters as being equal to 1, this may not always be the best choice, since the topology optimization may behave better for a higher or a lower value. In fact, in the present work, the optimized topologies from the Appendices consider values that are higher than 1. Also, in the case of two-equation models, such as the k–\(\omega\) model, it is unknown if the same coefficient should really be used for the k and \(\omega\) equations. Experimentally, the turbulence coefficients of these equations are different, which means that these two equations should probably be penalized differently. This effect may be “shadowed” by highly penalizing both equations, but the problem should still remain and may possibly affect the topology optimization iterations. For the case of the Spalart–Allmaras model, it may be mentioned that the penalization parameter is chosen differently than 1 in Yoon (2016), and that the additional penalization parameter of the modified Eikonal equation has to be calibrated for the given problem and is normally not set as equal to 1 (Yoon 2016). In some problems, it may be better to consider a “stronger” modeled solid material wall, while it may be better to relax it in other cases. Moreso, depending on the distribution of the design variable, it may be necessary to increase the “relaxation term” that is shown in Yoon (2016), for allowing convergence.
2.3 Boundary value problem
A computational domain is illustrated in Fig. 2 for showing the boundaries that are considered in this work. The boundary value problem for the 2D swirl flow model can then be stated as follows:
2.4 Weak formulation
As will be mentioned in Sect. 5, the finite element method is needed for the scheme used for the automatic derivation of the adjoint model, which means that it is necessary to define the weak formulation. The derivation of the weak form is given by considering the weighted-residual and Galerkin methods for the mixed (velocity–pressure) formulation as follows (Reddy and Gartling 2010; Alonso et al. 2018):
where the subscripts “c,” “m,” and “\(\text {WA2018}\)” refer to the “continuity” equation, the “linear momentum” (Navier–Stokes) equations, and the “Wray–Agarwal (2018)” equation, respectively. The test functions of the state variables (p, \({\varvec{v}}\) , and \(R_\text {T}\)) are given by \({\textit{w}}_{p}\), \({{\varvec{w}}}_{v}\) , and \({\textit{w}}_{R_\text {T}}\), respectively. When considering 2D swirl flow, since the integration domain (\(2\pi r d {\Omega }\)) contains a constant multiplier (\(2\pi\)), which does not pose influence when solving the weak form, Eqs. (10), (11), and (12) are given divided by \(2\pi\) (Alonso et al. 2018, 2019).
From the mutual independence of the test functions, the three equations of the weak form can be summed to a single equation:
3 Formulation of the topology optimization problem
3.1 Material model
The material model is the change in the fluid flow equations that controls how the design variable (pseudo-density) influences the fluid flow simulation (\(\alpha = 0\) for solid, and \(\alpha = 1\) for fluid). In the case of fluid flow topology optimization, it serves so as to block parts of the fluid flow according to the design variable (pseudo-density), while also helping to guide the optimization process. Borrvall and Petersson (2003) suggest the following convex interpolation function for the material model for fluid flow (also known as “inverse permeability”):
where the inverse permeability (\(\kappa (\alpha )\)) is bounded by \(\kappa _{\text {max}}\) (maximum value) and \(\kappa _{\text {min}}\) (minimum value). The penalization parameter, referred as q (\(q > 0\)), controls the convexity (relaxation) of the material model. Large values of q imply a less relaxed material model.
3.2 Topology optimization problem
The topology optimization problem is formulated as follows:
where f is the specified volume fraction, \(V_{0} = \int _{ {\Omega }_{\alpha }}2\pi r d {\Omega }_{\alpha }\) is the volume of the design domain (\({\Omega }_{\alpha }\)), \({ {\Phi }}_{\text {rel}}(p(\alpha ),{\varvec{v}}(\alpha ), R_{\text {T}}(\alpha ),\alpha )\) is the objective function, and \(p(\alpha )\), \({\varvec{v}}(\alpha )\) , and \(R_{\text {T}}(\alpha )\) are, respectively, the pressure, the velocity, and the undamped eddy viscosity obtained from the solution of the boundary value problem (Eq. (9)), which features an indirect dependency with respect to the design variable \(\alpha\).
3.3 Objective function
The objective function is selected as the relative energy dissipation (\({\Phi }_{\text {rel}}\)), as defined in Alonso et al. (2018), which is based on the definition of energy dissipation from Borrvall and Petersson (2003) and includes inertial effects. In this work, it also includes the turbulence effect (similarly to Yoon (2016)), defining a “total relative energy dissipation.” By considering zero external body forces,
3.4 Sensitivity analysis
The sensitivity is given by the adjoint method as
where the weak form is given by \({F} = 0\), “*” represents conjugate transpose, and \({{\varvec{\lambda }}}_{ {\Phi }_{\text {rel}}}\) is the adjoint variable (Lagrange multiplier of the weak form).
3.5 Helmholtz pseudo-density filter
The topology optimization results in this work consider the use of a Helmholtz pseudo-density filter, which is a PDE-based topology optimization pseudo-density filter (Lazarov and Sigmund 2010), for regularization. This filter is shown schematically in Fig. 3, where \(\alpha\) represents the original distribution (i.e., before applying the filter) of the design variable and \({\alpha }_{f}\) is the filtered distribution of the design variable (i.e., after applying the filter).
As represented in Fig. 3, the Helmholtz pseudo-density filter is equivalent to weighting each value of the original design variable (\(\alpha\)) with a Green’s function, which is a function that is always positive and whose integral is equal to 1 (Lazarov and Sigmund 2010). If the filter length parameter (\(r_H\)) is chosen with a small value, this Green’s function approaches a Dirac’s delta function (\({\alpha }_{f} \xrightarrow []{r_H\rightarrow 0^{+}} \alpha\)). This Green’s function averaging is equivalent to the solution of a modified Helmholtz equation with homogeneous Neumann boundary conditions, whose boundary value problem is given by (Lazarov and Sigmund 2010; Zauderer 1989)
where \({\alpha }\) is the original design variable (i.e., before applying the filter), \({\alpha }_{f}\) is the filtered design variable (i.e., after applying the filter), and \(r_H\) is the filter length parameter.
The weak form is obtained by multiplying Eq. (19) by the test function \({\textit{w}}_{HF}\) and integrating in the whole design domain as follows:
When considering a Helmholtz pseudo-density filter in topology optimization, \(\alpha\) is replaced by \({\alpha }_{f}\) in all of the fluid flow equations, including the objective function (i.e., Eqs. (10), (11), (12), and (16)), and the sensitivities include the dependency of \({\alpha }_{f}\) with respect to \(\alpha\) (from the chain rule, \(\frac{d {\Phi }_{\text {rel}}}{d \alpha } = \frac{d {\Phi }_{\text {rel}}}{d{\alpha }_{f}} \frac{d {\alpha }_{f}}{d\alpha }\)) (Lazarov and Sigmund 2010).
4 TOBS approach
The TOBS (Topology Optimization of Binary Structures) algorithm (Sivapuram and Picelli 2018; Sivapuram et al. 2018) consists of a binary variables’ formulation which is given by sequentially solving linearized integer variable problems (considering \(\alpha _{lb} = 0\) (lower bound) and \(\alpha _{ub} = 1\) (upper bound)). In order to present a generic formulation adequate to this work, the TOBS formulation is rewritten with respect to the following generic topology optimization problem:
where \(J(\alpha )\) is the objective/multi-objective function, \(c_{\text {eq},i}(\alpha )\) is the definition of the equality constraint i, \(c_{\text {ineq},i}(\alpha )\) is the definition of the inequality constraint i, \(n_\text {eq}\) is the number of equality constraints, \(n_\text {ineq}\) is the number of inequality constraints, \(\alpha _{ub}\) is the upper bound of the design variable, and \(\alpha _{lb}\) is the lower bound of the design variable. It can be reminded that, for the optimizer, Eq. (21) consists of a multivariable optimization problem, in which the number of variables is given by the quantity of values of the design variable (\(n_\alpha\)) that are distributed over the mesh, obtained by considering the finite element modeling.
Essentially, in the TOBS approach, the optimization problem from Eq. (21) is successively solved as the following linearized formulation for the variation of the design variable (“design variable step,” \({\Delta }\alpha\)):
where \(\alpha\) is the value of the design variable in the beginning of the iteration of the optimization, \(\left. \frac{\text{{d}}{J}}{\text{{d}}\alpha }\right| _{\alpha = \alpha }\) and \(\left. \frac{\text{{d}}c_{\text {ineq},i}}{\text{{d}}\alpha }\right| _{\alpha = \alpha }\) are the sensitivities of the objective function and the inequality constraints computed at \(\alpha\), respectively, \(\beta _\text {flip\ limit}\) is a factor that limits the “number of flips/jumps” of \(\alpha\) from one discrete value to another (0 or 1), \(n_\alpha\) is the quantity of values of the design variable (\(\alpha\)) that are distributed over the mesh, \(|\!| {\Delta }\alpha |\!|_{1}\) is the one-norm (\(\ell _1\) norm) of \({\Delta }\alpha\), and the next value of the design variable is given as \(\alpha + {\Delta }\alpha\). It can be noticed that equality constraints (\(c_{\text {eq},i}(\alpha )\)) that are computed with floating point numbers are numerically extremely hard (if not impossible) to be exactly satisfied, which may lead to linearized problems with “impossible” integer solutions. In such case, the equality constraints should be substituted in Eq. (21) by inequality constraints with a given variation around the bounds (i.e., \(c_{\text {eq},i}(\alpha ) - \delta _\text {eq, i} \leqslant 0\) and \(-(c_{\text {eq},i}(\alpha ) + \delta _\text {eq, i}) \leqslant 0\), where \(\delta _\text {eq, i}\) is a small bound for the definition of the equality constraints converted to inequality constraints). Therefore, the number of inequality constraints becomes \(n_\text {ineq} + 2 n_\text {eq}\).
The truncation error constraint is included in order to keep the truncation error of the linearization small (Sivapuram and Picelli 2018). The linearized inequality constraint bound (\({ {\Delta }}c_{\text {ineq},i}(\alpha )\)) is relaxed in order to guarantee that the integer solution of the linearized problem is feasible (Sivapuram and Picelli 2018). This relaxation essentially changes the value of \({\Delta} c_{\text {ineq},i}(\alpha )\) when \(c_{\text {ineq},i}\) is “far” (based on a reference value (\(c_{\text {ref}, i}\))). Then, the relaxation presented in Sivapuram and Picelli (2018) becomes
where \(0< \varepsilon _\text {relax} < 1\) is a constraint relaxation parameter, and \(c_{\text {ref}, i} \ne 0\) is a reference value for the constraint i. The reference value \(c_{\text {ref}, i}\) is a representative value for the magnitude of the values that are achievable in the constraint, in order to define the size of the linearized interval. The reference value \(c_{\text {ref}, i}\) cannot be set as 0, otherwise Eq. (23) becomes \({\Delta}c_{\text {ineq},i}(\alpha ) = -\varepsilon _\text {relax}\Big |{c_{\text {ineq},i}(\alpha )}\), meaning that the linearized interval disappeared from the formulation. Equation (23) is illustrated in Fig. 4: when \(c_{\text {ineq},i}(\alpha ) > \frac{\varepsilon _\text {relax}c_{\text {ref}, i}}{1 - \varepsilon _\text {relax}}\), the constraint bound is “softened,” widening the solution space; when \(\frac{-\varepsilon_\text{relax} c_{{\text {ref}}, i}}{1 + \varepsilon _\text {relax}}< c_{\text {ineq},i}(\alpha ) < \frac{\varepsilon _\text{relax}c_{\text {ref}, i}}{1 - \varepsilon _\text {relax}}\), the linearized value is used for the constraint bound; and when \(c_{\text {ineq},i}(\alpha ) < \frac{-\varepsilon _\text {relax}c_{\text {ref}, i}}{1 + \varepsilon _\text {relax}}\), the constraint bound is “stricter,” decreasing the solution space to enforce a feasible or near-feasible value. The red-colored vertical arrows represent the change in the solution space from the linearized constraint when considering the relaxation. The solution space is represented in dark blue color, and represents the possible values for \(\left. \frac{\text{{d}}c_{\text {ineq},i}}{\text{{d}}\alpha }\right| _{\alpha = \alpha } {\Delta }\alpha\) (from Eq. (22)).
The convergence criterion can be analyzed from successive objective function values (Huang and Xie 2007) or when there are no more changes in the topology (\({\Delta }\alpha = 0\)). The solution of the TOBS linearized problem [Eq. (22)] is performed by an integer programming optimizer, such as the commercial software CPLEX® (from IBM), or the open source software CBC (from the COIN-OR project).
It can be mentioned that the numerical implementation of the TOBS algorithm includes additional normalizations (from the source code from Sivapuram and Picelli (2018)), which are \(\left. \frac{\text{{d}}{J}}{\text{{d}}\alpha }\right| _{\alpha = \alpha } {\Delta }\alpha\) is divided by \(\text {max}\left[ \left. \frac{\text{{d}}{J}}{\text{{d}}\alpha }\right| _{\alpha = \alpha }\right]\), while \(\left. \frac{\text{{d}}c_{\text {ineq},i}}{\text{{d}}\alpha }\right| _{\alpha = \alpha } {\Delta }\alpha \leqslant \ {\Delta}c_{\text {ineq},i}(\alpha )\) is divided by \(\text {max}\left[ \left. \frac{\text{{d}}c_{\text {ineq},i}}{\text{{d}}\alpha }\right| _{\alpha = \alpha }\right]\).
5 Numerical implementation of the optimization problem
The fluid flow simulation is computed in the OpenFOAM® software (version from “The OpenFOAM foundation”) (Weller et al. 1998; Chen et al. 2014), which is able to efficiently compute the turbulent fluid flow simulation. The other platform that is considered is FEniCS (Logg et al. 2012), which is a finite elements software based on automatic differentiation and relies on a high-level language for representing the weak form and functionals for later assembling the finite element matrices. Besides being more computationally efficient than FEniCS to model turbulent fluid flow (Mortensen et al. 2011), OpenFOAM® also avoids the need of including possibly counter-intuitive modifications to the finite element model just for trying to achieve the convergence of the simulation (Mortensen et al. 2011) such as intermediary projections, derivative approximations, preconditioning part of the system of equations, pseudo-transient solution, and additional value limiters. The SIMPLE (Semi-Implicit Method for Pressure-Linked Equations) algorithm (Patankar 1980; OpenFOAM 2014) is considered for the simulations. The implementation of the Wray–Agarwal model (2018) in OpenFOAM® is based on the implementation of its original authors (CFD group 2020). Thus, on the one hand, the main disadvantage of OpenFOAM® is that it does not provide an easy and efficient way to automatically derive the adjoint model. On the other hand, although FEniCS is not efficient for turbulent flow simulation, it may be used to automatically generate an efficient adjoint model with the dolfin-adjoint library (Farrell et al. 2013; Mitusch et al. 2019). For the automatic derivation of the adjoint model, the primal equations of the finite element method must be implemented in FEniCS (Sect. 2.4). The automatic differentiation from FEniCS is based on operator overloading in its high-level language (UFL). The variable values in OpenFOAM® are mapped to discrete variables in FEniCS, and then projected into the state variables in FEniCS, including a small smoothing (Alonso et al. 2021).
The solution of the TOBS linearized problem (Eq. (22)) is performed by the integer programming optimizer CPLEX®, because it is currently faster than CBC and provides an academic license.
The implementation of the topology optimization method is shown in Fig. 5. From the initial guess for the pseudo-density distribution inside the design domain, the adjoint model is “annotated” by dolfin-adjoint for the automatic derivation of the adjoint model. Then, the TOBS optimization loop is started. First, the TOBS linearization is performed (Eq. (23)), while communicating with dolfin-adjoint for computing the objective function, constraints, and sensitivities. The sensitivities are computed from the adjoint model, with the state variable values coming from the simulation performed in OpenFOAM®. Continuing the TOBS optimization loop, the integer programming optimizer (CPLEX®) is called, the topology is updated, and the convergence is verified with a specified tolerance for the change in the pseudo-density distribution (convergence criterion).
The sensitivities (of the objective function and constraint) are adjusted by the volume of each element, which is similar to considering the use of a Riesz map in the sensitivity analysis and has the effect of leading to mesh-independency in the computed sensitivities (Schwedes et al. 2017). The mesh-independency effect of the Riesz map is particularly interesting when considering non-uniform meshes, where the non-adjusted sensitivity distribution may be a seemingly less-smooth distribution and may hinder the topology optimization process. In the case of the 2D swirl flow model, the elements can be viewed in 3D as “ring-shaped,” which means that there is a linear non-uniformity in the mesh when comparing lower and higher radii. In the case of a nodal design variable, the adjusted sensitivity is given by
where \(V_\text {nel}\) is the sum of the volumes of the neighbor elements that touch a node/vertex in the mesh, and \(n_\text {nodes}\) is the number of nodes/vertices in the mesh. In the 2D swirl flow model, the volumes are computed by considering axisymmetry (i.e., “ring-shaped” element volumes).
A comparison of the computed sensitivities from dolfin-adjoint with respect to finite differences can be seen in Appendix A.
5.1 Finite element modeling
For the finite elements implementation that is required for the automatic derivation of the adjoint model used in this work, it is necessary to define the finite element modeling. In order to consider a numerically stable finite elements formulation (Brezzi and Fortin 1991; Reddy and Gartling 2010; Langtangen and Logg 2016), MINI elements (Arnold et al. 1984; Logg et al. 2012) are used for coupling the discretizations of pressure and velocity (see Fig. 6). MINI elements are composed of 1st degree interpolation enriched by a 3rd degree bubble function for the velocity (P1+B3 element), and 1st degree interpolation for the pressure (P1 element). By comparing with the traditional Taylor–Hood elements (2nd degree interpolation for the velocity), the advantage of considering MINI elements is their lower computational cost (due to their lower interpolation degree). The undamped eddy viscosity (from the Wray–Agarwal model (2018)) is considered with a 1st degree interpolation (P1 element). The pseudo-density (design variable) is also considered with a 1st degree interpolation (P1 element).
6 Numerical results
In the numerical results, the fluid is water, with a dynamic viscosity (\(\mu\)) of 0.001 Pa s, and a density (\(\rho\)) of 1000.0 kg/m3.
The mesh is structured, and the elements inside it are distributed according to Fig. 7.
In order to scale the equations to increase the convergence rate of the calculation of the functionals and sensitivities in FEniCS/dolfin-adjoint, the MMGS (Millimeters–Grams–Seconds) unit system is used (i.e., the length and mass units are multiplied by a \({10^3}\) factor).
The specified tolerance for the TOBS algorithm is that the change in the pseudo-density distribution (\({\Delta }\alpha\)) is sufficiently small. In this work, the optimization is progressed until \({\Delta }\alpha = 0\).
External body forces are disregarded in the numerical examples (\(\rho {\varvec{f}} = (0,\ 0,\ 0)\)), and the specified fluid volume fraction (f) is selected as 30%. The porous medium is assumed to be under the same rotation of the reference frame (\({\varvec{v}}_{\text {mat}} = {\varvec{v}}\)), and \(\kappa _{\text {min}} = 0 \text { kg}/(\text { m}^3 \text { s})\). The initial guess for the pseudo-density (design variable) distribution is chosen differently for each numerical example. The plots of the optimized topologies are given for the values of the pseudo-density (design variable) in the center of each finite element. The letter n is used for rotation in rpm, and \(\omega\) is used for rotation in rad/s.
In the TOBS algorithm, the reference value “\(c_{\text {ref}, V}\)” (for the volume constraint) is chosen as \(f V_0\), as in previous works that consider the TOBS approach (Sivapuram and Picelli 2018; Sivapuram et al. 2018).
The pseudo-density (design variable) values in the optimized topologies are post-processed by smoothing the resulting contour (Fig. 8). All of the computed values, with the exception of the convergence curves, are computed in the post-processed meshes.
For simplicity, the Reynolds number is shown as the maximum value of the local Reynolds number based on the external diameter:
where the absolute velocity (\({\varvec{v}}_{\text {abs}}\)) varies in each position of the computational domain, \(r_{{ext}}\) is the external radius of the computational domain (depicted as “R” in the first two numerical examples, and as “\(r_{{ext}}\)” in the last numerical example), and \(\rho\) is the density. The maximum inlet Reynolds number (considering only the inlet velocity) is also defined from eq. (25) (\(\text {Re}_{\text {in,max}}\)), but with only the velocity from the inlet profile (\({\varvec{v}}_{\text {abs},in}\)).
Since the objective of the relative energy dissipation objective function (Eq. (16)) is to indirectly maximize the pressure head (or, equivalently, minimize the head loss), the definition of the pressure head is shown as
where g is the gravity acceleration (9.8 m/s2).
From Eq. (26), the head loss is given as
The isentropic efficiency may be used for pump devices in order to characterize their efficiency (Rey Ladino 2004; Sonntag and Borgnakke 2013), being given as
where \({{\Delta }h_{s} = g H}\) is the variation of specific enthalpy (specific work) in the ideal process (Sonntag and Borgnakke 2013), \(\dot{m} = \rho Q\) is the mass flow rate, and \(P_{f}\) is the fluid power given by
The TOBS approach is considered for \(\varepsilon _\text {relax} = 0.2\) and \(\beta _\text {flip\ limit} = 0.01\), except if explicitly written otherwise.
The inlet values for the turbulent variable (\({R_{\text {T}, in}}\)) are given from the turbulence intensity (\(I_T\)) and the turbulence length scale (\(\ell _T\)) based on the local absolute velocity on the inlet (\(\left| {{\varvec{v}}_{\text {abs}, in}}\right|\)) as
where \(\Big |{{\varvec{v}}_{\text {abs}, in}}\Big |\) is the local absolute velocity on the inlet, and \(n_{v}\) is the number of velocity components (for 2D, \(n_{v} = 2\); for 2D swirl, \(n_{v} = 3\)). In this work, \(\ell _T\) is selected as \(\ell _T = 0.07 C_{\mu }^{1/4} \ell _{\text {in}}\) (COMSOL 2018; CFD Online 2020) where \(\ell _{\text {in}}\) is the width (or diameter, in the nozzle example) of the inlet.
The inlet velocity profiles are considered to be parabolic for laminar flow, and are considered to be turbulent for turbulent flow. The turbulent velocity profiles are implemented according to De Chant (2005), which is similar to the 1/7th power law (Munson et al. 2009), in which the velocity profile is analytically deduced from a simplified fluid flow model.
In order to accelerate the execution of the optimization, the OpenFOAM® simulation for each optimization step reuses the simulation result from the immediately previous optimization step. A maximum number of SIMPLE iterations per optimization step is also considered, which is set, in this work, as 2000.
Three numerical examples are presented, for evaluating the effect of the wall rotation (rotating nozzle), evaluating the effect of the inlet rotation, and evaluating in a pump device. Additionally, Appendices B and C present a 2D double-pipe design and a 2D U-bend channel design, respectively, in order to show the Wray–Agarwal model (2018) being applied for topology optimization in 2D cases. Appendix B also considers a topology with some circles as the initial guess for topology optimization.
6.1 Rotating nozzle
The first example is the design of a rotating nozzle. A nozzle is used to control the characteristics of the fluid flow entering or leaving another fluid device. This type of design has been previously evaluated for laminar 2D swirl flow by Alonso et al. (2018). Figure 9 shows the design domain that is considered in this case. Since the nozzle is rotating, the solid material distribution is optimized for these rotating walls under the same rotation of the reference frame (\(\omega _0\)).
The mesh consists of 19,401 nodes and 38,400 elements (i.e., 80 radial and 120 axial rectangular partitions of crossed triangular elements, see Fig. 10). The input parameters, geometric dimensions, and material model parameters that are considered for the design are shown in Table 1. In this example, turbulent flow optimized topologies are compared against optimized topologies obtained from laminar flow: The inlet flow rate for laminar flow corresponds to a maximum inlet Reynolds number of 130, while the inlet flow rate for turbulent flow corresponds to a maximum inlet Reynolds number of \(1.3 \times 10^4\). Since the TOBS approach considers binary variables, the initial guess has to be chosen to be discrete: In this work, in order to facilitate convergence, a “conical” initial guess is considered (i.e., directly connecting the inlet (R) of the design domain (H) to the outlet (\(R_{out}\)) with a straight line—See the leftmost topologies in Fig. 13). It can be highlighted that, in any fluid topology optimization problem with TOBS, other discrete initial guesses are also possible, such as a “fully-fluid” initial guess, but with care taken in case there is some undesired vortex generation in the fluid for this initial guess, which may possibly hinder the topology optimization process. The specified fluid volume fraction (f) is set as 30%.
A series of topology optimizations is performed for different rotations, whose results are shown in Fig. 11. The maximum local Reynolds numbers are computed as 479, 526, and 1060 (for the laminar optimized topologies); and \(5.9 \times 10^4\), \(6.5 \times 10^4\), and \(1.0 \times 10^5\) (for the turbulent optimized topologies). In Fig. 11a, it can be noticed that the presence of higher fluid flow velocities under laminar flow tends to increase an “inlet zone.” This inlet zone seems to help the fluid to make a smoother change in flow direction towards the middle of the nozzle. Fig. 11b shows the optimized topologies for turbulent flow. As can be seen, a similar effect to that of laminar flow (Fig. 11a) is observed. However, the 0 rpm optimized topology of turbulent flow features a concave transition near the inlet while the 0 rpm optimized topology of laminar flow features a more linear transition. This can be seen as a consequence of the different velocity profiles in both cases (turbulent and laminar velocity profiles), since a turbulent velocity profile features somewhat higher velocities when farther from the symmetry axis, with respect to a laminar velocity profile. It can also be noticed that the “outlet zone” of the turbulent nozzle is straighter than the laminar nozzle when under rotation, in which a “divergent shape” can be noticed. This “divergent shape” creates a small effect of reducing the fluid pressure and increasing the fluid velocity, which may help reducing the dissipated energy due to the fluid acceleration from the rotation effect. However, in the turbulent flow case, the effect of the rotating wall on the velocity seems to be more prominent, leading to a straighter outlet channel shape.
In order to show the effect of considering the optimized topologies for laminar flow operating under turbulent flow and vice-versa, additional simulations are performed and shown in Fig. 12. In Fig. 12, the “relative differences” are shown, which correspond to \(r_{x} = \frac{x_\text {other\ flow} - x_\text {flow}}{x_\text {flow}}\), where \(x_\text {flow}\) is the function being computed in the flow that generated the optimized topology, while \(x_\text {other\ flow}\) is the function being computed in the topology that was optimized for the other type of flow. Thus, a positive “relative difference” means that the optimized topology operates better at the flow it was optimized for. It can be noticed that almost all optimized function values are better at the flow that generated the optimized topology, with the exception of the head loss for 5000 rpm (Fig. 12b). This may possibly mean the induction of a local minimum, but, since the relative energy dissipation (objective function) is smaller in the flow that generated the optimized topology, this does not pose an issue for optimization, but may mean that the viscous effects become more apparent in the relative energy dissipation than in the head loss when under higher rotations in turbulent flow (turbulent viscosity).
The convergence curves for the laminar and turbulent rotating nozzles are shown in Fig. 13. From this figure, it can be promptly noticed that including an island to split the inflow dissipates more energy, such that it disappeared during the optimization iterations. It can also be noticed that the relative energy dissipation values for the turbulent case are lower in the first iterations. This is due to the fact that a limited number of simulation (SIMPLE) iterations is run at each optimization step in order to reduce the computational cost, and the volume constraint is not satisfied at the initial guess.
The simulation results for the post-processed meshes for the optimized topologies for their respective flow regimes are shown in Fig. 14. As can be noticed in Fig. 14b, the turbulent effect (i.e., the turbulent viscosity) causes a higher radial–axial flow acceleration near the rotating wall, which is the opposite from the laminar flow case (Fig. 14a), where the radial–axial flow is mainly concentrated in the middle of the nozzle. This may explain the fact that the “outlet zone” is straighter in the turbulent flow optimized topology than in the laminar flow optimized topology.
6.2 Hydrocyclone-type device
The second example is of a hydrocyclone-type device. With respect to a “real” hydrocyclone device, it differs from the fact that it considers a single-phase flow (instead of a two-phase flow), which enters the fluid flow device from a single inlet under rotation (\(\omega _{\text {in}}\)), and exits it through a single outlet. This type of design has been previously evaluated for laminar 2D swirl flow by Alonso et al. (2018). Figure 15 shows the design domain that is considered in this case. Since the hydrocyclone-type device is static, the solid material distribution is optimized for these static walls (\(\omega _{0} = 0\text { rad}/\text {s}\)).
The mesh is considered as the same from Fig. 10. The input parameters, geometric dimensions, and material model parameters that are considered for the design are shown in Table 2. The inlet flow rates correspond to maximum inlet Reynolds numbers \(4.0 \times 10^4\), \(4.5 \times 10^4\) , and \(5.8 \times 10^4\). Since the TOBS approach considers binary variables, the initial guess has to be chosen to be discrete: In this work, in order to facilitate convergence, an initial guess featuring a “straight connection between inlet and outlet” is considered. The specified fluid volume fraction (f) is set as 30%. In this case, since the reference frame is stationary, it can be reminded that the inertial effect terms from the relative energy dissipation (Eq. (16)) are zero.
A series of topology optimizations is performed for different inlet rotations, whose results are shown in Fig. 16. The maximum local Reynolds numbers are computed as \(4.18 \times 10^5\), \(4.42 \times 10^5\) , and \(5.24 \times 10^5\). In Fig. 16, it can be noticed that the channel slightly raises in position when under higher inlet rotations. This effect can be mostly attributed to the increased flow inertia when under higher inlet rotations, which tends to hinder the change in flow direction to the outlet. It can also be noticed that, as in the turbulent nozzles of Sect. 6.1, the downmost part of the channel is straight for less relative energy dissipation.
The convergence curve for the hydrocyclone-type device (1000 rpm inlet rotation) is shown in Fig. 17. From there, it can be noticed that the optimized channel slowly “rises” to its optimized positioning during topology optimization.
The simulation results for the post-processed mesh for the optimized topology for the hydrocyclone-type device (1000 rpm inlet rotation) are shown in Fig. 18. As can be noticed in Fig. 18, there is a flow acceleration from the inlet towards the outlet, which mostly happens when the fluid reaches the “straight” part of the channel, which is closer to the outlet. This is probably due to the sudden decrease in cross-sectional area near the middle of the channel, which changes it from a “cylinder-like” cross-section (“\(2\pi r { {\Delta }}z\)”) to a “disk-like” cross-section (“\(\pi r^2\)”).
6.3 Tesla-type pump device
A Tesla-type pump device is a fluid flow device that aims to pump fluid without the use of any blades, propelling the fluid by rotation combined with the boundary layer effect (referred, for simplicity, as “Tesla principle”). The Tesla principle has a variety of applications, such as pumps (Tesla 1913a), fans (Engin et al. 2009), compressors (Rice 1991), turbines (Tesla 1913b), VADs (Ventricular Assist Devices) (Yu 2015), and even vacuum generation (Tesla 1921). For simplicity, the term “Tesla-type pump device” is abbreviated to simply “Tesla pump” in this work. This type of design has been previously evaluated for laminar 2D swirl flow (Alonso et al. 2018). The design domain considered in this work is shown in Fig. 19.
The mesh consists of 10,277 nodes and 20,240 elements (i.e., 110 radial and 46 axial rectangular partitions of crossed triangular elements, see Fig. 20). The input parameters, geometric dimensions, and material model parameters that are considered for the design are shown in Table 3. In this example, the maximum inlet Reynolds number is given as \(4.92 \times 10^4\). In this work, in order to facilitate convergence, a “straight disks” initial guess is considered (see Fig. 21). The specified fluid volume fraction (f) is set as 30%.
The optimized topology is shown in Fig. 22, where the maximum local Reynolds number is given as \(1.96 \times 10^6\). As can be noticed, when under a high flow rate and rotation, the optimized channel tends to attach itself to the upper surface of the design domain, which, in fact, corresponds to the least distance from the inlet to the outlet. Table 4 shows the computed values for the reference (Fig. 21) and optimized (Fig. 22) designs. As can be noticed, the computed values show that the optimized design is an improvement in relation to the reference design, with the relative energy dissipation (\({\Phi }_{\text {rel}}\)) being slightly smaller (− 0.53%), the pressure head (H) being slightly higher (+ 1.21%), and the isentropic efficiency (\(\eta _{s}\)) also being slightly higher (+ 1.57%). It can be noticed that the relative differences are not high, because, when considering a fluid flow problem that includes a high rotational effect, the rotation itself poses a high influence in all computed functions. This leads to the effect that, if the reference topology is not chosen as a “poor-performing” topology, the computed functions should be mainly guided by the rotation, meaning that the relative performance improvement from topology optimization may not be so high.
The convergence curve is shown in Fig. 23.
The simulation of the optimized design is shown in Fig. 24. From it, it can be noticed that the pressure increases more at higher radii, due to the fluid pumping. From the high rotation, the Tesla principle “dampens” a “possible collision-like” behavior of the inlet flow towards the “horizontal disk-surface,” leading the fluid to accelerate towards the outlet near the walls. This behavior seems to justify the optimized design in relation to the reference (Fig. 21), due to the fact that the main difference between the two designs would be that the reference design allows an additional axial rotational acceleration which increases the relative energy dissipation. It can also be noticed that higher velocities are achieved near the walls, due to the higher rotational effect (Tesla principle). The turbulent viscosity increases when the fluid reaches the “outlet channel,” where the fluid is more intensely rotationally accelerated.
7 Conclusions
In this work, the topology optimization method is applied to the design of turbulent 2D swirl flow devices considering the TOBS approach and the Wray–Agarwal turbulence model (“WA2018”). Therefore, one of the main aspects that have been considered in this work is the Wray–Agarwal turbulence model (“WA2018”), which reduces the number of coefficients that need to be adjusted in topology optimization and does not require the computation of the wall distance, making it easier to perform/calibrate topology optimization. Also, the smaller number of additional equations when using this model (i.e., only one instead of two, with respect to other turbulence models) makes it simpler to implement topology optimization. Another relevant aspect is the TOBS approach, which allows the use of binary variables, eliminating the problem of appearing a “gray” medium in the optimized results.
The numerical results illustrate the use of the proposed approach. In the overall, the Wray–Agarwal turbulence model (“WA2018”) and the TOBS approach are shown to be capable of performing turbulent flow topology optimization. More specifically, in terms of the numerical examples, first, turbulent flow nozzle designs are shown to perform better than laminar flow nozzle designs when operating under turbulent flow, and vice-versa. Then, the effect of the wall rotation is illustrated for the same nozzle design, showing that the “inlet zone” tends to be enlarged for higher rotations, and then, a hydrocylone-type device is considered for different inlet rotations, showing that higher inlet rotations slightly raise the “inlet channel.” To finalize, an example of a Tesla pump is considered, showing the applicability to rotation-driven flows.
As future work, it is suggested that compressible fluid flow models be considered, as well as heat transfer and flow machine design.
References
Alonso DH, de Sá LFN, Saenz JSR, Silva ECN (2018) Topology optimization applied to the design of 2d swirl flow devices. Struct Multidisc Optim 58(6):2341–2364. https://doi.org/10.1007/s00158-018-2078-0
Alonso DH, de Sá LFN, Saenz JSR, Silva ECN (2019) Topology optimization based on a two-dimensional swirl flow model of tesla-type pump devices. Comput Math Appl 77(9):2499–2533. https://doi.org/10.1016/j.camwa.2018.12.035
Alonso DH, Garcia Rodriguez LF, Silva ECN (2021) Flexible framework for fluid topology optimization with openfoam®and finite element-based high-level discrete adjoint method (fenics/dolfin-adjoint). Struct Multidisc Optim 1:32. https://doi.org/10.1007/s00158-021-03061-4
Andreasen CS, Gersborg AR, Sigmund O (2009) Topology optimization of microfluidic mixers. Int J Numer Meth Fluids 61:498–513. https://doi.org/10.1002/fld.1964
Arnold D, Brezzi F, Fortin M (1984) A stable finite element method for the stokes equations. Calcolo 21:337–344
Bardina JE, Huang PG, Coakley TJ (1997) Turbulence modeling validation, testing and development. Tech. rep, NASA Technical Memorandum, p 110446
Borrvall T, Petersson J (2003) Topology optimization of fluids in stokes flow. Int J Numer Meth Fluids 41(1):77–107. https://doi.org/10.1002/fld.426
Brezzi F, Fortin M (1991) Mixed and hybrid finite element methods. Springer, Berlin
Celik I (2003) RANS/LES/DES/DNS: the future prospects of turbulence modeling. J Fluids Eng 127(5):829–830. https://doi.org/10.1115/1.2033011
CFD group at Washington University in St Louis (2020) Wrayagarwalmodels. https://github.com/xuhanwustl/WrayAgarwalModels
Chen G, Xiong Q, Morris PJ, Paterson EG, Sergeev A, Wang Y (2014) Openfoam for computational fluid dynamics. Not AMS 61(4):354–363
COMSOL (2018) CFD Module User’s Guide, 5.4. COMSOL
De Chant LJ (2005) The venerable 1/7th power law turbulent velocity profile: a classical nonlinear boundary value problem solution and its relationship to stochastic processes. J Appl Math Comput Mech 161:463–474
Deardorff JW (1970) A numerical study of three-dimensional turbulent channel flow at large Reynolds numbers. J Fluid Mech 41(2):453–480
Dilgen CB, Dilgen SB, Fuhrman DR, Sigmund O, Lazarov BS (2018) Topology optimization of turbulent flows. Comput Methods Appl Mech Eng 331:363–393. https://doi.org/10.1016/j.cma.2017.11.029
Duan X, Li F, Qin X (2016) Topology optimization of incompressible Navier–Stokes problem by level set based adaptive mesh method. Comput Math Appl 72(4):1131–1141. https://doi.org/10.1016/j.camwa.2016.06.034
Engin T, Özdemir M (2009) Design, testing and two-dimensional flow modeling of a multiple-disk fan. Exp Thermal Fluid Sci 33(8):1180–1187. https://doi.org/10.1016/j.expthermflusci.2009.07.007
Evgrafov A (2004) Topology optimization of navier-stokes equations. In: Nordic MPS 2004. The Ninth Meeting of the Nordic Section of the Mathematical Programming Society, Linköping University Electronic Press, 014, pp 37–55
Farrell PE, Ham DA, Funke SW, Rognes ME (2013) Automated derivation of the adjoint of high-level transient finite element programs. SIAM J Sci Comput 35(4):C369–C393
Haftka RT, Gürdal Z (1991) Elements of structural optimization, vol 11. Springer, New York
Han X, Wray TJ, Fiola C, Agarwal RK (2015) Computation of flow in s ducts with Wray–Agarwal one-equation turbulence model. J Propul Power 31(5):1338–1349
Han X, Wray T, Agarwal RK (2017) Application of a new des model based on wray-agarwal turbulence model for simulation of wall-bounded flows with separation. In: 47th AIAA Fluid Dynamics Conference, p 3966
Han X, Rahman M, Agarwal RK (2018) Development and application of wall-distance-free Wray–Agarwal turbulence model (wa2018). In: 2018 AIAA Aerospace Sciences Meeting, p 0593
Hasund KES (2017) Topology optimization for unsteady flow with applications in biomedical flows. Master’s thesis, NTNU
Huang X, Xie Y (2007) Convergent and mesh-independent solutions for the bi-directional evolutionary structural optimization method. Finite Elements Anal Design 43(14):1039–1049. https://doi.org/10.1016/j.finel.2007.06.006
Hyun J, Wang S, Yang S (2014) Topology optimization of the shear thinning non-Newtonian fluidic systems for minimizing wall shear stress. Comput Math Appl 67(5):1154–1170. https://doi.org/10.1016/j.camwa.2013.12.013
Jensen KE, Szabo P, Okkels F (2012) Topology optimizatin of viscoelastic rectifiers. Appl Phys Lett 100(23):234102
Kontoleontos EA, Papoutsis-Kiachagias EM, Zymaris AS, Papadimitriou DI, Giannakoglou KC (2013) Adjoint-based constrained topology optimization for viscous flows, including heat transfer. Eng Optim 45(8):941–961. https://doi.org/10.1080/0305215X.2012.717074
Langtangen HP, Logg A (2016) Solving PDEs in Minutes - The FEniCS Tutorial Volume I. https://fenicsproject.org/book/
Lazarov BS, Sigmund O (2010) Filters in topology optimization based on Helmholtz-type differential equations. Int J Numer Meth Eng 86(6):765–781
Logg A, Mardal KA, Wells G (2012) Automated solution of differential equations by the finite element method: the FEniCS book, vol 84. Springer, New York
Mitusch S, Funke S, Dokken J (2019) Dolfin-adjoint 2018.1: automated adjoints for fenics and firedrake. J Open Source Softw 4(38):1292
Mortensen M, Langtangen HP, Wells GN (2011) A fenics-based programming framework for modeling turbulent flow by the Reynolds-averaged Navier–Stokes equations. Adv Water Res 34(9):1082–1101. https://doi.org/10.1016/j.advwatres.2011.02.013
Munson BR, Young DF, Okiishi TH (2009) Fundamentals of fluid mechanics, 6th edn. Wiley, Hoboken
Nørgaard S, Sigmund O, Lazarov B (2016) Topology optimization of unsteady flow problems using the lattice Boltzmann method. J Comput Phys 307:291–307. https://doi.org/10.1016/j.jcp.2015.12.023
Olesen LH, Okkels F, Bruus H (2006) A high-level programming-language implementation of topology optimization applied to steady-state Navier–Stokes flow. Int J Numer Meth Eng 65(7):975–1001
CFD Online (2020) Turbulence length scale. https://www.cfd-online.com/Wiki/Turbulence_length_scale
OpenFOAM Wiki (2014) Openfoam guide/the simple algorithm in openfoam. http://openfoamwiki.net/index.php/The_SIMPLE_algorithm_in_OpenFOAM
Orszag SA (1970) Analytical theories of turbulence. J Fluid Mech 41(2):363–386
Papoutsis-Kiachagias E, Kontoleontos E, Zymaris A, Papadimitriou D, Giannakoglou K (2011) Constrained topology optimization for laminar and turbulent flows, including heat transfer. CIRA, editor, EUROGEN, Evolutionary and Deterministic Methods for Design, Optimization and Control, Capua, Italy
Papoutsis-Kiachagias EM, Giannakoglou KC (2016) Continuous adjoint methods for turbulent flows, applied to shape and topology optimization: industrial applications. Arch Comput Methods Eng 23(2):255–299
Patankar SV (1980) Numerical heat transfer and fluid flow, 1st edn. McGraw-Hill, New York
Pingen G, Maute K (2010) Optimal design for non-Newtonian flows using a topology optimization approach. Comput Math Appl 59(7):2340–2350
Ramalingom D, Cocquet PH, Bastide A (2018) A new interpolation technique to deal with fluid–porous media interfaces for topology optimization of heat transfer. Comput Fluids 168:144–158. https://doi.org/10.1016/j.compfluid.2018.04.005
Reddy JN, Gartling DK (2010) The finite element method in heat transfer and fluid dynamics, 3rd edn. CRC Press, Boca Raton
Rey Ladino AF (2004) Numerical simulation of the flow field in a friction-type turbine (tesla turbine). Diploma thesis, Institute of Thermal Powerplants, Vienna University of Technology
Reynolds O (1895) IV on the dynamical theory of incompressible viscous fluids and the determination of the criterion. Philos Trans R Soc Lond (A) 86:123–164
Rice W (1991) Tesla turbomachinery
Romero J, Silva E (2014) A topology optimization approach applied to laminar flow machine rotor design. Comput Methods Appl Mech Eng 279(Supplement C):268–300. https://doi.org/10.1016/j.cma.2014.06.029
Romero JS, Silva ECN (2017) Non-Newtonian laminar flow machine rotor design by using topology optimization. Struct Multidisc Optim 55(5):1711–1732
Sá LF, Romero JS, Horikawa O, Silva ECN (2018) Topology optimization applied to the development of small scale pump. Struct Multidisc Optim 57(5):2045–2059. https://doi.org/10.1007/s00158-018-1966-7
Sá LFN, Amigo RCR, Novotny AA, Silva ECN (2016) Topological derivatives applied to fluid flow channel design optimization problems. Struct Multidisc Optim 54(2):249–264. https://doi.org/10.1007/s00158-016-1399-0
Saad T (2007) Turbulence modeling for beginners. https://www.cfd-online.com/W/images/3/31/Turbulence_Modeling_For_Beginners.pdf
Sato Y, Yaji K, Izui K, Yamada T, Nishiwaki S (2018) An optimum design method for a thermal-fluid device incorporating multiobjective topology optimization with an adaptive weighting scheme. J Mech Des 140(3):031402
Schwedes T, Ham DA, Funke SW, Piggott MD (2017) Mesh dependence in PDE-constrained optimisation—an application in tidal turbine array layouts, 1st edn. Springer, New York
Sivapuram R, Picelli R (2018) Topology optimization of binary structures using integer linear programming. Finite Elements Anal Design 139:49–61. https://doi.org/10.1016/j.finel.2017.10.006
Sivapuram R, Picelli R, Xie YM (2018) Topology optimization of binary microstructures involving various non-volume constraints. Comput Mater Sci 154:405–425. https://doi.org/10.1016/j.commatsci.2018.08.008
Smagorinsky J (1963) General circulation experiments with the primitive equations: I. The basic experiment. Monthly Weather Rev 91(3):99–164
Sokolowski J, Zochowski A (1999) On the topological derivative in shape optimization. SIAM J Control Optim 37(4):1251–1272
Song XG, Wang L, Baek SH, Park YC (2009) Multidisciplinary optimization of a butterfly valve. ISA Trans 48(3):370–377
Sonntag RE, Borgnakke C (2013) Fundamentals of thermodynamics, 8th edn. Wiley, Hoboken
Souza BC, Yamabe PVM, Sá LFN, Ranjbarzadeh S, Picelli R, Silva ECN (2021) Topology optimization of fluid flow by using integer linear programming. Struct Multidisc Optim 64:1221–1240
Spalart PRA, Allmaras S (1994) A one-equation turbulence model for aerodynamic flows. Cla Recherche Aérospatiale 1:5–21
Svanberg K (1987) The method of moving asymptotes-a new method for structural optimization. Int J Numer Methods Eng 24(2):359–373
Sá LF, Yamabe PV, Souza BC, Silva EC (2021) Topology optimization of turbulent rotating flows using Spalart–Allmaras model. Comput Methods Appl Mech Eng 373:113551. https://doi.org/10.1016/j.cma.2020.113551
Tesla N (1913a) Fluid propulsion. US Patent 1,061,142
Tesla N (1913b) Turbine. US 1(061):206
Tesla N (1921) Improved process of and apparatus for production of high vacua. GB Patent 179:043
Wächter A, Biegler LT (2006) On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming. Math Progr 106(1):25–57
Weller HG, Tabor G, Jasak H, Fureby C (1998) A tensorial approach to computational continuum mechanics using object-oriented techniques. Comput Phys 12(6):620–631
White FM (2011) Fluid mechanics, 7th edn. McGraw-Hill, New York
Wray T, Agarwal RK (2016) Application of the Wray–Agarwal model to compressible flows. In: 46th AIAA Fluid Dynamics Conference, p 3641
Wray TJ, Agarwal RK (2015) Low-Reynolds-number one-equation turbulence model based on k-\(\omega\) closure. AIAA J 53(8):2216–2227
Yoon GH (2016) Topology optimization for turbulent flow with Spalart–Allmaras model. Comput Methods Appl Mech Eng 303:288–311. https://doi.org/10.1016/j.cma.2016.01.014
Yoon GH (2020) Topology optimization method with finite elements based on the k-\(\varvec \varepsilon\) turbulence model. Comput Methods Appl Mech Eng 361:112784
Yu H (2015) Flow design optimization of blood pumps considering hemolysis. PhD thesis, Magdeburg, Universität, Diss., 2015
Zauderer E (1989) Partial differential equations of applied mathematics, 2nd edn. Wiley, Hoboken
Zhang X, Wray T, Agarwal RK (2016) Application of a new simple rotation and curvature correction to the wray-agarwal turbulence model. In: 46th AIAA Fluid Dynamics Conference, p 3475
Zhou S, Li Q (2008) A variationals level set method for the topology optimization of steady-state Navier–Stokes flow. J Comput Phys 227(24):10178–10195
Acknowledgements
This research was partly supported by CNPq (Brazilian Research Council), FAPERJ (Research Foundation of the State of Rio de Janeiro), and FAPESP (São Paulo Research Foundation). The authors thank the supporting institutions. The first author thanks the financial support of FAPESP under Grant 2017/27049-0. The third author thanks FAPESP under the Young Investigators Awards program under Grants 2018/05797-8 and 2019/01685-3, and FUSP (University of São Paulo Foundation) under Project Numbers 314139 and 314137. The fourth author thanks the financial support of CNPq (National Council for Research and Development) under Grant 302658/2018-1 and of FAPESP under Grant 2013/24434-0. The authors also acknowledge the support of the RCGI (Research Centre for Gas Innovation), hosted by the University of São Paulo (USP) and sponsored by FAPESP (2014/50279-4) and Shell Brazil.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no conflict of interest
Replication of results
The descriptions of the formulation, the numerical implementation, and the numerical results contain all necessary information for reproducing the results of this article.
Additional information
Responsible Editor: Ole Sigmund
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
Appendix A: Comparison of sensitivities with finite differences
A comparison of the computed sensitivities (using dolfin-adjoint) with finite differences is presented in this appendix. The comparison is performed for the optimized topology for the rotating nozzle for turbulent flow under 10 L/min and 2500 rpm (Sect. 6.1), by considering the simulations for laminar (0.06 L/min and 25 rpm) and turbulent (10 L/min and 2500 rpm) flows. The set of points selected for comparison with finite differences in the computational domain is shown in Fig. 25. The comparison is performed for the same configurations considered for laminar and turbulent flows in Sect. 6.1. For \(\alpha = 1\) (fluid), the finite difference approximation is considered through the backward difference approximation: \(\frac{\text{{d}}J}{\text{{d}}\alpha } = \frac{J(\alpha ) - J(\alpha - {\Delta }\alpha )}{{\Delta }\alpha }\), where \(J = {\Phi }_{\text {rel}}\). For \(\alpha = 0\) (solid), the finite difference approximation is considered through forward difference approximation: \(\frac{\text{{d}}J}{\text{{d}}\alpha } = \frac{J(\alpha + {\Delta }\alpha ) - J(\alpha )}{{\Delta }\alpha }\). The computed sensitivities are shown in Fig. 26, for a step size of \(10^{-3}\). As can be seen, the computed sensitivities for this work (by using dolfin-adjoint) and finite differences are close to each other. For a better insight about the differences between the two sensitivities, Fig. 27 depicts the relative differences as defined below, which resulted small. The computed relative difference values may be viewed in sight of the fact that smaller objective function values may hinder the computation of finite differences due to computational errors, as observed in Yoon (2020); Haftka and Gürdal (1991). Furthermore, since a discrete algorithm (not continuous) is being considered in this work, this amount of difference does not seem to pose a problem.
where the subscript “p” indicates the “present work” approach (by using dolfin-adjoint) and “FD” indicates “Finite Differences.” The relative differences values are higher in the turbulent case due to the higher non-linearity of the fluid flow problem.
Appendix B: 2D double pipe
The design of a 2D double pipe is performed in this Appendix, in order to show the Wray–Agarwal model (2018) being considered for topology optimization in a 2D case for a different initial guess configuration for the design variable. The topology optimization for this type of problem has been previously evaluated by Borrvall and Petersson (2003), for laminar Stokes flow. In this work, the inlets are set to be larger, which is reflected in setting the specified fluid volume fraction (f) as 50%, in order to make possible the formation of straight channels connecting the inlets to the outlets. Also, the outlet flow boundary condition is set as “stress free,” which is more generic (Hasund 2017) with respect to imposing fixed outlet velocity profiles as Borrvall and Petersson (2003). The design domain is shown in Fig. 28.
The mesh consists of 16,181 nodes and 32,000 elements (i.e., 100 horizontal and 80 vertical rectangular partitions of crossed triangular elements, see Fig. 29). The input parameters, geometric dimensions, and material model parameters that are considered for the design are shown in Table 5. The maximum inlet Reynolds number is 0.375 (laminar flow case) and \(2.8{\times }10^4\) (turbulent flow case). In order to consider a different configuration for the initial guess with respect to the other examples, the initial guess is chosen as shown in Fig. 30, where \(d = 37.5\) mm and \(r_c = 3.75\) mm. The TOBS approach is considered for \(\varepsilon _\text {relax} = 0.1\) and \(\beta _\text {flip\ limit} = 0.1\) (laminar flow case), and for \(\varepsilon _\text {relax} = 0.05\) and \(\beta _\text {flip\ limit} = 0.05\) (turbulent flow case).
The optimized topologies are shown in Fig. 31, where the maximum local Reynolds number is given as 0.46 (laminar flow case) and \(2.9{\times }10^4\) (turbulent flow case). As can be noticed, both optimized topologies are essentially different, where both channels join in the middle of the design domain for the laminar flow (similarly to the optimized results obtained by Borrvall and Petersson (2003)), but are kept separated for the turbulent flow. This difference in the optimized topologies shown in Fig. 31 can be viewed from the fact that the high inlet fluid flow velocity from the turbulent flow case does not allow creating a bend in the channel without dissipating significantly more energy, while the energy expended for that in the laminar flow case is minimal. This is also shown in the energy dissipation values from Table 6, where it can be seen that the optimized topologies perform better for their respective fluid flow regimes (43% better in the laminar flow case, and 46% better in the turbulent flow case).
Appendix C: 2D U-bend channel
The design of a 2D U-bend channel is performed in this Appendix, in order to show the Wray–Agarwal model (2018) being considered for topology optimization in a 2D case. This topology optimization problem has been previously evaluated by Dilgen et al. (2018), for the Spalart–Allmaras and k-\(\omega\) models considering the MMA (Method of Moving Asymptotes) algorithm. The 2D U-bend channel consists of an inlet and an outlet next to each other, with a “rod”-like structure in the middle of the channel that forces the optimized channel to go around it (see Fig. 32). The inlet and outlet zones, as well as the “rod”-like structure are kept as “non-optimizable.”
Since there is a “non-optimizable” zone inside the computational domain (see Fig. 32), when considering the Helmholtz pseudo-density filter, the filter is applied over the whole computational domain (\({\Omega }\)); however, the design variable value outside the design domain (\({\Omega }\setminus {\Omega }_\alpha\)) is enforced as the previous value (\(\alpha\)). Therefore, the variable \({\alpha }_{f,\text {new}}\) is used in the equations in function of the position (\({\varvec{s}}\)):
The local Reynolds number from Eq. (25) is redefined for this case, where the characteristic length is set as the width of the inlet (L, from Fig. 32) in the place of the external diameter (“\(2 r_{{ext}}\)”). As in the other numerical examples, the fluid is being considered as water.
The mesh consists of 92,431 nodes and 184,000 elements (i.e., 230 horizontal and 200 vertical rectangular partitions of crossed triangular elements, see Fig. 33). The input parameters, geometric dimensions, and material model parameters that are considered for the design are shown in Table 7. The maximum inlet Reynolds number is \(5.4{\times }10^4\). In this work, in order to facilitate convergence, the initial guess is given from the reference topology from Fig. 34. The specified fluid volume fraction (f) is set as 30%. The TOBS approach is considered for \(\varepsilon _\text {relax} = 0.2\) and \(\beta _\text {flip\ limit} = 0.001\).
The optimized topology is shown in Fig. 35, with the corresponding sensitivities’ distribution shown in Fig. 36, where the maximum local Reynolds number is given as \(2.7{\times }10^6\). As can be noticed, the optimized channel is expanded outwards with respect to the “rod”-like structure. Also, the optimized topology features a wider curve than the reference topology (Fig. 34). As a comparison, the optimized topology resulted in 35% less energy dissipation (\(1.10{\times }10^2\) W/m vs. \(1.70{\times }10^2\) W/m), and 11% (\(2.72{\times }10^{-2}\) m vs. \(3.04{\times }10^{-2}\) m) less head loss than the reference topology.
The simulation of the optimized design is shown in Fig. 37. From it, it can be noticed that the small “bumps” of the optimized topology near the inlet and outlet of the design domain do not significantly change the velocity field of the fluid flow simulation, meaning that their contribution to the energy dissipation should be small. Also, the curve in the optimized channel reduces the bending necessary for the fluid to head towards the outlet, reducing energy dissipation and head loss.
Figure 38 shows a comparison of streamlines between the simulations for the modeled solid material, for the Helmholtz filter (\(r_H =\) 1.0 mm) and for the post-processed topology. As can be noticed, some differences arise between the simulations. First, the streamlines for the modeled solid simulation show an acceleration of the fluid flow after the curve, which is not present in the simulation of the post-processed topology. This effect can also be observed in Dilgen et al. (2018) (Figs. 10c and 14b of Dilgen et al. (2018)). This seems to be a drawback of the modeled material used in fluid topology optimization (inverse permeability), since this modeled material intrinsically implies that there will be fluid flow inside the solid material, even at extremely small values, which may possibly lead to small changes in the characteristics of the solid boundaries and may affect the turbulent flow modeling. When considering the Helmholtz filter, the boundaries are blurred, which has the effect of leading the topology optimization to focus on the main flow, giving less emphasis to local effects that may possibly destabilize the fluid flow (such as some specific inclusions in the middle of the channel) or lead the topology optimization to a relatively worse local minimum.
Rights and permissions
About this article
Cite this article
Alonso, D.H., Romero Saenz, J.S., Picelli, R. et al. Topology optimization method based on the Wray–Agarwal turbulence model. Struct Multidisc Optim 65, 82 (2022). https://doi.org/10.1007/s00158-021-03106-8
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s00158-021-03106-8