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.
drucker_prager_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 & Lucia Barbu
12 //
13 
14 #pragma once
15 
16 // System includes
17 
18 // Project includes
19 #include "includes/checks.h"
21 
22 namespace Kratos
23 {
26 
30 
31  // The size type definition
32  typedef std::size_t SizeType;
33 
37 
41 
45 
54 template <SizeType TVoigtSize = 6>
56 {
57  public:
60 
62  static constexpr SizeType Dimension = TVoigtSize == 6 ? 3 : 2;
63 
65  static constexpr SizeType VoigtSize = TVoigtSize;
66 
69 
73 
76  {
77  }
78 
81  {
82  }
83 
86  {
87  return *this;
88  }
89 
92 
96 
100 
113  const array_1d<double, VoigtSize>& rPredictiveStressVector,
114  const array_1d<double, VoigtSize>& rDeviator,
115  const double J2,
118  )
119  {
120  const Properties& r_material_properties = rValues.GetMaterialProperties();
121 
122  array_1d<double, VoigtSize> first_vector, second_vector, third_vector;
123 
126 
127  const double dilatancy = r_material_properties[DILATANCY_ANGLE] * Globals::Pi / 180.0;
128  const double sin_dil = std::sin(dilatancy);
129  const double Root3 = std::sqrt(3.0);
130 
131  const double CFL = -Root3 * (3.0 - sin_dil) / (3.0 * sin_dil - 3.0);
132  const double c1 = CFL * 2.0 * sin_dil / (Root3 * (3.0 - sin_dil));
133  const double c2 = CFL;
134 
135  noalias(rGFlux) = c1 * first_vector + c2 * second_vector;
136  }
137 
142  static int Check(const Properties& rMaterialProperties)
143  {
144  KRATOS_ERROR_IF_NOT(rMaterialProperties.Has(DILATANCY_ANGLE)) << "DILATANCY_ANGLE is not a defined value" << std::endl;
145 
146  return 0;
147  }
148 
152 
156 
160 
164 
166 
167  protected:
170 
174 
178 
182 
186 
190 
194 
196 
197  private:
200 
204 
208 
212 
216 
220 
224 
226 
227 }; // Class GenericYieldSurface
228 
230 
233 
237 
239 
240 } // 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
This class defines a plastic potential following the theory of Drucker-Prager.
Definition: drucker_prager_plastic_potential.h:56
DruckerPragerPlasticPotential()
Initialization constructor.
Definition: drucker_prager_plastic_potential.h:75
KRATOS_CLASS_POINTER_DEFINITION(DruckerPragerPlasticPotential)
Counted pointer of DruckerPragerPlasticPotential.
DruckerPragerPlasticPotential(DruckerPragerPlasticPotential const &rOther)
Copy constructor.
Definition: drucker_prager_plastic_potential.h:80
static constexpr SizeType Dimension
We define the dimension.
Definition: drucker_prager_plastic_potential.h:62
DruckerPragerPlasticPotential & operator=(DruckerPragerPlasticPotential const &rOther)
Assignment operator.
Definition: drucker_prager_plastic_potential.h:85
static int Check(const Properties &rMaterialProperties)
This method defines the check to be performed in the plastic potential.
Definition: drucker_prager_plastic_potential.h:142
virtual ~DruckerPragerPlasticPotential()
Destructor.
Definition: drucker_prager_plastic_potential.h:91
static constexpr SizeType VoigtSize
The define the Voigt size.
Definition: drucker_prager_plastic_potential.h:65
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: drucker_prager_plastic_potential.h:112
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
bool Has(TVariableType const &rThisVariable) const
Definition: properties.h:578
#define KRATOS_ERROR_IF_NOT(conditional)
Definition: exception.h:163
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
CFL
Definition: isotropic_damage_automatic_differentiation.py:156
Definition: constitutive_law.h:189
const Properties & GetMaterialProperties()
Definition: constitutive_law.h:457