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]

155 {
157  Mdouble width = 10e-2; // 10cm
158  Mdouble height = 60e-2; // 60cm
159 
160  //Point the object HG to class
161  Tutorial11 HG(width,height);
162 
163  //Specify particle radius:
164  //these parameters are needed in setupInitialConditions()
165  HG.minParticleRadius = 6e-3; // 6mm
166  HG.maxParticleRadius = 10e-3; //10mm
168 
170  //Specify the number of particles
171 
172  //specify how big the wedge of the contraction should be
173  const Mdouble contractionWidth = 2.5e-2; //2.5cm
174  const Mdouble contractionHeight = 5e-2; //5cm
175  HG.contractionWidth = contractionWidth;
176  HG.contractionHeight = contractionHeight;
178 
180  //make the species of the particle and wall
182  species.setDensity(2000);
183 
184  species.setStiffness(1e5);
185  species.setDissipation(0.63);
186  HG.speciesHandler.copyAndAddObject(species);
187 
189 
191  //test normal forces
192  const Mdouble minParticleMass = species.getDensity() * 4.0 / 3.0 * constants::pi * mathsFunc::cubic(HG.minParticleRadius);
193  //Calculates collision time for two copies of a particle of given dissipation_, k, effective mass
194  logger(INFO, "minParticleMass = %", minParticleMass);
195  //Calculates collision time for two copies of a particle of given dissipation_, k, effective mass
196  const Mdouble tc = species.getCollisionTime(minParticleMass);
197  logger(INFO, "tc = %", tc);
198  //Calculates restitution coefficient for two copies of given dissipation_, k, effective mass
199  const Mdouble r = species.getRestitutionCoefficient(minParticleMass);
200  logger(INFO, "restitution coefficient = %", r);
202 
204  //time integration parameters
205  HG.setTimeStep(tc / 10.0);
206  HG.setTimeMax(5.0);
207  HG.setSaveCount(500);
209 
211  HG.solve(argc, argv);
213  return 0;
214 }
double Mdouble
Definition: GeneralDefine.h:34
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
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:137
void setDissipation(Mdouble dissipation)
Allows the normal dissipation to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:117
void setStiffness(Mdouble new_k)
Allows the spring constant to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:93
Mdouble getRestitutionCoefficient(Mdouble mass) const
Calculates restitution coefficient for two copies of given disp, k, mass.
Definition: LinearViscoelasticNormalSpecies.cc:168
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:108
Mdouble getDensity() const
Allows density_ to be accessed.
Definition: ParticleSpecies.cc:118
[T11:headers]
Definition: Tutorial11_AxisymmetricWalls.cpp:38
const Mdouble pi
Definition: ExtendedMath.h:45
T cubic(const T val)
calculates the cube of a number
Definition: ExtendedMath.h:115

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