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>


Classes | |
| class | MBDCallback |
| Class to specify step dynamics for the associated multibody system. More... | |
Public Member Functions | |
| virtual | ~ChFsiSystem () |
| Destructor for the FSI system. | |
| void | AttachFluidSystem (ChFsiFluidSystem *sys) |
| Attach a fluid system. | |
| void | AttachMultibodySystem (ChSystem *sys) |
| Attach a MBS system. | |
| ChFsiFluidSystem & | GetFluidSystem () const |
| Access the associated fluid system. | |
| ChSystem & | GetMultibodySystem () const |
| Access the associated multibody system. | |
| ChFsiInterface & | GetFsiInterface () 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 system. More... | |
| void | SetStepSizeCFD (double step) |
| Set integration step size for fluid dynamics. | |
| void | SetStepsizeMBD (double step) |
| Set integration step size for multibody dynamics. More... | |
| std::shared_ptr< FsiBody > | AddFsiBody (std::shared_ptr< ChBody > body, std::shared_ptr< ChBodyGeometry > geometry, bool check_embedded) |
| Add a rigid body to the FSI system. | |
| 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 std::vector< std::shared_ptr< FsiBody > > & | GetBodies () const |
| Get a list of the FSI rigid bodies. | |
| const ChVector3d & | GetFsiBodyForce (size_t i) const |
| Return the FSI applied force on the body with specified index (as returned by AddFsiBody). More... | |
| const ChVector3d & | GetFsiBodyTorque (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 | |
| ChSystem * | m_sysMBS |
| multibody system | |
| ChFsiFluidSystem * | m_sysCFD |
| FSI fluid solver. | |
| std::shared_ptr< ChFsiInterface > | m_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()
|
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
◆ 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;
- advance multibody dynamics (MBD) to new data exchange point;
- extract (from fluid system) and apply (to MBS) fluid forces on FSI solid objects;
- extract (from MBS) and apply (to fluid system) new states for FSI solid objects; Notes:
- no data exchange is performed before the first step; this assumes that FSI solid states and FSI solid forces are properly initialized
- 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()
|
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;
Reimplemented in chrono::fsi::sph::ChFsiSystemSPH, and chrono::fsi::tdpf::ChFsiSystemTDPF.
◆ RegisterMBDCallback()
|
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 system.
This function sets gravity for both the fluid and multibody systems.
◆ SetRtf()
|
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