Class to represent the fluid dynamics system.

This class is used to represent a fluid system and take care of the time integration of the fluid 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 markers. The forceSystem is owned by the class.

Inherits chrono::fsi::ChFsiGeneral.

Collaboration diagram for chrono::fsi::ChFluidDynamics:

Public Types

enum  Integrator { IISPH, ExplicitSPH }
 SPH implementation.

Public Member Functions

 ChFluidDynamics (ChBce *otherBceWorker, ChFsiDataManager *otherFsiData, SimParams *otherParamsH, NumberOfObjects *otherNumObjects, ChFluidDynamics::Integrator type)
 Fluid dynamics class constructor. More...
 ~ChFluidDynamics ()
 Class destructor. Deletes the force system.
virtual void IntegrateSPH (SphMarkerDataD *sphMarkersD2, SphMarkerDataD *sphMarkersD1, FsiBodiesDataD *fsiBodiesD, FsiMeshDataD *fsiMeshD, Real dT)
 Integrate the fluid system in time. More...
virtual void DensityReinitialization ()
 Function to Shepard Filtering. More...
void Finalize ()
 Synchronize the copy of the data (parameters and number of objects) between device (GPU) and host (CPU). More...
ChFluidDynamics::Integrator GetIntegratorType ()
ChFsiForceGetForceSystem ()

Protected Member Functions

virtual void UpdateFluid (SphMarkerDataD *sphMarkersD, Real dT)
 Update SPH markers data. More...
virtual void UpdateFluid_Implicit (SphMarkerDataD *sphMarkersD)
virtual void ApplyBoundarySPH_Markers (SphMarkerDataD *sphMarkersD)
 Apply boundary to SPH markers (fluid and BCE). More...
virtual void ApplyModifiedBoundarySPH_Markers (SphMarkerDataD *sphMarkersD)

Protected Attributes

 pointer to the fsi data. The values are maintained externally
 force system object. It calculates the force between markers.
ChFluidDynamics::Integrator myIntegrator
 IISPH by default.
 pointer to parameters. The values are mainained externally.
 pointer to number of objects (fluid markers, number of rigids, boundaries)

Constructor & Destructor Documentation

chrono::fsi::ChFluidDynamics::ChFluidDynamics ( ChBce otherBceWorker,
ChFsiDataManager otherFsiData,
SimParams otherParamsH,
NumberOfObjects otherNumObjects,
ChFluidDynamics::Integrator  type 

Fluid dynamics class constructor.

The class constructor performs the following operations: Instantiate ChFsiForce, i.e. force system; Copy the pointer to fluid data, parameters, and number of objects to member variables.

Member Function Documentation

virtual void chrono::fsi::ChFluidDynamics::ApplyBoundarySPH_Markers ( SphMarkerDataD sphMarkersD)

Apply boundary to SPH markers (fluid and BCE).

The function applies periodic boundary to the markers.

virtual 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.

void chrono::fsi::ChFluidDynamics::Finalize ( )

Synchronize the copy of the data (parameters and number of objects) between device (GPU) and host (CPU).

This function needs to be called once the host data are modified

virtual void chrono::fsi::ChFluidDynamics::IntegrateSPH ( SphMarkerDataD sphMarkersD2,
SphMarkerDataD sphMarkersD1,
FsiBodiesDataD fsiBodiesD,
FsiMeshDataD *  fsiMeshD,
Real  dT 

Integrate the fluid 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 markers 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.

virtual void chrono::fsi::ChFluidDynamics::UpdateFluid ( SphMarkerDataD sphMarkersD,
Real  dT 

Update SPH markers data.

In an explicit formulation, the update Fluid function relies on explicit Euler Integration argorithm.