obsolete_codes/AngleOfRepose.cpp File Reference
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cmath>
#include "scr/ChuteWithHopper.h"
#include "scr/Statistics.h"

Classes

class  AngleOfRepose
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
256 {
257  AngleOfRepose problem;
258 
259  //Problem parameters
260  //~ problem.setTimeMax(1000.0);
261  problem.setTimeMax(1.0);
262 
263  //Chute properties
264  problem.setChuteAngle(0.0);
265  //~ problem.setChuteLength(200.0);
266  problem.setChuteLength(20.0);
267  problem.setChuteWidth(problem.getChuteLength());
268  problem.Height = max(5.,problem.getChuteLength() * 0.5 * tan( 25.0 *constants::pi/180.0));
269  problem.setMaxFailed(1);
270 
271  int study_num;
272  if (argc>1) {
273  study_num=atoi(argv[1]);
274  } else {
275  study_num=0;
276  //~ cout << "Please enter study number" << endl;
277  //exit(-1);
278  }
279  problem.run(study_num);
280 }
Definition: AngleOfRepose.cpp:35
Mdouble Height
Definition: AngleOfRepose.cpp:119
void run(int study_num)
Definition: AngleOfRepose.cpp:163
Mdouble getChuteLength() const
Allows chute length to be accessed.
Definition: ChuteWithHopper.cc:531
void setChuteLength(Mdouble chuteLength) override
sets xMax to chuteLength+hopperlength_, and thus specifies the length off the runoff chute
Definition: ChuteWithHopper.cc:541
void setChuteWidth(Mdouble chuteWidth)
Sets the chute width (Y-direction)
Definition: Chute.cc:1039
void setMaxFailed(unsigned int maxFailed)
Sets the number of times a particle will be tried to be added to the insertion boundary.
Definition: Chute.cc:827
void setChuteAngle(Mdouble chuteAngle)
Sets gravity vector according to chute angle (in degrees)
Definition: Chute.cc:768
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:873
const Mdouble pi
Definition: ExtendedMath.h:45
T tan(T x)
Definition: ExtendedMath.h:178

References ChuteWithHopper::getChuteLength(), AngleOfRepose::Height, constants::pi, AngleOfRepose::run(), Chute::setChuteAngle(), ChuteWithHopper::setChuteLength(), Chute::setChuteWidth(), Chute::setMaxFailed(), DPMBase::setTimeMax(), and mathsFunc::tan().