Smoothed Particle Hydrodynamics

from Wikipedia, the free encyclopedia

Smoothed-particle hydrodynamics ( SPH ; German: smoothed particle hydrodynamics ) is a numerical method for solving hydrodynamic equations . It is used in astrophysics , ballistics and tsunami calculations , among other things . SPH is a Lagrange method, i.e. H. the coordinates used move with the fluid. SPH is a particularly easy to implement and robust method.

method

General

In Smoothed Particle Hydrodynamics, the fluid to be simulated is divided into elements. Similar to the Monte Carlo methods , the elements are randomly distributed over the liquid. This minimizes the error to be expected. The average distance between these elements is represented by the Smoothing Length . It is the most important parameter of the method. The kernel smooths the fluid between the particles, hence the name. Each size (e.g. density ) is calculated by summing over all particles. Each individual particle receives a share of this size in the form of a scalar. This turns the partial differential equations of hydrodynamics into ordinary differential equations, which greatly simplifies the calculations. SPH is a very empirical method. This means that many things are done because they work, not because there is a strict mathematical derivation.

Derivation

The formal derivation runs either via a Lagrange function or via an integral interpolation. The integral interpolation for a quantity is based on an identity, where the Dirac delta distribution denotes:

Then the distribution is approximated by a core , where is the smoothing length. So that the approximation remains valid in the limit case, normalization and identity with the distribution in the limit value for h  → 0 can be required:

In fact, this is no longer the case with most of the cores used. In order to obtain the division into mass elements, one expands with the density and leaves it greater than 0. For the case of infinitely many, infinitely small particles, the sum goes over into the integral. Numerically, one will always have to be satisfied with a finite number of particles:

It is the mass of the particle b and the density at the location of the particle b:

With that we have derived the basic equation of Smoothed Particle Hydrodynamics (right part). The quantity A is calculated as a sum over all particles. You can see that the variable that depends on r has become a scalar multiplied by the kernel. This leads to a strong simplification of differential equations, since a derivative no longer affects the size, but only the kernel:

Core and Smoothing Length

Smoothing length

Probably the most important parameter of the SPH is the smoothing length . It defines the resolution of the method and thus has a strong influence on the accuracy and computational effort in simulations. If the kernel is selected accordingly (see below), it also defines the number of neighbors to be included in the calculation. Up to a few tens of particles per size are common. For good results, use the mean density of the fluid as a guide:

with particles, dimensions and

In modern codes, you choose time-dependent. With

a higher resolution is then used in areas of high densities, while the smoothing length increases in areas of low densities. This allows the computational effort to be reduced while maintaining the same level of accuracy.

core

The core is probably the most important structure of the SPH method. Different kernels correspond to different difference schemes in grid methods. To interpret SPH equations, it is advantageous to use a kernel in the form of a Gaussian curve:

In numerical terms, however, this approach is not very suitable, since in this case one often values ​​clear behavior with regard to the range of the core. I.e. one chooses a kernel that is zero above a certain level in order to be able to clearly determine the number of neighbors that are included in the calculation. This allows you to limit the computational effort required. As mentioned earlier, SPH is a very empirical method; H. very different cores are required for different applications. The exact choice is a matter of experience and is often made on the basis of trial and error . Since a core is often implemented in its own function, the effort to replace or change it is minimal. Cores based on splines are often used:

With , a normalization constant and the number of dimensions . Here only particles up to the next but one neighbor are included in the calculation. In addition, the 2nd derivative of this nucleus is not constant, which is why it does not depend on the disorder of the particles.

Error estimates

Two approximations were made for the derivation using integral interpolation functions. First, it was assumed that the summation only takes place over a finite number of particles.

  • For identity, i.e. H. with and any number of particles, a Taylor expansion gives an error of .
  • An error can also be calculated for the summation approximation with the help of the Shoenberg formula if the particles are distributed in an orderly manner in the fluid.
  • In the case of disordered particles, there is no traditional error estimation.

With simulations with SPH one is therefore always dependent on the comparison with other simulations, at least for an error assessment. Some publications mention that the errors are usually well below those of a Monte Carlo simulation ; this is also a matter of experience. In general, SPH tends to smear out discontinuities, so it is locally rather imprecise, especially in the case of simulations with few particles. The behavior becomes significantly better for large numbers of particles. However, the global behavior is very good even with low particle numbers, which corresponds to low computational effort. In other words, global variables such as energy are well represented. With SPH, a globally good simulation can often be programmed with little effort, which can be calculated on workstations in an acceptable time.

advantages and disadvantages

Advantages:

  • SPH is a Lagrange method; the continuity equation is automatically satisfied.
  • The code is very robust; H. almost always gives results
  • The implementation of SPH is comparatively easy, as is the testing of different kernels.
  • With the help of a Gaussian function as a kernel, theoretical results can be easily interpreted.
  • In modern code there is a dependency of the computational effort on the number of particles.
  • SPH shows good global results with low particle numbers.

Disadvantage:

  • The code is often too robust; despite an incorrect model, SPH can deliver results that are then physically incorrect
  • The error estimation is often problematic and can only be obtained in comparison with the results of other methods
  • The method is highly dispersive
  • High numbers of particles are required for good accuracy. The advantage of low computational effort is thus not applicable
  • The treatment of discontinuities is often difficult as structures are smoothed on scales smaller than the smoothing length.

Hydrodynamic equations in SPH

Symmetrization

To formulate the hydrodynamics in SPH, the apparently simplest approach is the basic equation in the hydrodynamic equations such as B. to use the Navier-Stokes equation . However, the resulting equations are not symmetrical with respect to particle exchange. Therefore, in this case, many conservation laws for energy, angular momentum etc. no longer apply. However, it is often possible to save this by writing the density into the respective differential operator and using the product rule:

In this way, symmetrical equations can often be derived. All of this is not strictly formal, but only because it gives better results.

Movement of the fluid

The simplest way is to use the definition of speed:

The movement of one particle is not linked to that of the other, which can often lead to problems. That is why the XSPH method ("Extended SPH") was developed:

with an averaged density:

and a coupling parameter ε. The order of the particles is thus better preserved without the need to introduce additional viscosity.

Continuity equation in SPH

If we put the density in the basic equation, we get

for a particle a. From this the SPH continuity equation can be calculated

Euler's equation in SPH

For the Euler equation we get:

This equation is not symmetrical about particle exchange: momentum and torque are not preserved. Therefore we use the trick indicated above for the pressure gradient:

From what we get the desired symmetric equation:

If we use a Gaussian function , the result is a central force that acts equally on both particles:

viscosity

Like almost every numerical method, SPH also generates viscosity through calculation inaccuracies . However, this is often not sufficient for modeling. Therefore, similar to the transition from the Euler equation to the Navier-Stokes equation , a viscosity tensor is introduced. The exact choice of this tensor depends heavily on the model.

Applications

SPH is used in many different fields such as astrophysics . There are also relativistic and magnetic SPH methods:

Further publications

  • Monaghan: Smoothed Particle Hydrodynamics; Annu. Rev. Astrophys. 1992
  • Steinmetz, Müller: On the capabilities and limits of sph; Astronomy and Astrophysics 1993
  • Alimi, Courty: Thermodynamic evolution of the cosmological baryonic gas pt.2; Astronomy and Astrophysics 2005

Web links

Movies

code