MercuryDPM  0.11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FreeCoolingAdhesiveDemo.cpp File Reference

Go to the source code of this file.

Classes

class  my_problem_HGRID
 todo{This code is not working as is wanted} More...
 

Functions

int main (int argc UNUSED, char *argv[] UNUSED)
 

Function Documentation

int main ( int argc  UNUSED,
char *argv[]  UNUSED 
)

Start off my solving the default problem

Definition at line 80 of file FreeCoolingAdhesiveDemo.cpp.

References BaseHandler< T >::copyAndAddObject(), Files::dataFile, Files::fStatFile, BaseParticle::getInteractionRadius(), BaseHandler< T >::getObject(), BaseParticle::getRadius(), my_problem_HGRID::N, NO_FILE, ONE_FILE, DPMBase::particleHandler, File::setFileType(), DPMBase::setGravity(), MercuryBase::setHGridMaxLevels(), MercuryBase::setHGridUpdateEachTimeStep(), Files::setName(), Files::setSaveCount(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), DPMBase::setXMax(), DPMBase::setYMax(), DPMBase::solve(), and DPMBase::speciesHandler.

81 {
82  std::cout<<"In this file 32^2 particles with the same velocity are placed "
83  "in a bi-axial box. This makes them collide with the walls and eachother. "
84  "Afterwards the same run is performed with hgrid on. It tests the working "
85  "(and speedup) of the hgrid."<<std::endl;
86 
88  my_problem_HGRID problem;
90  species->setDensity(2000);
91  species->setDissipation(0.01);
92  species->setStiffness(1e4);
93  species->setSlidingFrictionCoefficient(0.1);
94  species->setDensity(2000);
95  species->setAdhesionStiffness(0.05* species->getStiffness());
96  species->setAdhesionForceMax(1.1e-4*0.05* species->getStiffness());
97 
98  problem.N=25;
99  problem.setName("free_cooling_adhesive");
100  problem.setXMax(0.0018);
101  problem.setYMax(0.0018);
102  problem.setGravity(Vec3D(0.0,0.0,0.0));
103  problem.setTimeStep(3e-6);
104  problem.setSaveCount(50);
105  problem.setTimeMax(0.05);
106  problem.setHGridMaxLevels(1);
107  //problem.setHGridCellOverSizeRatio(1.2);
108  problem.setHGridUpdateEachTimeStep(true);
109 
110 
113  problem.solve();
114  std::cout << problem.particleHandler.getObject(0)->getRadius() << std::endl;
115  std::cout << problem.particleHandler.getObject(0)->getInteractionRadius() << std::endl;
116  return 0;
117 }
void setXMax(Mdouble newXMax)
If the length of the problem domain in x-direction is XMax - XMin, this method sets XMax...
Definition: DPMBase.cc:309
void solve()
The work horse of the code.
Definition: DPMBase.cc:1895
void setTimeMax(Mdouble newTMax)
Allows the upper time limit to be changed.
Definition: DPMBase.cc:179
void setHGridUpdateEachTimeStep(bool updateEachTimeStep)
Sets whether or not the HGrid must be updated every time step.
Definition: MercuryBase.cc:172
void setGravity(Vec3D newGravity)
Allows to modify the gravity vector.
Definition: DPMBase.cc:431
void setYMax(Mdouble newYMax)
If the length of the problem domain in y-direction is YMax - YMin, this method sets YMax...
Definition: DPMBase.cc:324
file will not be created/read
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: Files.cc:149
U * copyAndAddObject(const U &O)
Creates a copy of a Object and adds it to the BaseHandler.
Definition: BaseHandler.h:268
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created...
Definition: DPMBase.h:878
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.
Definition: BaseHandler.h:415
File fStatFile
An instance of class File to handle in- and output into a .fstat file.
Definition: Files.h:209
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: Files.cc:138
File dataFile
An instance of class File to handle in- and output into a .data file.
Definition: Files.h:204
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.
Definition: MercuryBase.cc:500
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. elastic, linear visco-elastic... et cetera...
Definition: DPMBase.h:868
todo{This code is not working as is wanted}
void setFileType(FileType fileType)
Sets the type of file needed to write into or read from. File::fileType_.
Definition: File.cc:209
void setTimeStep(Mdouble newDt)
Allows the time step dt to be changed.
Definition: DPMBase.cc:353
Species< LinearViscoelasticNormalSpecies, SlidingFrictionSpecies, ReversibleAdhesiveSpecies > LinearViscoelasticSlidingFrictionReversibleAdhesiveSpecies
Implementation of a 3D vector (by Vitaliy).
Definition: Vector.h:45
Mdouble getInteractionRadius() const
Returns the particle's interaction radius, which might be different from radius_ (e.g., when dealing with wet particles)