chrono::fsi::ChSystemFsi Class Reference

Description

Physical 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. Additionally, the FSI system owns other objects to handle the interface between the two systems, boundary condition enforcing markers, and data.

#include <ChSystemFsi.h>

Public Member Functions

 ChSystemFsi (ChSystem &other_physicalSystem, CHFSI_TIME_INTEGRATOR time_integrator=CHFSI_TIME_INTEGRATOR::ExplicitSPH)
 Constructor for FSI system.
 
 ~ChSystemFsi ()
 Destructor for the FSI system.
 
void DoStepDynamics_FSI ()
 Function to integrate the FSI system in time. More...
 
void DoStepDynamics_ChronoRK2 ()
 Function to integrate the multibody system dynamics based on Runge-Kutta 2nd-order integration scheme.
 
void CopyDeviceDataToHalfStep ()
 Function to initialize the midpoint device data of the fluid system by copying from the full step.
 
void FinalizeData ()
 Fill out the dependent data based on the independent one. More...
 
std::shared_ptr< ChSystemFsi_implGetFsiData ()
 Get a pointer to the data manager.
 
void SetFluidSystemLinearSolver (ChFsiLinearSolver::SolverType other_solverType)
 Set the linear system solver for implicit methods.
 
void SetFluidDynamics (fluid_dynamics params_type=fluid_dynamics::I2SPH)
 Set the SPH method to be used for fluid dynamics.
 
std::shared_ptr< SimParamsGetSimParams ()
 Get a pointer to the parameters used to set up the simulation.
 
std::vector< std::shared_ptr< ChBody > > & GetFsiBodies ()
 Get a reference to the FSI bodies. More...
 
std::vector< std::shared_ptr< fea::ChElementCableANCF > > & GetFsiCables ()
 Get a reference to the FSI ChElementCableANCF. More...
 
std::vector< std::shared_ptr< fea::ChElementShellANCF_3423 > > & GetFsiShells ()
 Get a reference to the FSI ChElementShellANCF_3423. More...
 
std::vector< std::shared_ptr< fea::ChNodeFEAxyzD > > & GetFsiNodes ()
 Get a reference to the FSI ChNodeFEAxyzD. More...
 
void AddFsiBody (std::shared_ptr< ChBody > mbody)
 Add FSI body to the FsiSystem.
 
void Finalize ()
 Complete construction of the FSI system (fluid and BDE objects).
 
void SetCableElementsNodes (std::vector< std::vector< int >> elementsNodes)
 Finalize the construction of cable elements in the FSI system.
 
void SetShellElementsNodes (std::vector< std::vector< int >> elementsNodes)
 Finalize the construction of cable elements in the FSI system.
 
void SetFsiMesh (std::shared_ptr< fea::ChMesh > other_fsi_mesh)
 Set the FSI mesh for flexible elements.
 
void SetParticleOutputMode (CHFSI_OUTPUT_MODE mode)
 Set the FSI system output mode (default: NONE).
 
void WriteParticleFile (const std::string &outfilename) const
 Write FSI system particle output.
 
void PrintParticleToFile (const std::string &out_dir) const
 Save the SPH particle information into files. More...
 
void AddSphMarker (const ChVector<> &point, double rho0, double pres0, double mu0, double h, double particle_type, const ChVector<> &velocity=ChVector<>(0), const ChVector<> &tauXxYyZz=ChVector<>(0), const ChVector<> &tauXyXzYz=ChVector<>(0))
 Add SPH particle's information into the FSI system.
 
void AddRefArray (const int start, const int numPart, const int typeA, const int typeB)
 Add reference array for SPH particles.
 
void AddBceBox (std::shared_ptr< SimParams > paramsH, std::shared_ptr< ChBody > body, const ChVector<> &relPos, const ChQuaternion<> &relRot, const ChVector<> &size, int plane=12)
 Add BCE particle for a box.
 
void AddBceCylinder (std::shared_ptr< SimParams > paramsH, std::shared_ptr< ChBody > body, const ChVector<> &relPos, const ChQuaternion<> &relRot, double radius, double height, double kernel_h, bool cartesian=true)
 Add BCE particle for a cylinder.
 
