ParallelUnitTestMPI.cpp File Reference
#include "Mercury3D.h"
#include <iostream>
#include "Species/LinearViscoelasticFrictionSpecies.h"
#include <cstdlib>

Classes

class  MpiPeriodicBoundaryUnitTest
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
26 {
27  //Create the problem
29  problem.setName("ParallelUnitTestMPI");
30 
31  //Create a species
32  LinearViscoelasticFrictionSpecies* species = problem.speciesHandler.copyAndAddObject(LinearViscoelasticFrictionSpecies());
33  species->setDensity(1.0);
34 
35  //Set domain accordingly (domain boundaries are not walls!)
36  problem.setXMin(-10.0);
37  problem.setXMax(10.0);
38  problem.setYMin(-10.0);
39  problem.setYMax(10.0);
40  problem.setZMin(-10.0);
41  problem.setZMax(10.0);
42 
43  //specify particle properties
44  species->setDensity(6.0/constants::pi);
45 
46  //specify body forces
47  problem.setGravity(Vec3D(0.0, 0.0, 0.0));
48 
49  //Set the number of domains for parallel decomposition
50  problem.setNumberOfDomains({2,2,2});
51 
52  //specify contact properties
53  //normal forces
54  species->setStiffness(1e5);
55  species->setDissipation(0.63);
56  //tangential (sliding) forces
57  species->setSlidingFrictionCoefficient(0.5);
58  species->setSlidingStiffness(1.2e4);
59  species->setSlidingDissipation(0.16);
60  //tangential (rolling) torques
61  species->setRollingFrictionCoefficient(0.2);
62  species->setRollingStiffness(1.2e4);
63  species->setRollingDissipation(6.3e-2);
64  //normal (torsion/spin) torques
65  species->setTorsionFrictionCoefficient(0.1);
66  species->setTorsionStiffness(1.2e4);
67  species->setSlidingDissipation(6.3e-2);
68 
69  //set other simulation parameters
70  //Mdouble MinParticleMass = species->getDensity()*4.0 / 3.0 * constants::pi ;
71  //Mdouble tc = species->getCollisionTime(MinParticleMass);
72  problem.setTimeStep(0.1);
73  problem.setTimeMax(60.0);//run until 3.0 to see full simulation
74  problem.setSaveCount(1); //used to be 500
75 
76  //Set output to paraview
77  problem.setParticlesWriteVTK(true);
78 
79  problem.solve(argc, argv);
80 
81  return 0;
82 }
Species< LinearViscoelasticNormalSpecies, FrictionSpecies > LinearViscoelasticFrictionSpecies
Definition: LinearViscoelasticFrictionSpecies.h:12
void setRollingFrictionCoefficient(Mdouble new_mu)
Allows the (dynamic) Coulomb friction coefficient to be changed; also sets mu_s by default.
Definition: FrictionSpecies.cc:165
void setTorsionStiffness(Mdouble new_kt)
Allows the torsion stiffness to be changed.
Definition: FrictionSpecies.cc:201
void setRollingDissipation(Mdouble new_dispt)
Allows the tangential viscosity to be changed.
Definition: FrictionSpecies.cc:147
void setTorsionFrictionCoefficient(Mdouble new_mu)
Allows the (dynamic) Coulomb torsion friction coefficient to be changed; also sets mu_s by default.
Definition: FrictionSpecies.cc:238
void setRollingStiffness(Mdouble new_kt)
Allows the spring constant to be changed.
Definition: FrictionSpecies.cc:128
void setDissipation(Mdouble dissipation)
Allows the normal dissipation to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:96
void setStiffness(Mdouble new_k)
Allows the spring constant to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:72
Definition: PeriodicBoundary1MPI2Test.cpp:12
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:88
void setSlidingStiffness(Mdouble new_kt)
Allows the spring constant to be changed.
Definition: SlidingFrictionSpecies.cc:83
void setSlidingDissipation(Mdouble new_dispt)
Allows the tangential viscosity to be changed.
Definition: SlidingFrictionSpecies.cc:102
void setSlidingFrictionCoefficient(Mdouble new_mu)
Allows the (dynamic) Coulomb friction coefficient to be changed; also sets mu_s by default.
Definition: SlidingFrictionSpecies.cc:120
Definition: Kernel/Math/Vector.h:30
const Mdouble pi
Definition: ExtendedMath.h:23
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References constants::pi, problem, ParticleSpecies::setDensity(), LinearViscoelasticNormalSpecies::setDissipation(), FrictionSpecies::setRollingDissipation(), FrictionSpecies::setRollingFrictionCoefficient(), FrictionSpecies::setRollingStiffness(), SlidingFrictionSpecies::setSlidingDissipation(), SlidingFrictionSpecies::setSlidingFrictionCoefficient(), SlidingFrictionSpecies::setSlidingStiffness(), LinearViscoelasticNormalSpecies::setStiffness(), FrictionSpecies::setTorsionFrictionCoefficient(), and FrictionSpecies::setTorsionStiffness().