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.
borja_cam_clay_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: Bodhinanda Chandra
11 //
12 
13 
14 #if !defined(KRATOS_BORJA_CAM_CLAY_PLASTIC_FLOW_RULE_H_INCLUDED )
15 #define KRATOS_BORJA_CAM_CLAY_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) BorjaCamClayPlasticFlowRule
68  :public ParticleFlowRule
69 {
70 
71 
72 
73 public:
76 
79 
81  {
85 
86  public:
87  void PrintInfo()
88  {
89  KRATOS_INFO("ParticleFlowRule.MaterialParameters") << "PreconsolidationPressure = " << PreconsolidationPressure << std::endl;
90  KRATOS_INFO("ParticleFlowRule.MaterialParameters") << "PlasticHardeningModulus = " << PlasticHardeningModulus << std::endl;
91  KRATOS_INFO("ParticleFlowRule.MaterialParameters") << "ConsistencyParameter = " << ConsistencyParameter << std::endl;
92  }
93 
94  private:
95 
96  friend class Serializer;
97 
98  // A private default constructor necessary for serialization
99  void save(Serializer& rSerializer) const
100  {
101  rSerializer.save("PreconsolidationPressure",PreconsolidationPressure);
102  rSerializer.save("PlasticHardeningModulus",PlasticHardeningModulus);
103  rSerializer.save("ConsistencyParameter",ConsistencyParameter);
104  };
105 
106  void load(Serializer& rSerializer)
107  {
108  rSerializer.load("PreconsolidationPressure",PreconsolidationPressure);
109  rSerializer.load("PlasticHardeningModulus",PlasticHardeningModulus);
110  rSerializer.load("ConsistencyParameter",ConsistencyParameter);
111  };
112 
113  };
114 
118 
120  BorjaCamClayPlasticFlowRule();
121 
123  BorjaCamClayPlasticFlowRule(YieldCriterionPointer pYieldCriterion);
124 
126  BorjaCamClayPlasticFlowRule(BorjaCamClayPlasticFlowRule const& rOther);
127 
129  BorjaCamClayPlasticFlowRule& operator=(BorjaCamClayPlasticFlowRule const& rOther);
130 
131  // CLONE
132  ParticleFlowRule::Pointer Clone() const override;
133 
135  ~BorjaCamClayPlasticFlowRule() override;
136 
137  bool CalculateReturnMapping( RadialReturnVariables& rReturnMappingVariables, const Matrix& rIncrementalDeformationGradient, Matrix& rStressMatrix, Matrix& rNewElasticLeftCauchyGreen, const Properties& rProp) override;
138 
139  bool UpdateInternalVariables( RadialReturnVariables& rReturnMappingVariables, const Properties& rProp ) override;
140 
141  Matrix GetElasticLeftCauchyGreen(RadialReturnVariables& rReturnMappingVariables) override;
142 
143  unsigned int GetPlasticRegion() override;
144 
145  void ComputeElastoPlasticTangentMatrix(const RadialReturnVariables& rReturnMappingVariables, const Matrix& rNewElasticLeftCauchyGreen, const double& alfa, Matrix& rConsistMatrix, const Properties& rProp) override;
146 
147  void CalculatePrincipalStressTrial(const RadialReturnVariables& rReturnMappingVariables, const Matrix& rNewElasticLeftCauchyGreen, Matrix& rStressMatrix, const Properties& rProp) override;
148 
152 
153 
157 
158 
162 
163 
167 
168 
172 
173  // /// Turn back information as a string.
174  // virtual std::string Info() const;
175 
176  // /// Print information about this object.
177  // virtual void PrintInfo(std::ostream& rOStream) const;
178 
179  // /// Print object's data.
180  // virtual void PrintData(std::ostream& rOStream) const;
181 
182 
186 
187 
189 
190 protected:
193 
195 
196  unsigned int mRegion;
198 
200 
202 
206 
209 
210 
214 
215 
219 
220 
224  void InitializeMaterial(YieldCriterionPointer& pYieldCriterion, HardeningLawPointer& pHardeningLaw, const Properties& rProp) override;
225 
226  void InitializeMaterialParameters(const Properties& rProp);
227 
228  void CalculatePrincipalStressVector(const BoundedVector<double,3>& rPrincipalStrain, BoundedVector<double,3>& rPrincipalStress, const Properties& rProp);
229 
230  void CalculateMeanStress(const double& rVolumetricStrain, const double& rDeviatoricStrain, double& rMeanStress, const Properties& rProp);
231 
232  void CalculateDeviatoricStress(const double& rVolumetricStrain, const BoundedVector<double,3>& rDeviatoricStrainVector, BoundedVector<double,3>& rDeviatoricStress, const Properties& rProp);
233 
234  void CalculatePrincipalStrainFromStrainInvariants(BoundedVector<double,3>& rPrincipalStrain, const double& rVolumetricStrain, const double& rDeviatoricStrain, const BoundedVector<double,3>& rDirectionVector);
235 
236  void CalculateStrainInvariantsFromPrincipalStrain(const BoundedVector<double,3>& rPrincipalStrain, double& rVolumetricStrain, double& rDeviatoricStrain, BoundedVector<double,3>& rDeviatoricStrainVector);
237 
238  bool CalculateConsistencyCondition(RadialReturnVariables& rReturnMappingVariables, const BoundedVector<double,3>& rPrincipalStress, BoundedVector<double,3>& rPrincipalStrain, unsigned int& region, BoundedVector<double,3>& rPrincipalStressUpdated, const Properties& rProp);
239 
240  void CalculateLHSMatrix(Matrix& rLHSMatrix, const BoundedVector<double,3>& rPrincipalStressVector, const BoundedVector<double,3>& rUnknownVector, const double& rK_p, const Properties& rProp);
241 
242  void CalculateHessianMatrix_2x2(BoundedMatrix<double,2,2>& rHessianMatrix, const Properties& rProp);
243 
244  void ComputeElasticMatrix_2X2(const BoundedVector<double,3>& rPrincipalStressVector, const double& rVolumetricStrain, const double& rDeviatoricStrain, BoundedMatrix<double,2,2>& rElasticMatrix, const Properties& rProp);
245 
246  void ComputePlasticMatrix_2X2(const BoundedVector<double,3>& rPrincipalStressVector, const double& rVolumetricStrain, const double& rDeviatoricStrain, const BoundedMatrix<double,2,2>& rElasticMatrix, BoundedMatrix<double,2,2>& rPlasticMatrix, const Properties& rProp);
247 
248  void ReturnStressFromPrincipalAxis(const Matrix& rEigenVectors, const BoundedVector<double,3>& rPrincipalStress, Matrix& rStressMatrix);
249 
250  void CalculateTransformationMatrix(const BoundedMatrix<double,3,3>& rMainDirection, BoundedMatrix<double,6,6>& rA);
251 
252  void UpdateStateVariables(const BoundedVector<double,3> rPrincipalStress, const Properties& rProp, const double rAlpha = 0.0, const double rConsistencyParameter = 0.0);
253 
257 
258 
262 
263 
267 
268 
270 
271 private:
274 
275 
279 
280 
284 
285 
289 
290 
294 
295 
299  friend class Serializer;
300 
301  // A private default constructor necessary for serialization
302 
303  void save(Serializer& rSerializer) const override;
304 
305  void load(Serializer& rSerializer) override;
306 
310 
311 
315 
317 
318 }; // Class NonLinearAssociativePlasticFlowRule
319 
321 
324 
325 
329 
330 
332 // inline std::istream& operator >> (std::istream& rIStream,
333 // NonLinearAssociativePlasticFlowRule& rThis);
334 
335 // /// output stream function
336 // inline std::ostream& operator << (std::ostream& rOStream,
337 // const NonLinearAssociativePlasticFlowRule& rThis)
338 // {
339 // rThis.PrintInfo(rOStream);
340 // rOStream << std::endl;
341 // rThis.PrintData(rOStream);
342 
343 // return rOStream;
344 // }
346 
348 
349 
350 
354 
355 
357 
358 
359 } // namespace Kratos.
360 
361 #endif // KRATOS_BORJA_CAM_CLAY_PLASTIC_FLOW_RULE_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Short class definition.
Definition: borja_cam_clay_plastic_flow_rule.hpp:69
BoundedVector< double, 3 > mElasticPrincipalStrain
Definition: borja_cam_clay_plastic_flow_rule.hpp:191
MaterialParameters mMaterialParameters
Definition: borja_cam_clay_plastic_flow_rule.hpp:199
bool mLargeStrainBool
Definition: borja_cam_clay_plastic_flow_rule.hpp:197
double mInitialVolumetricStrain
Definition: borja_cam_clay_plastic_flow_rule.hpp:201
double mStateFunction
Definition: borja_cam_clay_plastic_flow_rule.hpp:203
unsigned int mRegion
Definition: borja_cam_clay_plastic_flow_rule.hpp:196
BoundedVector< double, 3 > mPrincipalStressUpdated
Definition: borja_cam_clay_plastic_flow_rule.hpp:194
Vector mStateFunctionFirstDerivative
Definition: borja_cam_clay_plastic_flow_rule.hpp:204
KRATOS_CLASS_POINTER_DEFINITION(BorjaCamClayPlasticFlowRule)
Pointer definition of NonLinearAssociativePlasticFlowRule.
Vector mStateFunctionSecondDerivative
Definition: borja_cam_clay_plastic_flow_rule.hpp:205
BoundedVector< double, 3 > mPlasticPrincipalStrain
Definition: borja_cam_clay_plastic_flow_rule.hpp:192
Definition: amatrix_interface.h:41
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: borja_cam_clay_plastic_flow_rule.hpp:81
double PreconsolidationPressure
Definition: borja_cam_clay_plastic_flow_rule.hpp:82
double ConsistencyParameter
Definition: borja_cam_clay_plastic_flow_rule.hpp:84
void PrintInfo()
Definition: borja_cam_clay_plastic_flow_rule.hpp:87
double PlasticHardeningModulus
Definition: borja_cam_clay_plastic_flow_rule.hpp:83
Definition: particle_flow_rule.hpp:130