Description

Base class for an FSI-aware fluid solver.

#include <ChFsiFluidSystem.h>

Inheritance diagram for chrono::fsi::ChFsiFluidSystem:

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 ()
 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 OnDoStepDynamics (double time, double step)=0
 Function to integrate the FSI fluid system from time to time + step.
 
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 Member Functions

virtual void Initialize (const std::vector< FsiBody > &fsi_bodies, const std::vector< FsiMesh1D > &fsi_meshes1D, const std::vector< FsiMesh2D > &fsi_meshes2D, const std::vector< FsiBodyState > &body_states, const std::vector< FsiMeshState > &mesh1D_states, const std::vector< FsiMeshState > &mesh2D_states, bool use_node_directions)=0
 Initialize the fluid system using initial states of solid FSI objects. 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
 
unsigned int m_frame
 current simulation frame
 

Friends

class ChFsiSystem
 

Member Function Documentation

◆ Initialize()

virtual void chrono::fsi::ChFsiFluidSystem::Initialize ( const std::vector< FsiBody > &  fsi_bodies,
const std::vector< FsiMesh1D > &  fsi_meshes1D,
const std::vector< FsiMesh2D > &  fsi_meshes2D,
const std::vector< FsiBodyState > &  body_states,
const std::vector< FsiMeshState > &  mesh1D_states,
const std::vector< FsiMeshState > &  mesh2D_states,
bool  use_node_directions 
)
protectedpure virtual

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

A call to this function marks completion of the fluid system construction and can only be made from ChFsiSystem. The boolean has_node_directions indicates whether or not mesh states also contain node directions.

◆ LoadSolidStates()

virtual void chrono::fsi::ChFsiFluidSystem::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).

◆ StoreSolidForces()

virtual void chrono::fsi::ChFsiFluidSystem::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/ChFsiFluidSystem.h
  • /builds/uwsbel/chrono/src/chrono_fsi/ChFsiFluidSystem.cpp