MindlinInteraction.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 #ifndef MINDLININTERACTION_H
27 #define MINDLININTERACTION_H
28 
30 #include "Math/Vector.h"
31 
32 class BaseParticle;
33 
34 class MindlinSpecies;
35 
36 class BaseInteractable;
37 
42 class MindlinInteraction : public virtual BaseInteraction
43 {
44 public:
49 
53  MindlinInteraction(BaseInteractable* P, BaseInteractable* I, unsigned timeStamp);
54 
59 
64 
68  ~MindlinInteraction() override;
69 
74  void computeFrictionForce();
75 
79  void read(std::istream& is) override;
80 
84  void write(std::ostream& os) const override;
85 
89  void integrate(Mdouble timeStep) override;
90 
94  Mdouble getElasticEnergy() const override;
95 
99  Mdouble getTangentialOverlap() const override;
100 
104  std::string getBaseName() const;
105 
106  //setters and getters
110  const Vec3D getTangentialForce() const override;
111 
112  //k_edit
113  //Returns a scalar value letting us know the direction of the tangential force
114  //(i.e. positive or negative) so that accurate values can be output to the fstat file
115  const Mdouble getTangentialForceDirection() const;
116 
117  //k_edit
122 
123  //k_edit
127  void setAbsoluteNormalForcePrevious(Mdouble absoluteNormalForcePrevious);
128 
132  const MindlinSpecies* getSpecies() const;
133 
139  void reverseHistory() override;
140 
141  void rotateHistory(Matrix3D& rotationMatrix) override;
142 
143  //k_edit
144  //Allows the K_t0 parameter (for Mindlin model) to be set
145  void setTangentialStiffnessZero(Mdouble newKt0);
146 
147  //k_edit
148  //Allows the K_t0 parameter (for Mindlin model) to be accessed
150 
151  //k_edit
152  //...and a similar function for the "normal" K_t
154 
155  //k_edit
156  //A quick way to update the K_t0 parameter when necessary...
157  void updateTangentialStiffnessZero(Mdouble rad, double shearMod);
158  //k_edit
159  //...and a second, similar method by which to update K_t0 for loading curves in which
160  //multiple steps are required to increment the tangential force
161  //void updateTangentialStiffnessZeroSecondStep(Mdouble rad, double shearMod);
162 
163  //k_edit
164  //A way to easily update K_t for all possible cases,
165  //i.e. initial loading (under constant normal force)...
167 
169 
170  //...unloading (under constant normal force)...
172 
173  //...reloading (under constant normal force)...
175 
176  //...reloading (i.e. tangential force increasing) and normal force varying (moving from state 1 to 2)...
178 
179  //...and with increasing normal force and decreasing tangential...
181 
182 
183  //k_new
184  void updateK_t(Mdouble fric, Vec3D direction, bool useTurningPoint, bool isLoading);
185 
186 protected:
192  //k_edit
193  //Introducing a parameter to store the value of "slidingSpring_" (i.e. delta_t) for a previous time step
204  //k_edit
205  //adding a parameter to store the tangential force from a previous time step
207  //a parameter to give the (scalar) DIRECTION of the force, i.e. "with" or "against" the tangential motion!
209  //k_edit
210  //A pair of parameters to store the force at turning point, for use in calculating unloading/reloading
211  //curves using the Mindlin model (see Di Renzo and Di Maio 2004)
212  //"UL" and "LU" are used to distinguish between turning points between unloading and loading and
213  //those between loading and unloading
216  //A pair of variables to temporarily store updated versions of these values for use in multi-step
217  //Mindlin calculations
220  //a pair of vectors to store the current tangential displacements at each turning point
223 
224 
225  //k_edit
226  // the constant K_t0 used to calculate the tangential stiffness (K_t) for the
227  //Mindlin model (see, for example, Di Renzo and Di Maio, 2004)
229  //...and a variable to save its value from the previous time step
231  // the constant K_t as used in Di Maio and Di Renzo
233  //k_edit
234  //a simple flag to let functions know whether loading has been performed before or not
235  //(0 if no prior loading, 1 if prior loading)
237 
238  //k_edit
239  //a pair of variables to temporarily store the intermediate values of f_t and delta_t
240  //during the multiple-point force calculations necessary when both normal and tangential
241  //forces are varying
244 
245  //k_edit
246  //A second set of temporary vectors for when >2 steps are required.
247  //although not technically necessary, helps the clarity of the code GREATLY!
250 
251  //k_edit
252  //the minimal tangential displacement for which the simple loading assumption can be expected to hold
253  //in Herz-Mindlin theory
255 
256  //records the initial tangential velocity such that all subsequent motion can be directly compared to this!
258 
259  //k_edit
260  //parameter allowing previous values of the normal force to be stored and used in calculations
262 
263 };
264 
265 #endif
Defines the basic properties that a interactable object can have.
Definition: BaseInteractable.h:55
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:60
Definition: BaseParticle.h:54
Implementation of a 3D matrix.
Definition: Matrix.h:38
Computes the forces corresponding to sliding friction.
Definition: MindlinInteraction.h:43
void integrate(Mdouble timeStep) override
Increments the amount of compression in sliding spring.
Definition: MindlinInteraction.cc:349
Vec3D tangentialForceTurningPointULTemp_
Definition: MindlinInteraction.h:219
Vec3D tangentialDisplacementTurningPointLU_
Definition: MindlinInteraction.h:222
Mdouble tangentialForceDirection_
Definition: MindlinInteraction.h:208
Mdouble getElasticEnergy() const override
Returns the amount of elastic energy stored in sliding spring.
Definition: MindlinInteraction.cc:357
const MindlinSpecies * getSpecies() const
Returns a const pointer of type MindlinSpecies*.
Definition: MindlinInteraction.cc:398
Mdouble getTangentialOverlap() const override
Returns the amount of tangential overlap which is needed by BaseInteraction::writeToFstat().
Definition: MindlinInteraction.cc:368
Mdouble tangentialStiffnessZero_
Definition: MindlinInteraction.h:228
void setTangentialStiffnessZero(Mdouble newKt0)
Definition: MindlinInteraction.cc:187
void computeFrictionForce()
Computes the tangential force generated due to compression in the sliding spring. Does take into acco...
Definition: MindlinInteraction.cc:279
Vec3D tangentialForcePrevious_
Definition: MindlinInteraction.h:206
void write(std::ostream &os) const override
Interaction write function, which accepts an std::ostream as input.
Definition: MindlinInteraction.cc:166
void updateTangentialStiffnessZero(Mdouble rad, double shearMod)
Definition: MindlinInteraction.cc:212
Vec3D slidingSpring_
Stores the amount of sliding spring ( ) compression from the expression . Set in the member function ...
Definition: MindlinInteraction.h:191
void updateTangentialStiffnessUnloading(Mdouble fric, Vec3D direction)
Mdouble tangentialStiffness_
Definition: MindlinInteraction.h:232
Vec3D initialTangentialVelocity_
Definition: MindlinInteraction.h:257
Vec3D slidingSpringPrevious_
Definition: MindlinInteraction.h:194
Mdouble getTangentialStiffnessZero()
Definition: MindlinInteraction.cc:194
const Vec3D getTangentialForce() const override
Returns the sliding friction force vector.
Definition: MindlinInteraction.cc:380
std::string getBaseName() const
Returns the type/name of interaction (sliding friction interaction)
Definition: MindlinInteraction.cc:407
MindlinSpecies SpeciesType
An alias name for MindlinSpecies data type.
Definition: MindlinInteraction.h:48
Vec3D tangentialDisplacementTemp_
Definition: MindlinInteraction.h:243
Mdouble tangentialStiffnessZeroPrevious_
Definition: MindlinInteraction.h:230
void updateTangentialStiffnessReloading(Mdouble fric, Vec3D direction)
Mdouble getTangentialStiffness()
Definition: MindlinInteraction.cc:201
void updateTangentialStiffnessUnloadingTanDown(Mdouble fric, Vec3D direction)
void updateTangentialStiffnessInitial(Mdouble fric)
void rotateHistory(Matrix3D &rotationMatrix) override
When periodic particles are used, some interactions need certain history properties rotated (e....
Definition: MindlinInteraction.cc:422
Vec3D tangentialForce_
Computes the tangential force such that . Set and computed in computeFrictionForce().
Definition: MindlinInteraction.h:203
Vec3D tangentialForceTemp_
Definition: MindlinInteraction.h:242
~MindlinInteraction() override
Destructor.
Definition: MindlinInteraction.cc:156
bool priorLoadingFlag_
Definition: MindlinInteraction.h:236
MindlinInteraction()
Empty constructor.
Definition: MindlinInteraction.cc:145
void updateK_t(Mdouble fric, Vec3D direction, bool useTurningPoint, bool isLoading)
Definition: MindlinInteraction.cc:226
void updateTangentialStiffnessReloadingTanUp(Mdouble fric, Vec3D direction)
const Mdouble getTangentialForceDirection() const
Definition: MindlinInteraction.cc:390
void updateTangentialStiffnessInitial2(Mdouble fric, Vec3D direction)
Mdouble getAbsoluteNormalForcePrevious() const
Returns the absolute value of the norm (length) of the previous Normal force vector.
Definition: MindlinInteraction.cc:437
Vec3D tangentialForceTurningPointLUTemp_
Definition: MindlinInteraction.h:218
void reverseHistory() override
A useful feature if one wants to return to the initial state of the spring. However,...
Definition: MindlinInteraction.cc:415
Mdouble absoluteNormalForcePrevious_
Definition: MindlinInteraction.h:261
Vec3D tangentialForceTurningPointLU_
Definition: MindlinInteraction.h:214
Mdouble tangentialDisplacementSL_
Definition: MindlinInteraction.h:254
Vec3D tangentialDisplacementTemp2_
Definition: MindlinInteraction.h:249
Vec3D tangentialForceTurningPointUL_
Definition: MindlinInteraction.h:215
Vec3D slidingSpringVelocity_
Stores the rate at which the sliding spring compressed or relaxed. Set in the member function compute...
Definition: MindlinInteraction.h:199
void setAbsoluteNormalForcePrevious(Mdouble absoluteNormalForcePrevious)
allows the previous normal force to be (re)set from external classes
Definition: MindlinInteraction.cc:448
Vec3D tangentialForceTemp2_
Definition: MindlinInteraction.h:248
void read(std::istream &is) override
Interaction read function, which accepts an std::istream as input.
Definition: MindlinInteraction.cc:175
Vec3D tangentialDisplacementTurningPointUL_
Definition: MindlinInteraction.h:221
MindlinSpecies contains the parameters used to describe sliding friction.
Definition: MindlinSpecies.h:38
Definition: Vector.h:51
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:73