41 #ifdef CONSTUCTOR_OUTPUT
42 std::cerr <<
"Chute() finished" << std::endl;
51 #ifdef CONSTUCTOR_OUTPUT
52 std::cerr <<
"Chute(MD& other) finished" << std::endl;
58 #ifdef CONSTUCTOR_OUTPUT
59 std::cerr <<
"Chute(HGRID_base& other) finished" << std::endl;
65 #ifdef CONSTUCTOR_OUTPUT
66 std::cerr <<
"Chute(HGRID_3D& other) finished" << std::endl;
83 void read(std::istream& is);
86 virtual void write(std::ostream& os);
89 void print(std::ostream& os,
bool print_all=
false);
122 if (new_min>=0.0) {
MinInflowParticleRadius=new_min;}
else std::cerr <<
"WARNING : Min. inflow particle radius must be nonnegative" << std::endl;
123 if (new_max>=new_min) {
MaxInflowParticleRadius=new_max;}
else std::cerr <<
"WARNING : Max. inflow particle radius must be >= min. inflow particle radius" << std::endl;
147 if (new_ >= 0.0)
InflowVelocity=new_;
else std::cerr <<
"WARNING : Inflow velocity not changed, value must be greater than or equal to zero" << std::endl;
154 if (new_>=0.0&&new_<=1.0)
InflowVelocityVariance=new_;
else std::cerr <<
"WARNING : Inflow velocity variance not changed, value must be within [0,1]" << std::endl;
160 std::cerr <<
"WARNING : set_InitialHeight(Mdouble) is a deprecated function, use set_InflowHeight(Mdouble) instead." << std::endl;
164 std::cerr <<
"WARNING : get_InitialHeight(Mdouble) is a deprecated function, use get_InflowHeight(Mdouble) instead." << std::endl;
168 std::cerr <<
"WARNING : set_InitialVelocity(Mdouble) is a deprecated function, use set_InflowVelocity(Mdouble) instead." << std::endl;
172 std::cerr <<
"WARNING : get_InitialVelocity(Mdouble) is a deprecated function, use get_InflowVelocity(Mdouble) instead." << std::endl;
176 std::cerr <<
"WARNING : set_InitialVelocityVariance(Mdouble) is a deprecated function, use set_InflowVelocityVariance(Mdouble) instead." << std::endl;
180 std::cerr <<
"WARNING : get_InitialVelocityVariance(Mdouble) is a deprecated function, use get_InflowVelocityVariance(Mdouble) instead." << std::endl;
Mdouble MinInflowParticleRadius
This is the base class for both HGRID_2D and HGRID_3D.
Mdouble get_InitialVelocity()
Mdouble get_LargestParticleInteractionRadius()
void set_zmax(Mdouble new_zmax)
Sets ymax and walls, assuming the standard definition of walls as in the default constructor.
void make_chute_periodic()
This makes the chute periodic, in y.
void clean_chute()
Here we define the outflow.
void set_InitialHeight(Mdouble new_)
Mdouble get_LightestParticleMass()
Returns the radius of the smallest particle.
virtual void create_inflow_particle()
Sets variable values for particles that are created at the inflow.
int readNextArgument(unsigned int &i, unsigned int argc, char *argv[])
void set_InflowVelocity(Mdouble new_)
Changes inflow velocity.
void set_InflowVelocityVariance(Mdouble new_)
Changes inflow velocity variance.
void set_dt()
Sets dt to 1/50-th of the smallest possible collision time.
void actions_before_time_step()
This is action before the time step is started.
Mdouble get_MinInflowParticleRadius()
Allows radius of inflow particles to be accessed.
Mdouble InflowVelocityVariance
BaseParticle * getLargestParticle()
Returns the smallest particle (by mass) in the system.
void set_ChuteAngle(Mdouble new_)
Sets gravity vector according to chute angle (in degrees)
Mdouble get_restitution_coefficient()
Calculates restitution coefficient of two inflow particles.
Mdouble get_InflowVelocityVariance()
Accesses inflow velocity variance.
int get_RandomizedBottom()
Accesses RandomizedBottom.
void set_max_failed(unsigned int new_)
Allows radius of fixed particles to be changed.
Mdouble get_InflowHeight()
Accesses inflow height.
void set_InflowHeight(Mdouble new_)
Changes inflow height.
virtual void add_particles()
Here we define the inflow.
BaseParticle * getSmallestParticle()
Returns the smallest particle (by mass) in the system.
Mdouble get_ymax()
Gets ymax.
void set_dt()
Sets dt to 1/50-th of the collision time for two particles of mass P.
Mdouble get_InitialVelocityVariance()
void set_InflowParticleRadius(Mdouble new_min, Mdouble new_max)
Allows radius of inflow particles to be set to a range of values.
unsigned int get_max_failed()
Allows radius of fixed particles to be accessed.
Mdouble get_InflowVelocity()
Accesses inflow velocity.
Chute adds three new effects to the HGrid: the gravity direction can be set using the ChuteAngle vari...
This adds on the hierarchical grid code for 3D problems.
Mdouble dt
These are numerical constants like the time step size.
void set_InitialVelocityVariance(Mdouble new_)
Mdouble get_ChuteLength()
virtual void create_bottom()
Create the bottom of chute out of particles.
Mdouble get_MaxInflowParticleRadius()
Allows radius of inflow particles to be accessed.
void set_RandomizedBottom(int new_)
Changes RandomizedBottom.
void setup_particles_initial_conditions()
initialize particle position, velocity, radius
void set_ChuteWidth(Mdouble new_)
Access function that set the width of the chute.
virtual bool IsInsertable(BaseParticle &P)
here, CheckObjects is called; returns true is the particle should be added
void initialize_inflow_particle()
Sets initial values for particles that are created at the inflow.
void set_ymax(Mdouble new_ymax)
Sets ymax and walls, assuming the standard definition of walls as in the default constructor.
TangentialSpringParticle P0
void set_InitialVelocity(Mdouble new_)
virtual void set_ChuteLength(Mdouble new_)
void add_particle(BaseParticle &P)
adds particle to hgrid
void print(std::ostream &os, bool print_all=false)
This function std::couts all chute data.
void constructor()
This is the actual constructor; it is called do both constructors above.
void set_ChuteAngle(Mdouble new_, Mdouble gravity)
Sets gravity vector according to chute angle (in degrees)
Mdouble get_ChuteAngleDegrees()
A class that defines and solves a MD problem.
void set_MaxInflowParticleRadius(Mdouble new_max)
void set_dt(Mdouble dt)
Sets dt.
Chute()
This is the default constructor. All it does is set sensible defaults.
void cout_time()
std::couts time
Mdouble FixedParticleRadius
Mdouble get_InflowParticleRadius()
Allows radius of inflow particles to be accessed.
Mdouble get_collision_time()
Calculates collision time of two inflow particles.
Vec3D gravity
Gravitational acceleration.
Mdouble MaxInflowParticleRadius
Chute(MD &other)
Copy-constructor for creates an HGRID problem from an existing MD problem.
void read(std::istream &is)
This function reads all chute data.
Mdouble GetLength() const
bool get_IsPeriodic()
Get wether the chute is periodic.
Mdouble get_SmallestParticleInteractionRadius()
Returns the radius of the smallest particle.
Mdouble get_xmax()
Get xmax.
void set_gravity(Vec3D new_gravity)
Allows the gravitational acceleration to be changed.
Implementation of a 3D vector (by Vitaliy).
Vec3D get_gravity()
Allows the gravitational acceleration to be accessed.
Mdouble get_InitialHeight()
virtual void write(std::ostream &os)
This function writes all chute data.
void set_FixedParticleRadius(Mdouble new_)
Allows radius of fixed particles to be changed.
void set_collision_time_and_restitution_coefficient(Mdouble tc, Mdouble eps)
Sets k, disp such that it matches a given tc and eps for a collision of two inflow particles...
void set_InflowParticleRadius(Mdouble new_)
Allows radius of inflow particles to be changed.
void set_MinInflowParticleRadius(Mdouble new_min)
Mdouble get_ChuteAngle()
Gets chute angle (in radians)
void set_xmax(Mdouble new_xmax)
Sets xmax and walls, assuming the standard definition of walls as in the default constructor.
Mdouble get_FixedParticleRadius()
Allows radius of fixed particles to be accessed.