FreeCoolingAdhesiveDemo.cpp File Reference

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

◆ main()

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

Start off my solving the default problem

81 {
82  logger(INFO, "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.");
86 
88  my_problem_HGRID problem;
89  auto species = problem.speciesHandler.copyAndAddObject(
91  species->setDensity(2000);
92  species->setDissipation(0.01);
93  species->setStiffness(1e4);
94  species->setSlidingFrictionCoefficient(0.1);
95  species->setDensity(2000);
96  species->setAdhesionStiffness(0.05 * species->getStiffness());
97  species->setAdhesionForceMax(1.1e-4 * 0.05 * species->getStiffness());
98 
99  problem.N = 25;
100  problem.setName("FreeCoolingAdhesiveDemo");
101  problem.setXMax(0.0018);
102  problem.setYMax(0.0018);
103  problem.setGravity(Vec3D(0.0, 0.0, 0.0));
104  problem.setTimeStep(3e-6);
105  problem.setSaveCount(50);
106  problem.setTimeMax(0.05);
107  problem.setHGridMaxLevels(1);
108  //problem.setHGridCellOverSizeRatio(1.2);
109  problem.setHGridUpdateEachTimeStep(true);
110 
111 
114  problem.solve();
115  logger(INFO, "%", problem.particleHandler.getObject(0)->getRadius());
117  return 0;
118 }
@ NO_FILE
file will not be created/read
@ ONE_FILE
all data will be written into/ read from a single file called name_
Species< LinearViscoelasticNormalSpecies, SlidingFrictionSpecies, ReversibleAdhesiveSpecies > LinearViscoelasticSlidingFrictionReversibleAdhesiveSpecies
Definition: LinearViscoelasticSlidingFrictionReversibleAdhesiveSpecies.h:35
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
std::enable_if<!std::is_pointer< U >::value, U * >::type copyAndAddObject(const U &object)
Creates a copy of a Object and adds it to the BaseHandler.
Definition: BaseHandler.h:379
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
Definition: BaseHandler.h:613
Mdouble getRadius() const
Returns the particle's radius.
Definition: BaseParticle.h:348
Mdouble getMaxInteractionRadius() const
Returns the particle's interaction radius, which might be different from radius_ (e....
Definition: BaseParticle.h:362
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1427
File fStatFile
An instance of class File to handle in- and output into a .fstat file.
Definition: DPMBase.h:1483
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
File dataFile
An instance of class File to handle in- and output into a .data file.
Definition: DPMBase.h:1478
void setYMax(Mdouble newYMax)
Sets the value of YMax, the upper bound of the problem domain in the y-direction.
Definition: DPMBase.cc:1191
void setXMax(Mdouble newXMax)
Sets the value of XMax, the upper bound of the problem domain in the x-direction.
Definition: DPMBase.cc:1165
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1437
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1234
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:873
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
void setGravity(Vec3D newGravity)
Sets a new value for the gravitational acceleration.
Definition: DPMBase.cc:1383
void setFileType(FileType fileType)
Sets the type of file needed to write into or read from. File::fileType_.
Definition: File.cc:215
void setHGridUpdateEachTimeStep(bool updateEachTimeStep)
Sets whether or not the HGrid must be updated every time step.
Definition: MercuryBase.cc:176
void setHGridMaxLevels(unsigned int HGridMaxLevels)
Sets the maximum number of levels of the HGrid in this MercuryBase.
Definition: MercuryBase.cc:476
Definition: Vector.h:51
todo{This code is not working as is wanted}
Definition: FreeCoolingAdhesiveDemo.cpp:38
int N
Definition: FreeCoolingAdhesiveDemo.cpp:77

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