chrono::granular Namespace Reference

Description

Namespace with classes for the Granular module.

Classes

struct  BC_params_t
 big enum to handle all possible boundary conditions More...
 
struct  ChGranMeshFamilyFrame
 Position and rotation matrix defining the frame of a triangle mesh. More...
 
struct  ChGranParams
 Parameters needed for sphere-based granular dynamics. More...
 
struct  ChGranParams_trimesh
 Extra parameters needed for triangle-sphere contact. More...
 
struct  ChGranSphereData
 Holds pointers to kinematic quantities of the granular system. These pointers must be in device-accessible memory. More...
 
class  ChSystemGranularSMC
 Main Chrono::Granular system class used to control and dispatch the GPU sphere-only solver. More...
 
class  ChSystemGranularSMC_trimesh
 Class implements functionality required to handle the interaction between a mesh soup and granular material. More...
 
struct  ChTriangleSoup
 Class used to hold pointers for mesh arrays. More...
 
struct  Plane_BC_params_t
 Infinite Plane defined by point in plane and normal. More...
 
struct  Z_Cone_BC_params_t
 Z-aligned cone pointed downward. More...
 
struct  Z_Cylinder_BC_params_t
 Infinite Z-aligned cylinder. More...
 

Typedefs

typedef std::function< double3(float)> GranPositionFunction
 Used to compute position as a function of time.
 
typedef struct chrono::granular::sim_param_holder sim_param_holder
 

Enumerations

enum  GRAN_VERBOSITY { QUIET = 0, INFO = 1, METRICS = 2 }
 Verbosity level of the system.
 
enum  GRAN_OUTPUT_MODE { CSV, BINARY, HDF5, NONE }
 Output mode of system.
 
enum  GRAN_TIME_INTEGRATOR { FORWARD_EULER, CHUNG, CENTERED_DIFFERENCE, EXTENDED_TAYLOR }
 How are we integrating through time.
 
enum  GRAN_FRICTION_MODE { FRICTIONLESS, SINGLE_STEP, MULTI_STEP }
 Supported friction model.
 
enum  GRAN_ROLLING_MODE { NO_RESISTANCE, SCHWARTZ, ELASTIC_PLASTIC }
 Rolling resistance models – ELASTIC_PLASTIC not implemented yet.
 
enum  GRAN_OUTPUT_FLAGS { ABSV = 1, VEL_COMPONENTS = 2, FIXITY = 4, ANG_VEL_COMPONENTS = 8 }
 
enum  BC_type { SPHERE, CONE, PLANE, CYLINDER }
 

Functions

std::string chrono_granular_data_path ("../data/granular/")
 
void SetDataPath (const std::string &path)
 Set the path to the Chrono::Granular data directory (ATTENTION: not thread safe).
 
const std::string & GetDataPath ()
 Get the current path to the Chrono::Granular data directory (thread safe).
 
std::string GetDataFile (const std::string &filename)
 Get the complete path to the specified filename (thread safe). More...
 
void ShowJSONUsage ()
 
void InvalidArg (string arg)
 
bool ParseJSON (const char *json_file, sim_param_holder &params, bool verbose=true)
 
template<typename Real >
std::vector< ChVector< Real > > MeshSphericalDecomposition (std::string objfilename, ChVector< Real > scaling, ChVector< Real > offset, Real sphere_radius)
 Decompose a given triangle mesh surface into a minimally-overlapping collection of spheres. More...
 

Variables

const GranPositionFunction GranPosFunction_default = [](float t) { return make_double3(0, 0, 0); }
 Position function representing no motion or offset as a funtion of time.
 

Function Documentation

◆ MeshSphericalDecomposition()

template<typename Real >
std::vector<ChVector<Real> > chrono::granular::MeshSphericalDecomposition ( std::string  objfilename,
ChVector< Real >  scaling,
ChVector< Real >  offset,
Real  sphere_radius 
)

Decompose a given triangle mesh surface into a minimally-overlapping collection of spheres.

The mesh must be stored in OBJ format and must consist of only triangles. Returns the number of spheres added as a result of the decomposition.

Parameters
objfilenameOBJ mesh file path
scalingScaling vector to apply to the mesh before decomposition
offsetDisplacement to apply to the mesh before decomposition
sphere_radiusRadius to use for all spheres in the decomposition