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.
mohr_coulomb_plastic_potential.h
Go to the documentation of this file.
1 // KRATOS ___ _ _ _ _ _ __ _
2 // / __\___ _ __ ___| |_(_) |_ _ _| |_(_)_ _____ / / __ ___ _____ /_\ _ __ _ __
3 // / / / _ \| '_ \/ __| __| | __| | | | __| \ \ / / _ \/ / / _` \ \ /\ / / __| //_\\| '_ \| '_ |
4 // / /__| (_) | | | \__ \ |_| | |_| |_| | |_| |\ V / __/ /__| (_| |\ V V /\__ \/ _ \ |_) | |_) |
5 // \____/\___/|_| |_|___/\__|_|\__|\__,_|\__|_| \_/ \___\____/\__,_| \_/\_/ |___/\_/ \_/ .__/| .__/
6 // |_| |_|
7 //
8 // License: BSD License
9 // license: structural_mechanics_application/license.txt
10 //
11 // Main authors: Alejandro Cornejo
12 //
13 
14 #pragma once
15 
16 // System includes
17 
18 // Project includes
20 
21 namespace Kratos
22 {
25 
29 
30  // The size type definition
31  typedef std::size_t SizeType;
32 
36 
40 
44 
52 template <SizeType TVoigtSize = 6>
54 {
55 public:
58 
60  static constexpr SizeType Dimension = TVoigtSize == 6 ? 3 : 2;
61 
63  static constexpr SizeType VoigtSize = TVoigtSize;
64 
67 
69  static constexpr double tolerance = std::numeric_limits<double>::epsilon();
70 
74 
77  {
78  }
79 
82  {
83  }
84 
87  {
88  return *this;
89  }
90 
93 
97 
101 
114  const array_1d<double, VoigtSize>& rPredictiveStressVector,
115  const array_1d<double, VoigtSize>& rDeviator,
116  const double J2,
119  )
120  {
121  array_1d<double, VoigtSize> first_vector, second_vector, third_vector;
122  const Properties& r_material_properties = rValues.GetMaterialProperties();
123  const double dilatancy = r_material_properties[DILATANCY_ANGLE] * Globals::Pi / 180.0;
124 
128 
129  double J3, lode_angle;
132 
133  double c1, c3, c2;
134  double checker = std::abs(lode_angle * 180.0 / Globals::Pi);
135 
136  if (std::abs(checker) < 29.0) {
137  c1 = std::sin(dilatancy);
138  c3 = (std::sqrt(3.0) * std::sin(lode_angle) + std::sin(dilatancy) * std::cos(lode_angle)) /
139  (2.0 * J2 * std::cos(3.0 * lode_angle));
140  c2 = 0.5 * std::cos(lode_angle)*(1.0 + std::tan(lode_angle) * std::sin(3.0 * lode_angle) +
141  std::sin(dilatancy) * (std::tan(3.0 * lode_angle) - std::tan(lode_angle)) / std::sqrt(3.0));
142  } else { // smoothing with drucker-praguer
143  c1 = 3.0 * (2.0 * std::sin(dilatancy) / (std::sqrt(3.0) * (3.0 - std::sin(dilatancy))));
144  c2 = 1.0;
145  c3 = 0.0;
146  }
147 
148  noalias(rGFlux) = c1 * first_vector + c2 * second_vector + c3 * third_vector;
149  }
150 
155  static int Check(const Properties& rMaterialProperties)
156  {
157  return 0;
158  }
159 
163 
167 
171 
175 
177 
178 protected:
181 
185 
189 
193 
197 
201 
205 
207 
208 private:
211 
215 
219 
223 
227 
231 
235 
237 
238 }; // Class GenericYieldSurface
239 
241 
244 
248 
250 
251 } // namespace Kratos.
static void CalculateSecondVector(const BoundedVectorType &rDeviator, const double J2, BoundedVectorType &rSecondVector)
This method computes the first vector to be used in the derivative of the yield surface.
Definition: advanced_constitutive_law_utilities.cpp:100
static void CalculateFirstVector(BoundedVectorType &rFirstVector)
This method computes the first vector to be used in the derivative of the yield surface.
Definition: advanced_constitutive_law_utilities.cpp:80
static void CalculateThirdVector(const BoundedVectorType &rDeviator, const double J2, BoundedVectorType &rThirdVector)
This method computes the third vector to be used in the derivative of the yield surface.
Definition: advanced_constitutive_law_utilities.cpp:131
static void CalculateLodeAngle(const double J2, const double J3, double &rLodeAngle)
This method computes the lode angle.
Definition: advanced_constitutive_law_utilities.cpp:158
static void CalculateJ3Invariant(const BoundedVectorType &rDeviator, double &rJ3)
This method computes the third invariant of J.
Definition: advanced_constitutive_law_utilities.cpp:62
This class defines a plastic potential following the theory of Mohr-Coulomb.
Definition: mohr_coulomb_plastic_potential.h:54
static constexpr SizeType Dimension
We define the dimension.
Definition: mohr_coulomb_plastic_potential.h:60
static void CalculatePlasticPotentialDerivative(const array_1d< double, VoigtSize > &rPredictiveStressVector, const array_1d< double, VoigtSize > &rDeviator, const double J2, array_1d< double, VoigtSize > &rGFlux, ConstitutiveLaw::Parameters &rValues)
This script calculates the derivatives of the plastic potential according to NAYAK-ZIENKIEWICZ paper ...
Definition: mohr_coulomb_plastic_potential.h:113
MohrCoulombPlasticPotential()
Initialization constructor.
Definition: mohr_coulomb_plastic_potential.h:76
virtual ~MohrCoulombPlasticPotential()
Destructor.
Definition: mohr_coulomb_plastic_potential.h:92
static int Check(const Properties &rMaterialProperties)
This method defines the check to be performed in the plastic potential.
Definition: mohr_coulomb_plastic_potential.h:155
MohrCoulombPlasticPotential(MohrCoulombPlasticPotential const &rOther)
Copy constructor.
Definition: mohr_coulomb_plastic_potential.h:81
static constexpr SizeType VoigtSize
The define the Voigt size.
Definition: mohr_coulomb_plastic_potential.h:63
MohrCoulombPlasticPotential & operator=(MohrCoulombPlasticPotential const &rOther)
Assignment operator.
Definition: mohr_coulomb_plastic_potential.h:86
static constexpr double tolerance
The machine precision zero tolerance.
Definition: mohr_coulomb_plastic_potential.h:69
KRATOS_CLASS_POINTER_DEFINITION(MohrCoulombPlasticPotential)
Counted pointer of MohrCoulombPlasticPotential.
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
constexpr double Pi
Definition: global_variables.h:25
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::size_t SizeType
The definition of the size type.
Definition: mortar_classes.h:43
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
float J2
Definition: isotropic_damage_automatic_differentiation.py:133
def J3
Definition: isotropic_damage_automatic_differentiation.py:176
Definition: constitutive_law.h:189
const Properties & GetMaterialProperties()
Definition: constitutive_law.h:457