25 setInflowParticleRadius(.5);
26 setFixedParticleRadius(.5);
32 double tc=5
e-3,
r=0.97,
beta=0.44,
mu=0.092,
mur=0.042;
33 setCollisionTimeAndNormalAndTangentialRestitutionCoefficient(tc,
r,
beta,1.0,1.0);
34 setSlidingFrictionCoefficient(
mu);
35 setSlidingFrictionCoefficientr();
38 setChuteAngle(24.0, 1.0);
48 double minCell = 2.*
min(getFixedParticleRadius(),getMinInflowParticleRadius());
49 double maxCell = 2.*
max(getFixedParticleRadius(),getMaxInflowParticleRadius());
50 if ((minCell==maxCell)|(minCell==0.)) set_HGRID_max_levels(1);
51 else set_HGRID_max_levels(2);
52 set_HGRID_cell_to_cell_ratio (1.0000001*maxCell/minCell);
56 if (speciesHandler.getNumberOfObjects()>1)
return speciesHandler.getMixedObject(1,0)->getSlidingFrictionCoefficient();
57 else return getSlidingFrictionCoefficient();
62 speciesHandler.getMixedObject(1, 0)->setSlidingFrictionCoefficient(new_);
67 static bool created=
false;
69 speciesHandler.copyAndAddObject(speciesHandler.getObject(0));
71 for (
int i=0;
i<get_N();
i++) {
72 if (Particles[
i].is_fixed()) Particles[
i].indSpecies=1;
79 name <<
"H" << getInflowHeight()
80 <<
"A" << getChuteAngleDegrees()
81 <<
"L" <<
round(100.*getFixedParticleRadius()*2.)/100.
82 <<
"M" << getSlidingFrictionCoefficient()
83 <<
"B" << getSlidingFrictionCoefficientBottom();
84 setName(
name.str().c_str());
100 double Lambdas[] = {0, 3./6., 4./6., 5./6., 1, 2};
101 setFixedParticleRadius(Lambdas[study_num]/2.);
104 cout <<
"Study is complete " << endl;
112 double Heights[] = {10, 20, 30, 40};
113 double Angles[] = {20, 22, 24, 26, 28, 30, 40, 50, 60};
114 setInflowHeight(Heights[study_num[1]-1]);
115 setChuteAngle(Angles[study_num[2]-1]);
116 set_study(study_num[0]);
126 set_Nmax(get_N()+getChuteLength()*getChuteWidth()*getZMax());
132 for (
int i=0;
i<get_N();
i++)
133 if (Particles[
i].is_fixed())
134 Particles[
i].indSpecies=1;
138 if (getFixedParticleRadius()) {
139 wallHandler.getObject(0)->set(
Vec3D(0,0,-1), 3.4*MaxInflowParticleRadius);
141 wallHandler.getObject(0)->set(
Vec3D(0,0,-1), 0.);
144 set_NWallPeriodic(2);
145 WallsPeriodic[0].set(
Vec3D( 1.0, 0.0, 0.0), getXMin(), getXMax());
146 WallsPeriodic[1].set(
Vec3D( 0.0, 1.0, 0.0), getYMin(), getYMax());
148 add_flow_particles();
150 cout << endl <<
"Status before solve:" << endl;
152 <<
"tc=" << getCollisionTime()
153 <<
", eps=" << getRestitutionCoefficient()
155 <<
", InflowHeight/zmax=" << getInflowHeight()/getZMax()
160 cout <<
"Nmax" << get_Nmax() << endl;
161 set_HGRID_num_buckets_to_power(get_N()*1.5);
167 set_HGRID_num_buckets_to_power(get_Nmax());
168 hGridActionsBeforeTimeLoop();
169 hGridActionsBeforeTimeStep();
170 unsigned int N=get_N()+getChuteLength()*getChuteWidth()*InflowHeight;
172 double H = InflowHeight;
173 setZMax(1.2*InflowHeight);
177 while (Particles.size()<
N){
178 create_inflow_particle();
179 if (IsInsertable(
P0)) {
181 }
else InflowHeight += .0001* MaxInflowParticleRadius;
184 set_HGRID_num_buckets_to_power();
185 write(std::cout,
false);
191 P0.Radius = MaxInflowParticleRadius;
194 P0.Position.X = random(getXMin()+2.0*
P0.Radius,getXMax());
195 P0.Position.Y = random(getYMin()+2.0*
P0.Radius,getYMax());
196 P0.Position.Z = random(getZMin()+2.0*
P0.Radius,getInflowHeight());
197 P0.Velocity =
Vec3D(0.0,0.0,0.0);
201 void set_H(
double new_) {InflowHeight=new_; setZMax(InflowHeight);}
202 double get_H() {
return InflowHeight;}
205 cout <<
"t=" << setprecision(3) << left << setw(6) << getTime()
206 <<
", tmax=" << setprecision(3) << left << setw(6) << getTimeMax()
207 <<
", N=" << setprecision(3) << left << setw(6) << Particles.size()
214 if (!strcmp(argv[
i],
"-muBottom")) {
215 setSlidingFrictionCoefficientBottom(atof(argv[
i+1]));
216 cout <<
"muB=" << getSlidingFrictionCoefficientBottom() << endl;
int i
Definition: BiCGSTAB_step_by_step.cpp:9
@ MULTILAYER
Definition: Chute.h:32
Array< double, 1, 3 > e(1./3., 0.5, 2.)
MatrixXf H
Definition: HessenbergDecomposition_matrixH.cpp:4
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
Definition: flowRuleDiego_HeightAngle.cpp:14
void createBaseSpecies()
Definition: obsolete_codes/GlasPeriodic.h:65
void set_study(vector< int > study_num)
Definition: obsolete_codes/GlasPeriodic.h:111
int readNextArgument(unsigned int &i, unsigned int &argc, char *argv[])
Definition: obsolete_codes/GlasPeriodic.h:213
void setSlidingFrictionCoefficientBottom(double new_)
Definition: obsolete_codes/GlasPeriodic.h:60
void add_flow_particles()
Definition: obsolete_codes/GlasPeriodic.h:165
void create_inflow_particle()
Definition: obsolete_codes/GlasPeriodic.h:189
void set_study()
Definition: obsolete_codes/GlasPeriodic.h:77
SilbertPeriodic()
Definition: obsolete_codes/GlasPeriodic.h:13
void printTime()
Definition: obsolete_codes/GlasPeriodic.h:204
void actionsBeforeTimeStep() override
A virtual function which allows to define operations to be executed before the new time step.
Definition: obsolete_codes/GlasPeriodic.h:120
double get_H()
Definition: obsolete_codes/GlasPeriodic.h:202
void fix_hgrid()
Definition: obsolete_codes/GlasPeriodic.h:45
void set_H(double new_)
Definition: obsolete_codes/GlasPeriodic.h:201
void set_study(int study_num)
Definition: obsolete_codes/GlasPeriodic.h:88
double getSlidingFrictionCoefficientBottom()
Definition: obsolete_codes/GlasPeriodic.h:55
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: obsolete_codes/GlasPeriodic.h:123
Contains material and contact force properties.
Definition: Species.h:14
Definition: Kernel/Math/Vector.h:30
@ N
Definition: constructor.cpp:22
#define min(a, b)
Definition: datatypes.h:22
#define max(a, b)
Definition: datatypes.h:23
Scalar beta
Definition: level2_cplx_impl.h:36
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
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 round(const bfloat16 &a)
Definition: BFloat16.h:646
std::complex< double > mu
Definition: time_harmonic_fourier_decomposed_linear_elasticity/cylinder/cylinder.cc:52
double P0
Definition: two_dim.cc:101
const Mdouble pi
Definition: ExtendedMath.h:23
MERCURYDPM_DEPRECATED Mdouble getMaximumVelocity(Mdouble k, Mdouble disp, Mdouble radius, Mdouble mass)
Calculates the maximum relative velocity allowed for a normal collision of two particles of radius r ...
Definition: FormulaHelpers.cc:47
list mur
Definition: plotDoE.py:18
string name
Definition: plotDoE.py:33