ChuteWithVerticalHopper.h
Go to the documentation of this file.
1 // This file is part of the MercuryDPM project (https://www.mercurydpm.org).
2 // Copyright (c), The MercuryDPM Developers Team. All rights reserved.
3 // License: BSD 3-Clause License; see the LICENSE file in the root directory.
4 
5 #include "Chute.h"
6 #include "Statistics.h"
7 
8 class ChuteWithVerticalHopper : public Chute {
9 public:
10  double inflowLength;
11  void set_inflowLength(double new_){inflowLength=new_;}
12 
14  void set_dragCoefficient(double new_){dragCoefficient=new_;}
15 
18 
19 private:
20  void setupInitialConditions() override {}
21 
22  void computeExternalForces(int CI) {
23  MD::computeExternalForces(CI);
24 
25  if (Particles[CI].Position.X<inflowLength) {
26  Particles[CI].Force += dragCoefficient*(targetVelocity-Particles[CI].Velocity);
27  }
28  }
29 
31  {
32  //the following formula yields polydispersed particle radii:
33  P0.Radius = random(MinInflowParticleRadius,MaxInflowParticleRadius);
34  P0.computeMass(Species);
35  P0.Velocity.set_zero();
36  P0.Position = Vec3D(
38  random(getYMin(),getYMax()),
39  random(getZMin()+1.5*P0.Radius,getZMax()));
40  }
41 
42 };
Definition: ChuteWithVerticalHopper.h:8
double inflowLength
Definition: ChuteWithVerticalHopper.h:10
void computeExternalForces(int CI)
Definition: ChuteWithVerticalHopper.h:22
double dragCoefficient
Definition: ChuteWithVerticalHopper.h:13
void set_targetVelocity(Vec3D new_)
Definition: ChuteWithVerticalHopper.h:17
void create_inflow_particle()
Definition: ChuteWithVerticalHopper.h:30
Vec3D targetVelocity
Definition: ChuteWithVerticalHopper.h:16
void set_dragCoefficient(double new_)
Definition: ChuteWithVerticalHopper.h:14
void set_inflowLength(double new_)
Definition: ChuteWithVerticalHopper.h:11
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: ChuteWithVerticalHopper.h:20
Creates chutes with different bottoms. Inherits from Mercury3D (-> MercuryBase -> DPMBase).
Definition: Chute.h:44
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin.
Definition: DPMBase.h:603
Mdouble getYMin() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin.
Definition: DPMBase.h:616
RNG random
This is a random generator, often used for setting up the initial conditions etc.....
Definition: DPMBase.h:1438
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax.
Definition: DPMBase.h:622
Mdouble getZMax() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax.
Definition: DPMBase.h:634
Mdouble getZMin() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin.
Definition: DPMBase.h:628
Contains material and contact force properties.
Definition: Species.h:14
Definition: Kernel/Math/Vector.h:30
double P0
Definition: two_dim.cc:101