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_rolling_friction_model.h
Go to the documentation of this file.
1 // Kratos Multi-Physics - DEM Application
2 //
3 // License: BSD License
4 // Kratos default license: kratos/license.txt
5 //
6 // Main authors: Chengshun Shang (cshang@cimne.upc.edu)
7 //
8 
9 #if !defined(DEM_ROLLING_FRICTION_MODEL_H_INCLUDED)
10 #define DEM_ROLLING_FRICTION_MODEL_H_INCLUDED
11 
12 // System includes
13 #include <string>
14 #include <iostream>
15 
16 /* Project includes */
17 #include "includes/define.h"
18 #include "custom_utilities/AuxiliaryFunctions.h"
19 #include "includes/serializer.h"
23 #include "containers/array_1d.h"
26 
27 namespace Kratos{
28 
29  class Properties;
30  class SphericParticle; // forward declaration of spheric cont particle
31 
32  class KRATOS_API(DEM_APPLICATION) DEMRollingFrictionModel {
33  public:
34 
36 
38 
40  return true;
41  }
42 
43  virtual void SetAPrototypeOfThisInProperties(Properties::Pointer pProp, bool verbose = true);
44 
45  virtual void Check(Properties::Pointer pProp) const;
46 
47  virtual ~DEMRollingFrictionModel();
48 
49  virtual DEMRollingFrictionModel::Pointer Clone() const;
50 
51  virtual std::unique_ptr<DEMRollingFrictionModel> CloneUnique();
52 
53  virtual void InitializeSolutionStep() {}
54 
55  virtual void ComputeRollingFriction(SphericParticle* p_element, SphericParticle* p_neighbor, const ProcessInfo& r_process_info, double LocalContactForce[3], double indentation, array_1d<double, 3>& mContactMoment) {}
56 
57  virtual void ComputeRollingFrictionWithWall(SphericParticle* p_element, Condition* const wall, const ProcessInfo& r_process_info, double LocalContactForce[3], double indentation, array_1d<double, 3>& mContactMoment) {}
58 
59  virtual void ComputeRollingResistance(SphericParticle* p_element, SphericParticle* p_neighbor, double LocalContactForce[3]) {}
60 
61  virtual void ComputeRollingResistanceWithWall(SphericParticle* p_element, Condition* const wall, double LocalContactForce[3]) {}
62 
63  virtual void DoFinalOperations(SphericParticle* p_element, double dt, array_1d<double, 3>& mContactMoment) {}
64 
65  virtual void CalculateInelasticRollingResistanceEnergy(double& inelastic_rollingresistance_energy, const array_1d<double, 3>& rolling_friction_moment, const array_1d<double, 3>& relative_angular_velocity, double dt) {}
66 
67  virtual void CalculateInelasticRollingResistanceEnergyWithWall(double& inelastic_rollingresistance_energy, const array_1d<double, 3>& rolling_friction_moment, const array_1d<double, 3>& relative_angular_velocity, double dt) {}
68 
69  private:
70 
71  friend class Serializer;
72 
73  virtual void save(Serializer& rSerializer) const {
74  //rSerializer.save("MyMemberName",myMember);
75  }
76 
77  virtual void load(Serializer& rSerializer) {
78  //rSerializer.load("MyMemberName",myMember);
79  }
80  };
81 
82  //This definition is done here to avoid recursive inclusion of header files
83  KRATOS_DEFINE_APPLICATION_VARIABLE(DEM_APPLICATION, DEMRollingFrictionModel::Pointer, DEM_ROLLING_FRICTION_MODEL_POINTER)
84 
85 } /* namespace Kratos.*/
86 
87 #endif /*DEM_ROLLING_FRICTION_MODEL_H_INCLUDED defined*/
Base class for all Conditions.
Definition: condition.h:59
Definition: DEM_rolling_friction_model.h:32
virtual void CalculateInelasticRollingResistanceEnergy(double &inelastic_rollingresistance_energy, const array_1d< double, 3 > &rolling_friction_moment, const array_1d< double, 3 > &relative_angular_velocity, double dt)
Definition: DEM_rolling_friction_model.h:65
virtual void DoFinalOperations(SphericParticle *p_element, double dt, array_1d< double, 3 > &mContactMoment)
Definition: DEM_rolling_friction_model.h:63
virtual bool CheckIfThisModelRequiresRecloningForEachNeighbour()
Definition: DEM_rolling_friction_model.h:39
virtual void InitializeSolutionStep()
Definition: DEM_rolling_friction_model.h:53
virtual void ComputeRollingFrictionWithWall(SphericParticle *p_element, Condition *const wall, const ProcessInfo &r_process_info, double LocalContactForce[3], double indentation, array_1d< double, 3 > &mContactMoment)
Definition: DEM_rolling_friction_model.h:57
virtual void ComputeRollingResistance(SphericParticle *p_element, SphericParticle *p_neighbor, double LocalContactForce[3])
Definition: DEM_rolling_friction_model.h:59
virtual void CalculateInelasticRollingResistanceEnergyWithWall(double &inelastic_rollingresistance_energy, const array_1d< double, 3 > &rolling_friction_moment, const array_1d< double, 3 > &relative_angular_velocity, double dt)
Definition: DEM_rolling_friction_model.h:67
virtual void ComputeRollingFriction(SphericParticle *p_element, SphericParticle *p_neighbor, const ProcessInfo &r_process_info, double LocalContactForce[3], double indentation, array_1d< double, 3 > &mContactMoment)
Definition: DEM_rolling_friction_model.h:55
KRATOS_CLASS_POINTER_DEFINITION(DEMRollingFrictionModel)
virtual void ComputeRollingResistanceWithWall(SphericParticle *p_element, Condition *const wall, double LocalContactForce[3])
Definition: DEM_rolling_friction_model.h:61
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
dt
Definition: DEM_benchmarks.py:173
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