Skip to main content
Log in

Topology optimization of subsonic compressible flows

  • Research Paper
  • Published:
Structural and Multidisciplinary Optimization Aims and scope Submit manuscript

Abstract

This work proposes a new topology optimization formulation to subsonic compressible flows. Compressible flows can be seen in many aerodynamic problems and optimization techniques can be used to improve designs of wings, diffusers, and other applications. In this work, the compressible Navier-Stokes equations are used coupled with a density-based material model. The effects of the material model are shown for both the momentum and energy equations. Two objective functions are considered, the entropy variation in a control volume and the entropy generation. The algorithm is implemented by a finite element model to solve the state equations. The pyadjoint libraries are used to perform the automatic sensitivity derivation and an internal point optimizer is used to update the design variable. The algorithm is evaluated by performing the optimization of 2D domains and a 3D diffuser. The results show optimized designs with reduced entropy generation.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13

Similar content being viewed by others

References

  • Alonso DH, de Sá LFN, Saenz JSR, Silva ECN (2018) Topology optimization applied to the design of 2D swirl flow devices. Struct Multidiscip Optim 58(6):2341–2364

    Article  MathSciNet  Google Scholar 

  • 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

    Article  MathSciNet  MATH  Google Scholar 

  • Amestoy PR, Duff IS, L’Excellent J-Y, Koster J (2001) A fully asynchronous multifrontal solver using distributed dynamic scheduling. SIAM J Matrix Anal Appl 23(1):15–41

    Article  MathSciNet  MATH  Google Scholar 

  • Anderson J (2003) Modern compressible flow: with historical perspective. Aeronautical and Aerospace Engineering Series. McGraw-Hill Education, New York

    Google Scholar 

  • Anderson W, Venkatakrishnan V (1999) Aerodynamic design optimization on unstructured grids with a continuous adjoint formulation. Computers & Fluids 28(4-5):443–480

    Article  MATH  Google Scholar 

  • Avellaneda J, Bataille F, Toutant A, Flamant G (2020) Entropy generation minimization in a channel flow: application to different advection-diffusion processes and boundary conditions. Chem Eng Sci 220:115601

    Article  Google Scholar 

  • Blazek J (2001) Computational fluid dynamics: principles and applications. Elsevier, Amsterdam

    MATH  Google Scholar 

  • Borgnakke C, Sonntag R (2008) Fundamentals of thermodynamics. Wiley

  • Borrvall T, Petersson J (2003) Topology optimization of fluids in Stokes flow. Int J Numer Methods Fluids 41(1):77–107

    Article  MathSciNet  MATH  Google Scholar 

  • Burgreen G, Baysal O (1994) Three-dimensional aerodynamic shape optimization of wings using sensitivity analysis. In: 32nd Aerospace Sciences Meeting and Exhibit, Reston, Virigina. American Institute of Aeronautics and Astronautics

  • Cao H, Blom G (1996) Navier-Stokes/genetic optimization of multi-element airfoils. In: 14th Applied Aerodynamics Conference, Reston, Virigina. American Institute of Aeronautics and Astronautics

  • Castro C, Lozano C, Palacios F, Zuazua E (2007) Systematic continuous adjoint approach to viscous aerodynamic design on unstructured grids. AIAA J 45(9):2125–2139

    Article  Google Scholar 

  • Challis VJ, Guest JK (2009) Level set topology optimization of fluids in Stokes flow. Int J Numer Methods Eng 79(10):1284–1308

    Article  MathSciNet  MATH  Google Scholar 

  • Cummings RM, Yang H, Oh Y (1995) Supersonic, turbulent flow computation and drag optimization for axisymmetric afterbodies. Computers & fluids 24(4):487–507

    Article  MATH  Google Scholar 

  • Dasgupta D, Michalewicz Z (1997) Evolutionary algorithms in engineering applications. Springer, Berlin

    Book  MATH  Google Scholar 

  • de Villiers E, Othmer C (2012) Multi-objective adjoint optimization of intake port geometry. Technical report, SAE Technical Paper

  • Dilgen CB, Dilgen SB, Fuhrman DR, Sigmund O, Lazarov BS (2018) Topology optimization of turbulent flows. Comput Methods Appl Mech Eng 331:363–393

    Article  MathSciNet  MATH  Google Scholar 

  • Economon TD, Palacios F, Alonso JJ (2013) A viscous continuous adjoint approach for the design of rotating engineering applications. In: 21st AIAA computational fluid dynamics conference. American Institute of Aeronautics and Astronautics, Reston, pp 1–19

  • Economon TD, Palacios F, Alonso JJ (2015) Unsteady continuous adjoint approach for aerodynamic design on dynamic meshes. AIAA J 53(9):2437–2453

    Article  Google Scholar 

  • Elliott J, Peraire J (1996) Aerodynamic design using unstructured meshes. In: Fluid dynamics conference, number June. American Institute of Aeronautics and Astronautics, Reston, pp 1–13

  • Evgrafov A (2005) The limits of porous materials in the topology optimization of stokes flows. Appl Math Optim 52(3):263–277

    Article  MathSciNet  MATH  Google Scholar 

  • Evgrafov A (2006) Topology optimization of slightly compressible fluids. ZAMM 86(1):46–62

    Article  MathSciNet  MATH  Google Scholar 

  • 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

    Article  MathSciNet  MATH  Google Scholar 

  • Funke SW, Farrell PE (2013) A framework for automated PDE-constrained optimisation. arXiv:1302.3894

  • Gersborg-Hansen A, Sigmund O, Haber R (2005) Topology optimization of channel flow problems. Struct Multidiscip Optim 30(3):181–192

    Article  MathSciNet  MATH  Google Scholar 

  • Jameson A (1988) Aerodynamic design via control theory. J Sci Comput 3(3):233–260

    Article  MATH  Google Scholar 

  • Jameson A, Martinelli L, Pierce N (1998) Optimum aerodynamic design using the Navier-Stokes equations. Theor Comput Fluid Dyn 10(1-4):213–237

    Article  MATH  Google Scholar 

  • John V (2004) Reference values for drag and lift of a two-dimensional time-dependent flow around a cylinder. Int J Numer Methods Fluids 44(7):777–788

    Article  MATH  Google Scholar 

  • John V, Matthies G (2001) Higher-order finite element discretizations in a benchmark problem for incompressible flows. Int J Numer Methods Fluids 37(8):885–903

    Article  MATH  Google Scholar 

  • Lapointe C, Christopher JD, Wimer NT, Hayden TR, Rieker GB, Hamlington PE (2017) Optimization for internal turbulent compressible flows using adjoints. In: 23rd AIAA computational fluid dynamics conference, number June. American Institute of Aeronautics and Astronautics, Reston, pp 1–8

  • Logg A, Wells GN, Book TF (2012) Automated solution of differential equations by the finite element method, volume 84 of Lecture notes in computational science and engineering. Springer, Berlin

    Book  Google Scholar 

  • Morgan H, Scott LR (2018) Towards a Unified Finite Element Method for the Stokes Equations. SIAM J Sci Comput 40(1):A130–A141

    Article  MathSciNet  MATH  Google Scholar 

  • Moukalled F, Mangani L, Darwish M (2015) The finite volume method in computational fluid dynamics: an advanced introduction with OpenFOAM®; and Matlab. Fluid Mechanics and Its Applications. Springer International Publishing

  • Nadarajah S, Jameson A (2000) A comparison of the continuous and discrete adjoint approach to automatic aerodynamic optimization. American Institute of Aeronautics and Astronautics, Reston

    Book  Google Scholar 

  • Nielsen EJ, Anderson WK (1999) Aerodynamic design optimization on unstructured meshes using the Navier-Stokes equations. AIAA J 37(11):1411–1419

    Article  Google Scholar 

  • 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 Methods Eng 65(7):975–1001

    Article  MathSciNet  MATH  Google Scholar 

  • Othmer C (2008) A continuous adjoint formulation for the computation of topological and surface sensitivities of ducted flows. Int J Numer Methods Fluids 58(8):861–877

    Article  MathSciNet  MATH  Google Scholar 

  • Oyama A, Obayashi S, Nakahashi K, Nakamura T (1999) Euler/Navier-Stokes Optimization of Supersonic Wing Design Based on Evolutionary Algorithm. AIAA J 37(10):1327–1328

    Article  MATH  Google Scholar 

  • Papadimitriou D, Giannakoglou K (2007) A continuous adjoint method with objective function derivatives based on boundary integrals, for inviscid and viscous flows. Computers & Fluids 36(2):325–341

    Article  MATH  Google Scholar 

  • 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

    Article  MathSciNet  MATH  Google Scholar 

  • Pingen G, Maute K (2010) Optimal design for non-Newtonian flows using a topology optimization approach. Comput Math Appl 59(7):2340–2350

    Article  MathSciNet  MATH  Google Scholar 

  • Pritchard P (2010) Fox and McDonald’s introduction to fluid mechanics, 8th edn. Wiley, Hoboken

    Google Scholar 

  • Quagliarella D, Dell A (1994) Genetic algorithms applied to the aerodynamic design of transonic airfoils. In: 12th applied aerodynamics conference, vol 32. American Institute of Aeronautics and Astronautics, Reston, pp 686–693

  • Reddy JN, Gartling DK (2010) The finite element method in heat transfer and fluid dynamics. CRC Press, Boca Raton

    Book  MATH  Google Scholar 

  • Reuther JJ, Jameson A, Alonso JJ, Rimllnger MJ, Saunders D (1999) Constrained multipoint aerodynamic shape optimization using an adjoint formulation and parallel computers, Part 2. J Aircr 36(1):61–74

    Article  Google Scholar 

  • Romero JS, Silva ECN (2014) A topology optimization approach applied to laminar flow machine rotor design. Comput Methods Appl Mech Engrg 279:268–300

    Article  MathSciNet  MATH  Google Scholar 

  • Sá L. F. N., Novotny AA, Romero JS, Silva ECN (2017) Design optimization of laminar flow machine rotors based on the topological derivative concept. Struct Multidiscip Optim 56(5):1013–1026

    Article  MathSciNet  Google Scholar 

  • Sá LFN, Amigo RCR, Novotny AA, Silva ECN (2016) Topological derivatives applied to fluid flow channel design optimization problems. Struct Multidiscipl Optim 54(2):249–264

    Article  MathSciNet  Google Scholar 

  • Sá LFN, Romero JS, Horikawa O, Silva ECN (2018) Topology optimization applied to the development of small scale pump. Struct Multidiscip Optim 57(5):2045–2059

    Article  MathSciNet  Google Scholar 

  • Sá LFN, Yamabe PVM, Souza BC, Silva ECN (2021) Topology optimization of turbulent rotating flows using Spalart–Allmaras model. Comput Methods Appl Mech Eng 373:113551

    Article  MathSciNet  MATH  Google Scholar 

  • Wächter A (2009) Short tutorial: getting started with Ipopt in 90 Minutes. In: Toledo UN, Schenk O, Simon HD, Sivan (eds) Combinatorial Scientific Computing, Dagstuhl, Germany. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, Germany

  • Wáchter A, Biegler LT (2006) On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming. Math Program 106(1):25–57

    Article  MathSciNet  MATH  Google Scholar 

  • Yoon GH (2016) Topology optimization for turbulent flow with Spalart–Allmaras model. Comput Methods Appl Mech Eng 303:288–311

    Article  MathSciNet  MATH  Google Scholar 

  • Yoon GH (2020) Topology optimization method with finite elements based on the k- e turbulence model. Comput Methods Appl Mech Eng 361:112784

    Article  MathSciNet  MATH  Google Scholar 

