CGLiquidsUnitTest.cpp File Reference

Classes

class  TwoParticles
 

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )
64 {
65  logger(INFO," Simulates a particle-particle collision.\n"
66  " Checks cg \n"
67  " - at one instant in time\n"
68  " - standard fields (density and stress)\n"
69  " - for O, Z, and XYZ coordinates\n"
70  " - for both Gauss and Lucy kernel functions\n");
71 
72  TwoParticles dpm;
73  dpm.setTimeMax(0);
76  z->setWidth(0.16);
77  z->setN(100);
79  xz->setWidth(0.16);
80  xz->setN(100);
81  dpm.solve();
82 
83  //A few checks
84  logger(INFO,"Checking a few cg parameters");
85 
86  //Checks density for unresolved cg, rho = M/V = 2/16 = 0.125
87  helpers::check(o->getPoint(0).getLiquidFilmVolume(),1,1e-15, "Average liquidFilmVolume");
88  helpers::check(o->getPoint(0).getLiquidBridgeVolume(),1,1e-15, "Average liquidBridgeVolume");
89  helpers::check(z->evaluateAverage().getLiquidFilmVolume(),1,3e-2, "Average liquidFilmVolume for z-resolved stats");
90  helpers::check(z->evaluateAverage().getLiquidBridgeVolume(),1,1e-2, "Average liquidBridgeVolume for z-resolved stats");
91  helpers::check(xz->evaluateAverage().getLiquidFilmVolume(),1,3e-2, "Average liquidFilmVolume for xz-resolved stats");
92  helpers::check(xz->evaluateAverage().getLiquidBridgeVolume(),1,1e-2, "Average liquidBridgeVolume for xz-resolved stats");
93 
94  return 0;
95 }
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
Evaluates time-resolved continuum fields and writes the data into a stat file.
Definition: CG.h:76
CGHandler cgHandler
Object of the class cgHandler.
Definition: DPMBase.h:1473
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
Definition: CGLiquidsUnitTest.cpp:35
void check(double real, double ideal, double error, std::string errorMessage)
Definition: TestHelpers.cc:37

References DPMBase::cgHandler, helpers::check(), BaseHandler< T >::copyAndAddObject(), INFO, logger, DPMBase::setTimeMax(), and DPMBase::solve().