WorksMathematics
Computational performance versus numerical accuracy in the acoustic terms of weakly-compressible SPH
Abstract
Accurate computation of the acoustic terms in weakly-compressible SPH, including the equation of state, its inverse, and the evaluation of the local speed of sound, is essential to ensure energy conservation, robust solid boundary conditions, and correct open boundary behavior. In the classic Cole's equation of state, using values of the polytropic constant can lead to significant precision loss, particularly when computations are performed in single precision, as is common in GPU implementations. We extend here our previous results on the optimal choice of state variable by introducing a new higher-precision form for all three acoustic terms, denoted explog, and assess its numerical accuracy and computational performance across a variety of devices and test cases. We find that the new form evaluates the acoustic terms with a maximum ULP of~2 for arguments less than , and has higher errors in less than 1% of the arguments larger than the threshold. Combined with a rewritten expression of the pressure at solid boundary particles in the ``dummy'' model, it provides consistently more accurate results, maintaining deviations from the reference pressure profile to below 2%, even in presence of a rough bottom terrain. Computationally, the new formulation is also faster than the naive one on GPU, and only marginally slower on CPU.
Highlights
Weakly-compressible SPH is sensitive to noise in the density and pressure fields;
The standard form of the Cole’s equation of state is not numerically robust for small fluctuations;
Reformulating the acoustic terms in terms of expm1 and log1p improves numerical robustness;
The new explog form has a ULP for arguments less than ;
The new formulation is faster than less accurate choices on GPU, but not on CPU.
Email address: [email protected] (Giuseppe Bilotta)
Introduction
The weakly compressible form of Smoothed Particle Hydrodynamics (WCSPH) is a meshless Lagrangian method well suited for simulating violent flows [1], owing to its natural and implicit treatment of the free surface, including splashing, fragmentation, and merging [2, 3].
Coupled with an explicit integration scheme, WCSPH is also well suited for implementation on high-performance parallel computing hardware, owing to the natural mapping between numerical nodes (particles) and computational work-items. This makes it particularly compatible with the stream processing paradigm commonly used to program Graphic Processing Units (GPUs). Indeed, even before the emergence of general-purpose GPU computing (GPGPU), researchers had already begun to exploit the computational power of these accelerators to model SPH and related particle systems [4, 5].
Although WCSPH as a numerical method and GPUs as computational hardware are well suited for each other, several aspects must be carefully evaluated, as a naive implementation can lead to numerical instabilities or poor performance [6, 7, 8, 9, 10].
One of the key challenges lies in numerical precision. Since GPUs were originally designed for graphics applications, most consumer-grade devices offer very high single-precision but very low double-precision floating-point throughput. The performance ratio between single and double precision typically ranges from 1:8 to 1:32 on consumer GPUs, which can significantly reduce the computational advantages of GPU acceleration. Even many high-end workstation or server GPUs do not reach the 1:2 single-to-double precision performance ratio typical of modern CPUs and are instead limited to ratios of about 1:3 or 1:4, despite their considerably higher cost compared to consumer GPUs.
Implementations of WCSPH for GPUs must therefore balance performance and numerical accuracy. They can either limit computations to single precision, with a potential loss of stability, or adopt double precision for higher accuracy, possibly restricting its use to the most sensitive parts of the code. The latter option, however, often results in a significant drop in performance on lower-end consumer GPUs [11, 12].
A practical compromise is to rely on single-precision computations only and apply numerical tricks that maximize the effective use of the available precision. Such techniques help mitigate rounding and cancellation errors that would otherwise accumulate in single-precision arithmetic. They range from classic approaches, such as compensated summation [13, 14, 15], to appropriate choices of formulations and reference variables [6, 8], and may even extend to redesigning well-established algorithms to avoid catastrophic cancellations [16].
Ultimately, all these approaches share the common feature of requiring some degree of transformation of the analytical formulation, thereby breaking the immediate correspondence between analytical expressions and their implementation. This contrasts with formulations that are designed, already at the analytical level, to reduce the numerical noise that develops in numerical discretizations regardless of precision. Examples include artificial viscosity [17], density diffusion [18, 19, 20, 21, 22, 23], and kernel gradient corrections [24, 25], which are generally introduced a posteriori in the (analytical) discretized equations, sometimes sacrificing strict consistency in favor of improved convergence and stability [26, 27, 28], as discussed recently also in [29].
In WCSPH, the acoustic terms are particularly important at both the computational and analytical levels. Because pressure is computed explicitly from density through an equation of state, numerical fluctuations in the density field can propagate to the velocity field and accumulate over time, undermining the stability of the simulation. This makes it extremely difficult to reproduce simple hydrostatic cases (e.g., still water in a parallelepipedal box). Although these effects are generally of second order in highly dynamic problems, they can still have a negative impact on solid boundary models [30, 31] and on the implementation of open boundary conditions [32, 33].
This behavior is generally independent of the numerical precision adopted in the code, although single-precision computations may lead to such instabilities after fewer iterations. The importance of maintaining a smooth density (and pressure) field has led to the development of several density diffusion schemes in WCSPH, ranging from periodic filtering or reconstruction methods [34, 35] to diffusion terms directly incorporated into the mass conservation equation [19, 20, 22, 36, 23, 37], drawing parallels with the von Neumann artificial viscosity used in the equation of motion [17]. A similar approach can also be used to include damping terms in the viscous contribution, specifically designed to limit the formation of spurious acoustic waves [38] which have been shown to be a significant issue in the application of WCSPH to engineering applications [39]. These issues are further compounded by the contributions to the pressure field coming from the terms needed to model solid boundary conditions, a challenging problem on its own merit within SPH [40].
The work we present here is an analysis of the acoustic terms in WCSPH associated with the classic Cole’s equation of state traditionally used in SPH. We examine both the numerical accuracy and computational performance of the equation in its multiple implementable forms and use this analysis to identify possible numerical optimizations for evaluating the pressure term in common WCSPH formulations, with or without density diffusion, depending on the chosen boundary model.
The paper briefly introduces the SPH method with a focus on the acoustic terms (§ 3). This is followed by a study of the abstract analytical and computational aspects of the evaluation of the acoustic terms (§ 4 and § 5), discussed independently of their specific application to SPH, since these results are of general interest to any numerical code in which the same functional forms appear. § 6 then focuses on the application to SPH and presents a new functional representation for the “dummy” boundary model, leveraging the improved accuracy to achieve more stable and consistent numerical results.
Weakly-compressible SPH
We present here a quick introduction to SPH and its formalism. Further details can be found e.g. in [17, 41].
In SPH, the continuum is discretized as a set of particles, each carrying the physical properties (mass, density, volume, temperature, etc) of a virtual volume of fluid. Scalar and vector fields are approximated via convolution with a family of radial smoothing kernels that approximate Dirac’s distribution, converging to it in the limit as the smoothing parameter goes to 0, and the integral of the convolution is then approximated with a summation over particles:
where is the volume of particle . Using smoothing kernels with compact support allows such summations to be limited to neighboring particles only.
Gradients can be approximated leveraging Green’s theorem to “shift” the gradient operator from the field to the smoothing kernel:
where is a boundary term. When the smoothing kernel has compact support, we have everywhere except for points whose distance to the boundary is less than the kernel support radius. The kernel gradient expression can be symmetrized in a number of way, e.g. by adding or subtracting , resulting in a variety of expressions for gradients in SPH.
Due to kernel symmetry, we can write where . This form improves numerical stability when has an analytic representation where the factor cancels out with radial terms in the derivative of .
Using the common SPH shorthand conventions , and , and for any field , the standard mass and momentum continuity equations in a weak compressibility regime can be discretized in SPH following Monaghan’s “golden rules” [17]:
optionally with additional terms for artificial viscosity and/or density diffusion; in the above equations, represents the velocity of particle , , , its mass, density and pressure, the average viscosity between particles , and is a constant that depends on the problem dimension and choice of viscosity averaging function [17, 42, 41].
Acoustic terms
The weak compressible formulation of SPH closes the momentum equation with a functional relation between pressure and density under a barotropic assumption. Commonly used is Cole’s equation of state [43, 44] (also known as the Tait–Murnaghan equation or somewhat improperly simply the Tait equation [45]):
where is the at-rest density, the bulk modulus and the polytropic constant. Conversely, given the pressure , the corresponding density can be derived as
The speed of sound can be obtained from :
and letting be the sound speed for the fluid at rest, we get
Since WCSPH is frequently used with explicit integration schemes, for which the speed of sound is often the dominant factor (unless simulating highly viscous fluids at very fine resolutions [16]), the physical speed of sound is rarely used, preferring the adoption of a fictitious sound speed. To ensure the weakly compressible regime is valid, density variations should be less than 1%, for which it is generally sufficient to take at least 10 times higher than the maximum flow velocity, including the so-called hydrostatic limit , with the reference height, in order to avoid the collapse of a column of water [41].
Boundary conditions
Near the boundary of the fluid domain, the SPH interpolations are defective due to missing contributions to the kernel support from outside the domain. Near the free surface, these missing contributions can generally be ignored assuming that the field values are null, but near solid boundaries, corrective terms must be applied. Among the many forms that boundary conditions can taken in SPH [46, 47, 41], the most common ones are based on a particle discretization similar to the fluid one, with several layers of boundary particles included in the simulation in order to complete the kernel support for fluid particles near the boundary.
The simplest approach (so-called dynamic boundary conditions [48, 49]) has boundary particles behave like fluid particles, evolving the density according to the mass continuity equation, but prescribing velocity based on the rigid body motion (if any) of the boundary. While this is generally sufficient to avoid fluid particles penetrating the boundary, it does not provide the correct stress and strain at the boundary, and can produce artifacts such as a ‘lift’ of the head in a bore, or particles sticking to the wall when fluid retreats.
A more sophisticated approach is the “dummy” boundary model introduced in [30]. In this case, boundary particle properties are computed in order to prescribe both the normal stress and the no-slip conditions. In particular, the boundary particle pressure is obtained from an interpolation of the adjacent fluid pressure, with a correction to compensate for the hydrostatic term:
The particle density can then be computed from the pressure using the inverse of the equation of state, as needed.
It should be apparent that the accuracy in the computation of the wall pressure has a significant impact on the accuracy of this boundary condition term, since incorrect evaluations may lead to the wall attracting (if the pressure is underestimated) or repulsing (if the pressure is overestimated) fluid particles, leading respectively to possible penetration, or to an underestimation of the wall friction term. Improving the evaluation of these terms is the focus of this paper.
Numerical considerations on the acoustic term evaluation
When working with single-precision (32-bit) floating point, with machine epsilon
manipulating quantities such as density, pressure and the sound speed of the fluid can lead to low accuracy in the results, due to the amount of precision consumed by the magnitude of the physical quantities. Remember that the machine epsilon is defined as the value of the least significant bit (ULP, Unit of Last Position or equivalently Unit of Least Precision) in the floating-point representation of the value 1. This effectively defines the ratio between the least and most significant digit in any representable number, and the smallest relative change in a value that can be correctly represented.
Now consider e.g. in the order of (in SI units of kg m) for liquids: this effectively consumes 3 decimal digits of precision, so that only variations in the order of are representable, which in this case means variations in the order of in single precision. If we then take in the order of 10 (in SI units of m s), will consume 2 decimal digits, and will be in the order of , leaving only one decimal digit for representable absolute variations in the pressure ().
This loss of precision can lead to numerically unstable simulations even for analytically robust formulations, leading to effects ranging from spurious explosions to fluid particles unphysically penetrating the solid boundary layers [50, 6]. Although adimensionalization can help by bringing function arguments within the ranges of higher precision, it does not necessarily improve the representability of variations, since we’re still within machine epsilon of 1.
Among the several numerical strategies that can be adopted to compensate for the loss of precision, the most important for the treatment of the acoustic terms is the shift from the physical density to the relative density variation [6, 8] (also known as the condensation in acoustic wave theory [51]), defined as:
In a weakly-compressible regime, , and this choice allows tracking of density fluctuations as small as the smallest normal number FLT_MIN
without loss of precision. It is thus recommended that be chosen as state variable, with a derived quantity. The mass continuity equation for example becomes:
and the acoustic terms can be rewritten as
for the equation of state, with inverse
and
for the sound speed.
If we introduce the scaled density the equation of state and its inverse show a beautiful symmetry:
that, as we will show in § 6, will allow us to improve the numerical accuracy and stability of simulations. We remark that under the condition we also have , since
Computational considerations
Equations (13), (14) and (12) can all be expressed in terms of the function
since we can write:
It may seem that expression (17) is more complex than the original form (12), but, as we shall see momentarily, the adoption of leads to significant numerical improvements.
In code, we refer to this function as pow1pm1, inspired by the functions expm1, log1p defined by the IEEE-754 standard [52] and corresponding respectively to and , designed to assist developers in computing exponentials and logarithms with higher accuracy as . In fact, we have:
The Taylor series expansion of around is
that can be written in Horner form [53] as
This fact was leveraged in [6] to optimize the computation of and in the case , where both expressions can be computed quickly and accurately as polynomials in Horner form using fused multiply-add (FMA) operations.
Computational speed versus accuracy
The polynomial trick considered by [6] can only be applied when is a polynomial. In the case of the three acoustic terms we are considering (15)–(17) (pressure from density, density from pressure, speed of sound) with exponents respectively , , , the only case in which this applies to all of them is for .
The simplification in the expression of the acoustic terms for make it a common choice in SPH, even though the exponent is considerably smaller than the physical polytropic constant of water, . Outside of the case , however (e.g. with the other common choice ), not all the acoustic terms can have integer exponents at the same time, and the polynomial simplifications of [6] are only possible for some of them at most. The issue becomes then: what is the fastest and most accurate way to evaluate in the non-polynomial (or in the general) case?
Coding-wise, we can look at as having three possible functional forms, illustrated here for the single-precision float type:
float pow1pm1(float x, float a) /* power form */
{ return powf(1 + x, a) - 1; }
float pow1pm1(float x, float a) /* explog form */
{ return expm1f(a*log1pf(x)); }
float pow1pm1(float x, float a) /* Taylor form */
{ return /* omissis: Horner form Taylor expansion */ }
Additionally, some programming languages and hardware combinations support intrinsics such as __powf that sacrifice accuracy for speed, but can still be used as an alternative in the power form.
While these forms are analytically equivalent, computationally they differ significantly. The power form, which is what is naively used in many codes, will return the value 0 if , since for such small values of we have (indicating by the correctly-rounded result of the operation between two floating-point values).
Note that increasing the precision will simply change the threshold below which the actual value of will be ignored: for single precision, for double, in the extended 80-bit format supported as ‘long double’ on some architectures, for the 128-bit quadruple precision. Note that even with computations done in quadruple precision the power form will fail to return the correct value for single-precision FLT_MIN [8].
The explog form, on the other hand, can be expected to produce very accurate results, assuming the implementations of expm1f and log1pf are correctly rounded, and thus produce results within 1 ULP of the exact value. In this case, the argument to will be accurate to within 1 ULPs, and given the magnitude of the arguments, this will result in an overall error of at most 2 ULPs in the final result. This high accuracy allows us to use the explog in e.g. double or extended precision as reference value for the single precision function in our validation tests.
The accuracy of the Taylor expansion depends on the magnitude of the arguments and the order chosen for the expansion. The Horner form (18) can be mapped easily to a recursive function template in C++ (Listing 1), allowing the selection of the Taylor expansion order based on the preferred compromise between performance and accuracy. Note that the Horner form contains two multiplications and an addition for each nesting; mapping them to FMA therefore requires a choice about which multiplication should be done before the FMA and which one should be done inside, leading to at least three different forms for the Taylor expansion: for them we can expect minor differences in their results, as well as some difference in computational Listing 1: Recursive function template definition for the Horner form of the Taylor expansion of the function. The m*x*prev + 1 can be decomposed in three different ways as argument to the fused multiply-add: in addition to the one illustrated in code, the forms fmaf(m*prev, x, 1.0f) and fmaf(x*prev, m, 1.0f) are also possible.
template<unsigned order>
float taylor_form(float x, float a, float prev=1.0f);
template<>
float taylor_form<1>(float x, float a, float prev)
{ return a*x*prev; }
template<unsigned order>
float taylor_form(float x, float a, float prev)
{
float m = (a - (order - 1))/order;
return taylor_form<order-1>(x, a, fmaf(m*x, prev, 1.0f));
}
performance due to a different degree of instruction-level parallelism. We denote them by “mx” for fmaf(m*x, prev, 1.0f), “mprev” for fmaf(m*prev, x, 1.0f) and “xprev” for the fmaf(x*prev, m, 1.0f) form.
Experimental results
We evaluate both the numerical and computational performance of the different forms of with and a selection of the common values needed for , corresponding to , and for . The case is not presented here because all forms give the correct result in that case. We also present the results for as they are relevant to the pressure term computation as explained later in § 6.1.
The numerical results are evaluated by comparing the results from the single-precision forms against the results obtained by the long double explog form. The metrics we consider are the number of discrepancies (values for which the single-precision results were different from the long double result), the number of values for which the discrepancy is larger than 1 ULP (in single precision), and the largest relative error in ULPs.
To account for the difference in error distribution for different magnitudes of , the range has been split into three subranges: denormals , “nano” , “micro” , “percent” , and “perten” . The marks at and were chosen as the smallest powers of 2 that are not less than 1% and 10% respectively.
The code for these tests is available as auxiliary material to the manuscript.
The performance results refer to a machine with an AMD Ryzen 7 3700X processor that can boost to 4.4GHz, running Linux 5.18 with vulnerability mitigations enabled. The code was compiled with Clang 14, -O3 and machine-specific optimizations enabled (-march=native). Due to the high optimization level, the compiler produces vectorized code and interleaves instructions to maximize throughput where possible, with additional performance benefits for some forms. Additional performance comparisons in more practical contexts, running on GPUs and including the faster and less accurate __powf form will be presented as part of the application to the dummy boundary model in § 6.
Results for the CPU benchmark are collected in Table 1–Table 5. Of note is the marginal performance advantage of the power form over the explog form in the higher ranges, at the expense of an (expected) massive drop in accuracy in the entire domain, and the significant performance advantage of the Taylor forms, that approaches the memory bandwidth limit with a numerical accuracy that is comparable with, and sometimes better than, that of the explog form, with a slight advantage for the ‘mx’ variant both in performance and accuracy. The explog form turns out to be exact in the denormals, and maintains a maximum ULP of 2 until the “perten” range (argument larger than 1/8), and even then it only gets worse results for less than 1% of the values.
Table 1: Performance, in elements (GE) per seconds, and accuracy of the function in the power, explog and Taylor forms in the range, covering 8,388,608 single-precision floating-point values.
| method | GE/sec | discrepancies | ULP | max ULPs | |
| power | 0.14 | 100% | 100% | ||
| explog | 0.2 | 0% | 0% | 0 | |
| Taylor mx | 2.8 | 0% | 0% | 0 | |
| Taylor mprev | 2.1 | 0% | 0% | 0 | |
| Taylor xprev | 2.1 | 0% | 0% | 0 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.22 | 0% | 0% | 0 | |
| Taylor mx | 2.8 | 0% | 0% | 0 | |
| Taylor mprev | 2.1 | 0% | 0% | 0 | |
| Taylor xprev | 2.1 | 0% | 0% | 0 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.22 | 0% | 0% | 0 | |
| Taylor mx | 2.8 | 0% | 0% | 0 | |
| Taylor mprev | 2.1 | 0% | 0% | 0 | |
| Taylor xprev | 2.1 | 0% | 0% | 0 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.22 | 0% | 0% | 0 | |
| Taylor mx | 2.8 | 0% | 0% | 0 | |
| Taylor mprev | 2.1 | 0% | 0% | 0 | |
| Taylor xprev | 2.1 | 0% | 0% | 0 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.22 | 0% | 0% | 0 | |
| Taylor mx | 2.8 | 0% | 0% | 0 | |
| Taylor mprev | 2.1 | 0% | 0% | 0 | |
| Taylor xprev | 2.1 | 0% | 0% | 0 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.22 | 0% | 0% | 0 | |
| Taylor mx | 2.8 | 0% | 0% | 0 | |
| Taylor mprev | 2.1 | 0% | 0% | 0 | |
| Taylor xprev | 2.1 | 0% | 0% | 0 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.21 | 0% | 0% | 0 | |
| Taylor mx | 2.8 | 0% | 0% | 0 | |
| Taylor mprev | 2.1 | 0% | 0% | 0 | |
| Taylor xprev | 2.1 | 0% | 0% | 0 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.2 | 0% | 0% | 0 | |
| Taylor mx | 2.8 | 0% | 0% | 0 | |
| Taylor mprev | 2.1 | 0% | 0% | 0 | |
| Taylor xprev | 2.1 | 0% | 0% | 0 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.2 | 0% | 0% | 0 | |
| Taylor mx | 2.8 | 0% | 0% | 0 | |
| Taylor mprev | 2.1 | 0% | 0% | 0 | |
| Taylor xprev | 2.1 | 0% | 0% | 0 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.21 | 0% | 0% | 0 | |
| Taylor mx | 2.1 | 0% | 0% | 0 | |
| Taylor mprev | 1.7 | 0% | 0% | 0 | |
| Taylor xprev | 2.1 | 0% | 0% | 0 |
Table 1.
| method | GE/sec | discrepancies | ULP | max ULPs | |
| power | 0.15 | 98.9% | 97.8% | ||
| explog | 0.14 | 4.39% | 9.1e-06% | 2 | |
| Taylor mx | 2 | 6.21% | 2.54% | ||
| Taylor mprev | 2 | 6.21% | 2.54% | ||
| Taylor xprev | 2 | 6.21% | 2.54% | ||
| power | 0.16 | 99.1% | 97.9% | ||
| explog | 0.14 | 7.57% | 9.88e-05% | 2 | |
| Taylor mx | 2 | 6% | 2.31% | ||
| Taylor mprev | 2 | 6% | 2.31% | ||
| Taylor xprev | 2 | 5.98% | 2.31% | ||
| power | 0.16 | 99.9% | 99.7% | ||
| explog | 0.14 | 6.87% | 0.00435% | 2 | |
| Taylor mx | 2 | 7.58% | 1.97% | ||
| Taylor mprev | 2 | 7.58% | 1.97% | ||
| Taylor xprev | 2 | 7.58% | 1.97% | ||
| power | 0.16 | 99.9% | 99.6% | ||
| explog | 0.14 | 6.83% | 0.0344% | 2 | |
| Taylor mx | 2 | 7.49% | 1.89% | ||
| Taylor mprev | 2 | 7.51% | 1.89% | ||
| Taylor xprev | 2 | 7.51% | 1.9% | ||
| power | 0.16 | 99.8% | 99.3% | ||
| explog | 0.14 | 6.82% | 0.0223% | 2 | |
| Taylor mx | 2 | 7.41% | 1.82% | ||
| Taylor mprev | 2 | 7.42% | 1.82% | ||
| Taylor xprev | 2 | 7.42% | 1.82% | ||
| 1 | power | 0.16 | 99.2% | 98% | |
| 1 | explog | 0.14 | 0.758% | 9.39e-08% | 2 |
| 1 | Taylor mx | 2 | 0% | 0% | 0 |
| 1 | Taylor mprev | 2 | 0% | 0% | 0 |
| 1 | Taylor xprev | 2 | 0% | 0% | 0 |
| 2 | power | 0.16 | 99.3% | 98.2% | |
| 2 | explog | 0.13 | 7.94% | 0.0205% | |
| 2 | Taylor mx | 2 | 7.07% | 0% | 1 |
| 2 | Taylor mprev | 2 | 7.07% | 0% | 1 |
| 2 | Taylor xprev | 2 | 7.07% | 0% | 1 |
| 3 | power | 0.16 | 99.3% | 98.4% | |
| 3 | explog | 0.13 | 13.1% | 0.273% | |
| 3 | Taylor mx | 2 | 13.5% | 0.174% | 2 |
| 3 | Taylor mprev | 2 | 13.5% | 0.17% | 2 |
| 3 | Taylor xprev | 2 | 13.5% | 0.182% | |
| 5 | power | 0.16 | 99.3% | 98.7% | |
| 5 | explog | 0.13 | 11.2% | 0.423% | |
| 5 | Taylor mx | 2 | 11.7% | 0.122% | |
| 5 | Taylor mprev | 2 | 11.7% | 0.122% | |
| 5 | Taylor xprev | 2 | 11.8% | 0.151% | |
| 7 | power | 0.16 | 99.3% | 98.9% | |
| 7 | explog | 0.13 | 10.6% | 0.639% | |
| 7 | Taylor mx | 2 | 11.3% | 0.167% | |
| 7 | Taylor mprev | 2 | 11.2% | 0.166% | |
| 7 | Taylor xprev | 2 | 11.2% | 0.174% |
Table 5. Performance, in elements (GE) per seconds, and accuracy of the function in the power, explog and Taylor forms in the range, covering 1, 065, 353, 216 single-precision floating-point values.
Aside from the computational performance advantage, that in this case is skewed by the cross-iteration vectorization, a significant advantage of the Taylor forms is the correctly rounded results given for : adopting this form gives the best results for the common case even without special-casing the choice of polytropic constant; even though lower orders would also give the same results with some further performance gains, adopting the Taylor expansion at order 8 allows keeping the code generic without particular losses in either performance or accuracy regardless of the choice of .
In fact, the only range/exponent combination in which the Taylor expansion falls significantly short of the explog form in terms of accuracy is in the “perten” range for (Table 5). In this case, the accuracy achieved with
| method | GE/sec | discrepancies | ULP | max ULPs | |
| power | 0.15 | 100% | 100% | ||
| explog | 0.18 | 0.693% | 0% | 1 | |
| Taylor mx | 2.1 | 0.672% | 0% | 1 | |
| Taylor mprev | 2 | 0.672% | 0% | 1 | |
| Taylor xprev | 2 | 0.672% | 0% | 1 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.18 | 1.27% | 1.15e-07% | 2 | |
| Taylor mx | 2 | 0.621% | 0% | 1 | |
| Taylor mprev | 2 | 0.621% | 0% | 1 | |
| Taylor xprev | 2 | 0.621% | 0% | 1 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.18 | 0.81% | 0% | 1 | |
| Taylor mx | 2 | 0.901% | 0% | 1 | |
| Taylor mprev | 2 | 0.901% | 0% | 1 | |
| Taylor xprev | 2 | 0.901% | 0% | 1 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.18 | 0.71% | 0% | 1 | |
| Taylor mx | 2 | 0.854% | 0% | 1 | |
| Taylor mprev | 2 | 0.854% | 0% | 1 | |
| Taylor xprev | 2 | 0.854% | 0% | 1 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.18 | 0.536% | 0% | 1 | |
| Taylor mx | 2 | 0.641% | 0% | 1 | |
| Taylor mprev | 2 | 0.641% | 0% | 1 | |
| Taylor xprev | 2 | 0.641% | 0% | 1 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.18 | 1.15e-07% | 0% | 1 | |
| Taylor mx | 2 | 0% | 0% | 0 | |
| Taylor mprev | 2 | 0% | 0% | 0 | |
| Taylor xprev | 2 | 0% | 0% | 0 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.18 | 1.27% | 0% | 1 | |
| Taylor mx | 2 | 0.563% | 0% | 1 | |
| Taylor mprev | 2 | 0.563% | 0% | 1 | |
| Taylor xprev | 2 | 0.563% | 0% | 1 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.18 | 7.34% | 0% | 1 | |
| Taylor mx | 2 | 7.39% | 0.0372% | 2 | |
| Taylor mprev | 2 | 7.39% | 0.0372% | 2 | |
| Taylor xprev | 2 | 7.39% | 0.0372% | 2 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.18 | 5.09% | 0.00161% | 2 | |
| Taylor mx | 2 | 5.25% | 0.0137% | 2 | |
| Taylor mprev | 2 | 5.25% | 0.0137% | 2 | |
| Taylor xprev | 2 | 5.25% | 0.0137% | 2 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.18 | 4.16% | 0% | 1 | |
| Taylor mx | 2 | 4.52% | 0.0182% | 2 | |
| Taylor mprev | 2 | 4.52% | 0.0182% | 2 | |
| Taylor xprev | 2 | 4.52% | 0.0182% | 2 |
Table 2. Performance, in elements (GE) per seconds, and accuracy of the function in the power, explog and Taylor forms in the range, covering 872, 415, 232 single-precision floating-point values.
| method | GE/sec | discrepancies | ULP | max ULPs | |
| power | 0.15 | 100% | 100% | ||
| explog | 0.14 | 3.46% | 0% | 1 | |
| Taylor mx | 2 | 3.28% | 0% | 1 | |
| Taylor mprev | 2 | 3.28% | 0% | 1 | |
| Taylor xprev | 2 | 3.28% | 0% | 1 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.15 | 6.71% | 1.97e-07% | 2 | |
| Taylor mx | 2 | 3.27% | 0% | 1 | |
| Taylor mprev | 2 | 3.27% | 0% | 1 | |
| Taylor xprev | 2 | 3.26% | 0% | 1 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.15 | 5.46% | 0.000724% | 2 | |
| Taylor mx | 2 | 4.94% | 0.000473% | 2 | |
| Taylor mprev | 2 | 4.94% | 0.000476% | 2 | |
| Taylor xprev | 1.9 | 4.94% | 0.000475% | 2 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.15 | 5.41% | 0.0212% | 2 | |
| Taylor mx | 2 | 4.92% | 0.000223% | 2 | |
| Taylor mprev | 2 | 4.92% | 0.000227% | 2 | |
| Taylor xprev | 1.9 | 4.92% | 0.000225% | 2 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.15 | 5.35% | 0.00742% | 2 | |
| Taylor mx | 2 | 4.85% | 8.73e-05% | 2 | |
| Taylor mprev | 2 | 4.85% | 8.79e-05% | 2 | |
| Taylor xprev | 2 | 4.85% | 8.73e-05% | 2 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.15 | 0.0203% | 0% | 1 | |
| Taylor mx | 2 | 0% | 0% | 0 | |
| Taylor mprev | 2 | 0% | 0% | 0 | |
| Taylor xprev | 2 | 0% | 0% | 0 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.15 | 6.72% | 0% | 1 | |
| Taylor mx | 2 | 5.8% | 0% | 1 | |
| Taylor mprev | 2 | 5.8% | 0% | 1 | |
| Taylor xprev | 2 | 5.8% | 0% | 1 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.14 | 11.4% | 0.067% | 2 | |
| Taylor mx | 2 | 12.2% | 0.142% | 2 | |
| Taylor mprev | 2 | 12.2% | 0.142% | 2 | |
| Taylor xprev | 2 | 12.2% | 0.142% | 2 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.14 | 9.25% | 0.0176% | 2 | |
| Taylor mx | 2 | 10.3% | 0.0925% | 2 | |
| Taylor mprev | 2 | 10.3% | 0.0925% | 2 | |
| Taylor xprev | 2 | 10.3% | 0.0926% | 2 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.14 | 8.4% | 0.029% | 2 | |
| Taylor mx | 2 | 9.73% | 0.0905% | 2 | |
| Taylor mprev | 2 | 9.73% | 0.0905% | 2 | |
| Taylor xprev | 2 | 9.73% | 0.0905% | 2 |
Table 3. Performance, in elements (GE) per seconds, and accuracy of the function in the power, explog and Taylor forms in the range, 1,015,021,568 single-precision floating-point values.
| method | GE/sec | discrepancies | ULP | max ULPs | |
| power | 0.15 | 99.9% | 99.6% | ||
| explog | 0.14 | 3.95% | 6.73e-07% | 2 | |
| Taylor mx | 1.8 | 3.94% | 0.187% | ||
| Taylor mprev | 1.8 | 3.94% | 0.187% | ||
| Taylor xprev | 1.8 | 3.94% | 0.187% | ||
| power | 0.16 | 99.9% | 99.7% | ||
| explog | 0.14 | 7.13% | 6.73e-07% | 2 | |
| Taylor mx | 1.8 | 3.72% | 0.00255% | 2 | |
| Taylor mprev | 1.8 | 3.72% | 0.00255% | 2 | |
| Taylor xprev | 1.8 | 3.71% | 0.00175% | 2 | |
| power | 0.16 | 100% | 100% | ||
| explog | 0.14 | 6.15% | 0.00104% | 2 | |
| Taylor mx | 1.8 | 5.55% | 0.00245% | 2 | |
| Taylor mprev | 1.7 | 5.55% | 0.00256% | 2 | |
| Taylor xprev | 1.7 | 5.55% | 0.00256% | 2 | |
| power | 0.16 | 100% | 99.9% | ||
| explog | 0.14 | 6.1% | 0.0242% | 2 | |
| Taylor mx | 1.8 | 5.5% | 0.00122% | 2 | |
| Taylor mprev | 1.7 | 5.51% | 0.00134% | 2 | |
| Taylor xprev | 1.7 | 5.51% | 0.0013% | 2 | |
| power | 0.16 | 100% | 99.9% | ||
| explog | 0.14 | 6.05% | 0.00914% | 2 | |
| Taylor mx | 1.8 | 5.44% | 0.00121% | 2 | |
| Taylor mprev | 1.7 | 5.45% | 0.00128% | 2 | |
| Taylor xprev | 1.7 | 5.45% | 0.00122% | 2 | |
| 1 | power | 0.16 | 99.9% | 99.7% | |
| explog | 0.14 | 0.149% | 0% | 1 | |
| Taylor mx | 1.8 | 0% | 0% | 0 | |
| Taylor mprev | 1.8 | 0% | 0% | 0 | |
| Taylor xprev | 1.8 | 0% | 0% | 0 | |
| 2 | power | 0.16 | 99.9% | 99.7% | |
| explog | 0.14 | 7.2% | 0% | 1 | |
| Taylor mx | 1.8 | 6.52% | 0% | 1 | |
| Taylor mprev | 1.8 | 6.52% | 0% | 1 | |
| Taylor xprev | 1.8 | 6.52% | 0% | 1 | |
| 3 | power | 0.16 | 99.9% | 99.7% | |
| explog | 0.14 | 12% | 0.0834% | 2 | |
| Taylor mx | 1.8 | 12.9% | 0.157% | 2 | |
| Taylor mprev | 1.8 | 12.9% | 0.157% | 2 | |
| Taylor xprev | 1.8 | 12.9% | 0.157% | 2 | |
| 5 | power | 0.16 | 99.9% | 99.7% | |
| explog | 0.14 | 10% | 0.0412% | 2 | |
| Taylor mx | 1.8 | 11% | 0.102% | 2 | |
| Taylor mprev | 1.8 | 11% | 0.102% | 2 | |
| Taylor xprev | 1.7 | 11% | 0.103% | 2 | |
| 7 | power | 0.16 | 99.9% | 99.7% | |
| explog | 0.14 | 9.19% | 0.0576% | 2 | |
| Taylor mx | 1.8 | 10.4% | 0.1% | 2 | |
| Taylor mprev | 1.8 | 10.4% | 0.1% | 2 | |
| Taylor xprev | 1.8 | 10.4% | 0.1% | 2 |
Table 4. Performance, in elements (GE) per seconds, and accuracy of the function in the power, explog and Taylor forms in the range, covering 1,040,187,392 single-precision floating-point values.
an expansion of order 8 quickly drops off as . Such an application of the function is not expected in the normal applications of WCSPH, but it may be safer to adopt the explog for the inverse of the equation of state for larger values of .
Equation of state round-trip
A second but important measure in the evaluation of the best choice for the expression of the function is the accuracy of the ‘round-trip’, i.e. the accuracy with which one can recover the original (scaled) density from the computed (scaled) pressure by applying the inverse equation of state, or conversely: considering that analytically we should have , we can evaluate the round-trip accuracy of the forms for different exponents by comparing the result of the chain evaluation of the function and its inverse against the original argument. Once again, accuracy can be estimated in terms of number of elements for which the results are different, number of elements for which the maximum error is larger than 1 ULP, and the maximum ULPs in the error.
We restrict our analysis to the explog and “Taylor mx” forms, taken (from our previous analysis) respectively as the most accurate in the full range, and
Table 7: Round-trip accuracy of the function in the explog and Taylor (mx) forms. This table refers to the range that contains 872, 415, 232 single-precision floating-point values.
| method | discrepancies | ULP | max ULPs | |
| explog | 3.44e-07% | 0% | 1 | |
| Taylor mx | 1.76% | 0% | 1 | |
| explog | 2.29e-07% | 1.15e-07% | 2 | |
| Taylor mx | 0.962% | 0% | 1 | |
| explog | 29.9% | 1.27% | ||
| Taylor mx | 30.5% | 1.53% | ||
| explog | 24% | 0.769% | 2 | |
| Taylor mx | 24.5% | 0.841% | 2 | |
| explog | 34.1% | 0% | 1 | |
| Taylor mx | 34.3% | 0.0801% | 2 | |
| 1 | explog | 1.15e-07% | 0% | 1 |
| 1 | Taylor mx | 0% | 0% | 0 |
| 2 | explog | 2.29e-07% | 0% | 1 |
| 2 | Taylor mx | 0.962% | 0% | 1 |
| 3 | explog | 33.1% | 0% | 1 |
| 3 | Taylor mx | 33.6% | 0% | 1 |
| 5 | explog | 22.3% | 0% | 1 |
| 5 | Taylor mx | 23.2% | 0.0881% | 2 |
| 7 | explog | 54.3% | 2.29e-07% | 2 |
| 7 | Taylor mx | 54.3% | 0.381% |
Table 7.
Table 8: Round-trip accuracy of the function in the explog and Taylor (mx) forms. This table refers to the range that contains 1, 015, 021, 568 single-precision floating-point values.
| method | discrepancies | ULP | max ULPs | |
| explog | 0.0602% | 0.000435% | 2 | |
| Taylor mx | 7.02% | 0.0291% | 2 | |
| explog | 0.0403% | 0.000229% | 2 | |
| Taylor mx | 6.38% | 0.0282% | 2 | |
| explog | 29.7% | 1.1% | ||
| Taylor mx | 33.8% | 2.18% | ||
| explog | 23.8% | 0.668% | ||
| Taylor mx | 28.3% | 1.54% | ||
| explog | 34% | 0.00955% | ||
| Taylor mx | 37.1% | 1.35% | ||
| 1 | explog | 0.0203% | 0.00108% | 2 |
| 1 | Taylor mx | 0% | 0% | 0 |
| 2 | explog | 0.0364% | 0.000214% | 2 |
| 2 | Taylor mx | 6.05% | 0.0254% | 2 |
| 3 | explog | 33.1% | 0.00961% | |
| 3 | Taylor mx | 36.5% | 0.981% | |
| 5 | explog | 22.4% | 0.00867% | |
| 5 | Taylor mx | 27.3% | 0.927% | |
| 7 | explog | 54.4% | 0.019% | |
| 7 | Taylor mx | 55.1% | 1.9% |
Table 8.
| method | discrepancies | ULP | max ULPs | |
| explog | 0.413% | 0.0225% | 2 | |
| Taylor mx | 8.16% | 0.547% | ||
| explog | 0.287% | 0.0118% | 2 | |
| Taylor mx | 7.25% | 0.0845% | ||
| explog | 29.7% | 1.13% | ||
| Taylor mx | 34.3% | 2.28% | ||
| explog | 23.9% | 0.693% | ||
| Taylor mx | 28.8% | 1.63% | ||
| explog | 34.1% | 0.0675% | ||
| Taylor mx | 37.6% | 1.53% | ||
| explog | 0.149% | 0.00815% | 2 | |
| Taylor mx | 0% | 0% | 0 | |
| explog | 0.253% | 0.00913% | 2 | |
| Taylor mx | 7.04% | 0.305% | ||
| explog | 33.3% | 0.0742% | ||
| Taylor mx | 37.3% | 1.79% | ||
| explog | 22.6% | 0.0732% | ||
| Taylor mx | 28.6% | 2.39% | ||
| explog | 54.4% | 0.139% | ||
| Taylor mx | 56% | 3.75% |
Table 9. Round-trip accuracy of the function in the explog and Taylor (mx) forms. This table refers to the range that contains 1,040,187,392 single-precision floating-point values.
the fastest. The results are presented in Table 6 to Table 10.
| method | discrepancies | ULP | max ULPs | |
| explog | 0% | 0% | 0 | |
| Taylor mx | 0% | 0% | 0 | |
| explog | 0% | 0% | 0 | |
| Taylor mx | 0% | 0% | 0 | |
| explog | 85.7% | 57.1% | ||
| Taylor mx | 85.7% | 57.1% | ||
| explog | 80% | 40% | 2 | |
| Taylor mx | 80% | 40% | 2 | |
| explog | 66.7% | 0% | 1 | |
| Taylor mx | 66.7% | 0% | 1 | |
| 1 | explog | 0% | 0% | 0 |
| 1 | Taylor mx | 0% | 0% | 0 |
| 2 | explog | 0% | 0% | 0 |
| 2 | Taylor mx | 0% | 0% | 0 |
| 3 | explog | 8.33% | 0% | 1 |
| 3 | Taylor mx | 8.33% | 0% | 1 |
| 5 | explog | 2.5% | 0% | 1 |
| 5 | Taylor mx | 2.5% | 0% | 1 |
| 7 | explog | 6.55% | 0% | 1 |
| 7 | Taylor mx | 6.55% | 0% | 1 |
Table 6. Round-trip accuracy of the function in the explog and Taylor (mx) forms. This table refers to the range that contains 8,388,608 single-precision floating-point values.
| method | discrepancies | ULP | max ULPs | |
| explog | 1.55% | 0.307% | ||
| Taylor mx | 10.3% | 2.9% | ||
| explog | 1.2% | 0.13% | ||
| Taylor mx | 9.43% | 2.38% | ||
| explog | 30.1% | 1.29% | ||
| Taylor mx | 35.7% | 4.24% | ||
| explog | 24.3% | 0.843% | ||
| Taylor mx | 30.3% | 3.53% | ||
| explog | 34.4% | 0.263% | ||
| Taylor mx | 38.8% | 3.33% | ||
| explog | 0.758% | 0.0315% | 2 | |
| Taylor mx | 0% | 0% | 0 | |
| explog | 0.965% | 0.0285% | ||
| Taylor mx | 9.23% | 2.66% | ||
| explog | 33.6% | 0.312% | ||
| Taylor mx | 38.8% | 4.11% | ||
| explog | 23% | 0.222% | ||
| Taylor mx | 30.3% | 4.7% | ||
| explog | 54.6% | 0.532% | ||
| Taylor mx | 57% | 6.03% |
Table 10. Round-trip accuracy of the function in the explog and Taylor (mx) forms. This table refers to the range that contains 1,065,353,216 single-precision floating-point values.
It’s interesting to note that the round-trip accuracy is not the same when starting from or from : the error distribution for is different from that of . This can be observed for the exponents 3, 5, 7 for which we also have the results of the round-trip starting from the reciprocals 1/3, 1/5, 1/7.
In the denormals range in particular (Table 6) this affects a majority of the values, due to the fact that starting from the fractional exponent leads to loss of bits in the mantissa, a loss that is not experienced when starting from exponents .
Despite this asymmetry, the round-trip error is limited to 2 significant bits at most for either form until the percent range, where the Taylor form starts losing accuracy for exponents different from 1, with the effect becoming catastrophic in the perten range: this is expected, as we have already seen that in this range the Taylor form has low accuracy for , and in the round-trip tests either or its reciprocal will be less than 1 whenever . On the upside, the Taylor form gives exact results throughout the whole range for , whereas explog loses one or two ULPs in the upper subranges.
Applications to the ``dummy'' boundary model
Accurate evaluation of the pressure is essential in all formulations of WCSPH, but it becomes even more important in boundary models where its evaluation is needed for the correct imposition of boundary conditions.
As discussed in § 3.2, this is the case for the dummy boundary model. In this case, it’s important not only that the pressure evaluation is accurate, but also that the round-trip through the inverse of the equation of state does not introduce significant perturbations. Although the formula we present here are specifically intended for the dummy boundary model, similar formulas can be derived for any solid boundary model (or in fact any other context) that requires the computation of the pressure from neighboring particles.
Let us consider at first the pressure interpolation (equation 7) and rewrite it for the scaled pressure, assuming at first that we only have a single fluid with bulk modulus . Considering that , we have
Given the potentially different magnitude of the terms, it is better to explicitly split the expression in the interpolating and hydrostatic contributions:
If multiple fluids are present, each with their bulk module, reference density, speed of sound, some simplifications will not be possible, and should be replaced with appropriate ratios; we have with for the pressure interpolation terms, and with for the hydrostatic term, so that equation (19) can be rewritten as:
in the multi-fluid case.
The wall particle pressure computed as (19) or (20) is used both to compute the wall boundary contribution to the pressure gradient of neighboring fluid particles, and to compute the density of the wall boundary particles using the inverse equation of state.
In fact, computing the density is important for both uses, since the pressure gradient contribution, is frequently computed as for some exponent , with being a common exponent, such as in the formulation we are using (equation (2)).
Pressure gradient contribution
We have, for any exponent and for any particle:
For fluid particles, where the scaled pressure is computed directly from the scaled density using the equation of state, we have:
so that we can express (21) entirely in terms of times a constant that can be precomputed:
For dummy boundary particles, in combination with (19), equation (21) allows some additional simplifications in the hydrostatic contribution:
and a similar expression can also be derived for (20) in the multi-fluid case. Note that despite the simplifications, (22) still depends on equation (19) to obtain from . It is however possible to compute the common subexpressions once and then produce from them both for and as needed.
The numerical results we will present momentarily also show that simply using the expressions (19)–(22) over the naive ones (equation (7) for the wall boundary, and ) is sufficient to improve numerical accuracy in the computation of the acoustic terms, regardless of the choice of discussed in section 4.1.
Numerical results
SPHERIC Test Case 2. The first test case is the classic SPHERIC 2 reference case, a classic bore-in-a-box test on a domain which is , with a m water height behind a closed gate positioned m from the back wall. A box (dimensions ) is placed with its water-facing side at m from the gate, centered with respect to the side walls. The box is covered with 8 pressure sensors along the central meridian. Water gages take the water elevation over time at three locations (halfway between the gate and the obstacle, near the front of the obstacle, near the back of the obstacle). Further details about the setup can be found in [54, 55].
We model the test case using the dummy solid boundary formulation (Figure 1). The equation of state for the fluid uses the polytropic constant , and the Monaghan artificial viscosity is used with . The particle resolution is set at 30 particles per meter.

