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_discontinuum_constitutive_law.h
Go to the documentation of this file.
1 
2 #if !defined(DEM_DISCONTINUUM_CONSTITUTIVE_LAW_H_INCLUDED)
3 #define DEM_DISCONTINUUM_CONSTITUTIVE_LAW_H_INCLUDED
4 
5 /* Project includes */
6 #include "includes/define.h"
7 #include "custom_utilities/AuxiliaryFunctions.h"
8 #include "includes/serializer.h"
9 #include "containers/flags.h"
10 
14 #include "containers/array_1d.h"
15 
16 
17 namespace Kratos {
18 
19  class Properties;
20  class SphericParticle; // forward declaration of spheric cont particle
21 
22  class KRATOS_API(DEM_APPLICATION) DEMDiscontinuumConstitutiveLaw : public Flags {
23  public:
24 
25  double mKn;
26  double mKt;
27 
29 
31 
32  DEMDiscontinuumConstitutiveLaw(const DEMDiscontinuumConstitutiveLaw &rReferenceDiscontinuumConstitutiveLaw);
33 
34  virtual void SetConstitutiveLawInProperties(Properties::Pointer pProp, bool verbose = true);
35 
36  virtual void Check(Properties::Pointer pProp) const;
37 
39 
40  virtual DEMDiscontinuumConstitutiveLaw::Pointer Clone() const;
41 
42  virtual std::unique_ptr<DEMDiscontinuumConstitutiveLaw> CloneUnique();
43 
44  virtual std::string GetTypeOfLaw();
45 
46  virtual void InitializeContact(SphericParticle * const element1, SphericParticle * const element2, const double ini_delta = 0.0);
47 
48  virtual void InitializeContactWithFEM(SphericParticle* const element, Condition* const wall, const double indentation, const double ini_delta = 0.0);
49 
50  virtual void CalculateForces(const ProcessInfo& r_process_info,
51  const double OldLocalContactForce[3],
52  double LocalElasticContactForce[3],
53  double LocalDeltDisp[3],
54  double LocalRelVel[3],
55  double indentation,
56  double previous_indentation,
57  double ViscoDampingLocalContactForce[3],
58  double& cohesive_force,
59  SphericParticle* element1,
60  SphericParticle* element2,
61  bool& sliding,
62  double LocalCoordSystem[3][3]);
63 
64  virtual void CalculateForcesWithFEM(const ProcessInfo& r_process_info,
65  const double OldLocalContactForce[3],
66  double LocalElasticContactForce[3],
67  double LocalDeltDisp[3],
68  double LocalRelVel[3],
69  double indentation,
70  double previous_indentation,
71  double ViscoDampingLocalContactForce[3],
72  double& cohesive_force,
73  SphericParticle* const element,
74  Condition* const wall,
75  bool& sliding);
76 
77  virtual double CalculateNormalForce(const double indentation);
78  virtual double CalculateNormalForce(SphericParticle* const element1, SphericParticle* const element2, const double indentation, double LocalCoordSystem[3][3]);
79  virtual double CalculateNormalForce(SphericParticle* const element, Condition* const wall, const double indentation);
80 
81  virtual double CalculateCohesiveNormalForce(SphericParticle * const element1, SphericParticle * const element2, const double indentation);
82  virtual double CalculateCohesiveNormalForceWithFEM(SphericParticle* const element, Condition* const wall, const double indentation);
83 
84  private:
85 
86  friend class Serializer;
87 
88  virtual void save(Serializer& rSerializer) const override {
90  //rSerializer.save("MyMemberName",myMember);
91  }
92 
93  virtual void load(Serializer& rSerializer) override {
95  //rSerializer.load("MyMemberName",myMember);
96  }
97  };
98 
99  //This definition is done here to avoid recursive inclusion of header files
100  KRATOS_DEFINE_APPLICATION_VARIABLE(DEM_APPLICATION, DEMDiscontinuumConstitutiveLaw::Pointer, DEM_DISCONTINUUM_CONSTITUTIVE_LAW_POINTER)
101 
102 } /* namespace Kratos.*/
103 #endif /* DEM_CONSTITUTIVE_LAW_H_INCLUDED defined */
104 
Base class for all Conditions.
Definition: condition.h:59
Definition: DEM_discontinuum_constitutive_law.h:22
double mKt
Definition: DEM_discontinuum_constitutive_law.h:26
KRATOS_CLASS_POINTER_DEFINITION(DEMDiscontinuumConstitutiveLaw)
double mKn
Definition: DEM_discontinuum_constitutive_law.h:25
Definition: flags.h:58
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
KRATOS_DEFINE_APPLICATION_VARIABLE(CHIMERA_APPLICATION, double, CHIMERA_DISTANCE)
def load(f)
Definition: ode_solve.py:307
Definition: mesh_converter.cpp:33