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_thermal_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_THERMAL_YIELD_SURFACE_H_INCLUDED )
11 #define KRATOS_MISES_HUBER_THERMAL_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>
50  {
51  public:
54 
59 
62  typedef typename BaseType::Pointer BaseTypePointer;
64 
67 
71 
74 
77 
80  {
81  DerivedType::operator=(rOther);
82  return *this;
83  }
84 
86  BaseTypePointer Clone() const override
87  {
88  return Kratos::make_shared<MisesHuberThermalYieldSurface>(*this);
89  }
90 
93 
94 
98 
99 
103 
104 
109  double& CalculatePlasticDissipation(const PlasticDataType& rVariables, double & rPlasticDissipation) override
110  {
111  KRATOS_TRY
112 
113  const ModelDataType& rModelData = rVariables.GetModelData();
114 
115  //get values
116  const double& rDeltaGamma = rVariables.GetDeltaInternalVariables()[0];
117  const double& rDeltaTime = rModelData.GetProcessInfo()[DELTA_TIME];
118 
119  double Hardening = 0;
120  Hardening = this->mHardeningRule.CalculateHardening(rVariables,Hardening);
121 
122  double EquivalentStress = sqrt(2.0/3.0) * ( Hardening );
123 
124  rPlasticDissipation = 0.9 * EquivalentStress * rDeltaGamma * ( 1.0/rDeltaTime );
125 
126  return rPlasticDissipation;
127 
128  KRATOS_CATCH(" ")
129  }
130 
135  double& CalculateDeltaPlasticDissipation(const PlasticDataType& rVariables, double & rDeltaPlasticDissipation) override
136  {
137  KRATOS_TRY
138 
139  const ModelDataType& rModelData = rVariables.GetModelData();
140 
141  //get values
142  const double& rDeltaGamma = rVariables.GetDeltaInternalVariables()[0];
143  const double& rDeltaTime = rModelData.GetProcessInfo()[DELTA_TIME];
144 
145  const MaterialDataType& rMaterialParameters = rModelData.GetMaterialParameters();
146  const double& rLameMuBar = rMaterialParameters.GetLameMuBar();
147 
148  double DeltaHardening = 0;
149  DeltaHardening = this->mHardeningRule.CalculateDeltaHardening(rVariables,DeltaHardening);
150 
151  double Hardening = 0;
152  Hardening = this->mHardeningRule.CalculateHardening(rVariables,Hardening);
153 
154  double EquivalentStress = sqrt(2.0/3.0) * ( Hardening );
155 
156  double DeltaThermalHardening = 0;
157  DeltaThermalHardening = this->mHardeningRule.CalculateDeltaThermalHardening(rVariables, DeltaThermalHardening);
158 
159  rDeltaPlasticDissipation = (0.9 * sqrt(2.0/3.0)/rDeltaTime);
160  rDeltaPlasticDissipation *= ( (-1) * DeltaThermalHardening );
161  rDeltaPlasticDissipation *= (rDeltaGamma - ( EquivalentStress + DeltaHardening * rDeltaGamma * (2.0/3.0) )/( 2.0 * rLameMuBar + (2.0/3.0) * DeltaHardening ) );
162 
163 
164  return rDeltaPlasticDissipation;
165 
166  KRATOS_CATCH(" ")
167  }
172  double& CalculateImplexPlasticDissipation(const PlasticDataType& rVariables, double & rPlasticDissipation) override
173  {
174  KRATOS_TRY
175 
176  const ModelDataType& rModelData = rVariables.GetModelData();
177 
178  //get values
179  const double& rDeltaGamma = rVariables.GetDeltaInternalVariables()[0];
180  const double& rDeltaTime = rModelData.GetProcessInfo()[DELTA_TIME];
181 
182  double Hardening = 0;
183  Hardening = this->mHardeningRule.CalculateHardening(rVariables,Hardening);
184 
185  //TODO(change the definition of this stress Hardening has a different expression !!!!)
186  double EquivalentStress = sqrt(2.0/3.0) * ( Hardening );
187 
188  rPlasticDissipation = 0.9 * EquivalentStress * rDeltaGamma * ( 1.0/rDeltaTime );
189 
190  return rPlasticDissipation;
191 
192  KRATOS_CATCH(" ")
193  }
194 
199  double& CalculateImplexDeltaPlasticDissipation(const PlasticDataType& rVariables, double & rDeltaPlasticDissipation) override
200  {
201  KRATOS_TRY
202 
203  const ModelDataType& rModelData = rVariables.GetModelData();
204 
205  //get values
206  const double& rDeltaGamma = rVariables.GetDeltaInternalVariables()[0];
207  const double& rDeltaTime = rModelData.GetProcessInfo()[DELTA_TIME];
208 
209  double DeltaThermalHardening = 0;
210  DeltaThermalHardening = this->mHardeningRule.CalculateDeltaThermalHardening(rVariables, DeltaThermalHardening);
211 
212  rDeltaPlasticDissipation = (0.9 * sqrt(2.0/3.0)/rDeltaTime);
213  rDeltaPlasticDissipation *= ( (-1) * DeltaThermalHardening );
214  rDeltaPlasticDissipation *= rDeltaGamma ;
215 
216  return rDeltaPlasticDissipation;
217 
218  KRATOS_CATCH(" ")
219  }
220 
224 
225 
229 
230 
234 
236  std::string Info() const override
237  {
238  std::stringstream buffer;
239  buffer << "YieldSurface" ;
240  return buffer.str();
241  }
242 
244  void PrintInfo(std::ostream& rOStream) const override
245  {
246  rOStream << "MisesHuberThermalYieldSurface";
247  }
248 
250  void PrintData(std::ostream& rOStream) const override
251  {
252  rOStream << "MisesHuberThermalYieldSurface Data";
253  }
254 
255 
259 
260 
262 
263  protected:
266 
267 
271 
272 
276 
277 
281 
282 
286 
287 
291 
292 
296 
297 
299 
300  private:
303 
304 
308 
309 
313 
314 
318 
319 
323 
324 
328  friend class Serializer;
329 
330  void save(Serializer& rSerializer) const override
331  {
333  }
334 
335  void load(Serializer& rSerializer) override
336  {
338  }
339 
343 
344 
348 
350 
351  }; // Class MisesHuberThermalYieldSurface
352 
354 
357 
358 
362 
363 
365 
367 
368 } // namespace Kratos.
369 
370 #endif // KRATOS_MISES_HUBER_THERMAL_YIELD_SURFACE_H_INCLUDED defined
Definition: amatrix_interface.h:41
Short class definition.
Definition: mises_huber_thermal_yield_surface.hpp:50
double & CalculatePlasticDissipation(const PlasticDataType &rVariables, double &rPlasticDissipation) override
Definition: mises_huber_thermal_yield_surface.hpp:109
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: mises_huber_thermal_yield_surface.hpp:244
BaseTypePointer Clone() const override
Clone.
Definition: mises_huber_thermal_yield_surface.hpp:86
double & CalculateImplexDeltaPlasticDissipation(const PlasticDataType &rVariables, double &rDeltaPlasticDissipation) override
Definition: mises_huber_thermal_yield_surface.hpp:199
BaseType::PlasticDataType PlasticDataType
Definition: mises_huber_thermal_yield_surface.hpp:63
std::string Info() const override
Turn back information as a string.
Definition: mises_huber_thermal_yield_surface.hpp:236
~MisesHuberThermalYieldSurface() override
Destructor.
Definition: mises_huber_thermal_yield_surface.hpp:92
MisesHuberThermalYieldSurface()
Default constructor.
Definition: mises_huber_thermal_yield_surface.hpp:73
double & CalculateImplexPlasticDissipation(const PlasticDataType &rVariables, double &rPlasticDissipation) override
Definition: mises_huber_thermal_yield_surface.hpp:172
ConstitutiveModelData::ModelData ModelDataType
Definition: mises_huber_thermal_yield_surface.hpp:57
MisesHuberThermalYieldSurface & operator=(MisesHuberThermalYieldSurface const &rOther)
Assignment operator.
Definition: mises_huber_thermal_yield_surface.hpp:79
ConstitutiveModelData::VectorType VectorType
Definition: mises_huber_thermal_yield_surface.hpp:56
MisesHuberYieldSurface< THardeningRule > DerivedType
Definition: mises_huber_thermal_yield_surface.hpp:60
ConstitutiveModelData::MaterialData MaterialDataType
Definition: mises_huber_thermal_yield_surface.hpp:58
double & CalculateDeltaPlasticDissipation(const PlasticDataType &rVariables, double &rDeltaPlasticDissipation) override
Definition: mises_huber_thermal_yield_surface.hpp:135
BaseType::Pointer BaseTypePointer
Definition: mises_huber_thermal_yield_surface.hpp:62
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: mises_huber_thermal_yield_surface.hpp:250
MisesHuberThermalYieldSurface(MisesHuberThermalYieldSurface const &rOther)
Copy constructor.
Definition: mises_huber_thermal_yield_surface.hpp:76
YieldSurface< THardeningRule > BaseType
Definition: mises_huber_thermal_yield_surface.hpp:61
KRATOS_CLASS_POINTER_DEFINITION(MisesHuberThermalYieldSurface)
Pointer definition of MisesHuberThermalYieldSurface.
ConstitutiveModelData::MatrixType MatrixType
Definition: mises_huber_thermal_yield_surface.hpp:55
Short class definition.
Definition: mises_huber_yield_surface.hpp:50
MisesHuberYieldSurface & operator=(MisesHuberYieldSurface const &rOther)
Assignment operator.
Definition: mises_huber_yield_surface.hpp:79
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
#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
const double & GetLameMuBar() const
Definition: constitutive_model_data.hpp:112
Definition: constitutive_model_data.hpp:383
const ProcessInfo & GetProcessInfo() const
Definition: constitutive_model_data.hpp:435