47 q.setName(
"QuaternionWallUnitTest");
51 q.setGravity(
Vec3D(0,0,0));
61 s->setCollisionTimeAndNormalAndTangentialRestitutionCoefficient(1,0.5,0.5,1);
62 s->setBondForceMax(.5);
63 s->setSlidingFrictionCoefficient(0.5);
64 s->setRollingStiffness(.2*
s->getStiffness());
65 s->setRollingDissipation(.2*
s->getDissipation());
66 s->setRollingFrictionCoefficient(0.2);
68 Mdouble angularVelocity = 0.025;
70 logger(
INFO,
"Create cylindrical wall rotating around its axis");
77 w.setPosition(position);
82 w.setAngularVelocity(angularVelocity*
Vec3D(0, 1, 0));
83 q.wallHandler.copyAndAddObject(
w);
88 p.setVelocity(
Vec3D(0, 0, 0));
89 p.setPosition(position +
Vec3D(0, 0, 1));
90 q.particleHandler.copyAndAddObject(
p);
91 p.setPosition(position +
Vec3D(0, 0, -1));
92 q.particleHandler.copyAndAddObject(
p);
93 p.setPosition(position +
Vec3D(1, 0, 0));
94 q.particleHandler.copyAndAddObject(
p);
95 p.setPosition(position +
Vec3D(-1, 0, 0));
96 q.particleHandler.copyAndAddObject(
p);
99 logger(
INFO,
"Create cubic wall rotating around its axis");
106 w.setPosition(position);
113 w.setAngularVelocity(angularVelocity*
Vec3D(0, 1, 0));
114 q.wallHandler.copyAndAddObject(
w);
118 p.setRadius(0.50001);
119 p.setVelocity(
Vec3D(0, 0, 0));
120 p.setPosition(position +
Vec3D(0, 0, 1));
121 q.particleHandler.copyAndAddObject(
p);
122 p.setPosition(position +
Vec3D(0, 0, -1));
123 q.particleHandler.copyAndAddObject(
p);
124 p.setPosition(position +
Vec3D(1, 0, 0));
125 q.particleHandler.copyAndAddObject(
p);
126 p.setPosition(position +
Vec3D(-1, 0, 0));
127 q.particleHandler.copyAndAddObject(
p);
130 logger(
INFO,
"Create square outer wall rotating around the other walls");
135 w.setPosition(
Vec3D(0,0,5));
136 w.setAngularVelocity(angularVelocity*
Vec3D(0, 1, 0));
137 w.setNormal(
Vec3D(0,0,1));
138 w.setPrescribedPosition(
139 [angularVelocity] (
Mdouble time)
140 {
return 5.0*
Vec3D(
sin(angularVelocity*time),0.0,
cos(angularVelocity*time)); });
141 q.wallHandler.copyAndAddObject(
w);
144 w.setPosition(
Vec3D(5,0,0));
145 w.setNormal(
Vec3D(1,0,0));
146 w.setPrescribedPosition(
147 [angularVelocity] (
Mdouble time)
148 {
return 5.0*
Vec3D(
sin(angularVelocity*time+0.5*
pi),0.0,
cos(angularVelocity*time+0.5*
pi)); });
149 q.wallHandler.copyAndAddObject(
w);
151 w.setPosition(
Vec3D(0,0,-5));
152 w.setNormal(
Vec3D(0,0,-1));
153 w.setPrescribedPosition(
154 [angularVelocity] (
Mdouble time)
155 {
return 5.0*
Vec3D(
sin(angularVelocity*time+
pi),0.0,
cos(angularVelocity*time+
pi)); });
156 q.wallHandler.copyAndAddObject(
w);
158 w.setPosition(
Vec3D(-5,0,0));
159 w.setNormal(
Vec3D(-1,0,0));
160 w.setPrescribedPosition(
161 [angularVelocity] (
Mdouble time)
162 {
return 5.0*
Vec3D(
sin(angularVelocity*time+1.5*
pi),0.0,
cos(angularVelocity*time+1.5*
pi)); });
163 q.wallHandler.copyAndAddObject(
w);
167 p.setRadius(0.50001);
168 p.setVelocity(
Vec3D(0, 0, 0));
169 p.setPosition(
Vec3D( 0, 0,-4.5));
170 q.particleHandler.copyAndAddObject(
p);
171 p.setPosition(
Vec3D(-4.5, 0, 0));
172 q.particleHandler.copyAndAddObject(
p);
173 p.setPosition(
Vec3D( 0, 0, 4.5));
174 q.particleHandler.copyAndAddObject(
p);
175 p.setPosition(
Vec3D( 4.5, 0, 0));
176 q.particleHandler.copyAndAddObject(
p);
AnnoyingScalar cos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:136
AnnoyingScalar sin(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:137
Species< LinearViscoelasticNormalSpecies, FrictionSpecies, BondedSpecies > LinearViscoelasticFrictionBondedSpecies
Definition: LinearViscoelasticFrictionBondedSpecies.h:13
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
RowVector3d w
Definition: Matrix_resize_int.cpp:3
float * p
Definition: Tutorial_Map_using.cpp:9
Use AxisymmetricIntersectionOfWalls to Screw Screw::read Screw::read Screw::read define axisymmetric ...
Definition: AxisymmetricIntersectionOfWalls.h:105
A infinite wall fills the half-space {point: (position_-point)*normal_<=0}.
Definition: InfiniteWall.h:27
A IntersectionOfWalls is convex polygon defined as an intersection of InfiniteWall's.
Definition: IntersectionOfWalls.h:38
Definition: QuaternionWallUnitTest.cpp:19
A spherical particle is the most simple particle used in MercuryDPM.
Definition: SphericalParticle.h:16
Definition: Kernel/Math/Vector.h:30
RealScalar s
Definition: level1_cplx_impl.h:130
#define INFO(i)
Definition: mumps_solver.h:54
EIGEN_DEVICE_FUNC const Scalar & q
Definition: SpecialFunctionsImpl.h:2019
const Mdouble pi
Definition: ExtendedMath.h:23