MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MindlinInteraction.h
Go to the documentation of this file.
1 //Copyright (c) 2013-2020, 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 
168  void updateTangentialStiffnessInitial2(Mdouble fric, Vec3D direction);
169 
170  //...unloading (under constant normal force)...
171  void updateTangentialStiffnessUnloading(Mdouble fric, Vec3D direction);
172 
173  //...reloading (under constant normal force)...
174  void updateTangentialStiffnessReloading(Mdouble fric, Vec3D direction);
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
void updateTangentialStiffnessZero(Mdouble rad, double shearMod)
std::string getBaseName() const
Returns the type/name of interaction (sliding friction interaction)
void updateTangentialStiffnessInitial2(Mdouble fric, Vec3D direction)
double Mdouble
Definition: GeneralDefine.h:34
Mdouble getTangentialOverlap() const override
Returns the amount of tangential overlap which is needed by BaseInteraction::writeToFstat().
Vec3D slidingSpringVelocity_
Stores the rate at which the sliding spring compressed or relaxed. Set in the member function compute...
Vec3D tangentialForceTurningPointULTemp_
void updateTangentialStiffnessReloading(Mdouble fric, Vec3D direction)
Vec3D tangentialDisplacementTurningPointLU_
Mdouble absoluteNormalForcePrevious_
Computes the forces corresponding to sliding friction.
Vec3D slidingSpring_
Stores the amount of sliding spring ( ) compression from the expression . Set in the member function ...
MindlinSpecies contains the parameters used to describe sliding friction.
void integrate(Mdouble timeStep) override
Increments the amount of compression in sliding spring.
Stores information about interactions between two interactable objects; often particles but could be ...
const Mdouble getTangentialForceDirection() const
void reverseHistory() override
A useful feature if one wants to return to the initial state of the spring. However, reverse history decrements the current state to the state corresponding to previous time step. Decrements the value of slidingSpring_.
void updateTangentialStiffnessReloadingTanUp(Mdouble fric, Vec3D direction)
void updateTangentialStiffnessUnloading(Mdouble fric, Vec3D direction)
void rotateHistory(Matrix3D &rotationMatrix) override
When periodic particles are used, some interactions need certain history properties rotated (e...
void computeFrictionForce()
Computes the tangential force generated due to compression in the sliding spring. Does take into acco...
Mdouble getElasticEnergy() const override
Returns the amount of elastic energy stored in sliding spring.
const Vec3D getTangentialForce() const override
Returns the sliding friction force vector.
Vec3D tangentialForce_
Computes the tangential force such that . Set and computed in computeFrictionForce().
void setTangentialStiffnessZero(Mdouble newKt0)
Mdouble getAbsoluteNormalForcePrevious() const
Returns the absolute value of the norm (length) of the previous Normal force vector.
void updateTangentialStiffnessInitial(Mdouble fric)
const MindlinSpecies * getSpecies() const
Returns a const pointer of type MindlinSpecies*.
Defines the basic properties that a interactable object can have.
Mdouble getTangentialStiffnessZero()
Mdouble tangentialStiffnessZeroPrevious_
Implementation of a 3D matrix.
Definition: Matrix.h:37
Definition: Vector.h:49
void updateK_t(Mdouble fric, Vec3D direction, bool useTurningPoint, bool isLoading)
Vec3D tangentialDisplacementTurningPointUL_
MindlinInteraction()
Empty constructor.
Vec3D tangentialForceTurningPointLUTemp_
void setAbsoluteNormalForcePrevious(Mdouble absoluteNormalForcePrevious)
allows the previous normal force to be (re)set from external classes
MindlinSpecies SpeciesType
An alias name for MindlinSpecies data type.
void updateTangentialStiffnessUnloadingTanDown(Mdouble fric, Vec3D direction)
void write(std::ostream &os) const override
Interaction write function, which accepts an std::ostream as input.
void read(std::istream &is) override
Interaction read function, which accepts an std::istream as input.
~MindlinInteraction() override
Destructor.