A Highly Scalable Direction-Splitting Solver on Regular Cartesian Grid to Compute Flows in Complex Geometries Described by STL Files
Abstract
:1. Introduction
2. Numerical Method
2.1. Governing Equations
2.2. Numerical Algorithm: Direction Splitting
- Similar to the fractional time stepping technique, we first predict the intermediate pressure () at written as:
- Then, we use the predicted pressure and Laplacian approximation to estimate the updated velocity ().The non-linear advective term () is explicitly approximated with a second-order Adam-Bashforth discretization with conditional stability of .
- Now, we project the updated velocity to a divergence-free space and solve the Poisson problem. However, the Laplacian approximation makes the solution non-divergence-free locally near the fluid-solid interface. The correction in the pressure is calculated using following equations:The parameter is considered to avoid the instabilities caused by the density jumps near the fluid-solid interface, computed as:
- Finally, the corrected pressure is taken to update the pressure as follows:
- We first check the state of the computational grid node inside or outside the fluid domain (), defined by an Indicator function (I):
- The presence of the interface is detected by the indicator function I. It is the location between two consecutive nodes where one node belongs to () and the other node belongs to (), or vice versa. The accurate intersection distance of the neighbouring fluid node from is further estimated depending on the type of rigid body.
3. Influence of Complex Geometries on Spatial Discretization
3.1. Indicator Function
Algorithm 1 Computation of the indicator function (I) on a grid of size . | ||
1: | for i = 1: do | |
2: | for j=1: do | |
3: | for k = 1: do | |
4: | ▹ we build the two extremities of the ray | |
5: | ||
6: | for s∈Tdo | ▹ assuming T is the set containing the triangles |
7: | if intersection(s,,) then | |
8: | ▹ number of intersections | |
9: | end if | |
10: | end for | |
11: | if is even then | |
12: | ||
13: | else if is odd then | |
14: | ||
15: | end if | |
16: | ||
17: | end for | |
18: | end for | |
19: | end for |
3.2. Fluid-Solid Interface Distances
3.3. Optimization of the Method
- The rays used to compute the indicator function are by definition parallel to the y axis.
- For a given pair of nodes, the node-triangle distance is computed along a line either parallel to the x, y or z axis.
4. Numerical Tests in Complex Geometries Described by STL Files
4.1. Poiseuille Flow in a Pipe
4.2. Flow in a Wavy Channel
4.3. Flow in a Porous Medium: Computation of the Permeability Coefficient in a Sandstone
4.4. Motion of a Rigid Spherical Particle in a Curved Pipe
5. Massively Parallel Computing: Flow through a Random Array of Spheres
6. Conclusions and Perspectives
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Glowinski, R.; Le Tallec, P. Augmented Lagrangian and Operator-Splitting Methods in Nonlinear Mechanics; Society for Industrial and Applied Mathematics: Philadelphia, PA, USA, 1989. [Google Scholar]
- Glowinski, R. Finite element methods for incompressible viscous flow. Handb. Numer. Anal. 2003, 9, 3–1176. [Google Scholar]
- Chorin, A.J. Numerical solution of the Navier-Stokes equations. Math. Comput. 1968, 22, 745–762. [Google Scholar] [CrossRef]
- Armfield, S.; Street, R. An analysis and comparison of the time accuracy of fractional-step methods for the Navier–Stokes equations on staggered grids. Int. J. Numer. Methods Fluids 2002, 38, 255–282. [Google Scholar] [CrossRef]
- Guermond, J.L.; Minev, P.; Shen, J. An overview of projection methods for incompressible flows. Computer Methods Appl. Mech. Eng. 2006, 195, 6011–6045. [Google Scholar] [CrossRef] [Green Version]
- Falgout, R.D.; Yang, U.M. HYPRE: A Library of High Performance Preconditioners. In Computational Science—ICCS 2002. Lecture Notes in Computer Science; Sloot, P.M.A., Hoekstra, A.G., Tan, C.J.K., Dongarra, J.J., Eds.; Springer: Berlin/Heidelberg, Germany, 2002; Volume 2331. [Google Scholar] [CrossRef] [Green Version]
- Ghia, U.; Ghia, K.N.; Shin, C. High-Re solutions for incompressible flow using the Navier-Stokes equations and a multigrid method. J. Comput. Phys. 1982, 48, 387–411. [Google Scholar] [CrossRef]
- Thompson, M.C.; Ferziger, J.H. An adaptive multigrid technique for the incompressible Navier-Stokes equations. J. Comput. Phys. 1989, 82, 94–121. [Google Scholar] [CrossRef]
- Popinet, S. A quadtree-adaptive multigrid solver for the Serre–Green–Naghdi equations. J. Comput. Phys. 2015, 302, 336–358. [Google Scholar] [CrossRef] [Green Version]
- Eymard, R.; Gallouët, T.; Herbin, R. Finite volume methods. Handb. Numer. Anal. 2000, 7, 713–1018. [Google Scholar]
- Wachs, A. Particle-scale computational approaches to model dry and saturated granular flows of non-Brownian, non-cohesive, and non-spherical rigid bodies. Acta Mech. 2019, 230, 1919–1980. [Google Scholar] [CrossRef]
- Peskin, C. The immersed boundary method. Acta Numer. 2002, 11, 479–517. [Google Scholar] [CrossRef] [Green Version]
- Mittal, R.; Iaccarino, G. Immersed boundary methods. Annu. Rev. Fluid Mech. 2005, 37, 239–261. [Google Scholar] [CrossRef] [Green Version]
- Mohd-Yusof, J. Combined Immersed Boundaries/B-Splines Methods for Simulations of Flows in Complex Geometries; Technical Report, CTR Annual Research Brief; Stanford University: Stanford, CA, USA, 1997. [Google Scholar]
- Roma, A.; Peskin, C.; Berger, M. An adaptive version of the immersed boundary method. J. Comput. Phys. 1999, 153, 509–534. [Google Scholar] [CrossRef] [Green Version]
- 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] [Green Version]
- Glowinski, R.; Pan, T.; Hesla, T.; Joseph, D. A distributed Lagrange multiplier/fictitious domain method for particulate flows. Int. J. Multiph. Flow 1999, 25, 755–794. [Google Scholar] [CrossRef]
- Yu, Z.; Shao, X.; Wachs, A. A fictitious domain method for particulate flows with heat transfer. J. Comput. Phys. 2006, 217, 424–452. [Google Scholar] [CrossRef]
- Wachs, A.; Hammouti, A.; Vinay, G.; Rahmani, M. Accuracy of Finite Volume/Staggered Grid Distributed Lagrange Multiplier/Fictitious Domain simulations of particulate flows. Comput. Fluids 2015, 115, 154–172. [Google Scholar] [CrossRef]
- Selcuk, C.; Ghigo, A.R.; Popinet, S.; Wachs, A. A fictitious domain method with distributed Lagrange multipliers on adaptive quad/octrees for the direct numerical simulation of particle-laden flows. J. Comput. Phys. 2021, 430, 109954. [Google Scholar] [CrossRef]
- Ritz, J.; Caltagirone, J. A numerical continuous model for the hydrodynamics of fluid particle systems. Int. J. Numer. Methods Fluids 1999, 30, 1067–1090. [Google Scholar] [CrossRef]
- Vincent, S.; Brändle de Motta, J.; Sarthou, A.; Estivalezes, J.L.; Simonin, O.; Climent, E. A Lagrangian VOF tensorial penalty method for the DNS of resolved particle-laden flows. J. Comput. Phys. 2014, 256, 582–614. [Google Scholar] [CrossRef] [Green Version]
- Chung, M.H. Cartesian cut cell approach for simulating incompressible flows with rigid bodies of arbitrary shape. Comput. Fluids 2006, 35, 607–623. [Google Scholar] [CrossRef]
- Hartmann, D.; Meinke, M.; Schröder, W. A strictly conservative Cartesian cut-cell method for compressible viscous flows on adaptive grids. Comput. Methods Appl. Mech. Eng. 2011, 200, 1038–1052. [Google Scholar] [CrossRef]
- Meinke, M.; Schneiders, L.; Günther, C.; Schröder, W. A cut-cell method for sharp moving boundaries in Cartesian grids. Comput. Fluids 2013, 85, 135–142. [Google Scholar] [CrossRef]
- Keating, J.; Minev, P. A fast algorithm for direct simulation of particulate flows using conforming grids. J. Comput. Phys. 2013, 255, 486–501. [Google Scholar] [CrossRef]
- Peaceman, D.W.; Rachford Jr., H.H. The numerical solution of parabolic and elliptic differential equations. J. Soc. Ind. Appl. Math. 1955, 3, 28–41. [Google Scholar] [CrossRef]
- Douglas, J. Alternating direction methods for three space variables. Numer. Math. 1962, 4, 41–63. [Google Scholar] [CrossRef]
- Yu, Z.; Phan-Thien, N.; Tanner, R. Dynamic simulation of sphere motion in a vertical tube. J. Fluid Mech. 2004, 518, 61–93. [Google Scholar] [CrossRef]
- Guermond, J.; Minev, P. A new class of massively parallel direction splitting for the incompressible Navier–Stokes equations. Comput. Methods Appl. Mech. Eng. 2011, 200, 2083–2093. [Google Scholar] [CrossRef]
- Guermond, J.; Minev, P. Start-up flow in a three-dimensional lid-driven cavity by means of a massively parallel direction splitting algorithm. Int. J. Numer. Methods Fluids 2012, 68, 856–871. [Google Scholar] [CrossRef]
- Guermond, J.L.; Shen, J. Velocity-Correction Projection Methods for Incompressible Flows. SIAM J. Numer. Anal. 2003, 41, 112–134. [Google Scholar] [CrossRef]
- Balogh, P.; Bagchi, P. A computational approach to modeling cellular-scale blood flow in complex geometry. J. Comput. Phys. 2017, 334, 280–307. [Google Scholar] [CrossRef] [Green Version]
- Mehmani, Y.; Tchelepi, H.A. Minimum requirements for predictive pore-network modeling of solute transport in micromodels. Adv. Water Resour. 2017, 108, 83–98. [Google Scholar] [CrossRef]
- Geuzaine, C.; Remacle, J.F. Gmsh: A 3-D finite element mesh generator with built-in pre-and post-processing facilities. Int. J. Numer. Methods Eng. 2009, 79, 1309–1331. [Google Scholar] [CrossRef]
- Paul, F.; Fischer, J.W.L.; Kerkemeier, S.G. nek5000 Web Page. 2008. Available online: http://nek5000.mcs.anl.gov (accessed on 1 June 2022).
- Patera, A.T. A spectral element method for fluid dynamics: Laminar flow in a channel expansion. J. Comput. Phys. 1984, 54, 468–488. [Google Scholar] [CrossRef]
- Segre, G.; Silberberg, A. Behaviour of macroscopic rigid spheres in Poiseuille flow Part 2. Experimental results and interpretation. J. Fluid Mech. 1962, 14, 136–157. [Google Scholar] [CrossRef]
- Seyed-Ahmadi, A.; Wachs, A. Microstructure-informed probability-driven point-particle model for hydrodynamic forces and torques in particle-laden flows. J. Fluid Mech. 2020, 900, A21. [Google Scholar] [CrossRef]
- Seyed-Ahmadi, A.; Wachs, A. Physics-inspired architecture for neural network modeling of forces and torques in particle-laden flows. Comput. Fluids 2022, 238, 105379. [Google Scholar] [CrossRef]
- Siddani, B.; Balachandar, S. Point-particle drag, lift, and torque closure models using machine learning: Hierarchical approach and interpretability. Phys. Rev. Fluids 2022, 8, 014303. [Google Scholar] [CrossRef]
Number of Triangles | ||||
---|---|---|---|---|
20 × 10 | 300.2 | 18 | 5.2 | 2.2 |
100 × 10 | 550.7 | 45.1 | 35.2 | 15.2 |
200 × 10 | 920.9 | 108 | 78.4 | 55.2 |
Number of Nodes | Number of Cores | Number of Cells | Number of Spheres | Run Time per Time Step (s) |
---|---|---|---|---|
1 | 40 | 40,000,000 | 849 | 9.279 |
8 | 320 | 320,000,000 | 6792 | 9.924 |
170 | 6800 | 6,800,000,000 | 144,327 | 12.18 |
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. |
© 2023 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
Morente, A.; Goyal, A.; Wachs, A. A Highly Scalable Direction-Splitting Solver on Regular Cartesian Grid to Compute Flows in Complex Geometries Described by STL Files. Fluids 2023, 8, 86. https://doi.org/10.3390/fluids8030086
Morente A, Goyal A, Wachs A. A Highly Scalable Direction-Splitting Solver on Regular Cartesian Grid to Compute Flows in Complex Geometries Described by STL Files. Fluids. 2023; 8(3):86. https://doi.org/10.3390/fluids8030086
Chicago/Turabian StyleMorente, Antoine, Aashish Goyal, and Anthony Wachs. 2023. "A Highly Scalable Direction-Splitting Solver on Regular Cartesian Grid to Compute Flows in Complex Geometries Described by STL Files" Fluids 8, no. 3: 86. https://doi.org/10.3390/fluids8030086
APA StyleMorente, A., Goyal, A., & Wachs, A. (2023). A Highly Scalable Direction-Splitting Solver on Regular Cartesian Grid to Compute Flows in Complex Geometries Described by STL Files. Fluids, 8(3), 86. https://doi.org/10.3390/fluids8030086