Tutorial4_BouncingBallInelastic.cpp File Reference

Classes

class  Tutorial4
 [T4:headers] More...
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

[T4:class]

[T4:main]

[T4:speciesProp]

[T4:speciesProp]

[T4: time]

[T4: time] [T4: solve]

[T4: solve]

47 {
48 
49  // Problem setup
51 
52  problem.setName("Tutorial4");
53  problem.setGravity(Vec3D(0.0, 0.0, -9.81));
54  problem.setXMax(0.25);
55  problem.setYMax(0.25);
56  problem.setZMax(0.25);
57  problem.setTimeMax(5.0);
58 
60  // The normal spring stiffness and normal dissipation is computed and set as
61  // For collision time tc=0.005 and restitution coefficient rc=0.88,
63  species.setDensity(2500.0); //sets the species type_0 density
64  species.setStiffness(258.5);//sets the spring stiffness.
65  species.setDissipation(0.0334); //sets the dissipation.
66  problem.speciesHandler.copyAndAddObject(species);
68 
69  problem.setSaveCount(10);
70  problem.setFileType(FileType::ONE_FILE);
71  problem.fStatFile.setFileType(FileType::NO_FILE);
72 
73  // TODO: Write vtk files (exercise 5)
74 
76  //time integration parameters
77  problem.setTimeStep(0.005 / 50.0); // (collision time)/50.0
80  problem.solve(argc, argv);
82  return 0;
83 }
@ NO_FILE
file will not be created/read
@ ONE_FILE
all data will be written into/ read from a single file called name_
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
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:88
[T4:headers]
Definition: Tutorial4_BouncingBallInelastic.cpp:23
Definition: Kernel/Math/Vector.h:30
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References NO_FILE, ONE_FILE, problem, ParticleSpecies::setDensity(), LinearViscoelasticNormalSpecies::setDissipation(), and LinearViscoelasticNormalSpecies::setStiffness().