Description

Base class for a system for fluid-solid interaction problems.

This class is used to represent fluid-solid interaction problems consisting of fluid dynamics and multibody system. Each of the two underlying physics is an independent object owned and instantiated by this class. A derived class must always set the FSI interface for coupling the two physics systems.

#include <ChFsiSystem.h>

Inheritance diagram for chrono::fsi::ChFsiSystem:
Collaboration diagram for chrono::fsi::ChFsiSystem:

Classes

class  MBDCallback
 Class to specify step dynamics for the associated multibody system. More...
 

Public Member Functions

virtual ~ChFsiSystem ()
 Destructor for the FSI system.
 
ChFsiFluidSystemGetFluidSystem () const
 Access the associated fluid system.
 
ChSystemGetMultibodySystem () const
 Access the associated multibody system.
 
ChFsiInterfaceGetFsiInterface () const
 Access the associated FSI interface.
 
void SetVerbose (bool verbose)
 Enable/disable verbose terminal output (default: true). More...
 
void SetGravitationalAcceleration (const ChVector3d &gravity)
 Set gravitational acceleration for the FSI syatem. More...
 
void SetStepSizeCFD (double step)
 Set integration step size for fluid dynamics.
 
void SetStepsizeMBD (double step)
 Set integration step size for multibody dynamics. More...
 
size_t AddFsiBody (std::shared_ptr< ChBody > body)
 Add a rigid body to the FSI system. More...
 
void AddFsiMesh (std::shared_ptr< fea::ChMesh > mesh)
 Add an FEA mesh to the FSI system. More...
 
virtual void Initialize ()
 Initialize the FSI system. More...
 
void RegisterMBDCallback (std::shared_ptr< MBDCallback > callback)
 Set a custom function for advancing the dynamics of the associated multibody system. More...
 
void DoStepDynamics (double step)
 Function to advance the FSI system combined state. More...
 
double GetSimTime () const
 Get current simulation time.
 
double GetStepSizeMBD () const
 Get the integration step size for multibody dynamics.
 
double GetStepSizeCFD () const
 Get the integration step size for fluid dynamics.
 
double GetRtf () const
 Get current estimated RTF (real time factor) for the coupled problem.
 
void SetRtf (double rtf)
 Set RTF value for the coupled problem. More...
 
double GetRtfCFD () const
 Get current estimated RTF (real time factor) for the fluid system.
 
double GetRtfMBD () const
 Get current estimated RTF (real time factor) for the multibody system.
 
double GetRatioMBD () const
 Get ratio of simulation time spent in MBS integration.
 
double GetTimerStep () const
 Return the time in seconds for for simulating the last step.
 
double GetTimerCFD () const
 Return the time in seconds for fluid dynamics over the last step.
 
double GetTimerMBD () const
 Return the time in seconds for multibody dynamics over the last step.
 
double GetTimerFSI () const
 Return the time in seconds for data exchange between phases over the last step.
 
const ChVector3dGetFsiBodyForce (size_t i) const
 Return the FSI applied force on the body with specified index (as returned by AddFsiBody). More...
 
const ChVector3dGetFsiBodyTorque (size_t i) const
 Return the FSI applied torque on the body with specified index (as returned by AddFsiBody). More...
 

Protected Member Functions

 ChFsiSystem (ChSystem &sysMBS, ChFsiFluidSystem &sysCFD)
 Construct an FSI system coupling the provided multibody and fluid systems. More...
 

Protected Attributes

ChSystemm_sysMBS
 multibody system
 
ChFsiFluidSystemm_sysCFD
 FSI fluid solver.
 
std::shared_ptr< ChFsiInterfacem_fsi_interface
 FSI interface system.
 
bool m_verbose
 enable/disable m_verbose terminal output
 
bool m_is_initialized
 set to true once the Initialize function is called
 

Constructor & Destructor Documentation

◆ ChFsiSystem()

chrono::fsi::ChFsiSystem::ChFsiSystem ( ChSystem sysMBS,
ChFsiFluidSystem sysCFD 
)
protected

Construct an FSI system coupling the provided multibody and fluid systems.

