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_beam_constitutive_law.h
Go to the documentation of this file.
1 
2 #if !defined(DEM_BEAM_CONSTITUTIVE_LAW_H_INCLUDED)
3 #define DEM_BEAM_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; //forward declaration
20  class SphericContinuumParticle; // forward declaration of spheric cont particle
21 
22  class KRATOS_API(DEM_APPLICATION) DEMBeamConstitutiveLaw : public Flags {
23 
24  public:
25 
27 
29 
30  virtual void Initialize(SphericContinuumParticle* element1, SphericContinuumParticle* element2, Properties::Pointer pProps);
31 
32  virtual void SetConstitutiveLawInProperties(Properties::Pointer pProp, bool verbose = true);
33 
34  virtual void SetConstitutiveLawInPropertiesWithParameters(Properties::Pointer pProp, const Parameters& parameters, bool verbose = true);
35 
36  virtual void Check(Properties::Pointer pProp) const;
37 
38  virtual std::string GetTypeOfLaw();
39 
40  virtual ~DEMBeamConstitutiveLaw();
41 
42  virtual DEMBeamConstitutiveLaw::Pointer Clone() const;
43 
44  virtual void CalculateElasticConstants(double& kn_el,
45  double& kt_el_0,
46  double& kt_el_1,
47  double initial_dist,
48  double equiv_young,
49  double equiv_poisson,
50  double calculation_area,
51  SphericContinuumParticle* element1,
52  SphericContinuumParticle* element2, double indentation);
53 
54  virtual void CalculateViscoDampingCoeff(double& equiv_visco_damp_coeff_normal,
55  double& equiv_visco_damp_coeff_tangential_0,
56  double& equiv_visco_damp_coeff_tangential_1,
57  SphericContinuumParticle* element1,
58  SphericContinuumParticle* element2,
59  const double kn_el,
60  const double kt_el_0,
61  const double kt_el_1);
62 
63  virtual void CalculateForces(const ProcessInfo& r_process_info,
64  double OldLocalElasticContactForce[3],
65  double LocalElasticContactForce[3],
66  double LocalElasticExtraContactForce[3],
67  double LocalCoordSystem[3][3],
68  double LocalDeltDisp[3],
69  const double kn_el,
70  const double kt_el_0,
71  const double kt_el_1,
72  double& contact_sigma,
73  double& contact_tau,
74  double& failure_criterion_state,
75  double equiv_young,
76  double equiv_shear,
77  double indentation,
78  double calculation_area,
79  double& acumulated_damage,
80  SphericContinuumParticle* element1,
81  SphericContinuumParticle* element2,
82  int i_neighbour_count,
83  int time_steps,
84  bool& sliding,
85  double& equiv_visco_damp_coeff_normal,
86  double& equiv_visco_damp_coeff_tangential_0,
87  double& equiv_visco_damp_coeff_tangential_1,
88  double LocalRelVel[3],
89  double ViscoDampingLocalContactForce[3]);
90 
91  virtual void CalculateNormalForces(double LocalElasticContactForce[3],
92  const double kn_el,
93  double indentation);
94 
95  virtual void CalculateTangentialForces(double OldLocalElasticContactForce[3],
96  double LocalElasticContactForce[3],
97  double LocalDeltDisp[3],
98  double LocalRelVel[3],
99  const double kt_el_0,
100  const double kt_el_1);
101 
102  virtual void CalculateViscoDamping(double LocalRelVel[3],
103  double ViscoDampingLocalContactForce[3],
104  double equiv_visco_damp_coeff_normal,
105  double equiv_visco_damp_coeff_tangential_0,
106  double equiv_visco_damp_coeff_tangential_1);
107 
108  virtual void CalculateMoments(SphericContinuumParticle* element,
109  SphericContinuumParticle* neighbor,
110  double equiv_young,
111  double distance,
112  double calculation_area,
113  double LocalCoordSystem[3][3],
114  double ElasticLocalRotationalMoment[3],
115  double ViscoLocalRotationalMoment[3],
116  double equiv_poisson,
117  double indentation,
118  double LocalElasticContactForce[3],
119  double normalLocalContactForce,
120  double GlobalElasticContactForces[3],
121  double LocalCoordSystem_2[3],
122  const int i_neighbor_count);
123 
124  virtual void ComputeParticleRotationalMoments(SphericContinuumParticle* element,
125  SphericContinuumParticle* neighbor,
126  double equiv_young,
127  double distance,
128  double calculation_area,
129  double LocalCoordSystem[3][3],
130  double ElasticLocalRotationalMoment[3],
131  double ViscoLocalRotationalMoment[3],
132  double equiv_poisson,
133  double indentation,
134  double LocalElasticContactForce[3]);
135 
136  virtual bool CheckRequirementsOfStressTensor();
137 
138  protected:
139 
140  Properties::Pointer mpProperties;
141 
142  private:
143 
144  friend class Serializer;
145 
146  virtual void save(Serializer& rSerializer) const override {
148  //rSerializer.save("MyMemberName",myMember);
149  }
150 
151  virtual void load(Serializer& rSerializer) override {
153  //rSerializer.load("MyMemberName",myMember);
154  }
155  };
156 
157  //This definition is done here to avoid recursive inclusion of header files
158  KRATOS_DEFINE_APPLICATION_VARIABLE(DEM_APPLICATION, DEMBeamConstitutiveLaw::Pointer, DEM_BEAM_CONSTITUTIVE_LAW_POINTER)
159 
160 } /* namespace Kratos.*/
161 #endif /* DEM_BEAM_CONSTITUTIVE_LAW_H_INCLUDED defined */
162 
Definition: DEM_beam_constitutive_law.h:22
Properties::Pointer mpProperties
Definition: DEM_beam_constitutive_law.h:140
KRATOS_CLASS_POINTER_DEFINITION(DEMBeamConstitutiveLaw)
Definition: flags.h:58
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
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_continuum_particle.h:26
#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)
parameters
Definition: fluid_chimera_analysis.py:35
def load(f)
Definition: ode_solve.py:307
Definition: mesh_converter.cpp:33