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.

Collaboration diagram for chrono::fsi::sph::ChFluidDynamics:

Public Member Functions

 ChFluidDynamics (FsiDataManager &data_mgr, BceManager &bce_mgr, bool verbose)
 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, Real dT, Real time, bool firstHalfStep=true)
 Integrate the fluid/granular system in time. More...
 
void CopySortedToOriginal (MarkerGroup group, std::shared_ptr< SphMarkerDataD > sortedSphMarkersD2, std::shared_ptr< SphMarkerDataD > sphMarkersD)
 Copy markers in the specified group from sorted arrays to original-order arrays.
 
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< ChFsiForceGetForceSystem ()
 Return the ChFsiForce type used in the simulation.
 

Protected Member Functions

void UpdateActivity (std::shared_ptr< SphMarkerDataD > sortedSphMarkers1_D, std::shared_ptr< SphMarkerDataD > sortedSphMarkers2_D)
 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)
 Modify the velocity of BCE particles. More...
 

Protected Attributes

FsiDataManagerm_data_mgr
 FSI data manager.
 
std::shared_ptr< ChFsiForceforceSystem
 force system object; calculates the force between particles
 
bool m_verbose
 

Constructor & Destructor Documentation

◆ ChFluidDynamics()

chrono::fsi::sph::ChFluidDynamics::ChFluidDynamics ( FsiDataManager data_mgr,
BceManager bce_mgr,
bool  verbose 
)

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
data_mgrFSI data manager
bce_mgrBCE manager
verboseverbose output

Member Function Documentation

◆ ApplyModifiedBoundarySPH_Markers()

void chrono::fsi::sph::ChFluidDynamics::ApplyModifiedBoundarySPH_Markers ( std::shared_ptr< SphMarkerDataD sphMarkersD)
protected

Modify the velocity of BCE particles.

TODO (Huzaifa) - Might need to deprecated this function.

◆ DensityReinitialization()

void chrono::fsi::sph::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::sph::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::sph::ChFluidDynamics::IntegrateSPH ( std::shared_ptr< SphMarkerDataD sortedSphMarkers2_D,
std::shared_ptr< SphMarkerDataD sortedSphMarkers1_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_DSPH particle information at the second half step
sortedSphMarkers1_DSPH particle information at the first half step
dTsimulation stepsize
timesimulation time
firstHalfStepflag to indicate the first half step in case of explicit integration

◆ UpdateActivity()

void chrono::fsi::sph::ChFluidDynamics::UpdateActivity ( std::shared_ptr< SphMarkerDataD sortedSphMarkers1_D,
std::shared_ptr< SphMarkerDataD sortedSphMarkers2_D 
)
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/sph/physics/ChFluidDynamics.cuh