chrono::fsi::ChFluidSystem Class Referenceabstract

Description

Base class for an FSI-aware fluid solver.

#include <ChFluidSystem.h>

Inheritance diagram for chrono::fsi::ChFluidSystem:

Public Member Functions

void SetVerbose (bool verbose)
 Enable/disable verbose terminal output (default: true).
 
virtual void SetGravitationalAcceleration (const ChVector3d &gravity)=0
 Set gravity for the fluid syatem.
 
void SetStepSize (double step)
 Set integration step size.
 
virtual void Initialize (unsigned int num_fsi_bodies, unsigned int num_fsi_nodes1D, unsigned int num_fsi_elements1D, unsigned int num_fsi_nodes2D, unsigned int num_fsi_elements2D, const std::vector< FsiBodyState > &body_states, const std::vector< FsiMeshState > &mesh1D_states, const std::vector< FsiMeshState > &mesh2D_states)
 Initialize the fluid system using initial states of solid FSI objects. More...
 
virtual void Initialize ()
 Initialize the fluid system with no FSI support.
 
void DoStepDynamics (double step)
 Function to integrate the FSI fluid system in time.
 
double GetSimTime () const
 Get current simulation time.
 
double GetStepSize () const
 Get the integration step size.
 
double GetRtf () const
 Get current estimated RTF (real time factor).
 
double GetTimerStep () const
 Return the time in seconds for fluid dynamics over the last step.
 
virtual void OnAddFsiBody (unsigned int index, FsiBody &fsi_body)=0
 Additional actions taken after adding a rigid body to the FSI system.
 
virtual void OnAddFsiMesh1D (unsigned int index, FsiMesh1D &fsi_mesh)=0
 Additional actions taken after adding a 1-D flexible mesh to the FSI system.
 
virtual void OnAddFsiMesh2D (unsigned int index, FsiMesh2D &fsi_mesh)=0
 Additional actions taken after adding a 2-D flexible mesh to the FSI system.
 
virtual void OnDoStepDynamics (double step)=0
 Function to integrate the FSI fluid system in time. More...
 
virtual void OnExchangeSolidForces ()=0
 Additional actions taken before applying fluid forces to the solid phase.
 
virtual void OnExchangeSolidStates ()=0
 Additional actions taken after loading new solid phase states.
 
virtual void LoadSolidStates (const std::vector< FsiBodyState > &body_states, const std::vector< FsiMeshState > &mesh1D_states, const std::vector< FsiMeshState > &mesh2D_states)=0
 Load FSI body and mesh node states from the given vectors. More...
 
virtual void StoreSolidForces (std::vector< FsiBodyForce > body_forces, std::vector< FsiMeshForce > mesh1D_forces, std::vector< FsiMeshForce > mesh2D_forces)=0
 Store the body and mesh node forces to the given vectors. More...
 

Protected Attributes

bool m_verbose
 enable/disable m_verbose terminal output
 
std::string m_outdir
 output directory
 
bool m_is_initialized
 set to true once the Initialize function is called
 
double m_step
 time step for fluid dynamics
 
double m_time
 current fluid dynamics simulation time
 

Member Function Documentation

◆ Initialize()

void chrono::fsi::ChFluidSystem::Initialize ( unsigned int  num_fsi_bodies,
unsigned int  num_fsi_nodes1D,
unsigned int  num_fsi_elements1D,
unsigned int  num_fsi_nodes2D,
unsigned int  num_fsi_elements2D,
const std::vector< FsiBodyState > &  body_states,
const std::vector< FsiMeshState > &  mesh1D_states,
const std::vector< FsiMeshState > &  mesh2D_states 
)
virtual

Initialize the fluid system using initial states of solid FSI objects.

A call to this function marks completion of the fluid system construction.

Reimplemented in chrono::fsi::ChFluidSystemSPH.

◆ LoadSolidStates()

virtual void chrono::fsi::ChFluidSystem::LoadSolidStates ( const std::vector< FsiBodyState > &  body_states,
const std::vector< FsiMeshState > &  mesh1D_states,
const std::vector< FsiMeshState > &  mesh2D_states 
)
pure virtual

Load FSI body and mesh node states from the given vectors.

The functions LoadSolidStates and StoreSolidForces allow using a generic FSI interface. However, a concrete fluid system can be paired with a corresponding FSI interface, both of which work on the same data structures; in that case, the custom FSI interface need not use the mechanism provided by LoadSolidStates and StoreSolidForces (which incur the cost of additional data copies).

◆ OnDoStepDynamics()

virtual void chrono::fsi::ChFluidSystem::OnDoStepDynamics ( double  step)
pure virtual

Function to integrate the FSI fluid system in time.

Derived classes are responsible for updating the simulation time (m_time).

◆ StoreSolidForces()

virtual void chrono::fsi::ChFluidSystem::StoreSolidForces ( std::vector< FsiBodyForce body_forces,
std::vector< FsiMeshForce mesh1D_forces,
std::vector< FsiMeshForce mesh2D_forces 
)
pure virtual

Store the body and mesh node forces to the given vectors.

The functions LoadSolidStates and StoreSolidForces allow using a generic FSI interface. However, a concrete fluid system can be paired with a corresponding FSI interface, both of which work on the same data structures; in that case, the custom FSI interface need not use the mechanism provided by LoadSolidStates and StoreSolidForces (which incur the cost of additional data copies).


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