Jet  v1.3.3
Public Member Functions | List of all members
jet::GridSinglePhasePressureSolver3 Class Reference

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

#include <jet/grid_single_phase_pressure_solver3.h>

Inheritance diagram for jet::GridSinglePhasePressureSolver3:
jet::GridPressureSolver3

Public Member Functions

 GridSinglePhasePressureSolver3 ()
 Default constructor. More...
 
virtual ~GridSinglePhasePressureSolver3 ()
 Default destructor. More...
 
void solve (const FaceCenteredGrid3 &input, double timeIntervalInSeconds, FaceCenteredGrid3 *output, const ScalarField3 &boundarySdf=ConstantScalarField3(kMaxD), const VectorField3 &boundaryVelocity=ConstantVectorField3({0, 0, 0}), const ScalarField3 &fluidSdf=ConstantScalarField3(-kMaxD), 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 FdmLinearSystemSolver3PtrlinearSystemSolver () const
 Returns the linear system solver. More...
 
void setLinearSystemSolver (const FdmLinearSystemSolver3Ptr &solver)
 Sets the linear system solver. More...
 
const FdmVector3pressure () const
 Returns the pressure field. More...
 
- Public Member Functions inherited from jet::GridPressureSolver3
 GridPressureSolver3 ()
 Default constructor. More...
 
virtual ~GridPressureSolver3 ()
 Default destructor. 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 subgrid structure.

Constructor & Destructor Documentation

◆ GridSinglePhasePressureSolver3()

jet::GridSinglePhasePressureSolver3::GridSinglePhasePressureSolver3 ( )

Default constructor.

◆ ~GridSinglePhasePressureSolver3()

virtual jet::GridSinglePhasePressureSolver3::~GridSinglePhasePressureSolver3 ( )
virtual

Default destructor.

Member Function Documentation

◆ linearSystemSolver()

const FdmLinearSystemSolver3Ptr& jet::GridSinglePhasePressureSolver3::linearSystemSolver ( ) const

Returns the linear system solver.

◆ pressure()

const FdmVector3& jet::GridSinglePhasePressureSolver3::pressure ( ) const

Returns the pressure field.

◆ setLinearSystemSolver()

void jet::GridSinglePhasePressureSolver3::setLinearSystemSolver ( const FdmLinearSystemSolver3Ptr solver)

Sets the linear system solver.

◆ solve()

void jet::GridSinglePhasePressureSolver3::solve ( const FaceCenteredGrid3 input,
double  timeIntervalInSeconds,
FaceCenteredGrid3 output,
const ScalarField3 boundarySdf = ConstantScalarField3(kMaxD),
const VectorField3 boundaryVelocity = ConstantVectorField3({0, 0, 0}),
const ScalarField3 fluidSdf = ConstantScalarField3(-kMaxD),
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 kMaxD will be used for boundarySdf meaning that no boundary at all. Similarly, a constant field with -kMaxD 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]fluidSdfThe SDF of the fluid/atmosphere.
[in]useCompressedTrue if it uses compressed system.

Implements jet::GridPressureSolver3.

◆ suggestedBoundaryConditionSolver()

GridBoundaryConditionSolver3Ptr jet::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 GridBlockedBoundaryConditionSolver2 will be returned since this pressure solver encodes boundaries like pixelated Lego blocks.

Implements jet::GridPressureSolver3.


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