TwoBondedParticleElasticCollisionSelfTest.cpp File Reference

Classes

class  TwoBondedParticleElasticCollision
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  UNUSED,
char *argv[]  UNUSED 
)
82 {
83  //create an instance of the DPM class
84  TwoBondedParticleElasticCollision twoParticleElasticCollisionProblem;
85  twoParticleElasticCollisionProblem.setName("TwoBondedParticleElasticCollisionSelfTest");
86 
87  //set species properties
89  twoParticleElasticCollisionProblem.speciesHandler.addObject(species);
90  species->setDensity(2000);
91  Mdouble radius = 0.0005;
92  Mdouble mass = species->getMassFromRadius(radius);
93  Mdouble tc = 1e-3;
94  Mdouble restitution = 0.8;
95  species->setCollisionTimeAndNormalAndTangentialRestitutionCoefficient(tc,restitution,restitution,mass);
96  species->setSlidingFrictionCoefficient(0.05);
97  //set bond strength such that particles have 0.5r overlap under equilibrium conditions (no external forces)
98  species->setBondForceMax(species->getStiffness()*radius*0.5);
99 
100  //set global DPM properties
101  twoParticleElasticCollisionProblem.setTimeMax(0.3);
102  twoParticleElasticCollisionProblem.setSaveCount(20);
103  twoParticleElasticCollisionProblem.setTimeStep(0.02*tc);
104  twoParticleElasticCollisionProblem.fStatFile.setFileType(FileType::NO_FILE);
105  twoParticleElasticCollisionProblem.setXBallsAdditionalArguments("-cmode 7 -v0 -solid -3dturn 1");
106  twoParticleElasticCollisionProblem.solve();
107 }
@ NO_FILE
file will not be created/read
double Mdouble
Definition: GeneralDefine.h:34
Species< LinearViscoelasticNormalSpecies, SlidingFrictionSpecies, BondedSpecies > LinearViscoelasticSlidingFrictionBondedSpecies
Definition: LinearViscoelasticSlidingFrictionBondedSpecies.h:35
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
void setXBallsAdditionalArguments(std::string newXBArgs)
Set the additional arguments for xballs.
Definition: DPMBase.cc:1347
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 setFileType(FileType fileType)
Sets the type of file needed to write into or read from. File::fileType_.
Definition: File.cc:215
void addObject(ParticleSpecies *S) override
Adds a new ParticleSpecies to the SpeciesHandler.
Definition: SpeciesHandler.cc:890
Definition: TwoBondedParticleElasticCollisionSelfTest.cpp:35

References SpeciesHandler::addObject(), DPMBase::fStatFile, NO_FILE, File::setFileType(), DPMBase::setName(), DPMBase::setSaveCount(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), DPMBase::setXBallsAdditionalArguments(), DPMBase::solve(), and DPMBase::speciesHandler.