Implementation and Validation of Explicit Immersed Boundary Method and Lattice Boltzmann Flux Solver in OpenFOAM
Abstract
:1. Introduction
2. Explicit Immersed Boundary-Lattice Boltzmann Flux Solver for Incompressible Flows with Moving Boundaries
2.1. Governing Equations and Finite Volume Discretization
2.2. Flow Field Prediction through Lattice Boltzmann Flux Solver
2.3. Velocity Correction through Explicit Boundary-Condition-Enforced Immersed Boundary Method
3. Implementation of the EIB-LBFS Method in OpenFOAM
Listing 1. The pseudo-code of the developed EIB-LBFS solver in OpenFOAM. |
int main(int argc, char *argv[]) { // standard operations in OpenFOAM #include “setRootCase.H” #include “createTime.H” #include “createMesh.H” #include “createFields.H” #include “createFieldRefs.H” #include “createFluxes.H” // initialize streaming time variable for local LBFS reconstruction surfaceScalarField streamingTime; // create LBFS module object for handling interfacial flux calculation according to Section 2.2 lbfsModule LBFS(mesh, streamingTime, rho, U); // create IBM module object for handling EIBM calculation according to Section 2.3 ibmModule IBM(U, rho); // start main solution loop Info<< “\nStarting time loop\n” << endl; while (runTime.run()) { runTime++; Info<< “Time = ” << runTime.timeName() << nl << endl; // call the member function of the LBFS object to compute the fluxes, where mu, phi and phiUp denote the dynamic viscosity, mass flux and momentum flux, respectively. LBFS.calcFlux(mu, phi, phiUp); volScalarField rhoR = -fvc::div(phi); // rho residual as the divergence of the continuity flux volVectorField rhoUR = -fvc::div(phiUp); // rhoU residual as the divergence of the momentum flux // solve intermediate continuity and momentum equations according to Equation (4) solve(fvm::ddt(rho)==rhoR); solve(fvm::ddt(rhoU)==rhoUR); // get intermediate velocity field U.ref() = rhoU.internalField()/rho.internalField(); // call the member function of the IBM object to compute the velocity correction to the intermediate velocity according to Section 2.3 vectorField deltaU = IBM.getDeltaU(); // correct the velocity in the Eulerian mesh forAll (mesh.C(), i) { U.ref()[i] = U.internalField()[i] + deltaU[i]; } // update the momentum based on the new velocity field rhoU = rho*U; // update boundary conditions at domain boundaries U.correctBoundaryConditions(); rho.correctBoundaryConditions(); rhoU.ref() = U.internalField()*rho.internalField(); rhoU.boundaryFieldRef() = rho.boundaryField()*U.boundaryField(); // standard operations in OpenFOAM runTime.write(); } Info<< “End\n” << endl; return 0; } |
4. Numerical Results and Discussion
4.1. Accuracy Test According to the Taylor–Green Vortex
4.2. Flow Past a Stationary Circular Cylinder
4.3. Flow Past a Stationary NACA-0012 Airfoil
4.4. Flow Past an Oscillating Circular Cylinder
4.5. Sedimentation of a Circular Particle in a Rectangular Box
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Nomenclature
density | |
velocity vector | |
pressure | |
dynamic viscosity | |
kinematic viscosity | |
f | restoring force |
U | conservative variables vector |
F | flux tensor |
G | body force vector |
control cell i | |
lattice velocity vector | |
single relaxation parameter | |
streaming time step | |
h | mesh spacing |
the sound speed | |
equilibrium density distribution function | |
non-equilibrium density distribution function | |
physical location of the cell interface | |
t | time |
velocity correction | |
Lagrangian points | |
velocity corrections at the Lagrangian points | |
Dc | diameter of the circular cylinder |
Re | Reynolds number |
free-stream velocity | |
pressure coefficient | |
lift coefficient | |
drag coefficient | |
Strouhal number | |
recirculation length | |
separation angle | |
pressure of the free-stream | |
pressure on the cylinder surface | |
lift force | |
drag force | |
fo | vortex shedding frequency |
Ae | oscillating amplitude |
fe | excitation frequency |
References
- Sotiropoulos, F.; Yang, X. Immersed boundary methods for simulating fluid-structure interaction. Prog. Aerosp. Sci. 2014, 65, 1–21. [Google Scholar] [CrossRef]
- Wu, B.; Shu, C.; Wan, M.; Wang, Y.; Chen, S. Hydrodynamic performance of an unconstrained flapping swimmer with flexible fin: A numerical study. Phys. Fluids 2022, 34, 011901. [Google Scholar] [CrossRef]
- Zabala, I.; Henriques, J.C.C.; Blanco, J.M.; Gomez, A.; Gato, L.M.C.; Bidaguren, I.; Falcão, A.F.O.; Amezaga, A.; Gomes, R.P.F. Wave-induced real-fluid effects in marine energy converters: Review and application to OWC devices. Renew. Sustain. Energy Rev. 2019, 111, 535–549. [Google Scholar] [CrossRef]
- Zhu, C.; Yu, Z.; Shao, X. Interface-resolved direct numerical simulations of the interactions between neutrally buoyant spheroidal particles and turbulent channel flows. Phys. Fluids 2018, 30, 115103. [Google Scholar] [CrossRef]
- Zhu, C.; Yu, Z.; Pan, D.; Shao, X. Interface-resolved direct numerical simulations of the interactions between spheroidal particles and upward vertical turbulent channel flows. J. Fluid Mech. 2020, 891, A6. [Google Scholar] [CrossRef]
- Zhang, Z.L.; Shu, C.; Liu, Y.Y.; Liu, W.; Khalid, M.S.U. An improved M-SPEM for modeling complex hydroelastic fluid-structure interaction problems. J. Comput. Phys. 2023, 488, 112233. [Google Scholar] [CrossRef]
- Peskin, C.S. The immersed boundary method. Acta Numer. 2002, 11, 479–517. [Google Scholar] [CrossRef]
- Mittal, R.; Iaccarino, G. Immersed boundary method. Annu. Rev. Fluid Mech. 2005, 37, 239–261. [Google Scholar] [CrossRef]
- Huang, W.X.; Shin, S.J.; Sung, H.J. Simulation of flexible filaments in a uniform flow by the immersed boundary method. J. Comput. Phys. 2007, 226, 2206–2228. [Google Scholar] [CrossRef]
- Wu, J.; Shu, C. Implicit velocity correction-based immersed boundary-lattice Boltzmann method and its applications. J. Comput. Phys. 2009, 228, 1963–1979. [Google Scholar] [CrossRef]
- Wu, J.; Shu, C. An improved immersed boundary-lattice Boltzmann method for simulating three-dimensional incompressible flows. J. Comput. Phys. 2010, 229, 5022–5042. [Google Scholar] [CrossRef]
- Peskin, C.S. Flow patterns around heart valves: A numerical method. J. Comput. Phys. 1972, 10, 252–271. [Google Scholar] [CrossRef]
- Lai, M.C.; Peskin, C.S. An immersed boundary method with formal second-order accuracy and reduced numerical viscosity. J. Comput. Phys. 2000, 160, 705–719. [Google Scholar] [CrossRef]
- Kim, Y.; Peskin, C.S. Penalty immersed boundary method for an elastic boundary with mass. Phys. Fluids 2007, 19, 053103. [Google Scholar] [CrossRef]
- Huang, W.X.; Tian, F.B. Recent trends and progress in the immersed boundary method. Proc. Inst. Mech. Eng. Part C J. Mech. Eng. Sci. 2019, 233, 7617–7636. [Google Scholar] [CrossRef]
- Goldstein, D.; Handler, R.; Sirovich, L. Modeling a no-slip flow boundary with an external force field. J. Comput. Phys. 1993, 105, 354–366. [Google Scholar] [CrossRef]
- Feng, Z.G.; Michaelides, E.E. Proteus: A direct forcing method in the simulations of particulate flows. J. Comput. Phys. 2005, 202, 20–51. [Google Scholar] [CrossRef]
- Park, H.; Pan, X.; Lee, C.; Choi, J.-I. A pre-conditioned implicit direct forcing based immersed boundary method for incompressible viscous flows. J. Comput. Phys. 2016, 314, 774–799. [Google Scholar] [CrossRef]
- Uhlmann, M. An immersed boundary method with direct forcing for the simulation of particulate flows. J. Comput. Phys. 2005, 209, 448–476. [Google Scholar] [CrossRef]
- Niu, X.; Shu, C.; Chew, Y.; Peng, Y. A momentum exchange-based immersed boundary-lattice Boltzmann method for simulating incompressible viscous flows. Phys. Lett. A 2006, 354, 173–182. [Google Scholar] [CrossRef]
- Jasak, H.; Rigler, D.; Tuković, Ž. Design and implementation of immersed boundary method with discrete forcing approach for boundary conditions. In Proceedings of the 11th World Congress on Computational Mechanics, WCCM 2014, 5th European Conference on Computational Mechanics, ECCM 2014 and 6th European Conference on Computational Fluid Dynamics, ECFD 2014, Barcelona, Spain, 20–25 July 2014; International Center for Numerical Methods in Engineering: Barcelona, Spain, 2014; pp. 5319–5332. [Google Scholar]
- Giahi, M.; Bergstrom, D. A critical assessment of the immersed boundary method for modeling flow around fixed and moving bodies. Comput. Fluids 2023, 256, 105841. [Google Scholar] [CrossRef]
- Mohd-Yusof, J. Interaction of Massive Particles with Turbulence. Ph.D. Thesis, Cornell University, Ithaca, NY, USA, 1996. [Google Scholar]
- Fadlun, E.; Verzicco, R.; Orlandi, P.; Mohd-Yusof, J. Combined immersed-boundary finite-difference methods for three-dimensional complex flow simulations. J. Comput. Phys. 2000, 161, 35–60. [Google Scholar] [CrossRef]
- Zhang, N.; Zheng, Z. An improved direct-forcing immersed-boundary method for finite difference applications. J. Comput. Phys. 2007, 221, 250–268. [Google Scholar] [CrossRef]
- Azis, M.H.A.; Evrard, F.; van Wachem, B. An immersed boundary method for incompressible flows in complex domains. J. Comput. Phys. 2019, 378, 770–795. [Google Scholar] [CrossRef]
- Li, Z.; Cao, W.; Le Touzé, D. On the coupling of a direct-forcing immersed boundary method and the regularized lattice Boltzmann method for fluid-structure interaction. Comput. Fluids 2019, 190, 470–484. [Google Scholar] [CrossRef]
- Luo, K.; Wang, Z.; Fan, J.; Cen, K. Full-scale solutions to particle-laden flows: Multidirect forcing and immersed boundary method. Phys. Rev. E 2007, 76, 066709. [Google Scholar] [CrossRef]
- Wang, Z.; Fan, J.; Luo, K. Combined multi-direct forcing and immersed boundary method for simulating flows with moving particles. Int. J. Multiph. Flow 2008, 34, 283–302. [Google Scholar] [CrossRef]
- Zhao, X.; Chen, Z.; Yang, L.; Liu, N.; Shu, C. Efficient boundary condition-enforced immersed boundary method for incompressible flows with moving boundaries. J. Comput. Phys. 2021, 441, 110425. [Google Scholar] [CrossRef]
- Pinelli, A.; Naqavi, I.; Piomelli, U.; Favier, J. Immersed-boundary methods for general finite-difference and finite-volume Navier-Stokes solvers. J. Comput. Phys. 2010, 229, 9073–9091. [Google Scholar] [CrossRef]
- Li, Z.; Favier, J.; D’Ortona, U.; Poncet, S. An immersed boundary-lattice Boltzmann method for single- and multi-component fluid flows. J. Comput. Phys. 2016, 304, 424–440. [Google Scholar] [CrossRef]
- Zhang, D.; Li, S.; Jiao, S.; Shang, Y.; Dong, M. Relative permeability of three immiscible fluids in random porous media determined by the lattice Boltzmann method. Int. J. Heat Mass Transf. 2019, 134, 311–320. [Google Scholar] [CrossRef]
- Tian, F.B.; Luo, H.; Zhu, L.; Liao, J.C.; Lu, X.Y. An efficient immersed boundary-lattice Boltzmann method for the hydrodynamic interaction of elastic filaments. J. Comput. Phys. 2011, 230, 7266–7283. [Google Scholar] [CrossRef]
- Zhang, D.; Li, Y.; Zhang, J.; Yuan, H.; Zhang, Z.L. Pore-scale numerical study: Brine water crystallization with ice crystal particle motion using the LBM-PFM-IBM. Appl. Therm. Eng. 2023, 234, 121258. [Google Scholar] [CrossRef]
- Li, Q.Z.; Lu, Z.L.; Chen, Z.; Shu, C.; Liu, Y.Y.; Guo, T.Q. A simplified lattice Boltzmann model for two-phase electro-hydrodynamics flows and its application to simulations of droplet deformation in electric field. Appl. Math. Model. 2023, 122, 99–126. [Google Scholar] [CrossRef]
- Wang, Y.; Shu, C.; Teo, C.; Wu, J. An immersed boundary-lattice Boltzmann flux solver and its applications to fluid-structure interaction problems. J. Fluids Struct. 2015, 54, 440–465. [Google Scholar] [CrossRef]
- Wang, Y.; Shu, C.; Yang, L. Boundary condition-enforced immersed boundary-lattice Boltzmann flux solver for thermal flows with Neumann boundary conditions. J. Comput. Phys. 2016, 306, 237–252. [Google Scholar] [CrossRef]
- Shu, C.; Wang, Y.; Teo, C.J.; Wu, J. Development of lattice Boltzmann flux solver for simulation of incompressible flows. Adv. Appl. Math. Mech. 2014, 6, 436–460. [Google Scholar] [CrossRef]
- Liu, Y.Y.; Shu, C.; Zhang, H.W.; Yang, L.M. A high order least square-based finite difference-finite volume method with lattice Boltzmann flux solver for simulation of incompressible flows on unstructured grids. J. Comput. Phys. 2020, 401, 109019. [Google Scholar] [CrossRef]
- Liu, Y.Y.; Yang, L.M.; Shu, C.; Zhang, H.W. Three-dimensional high-order least square-based finite difference-finite volume method on unstructured grids. Phys. Fluids 2020, 32, 123604. [Google Scholar] [CrossRef]
- Zhang, H.; Liu, Y.; Zhang, Z.; Wang, L.P.; Shu, C. An immersed boundary-lattice Boltzmann flux solver for simulation of flows around structures with large deformation. Phys. Fluids 2023, 35, 031912. [Google Scholar] [CrossRef]
- Liu, Y.Y.; Yang, L.M.; Shu, C.; Zhang, H.W. Efficient high-order radial basis-function-based differential quadrature-finite volume method for incompressible flows on unstructured grids. Phys. Rev. E 2021, 104, 045312. [Google Scholar] [CrossRef]
- Liu, Y.Y.; Shu, C.; Zhang, H.W.; Yang, L.M. A high-order implicit least square-based finite difference-finite volume method for incompressible flows on unstructured grids. Phys. Fluids 2021, 33, 053601. [Google Scholar] [CrossRef]
- Liu, Y.G.; Shu, C.; Yu, P.; Liu, Y.Y.; Zhang, H.; Lu, C. A high-order generalized differential quadrature method with lattice Boltzmann flux solver for simulating incompressible flows. Phys. Fluids 2023, 35, 047107. [Google Scholar]
- Liu, Y.Y.; Yang, L.M.; Shu, C.; Zhang, Z.L.; Yuan, Z.Y. An implicit high-order radial basis function-based differential quadrature-finite volume method on unstructured grids to simulate incompressible flows with heat transfer. J. Comput. Phys. 2022, 467, 111461. [Google Scholar] [CrossRef]
- Wu, B.; Lu, J.; Lee, H.C.; Shu, C.; Wan, M. An explicit boundary condition-enforced immersed boundary-reconstructed thermal lattice Boltzmann flux solver for thermal-fluid-structure interaction problems with heat flux boundary conditions. J. Comput. Phys. 2023, 485, 112106. [Google Scholar] [CrossRef]
- Yang, L.M.; Shu, C.; Wu, J. A moment conservation-based non-free parameter compressible lattice Boltzmann model and its application for flux evaluation at cell interface. Comput. Fluids 2013, 79, 190–199. [Google Scholar] [CrossRef]
- Ma, C.; Wu, J.; Yu, H.; Yang, L. A high-order implicit-explicit flux reconstruction lattice Boltzmann method for viscous incompressible flows. Comput. Math. Appl. 2022, 105, 13–28. [Google Scholar] [CrossRef]
- Dennis, S.C.R.; Chang, G.Z. Numerical solutions for steady flow past a circular cylinder at Reynolds numbers up to 100. J. Fluid Mech. 1970, 42, 471–489. [Google Scholar] [CrossRef]
- Shukla, R.K.; Tatineni, M.; Zhong, X. Very high-order compact finite difference schemes on non-uniform grids for incompressible Navier-Stokes equations. J. Comput. Phys. 2007, 224, 1064–1094. [Google Scholar] [CrossRef]
- He, X.; Doolen, G. Lattice Boltzmann method on curvilinear coordinates system: Flow around a circular cylinder. J. Comput. Phys. 1997, 134, 306–315. [Google Scholar] [CrossRef]
- Pellerin, N.; Leclaire, S.; Reggio, M. Solving incompressible fluid flows on unstructured meshes with the lattice Boltzmann flux solver. Eng. Appl. Comput. Fluid Mech. 2017, 11, 310–327. [Google Scholar] [CrossRef]
- Braza, M.; Chassaing, P.; Minh, H.H. Numerical study and physical analysis of the pressure and velocity fields in the near wake of a circular cylinder. J. Fluid Mech. 1986, 165, 79–130. [Google Scholar] [CrossRef]
- Liu, C.; Zheng, X.; Sung, C.H. Preconditioned multigrid methods for unsteady incompressible flows. J. Comput. Phys. 1998, 139, 35–57. [Google Scholar] [CrossRef]
- Posdziech, O.; Grundmann, R. A systematic approach to the numerical calculation of fundamental quantities of the two-dimensional flow over a circular cylinder. J. Fluids Struct. 2007, 23, 479–499. [Google Scholar] [CrossRef]
- Persillon, H.; Braza, M. Physical analysis of the transition to turbulence in the wake of a circular cylinder by three-dimensional Navier-Stokes simulation. J. Fluid Mech. 1998, 365, 23–88. [Google Scholar] [CrossRef]
- Franke, R.; Rodi, W.; Schönung, B. Numerical calculation of laminar vortex-shedding flow past cylinders. J. Wind. Eng. Ind. Aerodyn. 1990, 35, 237–257. [Google Scholar] [CrossRef]
- Imamura, T.; Suzuki, K.; Nakamura, T.; Yoshida, M. Flow simulation around an airfoil by lattice Boltzmann method on generalized coordinates. AIAA J. 2005, 43, 1968–1973. [Google Scholar] [CrossRef]
- Guilmineau, E.; Queutey, P. A numerical simulation of vortex shedding from an oscillating circular cylinder. J. Fluids Struct. 2002, 16, 773–794. [Google Scholar] [CrossRef]
- Feng, Z.G.; Michaelides, E.E. The immersed boundary-lattice Boltzmann method for solving fluid-particles interaction problems. J. Comput. Phys. 2004, 195, 602–628. [Google Scholar] [CrossRef]
- Wan, D.; Turek, S. Direct numerical simulation of particulate flow via multigrid FEM techniques and the fictitious boundary method. Int. J. Numer. Methods Fluids 2006, 51, 531–566. [Google Scholar] [CrossRef]
Re | References | |||
---|---|---|---|---|
20 | Dennis and Chang [50] | 2.05 | 0.94 | 43.7 |
Shukla et al. [51] | 2.07 | 0.92 | 43.3 | |
Wu and Shu et al. [10] | 2.091 | 0.93 | - | |
EIB-LBFS | 2.05 | 0.92 | 43.32 | |
FOAM-Extend | 2.18 | 0.97 | 47.31 | |
40 | He and Doolen [52] | 1.499 | 2.245 | 52.84 |
Pellerin et al. [53] | 1.505 | 2.259 | 53.64 | |
Shu et al. [39] | 1.53 | 2.24 | 52.69 | |
EIB-LBFS | 1.531 | 2.254 | 52.54 | |
FOAM-Extend | 1.633 | 2.252 | 54.88 |
Re | References | St | ||
---|---|---|---|---|
100 | Braza et al. [54] | ±0.30 | 1.28±0.02 | 0.16 |
Liu et al. [55] | ±0.339 | 1.350 ± 0.02 | 0.164 | |
Shu et al. [39] | ±0.33 | 1.334 ± 0.02 | 0.164 | |
Liu et al. [40] | ±0.332 | 1.337 ± 0.011 | 0.164 | |
Pellerin et al. [53] | ±0.325 | 1.325 | 0.164 | |
EIB-LBFS | ±0.316 | 1.341 ± 0.01 | 0.161 | |
FOAM-Extend | ±0.303 | 1.359 ± 0.02 | 0.167 | |
200 | Posdziech and Grundmann [56] | ±0.673 | 1.325 | 0.195 |
Persillon and Braza [57] | - | 1.321 | 0.198 | |
Franke et al. [58] | ±0.65 | 1.31 | 0.194 | |
EIB-LBFS | ±0.650 | 1.335 ± 0.04 | 0.191 | |
FOAM-Extend | ±0.690 | 1.359 ± 0.05 | 0.194 |
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. |
© 2024 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Liu, Y.; Zhang, Z.; Zhang, H.; Liu, Y. Implementation and Validation of Explicit Immersed Boundary Method and Lattice Boltzmann Flux Solver in OpenFOAM. Dynamics 2024, 4, 14-39. https://doi.org/10.3390/dynamics4010002
Liu Y, Zhang Z, Zhang H, Liu Y. Implementation and Validation of Explicit Immersed Boundary Method and Lattice Boltzmann Flux Solver in OpenFOAM. Dynamics. 2024; 4(1):14-39. https://doi.org/10.3390/dynamics4010002
Chicago/Turabian StyleLiu, Yangyang, Ziying Zhang, Hua Zhang, and Yaguang Liu. 2024. "Implementation and Validation of Explicit Immersed Boundary Method and Lattice Boltzmann Flux Solver in OpenFOAM" Dynamics 4, no. 1: 14-39. https://doi.org/10.3390/dynamics4010002
APA StyleLiu, Y., Zhang, Z., Zhang, H., & Liu, Y. (2024). Implementation and Validation of Explicit Immersed Boundary Method and Lattice Boltzmann Flux Solver in OpenFOAM. Dynamics, 4(1), 14-39. https://doi.org/10.3390/dynamics4010002