4 #if !defined(DEM_D_LINEAR_VISCOUS_COULOMB_CL_H_INCLUDED)
5 #define DEM_D_LINEAR_VISCOUS_COULOMB_CL_H_INCLUDED
13 class SphericParticle;
27 std::string GetTypeOfLaw()
override;
29 void Check(Properties::Pointer pProp)
const override;
31 DEMDiscontinuumConstitutiveLaw::Pointer Clone()
const override;
33 std::unique_ptr<DEMDiscontinuumConstitutiveLaw> CloneUnique()
override;
39 void CalculateForces(
const ProcessInfo& r_process_info,
40 const double OldLocalElasticContactForce[3],
41 double LocalElasticContactForce[3],
42 double LocalDeltDisp[3],
43 double LocalRelVel[3],
45 double previous_indentation,
46 double ViscoDampingLocalContactForce[3],
47 double& cohesive_force,
50 bool& sliding,
double LocalCoordSystem[3][3])
override;
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],
58 double previous_indentation,
59 double ViscoDampingLocalContactForce[3],
60 double& cohesive_force,
63 bool& sliding)
override;
68 const double indentation,
69 double LocalCoordSystem[3][3])
override;
73 const double indentation)
override;
75 double CalculateNormalForce(
const double indentation)
override;
79 const double indentation)
override;
83 const double indentation)
override;
88 template <
class NeighbourClassType>
90 const double OldLocalElasticContactForce[3],
91 double LocalElasticContactForce[3],
92 double ViscoDampingLocalContactForce[3],
93 const double LocalDeltDisp[3],
94 const double LocalRelVel[3],
97 NeighbourClassType*
const neighbour,
99 double previous_indentation,
100 double& modulus_of_elastic_shear_force,
101 double& maximum_admissible_shear_force){
103 LocalElasticContactForce[0] = OldLocalElasticContactForce[0] - mKt * LocalDeltDisp[0];
104 LocalElasticContactForce[1] = OldLocalElasticContactForce[1] - mKt * LocalDeltDisp[1];
106 modulus_of_elastic_shear_force = sqrt(LocalElasticContactForce[0] * LocalElasticContactForce[0] + LocalElasticContactForce[1] * LocalElasticContactForce[1]);
108 Properties& properties_of_this_contact = GetPropertiesOfThisContact(
element, neighbour);
109 const double equiv_tg_of_static_fri_ang = properties_of_this_contact[STATIC_FRICTION];
110 const double equiv_tg_of_dynamic_fri_ang = properties_of_this_contact[DYNAMIC_FRICTION];
111 const double equiv_friction_decay_coefficient = properties_of_this_contact[FRICTION_DECAY];
113 const double ShearRelVel = sqrt(LocalRelVel[0] * LocalRelVel[0] + LocalRelVel[1] * LocalRelVel[1]);
114 double equiv_friction = equiv_tg_of_dynamic_fri_ang + (equiv_tg_of_static_fri_ang - equiv_tg_of_dynamic_fri_ang) * exp(-equiv_friction_decay_coefficient * ShearRelVel);
116 maximum_admissible_shear_force = normal_contact_force * equiv_friction;
118 const double tangential_contact_force_0 = LocalElasticContactForce[0] + ViscoDampingLocalContactForce[0];
119 const double tangential_contact_force_1 = LocalElasticContactForce[1] + ViscoDampingLocalContactForce[1];
121 const double ActualTotalShearForce = sqrt(tangential_contact_force_0 * tangential_contact_force_0 + tangential_contact_force_1 * tangential_contact_force_1);
123 if (ActualTotalShearForce > maximum_admissible_shear_force) {
125 const double ActualElasticShearForce = sqrt(LocalElasticContactForce[0] * LocalElasticContactForce[0] + LocalElasticContactForce[1] * LocalElasticContactForce[1]);
127 const double dot_product = LocalElasticContactForce[0] * ViscoDampingLocalContactForce[0] + LocalElasticContactForce[1] * ViscoDampingLocalContactForce[1];
128 const double ViscoDampingLocalContactForceModule = sqrt(ViscoDampingLocalContactForce[0] * ViscoDampingLocalContactForce[0] +\
129 ViscoDampingLocalContactForce[1] * ViscoDampingLocalContactForce[1]);
131 if (dot_product >= 0.0) {
133 if (ActualElasticShearForce > maximum_admissible_shear_force) {
134 const double fraction = maximum_admissible_shear_force / ActualElasticShearForce;
135 LocalElasticContactForce[0] = LocalElasticContactForce[0] *
fraction;
136 LocalElasticContactForce[1] = LocalElasticContactForce[1] *
fraction;
137 ViscoDampingLocalContactForce[0] = 0.0;
138 ViscoDampingLocalContactForce[1] = 0.0;
141 const double ActualViscousShearForce = maximum_admissible_shear_force - ActualElasticShearForce;
142 const double fraction = ActualViscousShearForce / ViscoDampingLocalContactForceModule;
143 ViscoDampingLocalContactForce[0] *=
fraction;
144 ViscoDampingLocalContactForce[1] *=
fraction;
148 if (ViscoDampingLocalContactForceModule >= ActualElasticShearForce) {
149 const double fraction = (maximum_admissible_shear_force + ActualElasticShearForce) / ViscoDampingLocalContactForceModule;
150 ViscoDampingLocalContactForce[0] *=
fraction;
151 ViscoDampingLocalContactForce[1] *=
fraction;
154 const double fraction = maximum_admissible_shear_force / ActualElasticShearForce;
155 LocalElasticContactForce[0] = LocalElasticContactForce[0] *
fraction;
156 LocalElasticContactForce[1] = LocalElasticContactForce[1] *
fraction;
157 ViscoDampingLocalContactForce[0] = 0.0;
158 ViscoDampingLocalContactForce[1] = 0.0;
165 void CalculateViscoDampingForce(
double LocalRelVel[3],
166 double ViscoDampingLocalContactForce[3],
170 void CalculateViscoDampingForceWithFEM(
double LocalRelVel[3],
171 double ViscoDampingLocalContactForce[3],
175 void CalculateElasticEnergyDEM(
double& elastic_energy,
177 double LocalElasticContactForce[3]);
179 void CalculateInelasticFrictionalEnergyDEM(
double& inelastic_frictional_energy,
180 double& AuxElasticShearForce,
181 double LocalElasticContactForce[3]);
183 void CalculateInelasticViscodampingEnergyDEM(
double& inelastic_viscodamping_energy,
184 double ViscoDampingLocalContactForce[3],
185 double LocalDeltDisp[3]);
187 void CalculateElasticEnergyFEM(
double& elastic_energy,
189 double LocalElasticContactForce[3]);
191 void CalculateInelasticFrictionalEnergyFEM(
double& inelastic_frictional_energy,
192 double& AuxElasticShearForce,
193 double LocalElasticContactForce[3]);
195 void CalculateInelasticViscodampingEnergyFEM(
double& inelastic_viscodamping_energy,
196 double ViscoDampingLocalContactForce[3],
197 double LocalDeltDisp[3]);
207 virtual void save(
Serializer& rSerializer)
const override {
Base class for all Conditions.
Definition: condition.h:59
Definition: DEM_D_Linear_viscous_Coulomb_CL.h:15
~DEM_D_Linear_viscous_Coulomb()
Definition: DEM_D_Linear_viscous_Coulomb_CL.h:25
KRATOS_CLASS_POINTER_DEFINITION(DEM_D_Linear_viscous_Coulomb)
DEM_D_Linear_viscous_Coulomb()
Definition: DEM_D_Linear_viscous_Coulomb_CL.h:23
void CalculateTangentialForceWithNeighbour(const double normal_contact_force, const double OldLocalElasticContactForce[3], double LocalElasticContactForce[3], double ViscoDampingLocalContactForce[3], const double LocalDeltDisp[3], const double LocalRelVel[3], bool &sliding, SphericParticle *const element, NeighbourClassType *const neighbour, double indentation, double previous_indentation, double &modulus_of_elastic_shear_force, double &maximum_admissible_shear_force)
Definition: DEM_D_Linear_viscous_Coulomb_CL.h:89
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
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
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
list fraction
Definition: angle_finder.py:11
def load(f)
Definition: ode_solve.py:307
Definition: mesh_converter.cpp:33