60 species->setCollisionTimeAndRestitutionCoefficient(0.01, 1.0, 1.0);
110 return Vec3D(0.0,0.0,time);
123 return Vec3D(0.0,0.0,1);
136 return Vec3D(0.0,0.0,time);
140 return Vec3D(0.0,0.0,1);
152 species->setCollisionTimeAndRestitutionCoefficient(0.01, 0.5, 1);
153 species->setSlidingFrictionCoefficient(0.5);
154 species->setSlidingStiffness(
species->getStiffness() * 2.0 / 7.0);
190 return Vec3D(time,0.0,0.0);
203 return Vec3D(1.0,0.0,0.0);
216 return Vec3D(time,0.0,0.0);
220 return Vec3D(1.0,0.0,0.0);
250 problem0.
setName(
"MovingWallUnitTest_Normal_Reference");
253 problem1.
setName(
"MovingWallUnitTest_Normal_SimpleIntegration");
256 problem2.
setName(
"MovingWallUnitTest_Normal_PrescribedPosition");
259 problem3.
setName(
"MovingWallUnitTest_Normal_PrescribedVelocity");
262 problem4.
setName(
"MovingWallUnitTest_Normal_PrescribedPositionPrescribedVelocity");
266 Vec3D velocityDifference =
Vec3D(0.0, 0.0, 1.0);
267 Vec3D orientationDifference =
Vec3D(0.0, 0.0, 0.0);
268 Vec3D angularVelocityDifference =
Vec3D(0.0, 0.0, 0.0);
276 problem5.
setName(
"MovingWallUnitTest_Tangential_Reference");
279 problem6.
setName(
"MovingWallUnitTest_Tangential_SimpleIntegration");
282 problem7.
setName(
"MovingWallUnitTest_Tangential_PrescribedPosition");
285 problem8.
setName(
"MovingWallUnitTest_Tangential_PrescribedVelocity");
288 problem9.
setName(
"MovingWallUnitTest_Tangential_PrescribedPositionPrescribedVelocity");
292 Vec3D velocityDifference =
Vec3D(1.0, 0.0, 0.0);
293 Vec3D orientationDifference =
Vec3D(0.0, 0.0, 0.0);
294 Vec3D angularVelocityDifference =
Vec3D(0.0, 0.0, 0.0);
void compareParticles(BaseParticle *Ptest, BaseParticle *Pref, double absError, Vec3D positionDifference, Vec3D velocityDifference, Vec3D orientationDifference, Vec3D AngularVelocityDifference)
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.
LinearViscoelasticSlidingFrictionSpecies * species
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")
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 ...
void setPrescribedPosition(std::function< Vec3D(double)> prescribedPosition)
Allows the position of an infinite mass interactable to be prescribed.
void setParticleDimensions(unsigned int particleDimensions)
Allows the dimension of the particle (f.e. for mass) to be changed. e.g. discs or spheres...
void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
void setZMax(Mdouble newZMax)
If the length of the problem domain in z-direction is XMax - XMin, this method sets ZMax...
virtual const Vec3D & getAngularVelocity() const
Returns the angular velocity of this interactable.
void setSystemDimensions(unsigned int newDim)
Allows for the dimension of the simulation to be changed.
Species< LinearViscoelasticNormalSpecies, SlidingFrictionSpecies > LinearViscoelasticSlidingFrictionSpecies
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 Vec3D & getPosition() const
Returns the position of this BaseInteractable.
const Vec3D & getOrientation() const
Returns the orientation of this BaseInteractable.
void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
In the reference case the particle just moves two times as fast.
void setYMax(Mdouble newYMax)
If the length of the problem domain in y-direction is YMax - YMin, this method sets YMax...
void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
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.
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created...
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
void setPrescribedVelocity(std::function< Vec3D(double)> prescribedVelocity)
Allows the velocity of an infinite mass interactable to be prescribed.
void setDensity(Mdouble density)
Allows the density to be changed.
This tests if moving the wall works with CWall::move(Vec3D velocity,Vec3D dt).
void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
LL< Log::FATAL > FATAL
Fatal log level.
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Mdouble getRadius() const
Returns the particle's radius_.
void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. elastic, linear visco-elastic... et cetera...
bool isEqual(Mdouble v1, Mdouble v2, double absError)
Compares the difference of two Mdouble with an absolute error, useful in UnitTests.
void setNormal(const Vec3D normal)
Changes the normal of the InfiniteWall.
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 setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
In the reference case the particle just moves two times as fast.
void setTimeStep(Mdouble newDt)
Allows the time step dt to be changed.
This is a class defining walls.
Contains material and contact force properties.
T * getLastObject()
Gets a pointer to the last Object in this BaseHandler.
int main(int argc UNUSED, char *argv[] UNUSED)
virtual const Vec3D & getVelocity() const
Returns the velocity of this interactable.
Implementation of a 3D vector (by Vitaliy).
Mdouble getTimeStep() const
Allows the time step dt to be accessed.
unsigned int getSaveCountFromNumberOfSavesAndTimeMaxAndTimestep(unsigned int numberOfSaves, Mdouble timeMax, Mdouble timestep)
Returns the correct saveCount if the total number of saves, the final time and the time step is known...
Mdouble getTime() const
Access function for the time.
Mdouble getTimeMax() const
Allows the user to access the total simulation time during the simulation. Cannot change it though...
void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...