195 Mdouble normalRelativeVelocity, tangentialRelativeVelocity, analyticTangentialRelativeVelocity;
198 problem.
setName(
"ForceSelfTest5");
201 logger(
INFO,
"tangentialRelativeVelocity: analytic=%, simulation=%\n",
203 logger(
INFO,
"normalRelativeVelocity: analytic=%, simulation=%",
210 problem.
species->setSlidingFrictionCoefficient(mu);
211 problem.
species->setSlidingDissipation(1e20);
213 problem.
setName(
"ForceSelfTest6");
217 mu * 3.5 * (1 + problem.
en) *
219 logger(
INFO,
"tangentialRelativeVelocity: analytic=%, simulation=%\n",
220 analyticTangentialRelativeVelocity, tangentialRelativeVelocity,
Flusher::NO_FLUSH);
221 logger(
INFO,
"normalRelativeVelocity: analytic=%, simulation=%",
224 logger(
INFO,
"7: with Coulomb friction, spring activated");
225 problem.
species->setSlidingStiffness(1.0);
227 problem.
setName(
"ForceSelfTest7");
229 logger(
INFO,
"tangentialRelativeVelocity: analytic=%, simulation=%\n",
230 analyticTangentialRelativeVelocity, tangentialRelativeVelocity,
Flusher::NO_FLUSH);
231 logger(
INFO,
"normalRelativeVelocity: analytic=%, simulation=%",
234 logger(
INFO,
"8: with tangential viscous force");
236 problem.
species->setSlidingFrictionCoefficient(1e20);
237 problem.
species->setSlidingDissipation(-
log(-et) / (2.0 * problem.
tc) / 3.5 * 2.0 * problem.
m12);
238 problem.
species->setSlidingStiffness(0.0);
239 problem.
setName(
"ForceSelfTest8");
243 exp(-2.0 * 3.5 * problem.
species->getSlidingDissipation() /
245 logger(
INFO,
"tangentialRelativeVelocity: analytic=%, simulation=%\n",
246 analyticTangentialRelativeVelocity, tangentialRelativeVelocity,
Flusher::NO_FLUSH);
247 logger(
INFO,
"normalRelativeVelocity: analytic=%, simulation=%",
250 logger(
INFO,
"9: with tangential elastic force");
252 problem.
species->setSlidingFrictionCoefficient(1e20);
253 problem.
species->setSlidingDissipation(0.0);
254 problem.
species->setSlidingStiffness(
256 problem.
setName(
"ForceSelfTest9");
260 cos(sqrt(problem.
species->getSlidingStiffness() / problem.
m12 * 3.5) *
262 logger(
INFO,
"tangentialRelativeVelocity: analytic=%, simulation=%\n",
263 analyticTangentialRelativeVelocity, tangentialRelativeVelocity,
Flusher::NO_FLUSH);
264 logger(
INFO,
"normalRelativeVelocity: analytic=%, simulation=%",
double Mdouble
Definition: GeneralDefine.h:34
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
RNG random
This is a random generator, often used for setting up the initial conditions etc.....
Definition: DPMBase.h:1432
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
Definition: ForceSelfTest.cpp:33
Mdouble initialNormalRelativeVelocity
Definition: ForceSelfTest.cpp:114
Mdouble m12
Definition: ForceSelfTest.cpp:117
LinearViscoelasticSlidingFrictionSpecies * species
Definition: ForceSelfTest.cpp:118
Mdouble tc
Definition: ForceSelfTest.cpp:116
Mdouble initialTangentialRelativeVelocity
Definition: ForceSelfTest.cpp:114
void getRelativeVelocityComponents(Mdouble &normalRelativeVelocity, Mdouble &tangentialRelativeVelocity)
Definition: ForceSelfTest.cpp:102
Mdouble en
Definition: ForceSelfTest.cpp:116
Mdouble getCollisionTime(Mdouble mass)
Calculates collision time for two copies of a particle of species 0.
Definition: ForceSelfTest.cpp:109
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: ForceSelfTest.cpp:44
void setRandomSeed(unsigned long int new_seed)
This is the seed for the random number generator (note the call to seed_LFG is only required really i...
Definition: RNG.cc:53
Mdouble getRandomNumber()
This is a random generating routine can be used for initial positions.
Definition: RNG.cc:143
const Mdouble pi
Definition: ExtendedMath.h:45
Mdouble log(Mdouble Power)
Definition: ExtendedMath.cc:104
Mdouble cos(Mdouble x)
Definition: ExtendedMath.cc:64
T square(const T val)
squares a number
Definition: ExtendedMath.h:106
Mdouble exp(Mdouble Exponent)
Definition: ExtendedMath.cc:84