Derived classes must also construct and set the FSI interface (m_fsi_interface).

Member Function Documentation

◆ AddFsiBody()

size_t chrono::fsi::ChFsiSystem::AddFsiBody ( std::shared_ptr< ChBody body)

Add a rigid body to the FSI system.

Returns the index of the FSI body in the internal list.

◆ AddFsiMesh()

void chrono::fsi::ChFsiSystem::AddFsiMesh ( std::shared_ptr< fea::ChMesh mesh)

Add an FEA mesh to the FSI system.

Contact surfaces (of type segment_set or tri_mesh) already defined for the FEA mesh are used to generate the interface between the solid and fluid phases. If none are defined, one contact surface of each type is created (as needed), but these are not attached to the given FEA mesh.

◆ DoStepDynamics()

void chrono::fsi::ChFsiSystem::DoStepDynamics ( double  step)

Function to advance the FSI system combined state.

This implements an explicit force-displacement co-simulation step:

  • advance fluid dynamics (CFD) to new data exchange point;
  • apply fluid forces on solid objects;
  • advance multibody dynamics (MBD) to new data exchange point;
  • extract new states for FSI solid objects; Notes:
  • CFD advance calls ChFsiFluidSystem::DoStepDynamics multiple times (see SetStepsizeCFD);
  • MBD advance is executed in a separate, concurrent thread and does not block execution;
  • the caller can register a custom callback (of type ChFsiSystem::MBDCallback) to control MBD advance;
  • if MBDCallback not provided, MBD advance calls ChSystem::DoStepDynamics multiple times (see SetStepsizeMBD);

◆ GetFsiBodyForce()

const ChVector3d & chrono::fsi::ChFsiSystem::GetFsiBodyForce ( size_t  i) const

Return the FSI applied force on the body with specified index (as returned by AddFsiBody).

The force is applied at the body COM and is expressed in the absolute frame.

◆ GetFsiBodyTorque()

const ChVector3d & chrono::fsi::ChFsiSystem::GetFsiBodyTorque ( size_t  i) const

Return the FSI applied torque on the body with specified index (as returned by AddFsiBody).

The torque is expressed in the absolute frame.

◆ Initialize()

void chrono::fsi::ChFsiSystem::Initialize ( )
virtual

Initialize the FSI system.

A call to this function marks the completion of system construction. The default implementation performs the following operations:

  • check that an associated FSI interface was created and a value for integration step size was provided;
  • initialize the FSI interface;
  • get initial solid states from the FSI interface;
  • initialize the associated fluid solver, passing the initial solid states;

◆ RegisterMBDCallback()

void chrono::fsi::ChFsiSystem::RegisterMBDCallback ( std::shared_ptr< MBDCallback callback)
inline

Set a custom function for advancing the dynamics of the associated multibody system.

If not provided, the MBS system is integrated with the specified step size (see SetStepsizeMBD) by calling ChSystem::DoStepDynamics.

◆ SetGravitationalAcceleration()

void chrono::fsi::ChFsiSystem::SetGravitationalAcceleration ( const ChVector3d gravity)

Set gravitational acceleration for the FSI syatem.

This function sets gravity for both the fluid and multibody systems.

◆ SetRtf()

void chrono::fsi::ChFsiSystem::SetRtf ( double  rtf)
inline

Set RTF value for the coupled problem.

This is necessary for correct reporting if automatic integration of the multibody system dynamics is disabled and performed externally.

◆ SetStepsizeMBD()

void chrono::fsi::ChFsiSystem::SetStepsizeMBD ( double  step)

Set integration step size for multibody dynamics.

If a value is not provided, the MBS system is integrated with the same step used for fluid dynamics.

◆ SetVerbose()

void chrono::fsi::ChFsiSystem::SetVerbose ( bool  verbose)

Enable/disable verbose terminal output (default: true).

The default implementation sets the verbose mode for the FSI system and the underlying FSI interface.


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono_fsi/ChFsiSystem.h
  • /builds/uwsbel/chrono/src/chrono_fsi/ChFsiSystem.cpp