N-D explicit weakly compressible material point method solver. More...
#include <Core/Solver/Particle/MPM/MPMFluidSolver.hpp>
Classes | |
| class | Builder |
| Front-end to create MPMFluidSolver objects step by step. More... | |
Public Types | |
| using | Base = std::conditional_t< N==2, ParticleSystemSolver2, ParticleSystemSolver3 > |
| using | MatrixType = Matrix< double, N, N > |
| using | VectorType = Vector< double, N > |
| using | SizeType = Vector< size_t, N > |
Public Member Functions | |
| MPMFluidSolver (const SizeType &resolution=SizeType::MakeConstant(32), const VectorType &gridSpacing=VectorType::MakeConstant(1.0), const VectorType &gridOrigin=VectorType{}, double radius=1e-3, double mass=1e-3, double targetDensity=WATER_DENSITY, double speedOfSound=100.0, double eosExponent=7.0, double negativePressureScale=0.0) | |
| Constructs an empty weakly compressible MPM fluid solver. | |
| std::shared_ptr< MPMFluidSystemData< N > > | GetMPMSystemData () const |
| Returns the owned MPM fluid particle and grid state. | |
| const MPMFluidConstitutiveModel< N > & | GetConstitutiveModel () const |
| Returns the immutable weakly compressible constitutive model. | |
| double | GetTimeStepLimitScale () const |
| Returns the scale applied to adaptive time-step limits. | |
| void | SetTimeStepLimitScale (double newScale) |
Sets the adaptive time-step scale in (0, 1]. | |
| int | GetClosedDomainBoundaryFlag () const |
| Returns the closed domain boundary flag. | |
| void | SetClosedDomainBoundaryFlag (int flag) |
| Sets the closed domain boundary flag. | |
Static Public Member Functions | |
| static Builder | GetBuilder () |
| Returns a builder for MPMFluidSolver. | |
Protected Member Functions | |
| void | OnInitialize () override |
| Initializes particle-grid state before the first adaptive step query. | |
| unsigned int | GetNumberOfSubTimeSteps (double timeIntervalInSeconds) const override |
| Returns the number of adaptive sub-time-steps. | |
| void | AccumulateForces (double timeStepInSeconds) override |
| Fluid forces are integrated on the background grid. | |
| void | OnBeginAdvanceTimeStep (double timeStepInSeconds) override |
| Advances particle-grid fluid state before base particle integration. | |
| void | OnEndAdvanceTimeStep (double timeStepInSeconds) override |
| Projects particles back into selected closed domain boundaries. | |
Detailed Description
class CubbyFlow::MPMFluidSolver< N >
N-D explicit weakly compressible material point method solver.
Uses the Tait equation of state with existing MPM particle-grid transfers and particle-solver collision lifecycle.
- Note
- Choose the artificial speed of sound high enough to keep the maximum relative density error near or below 3%; ten times the expected peak flow speed is a common starting point. Adaptive stepping limits each step to
timeStepLimitScale * minGridSpacing / (speedOfSound + maxParticleSpeed). This explicit limit assumes weak compression; reduce the scale or increase the sound speed when density error or pressure oscillation is excessive.
Member Typedef Documentation
◆ Base
| using CubbyFlow::MPMFluidSolver< N >::Base = std::conditional_t<N == 2, ParticleSystemSolver2, ParticleSystemSolver3> |
◆ MatrixType
◆ SizeType
◆ VectorType
Constructor & Destructor Documentation
◆ MPMFluidSolver()
|
explicit |
Constructs an empty weakly compressible MPM fluid solver.
Member Function Documentation
◆ AccumulateForces()
|
overrideprotected |
Fluid forces are integrated on the background grid.
◆ GetBuilder()
|
static |
Returns a builder for MPMFluidSolver.
◆ GetClosedDomainBoundaryFlag()
| int CubbyFlow::MPMFluidSolver< N >::GetClosedDomainBoundaryFlag | ( | ) | const |
Returns the closed domain boundary flag.
◆ GetConstitutiveModel()
| const MPMFluidConstitutiveModel< N > & CubbyFlow::MPMFluidSolver< N >::GetConstitutiveModel | ( | ) | const |
Returns the immutable weakly compressible constitutive model.
◆ GetMPMSystemData()
| std::shared_ptr< MPMFluidSystemData< N > > CubbyFlow::MPMFluidSolver< N >::GetMPMSystemData | ( | ) | const |
Returns the owned MPM fluid particle and grid state.
◆ GetNumberOfSubTimeSteps()
|
overrideprotected |
Returns the number of adaptive sub-time-steps.
◆ GetTimeStepLimitScale()
| double CubbyFlow::MPMFluidSolver< N >::GetTimeStepLimitScale | ( | ) | const |
Returns the scale applied to adaptive time-step limits.
◆ OnBeginAdvanceTimeStep()
|
overrideprotected |
Advances particle-grid fluid state before base particle integration.
◆ OnEndAdvanceTimeStep()
|
overrideprotected |
Projects particles back into selected closed domain boundaries.
◆ OnInitialize()
|
overrideprotected |
Initializes particle-grid state before the first adaptive step query.
◆ SetClosedDomainBoundaryFlag()
| void CubbyFlow::MPMFluidSolver< N >::SetClosedDomainBoundaryFlag | ( | int | flag | ) |
Sets the closed domain boundary flag.
◆ SetTimeStepLimitScale()
| void CubbyFlow::MPMFluidSolver< N >::SetTimeStepLimitScale | ( | double | newScale | ) |
Sets the adaptive time-step scale in (0, 1].
The documentation for this class was generated from the following files:
- Core/Solver/Particle/MPM/MPMFluidSolver.hpp
- Core/Solver/Particle/MPM/MPMFluidSolver-Impl.hpp
1.9.8