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.
tresca_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
20 
21 namespace Kratos
22 {
25 
29 
30  // The size type definition
31  typedef std::size_t SizeType;
32 
36 
40 
44 
51 template <SizeType TVoigtSize = 6>
53 {
54  public:
57 
59  static constexpr SizeType Dimension = TVoigtSize == 6 ? 3 : 2;
60 
62  static constexpr SizeType VoigtSize = TVoigtSize;
63 
66 
70 
73  {
74  }
75 
78  {
79  }
80 
83  {
84  return *this;
85  }
86 
89 
93 
97 
110  const array_1d<double, VoigtSize>& rPredictiveStressVector,
111  const array_1d<double, VoigtSize>& rDeviator,
112  const double J2,
115  )
116  {
117  array_1d<double, VoigtSize> second_vector, third_vector;
118 
121 
122  double J3, lode_angle;
125 
126  const double checker = std::abs(lode_angle * 180.0 / Globals::Pi);
127 
128  double c2, c3;
129  if (checker < 29.0) {
130  c2 = 2.0 * (std::cos(lode_angle) + std::sin(lode_angle) * std::tan(3.0 * lode_angle));
131  c3 = std::sqrt(3.0) * std::sin(lode_angle) / (J2 * std::cos(3.0 * lode_angle));
132  } else {
133  c2 = std::sqrt(3.0);
134  c3 = 0.0;
135  }
136 
137  noalias(rGFlux) = c2 * second_vector + c3 * third_vector;
138  }
139 
144  static int Check(const Properties& rMaterialProperties)
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 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
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
This class defines a plastic potential following the theory of Tresca.
Definition: tresca_plastic_potential.h:53
KRATOS_CLASS_POINTER_DEFINITION(TrescaPlasticPotential)
Counted pointer of TrescaPlasticPotential.
virtual ~TrescaPlasticPotential()
Destructor.
Definition: tresca_plastic_potential.h:88
TrescaPlasticPotential()
Initialization constructor.
Definition: tresca_plastic_potential.h:72
static int Check(const Properties &rMaterialProperties)
This method defines the check to be performed in the plastic potential.
Definition: tresca_plastic_potential.h:144
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: tresca_plastic_potential.h:109
TrescaPlasticPotential(TrescaPlasticPotential const &rOther)
Copy constructor.
Definition: tresca_plastic_potential.h:77
static constexpr SizeType Dimension
We define the dimension.
Definition: tresca_plastic_potential.h:59
static constexpr SizeType VoigtSize
The define the Voigt size.
Definition: tresca_plastic_potential.h:62
TrescaPlasticPotential & operator=(TrescaPlasticPotential const &rOther)
Assignment operator.
Definition: tresca_plastic_potential.h:82
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