FreeCooling3DDemo.cpp File Reference
#include <iostream>
#include <Species/LinearViscoelasticSpecies.h>
#include <Boundaries/PeriodicBoundary.h>
#include "Mercury3D.h"
#include "MercuryTime.h"

Classes

class  FreeCooling3DDemoProblem
 [FCD_3D:headers] More...
 

Functions

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

Function Documentation

◆ main()

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

[FCD_3D:class]

[FCD_3D:main]

[FCD_3D:species]

[FCD_3D:species] [FCD_3DproblemSetup]

[FCD_3DproblemSetup] [FCD_3D:solve]

[FCD_3D:solve]

117 {
118  // Problem setup
119  FreeCooling3DDemoProblem problem;
122  species.setDensity(2e3);
123  species.setDissipation(0.0);
124  species.setStiffness(1e3);
125  problem.FC3D_Species = species;
126  problem.speciesHandler.copyAndAddObject(species);
129  problem.N = 1000;
130  problem.setName("FreeCooling3DDemo");
131  problem.setGravity(Vec3D(0.0, 0.0, 0.0));
132  problem.setTimeStep(5e-5);
133  problem.setSaveCount(4000);
134  problem.setTimeMax(50.0);
135  problem.setMax(0.064,0.064,0.064);
136  problem.setHGridMaxLevels(1);
137  problem.setHGridCellOverSizeRatio(1.2);
138  problem.setHGridUpdateEachTimeStep(false);
142  problem.setParticlesWriteVTK(true);
143  problem.solve();
145 }
@ ONE_FILE
all data will be written into/ read from a single file called name_
std::enable_if<!std::is_pointer< U >::value, U * >::type copyAndAddObject(const U &object)
Creates a copy of a Object and adds it to the BaseHandler.
Definition: BaseHandler.h:379
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1427
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
void setFileType(FileType fileType)
Sets File::fileType_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:459
void setParticlesWriteVTK(bool writeParticlesVTK)
Sets whether particles are written in a VTK file.
Definition: DPMBase.cc:942
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1234
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:873
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
void setMax(const Vec3D &max)
Sets the maximum coordinates of the problem domain.
Definition: DPMBase.cc:1082
void setGravity(Vec3D newGravity)
Sets a new value for the gravitational acceleration.
Definition: DPMBase.cc:1383
[FCD_3D:headers]
Definition: FreeCooling3DDemo.cpp:43
unsigned int N
[FCD_3D:aftertime]
Definition: FreeCooling3DDemo.cpp:109
LinearViscoelasticSpecies FC3D_Species
Definition: FreeCooling3DDemo.cpp:110
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
void setHGridUpdateEachTimeStep(bool updateEachTimeStep)
Sets whether or not the HGrid must be updated every time step.
Definition: MercuryBase.cc:176
void setHGridMaxLevels(unsigned int HGridMaxLevels)
Sets the maximum number of levels of the HGrid in this MercuryBase.
Definition: MercuryBase.cc:476
void setHGridCellOverSizeRatio(Mdouble cellOverSizeRatio)
Sets the ratio of the smallest cell over the smallest particle.
Definition: MercuryBase.cc:463
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:108
Definition: Vector.h:51

References BaseHandler< T >::copyAndAddObject(), FreeCooling3DDemoProblem::FC3D_Species, FreeCooling3DDemoProblem::N, ONE_FILE, ParticleSpecies::setDensity(), LinearViscoelasticNormalSpecies::setDissipation(), DPMBase::setFileType(), DPMBase::setGravity(), MercuryBase::setHGridCellOverSizeRatio(), MercuryBase::setHGridMaxLevels(), MercuryBase::setHGridUpdateEachTimeStep(), DPMBase::setMax(), DPMBase::setName(), DPMBase::setParticlesWriteVTK(), DPMBase::setSaveCount(), LinearViscoelasticNormalSpecies::setStiffness(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), DPMBase::solve(), and DPMBase::speciesHandler.