Tutorial2_ParticleUnderGravity.cpp File Reference

Classes

class  Tutorial2
 [T2:headers] More...
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

[T2:class]

[T2:main]

[T2:problemSetup]

[T2:problemSetup]

[T2:speciesProp]

[T2:speciesProp]

[T2:output]

[T2:output]

[T1:paraviewOutput]

[T1:paraviewOutput]

[T2:solve]

[T2:solve]

41 {
42  // Problem setup
44 
46  problem.setName("Tutorial2");
47  problem.setGravity(Vec3D(0.0, 0.0, -9.81));
48  problem.setXMax(1.0);
49  problem.setYMax(1.0);
50  problem.setZMax(5.0);
51  problem.setTimeMax(1.5);
53 
55  // The normal spring stiffness and normal dissipation is computed and set as
56  // For collision time tc=0.005 and restitution coefficient rc=1.0,
58  species.setDensity(2500.0); //sets the species type_0 density
59  species.setStiffness(258.5);//sets the spring stiffness.
60  species.setDissipation(0.0); //sets the dissipation.
61  problem.speciesHandler.copyAndAddObject(species);
63 
65  problem.setSaveCount(50);
66  problem.dataFile.setFileType(FileType::ONE_FILE);
67  problem.restartFile.setFileType(FileType::ONE_FILE);
68  problem.fStatFile.setFileType(FileType::NO_FILE);
69  problem.eneFile.setFileType(FileType::NO_FILE);
71 
73  // whether the wall geometry is written into a vtu file (either once initially or for several time steps)
74  problem.wallHandler.setWriteVTK(FileType::ONE_FILE);
75  // whether the particle positions are written into a vtu file
76  problem.setParticlesWriteVTK(true);
78 
79 
81  problem.setTimeStep(.005 / 50.0);// (collision time)/50.0
82  problem.solve(argc, argv);
84 
85  return 0;
86 }
@ 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
[T2:headers]
Definition: Tutorial2_ParticleUnderGravity.cpp:22
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().