46 std::vector<Vec3D> Points(3);
94 std::cout<<
"Shifting bottom wall downward"<<
getTime()<<std::endl;
106 int main(
int argc,
char *argv[])
108 std::cout<<
"Hourglass Simulation" <<std::endl;
128 Mdouble ContractionWidth = 2.5e-2;
129 Mdouble ContractionHeight = 5e-2;
152 species->setStiffness(1e5);
153 species->setDissipation(0.63);
155 species->setSlidingFrictionCoefficient(0.5);
156 species->setSlidingStiffness(1.2e4);
157 species->setSlidingDissipation(0.16);
159 species->setRollingFrictionCoefficient(0.2);
160 species->setRollingStiffness(1.2e4);
161 species->setRollingDissipation(6.3e-2);
163 species->setTorsionFrictionCoefficient(0.1);
164 species->setTorsionStiffness(1.2e4);
165 species->setSlidingDissipation(6.3e-2);
170 std::cout <<
"MinParticleMass =" << MinParticleMass << std::endl;
172 Mdouble tc = species->getCollisionTime(MinParticleMass);
173 std::cout <<
"tc =" << tc << std::endl;
175 Mdouble r = species->getRestitutionCoefficient(MinParticleMass);
176 std::cout <<
"r =" << r << std::endl;
186 std::cout <<
"N =" << HG.
N << std::endl;
188 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 actionsAfterTimeStep()
A virtual function which allows to define operations to be executed after time step.
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
A IntersectionOfWalls is convex polygon defined as an intersection of InfiniteWall's.
void setTimeMax(Mdouble newTMax)
Allows the upper time limit to be changed.
Mdouble MinParticleRadius
void setYMin(Mdouble newYMin)
If the length of the problem domain in y-direction is YMax - YMin, this method sets YMin...
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...
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 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...
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 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...
void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
void setDensity(Mdouble density)
Allows the density to be changed.
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...
void setXBallsAdditionalArguments(std::string newXBArgs)
Set the additional arguments for xballs.
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...
void setTimeStep(Mdouble newDt)
Allows the time step dt to be changed.
This is a class defining walls.
Mdouble MaxParticleRadius
Mdouble getDensity() const
Allows the density to be accessed.
Contains material and contact force properties.
T * getLastObject()
Gets a pointer to the last Object in this BaseHandler.
Implementation of a 3D vector (by Vitaliy).
Mdouble ContractionHeight
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.