Hello Alex,
PrintFsiInfoToFile() can output the position, pose and forces and torques applied to the FSI body to a file. See
demo_FSI_CylinderDrop.cpp as an example where the outputs are written to the DEMO_OUTPUT/FSI_Cylinder_Drop/fsi/FSI_body0.csv file.
For example, if you want the force from SPH particles applied to the i-th rigid FSI body, your implementation can be,
ChVector<float> ChSystemFsi::GetFsiBodyForce(int i) const {
thrust::host_vector<Real3> forcesH = m_sysFSI->fsiGeneralData->rigid_FSI_ForcesD;
return utils::ToChVector(forcesH[i]);
}
Note that the force is expressed in global coordinate.
Thank you,
Luning