PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Main model class to simulate peridynamics deformation of single particle. More...
Public Member Functions | |
Model (inp::Input *deck) | |
Constructor. | |
void | computeForces () override |
Compute forces. | |
Public Member Functions inherited from model::DEMModel | |
DEMModel (inp::Input *deck, std::string modelName="DEMModel") | |
Constructor. | |
void | log (std::ostringstream &oss, int priority=0, bool check_condition=true, int override_priority=-1, bool screen_out=false) |
Prints message if any of these two conditions are true. | |
void | log (const std::string &str, int priority=0, bool check_condition=true, int override_priority=-1, bool screen_out=false) |
Prints message if any of these two conditions are true. | |
virtual void | run (inp::Input *deck) |
Main driver to simulate. | |
virtual void | restart (inp::Input *deck) |
Restarts the simulation from previous state. | |
virtual void | init () |
Initialize remaining data members. | |
virtual void | close () |
Closure operations. | |
virtual void | integrate () |
Perform time integration. | |
virtual void | integrateStep () |
Performs one time step. | |
virtual void | integrateCD () |
Perform time integration using central-difference scheme. | |
virtual void | integrateVerlet () |
Perform time integration using velocity verlet scheme. | |
virtual void | computePeridynamicForces () |
Computes peridynamic forces. | |
virtual void | computeExternalForces () |
Computes external/boundary condition forces. | |
virtual void | computeExternalDisplacementBC () |
Applies displacement boundary conditions. | |
virtual void | computeContactForces () |
Computes contact forces. | |
virtual void | applyInitialCondition () |
Applies initial condition. | |
virtual void | createParticles () |
Creates particles in a given container. | |
virtual void | createParticlesFromFile (size_t z, std::shared_ptr< particle::RefParticle > ref_p) |
Creates particles in a Hexagonal arrangement. | |
virtual void | createParticleUsingParticleZoneGeomObject (size_t z, std::shared_ptr< particle::RefParticle > ref_p) |
Creates particles in a given container. | |
virtual void | createGeometryAtSite (const double &particle_radius, const double &particle_orient, const util::Point &site, const std::vector< double > &rep_geom_params, const std::shared_ptr< util::geometry::GeomObject > &rep_geom_p, std::shared_ptr< util::geometry::GeomObject > &p_geom) |
Creates geometrical object for a particle given particle radius, orientation, and site location. | |
virtual void | updateGeometryObjectsPostInit () |
Update varioud geometry objects associated with container, particles, and reference particles. | |
virtual void | updateContactNeighborlist () |
Update neighborlist for contact. | |
virtual void | updatePeridynamicNeighborlist () |
Update neighborlist for peridynamics force. | |
virtual void | updateNeighborlistCombine () |
Update neighborlist for contact and peridynamics force. | |
virtual void | setupContact () |
Creates particles in a given container. | |
virtual void | setupQuadratureData () |
Sets up quadrature data. | |
virtual bool | updateContactNeighborSearchParameters () |
Update contact neighbor search parameters. | |
virtual void | output () |
Output the snapshot of data at current time step. | |
std::string | ppTwoParticleTest () |
Function that handles post-processing for two particle collision test and returns maximum vertical displacement of particle. | |
std::string | ppCompressiveTest () |
Function that handles post-processing for compressive test of particulate media by rigid wall and returns wall penetration and reaction force on wall. | |
virtual void | checkStop () |
Checks if simulation should be stopped due to abnormal state of system. | |
Public Member Functions inherited from model::ModelData | |
ModelData (inp::Input *deck) | |
Constructor. | |
const particle::BaseParticle * | getParticleFromAllList (size_t i) const |
Get pointer to base particle. | |
particle::BaseParticle *& | getParticleFromAllList (size_t i) |
Get pointer to base particle. | |
const particle::BaseParticle * | getParticleFromParticleList (size_t i) const |
Get pointer to particle (excluding wall) | |
particle::BaseParticle *& | getParticleFromParticleList (size_t i) |
const particle::BaseParticle * | getParticleFromWallList (size_t i) const |
Get pointer to wall. | |
particle::BaseParticle *& | getParticleFromWallList (size_t i) |
double | getDensity (size_t i) |
Get density of particle. | |
double | getHorizon (size_t i) |
Get horizon of particle. | |
size_t & | getPtId (size_t i) |
Get particle id given the location in particle list. | |
const size_t & | getPtId (size_t i) const |
Get particle id given the location in particle list. | |
void | setPtId (size_t i, const size_t &id) |
Set particle id given the location in particle list. | |
double | getKeyData (std::string key, bool issue_err=false) |
Get data for a key. | |
void | appendKeyData (std::string key, double data, bool issue_err=false) |
Append value to data associated with key. | |
void | setKeyData (std::string key, double data, bool issue_err=false) |
Set value to data associated with key. | |
util::Point & | getXRef (size_t i) |
Get reference coordinate of the node. | |
const util::Point & | getXRef (size_t i) const |
Get reference coordinate of the node. | |
void | setXRef (size_t i, const util::Point &x) |
Set reference coordinate of the node. | |
void | addXRef (size_t i, const util::Point &x) |
Add reference coordinate of the node. | |
void | setXRef (size_t i, int dof, double x) |
Set specific reference coordinate of the node. | |
void | addXRef (size_t i, int dof, double x) |
Add specific reference coordinate of the node. | |
util::Point & | getX (size_t i) |
Get current coordinate of the node. | |
const util::Point & | getX (size_t i) const |
Get current coordinate of the node. | |
void | setX (size_t i, const util::Point &x) |
Set current coordinate of the node. | |
void | addX (size_t i, const util::Point &x) |
Add current coordinate of the node. | |
void | setX (size_t i, int dof, double x) |
Set specific current coordinate of the node. | |
void | addX (size_t i, int dof, double x) |
Add to specific current coordinate of the node. | |
util::Point & | getU (size_t i) |
Get displacement of the node. | |
const util::Point & | getU (size_t i) const |
Get displacement of the node. | |
void | setU (size_t i, const util::Point &u) |
Set displacement of the node. | |
void | addU (size_t i, const util::Point &u) |
Add to displacement of the node. | |
void | setU (size_t i, int dof, double u) |
Set displacement of the node. | |
void | addU (size_t i, int dof, double u) |
Add to displacement of the node. | |
util::Point & | getV (size_t i) |
Get velocity of the node. | |
const util::Point & | getV (size_t i) const |
Get velocity of the node. | |
void | setV (size_t i, const util::Point &v) |
Set velocity of the node. | |
void | addV (size_t i, const util::Point &v) |
Add to velocity of the node. | |
void | setV (size_t i, int dof, double v) |
Set velocity of the node. | |
void | addV (size_t i, int dof, double v) |
Add to velocity of the node. | |
util::Point & | getF (size_t i) |
Get force of the node. | |
const util::Point & | getF (size_t i) const |
Get force of the node. | |
void | setF (size_t i, const util::Point &f) |
Set force of the node. | |
void | addF (size_t i, const util::Point &f) |
Add to force of the node. | |
void | setF (size_t i, int dof, double f) |
Set force of the node. | |
void | addF (size_t i, int dof, double f) |
Add to force of the node. | |
double & | getVol (size_t i) |
Get volume of the node. | |
const double & | getVol (size_t i) const |
Get volume of the node. | |
void | setVol (size_t i, const double &vol) |
Set volume of the node. | |
void | addVol (size_t i, const double &vol) |
Add to volume of the node. | |
uint8_t & | getFix (size_t i) |
Get fixity of the node. | |
const uint8_t & | getFix (size_t i) const |
Get fixity of the node. | |
void | setFix (size_t i, const unsigned int &dof, const bool &flag) |
Set fixity of the node. | |
double & | getMx (size_t i) |
Get weighted-volume (mx) of the node. | |
const double & | getMx (size_t i) const |
Get weighted-volume (mx) of the node. | |
void | setMx (size_t i, const double &mx) |
Set weighted-volume (mx) of the node. | |
void | addMx (size_t i, const double &mx) |
Add to weighted-volume (mx) of the node. | |
double & | getThetax (size_t i) |
Get volumetric deformation (thetax) of the node. | |
const double & | getThetax (size_t i) const |
Get volumetric deformation (thetax) of the node. | |
void | setThetax (size_t i, const double &thetax) |
Set volumetric deformation (thetax) of the node. | |
void | addThetax (size_t i, const double &thetax) |
Add to volumetric deformation (thetax) of the node. | |
Additional Inherited Members | |
Data Fields inherited from model::DEMModel | |
std::string | d_name |
Name of the model for logging purposes (useful if other classes are built on top of this class) | |
Data Fields inherited from model::ModelData | |
size_t | d_n |
Current time step. | |
double | d_time |
Current time. | |
double | d_currentDt |
Current timestep. | |
size_t | d_infoN |
Print log step interval. | |
std::map< std::string, double > | d_dbgData |
Debug data. | |
std::ofstream | d_ppFile |
File stream to output information. | |
inp::Input * | d_input_p |
Pointer to Input object. | |
std::shared_ptr< inp::ModelDeck > | d_modelDeck_p |
Model deck. | |
std::shared_ptr< inp::RestartDeck > | d_restartDeck_p |
Restart deck. | |
std::shared_ptr< inp::OutputDeck > | d_outputDeck_p |
Output deck. | |
std::shared_ptr< inp::ParticleDeck > | d_pDeck_p |
Particle deck. | |
std::shared_ptr< inp::ContactDeck > | d_cDeck_p |
Contact deck. | |
bool | d_stop |
flag to stop the simulation midway | |
double | d_hMax |
Minimum mesh over all particles and walls. | |
double | d_hMin |
Maximum mesh over all particles and walls. | |
double | d_maxContactR |
Maximum contact radius between over pairs of particles and walls. | |
size_t | d_contNeighUpdateInterval |
Neighborlist update interval. | |
size_t | d_contNeighTimestepCounter |
Contact neighborlist time step counter. | |
double | d_contNeighSearchRadius |
Neighborlist contact search radius (multiple of d_maxContactR). This variable will be updated during simulation based on maximum velocity. | |
std::vector< std::shared_ptr< particle::RefParticle > > | d_referenceParticles |
Pointer to reference particle. | |
std::vector< particle::BaseParticle * > | d_particlesListTypeAll |
List of particles + walls. | |
std::vector< particle::BaseParticle * > | d_particlesListTypeParticle |
List of particles. | |
std::vector< particle::BaseParticle * > | d_particlesListTypeWall |
List of walls. | |
std::vector< inp::MatData > | d_particlesMatDataList |
List of particle material data. Only populated if needed for calculation of stress or other quantities. | |
std::vector< double > | d_maxVelocityParticlesListTypeAll |
Maximum velocity among all nodes in the particle for each particle. | |
double | d_maxVelocity |
Maximum velocity among all nodes. | |
std::vector< std::vector< size_t > > | d_zInfo |
Zone information of particles. For zone 0, d_zInfo[0] = [n1, n2] where n1 is the index at which the particle in this zone starts in d_particlesListTypeAll and n2 is the index + 1, where index is at which the particle in this zone ends. | |
std::unique_ptr< loading::ParticleULoading > | d_uLoading_p |
Pointer to displacement Loading object. | |
std::unique_ptr< loading::ParticleFLoading > | d_fLoading_p |
Pointer to force Loading object. | |
std::unique_ptr< geometry::Fracture > | d_fracture_p |
Fracture state of bonds. | |
std::unique_ptr< NSearch > | d_nsearch_p |
Pointer to nsearch. | |
std::vector< util::Point > | d_xRef |
reference positions of the nodes | |
std::vector< util::Point > | d_x |
Current positions of the nodes. | |
std::vector< util::Point > | d_u |
Displacement of the nodes. | |
std::vector< util::Point > | d_v |
Velocity of the nodes. | |
std::vector< double > | d_vMag |
Magnitude of velocity of the nodes. | |
std::vector< util::Point > | d_f |
Total force on the nodes. | |
std::vector< double > | d_vol |
Nodal volumes. | |
std::vector< size_t > | d_ptId |
Global node to particle id (walls are assigned id after last particle id) | |
std::vector< std::vector< size_t > > | d_neighC |
Neighbor data for contact forces. | |
std::vector< std::vector< size_t > > | d_neighPd |
Neighbor data for peridynamic forces. | |
std::vector< std::vector< float > > | d_neighPdSqdDist |
Square distance neighbor data for peridynamic forces. | |
std::vector< std::vector< std::vector< size_t > > > | d_neighWallNodes |
Neighbor data for contact between particle and walls. | |
std::vector< std::vector< std::vector< double > > > | d_neighWallNodesDistance |
Neighbor data (distance) for contact between particle and walls. | |
std::vector< std::vector< size_t > > | d_neighWallNodesCondensed |
Neighbor data for contact between particle and walls condensed into single vector for each particle. | |
std::vector< uint8_t > | d_fix |
Vector of fixity mask of each node. | |
std::vector< uint8_t > | d_forceFixity |
Vector of fixity mask of each node for force. | |
std::vector< double > | d_thetaX |
Dilation. | |
std::vector< double > | d_mX |
Weighted volume. | |
std::vector< size_t > | d_fPdCompNodes |
List of global nodes on which force (peridynamic/internal) is to be computed. | |
std::vector< size_t > | d_fContCompNodes |
List of global nodes on which force (contact) is to be computed. | |
std::vector< float > | d_Z |
Damage at nodes. | |
std::vector< float > | d_e |
Energy of the nodes. | |
std::vector< float > | d_w |
Work done on each of the nodes. | |
std::vector< float > | d_phi |
Damage function \( \phi \) at the nodes. | |
std::vector< float > | d_eF |
Fracture energy of the nodes. | |
std::vector< float > | d_eFB |
Bond-based fracture energy of the nodes. | |
std::vector< util::Point > | d_xQuadCur |
Current position of quadrature points. | |
std::vector< util::SymMatrix3 > | d_strain |
Strain in elements (values at quadrature points) | |
std::vector< util::SymMatrix3 > | d_stress |
Stress in elements (values at quadrature points) | |
float | d_te |
Total internal energy. | |
float | d_tw |
Total work done. | |
float | d_tk |
Total kinetic energy. | |
float | d_teF |
Total fracture energy. | |
float | d_teFB |
Total bond-based fracture energy. | |
Main model class to simulate peridynamics deformation of single particle.
|
inlineexplicit |
Constructor.
deck | Input deck |
Definition at line 64 of file main.cpp.
|
inlineoverridevirtual |
Compute forces.
Reimplemented from model::DEMModel.
Definition at line 69 of file main.cpp.
References model::ModelData::appendKeyData(), model::DEMModel::computeExternalForces(), model::DEMModel::computePeridynamicForces(), model::ModelData::d_infoN, model::ModelData::d_n, model::ModelData::d_x, model::ModelData::getKeyData(), util::parallel::getNThreads(), model::DEMModel::log(), and util::methods::timeDiff().