3-D SPH solver. More...
#include <Core/Solver/Particle/SPH/SPHSolver3.hpp>
Classes | |
| class | Builder |
| Front-end to create SPHSolver3 objects step by step. More... | |
Public Member Functions | |
| SPHSolver3 () | |
| Constructs a solver with empty particle set. | |
| SPHSolver3 (double targetDensity, double targetSpacing, double relativeKernelRadius) | |
| SPHSolver3 (const SPHSolver3 &)=delete | |
| Deleted copy constructor. | |
| SPHSolver3 (SPHSolver3 &&) noexcept=delete | |
| Deleted move constructor. | |
| ~SPHSolver3 () override=default | |
| Default virtual destructor. | |
| SPHSolver3 & | operator= (const SPHSolver3 &)=delete |
| Deleted copy assignment operator. | |
| SPHSolver3 & | operator= (SPHSolver3 &&) 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. | |
| SPHSystemData3Ptr | GetSPHSystemData () const |
| Returns the SPH system data. | |
Public Member Functions inherited from CubbyFlow::ParticleSystemSolver3 | |
| ParticleSystemSolver3 () | |
| Constructs an empty solver. | |
| ParticleSystemSolver3 (double radius, double mass) | |
| Constructs a solver with particle parameters. | |
| ParticleSystemSolver3 (const ParticleSystemSolver3 &)=delete | |
| Deleted copy constructor. | |
| ParticleSystemSolver3 (ParticleSystemSolver3 &&) noexcept=delete | |
| Deleted move constructor. | |
| ~ParticleSystemSolver3 () override=default | |
| Default virtual destructor. | |
| ParticleSystemSolver3 & | operator= (const ParticleSystemSolver3 &)=delete |
| Deleted copy assignment operator. | |
| ParticleSystemSolver3 & | operator= (ParticleSystemSolver3 &&) 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 Vector3D & | GetGravity () const |
| Returns the gravity. | |
| void | SetGravity (const Vector3D &newGravity) |
| Sets the gravity. | |
| const ParticleSystemData3Ptr & | GetParticleSystemData () const |
| Returns the particle system data. | |
| const Collider3Ptr & | GetCollider () const |
| Returns the collider. | |
| void | SetCollider (const Collider3Ptr &newCollider) |
| Sets the collider. | |
| const ParticleEmitter3Ptr & | GetEmitter () const |
| Returns the emitter. | |
| void | SetEmitter (const ParticleEmitter3Ptr &newEmitter) |
| Sets the emitter. | |
| const VectorField3Ptr & | GetWind () const |
| Returns the wind field. | |
| void | SetWind (const VectorField3Ptr &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 SPHSolver3. | |
Static Public Member Functions inherited from CubbyFlow::ParticleSystemSolver3 | |
| static Builder | GetBuilder () |
| Returns builder fox ParticleSystemSolver3. | |
Detailed Description
3-D SPH solver.
This class implements 3-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
◆ SPHSolver3() [1/4]
| CubbyFlow::SPHSolver3::SPHSolver3 | ( | ) |
Constructs a solver with empty particle set.
◆ SPHSolver3() [2/4]
| CubbyFlow::SPHSolver3::SPHSolver3 | ( | double | targetDensity, |
| double | targetSpacing, | ||
| double | relativeKernelRadius | ||
| ) |
Constructs a solver with target density, spacing, and relative kernel radius.
◆ SPHSolver3() [3/4]
|
delete |
Deleted copy constructor.
◆ SPHSolver3() [4/4]
|
deletenoexcept |
Deleted move constructor.
◆ ~SPHSolver3()
|
overridedefault |
Default virtual destructor.
Member Function Documentation
◆ AccumulateForces()
Accumulates the force to the forces array in the particle system.
Reimplemented from CubbyFlow::ParticleSystemSolver3.
◆ 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::PCISPHSolver3.
◆ 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 SPHSolver3.
◆ GetEosExponent()
| double CubbyFlow::SPHSolver3::GetEosExponent | ( | ) | const |
Returns the exponent part of the equation-of-state.
◆ GetNegativePressureScale()
| double CubbyFlow::SPHSolver3::GetNegativePressureScale | ( | ) | const |
Returns the negative pressure scale.
◆ GetNumberOfSubTimeSteps()
|
overrideprotectedvirtual |
Returns the number of sub-time-steps.
Reimplemented from CubbyFlow::PhysicsAnimation.
◆ GetPseudoViscosityCoefficient()
| double CubbyFlow::SPHSolver3::GetPseudoViscosityCoefficient | ( | ) | const |
Returns the pseudo viscosity coefficient.
◆ GetSpeedOfSound()
| double CubbyFlow::SPHSolver3::GetSpeedOfSound | ( | ) | const |
Returns the speed of sound.
◆ GetSPHSystemData()
| SPHSystemData3Ptr CubbyFlow::SPHSolver3::GetSPHSystemData | ( | ) | const |
Returns the SPH system data.
◆ GetTimeStepLimitScale()
| double CubbyFlow::SPHSolver3::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::SPHSolver3::GetViscosityCoefficient | ( | ) | const |
Returns the viscosity coefficient.
◆ OnBeginAdvanceTimeStep()
|
overrideprotectedvirtual |
Performs pre-processing step before the simulation.
Reimplemented from CubbyFlow::ParticleSystemSolver3.
◆ OnEndAdvanceTimeStep()
|
overrideprotectedvirtual |
Performs post-processing step before the simulation.
Reimplemented from CubbyFlow::ParticleSystemSolver3.
◆ 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/SPHSolver3.hpp
Public Member Functions inherited from
1.9.8