PeriodicClumpSelfTest.cpp File Reference

Classes

class  clumpTest
 

Functions

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

Variables

Mdouble f_min = -4
 
Mdouble f_max = 4
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
94 {
96  auto species = problem.speciesHandler.copyAndAddObject(LinearViscoelasticFrictionSpecies());
97  species->setDensity(1.0); // sets the species type-0 density
98  //species->setConstantRestitution(0);
99  std::cout<<species->getConstantRestitution()<<std::endl;
100  species->setDissipation(0.0);
101  species->setStiffness(1e6);
102  const Mdouble collisionTime = species->getCollisionTime(problem.getClumpMass());
103  problem.setClumpDamping(0);
104  problem.setTimeStep(collisionTime / 50.0);
105 
106  // Quick demonstration
107  problem.setSaveCount(100);
108  problem.setTimeMax(1);
109 
110 
111 
112  problem.removeOldFiles();
113  problem.solve();
114 
115  ClumpParticle* p = dynamic_cast<ClumpParticle*>(problem.particleHandler.getLastObject());
116  Vec3D angVel = p->getAngularVelocity();
117  Vec3D known_angVel = Vec3D(-1.30004, 19.9932, 0.944699);
118 
119  Vec3D pos = p->getPosition();
120  Vec3D known_pos = Vec3D(-0.201397, -2.37542, -0.284277);
121 
122 
123  helpers::check(angVel,known_angVel,1e-4, "Angular velocity check");
124  helpers::check(pos,known_pos,1e-4, "Pebble position");
125 
126  return 0;
127 }
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Species< LinearViscoelasticNormalSpecies, FrictionSpecies > LinearViscoelasticFrictionSpecies
Definition: LinearViscoelasticFrictionSpecies.h:12
float * p
Definition: Tutorial_Map_using.cpp:9
Definition: ClumpParticle.h:20
Definition: Kernel/Math/Vector.h:30
Definition: PeriodicClumpSelfTest.cpp:19
void check(double real, double ideal, double error, std::string errorMessage)
Definition: TestHelpers.cc:16
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References helpers::check(), e(), p, and problem.

Variable Documentation

◆ f_max

Mdouble f_max = 4

Referenced by clumpTest::clumpTest().

◆ f_min

Mdouble f_min = -4

Referenced by clumpTest::clumpTest().