64 species->setSlidingFrictionCoefficient(0.5);
95 return baseSpecies->getSlidingFrictionCoefficient();
96 else return species->getSlidingFrictionCoefficient();
104 static bool created=
false;
116 std::stringstream
name;
120 <<
"M" <<
species->getSlidingFrictionCoefficient()
144 Mdouble Lambdas[] = {0, 3./6., 4./6., 5./6., 1, 2};
146 species->setSlidingFrictionCoefficient(0.5);
147 }
else if (study_num < 9) {
149 Mdouble MuAll[] = {0, 1., 1e20};
150 species->setSlidingFrictionCoefficient(MuAll[study_num-6]);
152 }
else if (study_num < 12) {
154 Mdouble MuBottom[] = {0, 1., 1e20};
155 species->setSlidingFrictionCoefficient(0.5);
158 }
else if (study_num < 14) {
160 Mdouble MuBottom[] = {0.25, 0.125};
161 species->setSlidingFrictionCoefficient(0.5);
164 }
else if (study_num < 16) {
166 Mdouble MuAll[] = {0.25, 0.125};
167 species->setSlidingFrictionCoefficient(MuAll[study_num-14]);
169 }
else if (study_num < 21) {
171 Mdouble Lambdas[] = {1./6., 2./6., 1.5, 4, 1./12};
173 species->setSlidingFrictionCoefficient(0.5);
174 }
else if (study_num < 26) {
176 Mdouble MuBottom[] = {1./16.,1./32.,1./64.,1./128.,1./1024.};
177 species->setSlidingFrictionCoefficient(0.5);
180 }
else if (study_num < 29) {
182 Mdouble MuBottom[] = {1./16.,1./128.,1./1024.};
183 species->setSlidingFrictionCoefficient(0.5);
186 }
else if (study_num < 33) {
188 Mdouble MuBottom[] = {1./16.,1./128.,1./1024.,0};
189 species->setSlidingFrictionCoefficient(0.5);
192 }
else if (study_num < 37) {
195 Mdouble Mu[] = {1e20,1,1./64,0};
196 species->setSlidingFrictionCoefficient(Mu[study_num-33]);
199 }
else if (study_num < 38) {
201 species->setSlidingDissipation(0);
202 }
else if (study_num < 39) {
207 }
else if (study_num < 40)
210 logger(
INFO,
"Hertzian implementation has been changed");
214 }
else if (study_num < 43) {
216 Mdouble eps[] = {0.97 , 0.95 , 0.972};
218 Mdouble mu[] = {0.092, 0.099, 0.177};
219 species->setSlidingFrictionCoefficient(mu[study_num-40]);
220 species->setCollisionTimeAndNormalAndTangentialRestitutionCoefficient
222 }
else if (study_num < 47) {
224 Mdouble eps[] = {0.97 , 0.95 , 0.972};
226 Mdouble mu[] = {0.092, 0.099, 0.177};
228 species->setSlidingFrictionCoefficient(mu[study_num-44]);
229 species->setCollisionTimeAndNormalAndTangentialRestitutionCoefficient
234 species->setRollingFrictionCoefficient(0.05);
235 }
else if (study_num < 48) {
238 species->setSlidingFrictionCoefficient(MuHalf[study_num-47]);
242 }
else if (study_num < 52) {
244 Mdouble eps[] = {0.001, 0.01, 0.1, 1};
245 species->setCollisionTimeAndNormalAndTangentialRestitutionCoefficient
246 (50.*
getTimeStep(), eps[study_num-48], eps[study_num-48], 1);
247 species->setSlidingFrictionCoefficient(0.0);
248 }
else if (study_num < 53) {
250 }
else if (study_num < 54) {
252 species->setSlidingFrictionCoefficient(0.3);
253 species->setCollisionTimeAndNormalAndTangentialRestitutionCoefficient
255 }
else if (study_num < 55) {
257 species->setSlidingFrictionCoefficient(0.3);
258 species->setCollisionTimeAndNormalAndTangentialRestitutionCoefficient
267 if (study_num < 37 || (study_num>=53&&study_num<=55))
273 std::stringstream
name;
274 name <<
"S" << study_num;
374 write(std::cout,
false);
420 if (!strcmp(argv[
i],
"-muBottom"))
425 else if (!strcmp(argv[
i],
"-oldValues"))
@ MULTILAYER
Definition: Chute.h:53
@ MULTIPLE_FILES_PADDED
each time-step will be written into/read from separate files numbered consecutively,...
@ NO_FILE
file will not be created/read
@ ONE_FILE
all data will be written into/ read from a single file called name_
Species< LinearViscoelasticNormalSpecies, FrictionSpecies > LinearViscoelasticFrictionSpecies
Definition: LinearViscoelasticFrictionSpecies.h:34
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
Definition: BaseBoundary.h:49
virtual unsigned int getNumberOfObjects() const
Gets the number of real Object in this BaseHandler. (i.e. no mpi or periodic particles)
Definition: BaseHandler.h:648
virtual void clear()
Empties the whole BaseHandler by removing all Objects and setting all other variables to 0.
Definition: BaseHandler.h:528
void setStorageCapacity(const unsigned int N)
Sets the storage capacity of this BaseHandler.
Definition: BaseHandler.h:669
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
unsigned int getStorageCapacity() const
Gets the storage capacity of this BaseHandler.
Definition: BaseHandler.h:662
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
Definition: BaseHandler.h:613
T * getLastObject()
Gets a pointer to the last Object in this BaseHandler.
Definition: BaseHandler.h:634
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
Definition: BaseInteractable.cc:350
virtual void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
Definition: BaseInteractable.h:239
const std::vector< BaseInteraction * > & getInteractions() const
Returns a list of interactions which belong to this interactable.
Definition: BaseInteractable.h:277
Definition: BaseParticle.h:54
bool isFixed() const override
Is fixed Particle function. It returns whether a Particle is fixed or not, by checking its inverse Ma...
Definition: BaseParticle.h:93
Mdouble getRadius() const
Returns the particle's radius.
Definition: BaseParticle.h:348
virtual void setRadius(Mdouble radius)
Sets the particle's radius_ (and adjusts the mass_ accordingly, based on the particle's species)
Definition: BaseParticle.cc:553
BaseParticle * getPeriodicFromParticle() const
Returns the 'original' particle this one's a periodic copy of.
Definition: BaseParticle.h:341
void setSpecies(const ParticleSpecies *species)
Definition: BaseParticle.cc:818
void setSpecies(const ParticleSpecies *species)
Defines the species of the current wall.
Definition: BaseWall.cc:169
Creates chutes with different bottoms. Inherits from Mercury3D (-> MercuryBase -> DPMBase).
Definition: Chute.h:65
void setChuteWidth(Mdouble chuteWidth)
Sets the chute width (Y-direction)
Definition: Chute.cc:1039
void setInflowParticleRadius(Mdouble inflowParticleRadius)
Sets the radius of the inflow particles to a single one (i.e. ensures a monodisperse inflow).
Definition: Chute.cc:848
void setRoughBottomType(RoughBottomType roughBottomType)
Sets the type of rough bottom of the chute.
Definition: Chute.cc:714
virtual void setChuteLength(Mdouble chuteLength)
Sets the chute length (X-direction)
Definition: Chute.cc:1059
Mdouble getFixedParticleRadius() const
Returns the particle radius of the fixed particles which constitute the (rough) chute bottom.
Definition: Chute.cc:671
Mdouble getMaxInflowParticleRadius() const
Returns the maximum radius of inflow particles.
Definition: Chute.cc:947
Mdouble getInflowHeight() const
Returns the maximum inflow height (Z-direction)
Definition: Chute.cc:974
virtual void createBottom()
Creates the chute bottom, which can be either flat or one of three flavours of rough.
Definition: Chute.cc:323
bool readNextArgument(int &i, int argc, char *argv[]) override
This method can be used for reading object properties from a string.
Definition: Chute.cc:555
void setChuteAngleAndMagnitudeOfGravity(Mdouble chuteAngle, Mdouble gravity)
Sets gravity vector according to chute angle (in degrees)
Definition: Chute.cc:789
Mdouble getChuteLength() const
Returns the chute length (X-direction)
Definition: Chute.cc:1069
void setInflowVelocity(Mdouble inflowVelocity)
Sets the average inflow velocity.
Definition: Chute.cc:983
void write(std::ostream &os, bool writeAllParticles=true) const override
This function writes the Chute properties to an ostream, and adds the properties of ALL chute particl...
Definition: Chute.cc:206
Mdouble getMinInflowParticleRadius() const
returns the minimum radius of inflow particles
Definition: Chute.cc:938
Mdouble getChuteWidth() const
Returns the chute width (Y-direction)
Definition: Chute.cc:1049
Mdouble getInflowVelocity() const
Returns the average inflow velocity.
Definition: Chute.cc:1000
void setInflowHeight(Mdouble inflowHeight)
Sets maximum inflow height (Z-direction)
Definition: Chute.cc:957
void setFixedParticleRadius(Mdouble fixedParticleRadius)
Sets the particle radius of the fixed particles which constitute the (rough) chute bottom.
Definition: Chute.cc:653
Mdouble getChuteAngleDegrees() const
Returns the chute angle (in degrees)
Definition: Chute.cc:816
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin.
Definition: DPMBase.h:619
Mdouble getXMax() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax.
Definition: DPMBase.h:626
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
File eneFile
An instance of class File to handle in- and output into a .ene file.
Definition: DPMBase.h:1488
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1427
File fStatFile
An instance of class File to handle in- and output into a .fstat file.
Definition: DPMBase.h:1483
Mdouble getYMin() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin.
Definition: DPMBase.h:632
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 getTimeStep() const
Returns the simulation time step.
Definition: DPMBase.cc:1250
Mdouble getTime() const
Returns the current simulation time.
Definition: DPMBase.cc:808
File dataFile
An instance of class File to handle in- and output into a .data file.
Definition: DPMBase.h:1478
WallHandler wallHandler
An object of the class WallHandler. Contains pointers to all the walls created.
Definition: DPMBase.h:1447
File restartFile
An instance of class File to handle in- and output into a .restart file.
Definition: DPMBase.h:1493
BoundaryHandler boundaryHandler
An object of the class BoundaryHandler which concerns insertion and deletion of particles into or fro...
Definition: DPMBase.h:1452
virtual void writeRestartFile()
Stores all the particle data for current save time step to a "restart" file, which is a file simply i...
Definition: DPMBase.cc:2942
InteractionHandler interactionHandler
An object of the class InteractionHandler.
Definition: DPMBase.h:1467
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1437
void setZMax(Mdouble newZMax)
Sets the value of ZMax, the upper bound of the problem domain in the z-direction.
Definition: DPMBase.cc:1217
RNG random
This is a random generator, often used for setting up the initial conditions etc.....
Definition: DPMBase.h:1432
void checkAndDuplicatePeriodicParticles()
For simulations using periodic boundaries, checks and adds particles when necessary into the particle...
Definition: DPMBase.cc:5029
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax.
Definition: DPMBase.h:638
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
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:888
Mdouble getZMax() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax.
Definition: DPMBase.h:650
Mdouble getZMin() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin.
Definition: DPMBase.h:644
void setName(const std::string &name)
Sets the file name, e.g. "Name.data".
Definition: File.cc:198
void setFileType(FileType fileType)
Sets the type of file needed to write into or read from. File::fileType_.
Definition: File.cc:215
A infinite wall fills the half-space {point: (position_-point)*normal_<=0}.
Definition: InfiniteWall.h:48
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...
Definition: InfiniteWall.cc:118
void removeObjectKeepingPeriodics(unsigned int id)
Removes interactions of periodic particles when the periodic particles get deleted (see DPMBase::remo...
Definition: InteractionHandler.cc:316
void setStiffnessAndRestitutionCoefficient(Mdouble k_, Mdouble eps, Mdouble mass)
Sets k, disp such that it matches a given tc and eps for a collision of two copies of P.
Definition: LinearViscoelasticNormalSpecies.cc:186
Mdouble getStiffness() const
Allows the spring constant to be accessed.
Definition: LinearViscoelasticNormalSpecies.cc:104
void setDissipation(Mdouble dissipation)
Allows the normal dissipation to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:117
Mdouble getDissipation() const
Allows the normal dissipation to be accessed.
Definition: LinearViscoelasticNormalSpecies.cc:130
void setStiffness(Mdouble new_k)
Allows the spring constant to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:93
void hGridActionsBeforeTimeLoop() override
This sets up the broad phase information, has to be done at this stage because it requires the partic...
Definition: MercuryBase.cc:94
bool checkParticleForInteraction(const BaseParticle &P) final
Checks if given BaseParticle has an interaction with a BaseWall or other BaseParticle.
Definition: MercuryBase.cc:594
void hGridActionsBeforeTimeStep() override
Performs all necessary actions before a time-step, like updating the particles and resetting all the ...
Definition: MercuryBase.cc:323
Contains contact force properties for contacts between particles with two different species.
Definition: MixedSpecies.h:43
void removeObject(unsigned int index) override
Removes a BaseParticle from the ParticleHandler.
Definition: ParticleHandler.cc:394
unsigned int getNumberOfObjects() const override
Returns the number of objects in the container. In parallel code this practice is forbidden to avoid ...
Definition: ParticleHandler.cc:1325
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:108
Defines a pair of periodic walls. Inherits from BaseBoundary.
Definition: PeriodicBoundary.h:41
void set(Vec3D normal, Mdouble distanceLeft, Mdouble distanceRight)
Defines a PeriodicBoundary by its normal and positions.
Definition: PeriodicBoundary.cc:84
Mdouble getRandomNumber()
This is a random generating routine can be used for initial positions.
Definition: RNG.cc:143
Definition: flowRuleDiego_HeightAngle.cpp:35
virtual void createBaseSpecies()
Definition: flowRuleDiego_HeightAngle.cpp:89
LinearViscoelasticMixedSpecies * baseSpecies
Definition: flowRuleDiego_HeightAngle.cpp:266
void setSlidingFrictionCoefficientBottom(Mdouble new_)
Definition: SilbertPeriodic.h:98
void add_flow_particles()
Definition: flowRuleDiego_HeightAngle.cpp:165
void create_inflow_particle()
Definition: flowRuleDiego_HeightAngle.cpp:210
LinearViscoelasticSpecies * species
Definition: flowRuleDiego_HeightAngle.cpp:265
void increaseNCreated()
Definition: flowRuleDiego_HeightAngle.cpp:256
virtual void actionsBeforeTimeStep() override
A virtual function which allows to define operations to be executed before the new time step.
Definition: SilbertPeriodic.h:282
void set_study()
Definition: SilbertPeriodic.h:115
void set_H(Mdouble new_)
Definition: flowRuleDiego_HeightAngle.cpp:231
SphericalParticle inflowParticle_
Definition: flowRuleDiego_HeightAngle.cpp:263
SilbertPeriodic()
Definition: SilbertPeriodic.h:38
bool readNextArgument(int &i, int argc, char *argv[]) override
Interprets the i^th command-line argument.
Definition: SilbertPeriodic.h:418
Mdouble get_H()
Definition: SilbertPeriodic.h:404
int nCreated_
Definition: flowRuleDiego_HeightAngle.cpp:261
Mdouble getSlidingFrictionCoefficientBottom()
Definition: SilbertPeriodic.h:93
bool randomiseSpecies
Definition: flowRuleDiego_HeightAngle.cpp:262
void set_study(int study_num)
Definition: SilbertPeriodic.h:126
void printTime() const override
Displays the current simulation time and the maximum simulation duration.
Definition: SilbertPeriodic.h:407
int getNCreated() const
Definition: flowRuleDiego_HeightAngle.cpp:251
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: SilbertPeriodic.h:285
std::enable_if<!std::is_pointer< typename U::MixedSpeciesType >::value, typename U::MixedSpeciesType * >::type getMixedObject(const U *S, const U *T)
Definition: SpeciesHandler.h:74
Contains material and contact force properties.
Definition: Species.h:35
A spherical particle is the most simple particle used in MercuryDPM.
Definition: SphericalParticle.h:37
Mdouble Y
Definition: Vector.h:66
Mdouble Z
Definition: Vector.h:66
Mdouble X
the vector components
Definition: Vector.h:66
const Mdouble pi
Definition: ExtendedMath.h:45
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51
Mdouble round(Mdouble value, unsigned int precision)
rounds a floating point number with a given precision
Definition: MathHelpers.cc:28
Mdouble beta(Mdouble z, Mdouble w)
This is the beta function, returns the approximation based on cmath's implementation of ln(gamma)
Definition: ExtendedMath.cc:164
std::string name
Definition: MercuryProb.h:48