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.
non_associative_explicit_flow_rule.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosPfemSolidMechanicsApplication $
3 // Created by: $Author: LMonforte $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: July 2015 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
11 // NON ASSOCIATIVE, WITH HARDENING, PLASTIC FLOW RULE COMPUTED IN EXPLICITLY
12 
13 #if !defined(KRATOS_NON_ASSOCIATIVE_EXPLICIT_PLASTIC_FLOW_RULE_H_INCLUDED)
14 #define KRATOS_NON_ASSOCIATIVE_EXPLICIT_PLASTIC_FLOW_RULE_H_INCLUDED
15 
16 
17 // System includes
18 
19 // External includes
20 #include<cmath>
21 // Project includes
22 #include "custom_constitutive/custom_flow_rules/flow_rule.hpp"
23 
25 
26 namespace Kratos
27 {
30 
33 
37 
41 
45 
49 
51 
53  class KRATOS_API(PFEM_SOLID_MECHANICS_APPLICATION) NonAssociativeExplicitPlasticFlowRule
54  :public FlowRule
55  {
56  public:
60  {
63 
65  };
66 
68  {
73 
74  };
77 
81 
84 
87 
90 
92  NonAssociativeExplicitPlasticFlowRule& operator=(NonAssociativeExplicitPlasticFlowRule const& rOther); // {FlowRule::operator=(rOther); return *this;} ;
93 
94 
97 
98 
102 
104  FlowRule::Pointer Clone() const override;
105 
109 
110  void InitializeMaterial (YieldCriterionPointer& pYieldCriterion, HardeningLawPointer& pHardeningLaw, const Properties& rMaterialProperties) override;
111 
112  void InitializeMaterial (const Properties& rMaterialProperties) override;
113 
114  virtual bool CalculateReturnMappingImpl( RadialReturnVariables& rReturnMappingVariables, const Matrix &rIncrementalDeformationGradient, Matrix& rStressMatrix, Matrix& rNewElasticLeftCauchyGreen);
115 
116  //virtual bool CalculateReturnMappingImpl2( RadialReturnVariables& rReturnMappingVariables, const Matrix &rIncrementalDeformationGradient, Matrix& rStressMatrix, Matrix& rNewElasticLeftCauchyGreen); TAKE ME OUT
117 
118  virtual bool CalculateReturnMappingExpl( RadialReturnVariables& rReturnMappingVariables, const Matrix &rIncrementalDeformationGradient, Matrix& rStressMatrix, Matrix& rNewElasticLeftCauchyGreen);
119 
120  bool CalculateReturnMapping( RadialReturnVariables& rReturnMappingVariables, const Matrix &rIncrementalDeformationGradient, Matrix& rStressMatrix, Matrix& rNewElasticLeftCauchyGreen) override;
121 
122  virtual bool CalculateReturnMappingImplex( RadialReturnVariables& rReturnMappingVariables, const Matrix &rIncrementalDeformationGradient, Matrix& rStressMatrix, Matrix& rNewElasticLeftCauchyGreen);
123 
124  virtual bool CalculateReturnMappingImplex2( RadialReturnVariables& rReturnMappingVariables, const Matrix &rIncrementalDeformationGradient, Matrix& rStressMatrix, Matrix& rNewElasticLeftCauchyGreen);
125 
126  bool UpdateInternalVariables( RadialReturnVariables& rReturnMappingVariables ) override;
127 
128 
129  void ComputeElastoPlasticTangentMatrix(const RadialReturnVariables& rReturnMappingVariables, const Matrix& rLeftCauchyGreenMatrix, const double& rAlpha, Matrix& rElasticMatrix) override;
130 
131  virtual void ComputeElasticMatrix(const Vector& rElasticStrainVector, Matrix& rElasticMatrix)
132  {
133  KRATOS_THROW_ERROR( std::logic_error, "calling not the base class but another function in FlowRule ... illegal operation!!", "" )
134  };
135 
136 
137  Matrix ComputeKirchhoffStressMatrix( const Matrix & rLeftCauchyGreenMatrix) override;
138 
142 
143 
147 
148 
152 
153  // /// Turn back information as a string.
154  // std::string Info() const override;
155 
156  // /// Print information about this object.
157  // void PrintInfo(std::ostream& rOStream) const override;
158 
159  // /// Print object's data.
160  // void PrintData(std::ostream& rOStream) const override;
161 
162 
166 
167 
169 
170  protected:
173 
174 
178  //Vector mTrialEigenValues;
179  //Matrix mEigenVectors;
180 
181 
183 
187 
188 
192 
193  Matrix MyCrossProduct(const Matrix& rM, const Vector& rA, const Vector& rB);
194 
195  bool& EvaluateElastoPlasticUnloadingCondition( bool& rUnloadingCondition, const Matrix& rElasticLeftCauchyGreen, const Matrix& rDeltaDeformationGradient, const InternalVariables& rPlasticVariables, const double & rTolerance);
196 
197  void CalculateOneExplicitPlasticStep(const Matrix& rDeltaDeformationGradient, const Matrix& rPreviousElasticLeftCauchyGreen, const double& rPreviousEquivalentPlasticStrain, Matrix& rNewElasticLeftCauchyGreen, double& rNewEquivalentPlasticStrain, double& rNewPlasticShearStrain, double& rDeltaPlastic);
198 
199  virtual void CalculateKirchhoffStressVector(const Vector& rElasticHenckyStrain, Vector& rNewStressVector)
200  {
201  KRATOS_THROW_ERROR( std::logic_error, "Calling the base class function in NonAss FlowRule ... illegal operation!", "" )
202  };
203 
204  virtual void ComputePlasticHardeningParameter(const Vector& rStressVector, const double& rAlpha, double& rH)
205  {
206  KRATOS_THROW_ERROR( std::logic_error, "Calling the base class function in NonAss FlowRule ... illegal operation!", "" )
207  };
208 
209  Matrix ConvertHenckyStrainToCauchyGreenTensor(const Vector& rElasticHenckyStrain);
210 
211  Vector ConvertCauchyGreenTensorToHenckyStrain(const Matrix& rCauchyGreenTensor);
212 
213  void UpdateDerivatives(const Vector& rHenckyElasticStrain, AuxiliarDerivativesStructure & rAuxiliarDerivatives, const double& EquivalentPlasticStrian) ;
214 
215  virtual void CalculatePlasticPotentialDerivatives(const Vector& rPrincipalStress, Vector& rFirstDerivative, Matrix& rSecondDerivative)
216  {
217  KRATOS_THROW_ERROR( std::logic_error, "Calling the base class function in NonAss FlowRule ... illegal operation!", "" )
218  };
219 
220  void ComputeSubstepIncrementalDeformationGradient(const Matrix& rDeformationGradient, const double& rReferenceConfiguration, const double& rFinalConfiguration, Matrix& rIncrementalDeformationGradient);
221 
222 
223  void CalculateOneExplicitStep(const Matrix& rDeltaDeformationGradient, const Matrix& rPreviousElasticLeftCauchyGreen, const RadialReturnVariables& rReturnMappingVariables, Matrix& rNewElasticLeftCauchyGreen, Vector& rNewStressVector, const bool& rElastoPlasticBool, ExplicitStressUpdateInformation& rStressUpdateInformation);
224 
225 
226  void CalculateExplicitSolutionWithChange(const Matrix& rDeltaDeformationGradient, const Matrix& rPreviousElasticLeftCauchyGreen, RadialReturnVariables& rReturnMappingVariables, Matrix& rNewElasticLeftCauchyGreen, Vector& rNewStressVector, const double& rTolerance);
227 
228  void CalculateExplicitSolution( const Matrix & rDeltaDeformationGradient, const Matrix& rPreviousElasticLeftCauchyGreen, RadialReturnVariables& rReturnMappingVariables, Matrix& rNewElasticLeftCauchyGreen, Vector& rNewStressVector, const bool& rElastoPlasticBool, const double& rTolerance);
229 
230  // Calculates Stress From ElasticLeftCauchyGreen
231  void CalculateKirchhoffStressVector( const Matrix& rElasticLeftCauchyGreen, Vector& rStressVector);
232 
233  void UpdateRadialReturnVariables(RadialReturnVariables& rReturnMappingVariables, const ExplicitStressUpdateInformation& rStressUpdateInformation);
234 
235 
236 
237  void ReturnStressToYieldSurface4( RadialReturnVariables& rReturnMappingVariables, Matrix& rElasticLeftCauchyGreen, Vector& rStressVector, double& rDrift, const double& rTolerance);
238 
239  void ReturnStressToYieldSurface( RadialReturnVariables& rReturnMappingVariables, Matrix& rElasticLeftCauchyGreen, Vector& rStressVector, double& rDrift, const double& rTolerance);
240 
241 
242 
243  void PerformSomeSortOfLineSearch( Vector& rHenckyElastic, double& rGamma, double& rAlpha, const Vector& rHenckyTrialElastic, const double& rAlphaTrial, double& rReidualNorm, const double& rPreviousError, const Vector& rDeltaX);
244 
245 // void UpdateConfiguration( RadialReturnVariables& rReturnMappingVariables, Matrix & rIsoStressMatrix );
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 
355 
356 #endif //KRATOS-NON_ASSOCIATIVE_EXPLICIT_PLASTIC_FLOW_RULE_H_INCLUDED
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Short class definition.
Definition: flow_rule.hpp:51
HardeningLaw::Pointer HardeningLawPointer
Definition: flow_rule.hpp:57
YieldCriterion::Pointer YieldCriterionPointer
Definition: flow_rule.hpp:56
Short class definition.
Definition: non_associative_explicit_flow_rule.hpp:55
virtual void ComputeElasticMatrix(const Vector &rElasticStrainVector, Matrix &rElasticMatrix)
Definition: non_associative_explicit_flow_rule.hpp:131
KRATOS_CLASS_POINTER_DEFINITION(NonAssociativeExplicitPlasticFlowRule)
Pointer definition of NonLinearAssociativePlasticFlowRule.
virtual void CalculateKirchhoffStressVector(const Vector &rElasticHenckyStrain, Vector &rNewStressVector)
Definition: non_associative_explicit_flow_rule.hpp:199
virtual void CalculatePlasticPotentialDerivatives(const Vector &rPrincipalStress, Vector &rFirstDerivative, Matrix &rSecondDerivative)
Definition: non_associative_explicit_flow_rule.hpp:215
virtual void ComputePlasticHardeningParameter(const Vector &rStressVector, const double &rAlpha, double &rH)
Definition: non_associative_explicit_flow_rule.hpp:204
double mPlasticMultiplierVelocity
Definition: non_associative_explicit_flow_rule.hpp:182
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
#define KRATOS_THROW_ERROR(ExceptionType, ErrorMessage, MoreInfo)
Definition: define.h:77
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307
Definition: flow_rule.hpp:175
Definition: flow_rule.hpp:121
Definition: non_associative_explicit_flow_rule.hpp:60
Vector YieldFunctionD
Definition: non_associative_explicit_flow_rule.hpp:62
Matrix PlasticPotentialDD
Definition: non_associative_explicit_flow_rule.hpp:64
Vector PlasticPotentialD
Definition: non_associative_explicit_flow_rule.hpp:61
Definition: non_associative_explicit_flow_rule.hpp:68
double StressErrorMeasure
Definition: non_associative_explicit_flow_rule.hpp:69
double NewEquivalentPlasticStrain
Definition: non_associative_explicit_flow_rule.hpp:70
double DeltaDeltaPlastic
Definition: non_associative_explicit_flow_rule.hpp:72
double IncrementPlasticStrain
Definition: non_associative_explicit_flow_rule.hpp:71