Description

Physics objects for the Chrono::FSI module. Including the fluid dynamics system, force system, interface with Chrono core module, simulation parameters, and data structures.

Collaboration diagram for Physics objects:

Classes

class  chrono::fsi::ChFsiProblem
 Base class to set up a Chrono::FSI problem. More...
 
class  chrono::fsi::ChFsiProblemCartesian
 Class to set up a Chrono::FSI problem using particles and markers on a Cartesian coordinates grid. More...
 
class  chrono::fsi::ChFsiProblemCylindrical
 Class to set up a Chrono::FSI problem using particles and markers on a cylindrical coordinates grid. More...
 
class  chrono::fsi::DepthPressurePropertiesCallback
 Predefined SPH particle initial properties callback (depth-based pressure). More...
 
class  chrono::fsi::ChSystemFsi
 Physical system for fluid-solid interaction problems. More...
 
class  chrono::fsi::ChBce
 Base class for processing boundary condition enforcing (BCE) particle forces in an FSI system. More...
 
class  chrono::fsi::ChFluidDynamics
 Class to represent the fluid/granular dynamics system. More...
 
struct  chrono::fsi::ChCounters
 Number of rigid and flexible solid bodies, fluid SPH particles, solid SPH particles, boundary SPH particles. More...
 
class  chrono::fsi::ChFsiBase
 Base class for various FSI classes. More...
 
class  chrono::fsi::ChFsiForce
 Base class to calculate force between SPH particles. More...
 
class  chrono::fsi::ChFsiForceExplicitSPH
 Inter-particle force calculation for explicit schemes. More...
 
class  chrono::fsi::ChFsiForceI2SPH
 Inter-particle force calculation for the I2SPH method. More...
 
class  chrono::fsi::ChFsiInterface
 Base class for processing the interface between Chrono and FSI modules. More...
 
struct  chrono::fsi::SimParams
 Structure with FSI simulation parameters. More...
 
struct  chrono::fsi::SphMarkerDataD
 Struct to store the information of SPH particles on the device. More...
 
struct  chrono::fsi::SphMarkerDataH
 Struct to store the information of SPH particles on the host. More...
 
struct  chrono::fsi::FsiBodyStateH
 Rigid body states on host. More...
 
struct  chrono::fsi::FsiBodyStateD
 Rigid body states on device. More...
 
struct  chrono::fsi::FsiMeshStateH
 FEA mesh states on host. More...
 
struct  chrono::fsi::FsiMeshStateD
 FEA mesh state on device. More...
 
struct  chrono::fsi::ProximityDataD
 Struct to store neighbor search information on the device. More...
 
struct  chrono::fsi::FsiData
 FSI system information information exchanged with the Chrono system. More...
 
class  chrono::fsi::ChSystemFsi_impl
 Underlying implementation of an FSI system. More...
 
class  chrono::fsi::GpuTimer
 Time recorder for cuda events. More...
 
class  chrono::fsi::ChUtilsDevice
 Utilities for thrust device vectors. More...
 

Macros

#define mF2   make_float2
 
#define mF3   make_float3
 
#define mF4   make_float4
 
#define mR2   make_Real2
 
#define mR3   make_Real3
 
#define mR4   make_Real4
 
#define mI2   make_int2
 
#define mI3   make_int3
 
#define mI4   make_int4
 
#define mU3   make_uint3
 
#define F1CAST(x)   (float*)thrust::raw_pointer_cast(&x[0])
 
#define D1CAST(x)   (double*)thrust::raw_pointer_cast(&x[0])
 
#define BCAST(x)   (bool*)thrust::raw_pointer_cast(&x[0])
 
#define I1CAST(x)   (int*)thrust::raw_pointer_cast(&x[0])
 
#define mI2CAST(x)   (int2*)thrust::raw_pointer_cast(&x[0])
 
#define mI4CAST(x)   (int4*)thrust::raw_pointer_cast(&x[0])
 
#define U1CAST(x)   (uint*)thrust::raw_pointer_cast(&x[0])
 
#define U2CAST(x)   (uint2*)thrust::raw_pointer_cast(&x[0])
 
#define U3CAST(x)   (uint3*)thrust::raw_pointer_cast(&x[0])
 
#define U4CAST(x)   (uint4*)thrust::raw_pointer_cast(&x[0])
 
#define LU1CAST(x)   (unsigned long int*)thrust::raw_pointer_cast(&x[0])
 
#define R1CAST(x)   (Real*)thrust::raw_pointer_cast(&x[0])
 
#define mR2CAST(x)   (Real2*)thrust::raw_pointer_cast(&x[0])
 
#define mR3CAST(x)   (Real3*)thrust::raw_pointer_cast(&x[0])
 
#define mR4CAST(x)   (Real4*)thrust::raw_pointer_cast(&x[0])
 
#define TCAST(x)   thrust::raw_pointer_cast(x.data())
 
#define mR3BY3CAST(x)   (Real3By3*)thrust::raw_pointer_cast(&x[0])
 
#define CUDA_KERNEL_DIM(...)   << <__VA_ARGS__>>>
 
#define INVPI   0.3183098861837906715377675267450287240689192914809128f
 
#define EPSILON   1e-8
 
#define RESOLUTION_LENGTH_MULT   2.0
 
#define cudaCheckError()
 
#define cudaResetErrorFlag(error_flag_D)
 
#define cudaCheckErrorFlag(error_flag_D, kernel_name)
 

Typedefs

typedef thrust::device_vector< Real3 >::iterator chrono::fsi::r3IterD
 typedef device iterators for shorthand SPH operation of thrust vectors of Real3
 
