MonodisperseSmoothInclinedChute.cpp File Reference

Classes

class  SmoothChute
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
127 {
128  logger(INFO, "Chute flow over a smooth bottom");
129 
130  //set the problem parameters: name, simulation time and time step
131  SmoothChute problem;
132  problem.setName("MonodisperseSmoothInclinedChute");
133  problem.setTimeMax(100);
134  problem.setTimeStep(1e-4);
135 
136  //set the direction of the gravity as 30 degrees, and magnitude 9.81 m/s^2
137  problem.setChuteAngleAndMagnitudeOfGravity(30.0, 9.81);
138 
139  problem.numberOfParticlesToBeInserted = 286;
140  problem.insertTime = 0.006;
141  problem.insertTimeInterval = problem.insertTime;
142  //
143  auto particleSpecies = problem.speciesHandler.copyAndAddObject(LinearViscoelasticFrictionSpecies());
145  auto wallParticleSpecies = problem.speciesHandler.getMixedObject(wallSpecies, particleSpecies);
146 
147  // Mdouble effectiveMass = 0.5*particleSpecies->getMassFromRadius(0.5*0.003);
148  // std::cout << "Mass" << 2.0*effectiveMass << std::endl;
149  // helpers::KAndDisp kAndDispPP = helpers::computeKAndDispFromCollisionTimeAndRestitutionCoefficientAndEffectiveMass(0.005,0.97,effectiveMass);
150  //helpers::KAndDisp kAndDispPW = helpers::computeKAndDispFromCollisionTimeAndRestitutionCoefficientAndEffectiveMass(0.005,0.95,effectiveMass);
151 
152  //std::cout << "Stifness" << kAndDispPP.k << std::endl;
153 
154  //set parameters for the particle species: density, stiffness, dissipation and sliding friction coefficient
155  particleSpecies->setDensity(2550.0);
156  particleSpecies->setStiffness(1000.0);
157  particleSpecies->setSlidingStiffness(2.0 / 7.0 * particleSpecies->getStiffness());
158  particleSpecies->setDissipation(0.0);
159  particleSpecies->setSlidingFrictionCoefficient(0.12);
160 
161  //set the parameters for the wall species
162  wallParticleSpecies->setStiffness(979.38);
163  wallParticleSpecies->setDissipation(particleSpecies->getDissipation());
164  wallParticleSpecies->setSlidingStiffness(2. / 7.0 * wallParticleSpecies->getStiffness());
165  wallParticleSpecies->setSlidingFrictionCoefficient(0.22);
166 
167  //set the output parameters: how many time steps should be skipped before a next time step is written to the files,
168  //and which files should be written.
169  problem.setSaveCount(100);
174  //
175  //problem.autoNumber();
176  problem.setXBallsAdditionalArguments("-solidf -v0");
177 
178  //run the simulation with all parameters given before
179  problem.solve(argc, argv);
180 
181  return 0;
182 }
@ 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, FrictionSpecies > LinearViscoelasticFrictionSpecies
Definition: LinearViscoelasticFrictionSpecies.h:34
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
void setChuteAngleAndMagnitudeOfGravity(Mdouble chuteAngle, Mdouble gravity)
Sets gravity vector according to chute angle (in degrees)
Definition: Chute.cc:789
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
File eneFile
An instance of class File to handle in- and output into a .ene file.
Definition: DPMBase.h:1488
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
File restartFile
An instance of class File to handle in- and output into a .restart file.
Definition: DPMBase.h:1493
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
Definition: MonodisperseSmoothInclinedChute.cpp:37
double insertTimeInterval
Definition: MonodisperseSmoothInclinedChute.cpp:122
double insertTime
the amount of time that new particles should be inserted.
Definition: MonodisperseSmoothInclinedChute.cpp:121
unsigned int numberOfParticlesToBeInserted
Definition: MonodisperseSmoothInclinedChute.cpp:123
std::enable_if<!std::is_pointer< typename U::MixedSpeciesType >::value, typename U::MixedSpeciesType * >::type getMixedObject(const U *S, const U *T)
Definition: SpeciesHandler.h:74

References BaseHandler< T >::copyAndAddObject(), DPMBase::dataFile, DPMBase::eneFile, DPMBase::fStatFile, SpeciesHandler::getMixedObject(), INFO, SmoothChute::insertTime, SmoothChute::insertTimeInterval, logger, NO_FILE, SmoothChute::numberOfParticlesToBeInserted, ONE_FILE, DPMBase::restartFile, Chute::setChuteAngleAndMagnitudeOfGravity(), File::setFileType(), DPMBase::setName(), DPMBase::setSaveCount(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), DPMBase::setXBallsAdditionalArguments(), DPMBase::solve(), and DPMBase::speciesHandler.