KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
friction_law.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosContactMechanicsApplication $
3 // Created by: $Author: JMCarbonell $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: July 2016 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_FRICTION_LAW_H_INCLUDED)
11 #define KRATOS_FRICTION_LAW_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
18 #include "includes/properties.h"
19 #include "containers/flags.h"
21 
22 namespace Kratos
23 {
26 
29 
33 
37 
41 
45 
47 
51 class KRATOS_API(CONTACT_MECHANICS_APPLICATION) FrictionLaw
52 {
53 public:
54 
57 
59 
61  double Alpha;
62  double Area;
63 
65 
67  double PlasticSlip;
68  double Adhesion;
69 
70  bool Implex;
71 
72  FrictionLawVariables() {Implex = false; Area = 1.0;}
73 
74  void Initialize(const double & rTangentPenalty, double PS, double & rArea, bool rImplex = false )
75  {
76  PlasticSlipOld = PS;
77  PlasticSlip = PS;
78  Area = rArea;
79  TangentPenalty = rTangentPenalty / Area;
80  Implex = rImplex;
81  };
82 
83  };
84 
87 
91 
94  {
95  mPlasticSlip = 0.0;
96  mPlasticSlipNew = 0.0;
97  mDeltaPlasticSlip = 0.0;
98  };
99 
101  FrictionLaw(FrictionLaw const& rOther)
102  :mPlasticSlip(rOther.mPlasticSlip)
103  ,mPlasticSlipNew(rOther.mPlasticSlipNew)
104  ,mDeltaPlasticSlip(rOther.mDeltaPlasticSlip)
105  {};
106 
108  virtual ~FrictionLaw(){};
109 
114  virtual FrictionLaw::Pointer Clone() const
115  {
116  return Kratos::make_shared<FrictionLaw>(*this);
117  };
118 
119 
123 
124 
128 
129 
130  void InitializeSolutionStep();
131 
132  void FinalizeSolutionStep();
133 
134  // perform similar to a return mapping
135  bool EvaluateFrictionLaw( double& rTangentForce, const double& rNormalForce, FrictionLawVariables& rTangentVariables);
136 
137  void EvaluateConstitutiveComponents( double& rNormalModulus, double & rTangentModulus, const double& rTangentForce, const double& rEffectiveNormalForce, FrictionLawVariables& rTangentVariables);
138 
139  double GetPlasticSlip() { return mPlasticSlip; };
140 
144 
145 
149 
150 
154 
156  virtual std::string Info() const
157  {
158  std::stringstream buffer;
159  buffer << "FrictionLaw";
160  return buffer.str();
161  }
162 
164  virtual void PrintInfo(std::ostream& rOStream) const
165  {
166  rOStream << "FrictionLaw";
167  }
168 
170  virtual void PrintData(std::ostream& rOStream) const
171  {
172  rOStream << "FrictionLaw Data";
173  }
174 
178 
179 
181 
182 protected:
185 
186 
190 
191 
195 
196 
200 
201  // Evaluate Hardening
202  virtual double EvaluateHardening( const double& rNormalStress, const double& rPlasticSlip, FrictionLawVariables& rTangentVariables) { return 0; };
203 
204  // Evaluate Contact Yield Surface
205  virtual double EvaluateContactYield( const double& rTangentStress, const double& rNormalStress, const double& rPlasticSlip, FrictionLawVariables& rTangentVariables ) { return 0; };
206 
207  // Evaluate Contact Yield Surface Stress Derivative
208  virtual void EvaluateYieldDerivativeRespectStress( double& rdF_dt, double & rdF_dp, const double& rTangentStress, const double& rNormalStress, const double& Gamma, FrictionLawVariables& rTangentVariables ) {};
209 
213 
214 
218 
219 
223 
224 
226 
227 
228 private:
231 
232 
236 
237  double mPlasticSlip;
238  double mPlasticSlipNew;
239  double mDeltaPlasticSlip;
240 
244 
245 
249 
253 
254  friend class Serializer;
255 
256  virtual void save( Serializer& rSerializer ) const
257  {
258  rSerializer.save("mPlasticSlip",mPlasticSlip);
259  rSerializer.save("mPlasticSlipNew",mPlasticSlipNew);
260  rSerializer.save("mDeltaPlasticSlip",mDeltaPlasticSlip);
261  }
262 
263  virtual void load( Serializer& rSerializer )
264  {
265  rSerializer.load("mPlasticSlip",mPlasticSlip);
266  rSerializer.load("mPlasticSlipNew",mPlasticSlipNew);
267  rSerializer.load("mDeltaPlasticSlip",mDeltaPlasticSlip);
268  }
269 
273 
274 
278 
279 
283 
285  //FrictionLaw& operator=(FrictionLaw const& rOther);
286 
288 
289 public:
290 
294 
295 }; // Class FrictionLaw
296 
298 
301 
305 
306 
308 inline std::istream& operator >> (std::istream& rIStream,
309  FrictionLaw& rThis)
310 {
311  return rIStream;
312 }
313 
315 inline std::ostream& operator << (std::ostream& rOStream,
316  const FrictionLaw& rThis)
317 {
318  return rOStream << rThis.Info();
319 }
321 
323 
324 } // namespace Kratos
325 
326 #endif // KRATOS_FRICTION_LAW_H_INCLUDED defined
#define DECLARE_ADD_THIS_TYPE_TO_PROPERTIES
Definition: properties_extensions.hpp:14
#define DECLARE_GET_THIS_TYPE_FROM_PROPERTIES
Definition: properties_extensions.hpp:29
Short class definition.
Definition: friction_law.hpp:52
virtual void EvaluateYieldDerivativeRespectStress(double &rdF_dt, double &rdF_dp, const double &rTangentStress, const double &rNormalStress, const double &Gamma, FrictionLawVariables &rTangentVariables)
Definition: friction_law.hpp:208
virtual FrictionLaw::Pointer Clone() const
Definition: friction_law.hpp:114
FrictionLaw()
Default constructor.
Definition: friction_law.hpp:93
virtual double EvaluateContactYield(const double &rTangentStress, const double &rNormalStress, const double &rPlasticSlip, FrictionLawVariables &rTangentVariables)
Definition: friction_law.hpp:205
virtual std::string Info() const
Turn back information as a string.
Definition: friction_law.hpp:156
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: friction_law.hpp:170
double GetPlasticSlip()
Definition: friction_law.hpp:139
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: friction_law.hpp:164
KRATOS_CLASS_POINTER_DEFINITION(FrictionLaw)
Pointer definition of FrictionLaw.
virtual double EvaluateHardening(const double &rNormalStress, const double &rPlasticSlip, FrictionLawVariables &rTangentVariables)
Definition: friction_law.hpp:202
FrictionLaw(FrictionLaw const &rOther)
Copy constructor.
Definition: friction_law.hpp:101
virtual ~FrictionLaw()
Destructor.
Definition: friction_law.hpp:108
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
void load(std::string const &rTag, TDataType &rObject)
Definition: serializer.h:207
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
#define DECLARE_HAS_THIS_TYPE_PROPERTIES
Definition: contact_properties_extensions.hpp:14
void InitializeSolutionStep(ConstructionUtility &rThisUtil, std::string ThermalSubModelPartName, std::string MechanicalSubModelPartName, std::string HeatFluxSubModelPartName, std::string HydraulicPressureSubModelPartName, bool thermal_conditions, bool mechanical_conditions, int phase)
Definition: add_custom_utilities_to_python.cpp:45
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
def load(f)
Definition: ode_solve.py:307
def Gamma(n, j)
Definition: quadrature.py:146
Definition: friction_law.hpp:58
FrictionLawVariables()
Definition: friction_law.hpp:72
double PlasticSlipOld
Definition: friction_law.hpp:66
double Adhesion
Definition: friction_law.hpp:68
double PlasticSlip
Definition: friction_law.hpp:67
double Alpha
Definition: friction_law.hpp:61
double TangentPenalty
Definition: friction_law.hpp:64
double FrictionCoefficient
Definition: friction_law.hpp:60
void Initialize(const double &rTangentPenalty, double PS, double &rArea, bool rImplex=false)
Definition: friction_law.hpp:74
double Area
Definition: friction_law.hpp:62
bool Implex
Definition: friction_law.hpp:70