1. Introduction
Hybrid Eulerian–Lagrangian solvers are attracting an increasing amount of attention in recent years [
1,
2,
3,
4,
5], particularly within the field of external aerodynamics. The fundamental concept behind the hybrid framework is to combine a mesh-based Eulerian solver with a mesh-free Lagrangian solver in order to exploit their strengths while mitigating their inherent weaknesses. Specifically, Eulerian methods, such as Finite Volumes, Finite Elements, or Finite Differences, excel in resolving regions proximate to solid bodies, particularly boundary layers. They adeptly capture near-wall phenomena with efficiency and high fidelity due to their capacity to leverage anisotropic elements. However, these methods are in general dissipative and dispersive, making the deployment of vast amounts of elements throughout the computational domain or the adoption of high-order discretization schemes essential, increasing computational cost significantly. On the other hand, in Lagrangian approaches, like the Vortex Particle Method (VPM), the artificial diffusion can be reduced significantly, especially in regions where viscous phenomena are not dominant (e.g., wakes). Nevertheless, they are not capable of using anisotropic elements, making the process of resolving boundary layers extremely difficult. An extensive description of VPMs can be found in [
6], while a detailed analytical review of the method was conducted in [
7]. By combining these methods, hybrid solvers emerge, capable of utilizing the Eulerian solver for the near-wall regions and the Lagrangian solver across the remainder of the computational domain.
In the realm of external aerodynamic simulations, the presence of dynamic motions is a ubiquitous phenomenon. This field encompasses a diverse range of applications, including wind turbines, helicopters, cars, airplanes, and more. In Computational Fluid Dynamics (CFD), the availability of tools capable of simulating flows around moving bodies is of paramount importance. Simulation of moving bodies has been rigorously explored using both Eulerian [
8,
9,
10] and Lagrangian [
11] solvers. Moreover, dynamic mesh simulations have been successfully conducted through the integration of hybrid solvers. For instance, in [
12], simulations were conducted involving elastically mounted cylinders in a tandem arrangement, utilizing their strongly coupled compressible Eulerian–Lagrangian solver. In another noteworthy study, the authors of ref. [
13] managed to simulate a four-bladed advancing rotor by coupling compressible solver OVERFLOW with a VPM. Lastly, in ref. [
14], the authors carried out rotor simulations in hover conditions by employing a hybrid method that combines an Eulerian-based Reynolds-averaged Navier–Stokes solver with a Lagrangian-based viscous wake method.
In this study, the primary focus is on the hybrid solver introduced in [
1], and specifically the extension of the solver’s capability to handle dynamic meshes. The original paper [
1] presents a 2D hybrid Eulerian–Lagrangian solver that underwent validation in fixed mesh cases. The Eulerian component of this hybrid solver was developed within the OpenFOAM framework [
15]. OpenFOAM is an open-source software tool renowned for its capabilities in solving, pre-processing, and post-processing tasks related to Computational Fluid Dynamics (CFD) and continuum mechanics problems. It is widely used in both academia and industry since it is a powerful and flexible tool that allows for the customization of existing solvers, the development of novel solver solutions, and the integration with in-house software. The built-in solver of OpenFOAM that is used in this work is pimpleFOAM, an incompressible, transient solver, which has been used in many studies [
16,
17]. Furthermore, OpenFOAM offers built-in features for handling moving meshes through the utilization of the “
dynamicMeshDict” dictionary. Various methods are available within OpenFOAM for addressing the movement of bodies, with the most known in the field of aerodynamics being the overset mesh, the morphing mesh and the sliding interfaces using Arbitrary Mesh Interfaces (AMI). In ref. [
9], the authors make a comparison between the morphing and the overset mesh methods by simulating the forced and free oscillations of a 2D cylinder. In ref. [
10], the authors use the sliding interfaces method to conduct airfoil simulations. Solid-body motion, another available mesh motion in OpenFOAM primarily used for internal flows like sloshing tanks [
18,
19], is less commonly employed in the field of external aerodynamics.
In the context of a hybrid solver, where the Eulerian domain is placed in close proximity to the simulated body, the use of solid-body mesh motion can be a potential method for incorporating dynamic mesh options in the solver and so it is suggested here. This approach involves enabling the entire computational mesh to be moved as a solid body while having the requisite boundary conditions imposed by the vortex particle method. However, to achieve this, modifications are required in the pimpleFOAM solver. In the original version of pimpleFOAM, mesh updating and equation solving occur in the same time-step. To establish coupling with the Lagrangian solver, these two steps need to be separated. As a result, the mesh is first updated, followed by the calculation of necessary boundary conditions by the Lagrangian solver, and finally the Eulerian solution is allowed to evolve. The primary objective of this paper is to address the modification of pimpleFOAM to make it compatible with a VPM for dynamic mesh simulations and to validate the hybrid code’s ability to handle dynamic mesh cases. For validation purposes, simple benchmark cases are utilized, without the presence of any solid bodies. Specifically, these cases involve the Lamb–Oseen diffusing vortex, with each scenario incorporating various types of mesh movements, including translational, rotational, oscillational, and combinations thereof.
The structure of this paper is the following:
Section 2 briefly describes the idea behind the hybrid solver as well as the mathematics behind the VPM.
Section 3 deals with the modifications that are employed in the pimpleFOAM solver in order to achieve coupling with the Lagrangian solver. Then, in
Section 4, the validation of the proposed method is presented. Finally, in
Section 5, the conclusions of the study are presented, and the potentials of the solver are discussed.
3. PimpleFOAM Modification
In this project, OpenFOAM v9 [
27] is employed as the Eulerian component of the hybrid solver. Specifically, the solver utilized in this context is pimpleFOAM, an incompressible, transient solver capable of accommodating dynamic mesh simulations. pimpleFOAM uses the PIMPLE algorithm [
28] for correcting the velocity and pressure fields to enforce the continuity equation. In a standard OpenFOAM case, when the user invokes the pimpleFOAM solver, it triggers a while loop that runs from the initial to the simulation’s end time. The details of this loop’s formulation can be found in
Appendix A. However, this particular formulation is not suitable for accommodating the coupling of OpenFOAM with an additional solver, as is the case here. In this hybrid approach, coupling steps must occur immediately before and after each Eulerian step to establish the necessary coupling. Moreover, in the context of a moving mesh, actions need to be taken in the interim. This is because, after the mesh undergoes motion, boundary conditions must be computed for the updated coordinates of the boundary faces.
For this purpose, the original structure of pimpleFOAM is modified, resulting in the creation of a new class-based solver called
EulerianPimpleFoam. All the processes within the Eulerian solver are now encapsulated as member functions of this class, providing enhanced control and coordination. In the hybrid solver, at any given time, the Eulerian component can halt its operations, export data, receive new inputs, and establish efficient communication with the Lagrangian solver. This structure facilitates a more organized and flexible interaction between the Eulerian and Lagrangian components. The solver’s structure is visually depicted in
Figure 4.
Another noteworthy advantage of this solver’s specific structure is its ability to handle multiple OpenFOAM cases simultaneously. Each OpenFOAM case can be instantiated as an object of the class and executed independently. This capability enables the simulation of multi-body scenarios, with Lagrangian particles facilitating interconnections between various Eulerian regions.
As previously mentioned, to facilitate dynamic mesh simulations within the hybrid framework, the mesh motion and solution evolution need to be separated. Consequently, when conducting a dynamic mesh simulation, the Eulerian evolution comprises two distinct steps:
evolve_mesh() and
evolve_only_solution() functions. These functions presented in a pseudocode format can be seen in Algorithms 1 and 2. The original codes in the OpenFOAM language format can be seen in
Appendix A. It is apparent that, in contrast to the original structure outlined in
Appendix B, the mesh is initially updated before proceeding with solution evolution.
Algorithm 1 The evolve_mesh member function that updates only the mesh of the Eulerian part. |
Function evolve_mesh() if LTS then Include “setRDeltaT.H” else Include “CourantNo.H” Include “setDeltaT.H” end if
|
runTime++ fvModels.preUpdateMesh() mesh.update()
| |
Algorithm 2 The evolve_only_solution member function that evolves the Eulerian solution without moving the mesh. |
|
| |
if correctPhi is enabled then Include “correctPhi.H” end if if checkMeshCourantNo is enabled then Include “meshCourantNo.H” end if end if end if
|
fvModels.correct() Include “UEqn.H” while pimple.correct() do Include “pEqn.H” end while if pimple.turbCorr() then laminarTransport.correct() turbulence.correct() end if end while vorticity = compute curl(U) runTime.write()
| ▹ Correct finite volume models ▹ Solve for the velocity field U ▹ Solve for the pressure field p ▹ Correct laminar transport ▹ Correct turbulence models ▹ Calculate vorticity ▹ Write simulation run time details
|