NetDEM v1.0
|
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. | |
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.
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.
corner_x | The x coordinate of the corner of the bounding box for the level set function. |
corner_y | The y coordinate of the corner of the bounding box for the level set function. |
corner_z | The z coordinate of the corner of the bounding box for the level set function. |
sp | The spacing between grid points in the level set function. |
dim_x | The number of grid points along the x axis of the level set function. |
dim_y | The number of grid points along the y axis of the level set function. |
dim_z | The number of grid points along the z axis of the level set function. |
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.
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.
frag_q | A pointer to another DEMFragment object. |
LevelSetFunction netdem::DEMFragment::level_set |
The level set function used to represent the interface between this fragment and its surrounding medium.
Vec3d netdem::DEMFragment::pos {0, 0, 0} |
The position of this fragment in 3D space.
Shape::Type netdem::DEMFragment::shape_type {Shape::Type::trimesh} |
The type of shape used to represent this fragment.
double netdem::DEMFragment::sphere_size {1.0} |
The size of the sphere used to represent this fragment.
Vec3d netdem::DEMFragment::spin {0, 0, 0} |
The angular velocity of this fragment.
STLModel netdem::DEMFragment::stl_model |
The STL model used to represent this fragment.
Vec3d netdem::DEMFragment::vel {0, 0, 0} |
The velocity of this fragment.