CubbyFlow::GridSinglePhasePressureSolver3 Class Reference

3-D single-phase pressure solver. More...

#include <Core/Solver/Grid/GridSinglePhasePressureSolver3.hpp>

Inheritance diagram for CubbyFlow::GridSinglePhasePressureSolver3:
CubbyFlow::GridPressureSolver3

Public Member Functions

 GridSinglePhasePressureSolver3 ()
 Default constructor. More...
 
 GridSinglePhasePressureSolver3 (const GridSinglePhasePressureSolver3 &)=delete
 Deleted copy constructor. More...
 
 GridSinglePhasePressureSolver3 (GridSinglePhasePressureSolver3 &&) noexcept=delete
 Deleted move constructor. More...
 
 ~GridSinglePhasePressureSolver3 () override=default
 Default virtual destructor. More...
 
GridSinglePhasePressureSolver3operator= (const GridSinglePhasePressureSolver3 &)=delete
 Deleted copy assignment operator. More...
 
GridSinglePhasePressureSolver3operator= (GridSinglePhasePressureSolver3 &&) noexcept=delete
 Deleted move assignment operator. More...
 
void Solve (const FaceCenteredGrid3 &input, double timeIntervalInSeconds, FaceCenteredGrid3 *output, const ScalarField3 &boundarySDF=ConstantScalarField3{ std::numeric_limits< double >::max() }, const VectorField3 &boundaryVelocity=ConstantVectorField3{ { 0, 0, 0 } }, const ScalarField3 &fluidSDF=ConstantScalarField3{ -std::numeric_limits< double >::max() }, bool useCompressed=false) override
 Solves the pressure term and apply it to the velocity field. More...
 
GridBoundaryConditionSolver3Ptr SuggestedBoundaryConditionSolver () const override
 Returns the best boundary condition solver for this solver. More...
 
const FDMLinearSystemSolver3PtrGetLinearSystemSolver () const
 Returns the linear system solver. More...
 
void SetLinearSystemSolver (const FDMLinearSystemSolver3Ptr &solver)
 Sets the linear system solver. More...
 
const FDMVector3GetPressure () const
 Returns the pressure field. More...
 
- Public Member Functions inherited from CubbyFlow::GridPressureSolver3
 GridPressureSolver3 ()=default
 Default constructor. More...
 
 GridPressureSolver3 (const GridPressureSolver3 &)=delete
 Deleted copy constructor. More...
 
 GridPressureSolver3 (GridPressureSolver3 &&) noexcept=delete
 Deleted move constructor. More...
 
virtual ~GridPressureSolver3 ()=default
 Default virtual destructor. More...
 
GridPressureSolver3operator= (const GridPressureSolver3 &)=delete
 Deleted copy assignment operator. More...
 
GridPressureSolver3operator= (GridPressureSolver3 &&) noexcept=delete
 Deleted move assignment operator. More...
 

Detailed Description

3-D single-phase pressure solver.

This class implements 3-D single-phase pressure solver. This solver encodes the boundaries like Lego blocks – if a grid cell center is inside or outside the boundaries, it is either marked as occupied or not. In addition, this class solves single-phase flow, solving the pressure for selected fluid region only and treat other area as an atmosphere region. Thus, the pressure outside the fluid will be set to a constant value and velocity field won't be altered. This solver also computes the fluid boundary in block-like manner; If a grid cell is inside or outside the fluid, it is marked as either fluid or atmosphere. Thus, this solver in general, does not compute sub-grid structure.

Constructor & Destructor Documentation

◆ GridSinglePhasePressureSolver3() [1/3]

CubbyFlow::GridSinglePhasePressureSolver3::GridSinglePhasePressureSolver3 ( )

Default constructor.

◆ GridSinglePhasePressureSolver3() [2/3]

CubbyFlow::GridSinglePhasePressureSolver3::GridSinglePhasePressureSolver3 ( const GridSinglePhasePressureSolver3 )
delete

