FreeFallInteractionSelfTest.cpp File Reference
#include "Mercury2D.h"
#include "Walls/InfiniteWall.h"
#include <iostream>
#include <Species/LinearViscoelasticSpecies.h>

Classes

class  FreeFallInteractionSelfTest
 This case does a single elastic particle falling on an infinite plane. The k is chosen so that the maximum overlap with the wall is around 2% of the partcles dimater; whereas, the time is taken to ensure 50 steps with a collision. More...
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Start off my solving the default problem

32 {
33  logger(INFO, "Single particle bouncing vertically on the bottom plate");
35  FreeFallInteractionSelfTest freeFallInteractionSelfTestProblem;
36  auto species = new LinearViscoelasticSpecies;
37  freeFallInteractionSelfTestProblem.speciesHandler.addObject(species);
38  species->setDensity(2000.0);
39  freeFallInteractionSelfTestProblem.setParticleDimensions(3);
40  species->setStiffness(8000000.0);
41 
42  freeFallInteractionSelfTestProblem.setName("FreeFallInteractionSelfTest");
43  freeFallInteractionSelfTestProblem.setSaveCount(500);
44  freeFallInteractionSelfTestProblem.fStatFile.setFileType(FileType::NO_FILE);
45  freeFallInteractionSelfTestProblem.getInteractionFile().setFileType(FileType::ONE_FILE);
46  freeFallInteractionSelfTestProblem.setTimeStep(1e-6);
47  freeFallInteractionSelfTestProblem.setYMax(0.1);
48  freeFallInteractionSelfTestProblem.setXMax(0.01);
49  freeFallInteractionSelfTestProblem.solve(argc, argv);
50 }
Array< double, 1, 3 > e(1./3., 0.5, 2.)
@ 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 > LinearViscoelasticSpecies
Definition: LinearViscoelasticSpecies.h:11
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:386
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1433
File fStatFile
An instance of class File to handle in- and output into a .fstat file.
Definition: DPMBase.h:1489
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:400
void setParticleDimensions(unsigned int particleDimensions)
Sets the particle dimensionality.
Definition: DPMBase.cc:1439
void setYMax(Mdouble newYMax)
Sets the value of YMax, the upper bound of the problem domain in the y-direction.
Definition: DPMBase.cc:1182
File & getInteractionFile()
Return a reference to the file InteractionsFile.
Definition: DPMBase.cc:323
void setXMax(Mdouble newXMax)
Sets the value of XMax, the upper bound of the problem domain in the x-direction.
Definition: DPMBase.cc:1156
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1225
void solve()
The work horse of the code.
Definition: DPMBase.cc:4334
void setFileType(FileType fileType)
Sets the type of file needed to write into or read from. File::fileType_.
Definition: File.cc:193
This case does a single elastic particle falling on an infinite plane. The k is chosen so that the ma...
Definition: FreeFallInteractionSelfTest.cpp:12
void addObject(ParticleSpecies *S) override
Adds a new ParticleSpecies to the SpeciesHandler.
Definition: SpeciesHandler.cc:1008
#define INFO(i)
Definition: mumps_solver.h:54

References SpeciesHandler::addObject(), e(), DPMBase::fStatFile, DPMBase::getInteractionFile(), INFO, logger, NO_FILE, ONE_FILE, File::setFileType(), DPMBase::setName(), DPMBase::setParticleDimensions(), DPMBase::setSaveCount(), DPMBase::setTimeStep(), DPMBase::setXMax(), DPMBase::setYMax(), DPMBase::solve(), and DPMBase::speciesHandler.