2-D SPH solver. More...
#include <Core/Solver/Particle/SPH/SPHSolver2.hpp>
Classes | |
| class | Builder |
| Front-end to create SPHSolver2 objects step by step. More... | |
Public Member Functions | |
| SPHSolver2 () | |
| Constructs a solver with empty particle set. | |
| SPHSolver2 (double targetDensity, double targetSpacing, double relativeKernelRadius) | |
| SPHSolver2 (const SPHSolver2 &)=delete | |
| Deleted copy constructor. | |
| SPHSolver2 (SPHSolver2 &&) noexcept=delete | |
| Deleted move constructor. | |
| ~SPHSolver2 () override=default | |
| Default virtual destructor. | |
| SPHSolver2 & | operator= (const SPHSolver2 &)=delete |
| Deleted copy assignment operator. | |
| SPHSolver2 & | operator= (SPHSolver2 &&) noexcept=delete |
| Deleted move assignment operator. | |
| double | GetEosExponent () const |
| Returns the exponent part of the equation-of-state. | |
| void | SetEosExponent (double newEosExponent) |
| Sets the exponent part of the equation-of-state. | |
| double | GetNegativePressureScale () const |
| Returns the negative pressure scale. | |
| void | SetNegativePressureScale (double newNegativePressureScale) |
| Sets the negative pressure scale. | |
| double | GetViscosityCoefficient () const |
| Returns the viscosity coefficient. | |
| void | SetViscosityCoefficient (double newViscosityCoefficient) |
| Sets the viscosity coefficient. | |
| double | GetPseudoViscosityCoefficient () const |
| Returns the pseudo viscosity coefficient. | |
| void | SetPseudoViscosityCoefficient (double newPseudoViscosityCoefficient) |
| Sets the pseudo viscosity coefficient. | |
| double | GetSpeedOfSound () const |
| Returns the speed of sound. | |
| void | SetSpeedOfSound (double newSpeedOfSound) |
| Sets the speed of sound. | |
| double | GetTimeStepLimitScale () const |
| Multiplier that scales the max allowed time-step. | |
| void | SetTimeStepLimitScale (double newScale) |
| Sets the multiplier that scales the max allowed time-step. | |
| SPHSystemData2Ptr | GetSPHSystemData () const |
| Returns the SPH system data. | |
Public Member Functions inherited from CubbyFlow::ParticleSystemSolver2 | |
| ParticleSystemSolver2 () | |
| Constructs an empty solver. | |
| ParticleSystemSolver2 (double radius, double mass) | |
| Constructs a solver with particle parameters. | |
| ParticleSystemSolver2 (const ParticleSystemSolver2 &)=delete | |
| Deleted copy constructor. | |
| ParticleSystemSolver2 (ParticleSystemSolver2 &&) noexcept=delete | |
| Deleted move constructor. | |
| ~ParticleSystemSolver2 () override=default | |
| Default virtual destructor. | |
| ParticleSystemSolver2 & | operator= (const ParticleSystemSolver2 &)=delete |
| Deleted copy assignment operator. | |
| ParticleSystemSolver2 & | operator= (ParticleSystemSolver2 &&) noexcept=delete |
| Deleted move assignment operator. | |
| double | GetDragCoefficient () const |
| Returns the drag coefficient. | |
| void | SetDragCoefficient (double newDragCoefficient) |
| Sets the drag coefficient. | |
| double | GetRestitutionCoefficient () const |
| Gets the restitution coefficient. | |
| void | SetRestitutionCoefficient (double newRestitutionCoefficient) |
| Sets the restitution coefficient. | |
| const Vector2D & | GetGravity () const |
| Returns the gravity. | |
| void | SetGravity (const Vector2D &newGravity) |
| Sets the gravity. | |
| const ParticleSystemData2Ptr & | GetParticleSystemData () const |
| Returns the particle system data. | |
| const Collider2Ptr & | GetCollider () const |
| Returns the collider. | |
| void | SetCollider (const Collider2Ptr &newCollider) |
| Sets the collider. | |
| const ParticleEmitter2Ptr & | GetEmitter () const |
| Returns the emitter. | |
| void | SetEmitter (const ParticleEmitter2Ptr &newEmitter) |
| Sets the emitter. | |
| const VectorField2Ptr & | GetWind () const |
| Returns the wind field. | |
| void | SetWind (const VectorField2Ptr &newWind) |
| Sets the wind. | |
Public Member Functions inherited from CubbyFlow::PhysicsAnimation | |
| PhysicsAnimation () | |
| Default constructor. | |
| PhysicsAnimation (const PhysicsAnimation &)=default | |
| Default copy constructor. | |
| PhysicsAnimation (PhysicsAnimation &&) noexcept=default | |
| Default move constructor. | |
| virtual | ~PhysicsAnimation ()=default |
| Default virtual destructor. | |
| PhysicsAnimation & | operator= (const PhysicsAnimation &)=default |
| Default copy assignment operator. | |
| PhysicsAnimation & | operator= (PhysicsAnimation &&) noexcept=default |
| Default move assignment operator. | |
| bool | GetIsUsingFixedSubTimeSteps () const |
| Returns true if fixed sub-timestepping is used. | |
| void | SetIsUsingFixedSubTimeSteps (bool isUsing) |
| Sets true if fixed sub-timestepping is used. | |
| unsigned int | GetNumberOfFixedSubTimeSteps () const |
| Returns the number of fixed sub-timesteps. | |
| void | SetNumberOfFixedSubTimeSteps (unsigned int numberOfSteps) |
| Sets the number of fixed sub-timesteps. | |
| void | AdvanceSingleFrame () |
| Advances a single frame. | |
| Frame | GetCurrentFrame () const |
| Returns current frame. | |
| void | SetCurrentFrame (const Frame &frame) |
| Sets current frame cursor (but do not invoke update()). | |
| double | GetCurrentTimeInSeconds () const |
| Returns current time in seconds. | |
Public Member Functions inherited from CubbyFlow::Animation | |
| Animation ()=default | |
| Default constructor. | |
| Animation (const Animation &)=default | |
| Default copy constructor. | |
| Animation (Animation &&) noexcept=default | |
| Default move constructor. | |
| virtual | ~Animation ()=default |
| Default virtual destructor. | |
| Animation & | operator= (const Animation &)=default |
| Default copy assignment operator. | |
| Animation & | operator= (Animation &&) noexcept=default |
| Default move assignment operator. | |
| void | Update (const Frame &frame) |
Updates animation state for given frame. | |
Static Public Member Functions | |
| static Builder | GetBuilder () |
| Returns builder fox SPHSolver2. | |
Static Public Member Functions inherited from CubbyFlow::ParticleSystemSolver2 | |
| static Builder | GetBuilder () |
| Returns builder fox ParticleSystemSolver2. | |
Detailed Description
2-D SPH solver.
This class implements 2-D SPH solver. The main pressure solver is based on equation-of-state (EOS).
- See also
- M{"u}ller et al., Particle-based fluid simulation for interactive applications, SCA 2003.
- M. Becker and M. Teschner, Weakly compressible SPH for free surface flows, SCA 2007.
- Adams and Wicke, Meshless approximation methods and applications in physics based modeling and animation, Eurographics tutorials 2009.
Constructor & Destructor Documentation
◆ SPHSolver2() [1/4]
| CubbyFlow::SPHSolver2::SPHSolver2 | ( | ) |
Constructs a solver with empty particle set.
◆ SPHSolver2() [2/4]
| CubbyFlow::SPHSolver2::SPHSolver2 | ( | double | targetDensity, |
| double | targetSpacing, | ||
| double | relativeKernelRadius | ||
| ) |
Constructs a solver with target density, spacing, and relative kernel radius.
◆ SPHSolver2() [3/4]
|
delete |
Deleted copy constructor.
◆ SPHSolver2() [4/4]
|
deletenoexcept |
Deleted move constructor.
◆ ~SPHSolver2()
|
overridedefault |
Default virtual destructor.
Member Function Documentation
◆ AccumulateForces()
Accumulates the force to the forces array in the particle system.
Reimplemented from CubbyFlow::ParticleSystemSolver2.
◆ AccumulateNonPressureForces()
|
protectedvirtual |
Accumulates the non-pressure forces to the forces array in the particle system.
◆ AccumulatePressureForce() [1/2]
|
protected |
Accumulates the pressure force to the given pressureForces array.
◆ AccumulatePressureForce() [2/2]
|
protectedvirtual |
Accumulates the pressure force to the forces array in the particle system.
Reimplemented in CubbyFlow::PCISPHSolver2.
◆ AccumulateViscosityForce()
|
protected |
Accumulates the viscosity force to the forces array in the particle system.
◆ ComputePressure()
|
protected |
Computes the pressure.
◆ ComputePseudoViscosity()
Computes pseudo viscosity.
◆ GetBuilder()
Returns builder fox SPHSolver2.
◆ GetEosExponent()
| double CubbyFlow::SPHSolver2::GetEosExponent | ( | ) | const |
Returns the exponent part of the equation-of-state.
◆ GetNegativePressureScale()
| double CubbyFlow::SPHSolver2::GetNegativePressureScale | ( | ) | const |
Returns the negative pressure scale.
◆ GetNumberOfSubTimeSteps()
|
overrideprotectedvirtual |
Returns the number of sub-time-steps.
Reimplemented from CubbyFlow::PhysicsAnimation.
◆ GetPseudoViscosityCoefficient()
| double CubbyFlow::SPHSolver2::GetPseudoViscosityCoefficient | ( | ) | const |
Returns the pseudo viscosity coefficient.
◆ GetSpeedOfSound()
| double CubbyFlow::SPHSolver2::GetSpeedOfSound | ( | ) | const |
Returns the speed of sound.
◆ GetSPHSystemData()
| SPHSystemData2Ptr CubbyFlow::SPHSolver2::GetSPHSystemData | ( | ) | const |
Returns the SPH system data.
◆ GetTimeStepLimitScale()
| double CubbyFlow::SPHSolver2::GetTimeStepLimitScale | ( | ) | const |
Multiplier that scales the max allowed time-step.
This function returns the multiplier that scales the max allowed time-step. When the scale is 1.0, the time-step is bounded by the speed of sound and max acceleration.
◆ GetViscosityCoefficient()
| double CubbyFlow::SPHSolver2::GetViscosityCoefficient | ( | ) | const |
Returns the viscosity coefficient.
◆ OnBeginAdvanceTimeStep()
|
overrideprotectedvirtual |
Performs pre-processing step before the simulation.
Reimplemented from CubbyFlow::ParticleSystemSolver2.
◆ OnEndAdvanceTimeStep()
|
overrideprotectedvirtual |
Performs post-processing step before the simulation.
Reimplemented from CubbyFlow::ParticleSystemSolver2.
◆ operator=() [1/2]
|
delete |
Deleted copy assignment operator.
◆ operator=() [2/2]
|
deletenoexcept |
Deleted move assignment operator.
◆ SetEosExponent()
Sets the exponent part of the equation-of-state.
This function sets the exponent part of the equation-of-state. The value must be greater than 1.0, and smaller inputs will be clamped. Default is 7.
◆ SetNegativePressureScale()
Sets the negative pressure scale.
This function sets the negative pressure scale. By setting the number between 0 and 1, the solver will scale the effect of negative pressure which can prevent the clumping of the particles near the surface. Input value outside 0 and 1 will be clamped within the range. Default is 0.
◆ SetPseudoViscosityCoefficient()
Sets the pseudo viscosity coefficient.
This function sets the pseudo viscosity coefficient which applies additional pseudo-physical damping to the system. Default is 10.
◆ SetSpeedOfSound()
Sets the speed of sound.
This function sets the speed of sound which affects the stiffness of the EOS and the time-step size. Higher value will make EOS stiffer and the time-step smaller. The input value must be higher than 0.0.
◆ SetTimeStepLimitScale()
Sets the multiplier that scales the max allowed time-step.
This function sets the multiplier that scales the max allowed time-step. When the scale is 1.0, the time-step is bounded by the speed of sound and max acceleration.
◆ SetViscosityCoefficient()
Sets the viscosity coefficient.
The documentation for this class was generated from the following file:
- Core/Solver/Particle/SPH/SPHSolver2.hpp
Public Member Functions inherited from
1.9.8