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.
modified_cam_clay_yield_surface.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosConstitutiveModelsApplication $
3 // Created by: $Author: LMonforte $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: April 2017 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_MODIFIED_CAM_CLAY_YIELD_SURFACE_H_INCLUDED )
11 #define KRATOS_MODIFIED_CAM_CLAY_YIELD_SURFACE_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
19 #include "custom_utilities/stress_invariants_utilities.hpp"
21 
22 namespace Kratos
23 {
26 
29 
33 
37 
41 
45 
47 
49  template<class THardeningRule>
50  class ModifiedCamClayYieldSurface : public YieldSurface<THardeningRule>
51  {
52  public:
53 
56 
61 
63  typedef typename BaseType::Pointer BaseTypePointer;
65 
68 
72 
75 
78 
79 
82  {
83  BaseType::operator=(rOther);
84  return *this;
85  }
86 
88  BaseTypePointer Clone() const override
89  {
90  return Kratos::make_shared<ModifiedCamClayYieldSurface>(*this);
91  }
92 
95 
96 
100 
101 
105 
110  double& CalculateYieldCondition(const PlasticDataType& rVariables, double & rYieldCondition) override
111  {
112  KRATOS_TRY
113 
114  const ModelDataType & rModelData = rVariables.GetModelData();
115  const MatrixType & rStressMatrix = rModelData.GetStressMatrix();
116 
117  // Material Parameters
118  const Properties& rProperties = rModelData.GetProperties();
119  const double& rShearM = rProperties[CRITICAL_STATE_LINE];
120  //const double & rFriction = rProperties[INTERNAL_FRICTION_ANGLE];
121 
122 
123  // compute something with the hardening rule
124  double PreconsolidationStress;
125  PreconsolidationStress = this->mHardeningRule.CalculateHardening( rVariables, PreconsolidationStress );
126 
127 
128  double MeanStress, LodeAngle;
129  double DeviatoricQ; // == sqrt(3)*J2
130 
131  // more work is requiered
132  StressInvariantsUtilities::CalculateStressInvariants( rStressMatrix, MeanStress, DeviatoricQ, LodeAngle);
133  DeviatoricQ *= sqrt(3.0);
134 
135  rYieldCondition = pow( DeviatoricQ/rShearM, 2);
136  rYieldCondition += (MeanStress * (MeanStress - PreconsolidationStress) );
137 
138 
139  //std::cout << " yield funciton: p " << MeanStress << " q: " << DeviatoricQ << " pc " << PreconsolidationStress << " yield value " << rYieldCondition << std::endl;
140  return rYieldCondition;
141 
142  KRATOS_CATCH(" ")
143  }
144 
145  //*************************************************************************************
146  //*************************************************************************************
147  // evaluation of the derivative of the yield surface respect the stresses
148  VectorType& CalculateDeltaStressYieldCondition(const PlasticDataType& rVariables, VectorType& rDeltaStressYieldCondition) override
149  {
150  KRATOS_TRY
151 
152  const ModelDataType & rModelData = rVariables.GetModelData();
153  const MatrixType & rStressMatrix = rModelData.GetStressMatrix();
154 
155  // Material Parameters
156  const Properties& rProperties = rModelData.GetProperties();
157  const double& rShearM = rProperties[CRITICAL_STATE_LINE];
158 
159  // compute something with the hardening rule
160  double PreconsolidationStress;
161  PreconsolidationStress = this->mHardeningRule.CalculateHardening( rVariables, PreconsolidationStress );
162 
163 
164  double MeanStress, J2, LodeAngle;
165 
166  VectorType V1, V2;
167  // more work is requiered
170 
171  rDeltaStressYieldCondition = ( 2.0*MeanStress - PreconsolidationStress) * V1 + 2.0 * 3.0 * pow( 1.0 / rShearM, 2) * J2 * V2;
172 
173  return rDeltaStressYieldCondition;
174 
175  KRATOS_CATCH(" ")
176  }
177 
178 
182 
183 
187 
188 
192 
193 
195  std::string Info() const override
196  {
197  std::stringstream buffer;
198  buffer << "ModifiedCamClayYieldSurface" ;
199  return buffer.str();
200  }
201 
203  void PrintInfo(std::ostream& rOStream) const override
204  {
205  rOStream << "ModifiedCamClayYieldSurface";
206  }
207 
209  void PrintData(std::ostream& rOStream) const override
210  {
211  rOStream << "ModifiedCamClayYieldSurface Data";
212  }
213 
214 
218 
219 
221 
222  protected:
225 
226 
230 
231 
235 
236 
240 
241 
245 
246 
250 
251 
255 
256 
258 
259  private:
262 
263 
267 
268 
272 
273 
277 
278 
282 
283 
287  friend class Serializer;
288 
289 
290  void save(Serializer& rSerializer) const override
291  {
293  }
294 
295  void load(Serializer& rSerializer) override
296  {
298  }
299 
303 
304 
308 
310 
311  }; // Class ModifiedCamClayYieldSurface
312 
314 
317 
318 
322 
323 
325 
327 
328 } // namespace Kratos.
329 
330 #endif // KRATOS_MODIFIED_CAM_CLAY_YIELD_SURFACE_H_INCLUDED defined
Definition: amatrix_interface.h:41
Short class definition.
Definition: modified_cam_clay_yield_surface.hpp:51
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: modified_cam_clay_yield_surface.hpp:209
YieldSurface< THardeningRule > BaseType
Definition: modified_cam_clay_yield_surface.hpp:62
BaseType::PlasticDataType PlasticDataType
Definition: modified_cam_clay_yield_surface.hpp:64
ModifiedCamClayYieldSurface()
Default constructor.
Definition: modified_cam_clay_yield_surface.hpp:74
ConstitutiveModelData::MaterialData MaterialDataType
Definition: modified_cam_clay_yield_surface.hpp:60
ModifiedCamClayYieldSurface & operator=(ModifiedCamClayYieldSurface const &rOther)
Assignment operator.
Definition: modified_cam_clay_yield_surface.hpp:81
ModifiedCamClayYieldSurface(ModifiedCamClayYieldSurface const &rOther)
Copy constructor.
Definition: modified_cam_clay_yield_surface.hpp:77
double & CalculateYieldCondition(const PlasticDataType &rVariables, double &rYieldCondition) override
Definition: modified_cam_clay_yield_surface.hpp:110
BaseType::Pointer BaseTypePointer
Definition: modified_cam_clay_yield_surface.hpp:63
~ModifiedCamClayYieldSurface() override
Destructor.
Definition: modified_cam_clay_yield_surface.hpp:94
ConstitutiveModelData::VectorType VectorType
Definition: modified_cam_clay_yield_surface.hpp:58
KRATOS_CLASS_POINTER_DEFINITION(ModifiedCamClayYieldSurface)
Pointer definition of ModifiedCamClayYieldSurface.
std::string Info() const override
Turn back information as a string.
Definition: modified_cam_clay_yield_surface.hpp:195
BaseTypePointer Clone() const override
Clone.
Definition: modified_cam_clay_yield_surface.hpp:88
ConstitutiveModelData::MatrixType MatrixType
Definition: modified_cam_clay_yield_surface.hpp:57
VectorType & CalculateDeltaStressYieldCondition(const PlasticDataType &rVariables, VectorType &rDeltaStressYieldCondition) override
Definition: modified_cam_clay_yield_surface.hpp:148
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: modified_cam_clay_yield_surface.hpp:203
ConstitutiveModelData::ModelData ModelDataType
Definition: modified_cam_clay_yield_surface.hpp:59
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
static void CalculateStressInvariants(const MatrixType &rStressMatrix, double &rI1, double &rJ2)
Definition: stress_invariants_utilities.hpp:45
static void CalculateDerivativeVectors(const MatrixType &rStressMatrix, VectorType &C1, VectorType &C2)
Definition: stress_invariants_utilities.hpp:101
Short class definition.
Definition: yield_surface.hpp:50
THardeningRule::PlasticDataType PlasticDataType
Definition: yield_surface.hpp:62
HardeningRuleType mHardeningRule
Definition: yield_surface.hpp:295
YieldSurface & operator=(YieldSurface const &rOther)
Assignment operator.
Definition: yield_surface.hpp:79
#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
float J2
Definition: isotropic_damage_automatic_differentiation.py:133
float LodeAngle
Definition: isotropic_damage_automatic_differentiation.py:181
def load(f)
Definition: ode_solve.py:307
Definition: constitutive_model_data.hpp:92
Definition: constitutive_model_data.hpp:383