43 species->setSlidingFrictionCoefficient(0.5);
74 return baseSpecies->getSlidingFrictionCoefficient();
75 else return species->getSlidingFrictionCoefficient();
83 static bool created=
false;
95 std::stringstream
name;
99 <<
"M" <<
species->getSlidingFrictionCoefficient()
123 Mdouble Lambdas[] = {0, 3./6., 4./6., 5./6., 1, 2};
125 species->setSlidingFrictionCoefficient(0.5);
126 }
else if (study_num < 9) {
128 Mdouble MuAll[] = {0, 1., 1e20};
129 species->setSlidingFrictionCoefficient(MuAll[study_num-6]);
131 }
else if (study_num < 12) {
133 Mdouble MuBottom[] = {0, 1., 1e20};
134 species->setSlidingFrictionCoefficient(0.5);
137 }
else if (study_num < 14) {
139 Mdouble MuBottom[] = {0.25, 0.125};
140 species->setSlidingFrictionCoefficient(0.5);
143 }
else if (study_num < 16) {
145 Mdouble MuAll[] = {0.25, 0.125};
146 species->setSlidingFrictionCoefficient(MuAll[study_num-14]);
148 }
else if (study_num < 21) {
150 Mdouble Lambdas[] = {1./6., 2./6., 1.5, 4, 1./12};
152 species->setSlidingFrictionCoefficient(0.5);
153 }
else if (study_num < 26) {
155 Mdouble MuBottom[] = {1./16.,1./32.,1./64.,1./128.,1./1024.};
156 species->setSlidingFrictionCoefficient(0.5);
159 }
else if (study_num < 29) {
161 Mdouble MuBottom[] = {1./16.,1./128.,1./1024.};
162 species->setSlidingFrictionCoefficient(0.5);
165 }
else if (study_num < 33) {
167 Mdouble MuBottom[] = {1./16.,1./128.,1./1024.,0};
168 species->setSlidingFrictionCoefficient(0.5);
171 }
else if (study_num < 37) {
175 species->setSlidingFrictionCoefficient(
Mu[study_num-33]);
178 }
else if (study_num < 38) {
180 species->setSlidingDissipation(0);
181 }
else if (study_num < 39) {
186 }
else if (study_num < 40)
189 logger(
INFO,
"Hertzian implementation has been changed");
193 }
else if (study_num < 43) {
198 species->setSlidingFrictionCoefficient(
mu[study_num-40]);
199 species->setCollisionTimeAndNormalAndTangentialRestitutionCoefficient
201 }
else if (study_num < 47) {
207 species->setSlidingFrictionCoefficient(
mu[study_num-44]);
208 species->setCollisionTimeAndNormalAndTangentialRestitutionCoefficient
213 species->setRollingFrictionCoefficient(0.05);
214 }
else if (study_num < 48) {
217 species->setSlidingFrictionCoefficient(MuHalf[study_num-47]);
221 }
else if (study_num < 52) {
224 species->setCollisionTimeAndNormalAndTangentialRestitutionCoefficient
226 species->setSlidingFrictionCoefficient(0.0);
227 }
else if (study_num < 53) {
229 }
else if (study_num < 54) {
231 species->setSlidingFrictionCoefficient(0.3);
232 species->setCollisionTimeAndNormalAndTangentialRestitutionCoefficient
234 }
else if (study_num < 55) {
236 species->setSlidingFrictionCoefficient(0.3);
237 species->setCollisionTimeAndNormalAndTangentialRestitutionCoefficient
246 if (study_num < 37 || (study_num>=53&&study_num<=55))
252 std::stringstream
name;
253 name <<
"S" << study_num;
353 write(std::cout,
false);
399 if (!strcmp(argv[
i],
"-muBottom"))
404 else if (!strcmp(argv[
i],
"-oldValues"))
int i
Definition: BiCGSTAB_step_by_step.cpp:9
@ MULTILAYER
Definition: Chute.h:32
Array< double, 1, 3 > e(1./3., 0.5, 2.)
@ 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_
MatrixXf H
Definition: HessenbergDecomposition_matrixH.cpp:4
Species< LinearViscoelasticNormalSpecies, FrictionSpecies > LinearViscoelasticFrictionSpecies
Definition: LinearViscoelasticFrictionSpecies.h:12
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
float * p
Definition: Tutorial_Map_using.cpp:9
Definition: BaseBoundary.h:28
virtual unsigned int getNumberOfObjects() const
Gets the number of real Object in this BaseHandler. (i.e. no mpi or periodic particles)
Definition: BaseHandler.h:656
virtual void clear()
Empties the whole BaseHandler by removing all Objects and setting all other variables to 0.
Definition: BaseHandler.h:536
void setStorageCapacity(const unsigned int N)
Sets the storage capacity of this BaseHandler.
Definition: BaseHandler.h:677
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
unsigned int getStorageCapacity() const
Gets the storage capacity of this BaseHandler.
Definition: BaseHandler.h:670
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
Definition: BaseHandler.h:621
T * getLastObject()
Gets a pointer to the last Object in this BaseHandler.
Definition: BaseHandler.h:642
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
Definition: BaseInteractable.cc:328
virtual void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
Definition: BaseInteractable.h:218
const std::vector< BaseInteraction * > & getInteractions() const
Returns a list of interactions which belong to this interactable.
Definition: BaseInteractable.h:256
Definition: BaseParticle.h:33
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:72
Mdouble getRadius() const
Returns the particle's radius.
Definition: BaseParticle.h:331
virtual void setRadius(Mdouble radius)
Sets the particle's radius_ (and adjusts the mass_ accordingly, based on the particle's species)
Definition: BaseParticle.cc:548
BaseParticle * getPeriodicFromParticle() const
Returns the 'original' particle this one's a periodic copy of.
Definition: BaseParticle.h:324
virtual void setSpecies(const ParticleSpecies *species)
Definition: BaseParticle.cc:798
void setSpecies(const ParticleSpecies *species)
Defines the species of the current wall.
Definition: BaseWall.cc:148
Creates chutes with different bottoms. Inherits from Mercury3D (-> MercuryBase -> DPMBase).
Definition: Chute.h:44
void setChuteWidth(Mdouble chuteWidth)
Sets the chute width (Y-direction)
Definition: Chute.cc:1018
void setInflowParticleRadius(Mdouble inflowParticleRadius)
Sets the radius of the inflow particles to a single one (i.e. ensures a monodisperse inflow).
Definition: Chute.cc:827
void setRoughBottomType(RoughBottomType roughBottomType)
Sets the type of rough bottom of the chute.
Definition: Chute.cc:693
virtual void setChuteLength(Mdouble chuteLength)
Sets the chute length (X-direction)
Definition: Chute.cc:1038
Mdouble getFixedParticleRadius() const
Returns the particle radius of the fixed particles which constitute the (rough) chute bottom.
Definition: Chute.cc:650
Mdouble getMaxInflowParticleRadius() const
Returns the maximum radius of inflow particles.
Definition: Chute.cc:926
Mdouble getInflowHeight() const
Returns the maximum inflow height (Z-direction)
Definition: Chute.cc:953
virtual void createBottom()
Creates the chute bottom, which can be either flat or one of three flavours of rough.
Definition: Chute.cc:302
bool readNextArgument(int &i, int argc, char *argv[]) override
This method can be used for reading object properties from a string.
Definition: Chute.cc:534
void setChuteAngleAndMagnitudeOfGravity(Mdouble chuteAngle, Mdouble gravity)
Sets gravity vector according to chute angle (in degrees)
Definition: Chute.cc:768
Mdouble getChuteLength() const
Returns the chute length (X-direction)
Definition: Chute.cc:1048
void setInflowVelocity(Mdouble inflowVelocity)
Sets the average inflow velocity.
Definition: Chute.cc:962
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:185
Mdouble getMinInflowParticleRadius() const
returns the minimum radius of inflow particles
Definition: Chute.cc:917
Mdouble getChuteWidth() const
Returns the chute width (Y-direction)
Definition: Chute.cc:1028
Mdouble getInflowVelocity() const
Returns the average inflow velocity.
Definition: Chute.cc:979
void setInflowHeight(Mdouble inflowHeight)
Sets maximum inflow height (Z-direction)
Definition: Chute.cc:936
void setFixedParticleRadius(Mdouble fixedParticleRadius)
Sets the particle radius of the fixed particles which constitute the (rough) chute bottom.
Definition: Chute.cc:632
Mdouble getChuteAngleDegrees() const
Returns the chute angle (in degrees)
Definition: Chute.cc:795
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin.
Definition: DPMBase.h:603
Mdouble getXMax() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax.
Definition: DPMBase.h:610
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:386
File eneFile
An instance of class File to handle in- and output into a .ene file.
Definition: DPMBase.h:1494
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1433
File fStatFile
An instance of class File to handle in- and output into a .fstat file.
Definition: DPMBase.h:1489
Mdouble getYMin() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin.
Definition: DPMBase.h:616
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:400
Mdouble getTimeStep() const
Returns the simulation time step.
Definition: DPMBase.cc:1241
Mdouble getTime() const
Returns the current simulation time.
Definition: DPMBase.cc:799
File dataFile
An instance of class File to handle in- and output into a .data file.
Definition: DPMBase.h:1484
WallHandler wallHandler
An object of the class WallHandler. Contains pointers to all the walls created.
Definition: DPMBase.h:1453
File restartFile
An instance of class File to handle in- and output into a .restart file.
Definition: DPMBase.h:1499
BoundaryHandler boundaryHandler
An object of the class BoundaryHandler which concerns insertion and deletion of particles into or fro...
Definition: DPMBase.h:1458
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:2979
InteractionHandler interactionHandler
An object of the class InteractionHandler.
Definition: DPMBase.h:1473
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1443
void setZMax(Mdouble newZMax)
Sets the value of ZMax, the upper bound of the problem domain in the z-direction.
Definition: DPMBase.cc:1208
RNG random
This is a random generator, often used for setting up the initial conditions etc.....
Definition: DPMBase.h:1438
void checkAndDuplicatePeriodicParticles()
For simulations using periodic boundaries, checks and adds particles when necessary into the particle...
Definition: DPMBase.cc:5108
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax.
Definition: DPMBase.h:622
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1225
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:864
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:879
Mdouble getZMax() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax.
Definition: DPMBase.h:634
Mdouble getZMin() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin.
Definition: DPMBase.h:628
void setName(const std::string &name)
Sets the file name, e.g. "Name.data".
Definition: File.cc:176
void setFileType(FileType fileType)
Sets the type of file needed to write into or read from. File::fileType_.
Definition: File.cc:193
A infinite wall fills the half-space {point: (position_-point)*normal_<=0}.
Definition: InfiniteWall.h:27
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:97
void removeObjectKeepingPeriodics(unsigned int id)
Removes interactions of periodic particles when the periodic particles get deleted (see DPMBase::remo...
Definition: InteractionHandler.cc:296
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:165
Mdouble getStiffness() const
Allows the spring constant to be accessed.
Definition: LinearViscoelasticNormalSpecies.cc:83
void setDissipation(Mdouble dissipation)
Allows the normal dissipation to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:96
Mdouble getDissipation() const
Allows the normal dissipation to be accessed.
Definition: LinearViscoelasticNormalSpecies.cc:109
void setStiffness(Mdouble new_k)
Allows the spring constant to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:72
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:73
bool checkParticleForInteraction(const BaseParticle &P) final
Checks if given BaseParticle has an interaction with a BaseWall or other BaseParticle.
Definition: MercuryBase.cc:573
void hGridActionsBeforeTimeStep() override
Performs all necessary actions before a time-step, like updating the particles and resetting all the ...
Definition: MercuryBase.cc:302
Contains contact force properties for contacts between particles with two different species.
Definition: MixedSpecies.h:22
void removeObject(unsigned int index) override
Removes a BaseParticle from the ParticleHandler.
Definition: ParticleHandler.cc:388
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:1323
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:88
Defines a pair of periodic walls. Inherits from BaseBoundary.
Definition: PeriodicBoundary.h:20
void set(Vec3D normal, Mdouble distanceLeft, Mdouble distanceRight)
Defines a PeriodicBoundary by its normal and positions.
Definition: PeriodicBoundary.cc:63
Mdouble getRandomNumber()
This is a random generating routine can be used for initial positions.
Definition: RNG.cc:123
Definition: flowRuleDiego_HeightAngle.cpp:14
virtual void createBaseSpecies()
Definition: flowRuleDiego_HeightAngle.cpp:68
LinearViscoelasticMixedSpecies * baseSpecies
Definition: flowRuleDiego_HeightAngle.cpp:245
void setSlidingFrictionCoefficientBottom(Mdouble new_)
Definition: SilbertPeriodic.h:77
void add_flow_particles()
Definition: flowRuleDiego_HeightAngle.cpp:144
void create_inflow_particle()
Definition: flowRuleDiego_HeightAngle.cpp:189
LinearViscoelasticSpecies * species
Definition: flowRuleDiego_HeightAngle.cpp:244
void increaseNCreated()
Definition: flowRuleDiego_HeightAngle.cpp:235
virtual void actionsBeforeTimeStep() override
A virtual function which allows to define operations to be executed before the new time step.
Definition: SilbertPeriodic.h:261
void set_study()
Definition: SilbertPeriodic.h:94
void set_H(Mdouble new_)
Definition: flowRuleDiego_HeightAngle.cpp:210
SphericalParticle inflowParticle_
Definition: flowRuleDiego_HeightAngle.cpp:242
SilbertPeriodic()
Definition: SilbertPeriodic.h:17
bool readNextArgument(int &i, int argc, char *argv[]) override
Interprets the i^th command-line argument.
Definition: SilbertPeriodic.h:397
Mdouble get_H()
Definition: SilbertPeriodic.h:383
int nCreated_
Definition: flowRuleDiego_HeightAngle.cpp:240
Mdouble getSlidingFrictionCoefficientBottom()
Definition: SilbertPeriodic.h:72
bool randomiseSpecies
Definition: flowRuleDiego_HeightAngle.cpp:241
void set_study(int study_num)
Definition: SilbertPeriodic.h:105
void printTime() const override
Displays the current simulation time and the maximum simulation duration.
Definition: SilbertPeriodic.h:386
int getNCreated() const
Definition: flowRuleDiego_HeightAngle.cpp:230
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: SilbertPeriodic.h:264
std::enable_if<!std::is_pointer< typename U::MixedSpeciesType >::value, typename U::MixedSpeciesType * >::type getMixedObject(const U *S, const U *T)
Definition: SpeciesHandler.h:52
A spherical particle is the most simple particle used in MercuryDPM.
Definition: SphericalParticle.h:16
Definition: Kernel/Math/Vector.h:30
Mdouble Y
Definition: Kernel/Math/Vector.h:45
Mdouble Z
Definition: Kernel/Math/Vector.h:45
Mdouble X
the vector components
Definition: Kernel/Math/Vector.h:45
@ N
Definition: constructor.cpp:22
Scalar beta
Definition: level2_cplx_impl.h:36
double eps
Definition: crbond_bessel.cc:24
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 floor(const bfloat16 &a)
Definition: BFloat16.h:643
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 round(const bfloat16 &a)
Definition: BFloat16.h:646
double Mu
Definition: axisym_linear_elasticity/cylinder/cylinder.cc:53
std::complex< double > mu
Definition: time_harmonic_fourier_decomposed_linear_elasticity/cylinder/cylinder.cc:52
const Mdouble pi
Definition: ExtendedMath.h:23
string name
Definition: plotDoE.py:33