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 > bce_manager, ChSystemFsi_impl &sysFSI, std::shared_ptr< SimParams > params, std::shared_ptr< ChCounters > numObjects, bool verb) | |
Constructor of the fluid/granular dynamics class. More... | |
~ChFluidDynamics () | |
Destructor of the fluid/granular dynamics class. | |
void | SortParticles () |
Sort particles. | |
void | IntegrateSPH (std::shared_ptr< SphMarkerDataD > sortedSphMarkers2_D, std::shared_ptr< SphMarkerDataD > sortedSphMarkers1_D, std::shared_ptr< FsiBodyStateD > fsiBodyState_D, std::shared_ptr< FsiMeshStateD > fsiMesh1DState_D, std::shared_ptr< FsiMeshStateD > fsiMesh2DState_D, Real dT, Real time, bool firstHalfStep=true) |
Integrate the fluid/granular system in time. More... | |
void | CopySortedToOriginal (std::shared_ptr< SphMarkerDataD > sortedSphMarkersD2, std::shared_ptr< SphMarkerDataD > sphMarkersD) |
Copy from sorted to original. | |
void | DensityReinitialization () |
Function to Shepard Filtering. More... | |
void | Initialize () |
Synchronize the copy of the data between device (GPU) and host (CPU). More... | |
std::shared_ptr< ChFsiForce > | GetForceSystem () |
Return the ChFsiForce type used in the simulation. | |
Public Member Functions inherited from chrono::fsi::ChFsiBase | |
ChFsiBase (std::shared_ptr< SimParams > params, std::shared_ptr< ChCounters > numObjects) | |
Constructor for the ChFsiBase class. More... | |
virtual | ~ChFsiBase () |
Destructor of the ChFsiBase class. | |
Protected Member Functions | |
void | UpdateActivity (std::shared_ptr< SphMarkerDataD > sortedSphMarkers1_D, std::shared_ptr< SphMarkerDataD > sortedSphMarkers2_D, std::shared_ptr< FsiBodyStateD > fsiBodyState_D, std::shared_ptr< FsiMeshStateD > fsiMesh1DState_D, std::shared_ptr< FsiMeshStateD > fsiMesh2DState_D, Real time) |
Update activity of SPH particles. More... | |
void | UpdateFluid (std::shared_ptr< SphMarkerDataD > sortedSphMarkersD, Real dT) |
Update SPH particles data for explicit integration. | |
void | ApplyBoundarySPH_Markers (std::shared_ptr< SphMarkerDataD > sortedSphMarkersD) |
Apply periodic boundary to the normal SPH particles. | |
void | ApplyModifiedBoundarySPH_Markers (std::shared_ptr< SphMarkerDataD > sphMarkersD) |
Mpodify the velocity of BCE particles. More... | |
Protected Attributes | |
ChSystemFsi_impl & | fsiSystem |
FSI data; values are maintained externally. | |
std::shared_ptr< ChFsiForce > | forceSystem |
force system object; calculates the force between particles | |
bool | verbose |
Protected Attributes inherited from chrono::fsi::ChFsiBase | |
std::shared_ptr< SimParams > | paramsH |
simulation parameters (host) | |
std::shared_ptr< ChCounters > | numObjectsH |
problem counters (host) | |
Additional Inherited Members | |
Static Public Member Functions inherited from chrono::fsi::ChFsiBase | |
static void | computeGridSize (uint n, uint blockSize, uint &numBlocks, uint &numThreads) |
Compute number of blocks and threads for calculation on GPU. More... | |
Constructor & Destructor Documentation
◆ ChFluidDynamics()
chrono::fsi::ChFluidDynamics::ChFluidDynamics | ( | std::shared_ptr< ChBce > | bce_manager, |
ChSystemFsi_impl & | sysFSI, | ||
std::shared_ptr< SimParams > | params, | ||
std::shared_ptr< ChCounters > | numObjects, | ||
bool | verb | ||
) |
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
-
bce_manager information on BCE particles sysFSI implementatin FSI system params simulation parameters numObjects problem counters verb verbose output
Member Function Documentation
◆ ApplyModifiedBoundarySPH_Markers()
|
protected |
Mpodify the velocity of BCE particles.
TODO (Huzaifa) - Might need to deprecated this function.
◆ DensityReinitialization()
void chrono::fsi::ChFluidDynamics::DensityReinitialization | ( | ) |
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.
◆ Initialize()
void chrono::fsi::ChFluidDynamics::Initialize | ( | ) |
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()
void chrono::fsi::ChFluidDynamics::IntegrateSPH | ( | std::shared_ptr< SphMarkerDataD > | sortedSphMarkers2_D, |
std::shared_ptr< SphMarkerDataD > | sortedSphMarkers1_D, | ||
std::shared_ptr< FsiBodyStateD > | fsiBodyState_D, | ||
std::shared_ptr< FsiMeshStateD > | fsiMesh1DState_D, | ||
std::shared_ptr< FsiMeshStateD > | fsiMesh2DState_D, | ||
Real | dT, | ||
Real | time, | ||
bool | firstHalfStep = true |
||
) |
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
-
sortedSphMarkers2_D SPH particle information at the second half step sortedSphMarkers1_D SPH particle information at the first half step fsiBodyState_D nformation on rigid bodies fsiMesh1DState_D information of 1-D flexible mesh fsiMesh2DState_D information of 2-D flexible mesh dT simulation stepsize time simulation time firstHalfStep flag to indicate the first half step in case of explicit integration
◆ UpdateActivity()
|
protected |
Update activity of SPH particles.
SPH particles which are in an active domain (e.g., close to a solid) are set as active particles.
The documentation for this class was generated from the following file:
- /builds/uwsbel/chrono/src/chrono_fsi/physics/ChFluidDynamics.cuh