MindlinInteraction.h
Go to the documentation of this file.
1 // This file is part of the MercuryDPM project (https://www.mercurydpm.org).
2 // Copyright (c), The MercuryDPM Developers Team. All rights reserved.
3 // License: BSD 3-Clause License; see the LICENSE file in the root directory.
4 
5 #ifndef MINDLININTERACTION_H
6 #define MINDLININTERACTION_H
7 
9 #include "Math/Vector.h"
10 
11 class BaseParticle;
12 
13 class MindlinSpecies;
14 
15 class BaseInteractable;
16 
21 class MindlinInteraction : public virtual BaseInteraction
22 {
23 public:
28 
32  MindlinInteraction(BaseInteractable* P, BaseInteractable* I, unsigned timeStamp);
33 
38 
43 
47  ~MindlinInteraction() override;
48 
53  void computeFrictionForce();
54 
58  void read(std::istream& is) override;
59 
63  void write(std::ostream& os) const override;
64 
68  void integrate(Mdouble timeStep) override;
69 
73  Mdouble getElasticEnergy() const override;
74 
78  Mdouble getTangentialOverlap() const override;
79 
83  std::string getBaseName() const;
84 
85  //setters and getters
89  const Vec3D getTangentialForce() const override;
90 
91  //k_edit
92  //Returns a scalar value letting us know the direction of the tangential force
93  //(i.e. positive or negative) so that accurate values can be output to the fstat file
95 
96  //k_edit
101 
102  //k_edit
106  void setAbsoluteNormalForcePrevious(Mdouble absoluteNormalForcePrevious);
107 
111  const MindlinSpecies* getSpecies() const;
112 
118  void reverseHistory() override;
119 
120  void rotateHistory(Matrix3D& rotationMatrix) override;
121 
122  //k_edit
123  //Allows the K_t0 parameter (for Mindlin model) to be set
124  void setTangentialStiffnessZero(Mdouble newKt0);
125 
126  //k_edit
127  //Allows the K_t0 parameter (for Mindlin model) to be accessed
129 
130  //k_edit
131  //...and a similar function for the "normal" K_t
133 
134  //k_edit
135  //A quick way to update the K_t0 parameter when necessary...
136  void updateTangentialStiffnessZero(Mdouble rad, double shearMod);
137  //k_edit
138  //...and a second, similar method by which to update K_t0 for loading curves in which
139  //multiple steps are required to increment the tangential force
140  //void updateTangentialStiffnessZeroSecondStep(Mdouble rad, double shearMod);
141 
142  //k_edit
143  //A way to easily update K_t for all possible cases,
144  //i.e. initial loading (under constant normal force)...
146 
148 
149  //...unloading (under constant normal force)...
151 
152  //...reloading (under constant normal force)...
154 
155  //...reloading (i.e. tangential force increasing) and normal force varying (moving from state 1 to 2)...
157 
158  //...and with increasing normal force and decreasing tangential...
160 
161 
162  //k_new
163  void updateK_t(Mdouble fric, Vec3D direction, bool useTurningPoint, bool isLoading);
164 
165 protected:
171  //k_edit
172  //Introducing a parameter to store the value of "slidingSpring_" (i.e. delta_t) for a previous time step
183  //k_edit
184  //adding a parameter to store the tangential force from a previous time step
186  //a parameter to give the (scalar) DIRECTION of the force, i.e. "with" or "against" the tangential motion!
188  //k_edit
189  //A pair of parameters to store the force at turning point, for use in calculating unloading/reloading
190  //curves using the Mindlin model (see Di Renzo and Di Maio 2004)
191  //"UL" and "LU" are used to distinguish between turning points between unloading and loading and
192  //those between loading and unloading
195  //A pair of variables to temporarily store updated versions of these values for use in multi-step
196  //Mindlin calculations
199  //a pair of vectors to store the current tangential displacements at each turning point
202 
203 
204  //k_edit
205  // the constant K_t0 used to calculate the tangential stiffness (K_t) for the
206  //Mindlin model (see, for example, Di Renzo and Di Maio, 2004)
208  //...and a variable to save its value from the previous time step
210  // the constant K_t as used in Di Maio and Di Renzo
212  //k_edit
213  //a simple flag to let functions know whether loading has been performed before or not
214  //(0 if no prior loading, 1 if prior loading)
216 
217  //k_edit
218  //a pair of variables to temporarily store the intermediate values of f_t and delta_t
219  //during the multiple-point force calculations necessary when both normal and tangential
220  //forces are varying
223 
224  //k_edit
225  //A second set of temporary vectors for when >2 steps are required.
226  //although not technically necessary, helps the clarity of the code GREATLY!
229 
230  //k_edit
231  //the minimal tangential displacement for which the simple loading assumption can be expected to hold
232  //in Herz-Mindlin theory
234 
235  //records the initial tangential velocity such that all subsequent motion can be directly compared to this!
237 
238  //k_edit
239  //parameter allowing previous values of the normal force to be stored and used in calculations
241 
242 };
243 
244 #endif
float * p
Definition: Tutorial_Map_using.cpp:9
Defines the basic properties that a interactable object can have.
Definition: BaseInteractable.h:34
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:39
Definition: BaseParticle.h:33
Implementation of a 3D matrix.
Definition: Kernel/Math/Matrix.h:17
Computes the forces corresponding to sliding friction.
Definition: MindlinInteraction.h:22
void integrate(Mdouble timeStep) override
Increments the amount of compression in sliding spring.
Definition: MindlinInteraction.cc:327
Vec3D tangentialForceTurningPointULTemp_
Definition: MindlinInteraction.h:198
Vec3D tangentialDisplacementTurningPointLU_
Definition: MindlinInteraction.h:201
Mdouble tangentialForceDirection_
Definition: MindlinInteraction.h:187
Mdouble getElasticEnergy() const override
Returns the amount of elastic energy stored in sliding spring.
Definition: MindlinInteraction.cc:335
const MindlinSpecies * getSpecies() const
Returns a const pointer of type MindlinSpecies*.
Definition: MindlinInteraction.cc:376
Mdouble getTangentialOverlap() const override
Returns the amount of tangential overlap which is needed by BaseInteraction::writeToFstat().
Definition: MindlinInteraction.cc:346
Mdouble tangentialStiffnessZero_
Definition: MindlinInteraction.h:207
void setTangentialStiffnessZero(Mdouble newKt0)
Definition: MindlinInteraction.cc:165
void computeFrictionForce()
Computes the tangential force generated due to compression in the sliding spring. Does take into acco...
Definition: MindlinInteraction.cc:257
Vec3D tangentialForcePrevious_
Definition: MindlinInteraction.h:185
void write(std::ostream &os) const override
Interaction write function, which accepts an std::ostream as input.
Definition: MindlinInteraction.cc:144
void updateTangentialStiffnessZero(Mdouble rad, double shearMod)
Definition: MindlinInteraction.cc:190
Vec3D slidingSpring_
Stores the amount of sliding spring ( ) compression from the expression . Set in the member function ...
Definition: MindlinInteraction.h:170
void updateTangentialStiffnessUnloading(Mdouble fric, Vec3D direction)
Mdouble tangentialStiffness_
Definition: MindlinInteraction.h:211
Vec3D initialTangentialVelocity_
Definition: MindlinInteraction.h:236
Vec3D slidingSpringPrevious_
Definition: MindlinInteraction.h:173
Mdouble getTangentialStiffnessZero()
Definition: MindlinInteraction.cc:172
const Vec3D getTangentialForce() const override
Returns the sliding friction force vector.
Definition: MindlinInteraction.cc:358
std::string getBaseName() const
Returns the type/name of interaction (sliding friction interaction)
Definition: MindlinInteraction.cc:385
MindlinSpecies SpeciesType
An alias name for MindlinSpecies data type.
Definition: MindlinInteraction.h:27
Vec3D tangentialDisplacementTemp_
Definition: MindlinInteraction.h:222
Mdouble tangentialStiffnessZeroPrevious_
Definition: MindlinInteraction.h:209
void updateTangentialStiffnessReloading(Mdouble fric, Vec3D direction)
Mdouble getTangentialStiffness()
Definition: MindlinInteraction.cc:179
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:400
Vec3D tangentialForce_
Computes the tangential force such that . Set and computed in computeFrictionForce().
Definition: MindlinInteraction.h:182
Vec3D tangentialForceTemp_
Definition: MindlinInteraction.h:221
~MindlinInteraction() override
Destructor.
Definition: MindlinInteraction.cc:134
bool priorLoadingFlag_
Definition: MindlinInteraction.h:215
MindlinInteraction()
Empty constructor.
Definition: MindlinInteraction.cc:123
void updateK_t(Mdouble fric, Vec3D direction, bool useTurningPoint, bool isLoading)
Definition: MindlinInteraction.cc:204
void updateTangentialStiffnessReloadingTanUp(Mdouble fric, Vec3D direction)
const Mdouble getTangentialForceDirection() const
Definition: MindlinInteraction.cc:368
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:415
Vec3D tangentialForceTurningPointLUTemp_
Definition: MindlinInteraction.h:197
void reverseHistory() override
A useful feature if one wants to return to the initial state of the spring. However,...
Definition: MindlinInteraction.cc:393
Mdouble absoluteNormalForcePrevious_
Definition: MindlinInteraction.h:240
Vec3D tangentialForceTurningPointLU_
Definition: MindlinInteraction.h:193
Mdouble tangentialDisplacementSL_
Definition: MindlinInteraction.h:233
Vec3D tangentialDisplacementTemp2_
Definition: MindlinInteraction.h:228
Vec3D tangentialForceTurningPointUL_
Definition: MindlinInteraction.h:194
Vec3D slidingSpringVelocity_
Stores the rate at which the sliding spring compressed or relaxed. Set in the member function compute...
Definition: MindlinInteraction.h:178
void setAbsoluteNormalForcePrevious(Mdouble absoluteNormalForcePrevious)
allows the previous normal force to be (re)set from external classes
Definition: MindlinInteraction.cc:426
Vec3D tangentialForceTemp2_
Definition: MindlinInteraction.h:227
void read(std::istream &is) override
Interaction read function, which accepts an std::istream as input.
Definition: MindlinInteraction.cc:153
Vec3D tangentialDisplacementTurningPointUL_
Definition: MindlinInteraction.h:200
MindlinSpecies contains the parameters used to describe sliding friction.
Definition: MindlinSpecies.h:17
Definition: Kernel/Math/Vector.h:30
#define I
Definition: main.h:127
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:77
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286