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.
modified_mises_yield_surface.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosConstitutiveModelsApplication $
3 // Created by: $Author: IPouplana $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: April 2017 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_MODIFIED_MISES_YIELD_SURFACE_H_INCLUDED )
11 #define KRATOS_MODIFIED_MISES_YIELD_SURFACE_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
19 
20 namespace Kratos
21 {
24 
27 
31 
35 
39 
43 
45 
47  template<class THardeningRule>
48  class ModifiedMisesYieldSurface : public YieldSurface<THardeningRule>
49  {
50  public:
53 
58 
60  typedef typename BaseType::Pointer BaseTypePointer;
62 
65 
69 
72 
75 
78  {
79  BaseType::operator=(rOther);
80  return *this;
81  }
82 
84  BaseTypePointer Clone() const override
85  {
86  return Kratos::make_shared<ModifiedMisesYieldSurface>(*this);
87  }
88 
91 
92 
96 
97 
101 
106  double& CalculateYieldCondition(const PlasticDataType& rVariables, double & rYieldCondition) override
107  {
108  KRATOS_TRY
109 
110  const ModelDataType& rModelData = rVariables.GetModelData();
111 
112  // Compute I1
113  const MatrixType& rStrainMatrix = rVariables.GetStrainMatrix();
114  double I1 = 0.0;
115 
116  for(unsigned int i=0; i<3; i++)
117  {
118  I1 += rStrainMatrix(i,i);
119  }
120 
121  // Compute J2
122  MatrixType DeviatoricStrain;
123  noalias(DeviatoricStrain) = rStrainMatrix;
124 
125  for(unsigned int i=0; i<3; i++)
126  {
127  DeviatoricStrain(i,i) -= I1/3.0;
128  }
129 
130  MatrixType Auxiliar;
131  noalias(Auxiliar) = prod(DeviatoricStrain,DeviatoricStrain);
132  double J2 = 0.0;
133 
134  for(unsigned int i=0; i<3; i++)
135  {
136  J2 += Auxiliar(i,i);
137  }
138 
139  J2 *= 0.5;
140 
141  // Compute Equivalent Strain (rYieldCondition)
142  const Properties& rProperties = rModelData.GetProperties();
143  const double& StrengthRatio = rProperties[STRENGTH_RATIO];
144  const double& PoissonRatio = rProperties[POISSON_RATIO];
145 
146  rYieldCondition = I1*(StrengthRatio-1.0)/(2.0*StrengthRatio*(1.0-2.0*PoissonRatio));
147  rYieldCondition += sqrt( I1*I1*(StrengthRatio-1.0)*(StrengthRatio-1.0)/((1.0-2.0*PoissonRatio)*(1.0-2.0*PoissonRatio)) + J2*12.0*StrengthRatio/((1.0+PoissonRatio)*(1.0+PoissonRatio)) )/(2.0*StrengthRatio);
148 
149  return rYieldCondition;
150 
151  KRATOS_CATCH(" ")
152 
153  }
158  double& CalculateStateFunction(const PlasticDataType& rVariables, double & rStateFunction) override
159  {
160  KRATOS_TRY
161 
162  rStateFunction = this->mHardeningRule.CalculateHardening(rVariables,rStateFunction);
163 
164  return rStateFunction;
165 
166  KRATOS_CATCH(" ")
167  }
168 
173  double& CalculateDeltaStateFunction(const PlasticDataType& rVariables, double & rDeltaStateFunction) override
174  {
175  KRATOS_TRY
176 
177  rDeltaStateFunction = this->mHardeningRule.CalculateDeltaHardening(rVariables,rDeltaStateFunction);
178 
179  return rDeltaStateFunction;
180 
181  KRATOS_CATCH(" ")
182  }
183 
187 
188 
192 
193 
197 
199  std::string Info() const override
200  {
201  std::stringstream buffer;
202  buffer << "ModifiedMissesYieldSurface" ;
203  return buffer.str();
204  }
205 
207  void PrintInfo(std::ostream& rOStream) const override
208  {
209  rOStream << "ModifiedMissesYieldSurface";
210  }
211 
213  void PrintData(std::ostream& rOStream) const override
214  {
215  rOStream << "ModifiedMissesYieldSurface Data";
216  }
217 
221 
222 
224 
225  protected:
228 
229 
233 
234 
238 
239 
243 
247 
248 
252 
253 
257 
258 
260 
261  private:
264 
265 
269 
270 
274 
275 
279 
280 
284 
285 
289  friend class Serializer;
290 
291 
292  void save(Serializer& rSerializer) const override
293  {
295  }
296 
297  void load(Serializer& rSerializer) override
298  {
300  }
301 
305 
306 
310 
312 
313  }; // Class ModifiedMisesYieldSurface
314 
316 
319 
320 
324 
326 
328 
329 } // namespace Kratos.
330 
331 #endif // KRATOS_MODIFIED_MISES_YIELD_SURFACE_H_INCLUDED defined
Definition: amatrix_interface.h:41
Short class definition.
Definition: modified_mises_yield_surface.hpp:49
ModifiedMisesYieldSurface(ModifiedMisesYieldSurface const &rOther)
Copy constructor.
Definition: modified_mises_yield_surface.hpp:74
ConstitutiveModelData::ModelData ModelDataType
Definition: modified_mises_yield_surface.hpp:56
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: modified_mises_yield_surface.hpp:207
ConstitutiveModelData::MaterialData MaterialDataType
Definition: modified_mises_yield_surface.hpp:57
~ModifiedMisesYieldSurface() override
Destructor.
Definition: modified_mises_yield_surface.hpp:90
ConstitutiveModelData::VectorType VectorType
Definition: modified_mises_yield_surface.hpp:55
double & CalculateYieldCondition(const PlasticDataType &rVariables, double &rYieldCondition) override
Definition: modified_mises_yield_surface.hpp:106
BaseTypePointer Clone() const override
Clone.
Definition: modified_mises_yield_surface.hpp:84
BaseType::PlasticDataType PlasticDataType
Definition: modified_mises_yield_surface.hpp:61
std::string Info() const override
Turn back information as a string.
Definition: modified_mises_yield_surface.hpp:199
double & CalculateStateFunction(const PlasticDataType &rVariables, double &rStateFunction) override
Definition: modified_mises_yield_surface.hpp:158
ModifiedMisesYieldSurface()
Default constructor.
Definition: modified_mises_yield_surface.hpp:71
double & CalculateDeltaStateFunction(const PlasticDataType &rVariables, double &rDeltaStateFunction) override
Definition: modified_mises_yield_surface.hpp:173
BaseType::Pointer BaseTypePointer
Definition: modified_mises_yield_surface.hpp:60
ModifiedMisesYieldSurface & operator=(ModifiedMisesYieldSurface const &rOther)
Assignment operator.
Definition: modified_mises_yield_surface.hpp:77
KRATOS_CLASS_POINTER_DEFINITION(ModifiedMisesYieldSurface)
Pointer definition of ModifiedMisesYieldSurface.
ConstitutiveModelData::MatrixType MatrixType
Definition: modified_mises_yield_surface.hpp:54
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: modified_mises_yield_surface.hpp:213
YieldSurface< THardeningRule > BaseType
Definition: modified_mises_yield_surface.hpp: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
Short class definition.
Definition: yield_surface.hpp:50
THardeningRule::PlasticDataType PlasticDataType
Definition: yield_surface.hpp:62
HardeningRuleType mHardeningRule
Definition: yield_surface.hpp:295
YieldSurface & operator=(YieldSurface const &rOther)
Assignment operator.
Definition: yield_surface.hpp:79
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#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
AMatrix::MatrixProductExpression< TExpression1Type, TExpression2Type > prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:568
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
float J2
Definition: isotropic_damage_automatic_differentiation.py:133
I1
Definition: isotropic_damage_automatic_differentiation.py:230
def load(f)
Definition: ode_solve.py:307
integer i
Definition: TensorModule.f:17
Definition: constitutive_model_data.hpp:92
Definition: constitutive_model_data.hpp:383