55 setName(
"AdhesiveForceUnitTest_ParticleParticleInteraction");
143 setName(
"AdhesiveForceUnitTest_ParticleParticleInteractionWithPlasticForces");
170 setName(
"AdhesiveForceUnitTest_ParticleWallInteractionWithPlasticForces");
216 ParticleParticleInteractionProblem.
solve();
218 logger(
INFO,
"Testing particle-particle collision for elastic adhesive forces");
219 std::vector<BaseParticle*>::iterator pIt = ParticleParticleInteractionProblem.
particleHandler.
begin();
220 if (!(*pIt)->getPosition().isEqualTo(
Vec3D(-0.00101582359198137,0.0,0.0), 1e-7))
221 logger(
FATAL,
"First particle is in the wrong position. It is at %",(*pIt)->getPosition());
222 if (!(*pIt)->getVelocity().isEqualTo(
Vec3D(-0.0436824,0.0,0.0) , 1e-7))
223 logger(
FATAL,
"First particle has the wrong velocity. It is at %",(*pIt)->getVelocity());
225 if (!(*pIt)->getPosition().isEqualTo(
Vec3D(0.00101582359198137,0.0,0.0), 1e-7))
226 logger(
FATAL,
"Second particle is in the wrong position. It is at %",(*pIt)->getPosition());
227 if (!(*pIt)->getVelocity().isEqualTo(
Vec3D(0.0436824,0.0,0.0) , 1e-7))
228 logger(
FATAL,
"Second particle has the wrong velocity. It is at %",(*pIt)->getVelocity());
232 ParticleParticleInteractionWithPlasticForcesProblem.
solve();
234 logger(
INFO,
"Testing particle particles collision for plastic adhesive forces");
235 std::vector<BaseParticle*>::iterator pIt2 = ParticleParticleInteractionWithPlasticForcesProblem.
particleHandler.
begin();
236 if (!(*pIt2)->getPosition().isEqualTo(
Vec3D(-0.00107858,0.0,0.0), 1e-7))
237 logger(
FATAL,
"First particle is in the wrong position. It is at %",(*pIt2)->getPosition());
238 if (!(*pIt2)->getVelocity().isEqualTo(
Vec3D(-0.0352526,0.0,0.0) , 1e-7))
239 logger(
FATAL,
"First particle has the wrong velocity. It is at %",(*pIt2)->getVelocity());
241 if (!(*pIt2)->getPosition().isEqualTo(
Vec3D(0.00107858,0.0,0.0), 1e-7))
242 logger(
FATAL,
"Second particle is in the wrong position. It is at %",(*pIt2)->getPosition());
243 if (!(*pIt2)->getVelocity().isEqualTo(
Vec3D(0.0352526,0.0,0.0) , 1e-7))
244 logger(
FATAL,
"Second particle has the wrong velocity. It is at %",(*pIt2)->getVelocity());
248 ParticleWallInteraction.
solve();
250 logger(
INFO,
"Testing particle-wall collision for plastic adhesive forces");
252 if (!(*pIt3)->getPosition().isEqualTo(
Vec3D(0.00104381,0.0,0.0), 1e-7))
253 logger(
FATAL,
"The particle is in the wrong position. It is at %",(*pIt3)->getPosition());
254 if (!(*pIt3)->getVelocity().isEqualTo(
Vec3D(0.0362122,0.0,0.0) , 1e-7))
255 logger(
FATAL,
"The particle has the wrong velocity. It is at %",(*pIt3)->getVelocity());
void setCohesionStiffness(Mdouble cohesionStiffness)
Sets the cohesive stiffness of the linear plastic-viscoelastic normal force.
void setXMax(Mdouble newXMax)
If the length of the problem domain in x-direction is XMax - XMin, this method sets XMax...
void solve()
The work horse of the code.
The DPMBase header includes quite a few header files, defining all the handlers, which are essential...
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
void setTimeMax(Mdouble newTMax)
Allows the upper time limit to be changed.
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Species< LinearViscoelasticNormalSpecies, SlidingFrictionSpecies, IrreversibleAdhesiveSpecies > * species
void setYMin(Mdouble newYMin)
If the length of the problem domain in y-direction is YMax - YMin, this method sets YMin...
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin...
LL< Log::INFO > INFO
Info log level.
void setAdhesionStiffness(Mdouble new_k0)
Allows the spring constant to be changed.
void setParticleDimensions(unsigned int particleDimensions)
Allows the dimension of the particle (f.e. for mass) to be changed. e.g. discs or spheres...
ParticleParticleInteractionWithPlasticForces()
void setZMax(Mdouble newZMax)
If the length of the problem domain in z-direction is XMax - XMin, this method sets ZMax...
void setSystemDimensions(unsigned int newDim)
Allows for the dimension of the simulation to be changed.
void setFileType(FileType fileType)
Sets File::fileType_ for all files (ene, data, fstat, restart, stat)
void setGravity(Vec3D newGravity)
Allows to modify the gravity vector.
void setRadius(const Mdouble radius)
Sets the particle's radius_ (and adjusts the mass_ accordingly, based on the particle's species) ...
const std::vector< T * >::const_iterator begin() const
Gets the begin of the const_iterator over all Object in this BaseHandler.
void clear()
Empties the whole ParticleHandler by removing all BaseParticle.
Mdouble getInteractionDistance() const final
Returns the particle distance below which adhesive forces can occur (needed for contact detection) ...
Species< LinearPlasticViscoelasticNormalSpecies, SlidingFrictionSpecies, IrreversibleAdhesiveSpecies > * species
void setPenetrationDepthMax(Mdouble penetrationDepthMax)
Sets the maximum penetration depth of the linear plastic-viscoelastic normal force.
void setYMax(Mdouble newYMax)
If the length of the problem domain in y-direction is YMax - YMin, this method sets YMax...
void setStiffness(Mdouble new_k)
Allows the spring constant to be changed.
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
U * copyAndAddObject(const U &O)
Creates a copy of a Object and adds it to the BaseHandler.
ParticleWallInteraction()
virtual void addObject(ParticleSpecies *const S)
Adds a new ParticleSpecies to the SpeciesHandler.
void setXMin(Mdouble newXMin)
If the length of the problem domain in x-direction is XMax - XMin, this method sets XMin...
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created...
all data will be written into/ read from a single file called name_
void setDensity(Mdouble density)
Allows the density to be changed.
LL< Log::FATAL > FATAL
Fatal log level.
void setLoadingStiffness(Mdouble loadingStiffness)
Sets the loading stiffness of the linear plastic-viscoelastic normal force.
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
void setSlidingStiffness(Mdouble new_kt)
Allows the spring constant to be changed.
void setSlidingFrictionCoefficient(Mdouble new_mu)
Allows the (dynamic) Coulomb friction coefficient to be changed; also sets mu_s by default...
void setZMin(Mdouble newZMin)
If the length of the problem domain in z-direction is ZMax - ZMin, this method sets ZMin...
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. elastic, linear visco-elastic... et cetera...
void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
WallHandler wallHandler
An object of the class WallHandler. Contains pointers to all the walls created.
void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
void set(Vec3D normal, Vec3D point)
Defines a standard wall, given an outward normal vector s.t. normal*x=normal*point for all x of the w...
void setTimeStep(Mdouble newDt)
Allows the time step dt to be changed.
This is a class defining walls.
ParticleParticleInteraction()
This code is written to test short-distance non-contact forces such as van-der-Waals or liquid bridge...
Mdouble getAdhesionStiffness() const
Allows the spring constant to be accessed.
Implementation of a 3D vector (by Vitaliy).
Mdouble getTimeStep() const
Allows the time step dt to be accessed.
void setUnloadingStiffnessMax(Mdouble unloadingStiffnessMax)
Sets the maximum unloading stiffness of the linear plastic-viscoelastic normal force.
Species< LinearViscoelasticNormalSpecies, SlidingFrictionSpecies, IrreversibleAdhesiveSpecies > * species
void setAdhesionForceMax(Mdouble new_f0)
Allows the spring constant to be changed.
void clear()
Empties the whole BaseHandler by removing all Objects and setting all other variables to 0...
void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Mdouble getLoadingStiffness() const
Returns the loading stiffness of the linear plastic-viscoelastic normal force.
int main(int argc UNUSED, char *argv[] UNUSED)