Description
Class to represent the fluid/granular dynamics system.
This class is used to represent a fluid/granular system and take care of the time integration of the fluid/granular dynamics. This is a class designed for base SPH simulation. The class holds pointer to data, which is hold somewhere else. It also include a forceSystem, which takes care of the computation of force between particles. The forceSystem is owned by the class ChFsiForce.
Public Member Functions | |
ChFluidDynamics (std::shared_ptr< ChBce > otherBceWorker, std::shared_ptr< ChSystemFsi_impl > otherFsiSystem, std::shared_ptr< SimParams > otherParamsH, std::shared_ptr< NumberOfObjects > otherNumObjects, CHFSI_TIME_INTEGRATOR otherIntegrator) | |
Constructor of the fluid/granular dynamics class. More... | |
~ChFluidDynamics () | |
Destructor of the fluid/granular dynamics class. | |
virtual void | IntegrateSPH (std::shared_ptr< SphMarkerDataD > sphMarkersD2, std::shared_ptr< SphMarkerDataD > sphMarkersD1, std::shared_ptr< FsiBodiesDataD > fsiBodiesD, std::shared_ptr< FsiMeshDataD > fsiMeshD, Real dT) |
Integrate the fluid/granular system in time. More... | |
virtual void | DensityReinitialization () |
Function to Shepard Filtering. More... | |
void | Finalize () |
Synchronize the copy of the data between device (GPU) and host (CPU). More... | |
CHFSI_TIME_INTEGRATOR | GetIntegratorType () |
Return the integrator type used in the simulation. | |
std::shared_ptr< ChFsiForce > | GetForceSystem () |
Return the ChFsiForce type used in the simulation. | |
Public Member Functions inherited from chrono::fsi::ChFsiGeneral | |
ChFsiGeneral (std::shared_ptr< SimParams > hostParams, std::shared_ptr< NumberOfObjects > hostNumObjects) | |
Constructor for the ChFsiGeneral class. More... | |
virtual | ~ChFsiGeneral () |
Destructor of the ChFsiGeneral class. | |
void | computeGridSize (uint n, uint blockSize, uint &numBlocks, uint &numThreads) |
Compute number of blocks and threads for calculation on GPU. More... | |
Protected Member Functions | |
virtual void | UpdateFluid (std::shared_ptr< SphMarkerDataD > sphMarkersD, Real dT) |
Update SPH particles data. More... | |
virtual void | UpdateFluid_Implicit (std::shared_ptr< SphMarkerDataD > sphMarkersD) |
Update SPH particles data. More... | |
virtual void | ApplyBoundarySPH_Markers (std::shared_ptr< SphMarkerDataD > sphMarkersD) |
The function applies periodic boundary to the normal SPH particles. | |
virtual void | ApplyModifiedBoundarySPH_Markers (std::shared_ptr< SphMarkerDataD > sphMarkersD) |
The function modify the velocity of BCE particles. | |
Protected Member Functions inherited from chrono::fsi::ChFsiGeneral | |
uint | iDivUp (uint a, uint b) |
Return a/b or a/b + 1. | |
Protected Attributes | |
std::shared_ptr< ChSystemFsi_impl > | fsiSystem |
FSI data; values are maintained externally. | |
std::shared_ptr< SimParams > | paramsH |
FSI parameters; values are mainained externally. | |
std::shared_ptr< NumberOfObjects > | numObjectsH |
Number of objects (fluid particles, number of rigids, boundaries) | |
std::shared_ptr< ChFsiForce > | forceSystem |
Force system object; calculates the force between particles. | |
CHFSI_TIME_INTEGRATOR | integrator_type |
Integrator type. | |
Constructor & Destructor Documentation
◆ ChFluidDynamics()
chrono::fsi::ChFluidDynamics::ChFluidDynamics | ( | std::shared_ptr< ChBce > | otherBceWorker, |
std::shared_ptr< ChSystemFsi_impl > | otherFsiSystem, | ||
std::shared_ptr< SimParams > | otherParamsH, | ||
std::shared_ptr< NumberOfObjects > | otherNumObjects, | ||
CHFSI_TIME_INTEGRATOR | otherIntegrator | ||
) |
Constructor of the fluid/granular dynamics class.
- Instantiate ChFsiForce, i.e. force system;
- Copy the pointer to SPH particle data, parameters, and number of objects to member variables.
- Parameters
-
otherBceWorker Pointer to the information of BCE particles otherFsiSystem Pointer to the FSI system otherParamsH Pointer to the simulation parameters otherNumObjects Pointer to the number of objects otherIntegrator Pointer to the integration type (only for ISPH)
Member Function Documentation
◆ DensityReinitialization()
|
virtual |
Function to Shepard Filtering.
It calculates the densities directly, not based on the derivative of the density. This function is used in addition to the density update in UpdateFluid.
◆ Finalize()
void chrono::fsi::ChFluidDynamics::Finalize | ( | ) |
Synchronize the copy of the data between device (GPU) and host (CPU).
Including the parameters and number of objects. This function needs to be called once the host data are modified.
◆ IntegrateSPH()
|
virtual |
Integrate the fluid/granular system in time.
The underlying SPH method implementation goes inside this function. In a explicit scheme, to perform the integration, the force system calculates the forces between the particles. Then the forces are used to to update the particles position, velocity, and density in time, the latter is used to update the pressure from an equation of state. In the implicit scheme, the pressures are updated instead of density.
- Parameters
-
sphMarkersD2 Pointer SPH particle information at the second half step sphMarkersD1 Pointer SPH particle information at the first half step fsiBodiesD Pointer information of rigid bodies fsiMeshD Pointer information of flexible mesh dT Simulation stepsize
◆ UpdateFluid()
|
protectedvirtual |
Update SPH particles data.
In an explicit formulation, the function relies on the explicit integration scheme.
◆ UpdateFluid_Implicit()
|
protectedvirtual |
Update SPH particles data.
In an implicit formulation, the function relies on the implicit integration scheme.
The documentation for this class was generated from the following file:
- /builds/uwsbel/chrono/src/chrono_fsi/physics/ChFluidDynamics.cuh