|
SPH
|
Adds ghost particles symmetrically for each SPH particle close to boundary. More...
#include <Boundary.h>
Public Member Functions | |
| GhostParticles (SharedPtr< IDomain > domain, const Float searchRadius, const Float minimalDist) | |
| Creates new boundary conditions. More... | |
| GhostParticles (SharedPtr< IDomain > domain, const RunSettings &settings) | |
| Creates new boundary conditions, using parameters specified in settings. More... | |
| void | setVelocityOverride (Function< Optional< Vector >(const Vector &r)> ghostVelocity) |
| Specifies a functor that overrides the default velocity assinged to each ghost. More... | |
| virtual void | initialize (Storage &storage) override |
| Applies the boundary conditions before the derivatives are computed. More... | |
| virtual void | finalize (Storage &storage) override |
| Applies the boundary conditions after the derivatives are computed. More... | |
Public Member Functions inherited from Polymorphic | |
| virtual | ~Polymorphic () |
Static Public Attributes | |
| static constexpr Size | FLAG = Size(-1) |
| Special flag denoting ghost particles. More... | |
Adds ghost particles symmetrically for each SPH particle close to boundary.
All physical quantities are copied on them. This acts as a natural boundary for SPH particles without creating unphysical gradients due to discontinuity.
Definition at line 71 of file Boundary.h.
| NAMESPACE_SPH_BEGIN GhostParticles::GhostParticles | ( | SharedPtr< IDomain > | domain, |
| const Float | searchRadius, | ||
| const Float | minimalDist | ||
| ) |
Creates new boundary conditions.
| domain | Selected computational domain; particles close to the boundary will spawn ghosts. |
| searchRadius | Radius of a single particle, in units of smoothing length. |
| minimalDist | Minimal allowed distance between a particle and its ghost. |
Definition at line 19 of file Boundary.cpp.
| GhostParticles::GhostParticles | ( | SharedPtr< IDomain > | domain, |
| const RunSettings & | settings | ||
| ) |
Creates new boundary conditions, using parameters specified in settings.
Definition at line 26 of file Boundary.cpp.
|
overridevirtual |
Applies the boundary conditions after the derivatives are computed.
Called every time step after equations are evaluated (finalized).
Implements IBoundaryCondition.
Definition at line 104 of file Boundary.cpp.
|
overridevirtual |
Applies the boundary conditions before the derivatives are computed.
Called every time step after equations are initialized.
Implements IBoundaryCondition.
Definition at line 33 of file Boundary.cpp.
| void GhostParticles::setVelocityOverride | ( | Function< Optional< Vector >(const Vector &r)> | ghostVelocity | ) |
Specifies a functor that overrides the default velocity assinged to each ghost.
By default, the velocity of a ghost is mirrored with a respect to the boundary; the tangential conponents of the velocities of the particle and the corresponding ghost are equal. The provided function may return a different velocity to obtain different boundary condition at different parts of the boundary, for example it may return zero velocity to create friction between the particles and the boundary.
| ghostVelocity | Functor taking ghost position as parameter and returning velocity assigned to the ghost or NOTHING to assign the default velocity. |
Definition at line 100 of file Boundary.cpp.
Special flag denoting ghost particles.
Definition at line 74 of file Boundary.h.
| Float GhostParticles::minimalDist |
Definition at line 84 of file Boundary.h.
| Float GhostParticles::searchRadius |
Definition at line 83 of file Boundary.h.