Download references

Funding

The authors gratefully acknowledge support of the RCGI—Research Centre for Gas Innovation, hosted by the University of São Paulo (USP) and sponsored by FAPESP—São Paulo Research Foundation (2014/50279-4) and Shell Brasil, and the strategic importance of the support given by ANP (Brazil’s National Oil, Natural Gas and Biofuels Agency) through the R&D levy regulation. The third author thanks the financial support of CNPq (National Council for Research and Development) under grant 302658/2018-1.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Emílio C. N. Silva.

Ethics declarations

Conflict of interest

The authors declare that they have no conflict of interest.

Additional information

Responsible Editor: Felipe A. C. Viana

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Replication of results

Most of the software environment used in this work can be found in the docker container provided by dolfin-adjoint (available in http://www.dolfin-adjoint.org/en/latest/download/). The tutorials presented there may also help with the implementation.

In order to reproduce the results the following steps are needed:

(1) Define a mesh;

(2) Define the function spaces of the state variables (u,p,h);

(3) Define the function spaces of the design variable (α);

(4) Define the boundary conditions;

(5) Define the state equations (Navier-Stokes coupled with the energy equation);

(6) Solve the state equations, which causes pyadjoint to annotate the steps in the tape;

(7) Define the objective function;

(8) Calculate the initial objective function value;

(9) Start the optimization loop:

● Solve the state equations for current α;

● Calculate the current objective function value;

● Call pyadjoint to mount and solve the adjoint model;

● Pass the sensitivity to the optimizer (IPOpt);

● Update the design variable (α):

- If the convergence criteria is met return;

_ Else: restart the optimization loop;

Appendices

Appendix A: Weak form derivation

In this appendix, the weak form derivation of the momentum and energy equations are presented.

1.1 A.1 Momentum equation

By using the “weak-form Galerkin” method, (1) is multiplied by a test function v:

$$ \begin{array}{@{}rcl@{}} {\int}_{{\varOmega}} \nabla \cdot (\rho \boldsymbol{u} \boldsymbol{u})\boldsymbol{v} &+& \nabla p \boldsymbol{v} - \nabla \cdot (\mu\nabla\boldsymbol{u}) \boldsymbol{v} - \nabla \cdot (\mu \nabla \boldsymbol{u}^{T}) \boldsymbol{v} \\&-& \lambda \nabla (\nabla \cdot \boldsymbol{u}) \boldsymbol{v} + \kappa(\alpha)\boldsymbol{u}\boldsymbol{v} d{\varOmega} = \boldsymbol{0} \end{array} $$
(24)

The integration by parts on the second term gives:

$$ + {\int}_{{\varOmega}} \nabla p \boldsymbol{v} d{\varOmega} = + {\int}_{{\varGamma}} p\boldsymbol{n} \cdot \boldsymbol{v} d{\varGamma} - {\int}_{{\varOmega}} p \nabla \cdot \boldsymbol{v} d{\varOmega} $$
(25)

The integration by parts on the third term:

$$ \begin{array}{@{}rcl@{}} - {\int}_{{\varOmega}} \nabla \cdot (\mu\nabla\boldsymbol{u}) \boldsymbol{v} &=& - {\int}_{{\varGamma}} (\mu\nabla\boldsymbol{u})\boldsymbol{n} \cdot \boldsymbol{v} d{\varGamma} \\&&+ {\int}_{{\varOmega}} (\mu\nabla\boldsymbol{u}) \cdot \nabla\boldsymbol{v} d{\varOmega} \end{array} $$
(26)

The integration by parts on the fourth term:

$$ \begin{array}{@{}rcl@{}} - {\int}_{{\varOmega}} \nabla \cdot (\mu\nabla\boldsymbol{u}^{T}) \boldsymbol{v} &=& - {\int}_{{\varGamma}} (\mu\nabla\boldsymbol{u}^{T})\boldsymbol{n} \cdot \boldsymbol{v} d{\varGamma} \\&&+ {\int}_{{\varOmega}} (\mu\nabla\boldsymbol{u}^{T}) \cdot \nabla\boldsymbol{v} d{\varOmega} \end{array} $$
(27)

The integration by parts on the fifth term:

$$ \begin{array}{@{}rcl@{}} - {\int}_{{\varOmega}} \lambda \nabla (\nabla \cdot \boldsymbol{u})\boldsymbol{v} &=&\! - {\int}_{{\varGamma}} \lambda (\nabla \cdot \boldsymbol{u}) \boldsymbol{n} \cdot \boldsymbol{v} d{\varGamma} \\&&+ {\int}_{{\varOmega}} \lambda (\nabla \cdot \boldsymbol{u}) (\nabla\cdot\boldsymbol{v}) d{\varOmega} \end{array} $$
(28)

Finally, by substituting all the integration by parts in the original equation the following weak form is obtained:

$$ \begin{array}{@{}rcl@{}} &&+ {\int}_{{\varOmega}} \nabla \cdot (\rho \boldsymbol{u} \boldsymbol{u})\boldsymbol{v} - p \nabla \cdot \boldsymbol{v} + (\mu\nabla\boldsymbol{u}) \cdot \nabla\boldsymbol{v} + (\mu\nabla\boldsymbol{u}^{T}) \cdot \nabla\boldsymbol{v} \\&&+ \lambda (\nabla \cdot \boldsymbol{u}) (\nabla\cdot\boldsymbol{v}) + \kappa(\alpha)\boldsymbol{u}\boldsymbol{v} d{\varOmega} \\&&+ {\int}_{{\varGamma}} p\boldsymbol{n} \cdot \boldsymbol{v} - (\mu\nabla\boldsymbol{u}) \boldsymbol{n} \cdot \boldsymbol{v} - (\mu\nabla\boldsymbol{u}^{T}) \boldsymbol{n} \cdot \boldsymbol{v} \\&&- \lambda (\nabla \cdot \boldsymbol{u}) \boldsymbol{n} \cdot \boldsymbol{v} d{\varGamma} = \boldsymbol{0} \end{array} $$
(29)

1.2 A.2 Energy equation

By using the Galerkin method, (4) is multiplied by a test function vh:

$$ \begin{array}{@{}rcl@{}} {\int}_{{\varOmega}} &&\nabla \cdot \left[\rho \left( h + \frac{1}{2}\boldsymbol{u} \cdot \boldsymbol{u} \right) \boldsymbol{u} \right] {v_{h}} d{\varOmega} \\&&- {\int}_{{\varOmega}} \nabla \cdot \left( \frac{k}{C_{p}} \nabla h\right) v_{h} d{\varOmega} \\&&-{\int}_{{\varOmega}} \nabla \cdot (\boldsymbol{\tau}_{h} \cdot \boldsymbol{u}) v_{h} d{\varOmega} = \boldsymbol{0} \end{array} $$
(30)

Then, integrating by parts on the second term:

$$ \begin{array}{@{}rcl@{}} -{\int}_{{\varOmega}} \nabla \cdot \left( \frac{k}{C_{p}} \nabla h\right) v_{h} d{\varOmega} &=& -{\int}_{{\varGamma}} \left( \frac{k}{C_{p}} \nabla h \right) \cdot \boldsymbol{n} v_{h} d{\varGamma} \\&&+ {\int}_{{\varOmega}} \left( \frac{k}{C_{p}} \nabla h \right) \cdot \nabla v_{h} d{\varOmega}\\ \end{array} $$
(31)

The integration by parts on the third term:

$$ \begin{array}{@{}rcl@{}} -{\int}_{{\varOmega}} \nabla \cdot \left( \boldsymbol{\tau}_{h} \cdot \boldsymbol{u}\right) v_{h} d{\varOmega} &=& -{\int}_{{\varGamma}} \left( \boldsymbol{\tau}_{h} \cdot \boldsymbol{u} \right) \cdot \boldsymbol{n} v_{h} d{\varGamma} \\&&+ {\int}_{{\varOmega}} \left( \boldsymbol{\tau}_{h} \cdot \boldsymbol{u} \right) \cdot \nabla v_{h} d{\varOmega} \end{array} $$
(32)

Finally, by substituting all the integration by parts in the original equation, the following weak form is obtained:

$$ \begin{array}{@{}rcl@{}} &&{\int}_{{\varOmega}} \nabla \cdot \left[\rho \left( h + \frac{1}{2}\boldsymbol{u} \cdot \boldsymbol{u} \right) \boldsymbol{u} \right] {v_{h}} \\&&+ \left( \frac{k}{C_{p}} \nabla h \right) \cdot \nabla v_{h}+ \left( \boldsymbol{\tau}_{h} \cdot \boldsymbol{u} \right) \cdot \nabla v_{h} d{\varOmega} \\ &&-{\int}_{{\varGamma}} \left( \frac{k}{C_{p}} \nabla h \right) \cdot \boldsymbol{n} v_{h} - \left( \boldsymbol{\tau}_{h} \cdot \boldsymbol{u} \right) \cdot \boldsymbol{n} v_{h} d{\varGamma} = \boldsymbol{0} \end{array} $$
(33)

Appendix B: Finite element matrix derivation

This section shows the matrix assemble by using the finite element method to solve the state equations. This derivation follows the steps shown in Reddy and Gartling (2010). Suppose that the relation between approximated continuous distributions (ui,p, h) and the nodal values (ui,P, H) is given by:

$$ \begin{array}{@{}rcl@{}} u_{i}(\mathbf{x}) &\approx&\sum\limits_{n=1}^{N} \psi_{n}(\mathbf{x}) {u_{i}^{n}} =\mathbf{\Psi}^{T}\mathbf{u}_{i} \end{array} $$
(34)
$$ \begin{array}{@{}rcl@{}} p(\mathbf{x}) &\approx& \sum\limits_{l=1}^{L} \xi_{l}(\mathbf{x}) p_{l} = \mathbf{\Xi}^{T}\mathbf{P} \end{array} $$
(35)
$$ \begin{array}{@{}rcl@{}} h(\mathbf{x}) &\approx& \sum\limits_{m=1}^{M} \theta_{m}(\mathbf{x}) h_{m} = \mathbf{\Theta}^{T}\mathbf{H} \end{array} $$
(36)

where Ψ, Θ, and Ξ are vectors of interpolation (or shape) functions, ui, P, and H are vectors of nodal values of velocity components, pressure, and enthalpy, respectively.

Substitution of (34), (35), and (36) into the state equations weak forms results in the following finite element equations:

Continuity

$$ \begin{array}{@{}rcl@{}} &&\left[ \frac{C_{p}}{R} {\int}_{{\varOmega}^{e}} \mathbf{\Xi} \left( \frac{\partial \mathbf{\Xi}^{T}}{\partial x_{i}}\mathbf{P} (\mathbf{\Theta}^{T} \mathbf{H})^{-1} \mathbf{\Psi}^{T} + \mathbf{\Xi}^{T} \mathbf{P} \frac{\partial (\mathbf{\Theta}^{T} \mathbf{H})^{-1}}{\partial x_{i}} \mathbf{\Psi}^{T} \!\right.\right.\\&&\left.\left.+ \mathbf{\Xi}^{T} \mathbf{P} (\mathbf{\Theta}^{T} \mathbf{H})^{-1} \frac{\partial \mathbf{\Psi}^{T}}{\partial x_{i}} \right) d\mathbf{x} \right] \mathbf{u}_{i} = \mathbf{Q}(\mathbf{P,H}) \mathbf{u} = \boldsymbol{0}\\ \end{array} $$
(37)

The matrix R representing the density is defined as:

$$ \mathbf{R}(\mathbf{P,H}) = \frac{C_{p}}{R} \mathbf{\Xi}^{T} \mathbf{P} (\mathbf{\Theta}^{T} \mathbf{H})^{-1} $$
(38)

Momentum

$$ \begin{array}{@{}rcl@{}} &&{\int}_{{\varOmega}^{e}} \mathbf{\Psi R(P,H) u}_{j} \frac{\partial \mathbf{\Psi}^{T}}{\partial x_{j}} d\mathbf{x} \mathbf{u}_{i} - {\int}_{{\varOmega}^{e}} \frac{\partial \mathbf{\Psi}}{\partial x_{i}}\mathbf{\Xi}^{T} d\mathbf{x} \mathbf{P} \\&&\quad+ {\int}_{{\varOmega}^{e}} \mu \frac{\partial \mathbf{\Psi}}{\partial x_{j}}\frac{\partial \mathbf{\Psi}^{T}}{\partial x_{j}} d\mathbf{x} \mathbf{u_{i}} + {\int}_{{\varOmega}^{e}} \mu \frac{\partial \mathbf{\Psi}}{\partial x_{j}}\frac{\partial \mathbf{\Psi}^{T}}{\partial x_{i}} d\mathbf{x} \mathbf{u_{j}} \\ &&\quad+ {\int}_{{\varOmega}^{e}} \lambda \frac{\partial \mathbf{\Psi}}{\partial x_{i}}\frac{\partial \mathbf{\Psi}^{T}}{\partial x_{i}} d\mathbf{x} \mathbf{u_{i}} + {\int}_{{\varOmega}^{e}} \kappa(\alpha) \mathbf{\Psi}\mathbf{\Psi}^{T} d\mathbf{x} \mathbf{u_{i}} \\&&\quad- {\int}_{{\varGamma}^{e}} \mathbf{\Psi} {T}_{m_{i}} ds = \boldsymbol{0} \end{array} $$
(39)

Energy

$$ \begin{array}{@{}rcl@{}} &&{\int}_{{\varOmega}^{e}} \mathbf{\Theta R(P,H)} \left[ \mathbf{\Psi}^{T} \mathbf{u}_{j} \frac{\partial \mathbf{\Theta}^{T}}{\partial x_{j}} \mathbf{H} + 2 \mathbf{\Psi}^{T} \mathbf{u}_{j} \mathbf{\Psi}^{T} \frac{\partial \mathbf{\Psi}^{T}}{\partial x_{j}} \right] d\mathbf{x} \\&&+ {\int}_{{\varOmega}^{e}} \frac{k}{C_{p}} \frac{\partial \mathbf{\Theta}}{\partial x_{j}}\frac{\partial \mathbf{\Theta}^{T}}{\partial x_{j}} d\mathbf{x} \mathbf{H}\\ &&+ {\int}_{{\varOmega}^{e}} \mu \left( \frac{\partial \mathbf{\Psi}^{T}}{\partial x_{j}}\mathbf{u}_{i} + \frac{\partial \mathbf{\Psi}^{T}}{\partial x_{i}}\mathbf{u}_{j} \right) \mathbf{u}_{i} \frac{\partial \mathbf{\Theta}}{\partial x_{j}} \\&&+ \lambda \frac{\partial \mathbf{\Psi}^{T}}{\partial x_{j}}\mathbf{u}_{j} \mathbf{u_{i}} \frac{\partial \mathbf{\Theta}^{T}}{\partial x_{i}} d\mathbf{x} - {\int}_{{\varGamma}^{e}} \mathbf{\Theta} {T}_{e_{i}} ds = \boldsymbol{0} \end{array} $$
(40)

By replacing the approximation for pressure and velocity fields obtained through finite element interpolation functions in the weak formulation, the algebraic equations for the finite element method are obtained. The matrix coefficients per element are given by:

$$ \begin{array}{@{}rcl@{}} \mathbf{C}(\mathbf{R,u}) &=& {\int}_{{\varOmega}^{e}} \mathbf{\Psi R(P,H) u}_{j} \frac{\partial \mathbf{\Psi}^{T}}{\partial x_{j}} d\mathbf{x}, \\\mathbf{G}&=& {\int}_{{\varOmega}^{e}} \frac{\partial \mathbf{\Psi}}{\partial x_{i}}\mathbf{\Xi}^{T} d\mathbf{x}, \\ \mathbf{K}_{\alpha} &=& {\int}_{{\varOmega}^{e}} \alpha \mathbf{\Psi} \mathbf{\Psi}^{T} dx, \!\!\qquad\mathbf{K}_{ij}(a) = {\int}_{{\varOmega}^{e}} a \frac{\partial \mathbf{\Psi}}{\partial x_{j}} \frac{\partial \mathbf{\Psi}^{T}}{\partial x_{i}} dx \end{array} $$
$$ \begin{array}{@{}rcl@{}} \mathbf{D(R,u)} &=& {\int}_{{\varOmega}^{e}} \mathbf{\Theta R(P,H)} \mathbf{\Psi}^{T} \mathbf{u}_{j} \frac{\partial \mathbf{\Theta}^{T}}{\partial x_{j}}, \qquad \mathbf{K}_{kin}\mathbf{(R,u)} \\&=& 2\mathbf{\Psi}^{T} \mathbf{u}_{j} \mathbf{\Psi}^{T} \frac{\partial \mathbf{\Psi}^{T}}{\partial x_{j}} \\ \mathbf{L} &=& {\int}_{{\varOmega}^{e}} \frac{k}{C_{p}} \frac{\partial \mathbf{\Theta}}{\partial x_{j}}\frac{\partial \mathbf{\Theta}^{T}}{\partial x_{j}} d\mathbf{x}, \\\mathbf{R}(\mathbf{P,H})&=& \frac{C_{p}}{R} \mathbf{\Xi}^{T} \mathbf{P} (\mathbf{\Theta}^{T} \mathbf{H})^{-1} \\ \mathbf{T}_{H_{\mu}}(\mathbf{u}) &=&\! {\int}_{{\varOmega}^{e}} \mu \left( \! \frac{\partial \mathbf{\Psi}^{T}}{\partial x_{j}}\mathbf{u}_{i} + \frac{\partial \mathbf{\Psi}^{T}}{\partial x_{i}}\mathbf{u}_{j}\! \right) \mathbf{u}_{i} \frac{\partial \mathbf{\Theta}}{\partial x_{j}} d\mathbf{x},\\\!\!\!\!\!\! \qquad\mathbf{T}_{H_{\lambda}}(\mathbf{u}) &=& {\int}_{{\varOmega}^{e}} \lambda \frac{\partial \mathbf{\Psi}^{T}}{\partial x_{j}}\mathbf{u}_{j} \mathbf{u_{i}} \frac{\partial \mathbf{\Theta}^{T}}{\partial x_{i}} d\mathbf{x} \\ \mathbf{F_{m}}_{i} &=& {\int}_{{\varGamma}^{e}} \mathbf{\Psi} {T}_{m_{i}} ds\\ \mathbf{F_{e}}_{i} &=& {\int}_{{\varGamma}^{e}} \mathbf{\Theta} {T}_{e_{i}} ds \\ \Bar{\mathbf{K}}_{11} &=& 2 \mathbf{K}_{11}(\mu) + 2 \mathbf{K}_{11}(\lambda) + \mathbf{K}_{22}(\mu), \\\Bar{\mathbf{K}}_{12} &=& \mathbf{K}_{12}(\mu) \\ \Bar{\mathbf{K}}_{22} &=& \mathbf{K}_{11}(\mu) + 2 \mathbf{K}_{22}(\lambda) + 2 \mathbf{K}_{22}(\mu), \\\Bar{\mathbf{K}}_{21} &=& \mathbf{K}_{21}(\mu) \end{array} $$

The global algebraic system, considering two-dimensional case, is defined in the matrix form as:

$$ \begin{array}{@{}rcl@{}} &&\begin{bmatrix} \mathbf{C}(\mathbf{R,u}) + \mathbf{K}_{\alpha} +\Bar{\mathbf{K}} & & -\mathbf{G} & & 0 \\ \mathbf{Q}(\mathbf{P,H}) & & 0 & & 0 \\ 0 & & 0 & & \mathbf{D(R,u)} + \mathbf{L} \end{bmatrix} \left\{\begin{array}{c} \mathbf{u} \\\mathbf{P} \\ \mathbf{H} \end{array}\right\} \\&&= \left\{\begin{array}{c} \mathbf{F_{m}} \\ \mathbf{0} \\ \mathbf{F_{e}}_{i} - \mathbf{K}_{kin}\mathbf{(R,u)} - \mathbf{T}_{H_{\mu}}\mathbf{(u)} -\mathbf{T}_{H_{\lambda}}\mathbf{(u)} \end{array}\right\} \end{array} $$
(41)

where u is the velocity column vector with all directions (\(\mathbf {u} = \{\mathbf {u}_{1} \mathbf {u}_{2}\}^{T}\)). This resulting system is non-symmetrical and highly non-linear.

Appendix C: Material model assessment

In this section, the behavior of the material model is verified by comparing the flows calculated by a body-fitted mesh case and by an equivalent case with the domain represented by the material model. As explained in Section 3.1, the very low velocities in the solid region reduces the energy equation to a Laplacian equation on enthalpy (see 13). If there are no heat generation and no other source terms in the energy equation, this Laplacian of enthalpy is equal to zero. By using the divergence theorem, this equation can be interpreted as no heat going in or out of the solid region. Thus, the higher the velocity penalization on the momentum equations, the lower are the terms with velocity (u) in the energy equation, and then, the solid region defined by the design variable becomes closer to an adiabatic material.

In Fig. 14, the two domains used for a numerical comparison are presented. The body fitted case with definitions of boundary conditions can be seen in Fig. 14a. These boundary conditions have the same definition as the cases previously presented in the text: specified velocity and enthalpy at the inlet, zero velocity, adiabatic condition at the walls, and specified pressure at the outlet. In Fig. 14b, this same domain is represented by using the material model presented in the paper. The boundary conditions are the same, and the contour is defined by the material model. The boundary conditions at the domain external walls are defined as zero velocity and adiabatic.

Fig. 14
figure 14

Domains for body fitted case and case with penalization

The black arrow indicates a cut performed in both cases to verify the state variables profile in that section. The body fitted case is calculated without the material model penalization, and the extended case is calculated with the penalization term, with the value for κmax varying from 103 to 106.

In Fig. 15, comparisons of the state variables profile at the cut section can be seen. The black solid line indicates the profile in the body fitted case and the colorful lines indicate the cases with penalization. As can be seen, the higher the penalization, the closer to the body fitted case. It is important to notice that the profiles will not match perfectly because velocity will never be exactly zero in the solid region and also the penalized cases do not have a perfectly smooth contour. This contour is jagged and depends on the mesh refinement. Even so, it can be seen that this material model exhibits a good representation of adiabatic boundaries.

Fig. 15
figure 15

Comparison of state variables for body fitted and penalized cases

Appendix D: Regularization term analysis

In this appendix, the effects of the regularization term Jκ are further analyzed by considering the double channel Stokes problem presented by Borrvall and Petersson (2003) with:

  • μ = 1.0[Pas];

  • κmin = 2.5μ10− 4;

  • κmax = 2.5μ104;

  • 1[m] × 1[m] mesh with 100 × 100 triangular elements;

  • their energy dissipation objective function without Jκ, i.e. \(J_{ed}={\int \limits }_{{\varOmega }} \mu \nabla \boldsymbol {u} : \nabla \boldsymbol {u} d{\varOmega }\),

and by testing different values of q = [1, 10, 100, 1000]. This is done in order to show that increasing the q value without the regularization is not enough to remove the gray regions.

The results are shown in Fig. 16. It is shown that even though the topologies minimize the viscous energy dissipation functional (Jed), they still present many gray areas. Moreover, even when high values of q are used, the topologies are still blurred by intermediate values of α. These grays areas are removed when the regularization Jκ is used.

Fig. 16
figure 16

Optimized topologies for Stokes flow with different values of q and without Jκ in the objective function

Appendix E: : Sensitivity verification via finite differences

This section shows the finite difference verification of the automatic differentiated sensitivities calculated by the pyadjoint library. The central finite difference is used, which is given by:

$$ \frac{\partial J}{\partial \alpha} = \frac{J(\alpha + h) - J(\alpha - h)}{2h} $$
(42)

where the perturbation used is h = 1 ⋅ 10− 6.

This verification considers the domain shown in Fig. 9 and an uniform design variable distribution of α = 0.5. The chosen trial points are presented in Fig. 17. Given that two objective functions are used in this work the results of the sensitivity verification are split into two tables.

Fig. 17
figure 17

Trial points for FD verification

Table 7 shows the sensitivity comparison between the value calculated by pyadjoint and the value obtained via finite differences for the entropy variation functional (15). The sensitivities are almost identical, and the highest discrepancy occurs for sensitivity values close to zero, such as for trial point 14 which presents a difference of − 3.23%.

Table 7 Sensitivity verification for FD and adjoint approaches for the entropy variation functional

Table 8 shows the sensitivity comparison between the value calculated by pyadjoint and the value obtained by finite differences for the entropy generation functional (16) with the outlet velocity functional (22). The sensitivities are in good agreement and the highest discrepancy occurs for trial point 8 which presents a difference of 0.0085%.

Table 8 Sensitivity verification for FD and adjoint approaches for the entropy generation functional

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Sá, L.F.N., Okubo, C.M. & Silva, E.C.N. Topology optimization of subsonic compressible flows. Struct Multidisc Optim 64, 1–22 (2021). https://doi.org/10.1007/s00158-021-02903-5

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00158-021-02903-5

Keywords

Navigation