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.
cam_clay_model.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_CAM_CLAY_MODEL_H_INCLUDED )
11 #define KRATOS_CAM_CLAY_MODEL_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
22 
23 namespace Kratos
24 {
27 
30 
34 
38 
42 
46 
48 
50  class KRATOS_API(CONSTITUTIVE_MODELS_APPLICATION) CamClayModel : public NonAssociativePlasticityModel<BorjaModel, ModifiedCamClayYieldSurface<CamClayHardeningRule> >
51  {
52  public:
53 
56 
57  //elasticity model
59  typedef ElasticityModelType::Pointer ElasticityModelPointer;
60 
61  //yield surface
64  typedef YieldSurfaceType::Pointer YieldSurfacePointer;
65 
66  //base type
68 
69  //common types
70  typedef BaseType::Pointer BaseTypePointer;
78 
79 
82 
86 
89 
91  CamClayModel(CamClayModel const& rOther) : BaseType(rOther) {}
92 
95  {
96  BaseType::operator=(rOther);
97  return *this;
98  }
99 
101  ConstitutiveModel::Pointer Clone() const override
102  {
103  return Kratos::make_shared<CamClayModel>(*this);
104  }
105 
107  ~CamClayModel() override {}
108 
109 
113 
114 
118 
122  int Check(const Properties& rProperties, const ProcessInfo& rCurrentProcessInfo) override
123  {
124  KRATOS_TRY
125 
126  //LMV: to be implemented. but should not enter in the base one
127 
128  return 0;
129 
130  KRATOS_CATCH("")
131  }
132 
136 
140  bool Has(const Variable<double>& rThisVariable) override
141  {
142  if(rThisVariable == PLASTIC_STRAIN || rThisVariable == DELTA_PLASTIC_STRAIN )
143  return true;
144 
145  return false;
146  }
147 
151  void SetValue(const Variable<double>& rVariable,
152  const double& rValue,
153  const ProcessInfo& rCurrentProcessInfo) override
154  {
155  KRATOS_TRY
156 
157  if ( rVariable == NONLOCAL_PLASTIC_VOL_DEF) {
158  mInternal.Variables[4] = rValue;
159  }
160 
161  KRATOS_CATCH("")
162  }
163 
167  double& GetValue(const Variable<double>& rThisVariable, double& rValue) override
168  {
169 
170  rValue=0;
171 
172  if (rThisVariable==PLASTIC_STRAIN)
173  {
174  rValue = this->mInternal.Variables[0];
175  }
176  else if (rThisVariable==DELTA_PLASTIC_STRAIN)
177  {
178  rValue = this->mInternal.Variables[0]-mPreviousInternal.Variables[0];
179  }
180  else if (rThisVariable==PRE_CONSOLIDATION_STRESS)
181  {
182  rValue = this->mInternal.Variables[3];
183  }
184  else {
185  rValue = NonAssociativePlasticityModel::GetValue( rThisVariable, rValue);
186  }
187  return rValue;
188  }
189 
193 
194 
198 
200  std::string Info() const override
201  {
202  std::stringstream buffer;
203  buffer << "CamClayModel" ;
204  return buffer.str();
205  }
206 
208  void PrintInfo(std::ostream& rOStream) const override
209  {
210  rOStream << "CamClayModel";
211  }
212 
214  void PrintData(std::ostream& rOStream) const override
215  {
216  rOStream << "CamClayModel Data";
217  }
218 
219 
223 
224 
226 
227  protected:
230 
231 
235 
236 
240 
241 
245 
246 
250 
251 
255 
256 
260 
261 
263 
264  private:
267 
268 
272 
273 
277 
278 
282 
283 
287 
288 
292 
293 
297  friend class Serializer;
298 
299  void save(Serializer& rSerializer) const override
300  {
302  }
303 
304  void load(Serializer& rSerializer) override
305  {
306  KRATOS_SERIALIZE_LOAD_BASE_CLASS( rSerializer, BaseType )
307  }
308 
312 
313 
315 
316  }; // Class CamClayModel
317 
319 
322 
323 
327 
328 
332 
333 
335 
337 
338 
339 } // namespace Kratos.
340 
341 #endif // KRATOS_CAM_CLAY_MODEL_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Short class definition.
Definition: borja_model.hpp:48
Short class definition.
Definition: cam_clay_hardening_rule.hpp:48
Short class definition.
Definition: cam_clay_model.hpp:51
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: cam_clay_model.hpp:208
std::string Info() const override
Turn back information as a string.
Definition: cam_clay_model.hpp:200
void SetValue(const Variable< double > &rVariable, const double &rValue, const ProcessInfo &rCurrentProcessInfo) override
Definition: cam_clay_model.hpp:151
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: cam_clay_model.hpp:214
BaseType::MaterialDataType MaterialDataType
Definition: cam_clay_model.hpp:75
bool Has(const Variable< double > &rThisVariable) override
Definition: cam_clay_model.hpp:140
YieldSurfaceType::Pointer YieldSurfacePointer
Definition: cam_clay_model.hpp:64
BaseType::SizeType SizeType
Definition: cam_clay_model.hpp:71
BaseType::MatrixType MatrixType
Definition: cam_clay_model.hpp:73
ConstitutiveModel::Pointer Clone() const override
Clone.
Definition: cam_clay_model.hpp:101
CamClayHardeningRule HardeningRuleType
Definition: cam_clay_model.hpp:62
ModifiedCamClayYieldSurface< HardeningRuleType > YieldSurfaceType
Definition: cam_clay_model.hpp:63
BaseType::VoigtIndexType VoigtIndexType
Definition: cam_clay_model.hpp:72
~CamClayModel() override
Destructor.
Definition: cam_clay_model.hpp:107
BaseType::InternalVariablesType InternalVariablesType
Definition: cam_clay_model.hpp:77
BaseType::ModelDataType ModelDataType
Definition: cam_clay_model.hpp:74
NonAssociativePlasticityModel< ElasticityModelType, YieldSurfaceType > BaseType
Definition: cam_clay_model.hpp:67
BorjaModel ElasticityModelType
Definition: cam_clay_model.hpp:58
CamClayModel & operator=(CamClayModel const &rOther)
Assignment operator.
Definition: cam_clay_model.hpp:94
BaseType::Pointer BaseTypePointer
Definition: cam_clay_model.hpp:70
KRATOS_CLASS_POINTER_DEFINITION(CamClayModel)
Pointer definition of CamClayModel.
BaseType::PlasticDataType PlasticDataType
Definition: cam_clay_model.hpp:76
double & GetValue(const Variable< double > &rThisVariable, double &rValue) override
Definition: cam_clay_model.hpp:167
CamClayModel(CamClayModel const &rOther)
Copy constructor.
Definition: cam_clay_model.hpp:91
ElasticityModelType::Pointer ElasticityModelPointer
Definition: cam_clay_model.hpp:59
int Check(const Properties &rProperties, const ProcessInfo &rCurrentProcessInfo) override
Definition: cam_clay_model.hpp:122
CamClayModel()
Default constructor.
Definition: cam_clay_model.hpp:88
Definition: amatrix_interface.h:41
Short class definition.
Definition: modified_cam_clay_yield_surface.hpp:51
Short class definition.
Definition: non_associative_plasticity_model.hpp:63
BaseType::InternalVariablesType InternalVariablesType
Definition: non_associative_plasticity_model.hpp:87
BaseType::VoigtIndexType VoigtIndexType
Definition: non_associative_plasticity_model.hpp:81
virtual double & GetValue(const Variable< double > &rThisVariable, double &rValue) override
Definition: non_associative_plasticity_model.hpp:139
BaseType::SizeType SizeType
Definition: non_associative_plasticity_model.hpp:80
BaseType::PlasticDataType PlasticDataType
Definition: non_associative_plasticity_model.hpp:86
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h: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
#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