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.
rigid_body_point_rigid_contact_condition.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_RIGID_BODY_POINT_RIGID_CONTACT_CONDITION_H_INCLUDED )
11 #define KRATOS_RIGID_BODY_POINT_RIGID_CONTACT_CONDITION_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
19 
20 namespace Kratos
21 {
36 
38 
43 class KRATOS_API(CONTACT_MECHANICS_APPLICATION) RigidBodyPointRigidContactCondition
45 {
46 public:
47 
49 
51  //typedef BoundedVector<double, 3> PointType;
53 
55  // Counted pointer of RigidBodyPointRigidContactCondition
58 
61 
63  RigidBodyPointRigidContactCondition( IndexType NewId, GeometryType::Pointer pGeometry );
64 
65  RigidBodyPointRigidContactCondition( IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties );
66 
67  RigidBodyPointRigidContactCondition( IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties, SpatialBoundingBox::Pointer pRigidWall );
68 
71 
74 
78 
79 
83 
91  Condition::Pointer Create(IndexType NewId,
92  NodesArrayType const& ThisNodes,
93  PropertiesType::Pointer pProperties ) const override;
94 
95 
103  Condition::Pointer Clone(IndexType NewId,
104  NodesArrayType const& ThisNodes) const override;
105 
106 
107  //************* GETTING METHODS
108 
112  void GetDofList(DofsVectorType& rConditionDofList,
113  const ProcessInfo& rCurrentProcessInfo ) const override;
114 
118  void EquationIdVector(EquationIdVectorType& rResult,
119  const ProcessInfo& rCurrentProcessInfo ) const override;
120 
124  void GetValuesVector(Vector& rValues,
125  int Step = 0 ) const override;
126 
130  void GetFirstDerivativesVector(Vector& rValues,
131  int Step = 0 ) const override;
132 
136  void GetSecondDerivativesVector(Vector& rValues,
137  int Step = 0 ) const override;
138 
139 
149  void AddExplicitContribution(const VectorType& rRHSVector,
150  const Variable<VectorType>& rRHSVariable,
151  const Variable<array_1d<double,3> >& rDestinationVariable,
152  const ProcessInfo& rCurrentProcessInfo) override;
153 
154  //************************************************************************************
155  //************************************************************************************
163  int Check( const ProcessInfo& rCurrentProcessInfo ) const override;
164 
178 
179 protected:
186 
187 
191  SpatialBoundingBox::Pointer mpRigidWall;
192 
193 
200 
201 
206  void InitializeSystemMatrices(MatrixType& rLeftHandSideMatrix,
207  VectorType& rRightHandSideVector,
208  Flags& rCalculationFlags) override;
209 
213  void CalculateKinematics(ConditionVariables& rVariables,
214  const ProcessInfo& rCurrentProcessInfo,
215  const double& rPointNumber) override;
216 
217 
221  void CalculateAndAddKuug(MatrixType& rLeftHandSideMatrix,
222  ConditionVariables& rVariables,
223  double& rIntegrationWeight) override;
224 
225  virtual void CalculateAndAddKuugTangent(MatrixType& rLeftHandSideMatrix,
226  ConditionVariables& rVariables,
227  double& rIntegrationWeight);
228 
232  void CalculateAndAddContactForces(Vector& rRightHandSideVector,
233  ConditionVariables& rVariables,
234  double& rIntegrationWeight ) override;
235 
236 
237 
238  virtual void CalculateAndAddNormalContactForce(Vector& rRightHandSideVector, ConditionVariables& rVariables, double& rIntegrationWeight);
239 
240 
241  virtual void CalculateAndAddTangentContactForce(Vector& rRightHandSideVector, ConditionVariables& rVariables, double& rIntegrationWeight);
242 
243 
244  double& CalculateNormalForceModulus( double& rNormalForceModulus, ConditionVariables& rVariables );
245 
246  double CalculateCoulombsFrictionLaw( double& rTangentForceModulus, double& rNormalForceModulus, ConditionVariables& rVariables );
247 
248  double CalculateFrictionCoefficient( const double& rTangentRelativeMovement, const double& rDeltaTime );
249 
250 
254  virtual void CalculateContactFactors(ConditionVariables &rContact);
255 
256 
260  void VectorToSkewSymmetricTensor( const Vector& rVector,
261  Matrix& rSkewSymmetricTensor );
262 
263 
267 
268 
272 
273 
277 
278 
280 
281 private:
284 
285 
289 
290  ElementWeakPtrVectorType mMasterElements;
291 
295 
296 
300 
301 
305 
306 
310 
314 
315  friend class Serializer;
316 
317  void save( Serializer& rSerializer ) const override
318  {
320  }
321 
322  void load( Serializer& rSerializer ) override
323  {
325  }
326 
327 
328 }; // class RigidBodyPointRigidContactCondition.
329 
330 } // namespace Kratos.
331 
332 #endif // KRATOS_RIGID_BODY_POINT_RIGID_CONTACT_CONDITION_H_INCLUDED defined
Base class for all Conditions.
Definition: condition.h:59
std::vector< std::size_t > EquationIdVectorType
Definition: condition.h:98
std::vector< DofType::Pointer > DofsVectorType
Definition: condition.h:100
Definition: flags.h:58
std::size_t IndexType
Definition: flags.h:74
Point Rigid Contact Condition for 3D and 2D geometries. (base class)
Definition: point_rigid_contact_condition.hpp:53
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Rigid Body Point Rigid Contact Condition for 3D and 2D geometries. (base class)
Definition: rigid_body_point_rigid_contact_condition.hpp:45
RigidBodyPointRigidContactCondition()
Definition: rigid_body_point_rigid_contact_condition.hpp:185
SpatialBoundingBox::Pointer mpRigidWall
Definition: rigid_body_point_rigid_contact_condition.hpp:185
array_1d< double, 3 > PointType
Tensor order 1 definition.
Definition: rigid_body_point_rigid_contact_condition.hpp:52
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(RigidBodyPointRigidContactCondition)
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307
Definition: point_rigid_contact_condition.hpp:100