Computer Modeling in Engineering & Sciences |
DOI: 10.32604/cmes.2021.016766
ARTICLE
A Simplified Approach of Open Boundary Conditions for the Smoothed Particle Hydrodynamics Method
1Graduate School of Information Science and Engineering, Ritsumeikan University, Shiga, 525-8577, Japan
2College of Information Science and Engineering, Ritsumeikan University, Shiga, 525-8577, Japan
*Corresponding Author: Thanh Tien Bui. Email: gr0399rr@ed.ritsumei.ac.jp
Received: 24 March 2021; Accepted: 12 July 2021
Abstract: In this paper, we propose a simplified approach of open boundary conditions for particle-based fluid simulations using the weakly compressible smoothed-particle hydrodynamics (SPH) method. In this scheme, the values of the inflow/outflow particles are calculated as fluid particles or imposed desired values to ensure the appropriate evolution of the flow field instead of using a renormalization process involving the fluid particles. We concentrate on handling the generation of new inflow particles using several simple approaches that contribute to the flow field stability. The advantages of the
Keywords: Fluid simulation; smoothed particle hydrodynamics; open boundaries
Open boundary conditions pose an interesting challenge that has attracted a number of investigations by different authors. The simplest and fastest technique, periodic boundary conditions [1,2], is often used in which particles are recycled with the particles passing through the outlet and being re-inserted at the inlet. This technique is limited and is inappropriate for simulations with different inflow/outflow cross-sectional lengths. In addition, violations resulting from the outlet velocity field after re-insertion can cause an unstable state in long runtime simulations. Lastiwka et al. [3] proposed permeable boundary conditions; however, this is difficult to implement with a free surface. A different approach relies on a generalization of the unified semi-analytical boundary condition method introduced by Ferrand et al. [4] and Leroy et al. [5]. This technique has been used to impose unsteady open boundaries in incompressible SPH and weakly compressible SPH models. Tafuni et al. [6] used mirrored particles at the fluid zone and a higher-order interpolation process to update the values of the inflow/outflow particles. However, these approaches have a high computational cost and are complicated. Federico et al. [7] presented an implementation of open boundary conditions based on inflow/outflow buffer layers with the inflow particle information assigned at the beginning of the simulation. Alvarado-Rodrıguez et al. [8] utilized a reservoir buffer to prevent a reflection of the velocity field at the outlet. Vacondio et al. [9] introduced open boundary conditions using Riemann invariants. Tarksalooyeh et al. [10] constructed a pre-inlet domain to feed the inflow region. Molteni et al. [11] and Altomare et al. [12] proposed a sponge layer to avoid spurious reflections from waves. Liu et al. [13] used a Taylor series expansion to extrapolate the values of the inlet and outlet particles. Wang et al. [14] and Negi et al. [15] selected a characteristic-based method to apply as a non-reflecting boundary condition in a weakly compressible SPH model. Most previous studies have usually opted to update the inflow/outflow particle information via an extrapolation from the fluid particles. This results in troublesome procedures and is time consuming.
The rapid development of variants of the SPH model, specifically the
To simplify the treatment of the open boundary condition, in the present study, we propose a fast and simple approach based on the
In the SPH method, the governing equations for weakly compressible SPH in their Lagrangian form are:
where
Recently, the
where
where
We adopted the leapfrog method for the integration time. For stability, the time step
where
The PST was derived by Lind et al. [19] and is indispensable to SPH simulations. In the
here, the symbols
After the time integration, the pticle position is shifted slightly by an amount
where
3 A Simplified Approach of Open Boundary Conditions
Open boundary conditions pose an interesting challenge in numerical simulations. The inflow and outflow zones can be defined as being upstream and downstream, respectively, of the fluid domain [7]. An upstream instability can seriously influence the development and accuracy of a simulation. The improvement provided by the
In general, particle-based simulion with open boundary conditions requires four sets of particles that correspond to fluid, wall, inflow and outflow particles as shown in Fig. 1. In the methods by Tafuni et al. [6] and Negi et al. [15], the particle motions at inflow/outflow zones are computed using quantities like pressure and velocity of the particles. The particle quantities should be estimated using some kind of extrapolation techniques which requires complicated process like normalized weighted sum of spatial distribution [15] or using ghost nodes for inlet/outlet particles combining with a higher-order interpolation scheme [6]. In addition, such extrapolation is required for both of inflow/outflow cases.
In order to avoid the extrapolation process and perform the computation with a simple procedure, we modify the algorithm so that the SPH can be applied not only at the fluid zone but also at inflow/outflow zones. Similar to other inflow/outflow algorithms, we assume that the inflow zone is placed in front of the fluid region so that the attached zone covers a region as wide as the radius of the kernel support
• The inflow particles move according to their velocity until they cross the border between the inflow and fluid zones.
• The inflow particles that cross the border turn into fluid particles and behave as fluid particles.
• At the same time, the particles that cross the border produce new inflow particles periodically at the front end of the inflow zone and we copy all the information of the particle to the new inflow particle.
Assuming
In terms of the particles at the outflow zone, we apply the SPH algorithm in the same way as the fluid zone and we simply eliminate particles that go out of the outflow zone as shown in Fig. 1. Although the total number of particles is not constant because the generation of new inflow particles is not synchronized with the elimination of outflow particles, managing generated/eliminated particles is still simple because the total number of particles does not change so much as far as the domain is fixed. Furthermore, this approach is free from extrapolation process because the quantities of outflow particles is obtained by the SPH algorithm which contributes to simple and consistent computation of fluid particles with open boundary conditions.
In some cases of the extrapolation-based open boundary conditions, prescribed particle quantities given a priori are applied to some of the inflow particles during the entire simulation [6,15]. The prescribed values can also be applied in our method with a small modification. In the case where prescribed values are applied to some areas of inflow zone, we simply use the prescribed values instead of copying the quantities of the particles that cross the inflow threshold or applying the SPH algorithm.
To demonstrate the effectiveness and applicability of the proposed technique, in this section, we perform several numerical test cases. Specifically, we simulate:
– Viscous open-channel flow;
– Flow past a circular cylinder at Re = 200; and
– Flow over a backward-facing step with prescribed and non-prescribed inflow boundary conditions.
A test case of viscous open-channel flow in the laminar regime was conducted to illustrate the stability of the flow over the entire computational domain. The objective of the simulation was to authenticate the steadiness of the velocity field after a sufficiently long period of time and to compare it to the analytical solution shown in Eq. (9).
The initial setup is shown in Fig. 2. The fluid is initialized with a fluid domain length of
The Reynolds number is calculated such that
where the velocity U is the average velocity profile:
The sound speed was selected to be equal to
The initial boundary condition was imposed as follows:
where
Figs. 3a and 3b illustrate the particle distribution and velocity field at
To verify the stability, three different
To check the convergence of the velocity field between the proposed technique and the analytical solution, the mean square error percent (MSEP) was calculated using Eq. (13) at
where
Fig. 5 illustrates a comparison of the MSEP values for
4.2 Flow Past a Circular Cylinder at Re = 200
The second test case consistedf flow past a circular cylinder, where the circular cylinder is represented by an implicit function:
where r is the radius of the circular cylinder. The implicit function of a circular cylinder is defined as the zero-level set of the function
(1) No-slip boundary conditions were enforced on the body surfaces, and the information concerning these solid particles was extrapolated from the fluid particles following the method in [21].
(2) For the upper and lower walls, symmetry boundary conditions for the velocity were imposed as described in [23], i.e.,
Fig. 7 depicts the initial setup of the simulation. A smaller domain and lower resolution compared to another study [6] were considered to prove the stability and effectiveness of the proposed technique. Following Lastiwka et al. [3], the computational domain was
To prevent an impulsive start of the velocity field, a constant acceleration
The drag and lift force coefficients on the body are calculated such that:
where
Validation for this case was performed by comparing the time histories of the drag and lift coefficients using the technique proposed in Tafuni et al. [6], as shown in Fig. 8. Good agreement is obtained between the two solvers. The magnitude of the drag force increases to a peak value and then decreases to a steady state during the time interval
Fig. 9 illustrates the velocity and pressure contours at
Fig. 10 shows the velocity vector field at
4.3 Flow over a Backward-Facing Step
4.3.1 2D Backward-Facing Step with Prescribed Inflow Boundary Conditions
A 2D backward-facing step problem was simulated at
The step height was set to
Fig. 12 illustrates the axial velocity of the simulation at
The reattachment length was determined to be
Fig. 13c shows the variation of fluid particles in the entire computational process. The simulation starts with 44550 particles and reaches to steady state after around 120000 steps at which the number of the particles is 43599 particles. The percentage of mass error is 2.13%.
The velocities at the four different marked positions, P1–P4, were considered over the channel height and compared to the profiles of the reference results from [15,27], see Fig. 14. The results obtained are in good agreement with the reference solution at each marked position.
4.3.2 2D Backward-Facing Step with Non-Prescribed Inflow Boundary Conditions
In this case, a 2D backward-facing step problem was simulated at
In this simulation, the density was
The fluid flow was driven by a constant body force
Fig. 16 illustrates the axial velocy of the simulation at
Assessing the quality of simulation, the axial velocities at four different marked positions, P1–P4, were considered over the channel height and compared to the reference profiles from [21,29], as shown in Fig. 17. The results obtained at each marked position are in fairly good agreement with the reference solution.
Fig. 18 depicts the variation of fluid particles in the computational time. The number of fluid particles is 26160 at the beginning and it reaches to 26281 particles at
In this paper, we developed a simplified approach of open boundary conditions. Taking advantage of the
The numerical tests demonstrate that the proposed technique obtains good results with a high agreement with the reference solutions. The first test case demonstrated the stability of the flow field over a sufficiently long time with the MSEP value of the velocity field being approximately 0.1%. Given this stability, we compressed the computational domain to a lower resolution in a second test case to demonstrate the high accuracy of the simulation. The third test case examined the flexibility of the inflow boundary conditions to prescribed or non-prescribed values. This case developed results well suited to the wall boundary and the evolution of the flow field. The performance of the results demonstrated the versatility of the proposed technique. Overall, the proposed technique has addressed the information on inflow/outflow particles without extrapolation from the fluid zone.
One of the limitations is that particles in the fluid zone can move across the borders of inflow zones in case of flow reversion. This issue is pointed out also in [6] and a decent solution is given in the paper. We expect to improve this issue in future work.
Acknowledgement: This research was supported by the Ministry of Education, Culture, Sports, Science and Technology (MEXT), Japan.
Funding Statement: The authors received no specific funding for this study.
Conflicts of Interest: The authors declare that they have no conflicts of interest to report regarding the present study.
1. Joseph, P. M., Patrick, J. F., Zhu, Y. (1997). Modeling low reynolds number incompressible flows using SPH. Journal of Computational Physics, 136(1), 214–226. DOI 10.1006/jcph.1997.5776. [Google Scholar] [CrossRef]
2. Lee, E. S., Moulinec, C., Xu, R., Violeau, D., Laurence, D. et al. (2008). Comparisons of weakly compressible and truly incompressible algorithms for the SPH mesh free particle method. Journal of Computational Physics, 227(18), 8417–8436. DOI 10.1016/j.jcp.2008.06.005. [Google Scholar] [CrossRef]
3. Lastiwka, M., Basa, M., Quinlan, N. J. (2009). Permeable and non-reflecting boundary conditions in SPH. International Journal for Numerical Methods in Fluids, 61(7), 709–724. DOI 10.1002/fld.1971. [Google Scholar] [CrossRef]
4. Ferrand, M., Joly, A., Kassiotis, C., Violeau, D., Leroy, A. et al. (2017). Unsteady open boundaries for SPH using semi-analytical conditions and riemann solver in 2D. Computer Physics Communications, 210, 29–44. DOI 10.1016/j.cpc.2016.09.009. [Google Scholar] [CrossRef]
5. Leroy, A., Violeau, D., Ferrand, M., Fratter, L., Joly, A. et al. (2016). A new open boundary formulation for incompressible SPH. Computers and Mathematics with Applications, 72(9), 2417–2432. DOI 10.1016/j.camwa.2016.09.008. [Google Scholar] [CrossRef]
6. Tafuni, A., Domínguez, J. M., Vacondio, R., Crespo, A. J. C. (2018). A versatile algorithm for the treatment of open boundary conditions in smoothed particle hydrodynamics GPU models. Computer Methods in Applied Mechanics and Engineering, 342, 604–624. DOI 10.1016/j.cma.2018.08.004. [Google Scholar] [CrossRef]
7. Federico, I., Marrone, S., Colagrossi, A., Aristodemo, F., Antuono, M. et al. (2012). Simulating 2D open-channel flows through an SPH model. European Journal of Mechanics-B/Fluids, 34, 35–46. DOI 10.1016/j.euromechflu.2012.02.002. [Google Scholar] [CrossRef]
8. Alvarado-Rodríguez, C. E., Klapp, J., Sigalotti, L. D. G., Domínguez, J. M., Sánchez, E. C. et al. (2017). Nonreflecting outlet boundary conditions for incompressible flows using SPH. Computers and Fluids, 159, 177–188. DOI 10.1016/j.compfluid.2017.09.020. [Google Scholar] [CrossRef]
9. Vacondio, R., Rogers, B. D., Stansby, P. K., Mignosa, P. (2012). Sph modeling of shallow flow with open boundaries for practical flood simulation. Journal of Hydraulic Engineering, 138(6), 530–541. DOI 10.1061/(ASCE)HY.1943-7900.0000543. [Google Scholar] [CrossRef]
10. Azizi Tarksalooyeh, V. W., Závodszky, G., van Rooij, B. J. M., Hoekstra, A. G. (2018). Inflow and outflow boundary conditions for 2D suspension simulations with the immersed boundary lattice boltzmann method. Computers and Fluids, 172, 312–317. DOI 10.1016/j.compfluid.2018.04.025. [Google Scholar] [CrossRef]
11. Molteni, D., Grammauta, R., Vitanza, E. (2013). Simple absorbing layer conditions for shallow wave simulations with smoothed particle hydrodynamics. Ocean Engineering, 62, 78–90. DOI 10.1016/j.oceaneng.2012.12.048. [Google Scholar] [CrossRef]
12. Altomare, C., Domínguez, J. M., Crespo, A. J. C., González-Cao, J., Suzuki, T. et al. (2017). Long-crested wave generation and absorption for SPH-based DualSPHysics model. Coastal Engineering, 127, 37–54. DOI 10.1016/j.coastaleng.2017.06.004. [Google Scholar] [CrossRef]
13. Liu, M. B., Liu, G. R. (2006). Restoring particle consistency in smoothed particle hydrodynamics. Applied Numerical Mathematics, 56(1), 19–36. DOI 10.1016/j.apnum.2005.02.012. [Google Scholar] [CrossRef]
14. Wang, P., Zhang, A., Ming, F., Sun, P., Cheng, H. et al. (2019). A novel non-reflecting boundary condition for fluid dynamics solved by smoothed particle hydrodynamics. Journal of Fluid Mechanics, 860, 81–114. DOI 10.1017/jfm.2018.852. [Google Scholar] [CrossRef]
15. Negi, P., Ramachandran, P., Haftu, A. (2020). An improved non-reflecting outlet boundary condition for weakly compressible SPH. Computer Methods in Applied Mechanics and Engineering, 367(12), 113119. DOI 10.1016/j.cma.2020.113119. [Google Scholar] [CrossRef]
16. Sun, P. N., Colagrossi, A., Marrone, S., Zhang, A. M. (2017). The δ+-sPH model: Simple procedures for a further improvement of the SPH scheme. Computer Methods in Applied Mechanics and Engineering, 315, 25–49. DOI 10.1016/j.cma.2016.10.028. [Google Scholar] [CrossRef]
17. Antuono, M., Colagrossi, A., Marrone, S., Molteni, D. (2010). Free-surface flows solved by means of SPH schemes with numerical diffusive terms. Computer Physics Communications, 181(3), 532–549. DOI 10.1016/j.cpc.2009.11.002. [Google Scholar] [CrossRef]
18. Antuono, M., Marrone, S., Colagrossi, A., Bouscasse, B. (2015). Energy balance in the δ-sPH scheme. Computer Methods in Applied Mechanics and Engineering, 289, 209–226. DOI 10.1016/j.cma.2015.02.004. [Google Scholar] [CrossRef]
19. Lind, S. J., Xu, R., Stansby, P. K., Rogers, B. D. (2012). Incompressible smoothed particle hydrodynamics for free-surface flows: A generalised diffusion-based algorithm for stability and validations for impulsive flows and propagating waves. Journal of Computational Physics, 231(4), 1499–1523. DOI 10.1016/j.jcp.2011.10.027. [Google Scholar] [CrossRef]
20. Douillet-Grellier, T., de Vuyst, F., Calandra, H., Ricoux, P. (2018). Simulations of intermittent two-phase flows in pipes using smoothed particle hydrodynamics. Computers and Fluids, 177, 101–122. DOI 10.1016/j.compfluid.2018.10.004. [Google Scholar] [CrossRef]
21. Adami, S., Hu, X. Y., Adams, N. A. (2012). A generalized wall boundary condition for smoothed particle hydrodynamics. Journal of Computational Physics, 231(21), 7057–7075. DOI 10.1016/j.jcp.2012.05.005. [Google Scholar] [CrossRef]
22. Bui, T. T., Nakata, S. (2020). Improved boundary treatment for the smoothed particle hydrodynamics method using implicit surfaces. Mathematical Methods in the Applied Sciences, 43(15), 8327–8347. DOI 10.1002/mma.6314. [Google Scholar] [CrossRef]
23. Yildiz, M., Rook, R. A., Suleman, A. (2009). SPH with the multiple boundary tangent method. International Journal for Numerical Methods in Engineering, 77(10), 1416–1438. DOI 10.1002/nme.2458. [Google Scholar] [CrossRef]
24. Sun, P. N., Colagrossi, A., Marrone, S., Antuono, M., Zhang, A. M. et al. (2018). Multi-resolution delta-plus-sPH with tensile instability control: Towards high reynolds number flows. Computer Physics Communications, 224, 63–80. DOI 10.1016/j.cpc.2017.11.016. [Google Scholar] [CrossRef]
25. Marrone, S., Colagrossi, A., Antuono, M., Colicchio, G., Graziani, G. et al. (2013). An accurate SPH modeling of viscous flows around bodies at low and moderate reynolds numbers. Journal of Computational Physics, 245, 456–475. DOI 10.1016/j.jcp.2013.03.011. [Google Scholar] [CrossRef]
26. Vacondio, R., Rogers, B. D., Stansby, P. K., Mignosa, P., Feldman, J. et al. (2013). Variable resolution for SPH: A dynamic particle coalescing and splitting scheme. Computer Methods in Applied Mechanics and Engineering, 256(1), 132–148. DOI 10.1016/j.cma.2012.12.014. [Google Scholar] [CrossRef]
27. Armaly, B., Durst, J., Pereira, F., Schonung, J., B. (1983). Experimental and theoretical investigation of backward-facing step flow. Journal of Fluid Mechanics, 127, 473–496. DOI 10.1017/S0022112083002839. [Google Scholar] [CrossRef]
28. Wang, F. F., Wu, S. Q., Zhu, S. L. (2019). Numerical simulation of flow separation over a backward-facing step with high reynolds number. Water Science and Engineering, 12(2), 145–154. DOI 10.1016/j.wse.2019.05.003. [Google Scholar] [CrossRef]
29. Issa, R., Lee, E. S., Violeau, D., Laurence, D. R. (2005). Incompressible separated flows simulations with the smoothed particle hydrodynamics gridless method. International Journal for Numerical Methods in Fluids, 47(10–11), 1101–1106. DOI 10.1002/(ISSN)1097-0363. [Google Scholar] [CrossRef]
This work is licensed under a Creative Commons Attribution 4.0 International License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. |