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.
dem_contact.h
Go to the documentation of this file.
1 #if !defined(DEM_CONTACT_H_INCLUDED)
2 #define DEM_CONTACT_H_INCLUDED
3 
4 /* Project includes */
5 #include "includes/define.h"
7 
8 
9 namespace Kratos {
10 
11  class DemContact {
12 
13  //class Properties; //forward declaration
14  //class SphericContinuumParticle; // forward declaration of spheric cont particle
15  //class SphericParticle;
16  //class DEMFlags;
17 
18  public:
19 
21 
23 
24  virtual ~DemContact();
25 
26  static void ComputeParticleContactMoments(double NormalLocalContactForce,
27  double Force[3],
28  double LocalCoordSystem2[3],
29  SphericParticle* p_element,
30  SphericParticle* p_neighbour,
31  double indentation,
32  unsigned int i)
33  {
34  double arm_length = p_element->GetInteractionRadius() - indentation;
35 
36  const double other_young = p_neighbour->GetYoung();
37  arm_length = p_element->GetInteractionRadius() - indentation * other_young / (other_young + p_element->GetYoung());
38 
39  array_1d<double, 3> arm_vector;
40  arm_vector[0] = -LocalCoordSystem2[0] * arm_length;
41  arm_vector[1] = -LocalCoordSystem2[1] * arm_length;
42  arm_vector[2] = -LocalCoordSystem2[2] * arm_length;
43 
44  array_1d<double, 3> moment_of_this_neighbour;
45  GeometryFunctions::CrossProduct(arm_vector, Force, moment_of_this_neighbour);
46  noalias(p_element->mContactMoment) += moment_of_this_neighbour;
47 
48  }
49 
50  };
51 
52 } /* namespace Kratos.*/
53 #endif /* DEM_CONTACT_H_INCLUDED defined */
Definition: dem_contact.h:11
KRATOS_CLASS_POINTER_DEFINITION(DemContact)
virtual ~DemContact()
static void ComputeParticleContactMoments(double NormalLocalContactForce, double Force[3], double LocalCoordSystem2[3], SphericParticle *p_element, SphericParticle *p_neighbour, double indentation, unsigned int i)
Definition: dem_contact.h:26
Definition: spheric_particle.h:31
virtual double GetYoung()
Definition: spheric_particle.cpp:2212
virtual double GetInteractionRadius(const int radius_index=0)
Definition: spheric_particle.cpp:2199
array_1d< double, 3 > mContactMoment
Definition: spheric_particle.h:264
static void CrossProduct(const double u[3], const double v[3], double ReturnVector[3])
Definition: GeometryFunctions.h:325
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
integer i
Definition: TensorModule.f:17