SinterBed1SelfTest.cpp File Reference
#include "Mercury3D.h"
#include <Species/SinterFrictionSpecies.h>
#include <Walls/InfiniteWall.h>
#include <Walls/AxisymmetricIntersectionOfWalls.h>
#include <iomanip>
#include <cassert>

Classes

class  Sintering
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  UNUSED,
char *argv[]  UNUSED 
)
89 {
90  Sintering s;
91  s.setSaveCount(100);
92  s.fStatFile.setSaveCount(300);
93 
94  Mdouble sinterRate = readFromFile("in","sinterRate",0.25*0.25*mathsFunc::square(0.3));
95  s.species->setSinterRate(sinterRate);
96 
97  Mdouble sinterTime = readFromFile("in","sinterTime",24);
98  s.setTimeMax(sinterTime);
99  s.restartFile.setSaveCount(s.getTimeMax()/s.getTimeStep()/5.0+1.0);
100  s.fStatFile.setFileType(FileType::ONE_FILE);
101  s.restartFile.setFileType(FileType::MULTIPLE_FILES); // so we can restart from different times
102 
103  writeToFile("SinterBed1.gnu",
104  "set xlabel 't'\n"
105  "set ylabel 'x/d'\n"
106  "p '"+s.getName()+".ene' u 1:2 w lp, 0.075*x**0.5\n"
107  );
108  writeToFile("SinterBed1b.gnu",
109  "set xlabel 't'\n"
110  "set ylabel 'x/d'\n"
111  "p '" + s.getName() + ".fstat' u 1:(sqrt($7/" +
112  toString(2.0 * s.particleHandler.getMeanRadius()) + ")), 0.3*x**0.5\n"
113  );
114 
115  s.species->setSinterType(SINTERTYPE::CONSTANT_RATE);
116  s.solve();
117 
118  logger(INFO, "Run with ./SinterBed1 >out; the execute 'gnuplot SinterBed1.gnu' to view output");
119 
120  //if I add friction (10,1), it creates ruptures
121  return 0;
122 }
@ MULTIPLE_FILES
each time-step will be written into/read from separate files numbered consecutively: name_....
@ 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.
Definition: SinterBed1SelfTest.cpp:19
RealScalar s
Definition: level1_cplx_impl.h:130
#define INFO(i)
Definition: mumps_solver.h:54
T readFromFile(const std::string &fileName, const std::string &varName, const T defaultValue)
Definition: FileIOHelpers.h:107
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
T square(const T val)
squares a number
Definition: ExtendedMath.h:86

References CONSTANT_RATE, INFO, logger, MULTIPLE_FILES, ONE_FILE, helpers::readFromFile(), s, mathsFunc::square(), helpers::toString(), and helpers::writeToFile().