WallBoundarySystem
BoundaryDEMSystem
PrescribedMotion
Boundaries modeled as dummy particles, which are treated like fluid particles,
but their positions and velocities are not evolved in time. Since the force towards the fluid
should not change with the material density when used with a TotalLagrangianSPHSystem, the
dummy particles need to have a mass corresponding to the fluid's rest density, which we call
"hydrodynamic mass", as opposed to mass corresponding to the material density of a
TotalLagrangianSPHSystem.
Here, initial_density and hydrodynamic_mass are vectors that contains the initial density
and the hydrodynamic mass respectively for each boundary particle.
Note that when used with SummationDensity (see below), this is only used to determine
the element type and the number of boundary particles.
To establish a relationship between density and pressure, a state_equation has to be passed,
which should be the same as for the adjacent fluid systems.
To sum over neighboring particles, a smoothing_kernel and smoothing_length needs to be passed.
This should be the same as for the adjacent fluid system with the largest smoothing length.
In the literature, this kind of boundary particles is referred to as "dummy particles" ([Adami et al., 2012](@cite Adami2012) and [Valizadeh & Monaghan, 2015](@cite Valizadeh2015)), "frozen fluid particles" ([Akinci et al., 2012](@cite Akinci2012)) or "dynamic boundaries [Crespo et al., 2007](@cite Crespo2007). The key detail of this boundary condition and the only difference between the boundary models in these references is the way the density and pressure of boundary particles is computed.
Since boundary particles are treated like fluid particles, the force
on fluid particle a due to boundary particle b is given by
The quantities to be defined here are the density \rho_b and pressure p_b
of the boundary particle b.
BoundaryModelDummyParticles
We provide six options to compute the boundary density and pressure, determined by the density_calculator:
- (Recommended) With
AdamiPressureExtrapolation, the pressure is extrapolated from the pressure of the fluid according to [Adami et al., 2012](@cite Adami2012), and the density is obtained by applying the inverse of the state equation. This option usually yields the best results of the options listed here. - (Only relevant for FSI) With
BernoulliPressureExtrapolation, the pressure is extrapolated from the pressure similar to theAdamiPressureExtrapolation, but a relative velocity-dependent pressure part is calculated between moving bodies and fluids, which increases the boundary pressure in areas prone to penetrations. - With
SummationDensity, the density is calculated by summation over the neighboring particles, and the pressure is computed from the density with the state equation. - With
ContinuityDensity, the density is integrated from the continuity equation, and the pressure is computed from the density with the state equation. Note that this causes a gap between fluid and boundary where the boundary is initialized without any contact to the fluid. This is due to overestimation of the boundary density as soon as the fluid comes in contact with boundary particles that initially did not have contact to the fluid. Therefore, in dam break simulations, there is a visible "step", even though the boundary is supposed to be flat. See also dual.sphysics.org/faq/#Q_13. - With
PressureZeroing, the density is set to the reference density and the pressure is computed from the density with the state equation. This option is not recommended. The other options yield significantly better results. - With
PressureMirroring, the density is set to the reference density. The pressure is not used. Instead, the fluid pressure is mirrored as boundary pressure in the momentum equation. This option is not recommended due to stability issues. SeePressureMirroringfor more details.
The pressure of the boundary particles is obtained by extrapolating the pressure of the fluid
according to [Adami et al., 2012](@cite Adami2012).
The pressure of a boundary particle b is given by
where the sum is over all fluid particles, \rho_f and p_f denote the density and pressure of fluid particle f, respectively,
r_{bf} = r_b - r_f denotes the difference of the coordinates of particles b and f,
\bm{g} denotes the gravitational acceleration acting on the fluid, and \bm{a}_b denotes the acceleration of the boundary particle b.
AdamiPressureExtrapolation
Identical to the pressure p_b calculated via AdamiPressureExtrapolation, but it adds the dynamic pressure component of the Bernoulli equation:
where \mathbf{v}_f is the velocity of the fluid and \mathbf{v}_{\text{body}} is the velocity of the body.
This adjustment provides a higher boundary pressure for bodies moving with a relative velocity to the fluid to prevent penetration.
This modification is original and not derived from any literature source.
BernoulliPressureExtrapolation
This is the simplest way to implement dummy boundary particles. The density of each particle is set to the reference density and the pressure to the reference pressure (the corresponding pressure to the reference density by the state equation).
PressureZeroing
Instead of calculating density and pressure for each boundary particle, we modify the momentum equation,
to replace the unknown density
where the first sum is over all fluid particles and the second over all boundary particles.
This approach was first mentioned by [Akinci et al. (2012)](@cite Akinci2012) and written down in this form by [Band et al. (2018)](@cite Band2018).
PressureMirroring
For the interaction of dummy particles and fluid particles, [Adami et al. (2012)](@cite Adami2012)
impose a no-slip boundary condition by assigning a wall velocity v_w to the dummy particle.
The wall velocity of particle a is calculated from the prescribed boundary particle
velocity v_a and the smoothed velocity field
where the sum is over all fluid particles.
By choosing the viscosity model ViscosityAdami for viscosity, a no-slip
condition is imposed. It is recommended to choose nu in the order of either the kinematic
viscosity parameter of the adjacent fluid or the equivalent from the artificial parameter
alpha of the adjacent fluid (\nu = \frac{\alpha h c }{2d + 4}). When omitting the
viscous interaction (default viscosity=nothing), a free-slip wall boundary
condition is applied.
!!! warning
The viscosity model ArtificialViscosityMonaghan for BoundaryModelDummyParticles
has not been verified yet.
Boundaries modeled as boundary particles which exert forces on the fluid particles ([Monaghan, Kajtar, 2009](@cite Monaghan2009)).
The force on fluid particle a due to boundary particle b is given by
with
where m_a and m_b are the masses of fluid particle a and boundary particle b
respectively, r_{ab} = r_a - r_b is the difference of the coordinates of particles
a and b, d denotes the boundary particle spacing and n denotes the number of
dimensions (see [Monaghan & Kajtar, 2009](@cite Monaghan2009), Equation (3.1) and [Valizadeh & Monaghan, 2015](@cite Valizadeh2015)).
Note that the repulsive acceleration \Phi denotes the 1D Wendland C4 kernel, normalized to 1.77 for q=0
([Monaghan & Kajtar, 2009](@cite Monaghan2009), Section 4), with \Phi(r, h) = w(r/h) and
The boundary particles are assumed to have uniform spacing by the factor \beta smaller
than the expected fluid particle spacing.
For example, if the fluid particles have an expected spacing of 0.3 and the boundary particles
have a uniform spacing of 0.1, then this parameter should be set to \beta = 3.
According to [Monaghan & Kajtar (2009)](@cite Monaghan2009), a value of \beta = 3 for the Wendland C4 that
we use here is reasonable for most computing purposes.
The parameter K is used to scale the force exerted by the boundary particles.
In [Monaghan & Kajtar (2009)](@cite Monaghan2009), a value of gD is used for static tank simulations,
where g is the gravitational acceleration and D is the depth of the fluid.
The viscosity \Pi_{ab} is calculated according to the viscosity used in the
simulation, where the density of the boundary particle if needed is assumed to be
identical to the density of the fluid particle.
By choosing the viscosity model ArtificialViscosityMonaghan for viscosity,
a no-slip condition is imposed. When omitting the viscous interaction
(default viscosity=nothing), a free-slip wall boundary condition is applied.
!!! warning
The no-slip conditions for BoundaryModelMonaghanKajtar have not been verified yet.
BoundaryModelMonaghanKajtar
Modules = [TrixiParticles]
Pages = [joinpath("schemes", "boundary", "open_boundary", "system.jl")]
Modules = [TrixiParticles]
Pages = [joinpath("schemes", "boundary", "open_boundary", "boundary_zones.jl")]
Modules = [TrixiParticles]
Filter = t -> typeof(t) === typeof(TrixiParticles.planar_geometry_to_face)
We offer two models for open boundaries, with the choice depending on the specific problem and flow characteristics near the boundary:
- [Method of characteristics](@ref method_of_characteristics): The method of characteristics is typically used in problems where tracking of wave propagation or flow in a domain that interacts with open boundaries (e.g., shock waves, wave fronts, or any behavior that depends on the direction of propagation) is needed. It avoids artificial reflections that could arise from boundary conditions.
- [Mirroring](@ref mirroring): The mirroring method is often applied when the flow near the boundary is expected to behave in a way that is easier to model by using symmetry or when the fluid does not exhibit complex wave behavior near the boundary (e.g., free-surface flows and simple outflow).
Modules = [TrixiParticles]
Pages = [joinpath("schemes", "boundary", "open_boundary", "method_of_characteristics.jl")]
The difficulty in non-reflecting boundary conditions, also called open boundaries, is to determine the appropriate boundary values of the exact characteristics of the Euler equations. Assuming the flow near the boundaries is normal to the boundary and free of shock waves and significant viscous effects, it can be shown that three characteristic variables exist:
J_1, associated with convection of entropy and propagates at flow velocity,J_2, downstream-running characteristics,J_3, upstream-running characteristics.
[Giles (1990)](@cite Giles1990) derived those variables based on a linearized set of governing equations:
where the subscript "ref" denotes the reference flow near the boundaries, which can be prescribed.
Specifying the reference variables is not equivalent to prescription of \rho, v and p
directly, since the perturbation from the reference flow is allowed.
[Lastiwka et al. (2009)](@cite Lastiwka2008) applied the method of characteristic to SPH and determined the number of variables that should be prescribed at the boundary and the number which should be propagated from the fluid domain to the boundary:
-
For an inflow boundary:
- Prescribe downstream-running characteristics
J_1andJ_2 - Transmit
J_3from the fluid domain (allowJ_3to propagate upstream to the boundary).
- Prescribe downstream-running characteristics
-
For an outflow boundary:
- Prescribe upstream-running characteristic
J_3 - Transmit
J_1andJ_2from the fluid domain.
- Prescribe upstream-running characteristic
Prescribing is done by simply setting the characteristics to zero. To transmit the characteristics from the fluid domain, or in other words, to carry the information of the fluid to the boundaries, [Negi et al. (2020)](@cite Negi2020) use a Shepard Interpolation
where the i-th particle is a boundary particle, f is either J_1, J_2 or J_3 and N is the set of
neighboring fluid particles.
To express pressure p, density \rho and velocity v as functions of the characteristic variables, the system of equations
from the characteristic variables is inverted and gives
With J_1, J_2 and J_3 determined, we can easily solve for the actual variables for each particle.
Modules = [TrixiParticles]
Pages = [joinpath("schemes", "boundary", "open_boundary", "mirroring.jl")]