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.
mises_huber_yield_surface.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosConstitutiveModelsApplication $
3 // Created by: $Author: JMCarbonell $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: April 2017 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_MISES_HUBER_YIELD_SURFACE_H_INCLUDED )
11 #define KRATOS_MISES_HUBER_YIELD_SURFACE_H_INCLUDED
12 
13 
14 // System includes
15 
16 // External includes
17 
18 // Project includes
20 
21 namespace Kratos
22 {
25 
28 
32 
36 
40 
44 
46 
48  template<class THardeningRule>
49  class MisesHuberYieldSurface : public YieldSurface<THardeningRule>
50  {
51  public:
54 
59 
60 
62  typedef typename BaseType::Pointer BaseTypePointer;
64 
67 
71 
74 
77 
80  {
81  BaseType::operator=(rOther);
82  return *this;
83  }
84 
86  BaseTypePointer Clone() const override
87  {
88  return Kratos::make_shared<MisesHuberYieldSurface>(*this);
89  }
90 
93 
94 
98 
99 
103 
108  double& CalculateYieldCondition(const PlasticDataType& rVariables, double & rYieldCondition) override
109  {
110  KRATOS_TRY
111 
112  double Hardening = 0;
113 
114  const double& rStressNorm = rVariables.GetStressNorm();
115 
116  Hardening = this->mHardeningRule.CalculateHardening(rVariables,Hardening);
117 
118  rYieldCondition = rStressNorm - sqrt(2.0/3.0) * Hardening;
119 
120  return rYieldCondition;
121 
122  KRATOS_CATCH(" ")
123  }
124 
129  double& CalculateStateFunction(const PlasticDataType& rVariables, double & rStateFunction) override
130  {
131  KRATOS_TRY
132 
133  const MaterialDataType& rMaterial = rVariables.GetMaterialParameters();
134 
135  const double& rStressNorm = rVariables.GetStressNorm();
136 
137  const double& rDeltaGamma = rVariables.GetDeltaInternalVariables()[0];
138 
139  double Hardening = 0;
140 
141  Hardening = this->mHardeningRule.CalculateHardening( rVariables, Hardening );
142 
143  rStateFunction = rStressNorm - 2.0 * rMaterial.GetLameMuBar() * rDeltaGamma - sqrt(2.0/3.0) * ( Hardening );
144 
145  return rStateFunction;
146 
147  KRATOS_CATCH(" ")
148  }
149 
154  double& CalculateDeltaStateFunction(const PlasticDataType& rVariables, double & rDeltaStateFunction) override
155  {
156  KRATOS_TRY
157 
158  const MaterialDataType& rMaterial = rVariables.GetMaterialParameters();
159 
160  double DeltaHardening = 0;
161 
162  DeltaHardening = this->mHardeningRule.CalculateDeltaHardening( rVariables, DeltaHardening );
163 
164  rDeltaStateFunction = 2.0 * rMaterial.GetLameMuBar() + (2.0/3.0) * DeltaHardening;
165 
166  return rDeltaStateFunction;
167 
168  KRATOS_CATCH(" ")
169  }
170 
175  double& CalculatePlasticDissipation(const PlasticDataType& rVariables, double & rPlasticDissipation) override
176  {
177  KRATOS_TRY
178 
179  rPlasticDissipation = 0;
180  return rPlasticDissipation;
181 
182  KRATOS_CATCH(" ")
183  }
184 
189  double& CalculateDeltaPlasticDissipation(const PlasticDataType& rVariables, double & rDeltaPlasticDissipation) override
190  {
191  KRATOS_TRY
192 
193  rDeltaPlasticDissipation = 0;
194  return rDeltaPlasticDissipation;
195 
196  KRATOS_CATCH(" ")
197  }
202  double& CalculateImplexPlasticDissipation(const PlasticDataType& rVariables, double & rPlasticDissipation) override
203  {
204  KRATOS_TRY
205 
206  rPlasticDissipation = 0;
207  return rPlasticDissipation;
208 
209  KRATOS_CATCH(" ")
210  }
211 
216  double& CalculateImplexDeltaPlasticDissipation(const PlasticDataType& rVariables, double & rDeltaPlasticDissipation) override
217  {
218  KRATOS_TRY
219 
220  rDeltaPlasticDissipation = 0;
221  return rDeltaPlasticDissipation;
222 
223  KRATOS_CATCH(" ")
224  }
225 
229 
230 
234 
235 
239 
241  std::string Info() const override
242  {
243  std::stringstream buffer;
244  buffer << "YieldSurface" ;
245  return buffer.str();
246  }
247 
249  void PrintInfo(std::ostream& rOStream) const override
250  {
251  rOStream << "MisesHuberYieldSurface";
252  }
253 
255  void PrintData(std::ostream& rOStream) const override
256  {
257  rOStream << "MisesHuberYieldSurface Data";
258  }
259 
260 
264 
265 
267 
268  protected:
271 
272 
276 
277 
281 
282 
286 
287 
291 
292 
296 
297 
301 
302 
304 
305  private:
308 
309 
313 
314 
318 
319 
323 
324 
328 
329 
333  friend class Serializer;
334 
335  void save(Serializer& rSerializer) const override
336  {
338  }
339 
340  void load(Serializer& rSerializer) override
341  {
343  }
344 
348 
349 
353 
355 
356  }; // Class MisesHuberYieldSurface
357 
359 
362 
363 
367 
368 
370 
372 
373 } // namespace Kratos.
374 
375 #endif // KRATOS_MISES_HUBER_YIELD_SURFACE_H_INCLUDED defined
Definition: amatrix_interface.h:41
Short class definition.
Definition: mises_huber_yield_surface.hpp:50
BaseType::PlasticDataType PlasticDataType
Definition: mises_huber_yield_surface.hpp:63
BaseTypePointer Clone() const override
Clone.
Definition: mises_huber_yield_surface.hpp:86
double & CalculateYieldCondition(const PlasticDataType &rVariables, double &rYieldCondition) override
Definition: mises_huber_yield_surface.hpp:108
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: mises_huber_yield_surface.hpp:249
~MisesHuberYieldSurface() override
Destructor.
Definition: mises_huber_yield_surface.hpp:92
YieldSurface< THardeningRule > BaseType
Definition: mises_huber_yield_surface.hpp:61
double & CalculateImplexDeltaPlasticDissipation(const PlasticDataType &rVariables, double &rDeltaPlasticDissipation) override
Definition: mises_huber_yield_surface.hpp:216
MisesHuberYieldSurface()
Default constructor.
Definition: mises_huber_yield_surface.hpp:73
double & CalculatePlasticDissipation(const PlasticDataType &rVariables, double &rPlasticDissipation) override
Definition: mises_huber_yield_surface.hpp:175
MisesHuberYieldSurface & operator=(MisesHuberYieldSurface const &rOther)
Assignment operator.
Definition: mises_huber_yield_surface.hpp:79
MisesHuberYieldSurface(MisesHuberYieldSurface const &rOther)
Copy constructor.
Definition: mises_huber_yield_surface.hpp:76
ConstitutiveModelData::VectorType VectorType
Definition: mises_huber_yield_surface.hpp:56
ConstitutiveModelData::MaterialData MaterialDataType
Definition: mises_huber_yield_surface.hpp:58
std::string Info() const override
Turn back information as a string.
Definition: mises_huber_yield_surface.hpp:241
KRATOS_CLASS_POINTER_DEFINITION(MisesHuberYieldSurface)
Pointer definition of MisesHuberYieldSurface.
BaseType::Pointer BaseTypePointer
Definition: mises_huber_yield_surface.hpp:62
double & CalculateImplexPlasticDissipation(const PlasticDataType &rVariables, double &rPlasticDissipation) override
Definition: mises_huber_yield_surface.hpp:202
ConstitutiveModelData::ModelData ModelDataType
Definition: mises_huber_yield_surface.hpp:57
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: mises_huber_yield_surface.hpp:255
ConstitutiveModelData::MatrixType MatrixType
Definition: mises_huber_yield_surface.hpp:55
double & CalculateDeltaPlasticDissipation(const PlasticDataType &rVariables, double &rDeltaPlasticDissipation) override
Definition: mises_huber_yield_surface.hpp:189
double & CalculateStateFunction(const PlasticDataType &rVariables, double &rStateFunction) override
Definition: mises_huber_yield_surface.hpp:129
double & CalculateDeltaStateFunction(const PlasticDataType &rVariables, double &rDeltaStateFunction) override
Definition: mises_huber_yield_surface.hpp:154
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
def load(f)
Definition: ode_solve.py:307
Definition: constitutive_model_data.hpp:92
Definition: constitutive_model_data.hpp:383