47 std::vector<Vec3D> Points(3);
81 std::cout<<
"Shifting bottom wall downward"<<std::endl;
93 int main(
int argc,
char *argv[])
95 std::cout<<
"Hourglass Simulation" <<std::endl;
108 species->setDensity(2000);
115 Mdouble ContractionWidth = 2.5e-2;
116 Mdouble ContractionHeight = 5e-2;
129 species->setDensity(2000.0);
139 species->setStiffness(1e5);
140 species->setDissipation(0.63);
142 species->setSlidingFrictionCoefficient(0.5);
143 species->setSlidingStiffness(1.2e4);
144 species->setSlidingDissipation(0.16);
146 species->setRollingFrictionCoefficient(0.2);
147 species->setRollingStiffness(1.2e4);
148 species->setRollingDissipation(6.3e-2);
150 species->setTorsionFrictionCoefficient(0.1);
151 species->setTorsionStiffness(1.2e4);
152 species->setSlidingDissipation(6.3e-2);
157 std::cout <<
"MinParticleMass =" << MinParticleMass << std::endl;
159 Mdouble tc = species->getCollisionTime(MinParticleMass);
160 std::cout <<
"tc =" << tc << std::endl;
162 Mdouble r = species->getRestitutionCoefficient(MinParticleMass);
163 std::cout <<
"r =" << r << std::endl;
174 HG.
solve(argc, argv);
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.
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
void setTimeMax(Mdouble newTMax)
Allows the upper time limit to be changed.
void setOrientation(const Vec3D &orientation)
Sets the orientation of this BaseInteractable.
void setYMin(Mdouble newYMin)
If the length of the problem domain in y-direction is YMax - YMin, this method sets YMin...
Mdouble MinParticleRadius
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 getYMin() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin...
void setZMax(Mdouble newZMax)
If the length of the problem domain in z-direction is XMax - XMin, this method sets ZMax...
Species< LinearViscoelasticNormalSpecies, FrictionSpecies > LinearViscoelasticFrictionSpecies
void setGravity(Vec3D newGravity)
Allows to modify the gravity vector.
void addObject(Vec3D normal, Vec3D point)
Adds a wall to the set of infinite walls, given an outward normal vector s.t. normal*x=normal*point.
void setRadius(const Mdouble radius)
Sets the particle's radius_ (and adjusts the mass_ accordingly, based on the particle's species) ...
void createOpenPrism(std::vector< Vec3D > points, Vec3D prismAxis)
Creates an open prism which is a polygon between the points, except the first and last point...
void actionsAfterTimeStep()
A virtual function which allows to define operations to be executed after time step.
Mdouble getXMax() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax...
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.
This adds on the hierarchical grid code for 3D problems.
void setXMin(Mdouble newXMin)
If the length of the problem domain in x-direction is XMax - XMin, this method sets XMin...
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created...
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)
Mdouble getRadius() const
Returns the particle's radius_.
void setZMin(Mdouble newZMin)
If the length of the problem domain in z-direction is ZMax - ZMin, this method sets ZMin...
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...
A AxisymmetricIntersectionOfWalls is a axisymmetric wall, defined by rotating a twodimensional Inters...
void setXBallsAdditionalArguments(std::string newXBArgs)
Set the additional arguments for xballs.
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax...
WallHandler wallHandler
An object of the class WallHandler. Contains pointers to all the walls created.
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.
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...
Mdouble MaxParticleRadius
void setTimeStep(Mdouble newDt)
Allows the time step dt to be changed.
This is a class defining walls.
T * getLastObject()
Gets a pointer to the last Object in this BaseHandler.
Implementation of a 3D vector (by Vitaliy).
Mdouble getTimeStep() const
Allows the time step dt to be accessed.
int main(int argc, char *argv[])
Mdouble getTime() const
Access function for the time.
Mdouble getRandomNumber(Mdouble min, Mdouble max)
This is a random generating routine can be used for initial positions.
Mdouble ContractionHeight