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 tau_diag=mR3(0.0), Real3 tau_offdiag=mR3(0.0), Real pc=1e3) |
| 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_meshes1D, unsigned int num_fsi_nodes1D, unsigned int num_fsi_elements1D, unsigned int num_fsi_meshes2D, unsigned int num_fsi_nodes2D, unsigned int num_fsi_elements2D, bool ad_defined, const std::vector< ChAABB > &ad_body, const std::vector< ChAABB > &ad_node1D, const std::vector< ChAABB > &ad_node2D, NodeDirections node_directions_mode) |
| Initialize the underlying FSU system. More... | |
| std::pair< size_t, size_t > | GetMarkerRange (MarkerGroup group) const |
| Return the range [first, last) of indices of the markers in the specified group. More... | |
| std::vector< int > | FindParticlesInBox (MarkerGroup group, const Real3 &hsize, const Real3 &pos, const Real3 &ax, const Real3 &ay, const Real3 &az) |
| Find indices of the markers in the specified group that are inside the specified OBB. | |
| std::vector< Real3 > | GetPositions (MarkerGroup group) |
| Extract positions of the markers in the specified group. | |
| std::vector< Real3 > | GetVelocities (MarkerGroup group) |
| Extract velocities of the markers in the specified group. | |
| std::vector< Real3 > | GetSphAccelerations (MarkerGroup group) |
| Extract accelerations of the SPH particles in the specified group. More... | |
| std::vector< Real3 > | GetForces (MarkerGroup group) |
| Extract fluid forces on the markers in the specified group. More... | |
| std::vector< Real3 > | GetProperties (MarkerGroup group) |
| Extract fluid properties of the markers in the specified group. More... | |
| std::vector< int > | GetFreeSurfaceFlags (MarkerGroup group) |
| Extract free-surface identification flags of the markers in the specified group. More... | |
| std::vector< Real3 > | GetPositions (const std::vector< int > &indices) |
| Extract positions of the markers with the specified indices. | |
| std::vector< Real3 > | GetVelocities (const std::vector< int > &indices) |
| Extract velocities of the markers with the specified indices. | |
| std::vector< Real3 > | GetRigidForces () |
| Extract FSI forces on rigid bodies. | |
| std::vector< Real3 > | GetRigidTorques () |
| Extract FSI torques on rigid bodies. | |
| std::vector< Real3 > | GetMesh1DForces () |
| Extract FSI forces on flex1D nodes. | |
| std::vector< Real3 > | GetMesh2DForces () |
| Extract FSI forces on flex2D nodes. | |
| void | ConstructReferenceArray () |
| void | SetCounters (unsigned int num_fsi_bodies, unsigned int num_fsi_meshes1D, unsigned int num_fsi_nodes1D, unsigned int num_fsi_elements1D, unsigned int num_fsi_meshes2D, unsigned int num_fsi_nodes2D, unsigned int num_fsi_elements2D) |
| void | ResetData () |
| Reset device data at beginning of a step. More... | |
| void | ResizeArrays (uint numExtended) |
| Resize data arrays based on particle activity. | |
| void | UpdateActiveDomains () |
| Update solid active domains (used for CRM only). More... | |
| size_t | GetCurrentGPUMemoryUsage () const |
| Return device memory usage. | |
Public Attributes | |
| std::shared_ptr< GPUDeviceInfo > | gpuDeviceInfo |
| GPU device information. | |
| std::shared_ptr< ChFsiParamsSPH > | paramsH |
| simulation parameters (host) | |
| std::shared_ptr< Counters > | countersH |
| problem counters (host) | |
| std::shared_ptr< SphMarkerDataD > | sphMarkers_D |
| information of SPH particles at state 1 on device | |
| std::shared_ptr< SphMarkerDataD > | sortedSphMarkers1_D |
| information of SPH particles at state 2 on device | |
| std::shared_ptr< SphMarkerDataD > | sortedSphMarkers2_D |
| sorted information of SPH particles at state 1 on device | |
| std::shared_ptr< SphMarkerDataH > | sphMarkers_H |
| information of SPH particles on host | |
| std::shared_ptr< FsiBodyStateH > | fsiBodyState_H |
| rigid body state (host) | |
| std::shared_ptr< FsiBodyStateD > | fsiBodyState_D |
| rigid body state (device) | |
| std::shared_ptr< FsiMeshStateH > | fsiMesh1DState_H |
| 1-D FEA mesh state (host) | |
| std::shared_ptr< FsiMeshStateD > | fsiMesh1DState_D |
| 1-D FEA mesh state (device) | |
| std::shared_ptr< FsiMeshStateH > | fsiMesh2DState_H |
| 2-D FEA mesh state (host) | |
| std::shared_ptr< FsiMeshStateD > | fsiMesh2DState_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< Real3 > | flex1D_Normals_H |
| reference normal for each 1-D flex segment (host) | |
| thrust::device_vector< Real3 > | flex1D_Normals_D |
| reference normal 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) | |
| bool | has_ad |
| use solid active domains | |
| thrust::host_vector< ActiveDomain > | ad_body_H |
| body active domains (on host, expressed in body frames) | |
| thrust::device_vector< ActiveDomain > | ad_body_D |
| body active domains (on device, expressed in absolute frame) | |
| thrust::host_vector< ActiveDomain > | ad_node1D_H |
| 1-D mesh node active domains (on host, expressed in node frames) | |
| thrust::device_vector< ActiveDomain > | ad_node1D_D |
| 1-D mesh node active domains (on device, expressed in absolute frame) | |
| thrust::host_vector< ActiveDomain > | ad_node2D_H |
| 2-D mesh node active domains (on host, expressed in node frames) | |
| thrust::device_vector< ActiveDomain > | ad_node2D_D |
| 2-D mesh node active domains (on device, expressed in absolute frame) | |
| thrust::host_vector< Real3 > | rigid_BCEcoords_H |
| local coordinates for BCE markers on rigid bodies (host) | |
| thrust::device_vector< Real3 > | rigid_BCEcoords_D |
| local coordinates for BCE markers on rigid bodies (device) | |
| thrust::host_vector< Real3 > | flex1D_BCEcoords_H |
| local coords for BCE markers on 1-D flex segments (host) | |
| thrust::device_vector< Real3 > | flex1D_BCEcoords_D |
| local coords for BCE markers on 1-D flex segments (device) | |
| thrust::host_vector< Real3 > | flex2D_BCEcoords_H |
| local coords for BCE markers on 2-D flex faces (host) | |
| thrust::device_vector< Real3 > | flex2D_BCEcoords_D |
| local coords for BCE markers on 2-D flex faces (device) | |
| thrust::host_vector< uint > | rigid_BCEsolids_H |
| body ID for BCE markers on rigid bodies (host) | |
| thrust::device_vector< uint > | rigid_BCEsolids_D |
| body ID for BCE markers on rigid bodies (device) | |
| thrust::host_vector< uint3 > | flex1D_BCEsolids_H |
| mesh and segment IDs for BCE markers on 1-D segments (host) | |
| thrust::device_vector< uint3 > | flex1D_BCEsolids_D |
| mesh and segment IDs for BCE markers on 1-D segments (device) | |
| thrust::host_vector< uint3 > | flex2D_BCEsolids_H |
| mesh and face IDs for BCE markers on 2-D faces (host) | |
| thrust::device_vector< uint3 > | flex2D_BCEsolids_D |
| mesh and face IDs for BCE markers on 2-D faces (device) | |
| thrust::device_vector< Real3 > | rigid_FSI_ForcesD |
| surface-integrated forces to rigid bodies | |
| thrust::device_vector< Real3 > | rigid_FSI_TorquesD |
| surface-integrated torques to rigid bodies | |
| thrust::device_vector< Real3 > | flex1D_FSIforces_D |
| surface-integrated forces on FEA 1-D segment nodes | |
| thrust::device_vector< Real3 > | flex2D_FSIforces_D |
| surface-integrated forces on FEA 2-D face nodes | |
| std::shared_ptr< ProximityDataD > | markersProximity_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< Real4 > | derivVelRhoD |
| particle dv/dt and d(rho)/dt for particles | |
| thrust::device_vector< Real4 > | derivVelRhoOriginalD |
| particle dv/dt and d(rho)/dt - unsorted | |
| thrust::device_vector< Real3 > | derivTauXxYyZzD |
| d(tau)/dt for particles | |
| thrust::device_vector< Real3 > | derivTauXyXzYzD |
| d(tau)/dt for particles | |
| thrust::device_vector< Real3 > | vel_XSPH_D |
| XSPH velocity for particles. | |
| thrust::device_vector< Real3 > | vis_vel_SPH_D |
| ISPH velocity for particles. | |
| thrust::device_vector< Real4 > | sr_tau_I_mu_i |
| ISPH strain-rate, stress, inertia number, friction. | |
| thrust::device_vector< Real4 > | sr_tau_I_mu_i_Original |
| ISPH strain-rate, stress, inertia number, friction. | |
| thrust::device_vector< Real3 > | bceAcc |
| 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< uint > | prefixSumExtendedActivityIdD |
| prefix sum of extended particles | |
| thrust::device_vector< uint > | activeListD |
| active list of particles | |
| thrust::device_vector< uint > | numNeighborsPerPart |
| number of neighbors for each particle | |
| thrust::device_vector< uint > | neighborList |
| neighbor list for all particles | |
| thrust::device_vector< uint > | freeSurfaceIdD |
| identifiers for particles close to free surface | |
| thrust::device_vector< Real > | posDivergenceD |
| divergence of the position field (basis of the free-surface test) | |
| thrust::device_vector< Real > | courantViscousTimeStepD |
| Courant time step for viscosity. | |
| thrust::device_vector< Real > | accelerationTimeStepD |
| Courant time step for acceleration - unsorted. | |
Member Function Documentation
◆ GetForces()
| std::vector<Real3> chrono::fsi::sph::FsiDataManager::GetForces | ( | MarkerGroup | group | ) |
Extract fluid forces on the markers in the specified group.
Zero is returned for BCE markers on fixed boundaries, where the fluid force is not calculated.
◆ GetFreeSurfaceFlags()
| std::vector<int> chrono::fsi::sph::FsiDataManager::GetFreeSurfaceFlags | ( | MarkerGroup | group | ) |
Extract free-surface identification flags of the markers in the specified group.
A value of 1 marks an SPH particle at or near the free surface. Zero is reported for BCE markers and for SPH particles that are not active, namely particles in the extended halo of an active domain and particles that left the computational domain. Such particles have a truncated neighborhood by construction, so their free-surface test is meaningless and would otherwise report a spurious surface along the active domain boundary.
◆ GetMarkerRange()
| std::pair<size_t, size_t> chrono::fsi::sph::FsiDataManager::GetMarkerRange | ( | MarkerGroup | group | ) | const |
Return the range [first, last) of indices of the markers in the specified group.
Markers are stored with SPH particles first, then BCE markers on fixed boundaries, then BCE markers on solids.
◆ GetProperties()
| std::vector<Real3> chrono::fsi::sph::FsiDataManager::GetProperties | ( | MarkerGroup | group | ) |
Extract fluid properties of the markers in the specified group.
For each SPH particle, the 3-dimensional vector contains density, pressure, and viscosity.
◆ GetSphAccelerations()
| std::vector<Real3> chrono::fsi::sph::FsiDataManager::GetSphAccelerations | ( | MarkerGroup | group | ) |
Extract accelerations of the SPH particles in the specified group.
Zero is returned for all BCE markers; the accelerations of BCE markers on solids are calculated by SphBceManager.
◆ Initialize()
| void chrono::fsi::sph::FsiDataManager::Initialize | ( | unsigned int | num_fsi_bodies, |
| unsigned int | num_fsi_meshes1D, | ||
| unsigned int | num_fsi_nodes1D, | ||
| unsigned int | num_fsi_elements1D, | ||
| unsigned int | num_fsi_meshes2D, | ||
| unsigned int | num_fsi_nodes2D, | ||
| unsigned int | num_fsi_elements2D, | ||
| bool | ad_defined, | ||
| const std::vector< ChAABB > & | ad_body, | ||
| const std::vector< ChAABB > & | ad_node1D, | ||
| const std::vector< ChAABB > & | ad_node2D, | ||
| NodeDirections | node_directions_mode | ||
| ) |
Initialize the underlying FSU system.
Set reference arrays and counters, cache solid active domains, and resize simulation arrays.
◆ ResetData()
| void chrono::fsi::sph::FsiDataManager::ResetData | ( | ) |
Reset device data at beginning of a step.
Initializes device vectors to zero.
◆ UpdateActiveDomains()
| void chrono::fsi::sph::FsiDataManager::UpdateActiveDomains | ( | ) |
Update solid active domains (used for CRM only).
Update device active domains expressed in the absolute frame.
The documentation for this struct was generated from the following file:
- /builds/uwsbel/chrono/src/chrono_fsi/sph/physics/SphDataManager.cuh