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.
mc_plastic_flow_rule.hpp
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Ilaria Iaconeta, Bodhinanda Chandra
11 //
12 
13 
14 #if !defined(KRATOS_MC_PLASTIC_FLOW_RULE_H_INCLUDED )
15 #define KRATOS_MC_PLASTIC_FLOW_RULE_H_INCLUDED
16 
17 // System includes
18 #include <cmath>
19 
20 // External includes
21 
22 // Project includes
24 
25 
26 namespace Kratos
27 {
30 
33 
37 
38 //struct MCStressInvariants {
39 
40 //double MeanStress;
41 //double J2InvSQ;
42 //double LodeAngle;
43 
44 //};
45 
46 //struct MCSmoothingConstants {
47 
48 //double A;
49 //double B;
50 
51 //};
55 
59 
63 
65 
67 class KRATOS_API(PARTICLE_MECHANICS_APPLICATION) MCPlasticFlowRule
68  :public ParticleFlowRule
69 {
70 
71 
72 
73 public:
76 
79 
80  // Variable material parameters which can change due to hardening
82  {
83  double Cohesion;
84  double FrictionAngle;
86 
87  public:
88  void PrintInfo()
89  {
90  KRATOS_INFO("ParticleFlowRule.MaterialParameters") << "Cohesion = " << Cohesion << std::endl;
91  KRATOS_INFO("ParticleFlowRule.MaterialParameters") << "FrictionAngle = " << FrictionAngle << std::endl;
92  KRATOS_INFO("ParticleFlowRule.MaterialParameters") << "DilatancyAngle = " << DilatancyAngle << std::endl;
93  }
94 
95  private:
96 
97  friend class Serializer;
98 
99  // A private default constructor necessary for serialization
100  void save(Serializer& rSerializer) const
101  {
102  rSerializer.save("Cohesion",Cohesion);
103  rSerializer.save("FrictionAngle",FrictionAngle);
104  rSerializer.save("DilatancyAngle",DilatancyAngle);
105  };
106 
107  void load(Serializer& rSerializer)
108  {
109  rSerializer.load("Cohesion",Cohesion);
110  rSerializer.load("FrictionAngle",FrictionAngle);
111  rSerializer.load("DilatancyAngle",DilatancyAngle);
112  };
113 
114  };
115 
119 
121  MCPlasticFlowRule();
122 
124  MCPlasticFlowRule(YieldCriterionPointer pYieldCriterion);
125 
127  MCPlasticFlowRule(MCPlasticFlowRule const& rOther);
128 
130  MCPlasticFlowRule& operator=(MCPlasticFlowRule const& rOther);
131 
132  // CLONE
133  ParticleFlowRule::Pointer Clone() const override;
134 
136  ~MCPlasticFlowRule() override;
137 
138  bool CalculateReturnMapping( RadialReturnVariables& rReturnMappingVariables, const Matrix& rIncrementalDeformationGradient, Matrix& rStressMatrix, Matrix& rNewElasticLeftCauchyGreen, const Properties& rProp) override;
139 
140  bool UpdateInternalVariables( RadialReturnVariables& rReturnMappingVariables, const Properties& rProp ) override;
141 
142  Matrix GetElasticLeftCauchyGreen(RadialReturnVariables& rReturnMappingVariables) override;
143 
144  unsigned int GetPlasticRegion() override;
145 
146  void ComputeElastoPlasticTangentMatrix(const RadialReturnVariables& rReturnMappingVariables, const Matrix& rNewElasticLeftCauchyGreen, const double& alfa, Matrix& rConsistMatrix, const Properties& rProp) override;
147 
148  void CalculatePrincipalStressTrial(const RadialReturnVariables& rReturnMappingVariables, const Matrix& rNewElasticLeftCauchyGreen, Matrix& rStressMatrix, const Properties& rProp) override;
149 
153 
154 
158 
159 
163 
164 
168 
169 
173 
174  // /// Turn back information as a string.
175  // virtual std::string Info() const;
176 
177  // /// Print information about this object.
178  // virtual void PrintInfo(std::ostream& rOStream) const;
179 
180  // /// Print object's data.
181  // virtual void PrintData(std::ostream& rOStream) const;
182 
183 
187 
188 
190 
191 protected:
197  unsigned int mRegion;
200 
202 
205 
206 
210 
211 
215 
216 
220  void InitializeMaterial(YieldCriterionPointer& pYieldCriterion, HardeningLawPointer& pHardeningLaw, const Properties& rProp) override;
221 
222  void InitializeMaterialParameters(const Properties& rProp);
223 
224  virtual void ComputePlasticHardeningParameter(const BoundedVector<double,3>& rHenckyStrainVector, const double& rAlpha, double& rH);
225 
226  bool CalculateConsistencyCondition(RadialReturnVariables& rReturnMappingVariables, const BoundedVector<double,3>& rPrincipalStress, const BoundedVector<double,3>& rPrincipalStrain, unsigned int& region, BoundedVector<double,3>& rPrincipalStressUpdated, const Properties& rProp);
227 
228  void ComputeElasticMatrix_3X3(const RadialReturnVariables& rReturnMappingVariables, BoundedMatrix<double,3,3>& rElasticMatrix, const Properties& rProp);
229 
230  void CalculateDepSurface(BoundedMatrix<double,3,3>& rElasticMatrix, BoundedVector<double,3>& rFNorm, BoundedVector<double,3>& rGNorm, BoundedMatrix<double,3,3>& rAuxDep);
231 
232  void CalculateDepLine(BoundedMatrix<double,3,3>& rInvD, BoundedVector<double,3>& rFNorm, BoundedVector<double,3>& rGNorm, BoundedMatrix<double,3,3>& rAuxDep);
233 
234  void CalculateElastoPlasticMatrix(const RadialReturnVariables& rReturnMappingVariables, unsigned int& rRegion, BoundedVector<double,3>& DiffPrincipalStress, BoundedMatrix<double,6,6>& rDep, const Properties& rProp);
235 
236  void ReturnStressFromPrincipalAxis(const BoundedMatrix<double,3,3>& rEigenVectors, const BoundedVector<double,3>& rPrincipalStress, Matrix& rStressMatrix);
237 
238 
239  void CalculateInverseElasticMatrix(const RadialReturnVariables& rReturnMappingVariables, BoundedMatrix<double,3,3>& rInverseElasticMatrix, const Properties& rProp);
240 
241  void CalculateElasticMatrix(const RadialReturnVariables& rReturnMappingVariables, Matrix& rElasticMatrix, const Properties& rProp);
242 
243  void CalculateModificationMatrix(const RadialReturnVariables& rReturnMappingVariables, BoundedMatrix<double,3,3>& rAuxT, BoundedMatrix<double,3,3>& rInvAuxT);
244 
245  void CalculateTransformationMatrix(const BoundedMatrix<double,3,3>& rMainDirection, BoundedMatrix<double,6,6>& rA);
246 
250 
251 
255 
256 
260 
261 
263 
264 private:
267 
268 
272 
273 
277 
278 
282 
283 
287 
288 
292  friend class Serializer;
293 
294  // A private default constructor necessary for serialization
295 
296  void save(Serializer& rSerializer) const override;
297 
298  void load(Serializer& rSerializer) override;
299 
303 
304 
308 
310 
311 }; // Class NonLinearAssociativePlasticFlowRule
312 
314 
317 
318 
322 
323 
325 // inline std::istream& operator >> (std::istream& rIStream,
326 // NonLinearAssociativePlasticFlowRule& rThis);
327 
328 // /// output stream function
329 // inline std::ostream& operator << (std::ostream& rOStream,
330 // const NonLinearAssociativePlasticFlowRule& rThis)
331 // {
332 // rThis.PrintInfo(rOStream);
333 // rOStream << std::endl;
334 // rThis.PrintData(rOStream);
335 
336 // return rOStream;
337 // }
339 
341 
342 
343 
347 
348 
350 
351 
352 } // namespace Kratos.
353 
354 #endif // KRATOS_MATSUOKA_NAKAI_PLASTIC_FLOW_RULE_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: amatrix_interface.h:41
Short class definition.
Definition: mc_plastic_flow_rule.hpp:69
BoundedVector< double, 3 > mPlasticPrincipalStrain
Definition: mc_plastic_flow_rule.hpp:193
bool mLargeStrainBool
Definition: mc_plastic_flow_rule.hpp:198
BoundedVector< double, 3 > mElasticPrincipalStrain
Definition: mc_plastic_flow_rule.hpp:192
unsigned int mRegion
Definition: mc_plastic_flow_rule.hpp:197
double mEquivalentPlasticStrain
Definition: mc_plastic_flow_rule.hpp:199
KRATOS_CLASS_POINTER_DEFINITION(MCPlasticFlowRule)
Pointer definition of NonLinearAssociativePlasticFlowRule.
BoundedVector< double, 3 > mPrincipalStressUpdated
Definition: mc_plastic_flow_rule.hpp:196
MaterialParameters mMaterialParameters
Definition: mc_plastic_flow_rule.hpp:201
BoundedVector< double, 3 > mPrincipalStressTrial
Definition: mc_plastic_flow_rule.hpp:195
BoundedVector< double, 3 > mElasticPreviousPrincipalStrain
Definition: mc_plastic_flow_rule.hpp:194
Short class definition.
Definition: particle_flow_rule.hpp:61
ParticleYieldCriterion::Pointer YieldCriterionPointer
Definition: particle_flow_rule.hpp:66
ParticleHardeningLaw::Pointer HardeningLawPointer
Definition: particle_flow_rule.hpp:68
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
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
#define KRATOS_INFO(label)
Definition: logger.h:250
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
Internals::Matrix< double, AMatrix::dynamic, AMatrix::dynamic > Matrix
Definition: amatrix_interface.h:470
def load(f)
Definition: ode_solve.py:307
Definition: mc_plastic_flow_rule.hpp:82
double FrictionAngle
Definition: mc_plastic_flow_rule.hpp:84
double DilatancyAngle
Definition: mc_plastic_flow_rule.hpp:85
void PrintInfo()
Definition: mc_plastic_flow_rule.hpp:88
double Cohesion
Definition: mc_plastic_flow_rule.hpp:83
Definition: particle_flow_rule.hpp:130