Tutorial11_AxisymmetricWalls.cpp File Reference

Classes

class  Tutorial11
 [T11:headers] More...
 

Functions

int main (int argc, char *argv[])
 [T11:class] More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

[T11:class]

[T11:main]

[T11: domain]

[T11: domain]

[T11: other specifications]

[T11: other specifications]

[T11: species configuration]

[T11: species configuration]

[T11: tests]

[T11: tests]

[T11: time]

[T11: time]

[T11: solve]

[T11: solve]

147 {
149  Mdouble width = 10e-2; // 10cm
150  Mdouble height = 60e-2; // 60cm
151 
152  //Point the object HG to class
153  Tutorial11 HG(width,height);
154 
155  //Specify particle radius:
156  //these parameters are needed in setupInitialConditions()
157  HG.minParticleRadius = 6e-3; // 6mm
158  HG.maxParticleRadius = 10e-3; //10mm
160 
162  //Specify the number of particles
163 
164  //specify how big the wedge of the contraction should be
165  const Mdouble contractionWidth = 2.5e-2; //2.5cm
166  const Mdouble contractionHeight = 5e-2; //5cm
167  HG.contractionWidth = contractionWidth;
168  HG.contractionHeight = contractionHeight;
170 
172  //make the species of the particle and wall
174  species.setDensity(2000);
175 
176  species.setStiffness(1e5);
177  species.setDissipation(0.63);
178  HG.speciesHandler.copyAndAddObject(species);
179 
181 
183  //test normal forces
184  const Mdouble minParticleMass = species.getDensity() * 4.0 / 3.0 * constants::pi * mathsFunc::cubic(HG.minParticleRadius);
185  //Calculates collision time for two copies of a particle of given dissipation_, k, effective mass
186  logger(INFO, "minParticleMass = %", minParticleMass);
187  //Calculates collision time for two copies of a particle of given dissipation_, k, effective mass
188  const Mdouble tc = species.getCollisionTime(minParticleMass);
189  logger(INFO, "tc = %", tc);
190  //Calculates restitution coefficient for two copies of given dissipation_, k, effective mass
191  const Mdouble r = species.getRestitutionCoefficient(minParticleMass);
192  logger(INFO, "restitution coefficient = %", r);
194 
196  //time integration parameters
197  HG.setTimeStep(tc / 10.0);
198  HG.setTimeMax(5.0);
199  HG.setSaveCount(500);
201 
203  HG.solve(argc, argv);
205  return 0;
206 }
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
Mdouble getCollisionTime(Mdouble mass) const
Calculates collision time for two copies of a particle of given disp, k, mass.
Definition: LinearViscoelasticNormalSpecies.cc:116
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
Mdouble getRestitutionCoefficient(Mdouble mass) const
Calculates restitution coefficient for two copies of given disp, k, mass.
Definition: LinearViscoelasticNormalSpecies.cc:147
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:88
Mdouble getDensity() const
Allows density_ to be accessed.
Definition: ParticleSpecies.cc:98
[T11:headers]
Definition: Tutorial11_AxisymmetricWalls.cpp:24
#define INFO(i)
Definition: mumps_solver.h:54
double height(const double &x)
Height of domain.
Definition: simple_spine_channel.cc:429
r
Definition: UniformPSDSelfTest.py:20
const Mdouble pi
Definition: ExtendedMath.h:23
T cubic(const T val)
calculates the cube of a number
Definition: ExtendedMath.h:95

References Tutorial11::contractionHeight, Tutorial11::contractionWidth, BaseHandler< T >::copyAndAddObject(), mathsFunc::cubic(), e(), LinearViscoelasticNormalSpecies::getCollisionTime(), ParticleSpecies::getDensity(), LinearViscoelasticNormalSpecies::getRestitutionCoefficient(), Global_Physical_Variables::height(), INFO, logger, Tutorial11::maxParticleRadius, Tutorial11::minParticleRadius, constants::pi, UniformPSDSelfTest::r, ParticleSpecies::setDensity(), LinearViscoelasticNormalSpecies::setDissipation(), DPMBase::setSaveCount(), LinearViscoelasticNormalSpecies::setStiffness(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), DPMBase::solve(), and DPMBase::speciesHandler.