1 Introduction

Lagrangian methods, such as the moving particle semi-implicit (MPS) method [1], smoothed particle hydrodynamics (SPH) [2, 3], and the particle finite element method [4, 5] have been applied to various complex flows. For example, Shibata et al. simulated green water on a deck [6, 7], ship motions in rough seas [8], and free-fall lifeboat [9] using the MPS method. **ement erosion during steam generator tube failure accident. Nucl Eng Des 249:132–139. doi: 10.1016/j.nucengdes.2011.08.048 " href="/article/10.1007/s40571-015-0039-6#ref-CR10" id="ref-link-section-d64226574e2238">10] simulated droplet im**ement for erosion of steam generator tubes using the MPS-for-all-speed-flow method [11]. Tsukamoto et al. [12] used the MPS method to investigate the effects of an elastically-linked body on tank sloshing. Lee et al. [13] used the MPS method for simulating liquid-entry and slamming problems in two dimensions.

Various numerical models have also been developed for the MPS method. For example, Shibata et al. [14] developed a transparent boundary condition for open boundaries to simulate nonlinear water waves using the MPS method. Algorithms for suppressing the pressure oscillations in the MPS method were developed by Kondo and Koshizuka [15], Hibi and Yabushita [16], Tanaka and Masunaga [17], Khayyer and Gotoh [1820], Lee et al. [21] and Tamai and Koshizuka [22]. Tanaka et al. [23] proposed a multi-resolution technique for the MPS method. Suzuki et al. [24] developed the Hamiltonian moving particle semi-implicit method, and showed excellent performance in conserving mechanical energy.

There has also been much progress with SPH and the particle finite element method. For example, Kajtar and Monaghan [25, 26] simulated the motion of three linked ellipses through a viscous fluid in two dimensions using SPH. Khayyer et al. [27] proposed a corrected incompressible SPH for accurately tracking the water surface in breaking waves. They also performed enhanced wave impact simulations using the improved incompressible SPH [28]. Antuono et al. [29, 30] simulated free-surface flows using SPH schemes with numerical diffusive terms. They showed that the diffusive terms enabled reducing the high-frequency numerical acoustic noise and smoothing of the pressure field. Cleary [31] extended SPH to fluid phenomena in low-pressure die casting, in which he simulated the solidification and freezing of an injected metal. Idelsohn et al. [32] simulated multi-fluid flows using the particle finite element method. They demonstrated the mixing of fluids with different densities. Lagrangian methods have therefore been studied actively.

Fig. 1
figure 1

Schematic of free-surface boundary. a Standard pressure calculation; b improved pressure calculation

In this study, we develop a practical technique for calculating pressure and pressure gradient for the MPS method. In the standard MPS method, Dirichlet boundary conditions are applied directly to free-surface particles. Therefore, particle interactions for the pressure gradient term do not work between free-surface particles, and particles cluster on the free surface. Our proposed technique overcomes this problem by assuming virtual particles over the free surface (Fig. 1). The boundary condition of the virtual particle is different from that of the ghost particle model by Schechter et al. [33] because the virtual particles are considered in the pressure Poisson equations without actually placing virtual particles in the simulation domain. We treat the pressures of the virtual particles as known values. A single liquid-phase flow is simulated considering the pressure of virtual particles. A new technique for detecting surface particles also was developed and used for accurately imposing the free-surface boundary condition. Moreover, the developed boundary condition for the pressure Poisson equation enables differences in free-surface pressures to be taken and instances of lower fluid pressures than that of a free surface to be simulated. Such low pressure needs to be considered in many fluid problems in industrial fields. For example, hydrofoil wings and blenders generate low pressure. However, it has been difficult for the MPS method to simulate pressures below that over a free surface because the simulations become unstable in some instances. Hence, such pressures are usually set to zero in MPS simulations. The boundary condition we developed overcomes this problem. A single-layer wall model also was developed to reduce the number of wall particles. We applied the technique to several problems.

2 MPS method\(^{[1]}\)

2.1 Governing equations

The governing equations of the MPS method are

$$\begin{aligned} \frac{D\rho }{Dt}+\rho \nabla \cdot {\mathop {u}\limits ^{\rightharpoonup }}=0 \end{aligned}$$
(1)

and

$$\begin{aligned} \rho \frac{D{\mathop {u}\limits ^{\rightharpoonup }}}{Dt}=-\nabla P+\mu \nabla ^{2}{\mathop {u}\limits ^{\rightharpoonup }} +\rho \vec {g}. \end{aligned}$$
(2)

Equations (1) and (2) are the conservation equations representing the mass and momentum for incompressible flows. Numerical diffusion arising from the discretization of the convection term does not occur because we use a fully Lagrangian description.

2.2 Particle approximations

In the MPS method, the governing equations are discretized by replacing the differential operators with the gradient and Laplacian models

$$\begin{aligned} \left\langle {\nabla \phi } \right\rangle _{i}=\frac{d}{n^{0}}\sum \limits _{j\ne i} {\left[ {\frac{\phi _{j}-\phi _{i}}{\left| {\vec {r}_{j}-\vec {r}_{i}} \right| ^{2}}\left( {\vec {r}_{j}-\vec {r}_{i}} \right) w\left( {\left| {\vec {r}_{j}-\vec {r}_{i}} \right| } \right) } \right] } \end{aligned}$$
(3)

and

$$\begin{aligned} \left\langle {\nabla ^{2}\phi } \right\rangle _{i}=\frac{2d}{n^{0}\lambda ^{0}}\sum \limits _{j\ne i} {\left( {\phi _{j}-\phi _{i}} \right) w\left( {\left| {\vec {r}_{j}-\vec {r}_{i}} \right| } \right) } , \end{aligned}$$
(4)

where \(w\) is a weight function given by

