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.
generic_tension_cl_integrator.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
19 #include "includes/define.h"
20 #include "includes/checks.h"
21 #include "includes/serializer.h"
22 #include "includes/properties.h"
23 #include "utilities/math_utils.h"
25 
26 namespace Kratos
27 {
28 
31 
35 
36  // The size type definition
37  typedef std::size_t SizeType;
38 
42 
46 
50 
61 template <class TYieldSurfaceType>
63 {
64  public:
65 
68 
70  typedef TYieldSurfaceType YieldSurfaceType;
71 
73  static constexpr SizeType Dimension = YieldSurfaceType::Dimension;
74 
76  static constexpr SizeType VoigtSize = YieldSurfaceType::VoigtSize;
77 
79  typedef typename YieldSurfaceType::PlasticPotentialType PlasticPotentialType;
80 
83 
86  {
87  }
88 
91  {
92  }
93 
96  {
97  return *this;
98  }
99 
102  {
103  }
104 
108 
112 
123  array_1d<double, VoigtSize>& rPredictiveStressVector,
124  const double UniaxialStress,
125  double& rDamage,
126  double& rThreshold,
128  const double CharacteristicLength
129  )
130  {
131  const Properties& r_material_properties = rValues.GetMaterialProperties();
132 
133  const int softening_type = r_material_properties[SOFTENING_TYPE];
134  double damage_parameter;
135  TYieldSurfaceType::CalculateDamageParameter(rValues, damage_parameter, CharacteristicLength);
136 
137  switch (softening_type)
138  {
139  case static_cast<int>(SofteningType::Linear):
140  CalculateLinearDamage(UniaxialStress, rThreshold, damage_parameter, CharacteristicLength, rValues, rDamage);
141  break;
142  case static_cast<int>(SofteningType::Exponential):
143  CalculateExponentialDamage(UniaxialStress, rThreshold, damage_parameter, CharacteristicLength, rValues, rDamage);
144  break;
145  default:
146  KRATOS_ERROR << "SOFTENING_TYPE not defined or wrong..." << softening_type << std::endl;
147  break;
148  }
149  rPredictiveStressVector *= (1.0 - rDamage);
150  }
151 
161  const double UniaxialStress,
162  const double Threshold,
163  const double DamageParameter,
164  const double CharacteristicLength,
166  double& rDamage
167  )
168  {
169  double initial_threshold;
170  TYieldSurfaceType::GetInitialUniaxialThreshold(rValues, initial_threshold);
171  rDamage = 1.0 - (initial_threshold / UniaxialStress) * std::exp(DamageParameter *
172  (1.0 - UniaxialStress / initial_threshold));
173  }
174 
184  const double UniaxialStress,
185  const double Threshold,
186  const double DamageParameter,
187  const double CharacteristicLength,
189  double& rDamage
190  )
191  {
192  double initial_threshold;
193  TYieldSurfaceType::GetInitialUniaxialThreshold(rValues, initial_threshold);
194  rDamage = (1.0 - initial_threshold / UniaxialStress) / (1.0 + DamageParameter);
195  }
196 
204  double& rThreshold
205  )
206  {
207  TYieldSurfaceType::GetInitialUniaxialThreshold(rValues, rThreshold);
208  }
209 
214  static int Check(const Properties& rMaterialProperties)
215  {
216  KRATOS_ERROR_IF_NOT(rMaterialProperties.Has(SOFTENING_TYPE)) << "SOFTENING_TYPE is not a defined value" << std::endl;
217  return TYieldSurfaceType::Check(rMaterialProperties);
218  }
219 
223 
227 
231 
235 
237 
238  protected:
241 
245 
249 
253 
257 
261 
265 
267 
268  private:
271 
275 
279 
283 
287 
291 
295 
297 
298 };
299 } // namespace Kratos
: This object integrates the predictive stress using the isotropic the d+d- damage theory
Definition: generic_tension_cl_integrator.h:63
static constexpr SizeType VoigtSize
The define the Voigt size, already defined in the yield surface.
Definition: generic_tension_cl_integrator.h:76
virtual ~GenericTensionConstitutiveLawIntegratorDplusDminusDamage()
Destructor.
Definition: generic_tension_cl_integrator.h:101
static void CalculateLinearDamage(const double UniaxialStress, const double Threshold, const double DamageParameter, const double CharacteristicLength, ConstitutiveLaw::Parameters &rValues, double &rDamage)
This computes the damage variable according to linear softening.
Definition: generic_tension_cl_integrator.h:183
static void GetInitialUniaxialThreshold(ConstitutiveLaw::Parameters &rValues, double &rThreshold)
This method returns the initial uniaxial stress threshold.
Definition: generic_tension_cl_integrator.h:202
KRATOS_CLASS_POINTER_DEFINITION(GenericTensionConstitutiveLawIntegratorDplusDminusDamage)
Counted pointer of GenericTensionConstitutiveLawIntegratorDplusDminusDamage.
TYieldSurfaceType YieldSurfaceType
The type of yield surface.
Definition: generic_tension_cl_integrator.h:70
GenericTensionConstitutiveLawIntegratorDplusDminusDamage()
Initialization constructor.
Definition: generic_tension_cl_integrator.h:85
YieldSurfaceType::PlasticPotentialType PlasticPotentialType
The type of plastic potential.
Definition: generic_tension_cl_integrator.h:79
static void CalculateExponentialDamage(const double UniaxialStress, const double Threshold, const double DamageParameter, const double CharacteristicLength, ConstitutiveLaw::Parameters &rValues, double &rDamage)
This computes the damage variable according to exponential softening.
Definition: generic_tension_cl_integrator.h:160
GenericTensionConstitutiveLawIntegratorDplusDminusDamage & operator=(GenericTensionConstitutiveLawIntegratorDplusDminusDamage const &rOther)
Assignment operator.
Definition: generic_tension_cl_integrator.h:95
GenericTensionConstitutiveLawIntegratorDplusDminusDamage(GenericTensionConstitutiveLawIntegratorDplusDminusDamage const &rOther)
Copy constructor.
Definition: generic_tension_cl_integrator.h:90
static int Check(const Properties &rMaterialProperties)
This method defines in the CL integrator.
Definition: generic_tension_cl_integrator.h:214
static constexpr SizeType Dimension
The define the working dimension size, already defined in the yield surface.
Definition: generic_tension_cl_integrator.h:73
static void IntegrateStressVector(array_1d< double, VoigtSize > &rPredictiveStressVector, const double UniaxialStress, double &rDamage, double &rThreshold, ConstitutiveLaw::Parameters &rValues, const double CharacteristicLength)
This method integrates the predictive stress vector with the CL using linear or exponential softening...
Definition: generic_tension_cl_integrator.h:122
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
Definition: exception.h:161
#define KRATOS_ERROR_IF_NOT(conditional)
Definition: exception.h:163
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
Definition: constitutive_law.h:189
const Properties & GetMaterialProperties()
Definition: constitutive_law.h:457