ParhamiMcKeepingParticlePairSelfTest.cpp File Reference

Functions

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

Function Documentation

◆ main()

int main ( int argc  UNUSED,
char *argv[]  UNUSED 
)
12  {
13  //create new simulation; as no specialised functions are needed,
14  //Mercury3D is used directly instead of creating a derived class as usual.
15  Mercury3D ps;
16 
17  //add Species
19  s.setDensity(3950e18);
20  s.setEffectiveElasticModulus(0); //?? This seems to correspond to dt~tc/50
21  s.setDissipation(0); //?
22  // mass 2e-21 => fg = 2e-20
23  // k=1e-04 => del=fg/k = tiny
24  Mdouble alpha = 4.5;
25  Mdouble beta = 4;
26  Mdouble atomicVolume = 8.47e-30; /*Omega*/
27  Mdouble surfaceEnergy = 1.1; /*gamma_s*/
28  Mdouble thicknessDiffusion = 1.3e-8; /*deltaB*D0B*/
29  Mdouble activationEnergy = 475e3 /*QB*/;
30  Mdouble temperature = 1473; /*T*/
31  Mdouble pseudoSlidingFrictionCoefficient = 0.01; /*\etaPart*/
32  s.set(alpha, beta, atomicVolume, surfaceEnergy, thicknessDiffusion, activationEnergy, temperature, pseudoSlidingFrictionCoefficient);
33  ps.speciesHandler.copyAndAddObject(s);
34 
35  //add particle
37  p.setSpecies(ps.speciesHandler.getObject(0));
38  p.setRadius(50e-9);
39  p.setPosition(p.getRadius() * Vec3D(0, 0, 1.0-1e-6*1e-3));
40  ps.particleHandler.copyAndAddObject(p);
41 
42  //add second particle
43  p.setPosition(p.getRadius() * Vec3D(0, 0, -1.0));
44  ps.particleHandler.copyAndAddObject(p);
45 
46  //set time-stepping and output parameters
47  ps.setFileType(FileType::ONE_FILE);
48  ps.setXBallsAdditionalArguments(" -v0 -solidf ");
49  ps.setGravity(Vec3D(0, 0, 0));
50  ps.setTimeStep(1e-4);
51  ps.setSaveCount(1000);
52  ps.setTimeMax(10);
53  ps.setMin(50e-9 * Vec3D(-1, -1, -2));
54  ps.setMax(50e-9 * Vec3D(1, 1, 2));
55  ps.setName("ParhamiMcKeepingParticlePairSelfTest");
56 
57  //run
58  ps.solve();
59 
60  logger(INFO, "Execute 'gnuplot ParhamiMcKeepingParticlePairSelfTest.gnu' to view output");
61  helpers::writeToFile("ParhamiMcKeepingParticlePairSelfTest.gnu",
62  "set xlabel 't [s]'\n"
63  "set ylabel 'delta/d'\n"
64  "p 'ParhamiMcKeepingParticlePairSelfTest.fstat' u 1:($7/1e-7) every 5::3 w lp\n"
65  );
66 
67 
68 }
Array< double, 1, 3 > e(1./3., 0.5, 2.)
@ ONE_FILE
all data will be written into/ read from a single file called name_
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
float * p
Definition: Tutorial_Map_using.cpp:9
This adds on the hierarchical grid code for 3D problems.
Definition: Mercury3D.h:16
Contains material and contact force properties.
Definition: Species.h:14
A spherical particle is the most simple particle used in MercuryDPM.
Definition: SphericalParticle.h:16
Definition: Kernel/Math/Vector.h:30
RealScalar s
Definition: level1_cplx_impl.h:130
int RealScalar int RealScalar int RealScalar RealScalar * ps
Definition: level1_cplx_impl.h:124
RealScalar alpha
Definition: level1_cplx_impl.h:151
Scalar beta
Definition: level2_cplx_impl.h:36
#define INFO(i)
Definition: mumps_solver.h:54
bool writeToFile(const std::string &filename, const std::string &filecontent)
Writes a string to a file.
Definition: FileIOHelpers.cc:29

References alpha, beta, e(), INFO, logger, ONE_FILE, p, ps, s, and helpers::writeToFile().