ChuteWithVerticalHopper.h
Go to the documentation of this file.
1 //Copyright (c) 2013-2023, The MercuryDPM Developers Team. All rights reserved.
2 //For the list of developers, see <http://www.MercuryDPM.org/Team>.
3 //
4 //Redistribution and use in source and binary forms, with or without
5 //modification, are permitted provided that the following conditions are met:
6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above copyright
9 // notice, this list of conditions and the following disclaimer in the
10 // documentation and/or other materials provided with the distribution.
11 // * Neither the name MercuryDPM nor the
12 // names of its contributors may be used to endorse or promote products
13 // derived from this software without specific prior written permission.
14 //
15 //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 //ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 //WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 //DISCLAIMED. IN NO EVENT SHALL THE MERCURYDPM DEVELOPERS TEAM BE LIABLE FOR ANY
19 //DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 //(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 //LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 //ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 //(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 
26 #include "Chute.h"
27 #include "Statistics.h"
28 
30 public:
31  double inflowLength;
32  void set_inflowLength(double new_){inflowLength=new_;}
33 
35  void set_dragCoefficient(double new_){dragCoefficient=new_;}
36 
39 
40 private:
41  void setupInitialConditions() override {}
42 
43  void computeExternalForces(int CI) {
44  MD::computeExternalForces(CI);
45 
46  if (Particles[CI].Position.X<inflowLength) {
47  Particles[CI].Force += dragCoefficient*(targetVelocity-Particles[CI].Velocity);
48  }
49  }
50 
52  {
53  //the following formula yields polydispersed particle radii:
54  P0.Radius = random(MinInflowParticleRadius,MaxInflowParticleRadius);
55  P0.computeMass(Species);
56  P0.Velocity.set_zero();
57  P0.Position = Vec3D(
59  random(getYMin(),getYMax()),
60  random(getZMin()+1.5*P0.Radius,getZMax()));
61  }
62 
63 };
Definition: ChuteWithVerticalHopper.h:29
double inflowLength
Definition: ChuteWithVerticalHopper.h:31
void computeExternalForces(int CI)
Definition: ChuteWithVerticalHopper.h:43
double dragCoefficient
Definition: ChuteWithVerticalHopper.h:34
void set_targetVelocity(Vec3D new_)
Definition: ChuteWithVerticalHopper.h:38
void create_inflow_particle()
Definition: ChuteWithVerticalHopper.h:51
Vec3D targetVelocity
Definition: ChuteWithVerticalHopper.h:37
void set_dragCoefficient(double new_)
Definition: ChuteWithVerticalHopper.h:35
void set_inflowLength(double new_)
Definition: ChuteWithVerticalHopper.h:32
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: ChuteWithVerticalHopper.h:41
Creates chutes with different bottoms. Inherits from Mercury3D (-> MercuryBase -> DPMBase).
Definition: Chute.h:65
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin.
Definition: DPMBase.h:619
Mdouble getYMin() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin.
Definition: DPMBase.h:632
RNG random
This is a random generator, often used for setting up the initial conditions etc.....
Definition: DPMBase.h:1432
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax.
Definition: DPMBase.h:638
Mdouble getZMax() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax.
Definition: DPMBase.h:650
Mdouble getZMin() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin.
Definition: DPMBase.h:644
Contains material and contact force properties.
Definition: Species.h:35
Definition: Vector.h:51