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_D_Hertz_viscous_Coulomb_CL.h
Go to the documentation of this file.
1 //Authors: M.A. Celigueta and S. Latorre (CIMNE)
2 // Date: July 2015
3 
4 #if !defined(DEM_D_HERTZ_VISCOUS_COULOMB_CL_H_INCLUDED)
5 #define DEM_D_HERTZ_VISCOUS_COULOMB_CL_H_INCLUDED
6 
7 #include <string>
8 #include <iostream>
10 
11 namespace Kratos {
12 
13  class SphericParticle;
14 
15  class KRATOS_API(DEM_APPLICATION) DEM_D_Hertz_viscous_Coulomb : public DEMDiscontinuumConstitutiveLaw {
16 
17  public:
19 
21 
23 
25 
26  std::string GetTypeOfLaw() override;
27 
28  virtual void Check(Properties::Pointer pProp) const override;
29 
30  DEMDiscontinuumConstitutiveLaw::Pointer Clone() const override;
31 
32  std::unique_ptr<DEMDiscontinuumConstitutiveLaw> CloneUnique() override;
33 
34  void InitializeContact(SphericParticle* const element1, SphericParticle* const element2, const double indentation) override;
35 
36  void InitializeContactWithFEM(SphericParticle* const element, Condition* const wall, const double indentation, const double ini_delta = 0.0) override;
37 
38  void CalculateForces(const ProcessInfo& r_process_info,
39  const double OldLocalElasticContactForce[3],
40  double LocalElasticContactForce[3],
41  double LocalDeltDisp[3],
42  double LocalRelVel[3],
43  double indentation,
44  double previous_indentation,
45  double ViscoDampingLocalContactForce[3],
46  double& cohesive_force,
47  SphericParticle* element1,
48  SphericParticle* element2,
49  bool& sliding,
50  double LocalCoordSystem[3][3]) override;
51 
52  void CalculateForcesWithFEM(const ProcessInfo& r_process_info,
53  const double OldLocalElasticContactForce[3],
54  double LocalElasticContactForce[3],
55  double LocalDeltDisp[3],
56  double LocalRelVel[3],
57  double indentation,
58  double previous_indentation,
59  double ViscoDampingLocalContactForce[3],
60  double& cohesive_force,
61  SphericParticle* const element,
62  Condition* const wall,
63  bool& sliding) override;
64 
65  double CalculateNormalForce(const double indentation) override;
66 
67  double CalculateNormalForce(SphericParticle* const element1,
68  SphericParticle* const element2,
69  const double indentation,
70  double LocalCoordSystem[3][3]) override;
71 
72  double CalculateNormalForce(SphericParticle* const element,
73  Condition* const wall,
74  const double indentation) override;
75 
76  double CalculateCohesiveNormalForce(SphericParticle* const element1,
77  SphericParticle* const element2,
78  const double indentation) override;
79 
80  double CalculateCohesiveNormalForceWithFEM(SphericParticle* const element,
81  Condition* const wall,
82  const double indentation) override;
83 
84  template <class NeighbourClassType>
85  void CalculateTangentialForceWithNeighbour(const double normal_contact_force,
86  const double OldLocalElasticContactForce[3],
87  double LocalElasticContactForce[3],
88  double ViscoDampingLocalContactForce[3],
89  const double LocalDeltDisp[3],
90  const double LocalRelVel[3],
91  bool& sliding,
92  SphericParticle* const element,
93  NeighbourClassType* const neighbour,
94  double indentation,
95  double previous_indentation,
96  double& AuxElasticShearForce,
97  double& MaximumAdmisibleShearForce);
98 
99  void CalculateViscoDampingForce(double LocalRelVel[3],
100  double ViscoDampingLocalContactForce[3],
101  SphericParticle* const element1,
102  SphericParticle* const element2);
103 
104  void CalculateViscoDampingForceWithFEM(double LocalRelVel[3],
105  double ViscoDampingLocalContactForce[3],
106  SphericParticle* const element,
107  Condition* const wall);
108 
109  void CalculateElasticEnergyDEM(double& elastic_energy,
110  double indentation,
111  double LocalElasticContactForce[3]);
112 
113  void CalculateInelasticFrictionalEnergyDEM(double& inelastic_frictional_energy,
114  double& AuxElasticShearForce,
115  double LocalElasticContactForce[3]);
116 
117  void CalculateInelasticViscodampingEnergyDEM(double& inelastic_viscodamping_energy,
118  double ViscoDampingLocalContactForce[3],
119  double LocalDeltDisp[3]);
120 
121  void CalculateElasticEnergyFEM(double& elastic_energy,
122  double indentation,
123  double LocalElasticContactForce[3]);
124 
125  void CalculateInelasticFrictionalEnergyFEM(double& inelastic_frictional_energy,
126  double& AuxElasticShearForce,
127  double LocalElasticContactForce[3]);
128 
129  void CalculateInelasticViscodampingEnergyFEM(double& inelastic_viscodamping_energy,
130  double ViscoDampingLocalContactForce[3],
131  double LocalDeltDisp[3]);
132 
133  private:
134 
135  friend class Serializer;
136 
137  virtual void save(Serializer& rSerializer) const override {
139  //rSerializer.save("MyMemberName",myMember);
140  }
141 
142  virtual void load(Serializer& rSerializer) override {
144  //rSerializer.load("MyMemberName",myMember);
145  }
146 
147  }; //class DEM_D_Hertz_viscous_Coulomb
148 
149 } /* namespace Kratos.*/
150 #endif /* DEM_D_HERTZ_VISCOUS_COULOMB_CL_H_INCLUDED defined */
Base class for all Conditions.
Definition: condition.h:59
Definition: DEM_D_Hertz_viscous_Coulomb_CL.h:15
DEM_D_Hertz_viscous_Coulomb()
Definition: DEM_D_Hertz_viscous_Coulomb_CL.h:22
~DEM_D_Hertz_viscous_Coulomb()
Definition: DEM_D_Hertz_viscous_Coulomb_CL.h:24
KRATOS_CLASS_POINTER_DEFINITION(DEM_D_Hertz_viscous_Coulomb)
Definition: DEM_discontinuum_constitutive_law.h:22
virtual double CalculateNormalForce(const double indentation)
Definition: DEM_discontinuum_constitutive_law.cpp:81
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Definition: spheric_particle.h:31
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307
Definition: mesh_converter.cpp:33