Figure 1. Cross-section of the 3D geometry for the SPHERIC 2 Test Case. Fluid particles are blue, solid boundary particles realizing the walls are gray, and solid boundary particles realizing the obstacle are black.
Simulations are run with both the naive (power) and explog forms for the acoustic term, and we look at the power density spectra for the pressure oscillations at the prescribed probes. As shown in Figure 2 (bottom) for Probe 6, the explog choice leads to lower frequency oscillations (10 to 20dB/Hz less throughout most of the spectrum), and is missing the large spikes that can be observed in the pressure plot for the naive formulation (Figure 2, top).
Figure 2. Pressure oscillations and their spectral density at Probe 6 of the SPHERIC 2 Test case, when using the naive versus the explog forms of the acoustic terms.
Standing wave. In this test case, we look at energy conservation for a long-running Standing Wave simulation. The simulation is run in 3D, but with a pseudo-2D configuration. The domain box is 1m wide in the wave direction , and 1.1m tall; in the cross-wave direction , the domain is only long enough to cover 3 influence radii. Periodic boundary conditions are applied in both the and directions. Solid boundaries are implemented using the dynamic boundary model, and the conservative corrected SPH formulation introduced in [28] is employed to avoid the well-known numerical dissipative effect in standard WCSPH. The initial water level is constant, but particles are initialized with non-zero velocity components , to realize a wave with wavelength and amplitude .
We run simulations at both a low resolution of 32 particles per meter and a high resolution of 64 particles per meter, again comparing the naive (power) and explog forms for the acoustic terms.
We observe (Figure 3) that the naive expression shows a small but consistent linearly growing trend for the total energy, and that increasing the
Figure 3. Energy conservation in a long-running Standing Wave, using the naive and the explog forms of the acoustic terms, and two different particle spacings of and particles per meter.
resolution makes the energy conservation worse rather than better. Note that, while the total energy variation remains below in this case, the trend would push it to grow over single-precision machine epsilon in longer simulations, with the issue manifesting earlier at finer resolutions. When using the explog form, energy conservation is better overall, and it improves at finer resolutions, as expected for a numerically robust algorithm.
Stillwater with Irregular topography. The stillwater case is a well-known benchmark used to evaluate the capability of different density diffusion options and boundary condition formulations to reproduce the pressure field, since its results can be directly compared with the analytical solution. Prior studies have examined the pressure distribution in a small box of stillwater over a flat bed [30, 56, 57, 58] and a bed with a wedge (sharp corner) [30, 59, 60, 61], showing that the dynamic boundary condition [49, 48] fails to accurately capture the pressure near solid boundaries, and that modifications to the boundary treatment and density diffusion approach are necessary to improve the results. Moreover, Colagrossi et al. [59] investigated the influence of initial particle positioning on the acoustic noise generated during the early stages of the simulation, and introduced the Particle Packing Algorithm, designed to generate high-quality initial particle distributions to reduce spurious currents.
To evaluate the capability of the explog formulation in computing pressure distribution near boundaries, particularly in regions with strong bottom roughness, we model a stillwater testcase where the bottom topography uses a high-resolution bathymetric dataset with rapidly changing bed elevation along the direction. As shown in Figure 4, the irregular DEM consists of two flat sections and a rough segment characterized by steep and rapidly changing topography, including a maximum local slope of , and a peak elevation of 2.6m. This DEM was used to simulate a still-water case with a maximum water depth of 4.0 m ( m), enabling the examination of pressure fluctuations near the bed in the absence of waves and their comparison with the analytical hydrostatic solution over a total simulation time of 100s. This duration is substantially longer than that used in previous studies, which typically employed simulation times of less than 10s [30, 60, 61].

