Description

Data manager for the SPH-based FSI system.

Public Member Functions

 FsiDataManager (std::shared_ptr< ChFsiParamsSPH > params)
 
void SetGrowthFactor (float factor)
 Set the growth factor for buffer resizing.
 
void AddSphParticle (Real3 pos, Real rho, Real pres, Real mu, Real3 vel=mR3(0.0), Real3 tauXxYyZz=mR3(0.0), Real3 tauXyXzYz=mR3(0.0))
 Add an SPH particle given its position, physical properties, velocity, and stress.
 
void AddBceMarker (MarkerType type, Real3 pos, Real3 vel)
 Add a BCE marker of given type at the specified position and with specified velocity.
 
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, bool use_node_directions)
 Initialize the underlying FSU system. More...
 
std::vector< int > FindParticlesInBox (const Real3 &hsize, const Real3 &pos, const Real3 &ax, const Real3 &ay, const Real3 &az)
 Find indices of all SPH particles inside the specified OBB.
 
std::vector< Real3GetPositions ()
 Extract positions of all markers (SPH and BCE).
 
std::vector< Real3GetVelocities ()
 Extract velocities of all markers (SPH and BCE).
 
std::vector< Real3GetAccelerations ()
 Extract accelerations of all markers (SPH and BCE).
 
std::vector< Real3GetForces ()
 Extract forces applied to all markers (SPH and BCE).
 
std::vector< Real3GetProperties ()
 Extract fluid properties of all markers (SPH and BCE). More...
 
std::vector< Real3GetPositions (const std::vector< int > &indices)
 Extract positions of all markers (SPH and BCE) with indices in the provided array.
 
std::vector< Real3GetVelocities (const std::vector< int > &indices)
 Extract velocities of all markers (SPH and BCE) with indices in the provided array.
 
std::vector< Real3GetAccelerations (const std::vector< int > &indices)
 Extract accelerations of all markers (SPH and BCE) with indices in the provided array.
 
std::vector< Real3GetForces (const std::vector< int > &indices)
 Extract forces applied to all markers (SPH and BCE) with indices in the provided array.
 
std::vector< Real3GetRigidForces ()
 Extract FSI forces on rigid bodies.
 
std::vector< Real3GetRigidTorques ()
 Extract FSI torques on rigid bodies.
 
std::vector< Real3GetFlex1dForces ()
 Extract FSI forces on flex1D nodes.
 
std::vector< Real3GetFlex2dForces ()
 Extract FSI forces on flex2D nodes.
 
void ConstructReferenceArray ()
 
void SetCounters (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)
 
void CopyDeviceDataToHalfStep ()
 Initialize the midpoint device data of the fluid system by copying from the full step.
 
void ResetData ()
 Reset device data at beginning of a step. More...
 
void ResizeData (bool first_step)
 Resize data based on the active particles At first step, the internal resizeArray is always called.
 
size_t GetCurrentGPUMemoryUsage () const
 Add this method declaration in the FsiDataManager struct.
 

Public Attributes

std::shared_ptr< CudaDeviceInfocudaDeviceInfo
 CUDA device information.
 
std::shared_ptr< ChFsiParamsSPHparamsH
 simulation parameters (host)
 
std::shared_ptr< CounterscountersH
 problem counters (host)
 
std::shared_ptr< SphMarkerDataDsphMarkers_D
 information of SPH particles at state 1 on device
 
std::shared_ptr< SphMarkerDataDsortedSphMarkers1_D
 information of SPH particles at state 2 on device
 
std::shared_ptr< SphMarkerDataDsortedSphMarkers2_D
 sorted information of SPH particles at state 1 on device
 
std::shared_ptr< SphMarkerDataHsphMarkers_H
 information of SPH particles on host
 
std::shared_ptr< FsiBodyStateHfsiBodyState_H
 rigid body state (host)
 
std::shared_ptr< FsiBodyStateDfsiBodyState_D
 rigid body state 2 (device)
 
std::shared_ptr< FsiMeshStateHfsiMesh1DState_H
 1-D FEA mesh state (host)
 
std::shared_ptr< FsiMeshStateDfsiMesh1DState_D
 1-D FEA mesh state (device)
 
std::shared_ptr< FsiMeshStateHfsiMesh2DState_H
 2-D FEA mesh state (host)
 
std::shared_ptr< FsiMeshStateDfsiMesh2DState_D
 2-D FEA mesh state (device)
 
thrust::host_vector< int2 > flex1D_Nodes_H
 node indices for each 1-D flex segment (host)
 
thrust::device_vector< int2 > flex1D_Nodes_D
 node indices for each 1-D flex segment (device)
 
thrust::host_vector< int3 > flex2D_Nodes_H
 node indices for each 2-D flex face (host)
 
