NetDEM v1.0
Loading...
Searching...
No Matches
netdem::DEMFragment Class Reference

A class representing a fragment in a discrete element method simulation. More...

#include <dem_fragment.hpp>

Public Member Functions

void InitLevelSet (double corner_x, double corner_y, double corner_z, double sp, int dim_x, int dim_y, int dim_z)
 Initializes the level set function for this fragment.
 
void ResolverOverlap (DEMFragment *const frag_q)
 Resolves any overlaps between this fragment and another fragment.
 
void ReInitSTLModel ()
 Reinitializes the STL model for this fragment.
 

Public Attributes

Shape::Type shape_type {Shape::Type::trimesh}
 The type of shape used to represent this fragment.
 
double sphere_size {1.0}
 The size of the sphere used to represent this fragment.
 
Vec3d pos {0, 0, 0}
 The position of this fragment in 3D space.
 
STLModel stl_model
 The STL model used to represent this fragment.
 
Vec3d vel {0, 0, 0}
 The velocity of this fragment.
 
Vec3d spin {0, 0, 0}
 The angular velocity of this fragment.
 
LevelSetFunction level_set
 The level set function used to represent the interface between this fragment and its surrounding medium.
 

Detailed Description

A class representing a fragment in a discrete element method simulation.

This class contains properties and methods for defining and manipulating DEM fragments, which can be used to model particles in simulations of granular materials and other systems.

Member Function Documentation

◆ InitLevelSet()

void DEMFragment::InitLevelSet ( double corner_x,
double corner_y,
double corner_z,
double sp,
int dim_x,
int dim_y,
int dim_z )

Initializes the level set function for this fragment.

The level set function is used to represent the interface between the fragment and its surrounding medium.

Parameters
corner_xThe x coordinate of the corner of the bounding box for the level set function.
corner_yThe y coordinate of the corner of the bounding box for the level set function.
corner_zThe z coordinate of the corner of the bounding box for the level set function.
spThe spacing between grid points in the level set function.
dim_xThe number of grid points along the x axis of the level set function.
dim_yThe number of grid points along the y axis of the level set function.
dim_zThe number of grid points along the z axis of the level set function.

◆ ReInitSTLModel()

void DEMFragment::ReInitSTLModel ( )

Reinitializes the STL model for this fragment.

This method reloads the STL file associated with this fragment and updates its vertices and normals.

◆ ResolverOverlap()

void DEMFragment::ResolverOverlap ( DEMFragment *const frag_q)

Resolves any overlaps between this fragment and another fragment.

If there is an overlap between this fragment and the given fragment frag_q, this method adjusts the positions of both fragments so that they no longer overlap.

Parameters
frag_qA pointer to another DEMFragment object.

Member Data Documentation

◆ level_set

LevelSetFunction netdem::DEMFragment::level_set

The level set function used to represent the interface between this fragment and its surrounding medium.

◆ pos

Vec3d netdem::DEMFragment::pos {0, 0, 0}

The position of this fragment in 3D space.

◆ shape_type

Shape::Type netdem::DEMFragment::shape_type {Shape::Type::trimesh}

The type of shape used to represent this fragment.

◆ sphere_size

double netdem::DEMFragment::sphere_size {1.0}

The size of the sphere used to represent this fragment.

◆ spin

Vec3d netdem::DEMFragment::spin {0, 0, 0}

The angular velocity of this fragment.

◆ stl_model

STLModel netdem::DEMFragment::stl_model

The STL model used to represent this fragment.

◆ vel

Vec3d netdem::DEMFragment::vel {0, 0, 0}

The velocity of this fragment.


The documentation for this class was generated from the following files: