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.
linear_associative_plasticity_model.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_LINEAR_ASSOCIATIVE_PLASTICITY_MODEL_H_INCLUDED )
11 #define KRATOS_LINEAR_ASSOCIATIVE_PLASTICITY_MODEL_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 TElasticityModel, class TYieldSurface>
49  class KRATOS_API(CONSTITUTIVE_MODELS_APPLICATION) LinearAssociativePlasticityModel : public NonLinearAssociativePlasticityModel<TElasticityModel,TYieldSurface>
50  {
51  public:
52 
55 
56  //elasticity model
57  typedef TElasticityModel ElasticityModelType;
58  typedef typename ElasticityModelType::Pointer ElasticityModelPointer;
59 
60  //yield surface
61  typedef TYieldSurface YieldSurfaceType;
62  typedef typename YieldSurfaceType::Pointer YieldSurfacePointer;
63 
64  //derived type
66 
67  //base type
69 
70  //common types
71  typedef typename BaseType::Pointer BaseTypePointer;
72  typedef typename BaseType::SizeType SizeType;
74  typedef typename BaseType::MatrixType MatrixType;
79 
82 
86 
89 
91  LinearAssociativePlasticityModel(ElasticityModelPointer pElasticityModel, YieldSurfacePointer pYieldSurface) : DerivedType(pElasticityModel, pYieldSurface) {}
92 
95 
98  {
99  DerivedType::operator=(rOther);
100  return *this;
101  }
102 
104  virtual ConstitutiveModel::Pointer Clone() const override
105  {
106  return Kratos::make_shared<LinearAssociativePlasticityModel>(*this);
107  }
108 
111 
112 
116 
117 
121 
122 
126 
127 
131 
132 
136 
138  virtual std::string Info() const override
139  {
140  std::stringstream buffer;
141  buffer << "LinearAssociativePlasticityModel" ;
142  return buffer.str();
143  }
144 
146  virtual void PrintInfo(std::ostream& rOStream) const override
147  {
148  rOStream << "LinearAssociativePlasticityModel";
149  }
150 
152  virtual void PrintData(std::ostream& rOStream) const override
153  {
154  rOStream << "LinearAssociativePlasticityModel Data";
155  }
156 
160 
161 
163 
164  protected:
167 
171 
175 
176 
180 
181 
182  // calculate return mapping
183  virtual bool CalculateReturnMapping(PlasticDataType& rVariables, MatrixType& rStressMatrix)
184  {
185  KRATOS_TRY
186 
187  //start
188  double DeltaStateFunction = 0;
189 
190  double& rEquivalentPlasticStrain = rVariables.Internal.Variables[0];
191  double& rDeltaGamma = rVariables.DeltaInternal.Variables[0];
192 
193 
194  double StateFunction = rVariables.TrialStateFunction;
195 
196  //Calculate Delta State Function:
197  DeltaStateFunction = this->mYieldSurface.CalculateDeltaStateFunction( rVariables, DeltaStateFunction );
198 
199  //Calculate DeltaGamma:
200  rDeltaGamma = StateFunction/DeltaStateFunction;
201 
202  //Update Equivalent Plastic Strain:
203  DeltaPlasticStrain = sqrt(2.0/3.0) * rDeltaGamma;
204  rEquivalentPlasticStrain += DeltaPlasticStrain;
205 
206  KRATOS_CATCH(" ")
207  }
208 
209 
213 
214 
218 
219 
223 
224 
226 
227  private:
230 
231 
235 
236 
240 
241 
245 
246 
250 
251 
255  friend class Serializer;
256 
257  virtual void save(Serializer& rSerializer) const override
258  {
260  }
261 
262  virtual void load(Serializer& rSerializer) override
263  {
264  KRATOS_SERIALIZE_LOAD_BASE_CLASS( rSerializer, DerivedType )
265  }
266 
270 
271 
275 
277 
278  }; // Class LinearAssociativePlasticityModel
279 
281 
284 
288 
290 
292 
293 } // namespace Kratos.
294 
295 #endif // KRATOS_LINEAR_ASSOCIATIVE_PLASTICITY_MODEL_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: amatrix_interface.h:41
Short class definition.
Definition: linear_associative_plasticity_model.hpp:50
virtual ConstitutiveModel::Pointer Clone() const override
Clone.
Definition: linear_associative_plasticity_model.hpp:104
BaseType::Pointer BaseTypePointer
Definition: linear_associative_plasticity_model.hpp:71
virtual ~LinearAssociativePlasticityModel()
Destructor.
Definition: linear_associative_plasticity_model.hpp:110
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: linear_associative_plasticity_model.hpp:146
PlasticityModel< ElasticityModelType, YieldSurfaceType > BaseType
Definition: linear_associative_plasticity_model.hpp:68
BaseType::VoigtIndexType VoigtIndexType
Definition: linear_associative_plasticity_model.hpp:73
BaseType::InternalVariablesType InternalVariablesType
Definition: linear_associative_plasticity_model.hpp:78
LinearAssociativePlasticityModel(ElasticityModelPointer pElasticityModel, YieldSurfacePointer pYieldSurface)
Constructor.
Definition: linear_associative_plasticity_model.hpp:91
virtual bool CalculateReturnMapping(PlasticDataType &rVariables, MatrixType &rStressMatrix)
Definition: linear_associative_plasticity_model.hpp:183
TElasticityModel ElasticityModelType
Definition: linear_associative_plasticity_model.hpp:57
KRATOS_CLASS_POINTER_DEFINITION(LinearAssociativePlasticityModel)
Pointer definition of LinearAssociativePlasticityModel.
virtual std::string Info() const override
Turn back information as a string.
Definition: linear_associative_plasticity_model.hpp:138
ElasticityModelType::Pointer ElasticityModelPointer
Definition: linear_associative_plasticity_model.hpp:58
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: linear_associative_plasticity_model.hpp:152
LinearAssociativePlasticityModel()
Default constructor.
Definition: linear_associative_plasticity_model.hpp:88
BaseType::ModelDataType ModelDataType
Definition: linear_associative_plasticity_model.hpp:75
LinearAssociativePlasticityModel(LinearAssociativePlasticityModel const &rOther)
Copy constructor.
Definition: linear_associative_plasticity_model.hpp:94
BaseType::PlasticDataType PlasticDataType
Definition: linear_associative_plasticity_model.hpp:77
TYieldSurface YieldSurfaceType
Definition: linear_associative_plasticity_model.hpp:61
BaseType::MatrixType MatrixType
Definition: linear_associative_plasticity_model.hpp:74
YieldSurfaceType::Pointer YieldSurfacePointer
Definition: linear_associative_plasticity_model.hpp:62
NonLinearAssociativePlasticityModel< ElasticityModelType, YieldSurfaceType > DerivedType
Definition: linear_associative_plasticity_model.hpp:65
BaseType::SizeType SizeType
Definition: linear_associative_plasticity_model.hpp:72
BaseType::MaterialDataType MaterialDataType
Definition: linear_associative_plasticity_model.hpp:76
LinearAssociativePlasticityModel & operator=(LinearAssociativePlasticityModel const &rOther)
Assignment operator.
Definition: linear_associative_plasticity_model.hpp:97
Short class definition.
Definition: non_linear_associative_plasticity_model.hpp:50
Short class definition.
Definition: plasticity_model.hpp:50
TYieldSurface::InternalVariablesType InternalVariablesType
Definition: plasticity_model.hpp:69
ConstitutiveModelData::SizeType SizeType
Definition: plasticity_model.hpp:63
ConstitutiveModelData::VoigtIndexType VoigtIndexType
Definition: plasticity_model.hpp:64
TYieldSurface::PlasticDataType PlasticDataType
Definition: plasticity_model.hpp:68
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
#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