MercuryDPM
Alpha
|
Used for modeling chute inflow. Inherits from InsertionBoundary. More...
#include <ChuteInsertionBoundary.h>
Public Member Functions | |
ChuteInsertionBoundary () | |
Default constructor. More... | |
ChuteInsertionBoundary (const ChuteInsertionBoundary &other) | |
Copy constructor. More... | |
virtual ChuteInsertionBoundary * | copy () const |
Copy method; creates a copy on the heap. More... | |
void | set (BaseParticle *particleToCopy, unsigned int maxFailed, Vec3D posMin, Vec3D posMax, double radMin, double radMax, double fixedParticleRadius, double inflowVelocity, double inflowVelocityVariance) |
Sets all boundary properties at once. More... | |
virtual BaseParticle * | generateParticle (RNG &random) |
Generates a random particle. More... | |
void | read (std::istream &is) |
reads boundary properties from istream More... | |
MERCURY_DEPRECATED void | oldRead (std::istream &is) |
deprecated version of CubeInsertionBoundary::read(). More... | |
void | write (std::ostream &os) const |
writes boundary properties to ostream More... | |
virtual std::string | getName () const |
Returns the name of the object. More... | |
Public Member Functions inherited from InsertionBoundary | |
InsertionBoundary () | |
Default constructor: set everything to 0/nullptr. More... | |
InsertionBoundary (const InsertionBoundary &other) | |
Copy constructor (with deep copy) More... | |
virtual | ~InsertionBoundary () |
Destructor: delete the particle that has to be copied at every insertion. More... | |
void | set (BaseParticle *particleToCopy, unsigned int maxFailed) |
Sets the particle that will be inserted and the maximum number of times for which insertion may fail. More... | |
virtual void | checkBoundaryBeforeTimeStep (DPMBase *md) |
Fills the boundary with particles. More... | |
unsigned int | getNumberOfParticlesInserted () const |
Gets the number of particles inserted by the boundary. More... | |
void | setMaxFailed (unsigned int maxFailed) |
Sets the number of times that the wall may fail to insert a particle. More... | |
unsigned int | getMaxFailed () const |
Gets the number of times that the boundary may fail to insert a particle. More... | |
void | setParticleToCopy (BaseParticle *particleToCopy) |
Sets the particle that will be inserted through the insertion boundary. More... | |
BaseParticle * | getParticleToCopy () const |
Gets the particle that will be inserted through the insertion boundary. More... | |
void | read (std::istream &is) |
Reads the boundary's id_ and maxFailed_. More... | |
void | write (std::ostream &os) const |
Writes the boundary's id_ and maxFailed_. More... | |
Public Member Functions inherited from BaseBoundary | |
BaseBoundary () | |
default constructor. More... | |
BaseBoundary (const BaseBoundary &b) | |
copy constructor More... | |
virtual | ~BaseBoundary () |
destructor More... | |
virtual void | createPeriodicParticles (BaseParticle *P UNUSED, ParticleHandler &pH UNUSED) |
Creates periodic copies of given particle in case of periodic boundaries. More... | |
virtual bool | checkBoundaryAfterParticleMoved (BaseParticle *P UNUSED, ParticleHandler &pH UNUSED) |
Checks if given particle passed the boundary. More... | |
virtual void | checkBoundaryBeforeTimeStep (DPMBase *md UNUSED) |
Fills a (3D) boundary with particles. More... | |
void | setHandler (BoundaryHandler *handler) |
Sets the boundary's BoundaryHandler. More... | |
BoundaryHandler * | getHandler () const |
Returns the boundary's BoundaryHandler. More... | |
Public Member Functions inherited from BaseObject | |
BaseObject () | |
Default constructor. More... | |
BaseObject (const BaseObject &p) | |
Copy constructor, copies all the objects BaseObject contains. More... | |
virtual | ~BaseObject () |
virtual destructor More... | |
virtual void | moveInHandler (const unsigned int index) |
Except that it is virtual, it does the same thing as setIndex() does. More... | |
void | setIndex (const unsigned int index) |
Allows one to assign an index to an object in the handler/container. More... | |
void | setId (const unsigned int id) |
Assigns a unique identifier to each object in the handler (container) which remains constant even after the object is deleted from the container/handler. More... | |
unsigned int | getIndex () const |
Returns the index of the object in the handler. More... | |
unsigned int | getId () const |
Returns the unique identifier of any particular object. More... | |
Private Attributes | |
Vec3D | posMin_ |
The two extremal corners of the cuboidal insertion boundary. More... | |
Vec3D | posMax_ |
double | radMin_ |
Minimum and maximum radii of the generated particles. More... | |
double | radMax_ |
double | fixedParticleRadius_ |
radius of the fixed bottom particles, mean particle velocity in X-direction, and allowed maximum randomly added/substracted velocities in all three directions while generating particles (expressed as % of inflowVelocity_). NB: see also documentation of ChuteInsertionBoundary::generateParticle(). More... | |
double | inflowVelocity_ |
double | inflowVelocityVariance_ |
Additional Inherited Members | |
Protected Attributes inherited from InsertionBoundary | |
BaseParticle * | particleToCopy_ |
Particle that will be inserted through the insertion boundary. More... | |
unsigned int | maxFailed_ |
Number of times that the wall may fail to insert a particle. More... | |
unsigned int | numberOfParticlesInserted_ |
Number of particles that are already inserted. More... | |
Used for modeling chute inflow. Inherits from InsertionBoundary.
Definition at line 39 of file ChuteInsertionBoundary.h.
ChuteInsertionBoundary::ChuteInsertionBoundary | ( | ) |
Default constructor.
Default constructor. Initiates all properties with 0 value.
Definition at line 35 of file ChuteInsertionBoundary.cc.
References fixedParticleRadius_, inflowVelocity_, inflowVelocityVariance_, posMax_, posMin_, radMax_, and radMin_.
Referenced by copy().
ChuteInsertionBoundary::ChuteInsertionBoundary | ( | const ChuteInsertionBoundary & | other | ) |
Copy constructor.
Copy constructor. Calls InsertionBoundary parent copy constructor.
Definition at line 49 of file ChuteInsertionBoundary.cc.
References fixedParticleRadius_, inflowVelocity_, inflowVelocityVariance_, posMax_, posMin_, radMax_, and radMin_.
|
virtual |
Copy method; creates a copy on the heap.
Copy method. Creates a copy on the heap.
Implements BaseBoundary.
Definition at line 65 of file ChuteInsertionBoundary.cc.
References ChuteInsertionBoundary().
|
virtual |
Generates a random particle.
Generates a particle within the boundary with random radius, position and velocity (within the allowed intervals). Notable properties:
[in] | random | a random number generator |
Implements InsertionBoundary.
Definition at line 124 of file ChuteInsertionBoundary.cc.
References BaseParticle::copy(), fixedParticleRadius_, InsertionBoundary::getParticleToCopy(), BaseParticle::getRadius(), RNG::getRandomNumber(), inflowVelocity_, inflowVelocityVariance_, mathsFunc::isEqual(), posMax_, posMin_, radMax_, radMin_, BaseInteractable::setPosition(), BaseParticle::setRadius(), BaseInteractable::setVelocity(), Vec3D::X, Vec3D::Y, and Vec3D::Z.
|
virtual |
Returns the name of the object.
Returns the name of the object class
Implements BaseObject.
Definition at line 214 of file ChuteInsertionBoundary.cc.
void ChuteInsertionBoundary::oldRead | ( | std::istream & | is | ) |
deprecated version of CubeInsertionBoundary::read().
Deprecated version of read().
Definition at line 178 of file ChuteInsertionBoundary.cc.
References fixedParticleRadius_, inflowVelocity_, inflowVelocityVariance_, posMax_, posMin_, radMax_, radMin_, and InsertionBoundary::setMaxFailed().
|
virtual |
reads boundary properties from istream
Reads the boundary properties from an istream
[in,out] | is | the istream |
Implements BaseBoundary.
Definition at line 161 of file ChuteInsertionBoundary.cc.
References fixedParticleRadius_, inflowVelocity_, inflowVelocityVariance_, posMax_, posMin_, radMax_, radMin_, and InsertionBoundary::read().
void ChuteInsertionBoundary::set | ( | BaseParticle * | particleToCopy, |
unsigned int | maxFailed, | ||
Vec3D | posMin, | ||
Vec3D | posMax, | ||
double | radMin, | ||
double | radMax, | ||
double | fixedParticleRadius, | ||
double | inflowVelocity, | ||
double | inflowVelocityVariance | ||
) |
Sets all boundary properties at once.
Sets all the properties of the chute insertion boundary.
[in] | particleToCopy | Pointer to the BaseParticle which is used as a basis for the particles to be inserted |
[in] | maxFailed | The maximum number of times the insertion of a particle may be tried and failed before the insertion of particles is considered done. NB: this property is used in the parent's InsertionBoundary::checkBoundaryBeforeTimeStep(). |
[in] | posMin | First defining corner of the chute insertion boundary |
[in] | posMax | Second defining corner of the chute insertion boundary |
[in] | radMin | Minimum radius of inserted particles |
[in] | radMax | Maximum radius of inserted particles |
[in] | fixedParticleRadius | radius of the fixed bottom (i.e., positioned at the minimal Z-position) particles |
[in] | inflowVelocity | the mean particle velocity, which is in the X-direction |
[in] | inflowVelocityVariance | value of minimum (minus ~) and maximum added velocities which are added to the given mean in each of the three dimensions. Expressed as a percentage of inflowVelocity_. See also the documentation of ChuteInsertionBoundary::generateParticle(). |
Definition at line 95 of file ChuteInsertionBoundary.cc.
References fixedParticleRadius_, inflowVelocity_, inflowVelocityVariance_, posMax_, posMin_, radMax_, radMin_, InsertionBoundary::setMaxFailed(), and InsertionBoundary::setParticleToCopy().
Referenced by Chute::setupInitialConditions().
|
virtual |
writes boundary properties to ostream
Writes boundary's properties to an ostream
[in] | os | the ostream |
Implements BaseBoundary.
Definition at line 197 of file ChuteInsertionBoundary.cc.
References fixedParticleRadius_, inflowVelocity_, inflowVelocityVariance_, posMax_, posMin_, radMax_, radMin_, and InsertionBoundary::write().
|
private |
radius of the fixed bottom particles, mean particle velocity in X-direction, and allowed maximum randomly added/substracted velocities in all three directions while generating particles (expressed as % of inflowVelocity_). NB: see also documentation of ChuteInsertionBoundary::generateParticle().
Definition at line 105 of file ChuteInsertionBoundary.h.
Referenced by ChuteInsertionBoundary(), generateParticle(), oldRead(), read(), set(), and write().
|
private |
Definition at line 105 of file ChuteInsertionBoundary.h.
Referenced by ChuteInsertionBoundary(), generateParticle(), oldRead(), read(), set(), and write().
|
private |
Definition at line 105 of file ChuteInsertionBoundary.h.
Referenced by ChuteInsertionBoundary(), generateParticle(), oldRead(), read(), set(), and write().
|
private |
Definition at line 92 of file ChuteInsertionBoundary.h.
Referenced by ChuteInsertionBoundary(), generateParticle(), oldRead(), read(), set(), and write().
|
private |
The two extremal corners of the cuboidal insertion boundary.
Definition at line 92 of file ChuteInsertionBoundary.h.
Referenced by ChuteInsertionBoundary(), generateParticle(), oldRead(), read(), set(), and write().
|
private |
Definition at line 97 of file ChuteInsertionBoundary.h.
Referenced by ChuteInsertionBoundary(), generateParticle(), oldRead(), read(), set(), and write().
|
private |
Minimum and maximum radii of the generated particles.
Definition at line 97 of file ChuteInsertionBoundary.h.
Referenced by ChuteInsertionBoundary(), generateParticle(), oldRead(), read(), set(), and write().