Figure 4. Instantaneous normalized pressure fields, , for the still-water test: (a) naive and (b) explog at ; (c) naive and (d) explog at , where . All panels use the same bathymetry and color range, . Purple dotted boxes mark the 1-m-wide particle-extraction windows for Section A ( m) and Section B ( m), which are used to extract the vertical pressure profiles in Figure 5.
Simulations were conducted at a relatively low resolution of 20 particles per meter. Dummy boundary condition was applied to the solid bottom and periodic boundary condition was applied in the alongshore direction. In order to avoid the excessive nonphysical energy dissipation in the model,
the CCSPH option introduced in [28] was enabled. Additionally, the -SPH model described in [22] was used for the density diffusion to reduce acoustic noise and smooth the pressure field. As shown in Figure 4, pressure distribution was analyzed over time and along the water column at two locations: one in the flat-bed region (Section A: to ), and another adjacent to the rough-bottom region (Section B: to ). Two different formulations were tested: the naive formulation where the dummy wall boundary pressure is computed using (7) directly, the pressure contribution to the Navier–Stokes equation is computed as without simplifications, and the equation of state is computed naively using __powf, and the explog formulation, with the pressure contribution computed using equations (19)–(22) and the explog form used for .
Figure 4 compares the normalized pressure fields, , obtained with the naive and explog formulations at two normalized time instances, . At (Figure 4a,Figure 4b), both solutions appear nearly steady. In the naive formulation, however, fluid–boundary interactions over the rough topography generate a localized pressure pulse as numerical errors accumulate. By (Figure 4c) this pulse has evolved into noticeable pressure fluctuations that originate in the rough section and progressively propagate into the adjacent flat regions. At the same time, the explog formulation (Figure 4d) remains nearly steady and does not exhibit comparable fluctuations, indicating that it limits the growth of the density-related numerical instability triggered by fluid–boundary interactions over the rough topography.
To quantify these pressure fluctuations, instantaneous fluid-particle pressures extracted from the 1-m-wide windows in Sections A and B are shown as vertical scatter profiles in Figure 5. The vertical coordinate is measured positive upward from the flat-bed datum, such that the flat bed in Section A is at and the undisturbed free surface is at . For each profile, pressure and vertical position are normalized as and , where is the section reference bottom elevation. In Section A, and , whereas in Section B, is the minimum bed elevation within the extraction window, and is the corresponding maximum local still-water depth. Using the linear hydrostatic reference, the normalized residual for particle is defined as

