TGas.cpp File Reference

Classes

class  multiParticleT1
 

Functions

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

Variables

Mdouble f_min = -20
 
Mdouble f_max = 20
 
Mdouble margin = 0
 
Mdouble av_min = -0
 
Mdouble av_max = 0
 
Mdouble tv_min = -100
 
Mdouble tv_max = 100
 
int N_att = 2000
 
std::vector< int > D_h
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
214 {
215  multiParticleT1 problem;
216  problem.setNumberOfOMPThreads(helpers::readFromCommandLine(argc, argv, "-omp",4));
218  species->setDensity(1.0); // sets the species type-0 density
219  //species->setConstantRestitution(0);
220  std::cout<<species->getConstantRestitution()<<std::endl;
221  species->setDissipation(0.0);
222  species->setStiffness(1e6);
223  const Mdouble collisionTime = species->getCollisionTime(problem.getClumpMass());
224  problem.setClumpDamping(0);
225  std::cout <<"coll time"<<collisionTime<<std::endl;
226  problem.setTimeStep(collisionTime / 50.0);
227 
228  // Quick demonstration
229  problem.setSaveCount(50);
230  problem.setTimeMax(0.1);
231 
232 
233  problem.removeOldFiles();
234  problem.solve();
235 
236 
237  // Return the log of the Dzh particles
238  std::ofstream D_hyst; D_hyst.open ("Dzh_hystory.txt");
239  for (int i = 0; i<D_h.size(); i+=50){D_hyst <<D_h[i]<<std::endl;}
240  D_hyst.close();
241 
242  return 0;
243 }
double Mdouble
Definition: GeneralDefine.h:34
Species< LinearViscoelasticNormalSpecies, FrictionSpecies > LinearViscoelasticFrictionSpecies
Definition: LinearViscoelasticFrictionSpecies.h:34
std::vector< int > D_h
Definition: TGas.cpp:48
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 removeOldFiles() const
Definition: DPMBase.cc:4422
void setNumberOfOMPThreads(int numberOfOMPThreads)
Definition: DPMBase.cc:1257
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
Definition: Domino.cpp:80
Mdouble getClumpMass()
Definition: Domino.cpp:99
void setClumpDamping(Mdouble damp)
Definition: Domino.cpp:95
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51
bool readFromCommandLine(int argc, char *argv[], std::string varName)
Returns true if command line arguments contain varName, false else.
Definition: CommandLineHelpers.cc:103

References BaseHandler< T >::copyAndAddObject(), D_h, multiParticleT1::getClumpMass(), constants::i, helpers::readFromCommandLine(), DPMBase::removeOldFiles(), multiParticleT1::setClumpDamping(), DPMBase::setNumberOfOMPThreads(), DPMBase::setSaveCount(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), DPMBase::solve(), and DPMBase::speciesHandler.

Variable Documentation

◆ av_max

◆ av_min

◆ D_h

std::vector<int> D_h

◆ f_max

◆ f_min

◆ margin

◆ N_att

int N_att = 2000

◆ tv_max

◆ tv_min

Mdouble tv_min = -100