**7. Near-interface algorithms**

As part of the proposed method, we have developed an algorithm involving the particles located only near the interface. The region near the interface includes mixed cells and one layer of adjacent pure cells of each material on each side.

**Figure 5** shows possible particle layouts relative to the interface. The dark and light cells (**Figure 5a**) are pure, and the intermediate-color cell (**Figure 5b**) is

**Figure 5.** *Particle layout near the interface: a) t = 0, b) t > 0.*

**Figure 6.**

*Conflicting cases of two representations of the same material: a) volume flux from a cell with particles to a particle-free cell; b) volume flux from a particle-free cell to a cell with particles.*

mixed. The particles in the cells are marked with a contrasting color. **Figure 5**, a illustrates the case when both materials are represented by particles only near the interface at t = 0, and **Figure 5b** shows the particle layout during the computation.

Thus, if the material is represented by particles only near the interface, then the same material can be represented both by particles and without particles depending on the interface location. To simplify the algorithm, the same material described by particles and without particles cannot occupy the same cell. This condition for each cell is formally given by

$$\mathbf{V}\_{\xi} = \sum\_{\sharp \mathbf{p}} \mathbf{V}\_{\xi \mathbf{p}}, \text{or} \sum\_{\sharp \mathbf{p}} \mathbf{V}\_{\xi \mathbf{p}} = \mathbf{0}.\tag{16}$$

• Two daughters have the same mother;

Particle combination rules:

*A Monotonic Method of Split Particles DOI: http://dx.doi.org/10.5772/intechopen.97044*

mother's coordinates;

• The particles have close (to within a constant) coordinates;

• One of the particles has a relatively small volume.

• The particle number exceeds the maximum number specified for the cell;

• If a daughter is combined with its mother, the resulting particle inherits the

• If two daughters of the same mother are combined (p1 and p2), the coordinates of the resulting particle (p) are chosen in accordance with their mass ratio:

<sup>y</sup>~<sup>p</sup> <sup>¼</sup> yp1 <sup>þ</sup> yp2 � yp1 � � mp2*<sup>=</sup>* mp1 <sup>þ</sup> mp2 � � � � ;

• The parameters of the resulting particle are calculated subject to the laws of

<sup>~</sup>ep <sup>¼</sup> ep1ρp1Vp1 <sup>þ</sup> ep2ρp2Vp2 ρp1Vp1 þ ρp2Vp2

<sup>~</sup>ρ<sup>p</sup> <sup>¼</sup> <sup>ρ</sup>p1Vp1 <sup>þ</sup> <sup>ρ</sup>p2Vp2 Vp1 þ Vp2

<sup>V</sup><sup>~</sup> <sup>p</sup> <sup>¼</sup> Vp1 <sup>þ</sup> Vp2*:*

For each cell containing particles, the quantities are remapped as follows:

ρξpVξ<sup>p</sup>*=*

where summing is performed for the particles of material ξ in the cell.

**10.1 Test problem 1. A moving cruciform density discontinuity**

The calculations were performed on a fixed grid of 60x60 cells.

eξ<sup>p</sup>ρξpVξ<sup>p</sup>*=*

Domain 0 < x < 12, 0 < у < 12 is divided into two subdomains (0 and 1). In subdomain 0: ρ<sup>0</sup> ¼ 1, e0 =0, ux ¼ 1, uy ¼ 1, no particles are specified; in subdomain 1: ρ<sup>0</sup> ¼ 10, e0 =0, ux ¼ 1, uy ¼ 1, each cell contains one particle. Р = 0 all over the domain, so the problem involves virtually no gas dynamics, only convective flow.

X p Vξp,

> X p

ρξpVξp, (19)

**9. Particle-to-cell density and energy remapping algorithm**

ρ<sup>n</sup>þ<sup>1</sup> *<sup>ξ</sup>* <sup>¼</sup> <sup>X</sup> p

e<sup>n</sup>þ<sup>1</sup> *<sup>ξ</sup>* <sup>¼</sup> <sup>X</sup> p

**10. Method testing**

**53**

conservation of their mass, specific internal energy and volume:

<sup>x</sup>~<sup>p</sup> <sup>¼</sup> xp1 <sup>þ</sup> xp2 � xp1 � � mp2*<sup>=</sup>* mp1 <sup>þ</sup> mp2 � � � � , (17)

,

(18)

,

Let us consider two reasons leading to the case when two different representations of the same material are present in the same cell. **Figure 6a, b** shows cells filled with the same material. In each case, however, in one of the cells the material is represented by particles (black dots), and in the other, without particles. The darker color shows the volume flux relative to the cells' total volume; the arrow indicates its direction. Below we describe the unwanted cases and the ways to avoid them.

**Figure 6a** shows a volume flux from a cell with particles to a particle-free cell. In this case, the particle splitting algorithm described in Section 4 stays unchanged in the donor cell, but the particles that were supposed to migrate into the acceptor cell are removed with an update of the thermodynamic state, and the particles staying in the donor cell become ordinary (they are no daughter cells any more if they were). **Figure 6b** shows a volume flux from a particle-free cell to a cell with particles. In this case, the acceptor cell receives a particle, the volume of which is equal to the volume flux and the state of which is the same as the donor-cell material parameters. The added particle then immediately combines with one of the particles in the acceptor cell. The combination rules are given below.

