Description

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.

Public Types

enum  Integrator { IISPH, ExplicitSPH, I2SPH }
 SPH implementation.
 

Public Member Functions

 ChFluidDynamics (std::shared_ptr< ChBce > otherBceWorker, std::shared_ptr< ChFsiDataManager > otherFsiData, std::shared_ptr< SimParams > otherParamsH, std::shared_ptr< NumberOfObjects > otherNumObjects, ChFluidDynamics::Integrator type)
 Fluid dynamics class constructor. More...
 
 ~ChFluidDynamics ()
 Class destructor. Deletes the force system.
 
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 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 ()
 
std::shared_ptr< ChFsiForceGetForceSystem ()
 

Protected Member Functions

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

Protected Attributes

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

Constructor & Destructor Documentation

◆ ChFluidDynamics()

chrono::fsi::ChFluidDynamics::ChFluidDynamics ( std::shared_ptr< ChBce otherBceWorker,
std::shared_ptr< ChFsiDataManager otherFsiData,
std::shared_ptr< SimParams >  otherParamsH,
std::shared_ptr< 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

◆ ApplyBoundarySPH_Markers()

virtual void chrono::fsi::ChFluidDynamics::ApplyBoundarySPH_Markers ( std::shared_ptr< SphMarkerDataD sphMarkersD)
protectedvirtual

Apply boundary to SPH markers (fluid and BCE).

The function applies periodic boundary to the markers.

◆ DensityReinitialization()

virtual void chrono::fsi::ChFluidDynamics::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 (parameters and number of objects) between device (GPU) and host (CPU).

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

◆ IntegrateSPH()

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

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.

◆ UpdateFluid()

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

Update SPH markers data.

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


The documentation for this class was generated from the following file:
  • /builds/uwsbel/chrono/src/chrono_fsi/physics/ChFluidDynamics.cuh