Abstract
In this work we present the development and application of a mesh adaptation tool on hybrid unstructured meshes for immersed boundary volume penalization methods in the computational fluid dynamics software from ONERA, DLR, and Airbus. This mesh adaptation tool is capable of refining elements around geometries immersed in unstructured meshes made of different types of elements, like tetrahedra, hexahedra, prisms, and pyramids. This feature allows us to simulate fluid flow problems with the immersed boundary method not only on Cartesian meshes but on general hybrid unstructured meshes. Of special interest in this work is the simulation of turbulent fluid flows in aerodynamics through the numerical solution of the Reynolds-averaged Navier–Stokes equations either on unstructured meshes with only immersed geometries or on unstructured body-fitted meshes along with immersed geometries. As part of the benchmarking, we simulate the subsonic flow past the high-lift multi-element airfoil. The reported numerical simulations are in good agreement with their corresponding full body-fitted meshes.
1. Introduction
Immersed boundary methods are numerical schemes for simulating fluid–structure interaction problems involving complex geometries, providing an alternative to numerical methods based on body-fitted meshes. These methods offer a flexible framework for modeling fluid flow over complicated immersed bodies on grids that do not conform to the surface of the body by treating these as immersed boundaries within the computational domain. In this way, immersed boundary methods overcome the challenges of generating high-quality meshes around complex geometries, which can be time-consuming and computationally demanding, while accurately resolving complex flows using simple grids. The geometric components are discretized using a separate representation, such as a surface or volume mesh, which is then immersed within the computational grid. Immersed boundary conditions are applied to take into account the geometric components lying in the flow.
Because the meshes used in the immersed boundary method are, in principle, non-conforming with the geometry of the obstacle, a very high resolution of this background mesh is required to obtain reliable numerical solutions. The employment of very fine meshes in the whole computational domain makes unpractical the use of immersed boundary methods for industrial applications, like the study of the aerodynamics of aircrafts. In fact, very fine meshes are only necessary in specific places in the computational domain, like around the immersed geometry and the wake regions. Fine meshes far away from the immersed bodies are unnecessary. For these reasons, mesh refinement algorithms are used to refine the mesh only in the regions where it is actually essential for accurate computations [1,2,3].
In this work, we generate refined meshes for use in the CODA CFD solver with immersed boundary methods. CODA is a parallel software framework for the multidisciplinary analysis and optimization of aircraft and helicopters based on advanced and accurate numerical methods [4,5,6]. The solver is being developed as part of a collaboration between the French National Aerospace Research Center (ONERA), the German Aerospace Center (DLR), and Airbus. CODA provides a robust, scalable, and computationally efficient integrated design process for aerodynamics and structural analysis. To perform an efficient analysis and optimization of aircrafts on state-of-the-art HPC systems, the Navier–Stokes and the Reynolds-averaged Navier–Stokes (RANS) equations are solved for high-Reynolds-number flow on unstructured grids with second-order finite-volume and higher-order discontinuous-Galerkin discretizations.
2. Methodology
In order to use the immersed boundary methods accurately and efficiently, very fine meshes around the immersed geometry are required. In our approach, the preprocessing tool imports a body-fitted mesh that, in general, is made of different element types, like tetrahedra, hexahedra, prisms and pyramids. This initial background mesh can be, for example, a mesh for an airfoil with a very well-defined boundary layer. In this case, there are elements of different shapes, namely hexahedra and prisms on the boundary layer and tetrahedra outside this region. If the goal is, for instance, to use the immersed boundary method for the optimization of the flap position, we do not need to remesh the new-configuration airfoil–flap every time the optimizer provides new coordinates for the flap location. The idea is to refine the region where the optimizer will locate the flap, but taking into account that this region can be formed by hybrid elements.
The preprocessor we have developed is capable of refining any kind of element from the background mesh, which makes it more flexible. The preprocessing tool also needs to import the immersed geometry in order to flag the elements that overlap this body for further refinement. This imported geometry is described by STL files. These files contain an unstructured triangulated surface (triangle unit vectors and the coordinates of their corresponding vertices) as generated by the CAD software (we used FreeCAD version 1.1). In Figure 1 we show the refinement of several types of elements in our preprocessing tool.
Figure 1.
Splitting of elements of different shape.
The preprocessing tool has the capability of refining the background hexahedral mesh around the triangulated surface of the immersed geometry. The preprocessing tool will follow the next steps for refining the background mesh:
- Marking of the elements that require refinement: For refinement of elements intersecting the triangulated surface of the immersed body, an efficient algorithm for triangle–box overlap has been implemented. Before mesh refinement takes place, this triangle–box overlap is tested for all triangles of the surface triangulation, and if such overlap takes place, the involved elements store the overlapped triangles. During the mesh refinement loop (refinement level ), this triangle–box overlap is tested only for those elements that store overlapped triangles.
- Marking of the elements for balance: The CODA CFD solver can handle hanging nodes for different types of face elements (triangular and quadrilateral faces). This hanging-node capability is restricted in CODA to elements with a refinement level ratio 2:1. This means that for two neighboring elements with different refinement levels, only a level difference of at most 1 between neighboring cells is allowed. The preprocessing tool is aware of this restriction and therefore an algorithm has been implemented to preserve the balancing of 2:1.
- Refinement of elements: All flagged cells are split into new child cells. Hanging nodes can appear, and the relationship between the face nodes of neighboring elements with different levels of refinement has to be calculated and exported in such a way that CODA can handle them.
In Figure 2 we show the flow diagram of the mesh refinement methodology used in this work. We stress here that the mesh refinement procedure is quite cheap.
Figure 2.
Flowchart of the mesh refinement methodology used in this work.
3. Results and Discussion
We illustrate the capabilities of our preprocessing tool with an example involving the refinement of the flap region in a multi-element airfoil. The flow around multi-element airfoils is complex, and it is well known to be dominated by different flow mechanisms at different operating conditions, making it rather difficult to accurately predict high-lift flow fields. Regarding flow conditions in this example, the gas has an adiabatic index and flows with Reynolds number and freestream Mach number . Simulations were performed with the airfoil at an angle of attack α = 16°. The non-dimensional density and pressure are set to and , respectively.
The initial background mesh is a body-fitted mesh for the main part of the airfoil, while the flap is later placed in this background mesh, and the elements that overlap with this immersed geometry are further refined. For comparison purposes, we show the mesh of a full body-fitted airfoil–flap system (see Figure 3) and the initial body-fitted mesh for the main part of the airfoil with an immersed flap (see Figure 4).
Figure 3.
Full body-fitted mesh of the airfoil–flap system.
Figure 4.
Body-fitted background mesh of the airfoil.
We have performed CFD simulations in both meshes, namely, the mesh of the full body-fitted airfoil–flap system (simulated with pure finite volume schemes) and the initial body-fitted mesh for the main part of the airfoil with an immersed flap (simulated with finite volume schemes along with immersed boundary methods). In Figure 4 we show the body-fitted background mesh of the airfoil, and in Figure 5 a zoomed-in section of the mesh with refinement around the immersed flap. We can observe that the elements in the mesh region where the flap is placed do not conform with the immersed surface. The body-fitted mesh of the airfoil–flap system has around elements. The numerical simulation of the RANS equations with CODA and using a second-order finite volume spatial discretization operator lasts around 3/4 min on 200 cores. The refined mesh for the initial body-fitted mesh for the main part of the airfoil with an immersed flap has around elements (coarse mesh) and around elements (fine mesh), and the numerical simulation with CODA+IBVP lasts around 4/5 min on 200 cores, with similar results with respect to the lift and drag coefficients for the fine mesh (see Table 1).
Figure 5.
Zoomed-in section of the background mesh with refinement around the immersed flap.
Table 1.
Lift and drag coefficients for the optimal position of the flap and angle of attack α = 16°. The full body-fitted mesh and the hybrid body-fitted/IBM meshes are considered.
In Figure 6 are shown contour plots of the velocity magnitude for the full body-fitted mesh of the airfoil–flap system (left) and for the body-fitted mesh of the airfoil and IBM mesh for the flap (right). Due to high-lift flow conditions with an angle of attack α = 16°, we can observe the deceleration of the main-element wake behind the flap. A small separation region can be observed near the trailing edge of the flap. We performed simulations for larger angles of attack (α ≈ 18° − 20°), where the flow between the main element wake and flap shear layer becomes increasingly unsteady as stall is approached.
Figure 6.
Contour plots of the velocity magnitude. Left: full body-fitted mesh of the airfoil–flap system. Right: body-fitted mesh of the airfoil and IBM mesh for the flap.
Observe that, if we analyze the pressure coefficient (see Figure 7), for a coarse mesh (low refinement level in the flap region), we get poor results, but for a finer mesh (high refinement level in the flap region) when the hybrid body-fitted/IBM mesh or the full body-fitted mesh for the airfoil–flap system is considered, the results agree well.
Figure 7.
Computed pressure coefficient at angle of attack α = 16° for the full body-fitted mesh of the airfoil–flap system and the body-fitted mesh of the airfoil and IBM mesh for the flap.
In order to accurately simulate the flow past a multi-element airfoil with RANS equations, it is necessary to have a mesh with elements in the boundary layer having a length normal to the surface around (or even smaller). An IBM mesh with elements in the boundary layer for the wing and the flap having a similar size requires around elements. Therefore, in a coarse IBM mesh, we expect a large discrepancy in the flow field properties compared to very fine meshes (body-fitted meshes or IBM meshes). We have observed in several numerical experiments that even if the mesh in the boundary layer of the wing is very fine but coarse in the boundary layer of the flap, the simulations predict unreliable values of the physical quantities, as can be seen in Figure 7 for the case of the pressure coefficient. The mesh resolution and also the geometry tessellation resolution play an important role when we simulate the flow around a multi-element airfoil with RANS equations. More details on the effect of the mesh resolution of IBM meshes on aerodynamic simulations can be found in references [1,7].
Regarding the mesh characteristics, some elements in the refined region are tetrahedra and some are pyramids/hexahedra, so the hybrid mesh adaptation tool works pretty well on all these types of element. These results show the effectiveness of our mesh refinement approach for complex unstructured background meshes. It is no longer necessary to use only Cartesian background meshes with immersed boundary methods.
The preprocessing tool presented in this article works for 2D and 3D meshes. The example discussed in this section is a 2D case but using 3D meshes with only one element in the extrusion direction. It is important to mention that for complex 3D configurations, the preprocessing tool can refine unstructured hybrid meshes up to 300 million elements. The main drawback when applying the IBVP method to this kind of complex geometries is the huge amount of elements required to simulate flow problems. For example, a RANS simulation of the CRM aircraft with a body-fitted mesh requires around 200 million elements while one with IBVP requires around 2500 million elements [7].
4. Conclusions
In this work, we have presented the development and application of a mesh adaptation tool on hybrid unstructured meshes for immersed boundary volume penalization methods in the CODA computational fluid dynamics solver. Our preprocessing tool can refine any kind of element from an imported mesh generated by an external mesh generator, like GMSH. This allows us to simulate fluid flow problems with the immersed boundary method not only on Cartesian meshes, but on general hybrid unstructured meshes. As an example of application, we perform the simulation of the subsonic flow past a multi-element airfoil by solving the Reynolds-averaged Navier–Stokes equations on unstructured body-fitted meshes along with immersed geometries. The numerical simulations reported are in good agreement with their corresponding full body-fitted meshes.
Author Contributions
Conceptualization, J.N.-d.l.R., E.F. and E.V.; methodology, J.N.-d.l.R.; software, J.N.-d.l.R.; validation, J.N.-d.l.R.; formal analysis, J.N.-d.l.R.; investigation, J.N.-d.l.R.; resources, E.F. and E.V.; data curation, J.N.-d.l.R.; writing—original draft preparation, J.N.-d.l.R.; writing—review and editing, J.N.-d.l.R., E.F. and E.V.; visualization, J.N.-d.l.R.; supervision, E.F. and E.V.; project administration, E.F. and E.V.; funding acquisition, E.F. and E.V. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the Clean Aviation Joint Undertaking under the European Union’s Horizon Europe Research and Innovation Programme under Grant Agreement HERA (Hybrid-Electric Regional Architecture) No. 101102007. All authors gratefully acknowledge Universidad Politécnica de Madrid for providing computing resources on the Magerit Supercomputer.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The data presented in this study are available on request from the corresponding author.
Acknowledgments
The authors gratefully acknowledge Universidad Politécnica de Madrid (www.upm.es, accessed on 23 April 2026) for providing computing resources on the Magerit Supercomputer. The authors also thankfully acknowledge the computer resources at MareNostrum and the technical support provided by Barcelona Supercomputing Center (RES-IM-2022-3-0023).
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Núñez, J.; Huergo, D.; Lodares, D.; Shrestha, S.; Guerra, J.; Florenciano, J.; Ferrer, E.; Valero, E. Implementation of immersed boundaries via volume penalization in the industrial aeronautical computational fluid dynamics solver CODA. Eng. Comput. 2025, 41, 2571–2592. [Google Scholar] [CrossRef] [Scilit]
- Colombo, S.; Rubio, G.; Kou, J.; Valero, E.; Codina, R.; Ferrer, E. A high-order immersed boundary method to approximate flow problems in domains with curved boundaries. J. Comput. Phys. 2025, 528, 113807. [Google Scholar] [CrossRef] [Scilit]
- Kou, J.; Joshi, S.; Hurtado-de Mendoza, A.; Puri, K.; Hirsch, C.; Ferrer, E. Immersed boundary method for high-order flux reconstruction based on volume penalization. J. Comput. Phys. 2022, 448, 110721. [Google Scholar] [CrossRef] [Scilit]
- Kroll, N.; Abu-Zurayk, M.; Dimitrov, D.; Franz, T.; Führer, T.; Gerhold, T.; Görtz, S.; Heinrich, R.; Ilic, C.; Jepsen, J.; et al. DLR project Digital-X: Towards virtual aircraft design and flight testing based on high-fidelity methods. CEAS Aeronaut. J. 2016, 7, 3–27. [Google Scholar] [CrossRef] [Scilit]
- Jägersküpper, J.; Vollmer, D. On highly scalable 2-level-parallel unstructured CFD. In Proceedings of the 8th European Congress on Computational Methods in Applied Sciences and Engineering, Oslo, Norway, 5–9 June 2022. [Google Scholar] [CrossRef] [Scilit]
- Volpiani, P.; Chapelier, J.B.; Schwöppe, A.; Jägersküpper, J.; Champagneux, S. Aircraft simulations using the new CFD software from ONERA, DLR, and Airbus. J. Aircr. 2024, 61, 857–869. [Google Scholar] [CrossRef] [Scilit]
- Constant, B.; Péron, S.; Beaugendre, H.; Benoit, C. An improved immersed boundary method for turbulent flow simulations on Cartesian grids: Extension of a global geometric approach for thin boundary layers and strong flow incidence. J. Comput. Phys. 2024, 519, 113441. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.






