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.

Inheritance diagram for chrono::fsi::ChFluidDynamics:
Collaboration diagram for chrono::fsi::ChFluidDynamics:

Public Member Functions

 ChFluidDynamics (std::shared_ptr< ChBce > otherBceWorker, ChSystemFsi_impl &otherFsiSystem, std::shared_ptr< SimParams > otherParamsH, std::shared_ptr< ChCounters > otherNumObjects, TimeIntegrator otherIntegrator, bool verb)
 Constructor of the fluid/granular dynamics class. More...
 
 ~ChFluidDynamics ()
 Destructor of the fluid/granular dynamics class.
 
void IntegrateSPH (std::shared_ptr< SphMarkerDataD > sphMarkersD2, std::shared_ptr< SphMarkerDataD > sphMarkersD1, std::shared_ptr< FsiBodiesDataD > fsiBodiesD, std::shared_ptr< FsiMeshDataD > fsiMeshD, Real dT, Real Time)
 Integrate the fluid/granular system in time. More...
 
void DensityReinitialization ()
 Function to Shepard Filtering. More...
 
void Initialize ()
 Synchronize the copy of the data between device (GPU) and host (CPU). More...
 
TimeIntegrator GetIntegratorType ()
 Return the integrator type used in the simulation.
 
std::shared_ptr< ChFsiForceGetForceSystem ()
 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< ChCounters > 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

void UpdateActivity (std::shared_ptr< SphMarkerDataD > sphMarkersD1, std::shared_ptr< SphMarkerDataD > sphMarkersD2, std::shared_ptr< FsiBodiesDataD > fsiBodiesD, std::shared_ptr< FsiMeshDataD > fsiMeshD, Real Time)
 Update activity of SPH particles. More...
 
void UpdateFluid (std::shared_ptr< SphMarkerDataD > sphMarkersD, Real dT)
 Update SPH particles data. More...
 
void UpdateFluid_Implicit (std::shared_ptr< SphMarkerDataD > sphMarkersD)
 Update SPH particles data. More...
 
void ApplyBoundarySPH_Markers (std::shared_ptr< SphMarkerDataD > sphMarkersD)
 The function applies periodic boundary to the normal SPH particles.
 
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

ChSystemFsi_implfsiSystem
 FSI data; values are maintained externally.
 
std::shared_ptr< SimParamsparamsH
 FSI parameters; values are mainained externally.
 
std::shared_ptr< ChCountersnumObjectsH
 counters (fluid particles, number of rigids, boundaries)
 
std::shared_ptr< ChFsiForceforceSystem
 Force system object; calculates the force between particles.
 
TimeIntegrator integrator_type
 Integrator type.
 
bool verbose
 

Constructor & Destructor Documentation

◆ ChFluidDynamics()

chrono::fsi::ChFluidDynamics::ChFluidDynamics ( std::shared_ptr< ChBce otherBceWorker,
ChSystemFsi_impl otherFsiSystem,
std::shared_ptr< SimParams otherParamsH,
std::shared_ptr< ChCounters otherNumObjects,
TimeIntegrator  otherIntegrator,
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
otherBceWorkerPointer to the information of BCE particles
otherFsiSystemPointer to the FSI system
otherParamsHPointer to the simulation parameters
otherNumObjectsPointer to the number of objects
otherIntegratorIntegration type (only for ISPH)
verbverbose terminal output

Member Function Documentation

◆ 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 sphMarkersD2,
std::shared_ptr< SphMarkerDataD sphMarkersD1,
std::shared_ptr< FsiBodiesDataD fsiBodiesD,
std::shared_ptr< FsiMeshDataD fsiMeshD,
Real  dT,
Real  Time 
)

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
sphMarkersD2Pointer SPH particle information at the second half step
sphMarkersD1Pointer SPH particle information at the first half step
fsiBodiesDPointer information of rigid bodies
fsiMeshDPointer information of flexible mesh
dTSimulation stepsize
TimeSimulation time

◆ UpdateActivity()

void chrono::fsi::ChFluidDynamics::UpdateActivity ( std::shared_ptr< SphMarkerDataD sphMarkersD1,
std::shared_ptr< SphMarkerDataD sphMarkersD2,
std::shared_ptr< FsiBodiesDataD fsiBodiesD,
std::shared_ptr< FsiMeshDataD fsiMeshD,
Real  Time 
)
protected

Update activity of SPH particles.

SPH particles which are in an active domain are set as active particles. For example, particles close to a rigid body.

◆ UpdateFluid()

void chrono::fsi::ChFluidDynamics::UpdateFluid ( std::shared_ptr< SphMarkerDataD sphMarkersD,
Real  dT 
)
protected

Update SPH particles data.

In an explicit formulation, the function relies on the explicit integration scheme.

◆ UpdateFluid_Implicit()

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

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