To preserve the layout, where particles are present only near the interface, the particles lying beyond this region are removed from the cells and new particles are created in the cells appearing in the region near the interface.

### **8. Particle combination algorithm**

To balance the particle splitting algorithm (Section 4), we have developed a particle combination procedure. The latter serves to prevent uncontrolled multiplication of particles as a result of their splitting.

Two particles of the same material within the same cell must be combined if one of the following criteria is met:

• One of the particles is a daughter of the other one;


Particle combination rules:

mixed. The particles in the cells are marked with a contrasting color. **Figure 5**, a illustrates the case when both materials are represented by particles only near the interface at t = 0, and **Figure 5b** shows the particle layout during the computation. Thus, if the material is represented by particles only near the interface, then the same material can be represented both by particles and without particles depending on the interface location. To simplify the algorithm, the same material described by particles and without particles cannot occupy the same cell. This condition for each

*Conflicting cases of two representations of the same material: a) volume flux from a cell with particles to a*

<sup>V</sup>ξp, or <sup>X</sup>

Let us consider two reasons leading to the case when two different representations of the same material are present in the same cell. **Figure 6a, b** shows cells filled with

**Figure 6a** shows a volume flux from a cell with particles to a particle-free cell. In this case, the particle splitting algorithm described in Section 4 stays unchanged in the donor cell, but the particles that were supposed to migrate into the acceptor cell are removed with an update of the thermodynamic state, and the particles staying in the donor cell become ordinary (they are no daughter cells any more if they were). **Figure 6b** shows a volume flux from a particle-free cell to a cell with particles. In this case, the acceptor cell receives a particle, the volume of which is equal to the volume flux and the state of which is the same as the donor-cell material parameters. The added particle then immediately combines with one of the

To preserve the layout, where particles are present only near the interface, the particles lying beyond this region are removed from the cells and new particles are

To balance the particle splitting algorithm (Section 4), we have developed a particle combination procedure. The latter serves to prevent uncontrolled multipli-

Two particles of the same material within the same cell must be combined if one

represented by particles (black dots), and in the other, without particles. The darker color shows the volume flux relative to the cells' total volume; the arrow indicates its direction. Below we describe the unwanted cases and the ways to avoid them.

ξp

Vξ<sup>p</sup> ¼ 0*:* (16)

<sup>V</sup><sup>ξ</sup> <sup>¼</sup> <sup>X</sup> ξp

*particle-free cell; b) volume flux from a particle-free cell to a cell with particles.*

the same material. In each case, however, in one of the cells the material is

particles in the acceptor cell. The combination rules are given below.

created in the cells appearing in the region near the interface.

• One of the particles is a daughter of the other one;

**8. Particle combination algorithm**

of the following criteria is met:

**52**

cation of particles as a result of their splitting.

cell is formally given by

*Recent Advances in Numerical Simulations*

**Figure 6.**


$$
\tilde{\mathbf{x}}\_{\rm p} = \mathbf{x}\_{\rm p1} + \left(\mathbf{x}\_{\rm p2} - \mathbf{x}\_{\rm p1}\right) \left(\mathbf{m}\_{\rm p2}/\left(\mathbf{m}\_{\rm p1} + \mathbf{m}\_{\rm p2}\right)\right),
\tag{17}
$$

$$
\tilde{\mathbf{y}}\_{\rm p} = \mathbf{y}\_{\rm p1} + \left(\mathbf{y}\_{\rm p2} - \mathbf{y}\_{\rm p1}\right) \left(\mathbf{m}\_{\rm p2}/\left(\mathbf{m}\_{\rm p1} + \mathbf{m}\_{\rm p2}\right)\right);
$$

• The parameters of the resulting particle are calculated subject to the laws of conservation of their mass, specific internal energy and volume:

$$\begin{split} \tilde{\mathbf{e}}\_{\mathbf{p}} &= \frac{\mathbf{e}\_{\mathbf{p}1}\rho\_{\mathbf{p}1}\mathbf{V}\_{\mathbf{p}1} + \mathbf{e}\_{\mathbf{p}2}\rho\_{\mathbf{p}2}\mathbf{V}\_{\mathbf{p}2}}{\rho\_{\mathbf{p}1}\mathbf{V}\_{\mathbf{p}1} + \rho\_{\mathbf{p}2}\mathbf{V}\_{\mathbf{p}2}}, \\ \tilde{\rho}\_{\mathbf{p}} &= \frac{\rho\_{\mathbf{p}1}\mathbf{V}\_{\mathbf{p}1} + \rho\_{\mathbf{p}2}\mathbf{V}\_{\mathbf{p}2}}{\mathbf{V}\_{\mathbf{p}1} + \mathbf{V}\_{\mathbf{p}2}}, \\ \tilde{\mathbf{V}}\_{\mathbf{p}} &= \mathbf{V}\_{\mathbf{p}1} + \mathbf{V}\_{\mathbf{p}2}. \end{split} \tag{18}$$
