HeaterBoundaryTest.cpp File Reference
#include <iostream>
#include <Species/LinearViscoelasticSpecies.h>
#include "Mercury3D.h"
#include "Boundaries/HeaterBoundary.h"
#include "Walls/InfiniteWall.h"
#include "MercuryTime.h"

Classes

class  HeaterBoundaryTest
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  UNUSED,
char *argv[]  UNUSED 
)
91 {
92  Time time;
93  time.tic();
94 
95  HeaterBoundaryTest problem;
97  species.setDensity(2000);
98  species.setDissipation(0.005);
99  species.setStiffness(1e3);
100  problem.speciesHandler.copyAndAddObject(species);
101 
102  problem.setXMax(0.1);
103  problem.setYMax(0.1);
104  problem.setZMax(0.1);
105  problem.N = 1000;
106  problem.setName("HeaterBoundaryTest");
107  problem.setGravity(Vec3D(0.0, 0.0, 0.0));
108  problem.setTimeStep(4e-5);
109 // logger(INFO, "dt / tc = % / % = 1/%",
110 // problem.getTimeStep(), species.getCollisionTime( 2000 * 4./3. * constants::pi * pow(0.002,3)),
111 // 1/(problem.getTimeStep() / species.getCollisionTime( 2000 * 4./3. * constants::pi * pow(0.002,3))));
112  problem.setSaveCount(25);
113  problem.setTimeMax(0.3);
114  problem.setSystemDimensions(3);
115 
116  problem.setHGridMaxLevels(1);
117  problem.setHGridCellOverSizeRatio(1.2);
118  problem.setHGridUpdateEachTimeStep(false);
119 
121 
122  problem.solve();
123 
124  logger(INFO, "Total time to run this simulation: % s", time.toc());
125 }
@ MULTIPLE_FILES
each time-step will be written into/read from separate files numbered consecutively: name_....
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 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
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
void setZMax(Mdouble newZMax)
Sets the value of ZMax, the upper bound of the problem domain in the z-direction.
Definition: DPMBase.cc:1217
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 setSystemDimensions(unsigned int newDim)
Sets the system dimensionality.
Definition: DPMBase.cc:1417
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
Definition: HeaterBoundaryTest.cpp:39
unsigned int N
Number of particles in the system.
Definition: HeaterBoundaryTest.cpp:87
void setDissipation(Mdouble dissipation)
Allows the normal dissipation to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:117
void setStiffness(Mdouble new_k)
Allows the spring constant to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:93
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
void setHGridCellOverSizeRatio(Mdouble cellOverSizeRatio)
Sets the ratio of the smallest cell over the smallest particle.
Definition: MercuryBase.cc:463
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:108
Allows for timing the algorithms; accurate up to 0.01 sec.
Definition: MercuryTime.h:46
Mdouble toc()
This is like a stop button of a stopwatch. Assigns the variable finish to the current value of ticks ...
Definition: MercuryTime.h:70
void tic()
This is like a start button of a stopwatch. Assigns the variable start with the current number of clo...
Definition: MercuryTime.h:59
Definition: Vector.h:51

References BaseHandler< T >::copyAndAddObject(), DPMBase::dataFile, INFO, logger, MULTIPLE_FILES, HeaterBoundaryTest::N, ParticleSpecies::setDensity(), LinearViscoelasticNormalSpecies::setDissipation(), File::setFileType(), DPMBase::setGravity(), MercuryBase::setHGridCellOverSizeRatio(), MercuryBase::setHGridMaxLevels(), MercuryBase::setHGridUpdateEachTimeStep(), DPMBase::setName(), DPMBase::setSaveCount(), LinearViscoelasticNormalSpecies::setStiffness(), DPMBase::setSystemDimensions(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), DPMBase::setXMax(), DPMBase::setYMax(), DPMBase::setZMax(), DPMBase::solve(), DPMBase::speciesHandler, Time::tic(), and Time::toc().