Simple sintering process

Problem description:

This tutorial present a simple case of sintering between two particles. The code can be found in SinterPair.cpp.

Sintering of two particles.

Headers

Before the main function

class SinterPair : public Mercury3D
{
public:
{
setName("SinterPair"+r);
helpers::writeToFile("SinterPair"+r+".gnu",
"set xlabel 'time [s]'\n"
"set ylabel 'x/a [nm]'\n"
"r="+r+"\n"
"plot 'SinterPair"+r+".fstat' u ($1):(sqrt($7/r)) w lp\n"
);
setGravity({0,0,0});
setSaveCount(20000);
const Mdouble stiffness = 1e-2 * radius;
const Mdouble restitutionCoefficient = 0.1;
const Mdouble density = 1005;
s.setHandler(&speciesHandler);
s.setDensity(density);
const Mdouble mass = s.getMassFromRadius(radius);
s.setStiffnessAndRestitutionCoefficient(stiffness,restitutionCoefficient,mass);
s.setPlasticParameters(stiffness, 10*stiffness, stiffness, 0.16);
const Mdouble collisionTime = s.getCollisionTime(mass);
logger(INFO,"Collision time %",collisionTime);
s.setSinterType(SINTERTYPE::CONSTANT_RATE);
s.setSinterRate(4e-10/radius);
s.setSinterAdhesion(0.013*stiffness);
//adhesiveForce = sinterAdhesion*radius;
setTimeStep(0.02*collisionTime);
p.setSpecies(species);
p.setRadius(radius);
p.setPosition({-(1-1e-15)*radius,0,0});
p.setPosition(-p.getPosition());
}
void printTime() const override
{
logger(INFO, "t=%3, tmax=%3, r=%3", getTime(), getTimeMax(), particleHandler.getLastObject()->getRadius());
//<< ", Ekin=" << std::setprecision(3) << std::left << std::setw(6) << getKineticEnergy()/getElasticEnergy()
}
};
Array< double, 1, 3 > e(1./3., 0.5, 2.)
double Mdouble
Definition: GeneralDefine.h:13
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
@ INFO
float * p
Definition: Tutorial_Map_using.cpp:9
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:360
T * getLastObject()
Gets a pointer to the last Object in this BaseHandler.
Definition: BaseHandler.h:642
Mdouble getRadius() const
Returns the particle's radius.
Definition: BaseParticle.h:331
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
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:400
Mdouble getTime() const
Returns the current simulation time.
Definition: DPMBase.cc:799
void setMin(const Vec3D &min)
Sets the minimum coordinates of the problem domain.
Definition: DPMBase.cc:1109
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1443
void setParticlesWriteVTK(bool writeParticlesVTK)
Sets whether particles are written in a VTK file.
Definition: DPMBase.cc:933
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1225
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:864
void setMax(const Vec3D &max)
Sets the maximum coordinates of the problem domain.
Definition: DPMBase.cc:1073
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:879
void setGravity(Vec3D newGravity)
Sets a new value for the gravitational acceleration.
Definition: DPMBase.cc:1374
This adds on the hierarchical grid code for 3D problems.
Definition: Mercury3D.h:16
[St:headers]
Definition: SinterPair.cpp:14
void printTime() const override
Displays the current simulation time and the maximum simulation duration.
Definition: SinterPair.cpp:67
SinterPair(Mdouble radius)
Definition: SinterPair.cpp: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
RealScalar s
Definition: level1_cplx_impl.h:130
density
Definition: UniformPSDSelfTest.py:19
r
Definition: UniformPSDSelfTest.py:20
radius
Definition: UniformPSDSelfTest.py:15
std::string toString(Mdouble value, unsigned precision)
converts a floating point number into a string with a given precision
Definition: StringHelpers.cc:17
bool writeToFile(const std::string &filename, const std::string &filecontent)
Writes a string to a file.
Definition: FileIOHelpers.cc:29
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286

Main function

There are three different radii for this tutorial: 1.5e-6, 2.0e-6, 5.0e-7

int main(int argc UNUSED, char *argv[] UNUSED)
{
SinterPair sp0(2e-6);
sp0.solve();
SinterPair sp1(1.5e-6);
sp1.solve();
SinterPair sp2(5e-7);
sp2.solve();
helpers::writeToFile("SinterPair.gnu",
"set xlabel 'time [s]'\n"
"set ylabel 'x/a'\n"
"plot [0:200] 'SinterPair5e-07.fstat' u ($1):(sqrt($7/5e-07)) w lp lt rgb 'royalblue'\n"
"replot 'SinterPair1.5e-06.fstat' u ($1):(sqrt($7/1.5e-06)) w lp lt rgb 'light-red'\n"
"replot 'SinterPair2e-06.fstat' u ($1):(sqrt($7/2e-06)) w lp lt rgb 'sea-green'"
);
logger(INFO, "Execute 'gnuplot SinterPair.gnu' to view output");
}
#define UNUSED
Definition: GeneralDefine.h:18
int main(int argc, char *argv[])
Definition: T_protectiveWall.cpp:194
#define INFO(i)
Definition: mumps_solver.h:54

Reference:

Fuchs, R., Weinhart, T., Ye, M., Luding, S., Butt, H. J., & Kappl, M. (2017). Initial stage sintering of polymer particles–Experiments and modelling of size-, temperature-and time-dependent contacts. In EPJ Web of Conferences (Vol. 140, p. 13012). EDP Sciences.

(Return to Overview of advanced tutorials)