thrust::device_vector< int3 > flex2D_Nodes_D
 node indices for each 2-D flex face (device)
 
thrust::device_vector< Real3rigid_BCEcoords_D
 rigid body BCE position (local reference frame)
 
thrust::host_vector< Real3flex1D_BCEcoords_H
 local coords for BCE markers on 1-D flex segments (host)
 
thrust::device_vector< Real3flex1D_BCEcoords_D
 local coords for BCE markers on 1-D flex segments (device)
 
thrust::host_vector< Real3flex2D_BCEcoords_H
 local coords for BCE markers on 2-D flex faces (host)
 
thrust::device_vector< Real3flex2D_BCEcoords_D
 local coors for BCE markers on 2-D flex faces (device)
 
thrust::device_vector< uintrigid_BCEsolids_D
 associated body ID for BCE markers on rigid bodies
 
thrust::host_vector< uint3 > flex1D_BCEsolids_H
 associated mesh and segment for BCE markers on 1-D segments
 
thrust::device_vector< uint3 > flex1D_BCEsolids_D
 associated mesh and segment for BCE markers on 1-D segments
 
thrust::host_vector< uint3 > flex2D_BCEsolids_H
 associated mesh and face for BCE markers on 2-D faces
 
thrust::device_vector< uint3 > flex2D_BCEsolids_D
 associated mesh and face for BCE markers on 2-D faces
 
thrust::device_vector< Real3rigid_FSI_ForcesD
 surface-integrated forces to rigid bodies
 
thrust::device_vector< Real3rigid_FSI_TorquesD
 surface-integrated torques to rigid bodies
 
thrust::device_vector< Real3flex1D_FSIforces_D
 surface-integrated forces on FEA 1-D segment nodes
 
thrust::device_vector< Real3flex2D_FSIforces_D
 surface-integrated forces on FEA 2-D face nodes
 
std::shared_ptr< ProximityDataDmarkersProximity_D
 information of neighbor search on the device
 
thrust::host_vector< int4 > referenceArray
 phases in the array of SPH particles
 
thrust::host_vector< int4 > referenceArray_FEA
 phases in the array of SPH particles for flexible elements
 
thrust::device_vector< Real4derivVelRhoD
 particle dv/dt and d(rho)/dt for particles
 
thrust::device_vector< Real4derivVelRhoOriginalD
 particle dv/dt and d(rho)/dt - unsorted
 
thrust::device_vector< Real3derivTauXxYyZzD
 d(tau)/dt for particles
 
thrust::device_vector< Real3derivTauXyXzYzD
 d(tau)/dt for particles
 
thrust::device_vector< Real3vel_XSPH_D
 XSPH velocity for particles.
 
thrust::device_vector< Real3vis_vel_SPH_D
 ISPH velocity for particles.
 
thrust::device_vector< Real4sr_tau_I_mu_i
 ISPH strain-rate, stress, inertia number, friction.
 
thrust::device_vector< Real4sr_tau_I_mu_i_Original
 ISPH strain-rate, stress, inertia number, friction.
 
thrust::device_vector< Real3bceAcc
 acceleration for boundary/rigid/flex body particles
 
thrust::device_vector< int32_t > activityIdentifierOriginalD
 active particle flags - unsorted
 
thrust::device_vector< int32_t > activityIdentifierSortedD
 active particle flags - sorted
 
thrust::device_vector< int32_t > extendedActivityIdentifierOriginalD
 active particle flags - unsorted
 
thrust::device_vector< uintprefixSumExtendedActivityIdD
 prefix sum of extended particles
 
thrust::device_vector< uintactiveListD
 active list of particles
 
thrust::device_vector< uintnumNeighborsPerPart
 number of neighbors for each particle
 
thrust::device_vector< uintneighborList
 neighbor list for all particles
 
thrust::device_vector< uintfreeSurfaceIdD
 identifiers for particles close to free surface
 

Member Function Documentation

◆ GetProperties()

std::vector<Real3> chrono::fsi::sph::FsiDataManager::GetProperties ( )

Extract fluid properties of all markers (SPH and BCE).

For each SPH particle, the 3-dimensional vector contains density, pressure, and viscosity.

◆ Initialize()

void chrono::fsi::sph::FsiDataManager::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,
bool  use_node_directions 
)

Initialize the underlying FSU system.

Set reference arrays, set counters, and resize simulation arrays.

◆ ResetData()

void chrono::fsi::sph::FsiDataManager::ResetData ( )

Reset device data at beginning of a step.

Initializes device vectors to zero.


The documentation for this struct was generated from the following file:
  • /builds/uwsbel/chrono/src/chrono_fsi/sph/physics/FsiDataManager.cuh