30 FunnelInflowHeight = -1;
33 FunnelPointOnAxis.setZero();
39 setLastSavedTimeStep(1);
47 FunnelPointOnAxis =
Vec3D(0.5 * (getXMax() + getXMin()), 0.5 * (getYMax() + getYMin()), 0);
48 Mdouble PossibleRadius = 0.5 * (getXMax() - getXMin());
49 if (FunnelMaxRadius == -1)
50 FunnelMaxRadius = PossibleRadius;
51 if (FunnelMinRadius == -1)
52 FunnelMinRadius = FunnelMaxRadius / 3.;
53 if (FunnelHeight == -1)
55 setZMax(getZMax() + FunnelHeight);
56 if (FunnelInflowHeight == -1)
57 FunnelInflowHeight =
min(FunnelHeight / 4., 25. * getInflowParticleRadius());
65 species->setCollisionTimeAndRestitutionCoefficient(tc, 2.0 / 3.0, species->getMassFromRadius(0.5 * (getMinInflowParticleRadius() + getMaxInflowParticleRadius())));
66 setTimeStep(tc / 10.);
68 species->setSlidingStiffness(2. / 7. * species->getStiffness());
69 species->setSlidingDissipation(2. / 7. * species->getDissipation());
70 species->setSlidingFrictionCoefficient(0.4);
71 species->setRollingStiffness(2. / 7. * species->getStiffness());
72 species->setRollingDissipation(2. / 7. * species->getDissipation());
73 species->setRollingFrictionCoefficient(0.1);
82 Vec3D A(FunnelMinRadius, 0, getZMax() - FunnelHeight);
83 Vec3D B(FunnelMaxRadius, 0, getZMax());
84 Vec3D C(FunnelMaxRadius, 0, getZMax() - FunnelHeight);
91 wallHandler.copyAndAddObject(w0);
93 write(std::cout,
false);
105 P0.setRadius(random.getRandomNumber(getMinInflowParticleRadius(), getMaxInflowParticleRadius()));
107 Mdouble R = random.getRandomNumber(0, FunnelMaxRadius -
P0.getRadius());
110 double zhat = random.getRandomNumber(getZMax() - FunnelInflowHeight +
P0.getRadius(), getZMax() -
P0.getRadius());
114 P0.setVelocity(
Vec3D(0, 0, 0));
115 P0.setSpecies(speciesHandler.getObject(0));
120 unsigned int failed = 0;
123 while (failed <= max_failed)
125 create_inflow_particle();
126 if (checkParticleForInteraction (
P0))
128 particleHandler.copyAndAddObject(
P0);
142 static int count = 0, maxcount = 100;
143 if (count > maxcount)
147 for (
unsigned int i = 0;
i < particleHandler.getNumberOfObjects();)
149 if (particleHandler.getObject(
i)->getPosition().Z < getZMin())
151 particleHandler.removeObject(
i);
163 if (!strcmp(argv[
i],
"-inflowHeight"))
165 setInflowHeight(atof(argv[
i + 1]));
166 setZMax(atof(argv[
i + 1]));
168 else if (!strcmp(argv[
i],
"-FunnelMinRadius"))
170 set_FunnelMinRadius(atof(argv[
i + 1]));
172 else if (!strcmp(argv[
i],
"-FunnelMaxRadius"))
174 set_FunnelMaxRadius(atof(argv[
i + 1]));
176 else if (!strcmp(argv[
i],
"-FunnelHeight"))
178 set_FunnelHeight(atof(argv[
i + 1]));
180 else if (!strcmp(argv[
i],
"-FunnelInflowHeight"))
182 set_FunnelInflowHeight(atof(argv[
i + 1]));
191 FunnelMinRadius = new_;
196 FunnelMaxRadius = new_;
206 if (FunnelHeight < new_)
208 logger(
ERROR,
"FunnelInflowHeight=% < FunnelHeight=%", new_);
210 FunnelInflowHeight = new_;
int i
Definition: BiCGSTAB_step_by_step.cpp:9
dominoes D
Definition: Domino.cpp:55
Species< LinearViscoelasticNormalSpecies, FrictionSpecies > LinearViscoelasticFrictionSpecies
Definition: LinearViscoelasticFrictionSpecies.h:12
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
@ R
Definition: StatisticsVector.h:21
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47
Matrix< Scalar, Dynamic, Dynamic > C
Definition: bench_gemm.cpp:49
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
Definition: bench_gemm.cpp:48
Definition: AxisymmetricHopper.h:15
void set_FunnelInflowHeight(Mdouble new_)
Definition: AxisymmetricHopper.h:204
void add_particles()
Definition: AxisymmetricHopper.h:118
void set_FunnelMinRadius(Mdouble new_)
Definition: AxisymmetricHopper.h:189
Mdouble FunnelMinRadius
Definition: AxisymmetricHopper.h:216
void set_FunnelHeight(Mdouble new_)
Definition: AxisymmetricHopper.h:199
void set_FunnelMaxRadius(Mdouble new_)
Definition: AxisymmetricHopper.h:194
Vec3D FunnelPointOnAxis
Definition: AxisymmetricHopper.h:215
bool readNextArgument(int &i, int argc, char *argv[]) override
Interprets the i^th command-line argument.
Definition: AxisymmetricHopper.h:161
void create_inflow_particle()
Definition: AxisymmetricHopper.h:102
Mdouble FunnelHeight
Definition: AxisymmetricHopper.h:218
Mdouble FunnelMaxRadius
Definition: AxisymmetricHopper.h:217
SphericalParticle P0
Definition: AxisymmetricHopper.h:220
unsigned int num_created
Definition: AxisymmetricHopper.h:222
Mdouble FunnelInflowHeight
Definition: AxisymmetricHopper.h:219
virtual void cleanChute()
Definition: AxisymmetricHopper.h:139
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: AxisymmetricHopper.h:36
AxisymmetricHopper()
Definition: AxisymmetricHopper.h:18
unsigned int max_failed
Definition: AxisymmetricHopper.h:221
void actionsBeforeTimeStep() override
A virtual function which allows to define operations to be executed before the new time step.
Definition: AxisymmetricHopper.h:96
Use AxisymmetricIntersectionOfWalls to Screw Screw::read Screw::read Screw::read define axisymmetric ...
Definition: AxisymmetricIntersectionOfWalls.h:105
void setAxis(Vec3D a)
Definition: AxisymmetricIntersectionOfWalls.cc:149
virtual void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
Definition: BaseInteractable.h:218
Creates chutes with different bottoms. Inherits from Mercury3D (-> MercuryBase -> DPMBase).
Definition: Chute.h:44
bool readNextArgument(int &i, int argc, char *argv[]) override
This method can be used for reading object properties from a string.
Definition: Chute.cc:534
The matrix class, also used for vectors and row-vectors.
Definition: Eigen/Eigen/src/Core/Matrix.h:186
void addObject(Vec3D normal, Vec3D point)
Adds a wall to the set of infinite walls, given a normal vector pointing into the wall (i....
Definition: IntersectionOfWalls.cc:117
void setSpecies(const ParticleSpecies *species)
sets species of subwalls as well
Definition: IntersectionOfWalls.cc:51
A spherical particle is the most simple particle used in MercuryDPM.
Definition: SphericalParticle.h:16
Definition: Kernel/Math/Vector.h:30
static Vec3D cross(const Vec3D &a, const Vec3D &b)
Calculates the cross product of two Vec3D: .
Definition: Vector.cc:143
Mdouble getLength() const
Calculates the length of this Vec3D: .
Definition: Vector.cc:339
Definition: matrices.h:74
#define min(a, b)
Definition: datatypes.h:22
RealScalar s
Definition: level1_cplx_impl.h:130
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::enable_if_t< dt !=data_source::global_mem, void > write(PacketType &packet_data, DataScalar ptr)
write, a template function used for storing the data to local memory. This function is used to guaran...
Definition: TensorContractionSycl.h:221
double P0
Definition: two_dim.cc:101
int c
Definition: calibrate.py:100
const Mdouble pi
Definition: ExtendedMath.h:23
unsigned int getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(unsigned int numberOfSaves, Mdouble timeMax, Mdouble timeStep)
Returns the correct saveCount if the total number of saves, the final time and the time step is known...
Definition: FormulaHelpers.cc:75
Mdouble cos(Mdouble x)
Definition: ExtendedMath.cc:43
Mdouble sin(Mdouble x)
Definition: ExtendedMath.cc:23