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 
)
87 {
88  logger(INFO,"Simple box for creating particles");
89 
90  RandomClusterInsertionBoundarySelfTest insertionBoundary_problem;
91  insertionBoundary_problem.setMin(Vec3D(-0.5, -0.5, -0.5));
92  insertionBoundary_problem.setMax(Vec3D(0.5, 0.5, 0.5));
93 
94 
95 
96  Mdouble constantMass = 2700 * 4 * constants::pi * pow(0.013, 3) / 3;
97  Mdouble collisionTimeIntra = sqrt(constantMass * (pow(constants::pi, 2) + pow(log(0.5), 2)) /
98  (2 * 1e3));
99 
102  species->setConstantRestitution(true);
103  species->setDensity(2700);
104  species->setCollisionTimeAndRestitutionCoefficient(collisionTimeIntra, 0.5, 1);
105  species->setUnloadingStiffnessMax(
106  species->getLoadingStiffness() * 5);
107  species->setCohesionStiffness(species->getUnloadingStiffnessMax() / 3);
108  species->setPenetrationDepthMax(0.1);
109 
110  species->setSlidingFrictionCoefficient(0.1);
111  species->setSlidingStiffness(species->getLoadingStiffness() * 2.0/7.0);
112  species->setSlidingDissipation(species->getDissipation() * 2.0 / 7.0);
113  insertionBoundary_problem.speciesHandler.copyAndAddObject(species);
114 
115 
116 
117 
118 
119  insertionBoundary_problem.setNumberOfDomains({1,2,1});
120  insertionBoundary_problem.solve();
121 }
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
Species< LinearPlasticViscoelasticNormalSpecies, FrictionSpecies > LinearPlasticViscoelasticFrictionSpecies
Definition: LinearPlasticViscoelasticFrictionSpecies.h:12
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:360
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1433
void setNumberOfDomains(std::vector< unsigned > direction)
Sets the number of domains in x-,y- and z-direction. Required for parallel computations.
Definition: DPMBase.cc:5302
void setMin(const Vec3D &min)
Sets the minimum coordinates of the problem domain.
Definition: DPMBase.cc:1109
void solve()
The work horse of the code.
Definition: DPMBase.cc:4334
void setMax(const Vec3D &max)
Sets the maximum coordinates of the problem domain.
Definition: DPMBase.cc:1073
EIGEN_DEVICE_FUNC const GlobalUnaryPowReturnType< Derived, ScalarExponent > pow(const Eigen::ArrayBase< Derived > &x, const ScalarExponent &exponent)
Definition: GlobalFunctions.h:137
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:88
Definition: RandomClusterInsertionBoundaryDemo.cpp:23
Contains material and contact force properties.
Definition: Species.h:14
Definition: Kernel/Math/Vector.h:30
#define INFO(i)
Definition: mumps_solver.h:54
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 log(const bfloat16 &a)
Definition: BFloat16.h:618
const Mdouble pi
Definition: ExtendedMath.h:23

References BaseHandler< T >::copyAndAddObject(), INFO, Eigen::bfloat16_impl::log(), logger, constants::pi, Eigen::ArrayBase< Derived >::pow(), ParticleSpecies::setDensity(), DPMBase::setMax(), DPMBase::setMin(), DPMBase::setNumberOfDomains(), DPMBase::solve(), DPMBase::speciesHandler, and sqrt().