Deleted copy constructor.

◆ GridSinglePhasePressureSolver3() [3/3]

CubbyFlow::GridSinglePhasePressureSolver3::GridSinglePhasePressureSolver3 ( GridSinglePhasePressureSolver3 &&  )
deletenoexcept

Deleted move constructor.

◆ ~GridSinglePhasePressureSolver3()

CubbyFlow::GridSinglePhasePressureSolver3::~GridSinglePhasePressureSolver3 ( )
overridedefault

Default virtual destructor.

Member Function Documentation

◆ GetLinearSystemSolver()

const FDMLinearSystemSolver3Ptr& CubbyFlow::GridSinglePhasePressureSolver3::GetLinearSystemSolver ( ) const

Returns the linear system solver.

◆ GetPressure()

const FDMVector3& CubbyFlow::GridSinglePhasePressureSolver3::GetPressure ( ) const

Returns the pressure field.

◆ operator=() [1/2]

GridSinglePhasePressureSolver3& CubbyFlow::GridSinglePhasePressureSolver3::operator= ( const GridSinglePhasePressureSolver3 )
delete

Deleted copy assignment operator.

◆ operator=() [2/2]

GridSinglePhasePressureSolver3& CubbyFlow::GridSinglePhasePressureSolver3::operator= ( GridSinglePhasePressureSolver3 &&  )
deletenoexcept

Deleted move assignment operator.

◆ SetLinearSystemSolver()

void CubbyFlow::GridSinglePhasePressureSolver3::SetLinearSystemSolver ( const FDMLinearSystemSolver3Ptr solver)

Sets the linear system solver.

◆ Solve()

void CubbyFlow::GridSinglePhasePressureSolver3::Solve ( const FaceCenteredGrid3 input,
double  timeIntervalInSeconds,
FaceCenteredGrid3 output,
const ScalarField3 boundarySDF = ConstantScalarField3{ std::numeric_limits< double >::max() },
const VectorField3 boundaryVelocity = ConstantVectorField3{ { 0, 0, 0 } },
const ScalarField3 fluidSDF = ConstantScalarField3{ -std::numeric_limits< double >::max() },
bool  useCompressed = false 
)
overridevirtual

Solves the pressure term and apply it to the velocity field.

This function takes input velocity field and outputs pressure-applied velocity field. It also accepts extra arguments such as boundarySDF and fluidSDF that represent signed-distance representation of the boundary and fluid area. The negative region of boundarySDF means it is occupied by solid object. Also, the positive / negative area of the fluidSDF means it is occupied by fluid / atmosphere. If not specified, constant scalar field with std::numeric_limits<double>::max() will be used for boundarySDF meaning that no boundary at all. Similarly, a constant field with -std::numeric_limits<double>::max() will be used for fluidSDF which means it's fully occupied with fluid without any atmosphere.

Parameters
[in]inputThe input velocity field.
[in]timeIntervalInSecondsThe time interval for the sim.
[in,out]outputThe output velocity field.
[in]boundarySDFThe SDF of the boundary.
[in]boundaryVelocityThe velocity of the boundary.
[in]fluidSDFThe SDF of the fluid/atmosphere.
[in]useCompressedTrue if it uses compressed system.

Implements CubbyFlow::GridPressureSolver3.

◆ SuggestedBoundaryConditionSolver()

GridBoundaryConditionSolver3Ptr CubbyFlow::GridSinglePhasePressureSolver3::SuggestedBoundaryConditionSolver ( ) const
overridevirtual

Returns the best boundary condition solver for this solver.

This function returns the best boundary condition solver that works well with this pressure solver. Depending on the pressure solver implementation, different boundary condition solver might be used. For this particular class, an instance of GridBlockedBoundaryConditionSolver3 will be returned since this pressure solver encodes boundaries like pixelated Lego blocks.

Implements CubbyFlow::GridPressureSolver3.


The documentation for this class was generated from the following file: