elastic_gas.cpp File Reference
#include <iostream>
#include <Species/LinearViscoelasticFrictionSpecies.h>
#include "Mercury2D.h"
#include "StatisticsVector.h"

Classes

class  my_problem
 todo{This code is not working as is wanted} More...
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Start off my solving the default problem

70 {
71 
72 
73 
75  my_problem problem;
76  problem.setName("free_cooling");
77 
78  //Stefan problem
79  //problem.set_dissipation(0.0);
80 // species->setStiffness(1e5);
81 // problem.setTimeStep(4e-5);
82 // problem.setSaveCount(250000);
83 // problem.setTimeMax(10);
84 
85  //Vits problem
87  species->setDissipation(0.0);
88  problem.setTimeStep(4e-5);
89  species->setStiffness(1e6);
90  species->setDensity(2000);
91  problem.setTimeMax(12e-5);
92  //problem.set_HGRID_max_levels(1);
93  //problem.set_HGRID_num_buckets(1e5);
94  problem.setParticleDimensions(2);
95  problem.setGravity(Vec3D(0.0,0.0,0.0));
96  problem.setSaveCount(1e5);
97 
98 
99 
100  problem.write(std::cout,false);
101  problem.solve();
102  problem.write(std::cout,false);
103  problem.writeRestartFile();
104 
105  //StatisticsVector problemstats(problem.getName(), 100, 100, 0, 0.05, Gaussian);
106 
107  StatisticsVector<XY> problemstats;
108  problemstats.setName(problem.getName());
109  problemstats.setNX(100);
110  problemstats.setNY(100);
111  problemstats.setNZ(0);
112  problemstats.setCGWidth(0.05);
113  problemstats.setCGShape(Gaussian);
114  // 0, 0.05, Gaussian);
115  problemstats.statistics_from_fstat_and_data();
116 
117 
118 
119 /* cout << endl << "v=" << problem2.getMaximumVelocity_of_smallest_particle() << endl;
120  cout << "tc=" << problem2.getCollisionTime_for_smallest_particle() << endl;
121  cout << "eps=" << problem2.getRestitutionCoefficient_for_smallest_particle() << endl;*/
122 }
Species< LinearViscoelasticNormalSpecies, FrictionSpecies > LinearViscoelasticFrictionSpecies
Definition: LinearViscoelasticFrictionSpecies.h:34
@ Gaussian
Definition: StatisticsPoint.h:32
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 setParticleDimensions(unsigned int particleDimensions)
Sets the particle dimensionality.
Definition: DPMBase.cc:1448
const std::string & getName() const
Returns the name of the file. Does not allow to change it though.
Definition: DPMBase.cc:399
virtual void writeRestartFile()
Stores all the particle data for current save time step to a "restart" file, which is a file simply i...
Definition: DPMBase.cc:2942
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 setGravity(Vec3D newGravity)
Sets a new value for the gravitational acceleration.
Definition: DPMBase.cc:1383
void write(std::ostream &os, bool writeAllParticles=true) const override
Writes all data into a restart file.
Definition: MercuryBase.cc:147
This class is used to extract statistical data from MD simulations.
Definition: StatisticsVector.h:62
void setCGShape(const char *new_)
void setNX(int new_)
Definition: StatisticsVector.h:127
void setCGWidth(Mdouble w)
Set CG variables w2 and CG_invvolume.
Definition: StatisticsVector.h:317
void setNZ(int new_)
Definition: StatisticsVector.h:159
void setNY(int new_)
Definition: StatisticsVector.h:143
void statistics_from_fstat_and_data()
get StatisticsPoint
Definition: Vector.h:51
todo{This code is not working as is wanted}
Definition: elastic_gas.cpp:34

References BaseHandler< T >::copyAndAddObject(), Gaussian, DPMBase::getName(), StatisticsVector< T >::setCGShape(), StatisticsVector< T >::setCGWidth(), DPMBase::setGravity(), DPMBase::setName(), StatisticsVector< T >::setNX(), StatisticsVector< T >::setNY(), StatisticsVector< T >::setNZ(), DPMBase::setParticleDimensions(), DPMBase::setSaveCount(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), DPMBase::solve(), DPMBase::speciesHandler, StatisticsVector< T >::statistics_from_fstat_and_data(), MercuryBase::write(), and DPMBase::writeRestartFile().