69 logger(
INFO,
"Species is neither Sinter nor LinearPlasticViscoelastic");
73 double maximumForce = 3;
76 double forceRange = 3;
78 double adStiffness = maximumForce / forceRange;
80 double bondStrength = 100.0;
89 species->setEffectiveElasticModulus(1000.0);
90 species->setSlidingFrictionCoefficient(0.0);
91 species->setAdhesionForceMax(maximumForce);
92 species->setAdhesionStiffness(adStiffness);
93 species->setBondForceMax(bondStrength);
94 species->setBondDissipation(0.2);
95 species->setVanDerWaalsForceMax(1);
96 species->setVanDerWaalsStiffness(10);
97 species->setCharge(-1);
101 species2->setCharge(1);
104 dpm.
setName(
"ChargedBondedParticleUnitTest");
114 dpm.
solve(argc, argv);
117 "set xlabel 'time [s]'\n"
118 "set ylabel 'total Energy [J]'\n"
119 "p 'ChargedBondedParticleUnitTest.ene' u 1:($2+$3+$4+$5) w l\n"
124 if (fabs(eneElastic + eneKinetic - (4.03257e-05)) >= 1e-6)
126 logger(
FATAL,
"Particles have the wrong total energy. It is % and should be %", eneElastic+eneKinetic,
double Mdouble
Definition: GeneralDefine.h:34
Species< HertzianViscoelasticNormalSpecies, FrictionSpecies, ChargedBondedSpecies > HertzianViscoelasticFrictionChargedBondedSpecies
Definition: HertzianViscoelasticFrictionChargedBondedSpecies.h:35
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
LL< Log::FATAL > FATAL
Definition of the different loglevels by its wrapper class LL. These are used as tags in template met...
Definition: Logger.cc:52
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
In this file, the rolling behaviour of the tangential spring is tested. This is done by placing one n...
Definition: ClayParticles.cpp:35
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1427
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
Mdouble getKineticEnergy() const
Returns the global kinetic energy stored in the system.
Definition: DPMBase.cc:1544
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1234
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:873
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
void setGravity(Vec3D newGravity)
Sets a new value for the gravitational acceleration.
Definition: DPMBase.cc:1383
Mdouble getElasticEnergy() const
Returns the global elastic energy within the system.
Definition: DPMBase.cc:1530
const Mdouble pi
Definition: ExtendedMath.h:45
bool writeToFile(std::string filename, std::string filecontent)
Writes a string to a file.
Definition: FileIOHelpers.cc:58