RandomClusterInsertionBoundaryDemo.cpp File Reference

Classes

class  RandomClusterInsertionBoundarySelfTest
 

Functions

int main (int argc UNUSED, char *argv[] UNUSED)
 

Function Documentation

◆ main()

int main ( int argc  UNUSED,
char *argv[]  UNUSED 
)
108 {
109  logger(INFO,"Simple box for creating particles");
110 
111  RandomClusterInsertionBoundarySelfTest insertionBoundary_problem;
112  insertionBoundary_problem.setMin(Vec3D(-0.5, -0.5, -0.5));
113  insertionBoundary_problem.setMax(Vec3D(0.5, 0.5, 0.5));
114 
115 
116 
117  Mdouble constantMass = 2700 * 4 * constants::pi * pow(0.013, 3) / 3;
118  Mdouble collisionTimeIntra = sqrt(constantMass * (pow(constants::pi, 2) + pow(log(0.5), 2)) /
119  (2 * 1e3));
120 
123  species->setConstantRestitution(true);
124  species->setDensity(2700);
125  species->setCollisionTimeAndRestitutionCoefficient(collisionTimeIntra, 0.5, 1);
126  species->setUnloadingStiffnessMax(
127  species->getLoadingStiffness() * 5);
128  species->setCohesionStiffness(species->getUnloadingStiffnessMax() / 3);
129  species->setPenetrationDepthMax(0.1);
130 
131  species->setSlidingFrictionCoefficient(0.1);
132  species->setSlidingStiffness(species->getLoadingStiffness() * 2.0/7.0);
133  species->setSlidingDissipation(species->getDissipation() * 2.0 / 7.0);
134  insertionBoundary_problem.speciesHandler.copyAndAddObject(species);
135 
136 
137 
138 
139 
140  insertionBoundary_problem.setNumberOfDomains({1,2,1});
141  insertionBoundary_problem.solve();
142 }
Species< LinearPlasticViscoelasticNormalSpecies, FrictionSpecies > LinearPlasticViscoelasticFrictionSpecies
Definition: LinearPlasticViscoelasticFrictionSpecies.h:34
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
std::enable_if<!std::is_pointer< U >::value, U * >::type copyAndAddObject(const U &object)
Creates a copy of a Object and adds it to the BaseHandler.
Definition: BaseHandler.h:379
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1427
void setNumberOfDomains(std::vector< unsigned > direction)
Sets the number of domains in x-,y- and z-direction. Required for parallel computations.
Definition: DPMBase.cc:5213
void setMin(const Vec3D &min)
Sets the minimum coordinates of the problem domain.
Definition: DPMBase.cc:1118
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
void setMax(const Vec3D &max)
Sets the maximum coordinates of the problem domain.
Definition: DPMBase.cc:1082
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:108
Definition: RandomClusterInsertionBoundaryDemo.cpp:44
Contains material and contact force properties.
Definition: Species.h:35
Definition: Vector.h:51
const Mdouble pi
Definition: ExtendedMath.h:45
Mdouble log(Mdouble Power)
Definition: ExtendedMath.cc:104

References BaseHandler< T >::copyAndAddObject(), INFO, mathsFunc::log(), logger, constants::pi, ParticleSpecies::setDensity(), DPMBase::setMax(), DPMBase::setMin(), DPMBase::setNumberOfDomains(), DPMBase::solve(), and DPMBase::speciesHandler.