typedef thrust::device_vector< Real4 >::iterator chrono::fsi::r4IterD
 typedef device iterators for shorthand SPH operation of thrust vectors of Real4
 
typedef thrust::tuple< r4IterD, r3IterD, r4IterD, r3IterD, r3IterDchrono::fsi::iterTupleSphD
 typedef device tuple for holding SPH data pos,vel,[rho,pressure,mu,type]
 
typedef thrust::zip_iterator< iterTupleSphDchrono::fsi::zipIterSphD
 
typedef thrust::host_vector< Real3 >::iterator chrono::fsi::r3IterH
 typedef host iterators for shorthand SPH operation of thrust vectors of Real3
 
typedef thrust::host_vector< Real4 >::iterator chrono::fsi::r4IterH
 typedef host iterators for shorthand SPH operation of thrust vectors of Real4
 
typedef thrust::tuple< r4IterH, r3IterH, r4IterH, r3IterH, r3IterHchrono::fsi::iterTupleH
 typedef host tuple for holding SPH data pos,vel,[rho,pressure,mu,type]
 
typedef thrust::zip_iterator< iterTupleHchrono::fsi::zipIterSphH
 
typedef thrust::tuple< r3IterD, r4IterD, r3IterD, r4IterD, r3IterD, r3IterDchrono::fsi::iterTupleRigidD
 typedef device iterators for shorthand rigid body states: pos,orientation in position, velocity and acceleration level
 
typedef thrust::zip_iterator< iterTupleRigidDchrono::fsi::zipIterRigidD
 
typedef thrust::tuple< r3IterH, r4IterH, r3IterH, r4IterH, r3IterH, r3IterHchrono::fsi::iterTupleRigidH
 typedef host iterators for shorthand rigid body states: pos,orientation in position, velocity and acceleration level
 
typedef thrust::zip_iterator< iterTupleRigidHchrono::fsi::zipIterRigidH
 
typedef thrust::tuple< r3IterH, r3IterH, r3IterH, r4IterH, r3IterH, r3IterHchrono::fsi::iterTupleChronoBodiesH
 typedef device iterators for shorthand chrono bodies operations
 
typedef thrust::zip_iterator< iterTupleChronoBodiesHchrono::fsi::zipIterChronoBodiesH
 

Enumerations

enum  chrono::fsi::BcePatternMesh1D { FULL, STAR }
 BCE pattern in cross section of 1-D flexible elements. More...
 
enum  chrono::fsi::BcePatternMesh2D { CENTERED, OUTWARD, INWARD }
 BCE pattern along normal of 2-D surface of flexible elements. More...
 
enum  chrono::fsi::Rheology { INERTIA_RHEOLOGY, NONLOCAL_FLUIDITY }
 Rheology type.
 
enum  chrono::fsi::FrictionLaw { CONSTANT, LINEAR, NONLINEAR }
 Friction law in ISPH.
 
enum  chrono::fsi::SPHMethod { chrono::fsi::SPHMethod::WCSPH, chrono::fsi::SPHMethod::I2SPH }
 SPH method. More...
 
enum  chrono::fsi::SolverType {
  JACOBI, BICGSTAB, GMRES, CR,
  CG, SAP
}
 Linear solver type.
 

Macro Definition Documentation

◆ cudaCheckError

#define cudaCheckError ( )
Value:
{ \
cudaError_t e = cudaGetLastError(); \
if (e != cudaSuccess) { \
printf("Cuda failure %s:%d: '%s'\n", __FILE__, __LINE__, cudaGetErrorString(e)); \
exit(0); \
} \
}

◆ cudaCheckErrorFlag

#define cudaCheckErrorFlag (   error_flag_D,
  kernel_name 
)
Value:
{ \
bool error_flag_H; \
cudaDeviceSynchronize(); \
cudaMemcpy(&error_flag_H, error_flag_D, sizeof(bool), cudaMemcpyDeviceToHost); \
if (error_flag_H) { \
printf("Error flag intercepted in %s:%d from %s\n", __FILE__, __LINE__, kernel_name); \
exit(0); \
} \
cudaError_t e = cudaGetLastError(); \
if (e != cudaSuccess) { \
printf("Cuda failure %s:%d: '%s'\n", __FILE__, __LINE__, cudaGetErrorString(e)); \
exit(0); \
} \
}

◆ cudaResetErrorFlag

#define cudaResetErrorFlag (   error_flag_D)
Value:
{ \
bool error_flag_H = false; \
cudaMemcpy(error_flag_D, &error_flag_H, sizeof(bool), cudaMemcpyHostToDevice); \
}

Enumeration Type Documentation

◆ BcePatternMesh1D

BCE pattern in cross section of 1-D flexible elements.

The available patterns are illustrated below (assuming 3 BCE layers):

FULL:
     X--X--X
     X--X--X
     X--X--X
STAR:
     ---X---
     X--X--X
     ---X---

◆ BcePatternMesh2D

BCE pattern along normal of 2-D surface of flexible elements.

The choices are illustrated below (assuming 3 BCE layers):

OUTWARD:
   ^ n
   |    ...--X--X--X--...
   |    ...--X--X--X--...
---|---------X--X--X-------- surface
CENTERED:
   ^ n
   |    ...--X--X--X--...
---|---------X--X--X-------- surface
   |    ...--X--X--X--...
INWARD:
   ^ n
---|---------X--X--X-------- surface
   |    ...--X--X--X--...
   |    ...--X--X--X--...

◆ SPHMethod

SPH method.

Enumerator
WCSPH 

Weakly Compressible SPH (explicit)

I2SPH 

Implicit SPH.