void AddBceFromPoints (std::shared_ptr< SimParams > paramsH, std::shared_ptr< ChBody > body, const std::vector< ChVector<>> &points, const ChVector<> &collisionShapeRelativePos, const ChQuaternion<> &collisionShapeRelativeRot)
 Add BCE particles from a set of points.
 
void AddBceFile (std::shared_ptr< SimParams > paramsH, std::shared_ptr< ChBody > body, const std::string &dataPath, const ChVector<> &collisionShapeRelativePos, const ChQuaternion<> &collisionShapeRelativeRot, double scale, bool isSolid=true)
 Add BCE particle from a file.
 
void AddBceFromMesh (std::shared_ptr< SimParams > paramsH, std::shared_ptr< fea::ChMesh > my_mesh, const std::vector< std::vector< int >> &NodeNeighborElement, const std::vector< std::vector< int >> &_1D_elementsNodes, const std::vector< std::vector< int >> &_2D_elementsNodes, bool add1DElem, bool add2DElem, bool multiLayer, bool removeMiddleLayer, int SIDE, int SIZE2D)
 Add BCE particle from mesh.
 
void SetSimParameter (const std::string &inputJson, std::shared_ptr< SimParams > paramsH, const ChVector<> &box_size)
 Set FSI parameters from a JSON file.
 
void SetBoundaries (const ChVector<> &cMin, const ChVector<> &cMax, std::shared_ptr< SimParams > paramsH)
 Set Periodic boundary condition for fluid.
 
void SetInitPressure (std::shared_ptr< SimParams > paramsH, const double fzDim)
 Set prescribed initial pressure for gravity field.
 
std::shared_ptr< fea::ChMeshGetFsiMesh ()
 Gets the FSI mesh for flexible elements.
 
float GetKernelLength () const
 Return the SPH kernel length of kernel function.
 
void SetSubDomain (std::shared_ptr< SimParams > paramsH)
 Set subdomains so that we find neighbor particles faster.
 
void SetFsiOutputDir (std::shared_ptr< SimParams > paramsH, std::string &demo_dir, std::string out_dir, std::string inputJson)
 Set output directory for FSI data.
 
std::vector< ChVector<> > GetParticlePosOrProperties ()
 Return the SPH particle position.
 
std::vector< ChVector<> > GetParticleVel ()
 Return the SPH particle velocity.
 

Member Function Documentation

◆ DoStepDynamics_FSI()

void chrono::fsi::ChSystemFsi::DoStepDynamics_FSI ( )

Function to integrate the FSI system in time.

It uses a Runge-Kutta 2nd order algorithm to update both the fluid and multibody system dynamics. The midpoint data of MBS is needed for fluid dynamics update.

◆ FinalizeData()

void chrono::fsi::ChSystemFsi::FinalizeData ( )

Fill out the dependent data based on the independent one.

For instance, it copies the position of the rigid bodies from the multibody dynamics system to arrays in FSI system since they are needed for internal use.

◆ GetFsiBodies()

std::vector<std::shared_ptr<ChBody> >& chrono::fsi::ChSystemFsi::GetFsiBodies ( )
inline

Get a reference to the FSI bodies.

FSI bodies are the ones seen by the fluid dynamics system.

◆ GetFsiCables()

std::vector<std::shared_ptr<fea::ChElementCableANCF> >& chrono::fsi::ChSystemFsi::GetFsiCables ( )
inline

Get a reference to the FSI ChElementCableANCF.

FSI ChElementCableANCF are the ones seen by the fluid dynamics system.

◆ GetFsiNodes()

std::vector<std::shared_ptr<fea::ChNodeFEAxyzD> >& chrono::fsi::ChSystemFsi::GetFsiNodes ( )
inline

Get a reference to the FSI ChNodeFEAxyzD.

FSI ChNodeFEAxyzD are the ones seen by the fluid dynamics system.

◆ GetFsiShells()

std::vector<std::shared_ptr<fea::ChElementShellANCF_3423> >& chrono::fsi::ChSystemFsi::GetFsiShells ( )
inline

Get a reference to the FSI ChElementShellANCF_3423.

FSI ChElementShellANCF_3423 are the ones seen by the fluid dynamics system.

◆ PrintParticleToFile()

void chrono::fsi::ChSystemFsi::PrintParticleToFile ( const std::string &  out_dir) const

Save the SPH particle information into files.

This function creates three files to write fluid, boundary, and BCE markers data to separate files.


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