Description
Base class for interfacing between a Chrono system and an FSI-aware fluid system.
This class provides the functionality of extracting state information from the Chrono MBS and loading fluid forces acting on the MBS solids. This base class also provides utilities for allocating the exchange data structures, verifying sizes of the exchange data vectors, and a default implementation for calculating FEA node direction vectors. A derived class must implement the actual functions for exchanging data between the two systems.
#include <ChFsiInterface.h>


Public Member Functions | |
| void | SetVerbose (bool verbose) |
| void | AttachMultibodySystem (ChSystem *sys) |
| std::shared_ptr< FsiBody > | AddFsiBody (std::shared_ptr< ChBody > body, std::shared_ptr< utils::ChBodyGeometry > geometry, bool check_embedded) |
| Add a rigid body. More... | |
| virtual void | Initialize () |
| Initialize the FSI interface. | |
| unsigned int | GetNumBodies () const |
| Get the number of FSI bodies. | |
| const std::vector< std::shared_ptr< FsiBody > > & | GetBodies () const |
| Get read-only access to the set of bodies added to the FSI interface. | |
| std::vector< std::shared_ptr< FsiBody > > & | GetBodies () |
| Get writable access to the set of bodies added to the FSI interface. | |
| const ChVector3d & | GetFsiBodyForce (size_t i) const |
| Return the FSI applied force on the body with specified index. More... | |
| const ChVector3d & | GetFsiBodyTorque (size_t i) const |
| Return the FSI applied torque on the body with specified index. More... | |
| void | AllocateStateVectors (std::vector< FsiBodyState > &body_states) const |
| Utility function to allocate state vectors. | |
| void | AllocateForceVectors (std::vector< FsiBodyForce > &body_forces) const |
| Utility function to allocate force vectors. | |
| bool | CheckStateVectors (const std::vector< FsiBodyState > &body_states) const |
| Utility function to check sizes of state vectors. | |
| bool | CheckForceVectors (const std::vector< FsiBodyForce > &body_forces) const |
| Utility function to check sizes of force vectors. | |
| void | StoreSolidStates (std::vector< FsiBodyState > &body_states) |
| Utility function to get current solid phase states from the multibody system in the provided structures. More... | |
| void | LoadSolidForces (std::vector< FsiBodyForce > &body_forces) |
| Utility function to apply forces in the provided structures to the multibody system. More... | |
| virtual void | ExchangeSolidStates ()=0 |
| Exchange solid phase state information between the MBS and fluid system. More... | |
| virtual void | ExchangeSolidForces ()=0 |
| Exchange solid phase force information between the multibody and fluid systems. More... | |
Protected Member Functions | |
| ChFsiInterface (ChSystem *sysMBS, ChFsiFluidSystem *sysCFD) | |
Protected Attributes | |
| bool | m_verbose |
| bool | m_initialized |
| NodeDirectionsMode | m_node_directions_mode |
| ChSystem * | m_sysMBS |
| ChFsiFluidSystem * | m_sysCFD |
| std::vector< std::shared_ptr< FsiBody > > | m_fsi_bodies |
| rigid bodies exposed to the FSI system | |
Member Function Documentation
◆ AddFsiBody()
| std::shared_ptr< FsiBody > chrono::fsi::ChFsiInterface::AddFsiBody | ( | std::shared_ptr< ChBody > | body, |
| std::shared_ptr< utils::ChBodyGeometry > | geometry, | ||
| bool | check_embedded | ||
| ) |
Add a rigid body.
The fluid-solid interaction is based on the provided rigid geometry. If geometry=nullptr, it is assumed that the interaction geometry is provided separately.
◆ ExchangeSolidForces()
|
pure virtual |
Exchange solid phase force information between the multibody and fluid systems.
- Extract fluid forces on rigid bodies from fluid system and apply them as external loads to the MBS.
- Extract fluid forces on mesh nodes from fluid system and apply them as external loads to the MBS.
Implemented in chrono::fsi::sph::ChFsiInterfaceSPH, and chrono::fsi::tdpf::ChFsiInterfaceTDPF.
◆ ExchangeSolidStates()
|
pure virtual |
Exchange solid phase state information between the MBS and fluid system.
- Extract FSI body states from MBS and apply them to the fluid system.
- Extract FSI mesh node states from MBS and apply them to the fluid system.
Implemented in chrono::fsi::sph::ChFsiInterfaceSPH, and chrono::fsi::tdpf::ChFsiInterfaceTDPF.
◆ GetFsiBodyForce()
| const ChVector3d & chrono::fsi::ChFsiInterface::GetFsiBodyForce | ( | size_t | i | ) | const |
Return the FSI applied force on the body with specified index.
The force is applied at the body COM and is expressed in the absolute frame.
◆ GetFsiBodyTorque()
| const ChVector3d & chrono::fsi::ChFsiInterface::GetFsiBodyTorque | ( | size_t | i | ) | const |
Return the FSI applied torque on the body with specified index.
The torque is expressed in the absolute frame.
◆ LoadSolidForces()
| void chrono::fsi::ChFsiInterface::LoadSolidForces | ( | std::vector< FsiBodyForce > & | body_forces | ) |
Utility function to apply forces in the provided structures to the multibody system.
A derived class may use this function in its implementation of ExchangeSolidForces. A runtime exception is thrown if the output vectors do not have the appropriate sizes.
◆ StoreSolidStates()
| void chrono::fsi::ChFsiInterface::StoreSolidStates | ( | std::vector< FsiBodyState > & | body_states | ) |
Utility function to get current solid phase states from the multibody system in the provided structures.
This function is always called once during initialization of the containing ChFsiSystem. During simulation, a derived class may use this function in its implementation of ExchangeSolidStates. A runtime exception is thrown if the output vectors do not have the appropriate sizes.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_fsi/ChFsiInterface.h
- /builds/uwsbel/chrono/src/chrono_fsi/ChFsiInterface.cpp