Figure 5. Normalized instantaneous particle-pressure profiles in Section A [panels (a)–(d)] and Section B [panels (e)–(h)]. Panels (a,e), (b,f), (c,g), and (d,h) correspond to , , , and , respectively. Blue and orange markers denote fluid-particle pressures computed using the naive and explog formulations, respectively, and the solid black line denotes the analytical hydrostatic solution. Each marker represents one fluid particle within the corresponding 1-m-wide extraction window.
where denotes the instantaneous pressure computed by GPUSPH for particle , and is the analytical hydrostatic pressure at the location of particle . For each pressure profile, the total departure from the analytical hydrostatic solution and the variability of the pressure residuals are quantified using the normalized root-mean-square error, , and the normalized residual standard deviation, , respectively:
where is the number of extracted fluid particles and is the mean normalized residual. The quantifies the overall mismatch between the particle pressures and the analytical hydrostatic solution, whereas quantifies the spread of the residuals about their mean and is used here as a bulk measure of pressure fluctuations. Reporting both metrics distinguishes a smoothly biased profile, which may have a large but a small , from a profile with substantial residual scatter.
Figure 5 and Table 11 show that the naive formulation does not remain hydrostatic over the full simulation. At , both formulations are close to the analytical hydrostatic solution with both and below 2.0%. Figure 5a and Figure 5e show that, consistent with previous studies, the model agrees well with the analytical hydrostatic solution over short simulation times. However, at the next sampled time, the naive formulation begins to deviate from the correct solution, and this behavior repeats multiple times throughout the simulation. At , the naive solution departs substantially from the analytical hydrostatic solution, particularly in Section B [Figure 5(f)], where decreases from 26.65% for the naive formulation to 1.98% for explog, while decreases from 16.11% to 1.75%. The naive profiles move closer to the analytical solution at , but the instability reappears at ; in Section B, the naive and
| (s) | Section | RMSE (%) Naive | RMSE (%) Explog | SD (%) Naive | SD (%) Explog | |
| 18.2 | 28.5 | A | 0.55 | 0.44 | 0.49 | 0.34 |
| B | 1.64 | 1.94 | 1.28 | 1.93 | ||
| 24.1 | 37.7 | A | 3.49 | 1.06 | 3.01 | 0.83 |
| B | 26.65 | 1.98 | 16.11 | 1.75 | ||
| 70.1 | 109.8 | A | 1.67 | 1.12 | 1.67 | 1.04 |
| B | 4.20 | 1.64 | 3.74 | 1.54 | ||
| 76.5 | 119.8 | A | 4.63 | 1.05 | 3.09 | 1.04 |
| B | 11.17 | 1.59 | 6.25 | 1.43 |
Table 11. Normalized pressure-residual metrics for the vertical profiles in Sections A and B. RMSE quantifies the total departure of individual particle pressures from the analytical hydrostatic solution, whereas SD quantifies the spread of the normalized pressure residuals about their mean. Values are percentages.
are 11.17% and 6.25%, respectively, compared with 1.59% and 1.43% for explog. Across all selected times and sections, the explog formulation remains below 2.0% in RMSE and SD.
Overall, the naive formulation does not consistently reproduce the analytical hydrostatic solution over long simulations, with the largest departures occurring in Section B near the steep rough topography. The explog formulation suppresses the growth of the instability observed with the naive formulation, and remains below 2.0% in both RMSE and SD at all selected times and sections, although small residual pressure fluctuations remain.
Performance
We leverage the recently introduced support for CPUs and AMD GPUs in GPUSPH [62] to test the impact of the choice of expression for across a variety of hardware platforms.
The hardware used for these tests, done again on the Standing Wave test case, include:
CUDA an NVIDIA RTX 3060 GPU (Compute Capability 8.6) using CUDA 11.6;
HIP an AMD Radeon RX 580 GPU (Graphics IP 8) using HIP/ROCm 5.4;
AMD the AMD Ryzen 7 3700X CPU used for the microbenchmarks presented in Table 1–Table 10;
Intel a dual-socket Intel Xeon Silver 4110 CPU (32 threads total);
ARM an 8-core Cortex-A53 CPU.
Since we are interested in the possible performance loss (or gain) related to the use of the explog form, we compute the absolute performance in MIPPS (millions of iterations times particles per second, as detailed in [50]) for each configuration, taking the median across 5 tests (in benchmarking mode, with data output completely disabled to avoid pollution of the results due to I/O latency), and then express our results as the ratio of the performance for a given configuration to the performance of the naive (power form) case on the same hardware. Less than 1% variation was observed in the timings across runs for each configuration.
The results are shown in Figure 6, separately for GPUs and for CPUs. Since both CUDA and HIP define a lower-accuracy, faster version of the power function (__powf), the timing results leveraging this form are also included for these platforms.
Figure 6. Relative performance of the explog and “fast power” expressions for across different GPUs (left) and CPUs (right). Note that the GPU plot uses a truncated scale to highlight the relatively small performance difference.
On GPUs, we observe that the explog form is not only more accurate, but also marginally faster (4% to 5%, depending on platform). The faster power variant achieved even higher performance on CUDA (as expected), but not on HIP, probably due to differences in the way this is implemented on the AMD platform.
The small performance gains observed on GPU are consistent with the microbenchmarks, that show the explog form to be between 30% faster (Table 1) to less than 20% slower (Table 5), depending on argument magnitude, when considering that in a typical WCSPH simulations the arguments will typically be closer to 0.
The CPU results are more surprising in this regard: although the choice of formulation is mostly indifferent on the ARMv8 architecture, the explog performance is consistently worse on the x86-64 architectures, with a drop between 20% and 25%. The reasons for these discrepancies from the microbenchmarks are still under analysis, with higher register consumption being a probable candidate.
Given the hardware-dependent performance ratio between the explog and naive formulations, in GPUSPH we have left the choice to the user, who can then balance their computational and accuracy requirements based on the specific test cases that they need to run.
Conclusions
Adopting the relative density variation (condensation) and a scaled pressure as state variables leads to SPH formulations that are numerically more stable. Additionally, it allows expressing the acoustic terms derived from Cole’s equation of state as a combination of the expm1 and log1p IEEE-754 functions; the resulting explog form achieves higher precision for (relative) values closer to zero, which is the range where condensation and scaled pressure are mostly distributed in a standard WCSPH simulation. The explog form of the acoustic terms can also be leveraged to improve pressure evaluation for boundary terms, which helps reduce spurious pressure oscillations, and improves energy conservation.
While analytical strategies such as artificial viscosity and density diffusion can help diffuse numerical noise, they are insufficient in preventing the accumulation of noise over time, leading to degrading energy conservation and loss of accuracy in long-running simulations. Combining them with the explog form we introduced ensures that energy is conserved to below the machine epsilon limit and hydrostatic density profiles are preserved even for simulations running for hundreds of seconds.
Performance-wise, the new form also provides performance benefits over the IEEE-compliant power function form on GPU, but is slower than the non-compliant and less accurate __powf on CUDA. On CPU, our implementation of the explog form results in a measurable loss in performance, that is currently being investigated.
CRediT
Giuseppe Bilotta: Conceptualization, Methodology, Software, Validation, Formal Analysis, Investigation, Writing - Original Draft, Writing - Review & Editing, Supervision, Project administration, Funding acquisition Alireza Zarei: Software, Validation, Investigation, Writing - Review & Editing, Visualization Roberta Cristofaro: Investigation, Writing - Review & Editing, Visualization Alexis Hérault: Methodology, Software, Formal Analysis, Writing - Review & Editing Élie Saikali: Methodology, Software, Formal Analysis, Writing - Review & Editing Morteza Derakhti: Validation, Writing - Review & Editing, Supervision, Project administration
Acknowledgements
This work was supported by the INGV HARVEST project (BRL 2021, Ob.Fu. 9999.804); and the 2022 Progetto di Ricerca di Rilevante Interesse Nazionale (PRIN 2022) PLastic Transport due to waves and currents ON Emerged and submerged beaches (CUP D53D23004590006, Ob.Fu. 1216.010).
References
- [1]J. J. Monaghan, Simulating free surface flows with SPH, Journal of Computational Physics 110 (2) (1994) 399–406. doi:10.1006/jcph.1994.1034.DOI
- [2]J. J. Monaghan, Smoothed particle hydrodynamics, Reports on Progress in Physics 68 (8) (2005) 1703–1759. doi:10.1088/0034-4885/68/8/R01.DOI
- [3]M. Gómez-Gesteira, B. D. Rogers, R. A. Dalrymple, A. J. C. Crespo, State-of-the-art of classical SPH for free-surface flows, Journal of Hydraulic Research 48 (S1) (2010) 6–27. doi:10.1080/002211686.2010.9641242.
- [4]T. Takahashi, H. Fujii, A. Kunimatsu, K. Hiwada, T. Nishita, Real-time particle-based fluid simulation with SPH, in: Computer Graphics International, 2003. Proceedings, IEEE, 2003, pp. 63–70. doi:10.1109/CGI.2003.1214466.
- [5]P. Kipfer, R. Westermann, UberFlow: A GPU-based particle engine, in: Proceedings of the ACM SIGGRAPH/EUROGRAPHICS conference on Graphics hardware, ACM, 2004, pp. 115–122. doi:10.2312/EGGH/EGGH04/115-122.DOI
- [6]A. Hérault, G. Bilotta, R. A. Dalrymple, Achieving the best accuracy in an SPH implementation, in: Proceedings of the 9th SPHERIC Workshop, Proceedings of the 9th SPHERIC Workshop, Paris, 2014, pp. 134–139.
- [7]G. Bilotta, V. Zago, A. Hérault, Design and implementation of particle systems for meshfree methods with high performance, in: S. Chickerur (Ed.), High Performance Parallel Computing, IntechOpen, Rijeka, 2018, Ch. 6. doi:10.5772/intechopen.81755.DOI
- [8]E. Saikali, G. Bilotta, A. Hérault, V. Zago, Accuracy improvements for single precision implementations of the SPH method, International Journal of Computational Fluid Dynamics 34 (10) (2020) 774–787. doi:10.1080/10618562.2020.1836357. URL https://doi.org/10.1080/10618562.2020.1836357
- [9]G. Bilotta, SPH and GPUs: perfect fit or trap?, SPHERIC Global Seminars (2022).
- [10]G. Bilotta, V. Zago, A. Hérault, A. Cappello, G. Ganci, H. D. van Ettinger, C. Del Negro, Optimization of flexible neighbors lists in Smoothed Particle Hydrodynamics on GPU, Advances in Engineering Software 196 (2024) 103711. doi:10.1016/j.advengsoft.2024.103711.DOI
- [11]J. M. Domínguez, A. J. C. Crespo, M. Gómez-Gesteira, J.-C. Marongiu, Neighbour lists in smoothed particle hydrodynamics, International Journal for Numerical Methods in Fluids 67 (12) (2011) 2026–2042. doi:10.1002/fld.2481.DOI
- [12]J. M. Domínguez, A. J. C. Crespo, A. Barreiro, M. Gómez-Gesteira, B. D. Rogers, Efficient implementation of double precision in gpu computing to simulate realistic cases with high resolution, in: Proceedings of the 9th SPHERIC Workshop, Paris, France, 2014.
- [13]W. Kahan, Pracniques: further remarks on reducing truncation errors, Communications of the ACM 8 (1) (1965) 40. doi:10.1145/363707.363723.DOI
- [14]A. Neumaier, Rundungsfehleranalyse einiger Verfahren zur Summation endlicher Summen, ZAMM - Journal of Applied Mathematics and Mechanics / Zeitschrift für Angewandte Mathematik und Mechanik 54 (1) (1974) 39–51. doi:10.1002/zamm.19740540106.DOI
- [15]A. Klein, A generalized Kahan-Babuška-summation-algorithm, Computing 76 (3-4) (2006) 279–293. doi:10.1007/s00607-005-0139-x.DOI
- [16]G. Bilotta, V. Zago, V. Centorrino, R. A. Dalrymple, A. Hérault, C. Del Negro, A numerically robust, parallel-friendly variant of BiCGSTAB for the semi-implicit integration of the viscous term in smoothed particle hydrodynamics, Journal of Computational Physics 446 (2022) 111413. doi:10.1016/j.jcp.2022.111413.DOI
- [17]J. J. Monaghan, Smoothed Particle Hydrodynamics, Reports on Progress in Physics 68 (2005) 1703–1759. doi:10.1088/0034-4885/68/8/R01.DOI
- [18]J. J. Monaghan, R. A. Gingold, Shock simulation by the particle method SPH, Journal of Computational Physics 52 (2) (1983) 374–389. doi:10.1016/0021-9991(83)90036-0.DOI
- [19]D. Molteni, A. Colagrossi, Density diffusion in smoothed particle hydrodynamics simulations of incompressible flows, Journal of Computational Physics 228 (14) (2009) 5480–5492. doi:10.1016/j.jcp.2009.04.027.
- [20]D. Molteni, A. Colagrossi, A simple procedure to improve the pressure evaluation in hydrodynamic context using the SPH, Computer Physics Communications 180 (2009). doi:10.1016/j.cpc.2008.12.004.DOI
- [21]M. Antuono, A. Colagrossi, S. Marrone, C. Lugni, Propagation of gravity waves through an SPH scheme with numerical diffusive terms, Computer Physics Communication 182 (4) (2011) 866–877. doi:10.1016/j.cpc.2010.12.012.DOI
- [22]S. Marrone, M. Antuono, A. Colagrossi, G. Colicchio, D. Le Touzé, G. Graziani, δ-SPH model for simulating violent impact flows, Computer Methods in Applied Mechanics and Engineering 200 (13) (2011) 1526–1542. doi:10.1016/j.cma.2010.12.016.DOI
- [23]M. D. Green, R. Vacondio, J. Peiró, A smoothed particle hydrodynamics numerical scheme with a consistent diffusion term for the continuity equation, Computers & Fluids 179 (2019) 632–644. doi:10.1016/j.compfluid.2018.11.020.DOI
- [24]J. P. Vila, On particle weighted methods and smooth particle hydrodynamics, Mathematical Models and Methods in Applied Sciences 9 (2) (1999). doi:10.1142/S0218202599000117.DOI
- [25]J. K. Chen, J. E. Beraun, C. J. Jih, An improvement for tensile instability in Smoothed Particle Hydrodynamics, Computational Mechanics 23 (4) (1999) 279–287. doi:10.1007/s004660050409.DOI
- [26]J. K. Chen, J. E. Beraun, T. C. Carney, A corrective smoothed particle method for boundary value problems in heat conduction, International Journal for Numerical Methods in Engineering 46 (2) (1999) 231–252. doi:10.1002/(SICI)1097-0207(19990920)46:2<231::AID-NME672>3.0.CO;2-K.doi.org/10.1002/(sici)1097-0207(19990920)46:2<231::aid-nme672>3.0.co;2-k
- [27]J. Bonet, T.-S. Lok, Variational and momentum preservation aspects of smooth particle hydrodynamic formulations, Computer Methods in Applied Mechanics and Engineering 180 (1) (1999) 97–115. doi:10.1016/S0045-7825(99)00051-1.DOI
- [28]V. Zago, L. J. Schulze, N. Almashan, R. A. Dalrymple, Overcoming excessive numerical dissipation in SPH modeling of water waves, Coastal Engineering 170 (2021) 104018. doi:10.1016/j.coastaleng.2021.104018.DOI
- [29]D. Le Touzé, A. Colagrossi, Smoothed particle hydrodynamics for free-surface and multiphase flows: a review, Reports on Progress in Physics 88 (3) (2025) 037001. doi:10.1088/1361-6633/ada80f.DOI
- [30]S. Adami, X. Y. Hu, N. A. Adams, A generalized wall boundary condition for Smoothed Particle Hydrodynamics, Journal of Computational Physics 231 (21) (2012) 7057–7075. doi:10.1016/j.jcp.2012.05.005.DOI
- [31]A. Mayrhofer, M. Ferrand, C. Kassiotis, D. Violeau, F.-X. Morel, Unified semi-analytical wall boundary conditions in SPH: analytical extension to 3-D, Numerical Algorithms 68 (2015) 15–34. doi:10.1007/s11075-014-9835-y.DOI
- [32]M. Ferrand, A. Joly, C. Kassiotis, D. Violeau, A. Leroy, F.-X. Morel, B. D. Rogers, Unsteady open boundaries for SPH using semi-analytical conditions and Riemann solver in 2D, Computer Physics Communications 210 (2017) 29–44. doi:https://doi.org/10.1016/j.cpc.2016.09.009.
- [33]A. Tafuni, J. M. Dominguez, R. Vacondio, A. J. Crespo, A versatile algorithm for the treatment of open boundary conditions in smoothed particle hydrodynamics gpu models, Computer Methods in Applied Mechanics and Engineering 342 (2018) 604–624. doi:10.1016/j.cma.2018.08.004.DOI
- [34]A. Colagrossi, M. Landrini, Numerical simulation of interfacial flows by smoothed particle hydrodynamics, Journal of Computational Physics 191 (2) (2003) 448–475. doi:10.1016/S0021-9991(03)00324–3.DOI
- [35]H.-D. Seo, H.-J. Park, J.-I. Kim, P. S. Lee, The particle-attached element interpolation for density correction in smoothed particle hydrodynamics, Advances in Engineering Software 154 (2021) 102972. doi:10.1016/j.advengsoft.2021.102972.DOI
- [36]P.-N. Sun, A. Colagrossi, S. Marrone, A. Zhang, The δ+-SPH model: Simple procedures for a further improvement of the SPH scheme, Computer Methods in Applied Mechanics and Engineering 315 (2017) 25–49. doi:10.1016/j.cma.2016.10.028.DOI
- [37]P.-N. Sun, A. Colagrossi, S. Marrone, M. Antuono, A. Zhang, Multi-resolution delta-plus-SPH with tensile instability control: Towards high Reynolds number flows, Computer Physics Communications 224 (2018) 63–80. doi:10.1016/j.cpc.2017.11.016.DOI
- [38]P.-N. Sun, C. Pilloton, M. Antuono, A. Colagrossi, Inclusion of an acoustic damper term in weakly-compressible SPH models, Journal of Computational Physics 483 (2023) 112056. doi:10.1016/j.jcp.2023.112056.DOI
- [39]D. Meringolo, A. Colagrossi, S. Marrone, F. Aristodemo, On the filtering of acoustic components in weakly-compressible SPH simulations, Journal of Fluids and Structures 70 (2017) 1–23. doi:10.1016/j.jfluidstructs.2017.01.005.DOI
- [40]R. Vacondio, C. Altomare, M. De Leffe, X. Y. Hu, D. Le Touzé, S. Lind, J.-C. Marongiu, S. Marrone, B. D. Rogers, A. Souto-Iglesias, Grand challenges for smoothed particle hydrodynamics numerical schemes, Computational Particle Mechanics 8 (2021) 575–588. doi:10.1007/s40571-020-00354-1.DOI
- [41]V. Damien, Fluid Mechanics and the SPH Method: Theory and Applications, Oxford University Press, 2012.DOI
- [42]J. P. Morris, P. J. Fox, Y. Zhu, Modeling low reynolds number incompressible flows using SPH, Journal of Computational Physics 136 (1) (1997) 214–226. doi:10.1006/jcph.1997.5776.DOI
- [43]R. H. Cole, Underwater Explosion, Princeton, NJ: Princeton University Press, 1948.
- [44]G. K. Batchelor, An introduction to fluid mechanics, Cambridge University Press, 1974. doi:10.1017/CBO9780511800955.
- [45]J. R. MacDonald, Some simple isothermal equations of state, Reviews of Modern Physics 38 (4) (1966). doi:10.1103/RevModPhys.38.669.DOI
- [46]G. R. Liu, M. B. Liu, Smoothed Particle Hydrodynamics: A Meshfree Particle Method, World Scientific Publishing Company, 2003.
- [47]J. J. Monaghan, J. B. Kajtar, SPH particle boundary forces for arbitrary boundaries, Computer Physics Communications 180 (10) (2009) 1811–1820. doi:10.1016/j.cpc.2009.05.008.DOI
- [48]R. A. Dalrymple, O. Knio, SPH modelling of water waves, in: Coastal dynamics 2001, 2001, pp. 779–787.DOI
- [49]A. J. C. Crespo, M. Gómez-Gesteira, R. A. Dalrymple, Boundary conditions generated by dynamic particles in SPH methods, Computers, Materials, & Continua 5 (3) (2007) 173–184.
- [50]E. Rustico, G. Bilotta, A. Hérault, C. Del Negro, G. Gallo, Advances in multi-GPU smoothed particle hydrodynamics simulations, IEEE Transactions on Parallel and Distributed Systems 25 (1) (2014) 43–52. doi: 10.1109/TPDS.2012.340.DOI
- [51]L. E. Kinsler, A. R. Frey, A. B. Coppens, J. V. Sanders, Fundamental of Acoustics, 4th Edition, John Wiley & Sons, Inc., 2000.
- [52]IEEE Computer Society, IEEE Standard for Floating-Point Arithmetic, IEEE, 2019. doi:10.1109/IEEESTD.2019.8766229.DOI
- [53]W. G. Horner, A new method of solving numerical equations of all orders, by continuous approximation, Philosophical Transactions of the Royal Society of London 109 (1819) 308–335. doi:10.1098/rstl.1819.0023.DOI
- [54]K. M. T. Kleefsman, G. Fekken, A. E. Veldman, B. Iwanowski, B. Buchner, A volume-of-fluid based simulation method for wave impact problems, Journal of Computational Physics 206 (1) (2005) 363–393. doi:10.1016/j.jcp.2004.12.007.DOI
- [55]E.-S. Lee, D. Violeau, R. Issa, S. Ploix, Application of weakly compressible and truly incompressible SPH to 3-D water collapse in waterworks, Journal of Hydraulic Research 48 (sup1) (2010) 50–60. doi:10.1080/00221686.2010.9641245.DOI
- [56]M. Antuono, A. Colagrossi, S. Marrone, Numerical diffusive terms in weakly-compressible sph schemes, Computer Physics Communications 183 (12) (2012) 2570–2580. doi:10.1016/j.cpc.2012.07.006.DOI
- [57]P. Omidvar, P. K. Stansby, B. D. Rogers, Wave body interaction in 2D using smoothed particle hydrodynamics (sph) with variable particle mass, International Journal for Numerical Methods in Fluids 68 (6) (2012) 686–705. doi:10.1002/fld.2528.DOI
- [58]M. Antuono, A. Colagrossi, S. Marrone, D. Molteni, Free-surface flows solved by means of SPH schemes with numerical diffusive terms, Computer Physics Communications 181 (3) (2010) 532–549. doi:10.1016/j.cpc.2009.11.002.DOI
- [59]A. Colagrossi, B. Bouscasse, M. Antuono, S. Marrone, Particle packing algorithm for sph schemes, Computer Physics Communications 183 (8) (2012) 1641–1653. doi:10.1016/j.cpc.2012.02.032.DOI
- [60]A. English, J. M. Domínguez, R. Vacondio, A. J. C. Crespo, P. K. Stansby, S. J. Lind, L. Chiapponi, M. Gómez-Gesteira, Modified dynamic boundary conditions (mdbc) for general-purpose smoothed particle hydrodynamics (sph): Application to tank sloshing, dam break and fish pass problems, Computational Particle Mechanics 9 (5) (2022) 1–15. doi:10.1007/s40571-021-00403-3.DOI
- [61]G. Fourtakas, J. M. Domínguez, R. Vacondio, B. D. Rogers, Local uniform stencil (lust) boundary condition for arbitrary 3-d boundaries in parallel smoothed particle hydrodynamics (sph) models, Computers & Fluids 190 (2019) 346–361. doi:10.1016/j.compfluid.2019.06.009.DOI
- [62]G. Bilotta, From GPU to CPU (and beyond): extending hardware support in GPUSPH through a SYCL-inspired interface, Concurrency and Computation: Practice and Experience 37 (2025) e8313. doi:10.1002/cpe.8313.DOI


