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.
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_YIELD_SURFACE_H_INCLUDED )
11 #define KRATOS_YIELD_SURFACE_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
20 
21 namespace Kratos
22 {
25 
28 
32 
36 
40 
44 
46 
48  template<class THardeningRule>
50  {
51  public:
52 
55 
60 
61  typedef THardeningRule HardeningRuleType;
62  typedef typename THardeningRule::PlasticDataType PlasticDataType;
63  typedef typename THardeningRule::InternalVariablesType InternalVariablesType;
64 
67 
71 
74 
77 
80  {
82  return *this;
83  }
84 
86  virtual typename YieldSurface::Pointer Clone() const
87  {
88  return Kratos::make_shared<YieldSurface>(*this);
89  }
90 
92  virtual ~YieldSurface() {}
93 
94 
98 
99 
103 
108  virtual double& CalculateYieldCondition(const PlasticDataType& rVariables, double & rYieldCondition)
109  {
110  KRATOS_TRY
111 
112  KRATOS_ERROR << "calling the YieldSurface base class ... illegal operation" << std::endl;
113 
114  return rYieldCondition;
115 
116  KRATOS_CATCH(" ")
117  }
118 
123  virtual double& CalculateDeltaYieldCondition(const PlasticDataType& rVariables, double & rDeltaYieldCondition)
124  {
125  KRATOS_TRY
126 
127  KRATOS_ERROR << "calling the YieldSurface base class ... illegal operation" << std::endl;
128 
129  return rDeltaYieldCondition;
130 
131  KRATOS_CATCH(" ")
132  }
133 
134 
139  virtual VectorType& CalculateDeltaStressYieldCondition(const PlasticDataType& rVariables, VectorType& rDeltaStressYieldCondition)
140  {
141  KRATOS_TRY
142 
143  KRATOS_ERROR << "calling the YieldSurface base class ... illegal operation" << std::endl;
144 
145  return rDeltaStressYieldCondition;
146 
147  KRATOS_CATCH(" ")
148  }
149 
150 
155  virtual double& CalculateStateFunction(const PlasticDataType& rVariables, double & rStateFunction)
156  {
157  KRATOS_TRY
158 
159  KRATOS_ERROR << "calling the YieldSurface base class ... illegal operation" << std::endl;
160 
161  return rStateFunction;
162 
163  KRATOS_CATCH(" ")
164  }
165 
170  virtual double& CalculateDeltaStateFunction(const PlasticDataType& rVariables, double & rDeltaStateFunction)
171  {
172  KRATOS_TRY
173 
174  KRATOS_ERROR << "calling the YieldSurface base class ... illegal operation" << std::endl;
175 
176  return rDeltaStateFunction;
177 
178  KRATOS_CATCH(" ")
179  }
180 
185  virtual double& CalculatePlasticDissipation(const PlasticDataType& rVariables, double & rPlasticDissipation)
186  {
187  KRATOS_TRY
188 
189  KRATOS_ERROR << "calling the YieldSurface base class ... illegal operation" << std::endl;
190 
191  return rPlasticDissipation;
192 
193  KRATOS_CATCH(" ")
194  }
195 
200  virtual double& CalculateDeltaPlasticDissipation(const PlasticDataType& rVariables, double & rDeltaPlasticDissipation)
201  {
202  KRATOS_TRY
203 
204  KRATOS_ERROR << "calling the YieldSurface base class ... illegal operation" << std::endl;
205 
206  return rDeltaPlasticDissipation;
207 
208  KRATOS_CATCH(" ")
209  }
210 
215  virtual double& CalculateImplexPlasticDissipation(const PlasticDataType& rVariables, double & rPlasticDissipation)
216  {
217  KRATOS_TRY
218 
219  KRATOS_ERROR << "calling the YieldSurface base class ... illegal operation" << std::endl;
220 
221  return rPlasticDissipation;
222 
223  KRATOS_CATCH(" ")
224  }
225 
230  virtual double& CalculateImplexDeltaPlasticDissipation(const PlasticDataType& rVariables, double & rDeltaPlasticDissipation)
231  {
232  KRATOS_TRY
233 
234  KRATOS_ERROR << "calling the YieldSurface base class ... illegal operation" << std::endl;
235 
236  return rDeltaPlasticDissipation;
237 
238  KRATOS_CATCH(" ")
239  }
240 
241 
245 
247 
251 
252 
256 
257 
259  virtual std::string Info() const
260  {
261  std::stringstream buffer;
262  buffer << "YieldSurface" ;
263  return buffer.str();
264  }
265 
267  virtual void PrintInfo(std::ostream& rOStream) const
268  {
269  rOStream << "YieldSurface";
270  }
271 
273  virtual void PrintData(std::ostream& rOStream) const
274  {
275  rOStream << "YieldSurface Data";
276  }
277 
278 
282 
283 
285 
286  protected:
289 
290 
294 
296 
300 
301 
305 
306 
310 
311 
315 
316 
320 
321 
323 
324  private:
327 
328 
332 
333 
337 
338 
342 
343 
347 
348 
352  friend class Serializer;
353 
354 
355  virtual void save(Serializer& rSerializer) const
356  {
357  rSerializer.save("mHardeningRule", mHardeningRule);
358  }
359 
360  virtual void load(Serializer& rSerializer)
361  {
362  rSerializer.load("mHardeningRule", mHardeningRule);
363  }
364 
368 
369 
373 
375 
376  }; // Class YieldSurface
377 
379 
382 
383 
387 
388 
390 
392 
393 } // namespace Kratos.
394 
395 #endif // KRATOS_YIELD_SURFACE_H_INCLUDED defined
Definition: amatrix_interface.h:41
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
void load(std::string const &rTag, TDataType &rObject)
Definition: serializer.h:207
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
Short class definition.
Definition: yield_surface.hpp:50
THardeningRule::PlasticDataType PlasticDataType
Definition: yield_surface.hpp:62
virtual double & CalculatePlasticDissipation(const PlasticDataType &rVariables, double &rPlasticDissipation)
Definition: yield_surface.hpp:185
HardeningRuleType mHardeningRule
Definition: yield_surface.hpp:295
virtual std::string Info() const
Turn back information as a string.
Definition: yield_surface.hpp:259
ConstitutiveModelData::MatrixType MatrixType
Definition: yield_surface.hpp:56
virtual double & CalculateDeltaYieldCondition(const PlasticDataType &rVariables, double &rDeltaYieldCondition)
Definition: yield_surface.hpp:123
THardeningRule::InternalVariablesType InternalVariablesType
Definition: yield_surface.hpp:63
virtual double & CalculateImplexDeltaPlasticDissipation(const PlasticDataType &rVariables, double &rDeltaPlasticDissipation)
Definition: yield_surface.hpp:230
virtual ~YieldSurface()
Destructor.
Definition: yield_surface.hpp:92
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: yield_surface.hpp:267
virtual double & CalculateImplexPlasticDissipation(const PlasticDataType &rVariables, double &rPlasticDissipation)
Definition: yield_surface.hpp:215
YieldSurface & operator=(YieldSurface const &rOther)
Assignment operator.
Definition: yield_surface.hpp:79
ConstitutiveModelData::VectorType VectorType
Definition: yield_surface.hpp:57
virtual VectorType & CalculateDeltaStressYieldCondition(const PlasticDataType &rVariables, VectorType &rDeltaStressYieldCondition)
Definition: yield_surface.hpp:139
YieldSurface(YieldSurface const &rOther)
Copy constructor.
Definition: yield_surface.hpp:76
HardeningRuleType & GetHardeningRule()
Definition: yield_surface.hpp:246
KRATOS_CLASS_POINTER_DEFINITION(YieldSurface)
Pointer definition of YieldSurface.
virtual double & CalculateDeltaPlasticDissipation(const PlasticDataType &rVariables, double &rDeltaPlasticDissipation)
Definition: yield_surface.hpp:200
virtual YieldSurface::Pointer Clone() const
Clone.
Definition: yield_surface.hpp:86
ConstitutiveModelData::MaterialData MaterialDataType
Definition: yield_surface.hpp:59
virtual double & CalculateYieldCondition(const PlasticDataType &rVariables, double &rYieldCondition)
Definition: yield_surface.hpp:108
virtual double & CalculateStateFunction(const PlasticDataType &rVariables, double &rStateFunction)
Definition: yield_surface.hpp:155
THardeningRule HardeningRuleType
Definition: yield_surface.hpp:61
virtual double & CalculateDeltaStateFunction(const PlasticDataType &rVariables, double &rDeltaStateFunction)
Definition: yield_surface.hpp:170
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: yield_surface.hpp:273
YieldSurface()
Default constructor.
Definition: yield_surface.hpp:73
ConstitutiveModelData::ModelData ModelDataType
Definition: yield_surface.hpp:58
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_ERROR
Definition: exception.h:161
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