$$\begin{aligned} w(r)=\left\{ {\begin{array}{cc} \left( {\frac{r_e}{r}} \right) -1&{}\quad (r<r_e ) \\ 0&{}\quad (r\ge r_e ) \\ \end{array}} \right. . \end{aligned}$$
(5)

The particle number density is calculated with the above weight function as

$$\begin{aligned} n_{i}=\sum \limits _{j\ne i} {w\left( {\left| {\vec {r}_{j}-\vec {r}_{i}} \right| } \right) } . \end{aligned}$$
(6)

The particle number density has two interpretations: one is the value proportional to the fluid density and the other is the normalization factor of the weighted average. The particle number density of internal fluid region should be constant to satisfy the mass conservation equation, Eq. (1). The parameter \(n^{0}\) denotes the constant particle number density. The restraint condition for the particle number density is implicitly included in the pressure Poisson equation, to be discussed in the next section.

The parameter \(\lambda ^{0}\) in Eq. (4) is a constant given by

$$\begin{aligned} \lambda ^{0}=\frac{\sum \limits _{j\ne \hat{{i}}} {\left| {\vec {r}_{j}^{0}-\vec {r}_{\hat{{i}}}^{0}} \right| ^{2}w\bigg ( {\left| {\vec {r}_{j}^{0}-\vec {r}_{\hat{{i}}}^{0}} \right| } \bigg )}}{\sum \limits _{j\ne i} {w\bigg ( {\left| {\vec {r}_j^{0}-\vec {r}_{\hat{{i}}}^{0}} \right| } \bigg )}}, \end{aligned}$$
(7)

where the index of \(\hat{{i}}\) is the identification number of a particle located at internal region in fluid at the initial time step. This \(\lambda ^{0}\) is used as a common value among particles. This parameter corrects the variance increase of the Laplacian model so that the variance agrees with that of the analytical solution.

2.3 Algorithm for incompressible flow

The MPS method uses a semi-implicit algorithm. With the exception of the pressure gradient terms, the momentum conservation equations are explicitly (at time step \(k\)) solved in the first phase. The Poisson equation for pressure is then implicitly (at time step \(k + 1\)) solved in the second phase. The following Poisson equation for pressure is deduced from the implicit mass conservation equation and the implicit pressure gradient term:

$$\begin{aligned} \left\langle \nabla ^{2}P\right\rangle ^{k+1}_{i}=-\frac{\rho }{\Delta t^{2}}\frac{{n^{*}_{i}}-n^{0}}{n^{0}}, \end{aligned}$$
(8)

where \(n_{i}^{*}\) is the temporary particle number density after the explicit phase. The Laplacian operator on the left-hand side of Eq. (8) is discretized with the Laplacian model, Eq. (4). The right-hand side of Eq. (8) represents the source term, which is expressed as the deviation of the temporary particle number density from the constant particle number density, \(n^{0}\); this is calculated in the initial particle arrangement using

$$\begin{aligned} n^{0}=\sum \limits _{j\ne \hat{{i}}} {w\left( {\left| {\vec {r}_j^{0}-\vec {r}_{\hat{{i}}}^{0}} \right| } \right) } , \end{aligned}$$
(9)

and is used as a common value among particles until the end of the simulation. Consequently, we obtain simultaneous linear equations from Eq. (8) and solve them using the conjugate gradient method.

This semi-implicit algorithm is similar to that of the finite volume method for incompressible flow. However, the right-hand side of the Poisson equation for pressure is different. We use the deviation of the particle number density in Eq. (8), whereas the velocity divergence is used in the finite volume method. For further details of the MPS method, see Khayyer and Gotoh [20], Koshizuka [34], Kondo and Koshizuka [15], Koshizuka and Oka [1], Lee et al. [13], and Tanaka and Masunaga [17].

2.4 Standard pressure calculation of the MPS method for free-surface flows

In the standard MPS simulation [1], there are no particles over the fluid surface. Therefore, the particle number density around a free surface is lower than the standard particle number density, \(n^{0}\). Using this feature, particles whose particle number density is below \(\alpha n^{0}\) are regarded as surface particles in the original free-surface boundary condition, where \(\alpha \) is a constant scalar parameter \(\left( {0<\alpha \le 1} \right) \) and 0.97 is often used for \(\alpha \). Dirichlet boundary conditions are directly applied to the surface particles to solve the pressure Poisson equation. Therefore, particle interactions for the pressure gradient term do not work between free-surface particles, and particles cluster on the free surface. Moreover, internal particles are sometimes mistakenly regarded as surface particles because of the method for detecting surface particles. As a result, the pressure distribution oscillates.

Pressures below that of a free surface are reset to zero to avoid unnatural low pressure around free surfaces. Because of this, it is impossible to simulate such low pressures using the original boundary condition.

3 Improved pressure calculation

We now improve the pressure calculation of the MPS method to mitigate pressure oscillation and particle clustering on a free surface, express differences between free-surface pressures, and simulate these low pressures below those of a free surface. Specifically, we modify the pressure Poisson equation and the pressure gradient term by assuming that there are virtual particles over the free surface (Fig 1). Although virtual particles are drawn in Fig. 1 to explain the concept, we do not need to actually locate, generate or move virtual particles because the effects of these particles are considered only mathematically by introducing some assumptions. This is an advantage of the virtual particles. Moreover, we develop a new method for accurately detecting A-type liquid surface particles on the free surface (see Fig. 1), which enables us to impose the free-surface boundary condition accurately. The A-type particle surface has a thickness of just one particle.

We apply our modified pressure Poisson equation to the surface liquid particles (A-type and B-type) shown in Fig. 1b, where B-type particles are particles whose \(n^{*}\) is smaller than \(n^{0}\), and the distance from the nearest A-type particles is shorter than \(2.1l_{0}\). The details are mentioned in the following sections.

3.1 Pressure Poisson equation

In the standard MPS method [1], the Poisson equation for pressure is given by Eq. (8). Using the Laplacian model of the MPS method given by Eq. (4), Eq. (8) is discretized as

$$\begin{aligned}&\frac{2d}{\lambda ^{0}n^{0}}\sum \limits _{j\ne i} {\left( {P_j^{k+1} -P_i^{k+1}} \right) } w\left( {\left| {\vec {r}_{j}^{*}-\vec {r}_{i}^{*}} \right| } \right) \nonumber \\&\quad =-\gamma \frac{\rho ^{0}}{\left( {\Delta t} \right) ^{2}}\frac{\left( {n_i^*-n^{0}} \right) }{n^{0}}, \end{aligned}$$
(10)

where \(\gamma \) is a scalar parameter for stabilizing the simulation. The parameter \(\rho ^{0}\) is the initial fluid density, which is a common value of particles. When the \(i\)-th particle is an A- or B-type surface particle, we can assume that virtual particles are located over the free surface (Fig 1b). Therefore, in this case, we divide the left-hand side of Eq. (10) into two terms for the actual particles and virtual particles as follows:

$$\begin{aligned}&\frac{2d}{\lambda ^{0}n^{0}}\sum \limits _{j\ne i} {\left( {P_j^{k+1} -P_i^{k+1}} \right) } w\left( {\left| {\vec {r}_{j}^{*}-\vec {r}_{i}^{*}} \right| } \right) \nonumber \\&\quad +\frac{2d}{\lambda ^{0}n^{0}}\left( {P_{virtual} -P_i^{k+1}} \right) n_{i,virtual} \nonumber \\&\quad =-\gamma \frac{\rho ^{0}}{\left( {\Delta t} \right) ^{2}}\frac{\left( {n_i^*-\tilde{n}_{i}^{k}} \right) }{n^{0}} . \end{aligned}$$
(11)

The first term on the left-hand side of Eq. (11) is the summation for actual neighboring particles around the \(i\)-th particle, while the second is the term due to the virtual neighboring particles. We assume that the pressure of the virtual particles is a constant, \(P_{virtual} \). The parameter, \(n_{i,virtual} \), is the particle number density for the virtual particles defined as

$$\begin{aligned} n_{i,virtual} \equiv \max \left\{ {n^{0}-n_i^*,0} \right\} . \end{aligned}$$
(12)

By using the assumption of Eq. (12), we do not need to actually locate or move virtual particles. To simply express equations, the term for compressibility of fluid that is used in the usual MPS simulations [1, 17] is not written in Eqs. (10) and (11), although the term was added in the actual simulation of this study.

For the pressure Poisson equation, we apply Dirichlet boundary conditions only to the virtual particles. Therefore, the pressure of actual free-surface particles is not fixed to the gas-phase pressure. As a result, particle clustering is suppressed because of the particle interaction based on the pressure difference between free-surface particles. Moreover, compared with the standard pressure calculation, the second term on the left-hand side of Eq. (11) increases the free-surface particle pressure by about \({\rho g\sqrt{\lambda ^{0}}}/2\). This pressure increment has the effect of sustaining free-surface particles at a certain water level using the modified pressure gradient model to be described below. When we need to compare pressures obtained from simulations with those of the analytical solution or experimental data, we need to subtract the simulated pressure by \({\rho g\sqrt{\lambda ^{0}}}/2\). We use Eq. (11) for both A- and B-type surface liquid particles. For the other particles, we use Eq. (11) without the second term on the left-hand side.

Compared with Eq. (10), the right-hand side of Eq. (11) was modified by the following approximation based on Eq. (1):

$$\begin{aligned} \nabla \cdot \mathbf{u}_i^*=-\frac{1}{\rho ^{0}}\frac{D\rho _{i}}{Dt}\cong -\frac{1}{\frac{n^{0}}{V_e}}\frac{\left( {\frac{n_i^*}{V_e}-\frac{\tilde{n}_{i}^{k}}{V_e}} \right) }{\Delta t}=-\frac{1}{\Delta t}\frac{\left( {n_i^*-\tilde{n}_{i}^{k}} \right) }{n^{0}}, \end{aligned}$$
(13)

where \(\tilde{n}_{i}^{k} \) is the standard number density of the \(i\)-th particle at the time step \(k\). To produce stable simulations, we use instead of \(n^{0}\) particle number density \(\tilde{n}_{i}^{k} \),

$$\begin{aligned} \tilde{n}_{i}^{k} =\left\{ {{\begin{array}{cc} n^{0}&{}\quad if\;n_{i}^{k} \ge n^{0} \\ n_i^k&{} \quad otherwise \\ \end{array}}} \right. . \end{aligned}$$
(14)

Hence, if \(n_{i}^{k} \) is greater than \(n^{0},\, n^{0}\) is used for \(\tilde{n}_{i}^{k} \) to prevent the fluid-volume compression, otherwise, \(n_{i}^{k} \) is used. When we need to treat pressures below that for the free-surface particles, we use the following \(\tilde{n}_{i}^{k} \):

$$\begin{aligned} \tilde{n}_{i}^{k} =\left\{ {{\begin{array}{cl} n^{0}&{} \quad if\;n_{i}^{k} \ge n^{0}\\ C_s n^{0}&{}\quad if\;n_{i}^{k} \le n_i^{k-1} \;and\; n_{i}^{k} \le \alpha n^{0}\\ n_{i}^{k} &{} \quad otherwise\\ \end{array}}} \right. , \end{aligned}$$
(15)

where \(C_s \) is a scalar parameter \((0<C_s \le 1)\); in this study, 1.0 was used for \(C_s \). The density,\(C_s n^{0}\), provides a lower limit in the particle number density and prevents occurrence of unnatural cavities in the fluid. Equation (15) is applied to internal particles, whereas Eq. (14) is applied to A- and B-type surface particles.

In the standard MPS method, 0.2 is often used for \(\gamma \) in Eq. (10). In this study, 0.05 and 0.10 were used for \(\gamma \) of fluid and wall particles, respectively, to suppress pressure oscillations. The values of \(\gamma \) were empirically determined. Although it is not necessary to frequently change \(\gamma \) depending on circumstances, the following ineq uality gives a guideline for setting \(\gamma \):

$$\begin{aligned} 1\ge \gamma \ge \left| {\frac{n^{**}-n^{0}}{n^{0}}} \right| ^{-1}\frac{\left( {\Delta t} \right) ^{2}d}{\sqrt{\lambda ^{0}}}\left| {\frac{1}{\rho ^{0}}\nabla P} \right| _{\max } >0, \end{aligned}$$
(16)

where \(n^{**}\) is the permissible upper limit of temporal particle number density (\(n^{**}>n^{0})\) after the explicit phase of the MPS method, and \(\left| {\frac{1}{\rho ^{0}}\nabla P} \right| _{\max } \) is the expected maximum acceleration due to pressure gradient term on wall boundaries.

3.2 Modified pressure gradient calculation

Based on Eq. (3), the pressure gradient term in the Navier-Stokes equation is discretized as follows:

$$\begin{aligned} \left\langle {\nabla P} \right\rangle _{i}=\frac{d}{n^{0}}\sum \limits _{j\ne i} {\frac{P_{j} -P_{i}}{\left| {\vec {r}_{j}-\vec {r}_{i}} \right| ^{2}}\left( {\vec {r}_{j}-\vec {r}_{i}} \right) w\left( {\left| {{\vec {r}_{j}} -{\vec {r}_{i}}} \right| } \right) } . \end{aligned}$$
(17)

To avoid instabilities in simulations arising from the attractive forces described in Eq. (17), the following pressure gradient is often used in the standard MPS method:

$$\begin{aligned} \left\langle {\nabla P} \right\rangle _{i}=\frac{d}{n^{0}}\sum \limits _{j\ne i} {\frac{P_{j}-\hat{{P}}_i}{\left| {\vec {r}_{j}-\vec {r}_{i}} \right| ^{2}}\left( {\vec {r}_{j}-\vec {r}_{i}} \right) w\left( {\left| {\vec {r}_{j}-\vec {r}_{i}} \right| } \right) } , \end{aligned}$$
(18)

where \(\hat{{P}}_i\), the minimum pressure around the \(i\)-th particle, is defined as:

$$\begin{aligned} \hat{{P}}_{i}=\min \left\{ {\;P_{i},P_{j}\;\left| {\;\left| {\vec {r}_{j}-\vec {r}_{i}} \right| \le r_e} \right. } \right\} . \end{aligned}$$
(19)

Equation (18) is derived from Eq. (17) assuming Eq. (21):

$$\begin{aligned}&\left\langle {\nabla P} \right\rangle _{i}\cong \frac{d}{n^{0}}\sum \limits _{j\ne i} {\frac{P_{j}-P_{i}}{\left| {\vec {r}_{j}-\vec {r}_{i}} \right| ^{2}}\left( {\vec {r}_{j}-\vec {r}_{i}} \right) w\left( {\left| {\vec {r}_{j}-\vec {r}_{i}} \right| } \right) }\nonumber \\&\qquad +\left( {P_{i}\!-\!\phi _{i}} \right) \frac{d}{n^{0}}\sum \limits _{j\ne i} {\frac{1}{\left| {\vec {r}_{j}\!-\!\vec {r}_{i}} \right| ^{2}}\left( {\vec {r}_{j}\!-\!\vec {r}_{i}} \right) w\left( {\left| {\vec {r}_{j}\!-\!\vec {r}_{i}} \right| } \right) }\nonumber \\&\quad =\frac{d}{n^{0}}\sum \limits _{j\!\ne \! i} {\frac{\left\{ {P_{j}\!+\!\left( {P_{i}\!-\!\phi _{i}} \right) } \right\} \!-\!P_{i}}{\left| {\vec {r}_{j}\!-\!\vec {r}_{i}} \right| ^{2}}\left( {\vec {r}_{j}-\vec {r}_{i}} \right) w\left( {\left| {\vec {r}_{j}-\vec {r}_{i}} \right| } \right) }\nonumber \\&\quad =\frac{d}{n^{0}}\sum \limits _{j\ne i} {\frac{P_{j}-\phi _{i}}{\left| {\vec {r}_{j}-\vec {r}_{i}} \right| ^{2}}\left( {\vec {r}_{j}-\vec {r}_{i}} \right) w\left( {\left| {\vec {r}_{j}-\vec {r}_{i}} \right| } \right) } , \end{aligned}$$
(20)
$$\begin{aligned}&\frac{1}{n^{0}}\sum \limits _{j\ne i} {\frac{1}{\left| {\vec {r}_{j}-\vec {r}_{i}} \right| ^{2}}\left( {\vec {r}_{j}-\vec {r}_{i}} \right) w\left( {\left| {\vec {r}_{j}-\vec {r}_{i}} \right| } \right) } \cong \vec {0}, \end{aligned}$$
(21)

where \(\phi _{i}\) is an arbitrary scalar parameter of \(i\)-th particle and \(\hat{{P}}_{i}\) is used for \(\phi _{i}\) in the standard MPS method. In Eq. (21), it is assumed that neighboring particles of the \(i\)-th particle are arranged isotropically.

In this study, the following modified gradient model, which was derived by applying the \(\tilde{P}_{i}\) for \(\phi _{i}\) in Eq. (20), was used for all the particles.

$$\begin{aligned} \left\langle {\nabla P} \right\rangle _{i}= & {} \frac{d}{n^{0}}\sum \limits _{j\ne i} {\frac{P_{j}-\tilde{P}_{i}}{\left| {\vec {r}_{j}-\vec {r}_{i}} \right| ^{2}}\left( {\vec {r}_{j}-\vec {r}_{i}} \right) w\left( {\left| {\vec {r}_{j}-\vec {r}_{i}} \right| } \right) } , \end{aligned}$$
(22)
$$\begin{aligned} \tilde{P}_{i}= & {} \min \left\{ {\;P_{i},P_{j},P_{virtual} \;\left| {\;\left| {\vec {r}_{j}-\vec {r}_{i}} \right| \le r_e} \right. } \right\} . \end{aligned}$$
(23)

Compared with Eq. (17) and Eq. (18), Eq. (22) maintains particle distance to the initial value because the repulsive force from the neighboring \(j\)-th particle is virtually increased by increasing its pressure by \(P_{i}-\tilde{P}_{i}\) as shown in the second line of Eq. (20). If \(P_{virtual} =0\,\hbox {Pa}\) and \(P_{j},P_{i}\ge 0\), Eq. (22) agrees with the following gradient model:

$$\begin{aligned} \left\langle {\nabla P} \right\rangle _{i}=\frac{d}{n^{0}}\sum \limits _{j\ne i} {\frac{P_{j}}{\left| {\vec {r}_{j}-\vec {r}_{i}} \right| ^{2}}\left( {\vec {r}_{j}-\vec {r}_{i}} \right) w\left( {\left| {\vec {r}_{j}-\vec {r}_{i}} \right| } \right) } . \end{aligned}$$
(24)

On free surfaces, presuming approximation Eq. (21), which was used for the derivation of Eq. (24), holds true, is not viable because there is no particle above the free surface. However, by using the concept of virtual particles, we can obtain the same equation as Eq. (24) for free-surface particles. This is discussed below. By assuming that there are virtual particles over the free surface and they are arranged isotropically, we assume the following approximation to express the pressure gradient of \(i\)-th particle [Eq. (17)], which is located around the free surface.

$$\begin{aligned} \left\langle {\nabla P} \right\rangle _{i}= & {} \frac{d}{n^{0}}\mathop {\mathop {\sum }\limits _{j\ne i}}\limits _{j\notin S_{virtual}}{\frac{\left( {P_{j}-P_{i}} \right) }{\left| {\vec {r}_{j}-\vec {r}_{i}} \right| ^{2}}\left( {\vec {r}_{j}-\vec {r}_{i}} \right) w\left( {\left| {\vec {r}_{j}-\vec {r}_{i}} \right| } \right) }\nonumber \\&+\frac{d}{n^{0}}\mathop {\mathop {\sum }\limits _{j\ne i}}\limits _{j\in S_{virtual}} {\frac{\left( {P_{virtual} -P_{i}} \right) }{\left| {\vec {r}_{j}\!-\!\vec {r}_{i}} \right| ^{2}}\left( {\vec {r}_{j}\!-\!\vec {r}_{i}} \right) w\left( {\left| {\vec {r}_{j}\!-\!\vec {r}_{i}} \right| } \right) }.\nonumber \\ \end{aligned}$$
(25)

We now suppose that neighboring particles including virtual and actual particles are arranged isotropically around the \(i\)-th particle. Then, we can assume the same approximation as for Eq. (21). Indeed, the left-hand side of Eq. (21) can be divided into two terms for actual particles and virtual particles as follows:

$$\begin{aligned}&\frac{1}{n^{0}}\mathop {\mathop {\sum }\limits _{j\ne i}}\limits _{j\notin S_{virtual}}{\frac{\left( {\vec {r}_{j}-\vec {r}_{i}} \right) }{\left| {\vec {r}_{j}-\vec {r}_{i}} \right| ^{2}}w\left( {\left| {\vec {r}_{j}-\vec {r}_{i}} \right| } \right) }\nonumber \\&\quad +\frac{1}{n^{0}}\mathop {\mathop {\sum }\limits _{j\ne i}}\limits _{j\in S_{virtual}}{\frac{\left( {\vec {r}_{j}-\vec {r}_{i}} \right) }{\left| {\vec {r}_{j}-\vec {r}_{i}} \right| ^{2}}w\left( {\left| {\vec {r}_{j}-\vec {r}_{i}} \right| } \right) } \cong \vec {0}. \end{aligned}$$
(26)

Therefore, the summation for the virtual particles is expressed by that for actual particles as follows:

$$\begin{aligned}&\frac{1}{n^{0}}\mathop {\mathop {\sum }\limits _{j\ne i}}\limits _{j\in S_{virtual}} {\frac{\left( {\vec {r}_{j}-\vec {r}_{i}} \right) }{\left| {\vec {r}_{j}-\vec {r}_{i}} \right| ^{2}}w\left( {\left| {\vec {r}_{j}-\vec {r}_{i}} \right| } \right) } \cong \nonumber \\&\quad -\frac{1}{n^{0}}\mathop {\mathop {\sum }\limits _{j\ne i}}\limits _{j\notin S_{virtual}} {\frac{\left( {\vec {r}_{j}-\vec {r}_{i}} \right) }{\left| {\vec {r}_{j}-\vec {r}_{i}} \right| ^{2}}w\left( {\left| {\vec {r}_{j}-\vec {r}_{i}} \right| } \right) } . \end{aligned}$$
(27)

Substituting Eq. (27) into the second term on the right-hand side of Eq. (25), we obtain the following equation:

$$\begin{aligned} \left\langle {\nabla P} \right\rangle _{i}= & {} \frac{d}{n^{0}}\mathop {\mathop {\sum }\limits _{j\ne i}}\limits _{j\notin S_{virtual}}{\frac{\left( {P_{j}-P_{i}} \right) }{\left| {\vec {r}_{j}-\vec {r}_{i}} \right| ^{2}}\left( {\vec {r}_{j}-\vec {r}_{i}} \right) w\left( {\left| {\vec {r}_{j}-\vec {r}_{i}} \right| } \right) }\nonumber \\&-\frac{d}{n^{0}}\mathop {\mathop {\sum }\limits _{j\ne i}}\limits _{j\notin S_{virtual}} {\frac{\left( {P_{virtual} -P_{i}} \right) }{\left| {\vec {r}_{j}\!-\!\vec {r}_{i}} \right| ^{2}}\left( {\vec {r}_{j}\!-\!\vec {r}_{i}} \right) w\left( {\left| {\vec {r}_{j}\!-\!\vec {r}_{i}} \right| } \right) }.\nonumber \\ \end{aligned}$$
(28)

By combining the summations, we obtain the following modified gradient model for pressure:

$$\begin{aligned} \left\langle {\nabla P} \right\rangle _{i}\!=\!\frac{d}{n^{0}}\mathop {\mathop {\sum }\limits _{j\ne i}}\limits _{j\notin S_{virtual}}{\frac{\left( {P_{j}-P_{virtual}} \right) }{\left| {\vec {r}_{j}\!-\!\vec {r}_{i}} \right| ^{2}}\left( {\vec {r}_{j}\!-\!\vec {r}_{i}} \right) w\left( {\left| {\vec {r}_{j}\!-\!\vec {r}_{i}} \right| } \right) } . \end{aligned}$$
(29)

For \(P_{virtual} =0\,\hbox {Pa}\), we obtain the following model, which agrees with Eq. (24),

$$\begin{aligned} \left\langle {\nabla P} \right\rangle _{i}=\frac{d}{n^{0}}\mathop {\mathop {\sum }\limits _{j\ne i}}\limits _{j\notin S_{virtual}}{\frac{P_{j}}{\left| {\vec {r}_{j}-\vec {r}_{i}} \right| ^{2}}\left( {\vec {r}_{j}-\vec {r}_{i}} \right) w\left( {\left| {\vec {r}_{j}-\vec {r}_{i}} \right| } \right) } . \end{aligned}$$
(30)

If particles are not arranged isotropically or located on the free surface, the gradient model of Eq. (24) for these particles does not have first-order accuracy because of the assumptions on particle arrangement that have been introduced. However, the benefits of this model are that it is simple, easy to implement in program code, and maintains particle spacing between particles.

3.3 Single-layer wall model

There are various ways to express wall boundaries for particle methods [21, 3539]. In usual MPS simulations, a wall boundary consists of a double layer of wall particles, with its associated pressure parameter, and a double layer of dummy wall particles, which have no pressure parameter and are used only for calculating particle number densities of wall particles. This increases the number of particles, the computational time and the needed size of memory. To solve this problem, we developed a technique which allows us to represent a wall boundary by a single layer of wall particles. The details are given in the following.

First, to find the contribution to the particle number density from outer dummy wall particles without actually locating the dummy wall particles, we add the following particle number density, \(n_{i,correction} \), to those of all the wall particles:

$$\begin{aligned} n_{i,correction} \equiv \left( {n^{0}-n_{i,wall}^0} \right) C_{shape}, \end{aligned}$$
(31)

where \(n_{i,wall}^0 \) is the particle number density of \(i\)-th wall particle calculated at the initial time step considering only wall particles as follows:

$$\begin{aligned} n_{i,wall}^0 =\mathop {\mathop {\sum }\limits _{j\ne i}}\limits _{j\in S_{wall}}{w\bigg ( {\left| {\vec {r}_j^{0}-\vec {r}_i^{0}} \right| } \bigg )} . \end{aligned}$$
(32)

The scalar parameter \(C_{shape} \) characterizes the wall shape. In this study, we assumed that the wall can be locally approximated as a plane, using a value of 0.5 for \(C_{shape} \) to simplify the problem.

Moreover, to prevent penetration of fluid particles through the walls, the following vector \(\vec {b}_{i}\) was added to the pressure gradient term (Eq. (22)) of the \(i\)-th fluid particle located within \(1.0l_{0}\) from a wall:

$$\begin{aligned}&\vec {b}_{i}=\frac{d}{n^{0}}\mathop {\mathop {\sum }\limits _{j\ne i}}\limits _{j\in S_{wall}} \frac{P_{j}}{\left| {\vec {r}_{j,virtual} -\vec {r}_{i}} \right| ^{2}}\nonumber \\&\quad \left( {\vec {r}_{j,virtual} -\vec {r}_{i}} \right) w\left( {\left| {\vec {r}_{j,virtual} -\vec {r}_{i}} \right| } \right) . \end{aligned}$$
(33)

The vector, \(\vec {r}_{j,virtual} \), in the above equation is the position of a virtual wall particle which is located behind \(j\)-th wall particle and was simply calculated from:

$$\begin{aligned} \vec {r}_{j,virtual} =\vec {r}_{j}-l_0 \vec {n}_{\bot j} . \end{aligned}$$
(34)

where \(\vec {n}_{\bot j} \) is the normal vector of the actual \(j\)-th wall particle. To simplify the problem in calculating Eq. (33), we assume that the virtual wall particle has the same pressure as that of the \(j\)-th wall particle,\(P_{j}\). Therefore, it is not necessary to calculate or interpolate the pressure for the virtual wall particles. Moreover, it is not necessary to record the positions of these particles because they are calculated by Eq. (34). These make the difference from techniques of early studies [21, 3539] based on ghost particles or mirror particles. The virtual particle of the \(j\)-th wall particle is considered also in the calculation of the particle number density of fluid particles around the wall boundary.

However, some splashed fluid particles can penetrate a wall in three-dimensional simulations. To prevent this, we used as an exceptional procedure a penalty force, which is often used in the discrete element method [40], for penetrating particles located within \(0.30l_{0}\) from a wall.

3.4 Detection of surface particles

Surface particles need to be detected to impose Dirichlet boundary conditions on the pressure Poisson equation, and is important in accurately imposing boundary effects. There are various ways to detect boundary particles for particle methods [1, 5, 17, 21, 4143]. In the standard MPS method [1], particles whose particle number density is below \(\alpha n^{0}\) are regarded as surface particles. However, in some cases, internal particles are mistakenly identified as surface particles using this method. Hence, we developed a new and accurate surface detection method using a virtual light source and virtual screen. We explain its details in the following.

3.4.1 Two-dimensional simulation

Fig. 2
figure 2

Our surface detection method in two dimensions. The colored area denotes a region under the free surface. (Color figure online)

Figure 2 shows a schematic of the surface detection method we have developed for two-dimensional simulations. To judge whether the \(i\)-th particle is on the surface, we use a virtual light source and a virtual screen. The shape of this screen in two dimensions is a circle whose radius is \(2.1l_{0}\). The radius is empirically determined. The centers of the screen and source are located on the center of the \(i\)-th particle. If the \(i\)-th particle is on the surface, most of the area of the screen is illuminated by the source, although some area is in the shadow of neighboring particles. The fraction of the area illuminated on the screen is denoted by \(R_{illuminated} \). If \(R_{illuminated} \) is over a threshold, the particle is regarded as a surface particle. If not, the particle is regarded as an internal particle. We have empirically determined the threshold to be 1/6. To exclude narrow gaps between particles, small illuminated areas whose subtended angle is smaller than \(15^{\circ }\) are regarded as shaded areas and are exempt in the calculation of \(R_{illuminated} \). The shaded area of the \(j\)-th neighboring particle is calculated as

$$\begin{aligned} \theta _{i,j} =\left( {\frac{180}{\pi }} \right) \tan ^{-1}\left( {\frac{y_{j}-y_{i}}{x_{j}-x_{i}}} \right) \end{aligned}$$
(35)

and

$$\begin{aligned} \Delta \theta _{i,j} =\left( {\frac{180}{\pi }} \right) 2\tan ^{-1}\left( {\frac{0.5l_0}{\sqrt{\left| {\vec {r}_{j}-\vec {r}_{i}} \right| ^{2}-\left( {0.5l_0} \right) ^{2}}}} \right) , \end{aligned}$$
(36)

where \(\theta _{i,j} \) is the relative angle between the \(i\)-th and \(j\)-th particles, and \(\Delta \theta _{i,j} \) is the subtend angle of the shaded area of the \(j\)-th neighboring particle (Fig. 3). The coefficient, \(\left( {\frac{180}{\pi }} \right) \), converts radians to degrees. When implementing the program, we divide the virtual screen into small segments of \({360^{\circ }}/{N_\Theta }\),where \(N_\Theta \) is the number of small segments, and use a one-dimensional array, \(f_k \,\left( {k=1, 2, 3,\ldots , N_\Theta } \right) \), to calculate the illuminated area. In this study, \(N_\Theta \) was 360. Therefore, each array index \(k\) means the relative direction in degrees, and each array component \(f_k\) has information on whether the segment of the virtual screen is illuminated in that direction. First, all the array values are initially set to 1, where 1 means the segment of the screen is illuminated by the virtual light source. If the \(k\)-th segment is in the shadow of the neighboring particles, \(f_k \) is set to zero. Finally, the illuminated fraction of the area is calculated from:

$$\begin{aligned} R_{illuminated} =\frac{A_{_{illuminated}}}{A_{whole}}=\frac{\Theta \,r_e}{2\pi r_e}=\frac{\Theta }{2\pi }\cong \frac{\sum \limits _{k=1}^{N_\Theta } {f_k}}{N_\Theta }, \end{aligned}$$
(37)

where \(A_{whole} \), and \(A_{illuminated} \) are the whole and illuminated areas of the virtual screen.

Fig. 3
figure 3

Two-dimensional surface detection algorithm using a virtual light source

3.4.2 Three-dimensional simulation

Fig. 4
figure 4

Three-dimensional surface detection algorithm using a virtual light source

We extend the above surface detection method to three-dimensional simulations. The procedure is almost the same as the two-dimensional one. Figure 4 shows the surface detection algorithm in three dimensions. A virtual spherical screen whose radius is \(2.1l_{0}\) is located on the \(i\)-th particle. The screen is divided into small segments in the longitudinal and latitudinal directions whose subtended angles are \(C_\phi \left( {={360^{\circ }}/{N_\phi }} \right) \) and \(C_\theta \left( {={180^{\circ }}/{N_\theta }} \right) \), respectively. In this study, \(N_\phi \) was 36, and \(N_\theta \) was 18. We have determined the segment size empirically by considering the computational cost. In implementing the program, we use a two-dimensional array, \(f_{k,l} \,\left( {k=1, 2, 3,\ldots , N_\phi ;\,l=1, 2, 3,\ldots , N_\theta } \right) \), to calculate the shaded area, where \(k\) and \(l\) are the longitude and latitude divided by \(C_\phi \) and \(C_\theta \), respectively. In the same manner as in the two-dimensional simulation, \(f_{k,l}\) is initialized and a flag is set so that it expresses whether each segment is illuminated; first, all the array values of \(f_{k,l}\) are initially set to 1, where 1 indicates the segment of the screen is illuminated by the virtual light source. If the \(k,l\)-th segment is in the shade of neighboring particles, \(f_{k,l}\) is set to zero. The shaded area of the \(j\)-th neighboring particle is calculated from

$$\begin{aligned}&\theta _{i,j} =\left( {\frac{180}{\pi }} \right) \tan ^{-1}\left( {\frac{y_{j}-y_{i}}{\sqrt{\left( {x_{j}-x_{i}} \right) ^{2}+\left( {z_{j}-z_{i}} \right) ^{2}}}} \right) , \end{aligned}$$
(38)
$$\begin{aligned}&\phi _{i,j} =\left( {\frac{180}{\pi }} \right) \tan ^{-1}\left( {\frac{x_{j}-x_{i}}{z_{j}-z_{i}}} \right) , \end{aligned}$$
(39)
$$\begin{aligned}&\Delta \theta _{i,j} =\left( {\frac{180}{\pi }} \right) 2\tan ^{-1}\left( {\frac{0.5l_0}{\sqrt{\left| {\vec {r}_{j}-\vec {r}_{i}} \right| ^{2}-\left( {0.5l_0} \right) ^{2}}}} \right) , \end{aligned}$$
(40)

and

$$\begin{aligned} \Delta \phi _{i,j} =\left( {\frac{180}{\pi }} \right) 2\tan ^{-1}\left( {\frac{0.5l_0}{\sqrt{\left| {\vec {r}_{j}-\vec {r}_{i}} \right| ^{2}-\left( {0.5l_0} \right) ^{2}}}} \right) , \end{aligned}$$
(41)

where \(\phi _{i,j} \) and \(\theta _{i,j} \) are the longitudinal and latitudinal directions of the shaded area of the \(j\)-th neighbor particle, respectively. The parameters \(\Delta \phi _{i,j} \) and \(\Delta \theta _{i,j} \) are the longitudinal and latitudinal angles of the shaded area of the neighbor particles as shown in Fig. 4. In the above calculation, each shaded area of a neighboring particle is approximated as a quadrilateral to simplify the problem, although its actual shadow is circular.

Finally, the illuminated fraction of the area,\(R_{illuminated} \), is calculated using

$$\begin{aligned} R_{ illuminated} =\frac{S_{ illuminated}}{S_{whole}}\cong \frac{\sum \limits _{l=1}^{N_\theta } {\sum \limits _{k=1}^{N_\phi } {\Big [ {\left\{ {r_e \left( {\frac{\pi }{180}C_\theta } \right) } \right\} \left\{ {r_e \cos \left( {\frac{\pi }{180}C_\theta l} \right) } \right\} \,\left( {\frac{\pi }{180}C_\phi } \right) f_{k,l}} \Big ]}}}{\sum \limits _{l=1}^{N_\theta } {\sum \limits _{k=1}^{N_\phi } {\Big [ {\left\{ {r_e \left( {\frac{\pi }{180}C_\theta } \right) } \right\} \left\{ {r_e \cos \left( {\frac{\pi }{180}C_\theta l} \right) } \right\} \,\left( {\frac{\pi }{180}C_\phi } \right) } \Big ]}}}. \end{aligned}$$
(42)

If \(R_{illuminated} \) is over a preset threshold, the \(i\)-th particle is regarded as a surface particle; if not, the particle is regarded as an internal particle. We have empirically determined the threshold to be 1/5.

3.5 Low-pressure simulation

In the usual MPS simulations using the standard pressure calculation, pressures lower than that of the free-surface particles are reset to zero to avoid unnaturally low pressure around free surfaces and to produce stable simulations. The main reason for the unnaturally low pressure is that there are no particles over free surfaces, and the particle number density around a free surface becomes lower than the standard value, \(n_{0}\). Therefore, it is not possible to simulate pressures below that for the free surfaces using the standard pressure calculation of the MPS method. The improved boundary condition developed in this study allows us to easily simulate such pressures because the right-hand side of pressure Poisson equation, Eq. (11), is improved using \(\tilde{n}_{i}^{k} \), and the unnaturally low pressures around the free surfaces are suppressed. As a matter of course, we do not reset such pressures to zero in low-pressure simulations using our improved pressure calculation.

However, we expect the kinematic energy of the fluid to increase in some low-pressure simulations because of particle oscillations caused by low pressure. This energy increase leads to unstable simulations. To solve this problem, we added an artificial viscosity based on particle collisions [21]. Moreover, if we do not need to simulate pressures below that of the virtual particles, we reset such pressure values to zero to suppress pressure oscillations.

4 Verification analysis

4.1 Hydrostatic pressure problem

4.1.1 Simulation condition

Fig. 5
figure 5

Simulation domain for verifying air pressure effect on particle distribution on free surface

We verified the improved pressure calculation in a hydrostatic pressure problem. Figure 5 shows the simulation domain. The particle distribution and pressure distribution of the improved pressure calculation were compared with those of the standard pressure calculation. The simulated pressure at the bottom center \(p_{1}\) also was compared with the analytical solution.

Table 1 Number of particles for the hydrostatic pressure problem

We set the kinematic viscosity coefficient to \(1.00\times 10^{-6} \hbox {m}^{2}/\hbox {s}\), the fluid mass density to \(1000\,\hbox {kg/m}^{3}\), and the acceleration of gravity to \(10.0\,\hbox {m/s}^{2}\). The compressibility of fluid was \(0.45\times 10^{-9}\, \hbox {1/Pa}\). The simulations were performed in two spatial resolutions, \(l_{0} = 0.012\,\hbox {m}\) and \(0.006\,\hbox {m}\) in two dimensions and three dimensions. Table 1 shows the number of particles. Compared with the standard pressure calculation, the number of particles for the improved pressure calculation was small because each wall boundary was expressed by a single layer of wall particles.

The gas-phase pressure, which means the pressure of virtual particles over free surface, was 0 Pa. The radius of the interaction zone for the gradient model, the Laplacian model and the particle number density was \(2.0l_{0}\). The collision distance in the MPS method was \(0.5l_{0}\). The coefficient of restitution was 0.2. The surface tension was neglected. We did not take pressures lower than the gas-phase pressure into account in this case because such pressures should not occur in this hydrostatic pressure problem; pressures below gas phase pressure were set to the gas phase pressure.

4.1.2 Simulation results

The simulated fluid behavior and pressure distribution (Figs. 67) indicate that the particle distribution of the improved pressure calculation (Fig. 7b) was more uniform than that of the standard pressure calculation (Fig. 6b), and the pressure distribution of the improved pressure calculation (Fig. 7c) had a more natural pressure gradient than that of the standard pressure calculation (Fig. 6c); for the improved pressure calculation, the pressure increased with water depth and was constant in the horizontal direction. This is due to the new surface detection method, the corrections for the virtual particles, and the improvement to the pressure gradient model.

Fig. 6
figure 6

Fluid behavior and pressure distribution using the standard pressure calculation. a \(t = \hbox {0.0 s}\); b \(t =\hbox {10.0 s}\); c \(t = \hbox {10.0 s}\) (pressure distribution)

Fig. 7
figure 7

Fluid behavior and pressure distribution using the improved pressure calculation. a \(t = \hbox {0.0 s}\); b \(t =\hbox {10.0 s}\); c \(t = \hbox {10.0 s}\) (pressure distribution)

An example of the particle distribution around the surface (Fig. 8) shows that particle clustering does not appear for the improved pressure calculation, whereas some particles on the free surface were too close to each other in the standard pressure calculation.

Table 2 Averaged minimum distance between particles
Fig. 8
figure 8

Particle distribution around surface \((l_{0}=\hbox {0.012 m})\). a Standard pressure calculation; b Improved pressure calculation

Table 3 Error for time-averaged pressure at the tank bottom for the hydrostatic pressure problem

Table 2 shows the averaged minimum distance between particles in the hydrostatic pressure problem. In the table, “internal-internal” signifies the average distance between internal particles, whereas “surface-all” signifies the distance between a particle on the free surface and all the other particles. The averaged minimum distance of the improved pressure calculation was longer than that of the standard pressure calculation and it was close to the initial spacing between particles \(l_{0}\). The table quantitatively confirms that the improved pressure calculation suppresses particle clustering around free surfaces.

The time history of the simulated pressure (Fig. 9) at the center of the tank bottom, \(p_{1}\) in Fig. 5, shows that the pressure fluctuation is suppressed by the improved pressure calculation. Table 3 shows the error of the time-averaged pressure at \(p_{1}\). The error is the difference between the simulation results and the analytical solution

$$\begin{aligned} P=\rho gh. \end{aligned}$$
(43)

These data were obtained by time averaging from 8 s to 10 s. From the table, we find that the error in the result using the improved pressure calculation was smaller than that for the result using the standard pressure calculation.

Fig. 9
figure 9

Time history of pressure acting on the center of the tank bottom. a Standard pressure calculation \((l_{0}=\hbox {0.012 m})\); b Improved pressure calculation \((l_{0}=\hbox {0.012 m})\)

Table 4 shows the computation time. The computer used in this study was equipped with the CPU: Intel Core i7-3770 3.4GHz and the main memory:32 GB. A single core was used without parallel computing. From the table, it is found that the computation time of the improved pressure was almost the same as that of the standard pressure calculation if the same radius for the interaction zone was used. This is because the single layer wall model used in the improved pressure calculation reduces the number of wall particles while the new surface detection method slightly increases the computation time. In total, there was no large difference in computation times. Compared with the standard pressure calculation, the improved pressure calculation appears to enable use of a small radius for the interaction zone because pressure oscillations are suppressed. In cases needing use of a large radius for the interaction zone, computation times using the improved pressure technique were shorter than those using standard pressure calculations.

Table 4 Computation times for the hydrostatic pressure problem
Fig. 10
figure 10

Initial water profile for the dam breaking problem

4.2 Dam breaking problem

4.2.1 Simulation settings

The stability of the improved pressure calculation was verified in a three-dimensional dam breaking problem. Figure 10 shows the simulation domain. A water column was set in the initial state. The depth from front to back was 0.12 m. We evaluated the simulated pressure at \(\hbox {p}_{2}\). Parameter settings include the initial spacing between particles of \(5.0\times 10^{-3}\) m, the total number of particles of 109,676, a kinematic viscosity coefficient of \(1.0\times 10^{-6}\,\hbox {m}^{2}/\hbox {s}\) and the acceleration of gravity was \(9.8 \hbox {m/s}^{2}\). The other settings were the same as in Sect. 4.1.1.

4.2.2 Simulation results

Fig. 11
figure 11

Fluid behavior for three-dimensional dam breaking \((l_0 =5.0\times 10^{-3}\hbox {m})\). a Standard pressure calculation; b improved pressure calculation

Figure 11 shows the simulated fluid behaviors. For visualization, the front wall boundary is not drawn in the figure. We see that the breaking water column and water splashes are well simulated with good numerical stability using the improved pressure calculation. Overall, the fluid behavior of the improved pressure calculation agreed with that of the standard pressure calculation. The detection result of surface particles (Fig. 12) show that the developed technique can detect free-surface particles appropriately. Moreover, the time history of the simulated pressure (Fig. 13) acting on \(\hbox {p}_{2}\) in Fig. 10 confirms that the pressure oscillation are suppressed.

4.3 U-shaped tube

4.3.1 Simulation condition

We simulated fluid behavior in a U-shaped tube for further verification of the improved pressure calculation. The simulation domain of the U-shaped tube (Fig. 14) contains.a viscous fluid of mass density \(\hbox {1000~kg/m}^{3}\) and kinematic viscosity coefficient \(1.00\times 10^{-4}~\hbox {m}^{2}/\hbox {s}\). Uniform virtual particles’ pressures, \(P_{left}\) and \(P_{right}\) were imposed on the left and right fluid surfaces, respectively. Pressure \(P_{left}\) was varied from 1000 to 4000 Pa, while \(P_{right}\) remained at zero. The initial water levels \(h_{left}\) and \(h_{right}\) were 0.600 m. The initial spacing between particles, \(l_{0}\), was 0.005 m. The total number of particles was 15,440 and the acceleration of gravity was \(9.81\, \hbox {m/s}^{2}\). Other settings were the same as in Sect. 4.1.1.

4.3.2 Simulation results

Fig. 12
figure 12

Detection result of surface particles

Fig. 13
figure 13

Time history of pressure in a three-dimensional dam breaking problem

Fig. 14
figure 14

Simulation domain for verifying air pressure acting on fluid in a U-shaped tube

Fig. 15
figure 15

Simulated fluid shape under steady state in a U-tube \((t = \hbox {10.0 s})\). The left pressure is 4000 Pa and the right pressure 0 Pa. Color shows the pressure distribution. (Color figure online)

Figure 15 depicts an example of the steady-state fluid behavior where \(P_{left}\) and \(P_{right}\) were 4000 and 0 Pa, respectively. The water level on the right has risen, while that on the left has fallen because of the difference in gas-phase pressure. The color scale represents the fluid pressure and indicates that the left surface of fluid has a higher pressure than the right.

Fig. 16
figure 16

Relation between pressure difference on free surfaces and water level difference

From the simulations, the relation between the difference in gas-phase pressure and the difference in water level \(h\, (=h_{right} -h_{left} )\) at the steady state (Fig. 16) were compared with the analytical solution (dashed line)

$$\begin{aligned} h=\frac{P_{left} -P_{right}}{\rho g}. \end{aligned}$$
(44)

An agreement between the two is evident.

4.4 Low-pressure simulation

4.4.1 Simulation condition

Fig. 17
figure 17

Schematic of simulation domain for verifying low pressure

For a simple low-pressure problem, we then applied the improved pressure calculation to the two-dimensional glass-raising problem where there is a lower pressure than that of the free surface. Figure 17 shows the simulation domain in the initial state. An upturned glass filled with water was set in a water tank and raised to some height \(h\) above the surface. The glass dimensions were 0.050 m in width \(A\), 0.0175 m in thickness \(T\) and 0.10 m in height. The water tank dimensions were 0.50 m in width \(B\) and 0.20 m in height. The simulation time was 3 s.

If the glass is raised, the water in the glass also rises because of a lower pressure than the free-surface pressure. The simulated pressure \(P\) at the center of the glass bottom, \(\hbox {p}_{3}\), was compared with the analytical solution

$$\begin{aligned} P=-\rho g{h}' \end{aligned}$$
(45)

and

$$\begin{aligned} {h}'=\frac{hB}{B-A-2T}, \end{aligned}$$
(46)
Fig. 18
figure 18

Fluid behavior of low-pressure simulation \((h=\hbox {0.05 m})\). a Initial configuration \((t = \hbox {0.0 s})\); b Pressure distribution \((t = \hbox {3.0 s})\)

where \({h}'\) is the relative height of the glass bottom from the water level. The simulations were performed for five raising heights: \(h =\,\, \)0.01, 0.02, 0.03, 0.04, and 0.05 m. The glass was raised from its initial position to height \(h\) in 1 s at the velocity expressed by a time history of sin curve. The parameter settings include a spatial resolution of 0.0025 m, kinematic viscosity coefficient of \(1.0\times 10^{-6}~\hbox {m}^{2}/\hbox {s}\), acceleration due to gravity of \(\hbox {9.8~m/s}^{2}\), and total number of particles of 16,502. We took account of pressures below the virtual-particle pressure. The collision distance for the artificial viscosity of the MPS method was \(0.85l_{0}\). The other conditions were the same as in Sect. 4.1.1.

4.4.2 Simulation results

Figure 18 shows an example of the simulated fluid behavior and pressure distribution for \(h=\hbox {0.05 m}\). We depict the time-averaged pressure over the last 0.5 s for the particle arrangement at 3 s. The figure shows that low glass pressure was successfully simulated; the minimum pressure occurs at the glass bottom.

Fig. 19
figure 19

Relation between raising height and pressure

Figure 19 shows the relationship between the raising height and the time-averaged pressure obtained at the center of the glass bottom, \(p_{3}\). The pressure was averaged over the last 1.5 s, representing a steady state. It is found that the results of the MPS method using the improved pressure calculation agreed well with the analytical solution.

5 Conclusion

We have improved the pressure calculation of the MPS method by assuming that there are virtual particles over the free surfaces. We derived a modified pressure Poisson equation and a modified approximation model for the pressure gradient. A technique for detecting free-surface particles was also developed for which a virtual light source and screen are used to accurately impose the boundary condition.

We simulated a hydrostatic pressure problem to verify that the improved pressure calculation suppresses particle clustering and pressure oscillation. The stability of the developed technique was verified in a dam breaking simulation. Also the analysis of a U-shaped tube demonstrated that the improved pressure calculation is capable in evaluating the difference in free-surface pressures. Moreover, analyses for low pressure show that the improved pressure calculation is capable in simulating lower pressures than that for the free surface.