100 thickness_(other.thickness_), isBottomPeriodic_(other.isBottomPeriodic_)
142 if (species!=
nullptr)
147 species->setCollisionTimeAndRestitutionCoefficient(10.0*collisionTime,0.2,effectiveMass);
157 logger(
WARN,
"[ChuteBottom::makeRoughBottom()] species type does not allow setting the parameters.");
161 if (species2 !=
nullptr)
176 height = std::max(height, (*it)->getPosition().Z);
203 (*it)->fixParticle();
278 int failed = 0, max_failed = 500;
285 while (failed <= max_failed)
319 if ((minCell == maxCell) | (minCell == 0.))
361 logger(
ERROR,
"[ChuteBottom::setThickness()] thickness % negative.", new_);
void setInflowHeight(Mdouble inflowHeight)
Sets maximum inflow height (Z-direction)
void set(Vec3D normal, Mdouble distanceLeft, Mdouble distanceRight)
Defines a periodic wall.
void solve()
The work horse of the code.
bool checkParticleForInteraction(const BaseParticle &P) override
Checks if given BaseParticle has an interaction with a BaseWall or other BaseParticle.
The DPMBase header includes quite a few header files, defining all the handlers, which are essential...
Mdouble X
the vector components
ChuteBottom()
This is the default constructor. All it does is set sensible defaults.
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 setOrientation(const Vec3D &orientation)
Sets the orientation of this BaseInteractable.
Mdouble getZMax() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax...
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin...
Mdouble getMassFromRadius(const Mdouble radius)
void setStorageCapacity(const unsigned int N)
Sets the storage capacity of this BaseHandler.
File restartFile
An instance of class File to handle in- and output into a .restart file.
Used by Chute::createBottom to create an unordered particle layer.
void setHandler(ParticleHandler *handler)
Sets the pointer to the particle's ParticleHandler.
Mdouble getYMin() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin...
const std::vector< T * >::const_iterator end() const
Gets the end of the const_iterator over all BaseBoundary in this BaseHandler.
void setChuteAngle(Mdouble chuteAngle)
Sets gravity vector according to chute angle (in degrees)
void setSpecies(const ParticleSpecies *species)
void setRadius(const Mdouble radius)
Sets the particle's radius_ (and adjusts the mass_ accordingly, based on the particle's species) ...
void setRoughBottomType(RoughBottomType roughBottomType)
Sets the type of rough bottom of the chute.
const std::vector< T * >::const_iterator begin() const
Gets the begin of the const_iterator over all Object in this BaseHandler.
Defines a pair of periodic walls. Inherits from BaseBoundary.
Mdouble getXMax() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax...
Mdouble getInflowParticleRadius() const
Returns the average radius of inflow particles.
Mdouble getIsBottomPeriodic()
Returns TRUE if the bottom is periodic in Y.
void constructor()
This is the actual constructor METHOD; it is called by all constructors above (except the default cop...
Mdouble thickness_
Thickness of the multilayer chute rough bottom. See also documentation of ChuteBottom::makeRoughBotto...
Creates chutes with different bottoms. Inherits from Mercury3D (-> MercuryBase -> DPMBase)...
This is the base class for both Mercury2D and Mercury3D. Note the actually abstract grid is defined i...
Mdouble getMaxInflowParticleRadius() const
Returns the maximum radius of inflow particles.
void makeRoughBottom(Chute &chute)
Makes a multilayered rough bottom with thickness thickness_.
void setupInitialConditions()
Sets up initial conditions before running a chute simulation.
file will not be created/read
LinearViscoelasticNormalSpecies contains the parameters used to describe a linear elastic-dissipative...
void setIsBottomPeriodic(bool isBottomPeriodic)
Sets whether the bottom should be periodic in Y.
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.
BoundaryHandler boundaryHandler
An object of the class BoundaryHandler which concerns insertion and deletion of particles into or fro...
Mdouble getFixedParticleRadius() const
Returns the particle radius of the fixed particles which constitute the (rough) chute bottom...
This adds on the hierarchical grid code for 3D problems.
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_
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
File fStatFile
An instance of class File to handle in- and output into a .fstat file.
T cubic(T val)
calculates the cube of a number
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
File dataFile
An instance of class File to handle in- and output into a .data file.
void setSlidingFrictionCoefficient(Mdouble new_mu)
Allows the (dynamic) Coulomb friction coefficient to be changed; also sets mu_s by default...
Mdouble getRadius() const
Returns the particle's radius_.
void setHGridMaxLevels(unsigned int HGridMaxLevels)
Sets the maximum number of levels of the HGrid in this MercuryBase.
unsigned int getNumberOfObjects() const
Gets the number of Object in this BaseHandler.
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. elastic, linear visco-elastic... et cetera...
void hGridActionsBeforeTimeLoop() override
This sets up the broad phase information, has to be done at this stage because it requires the partic...
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax...
SlidingFrictionSpecies contains the parameters used to describe sliding friction. ...
void setFileType(FileType fileType)
Sets the type of file needed to write into or read from. File::fileType_.
WallHandler wallHandler
An object of the class WallHandler. Contains pointers to all the walls created.
void setFixedParticleRadius(Mdouble fixedParticleRadius)
Sets the particle radius of the fixed particles which constitute the (rough) chute bottom...
RNG random
This is a random generator, often used for setting up the initial conditions etc...
void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
virtual void createBottom()
Creates the chute bottom, which can be either flat or one of three flavours of rough.
Mdouble getMinInflowParticleRadius() const
returns the minimum radius of inflow particles
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...
Mdouble getZMin() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin...
void setTimeStep(Mdouble newDt)
Allows the time step dt to be changed.
This is a class defining walls.
Mdouble getThickness()
Returns the thickness of the multilayer rough bottom.
Mdouble getDensity() const
Allows the density to be accessed.
void setThickness(Mdouble thickness)
Sets the thickness of the multilayer rough bottom.
Implementation of a 3D vector (by Vitaliy).
MERCURY_DEPRECATED Mdouble computeCollisionTimeFromKAndDispAndEffectiveMass(Mdouble k, Mdouble disp, Mdouble mass)
Calculates the collision time for a given stiffness, dissipation, and effective mass.
Mdouble getTimeStep() const
Allows the time step dt to be accessed.
void setAngularVelocity(const Vec3D &angularVelocity)
set the angular velocity of the BaseInteractble.
bool isBottomPeriodic_
TRUE if the bottom is periodic in Y.
virtual void removeObject(unsigned const int id)
Removes a BaseParticle from the ParticleHandler.
Mdouble getRandomNumber(Mdouble min, Mdouble max)
This is a random generating routine can be used for initial positions.
void clear()
Empties the whole BaseHandler by removing all Objects and setting all other variables to 0...
void actionsBeforeTimeStep()
Performs all necessary actions before the start of a time step (none in this case) ...