FreeCooling3DinWallsDemo.cpp File Reference
#include <iostream>
#include <Species/LinearViscoelasticSpecies.h>
#include <Walls/InfiniteWall.h>
#include "Mercury3D.h"
#include "MercuryTime.h"

Classes

class  FreeCooling3DinWallsDemo
 ! [FCD_3D_inWalls:headers] More...
 

Functions

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

Function Documentation

◆ main()

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

[FCD_3D_inWalls:class] [FCD_3D_inWalls:main]

[FCD_3D_inWalls:species]

[FCD_3D_inWalls:species] [FCD_3D_inWalls:problemSetup]

[FCD_3D_inWalls:problemSetup] [FCD_3D_inWalls:solve]

[FCD_3D_inWalls:solve]

123 {
124  // Problem setup
125  FreeCooling3DinWallsDemo problem;
128  species.setDensity(2e3);
129  species.setDissipation(0.0);
130  species.setStiffness(1e3);
131  problem.FC3D_Species = species;
132  problem.speciesHandler.copyAndAddObject(species);
135  problem.N = 1000;
136  problem.setName("FreeCooling3DinWallsDemo");
137  problem.setGravity(Vec3D(0.0, 0.0, 0.0));
138  problem.setTimeStep(5e-5);
139  problem.setSaveCount(4000);
140  problem.setTimeMax(50.0);
141  problem.setMax(0.064,0.064,0.064);
142  problem.setHGridMaxLevels(1);
143  problem.setHGridCellOverSizeRatio(1.2);
144  problem.setHGridUpdateEachTimeStep(false);
148  problem.setParticlesWriteVTK(true);
149  problem.solve();
151 }
@ 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_inWalls:headers]
Definition: FreeCooling3DinWallsDemo.cpp:43
unsigned int N
[FCD_3D_inWalls:aftertime]
Definition: FreeCooling3DinWallsDemo.cpp:116
LinearViscoelasticSpecies FC3D_Species
Definition: FreeCooling3DinWallsDemo.cpp:117
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(), FreeCooling3DinWallsDemo::FC3D_Species, FreeCooling3DinWallsDemo::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.