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.
v2_gens_nova_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: MCiantia $
5 // Date: $Date: July 2018 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_V2_GENS_NOVA_MODEL_H_INCLUDED )
11 #define KRATOS_V2_GENS_NOVA_MODEL_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 #include <iostream>
17 #include <fstream>
18 
19 // Project includes
25 
26 
27 
28 //***** the hardening law associated to this Model has ... variables
29 // 0. Plastic multiplier
30 // 1. Plastic Volumetric deformation
31 // 2. Plastic Deviatoric deformation
32 // 3. ps (mechanical)
33 // 4. pt (ageing)
34 // 5. pcSTAR = ps + (1+k) p_t
35 // 6. Plastic Volumetric deformation Absolut Value
36 // 7. NonLocal Plastic Vol Def
37 // 8. NonLocal Plastic Dev Def
38 // 9. NonLocal Plastic Vol Def ABS
39 // ... (the number now is then..., xD)
40 
41 namespace Kratos
42 {
45 
48 
52 
56 
60 
64 
66 
68  class KRATOS_API(CONSTITUTIVE_MODELS_APPLICATION) V2GensNovaModel : public StructuredSoilModel<TamagniniModel, GensNovaYieldSurface<GensNovaHardeningRule> >
69  {
70  public:
71 
74 
75  //elasticity model
76  //typedef BorjaModel ElasticityModelType;
78  typedef ElasticityModelType::Pointer ElasticityModelPointer;
79 
80  //yield surface
83  typedef YieldSurfaceType::Pointer YieldSurfacePointer;
84 
85  //base type
87 
88  //common types
89  typedef BaseType::Pointer BaseTypePointer;
97 
98 
101 
105 
107  V2GensNovaModel() : BaseType() { mInitialized = false; }
108 
110  V2GensNovaModel(V2GensNovaModel const& rOther) : BaseType(rOther) {}
111 
114  {
115  BaseType::operator=(rOther);
116  return *this;
117  }
118 
120  ConstitutiveModel::Pointer Clone() const override
121  {
122  return ( V2GensNovaModel::Pointer(new V2GensNovaModel(*this)) );
123  }
124 
126  virtual ~V2GensNovaModel() {}
127 
128 
132 
133 
137 
138 
142 
143 
147 
148 
152 
154  virtual std::string Info() const override
155  {
156  std::stringstream buffer;
157  buffer << "V2GensNovaModel" ;
158  return buffer.str();
159  }
160 
162  virtual void PrintInfo(std::ostream& rOStream) const override
163  {
164  rOStream << "V2GensNovaModel";
165  }
166 
168  virtual void PrintData(std::ostream& rOStream) const override
169  {
170  rOStream << "V2GensNovaModel Data";
171  }
172 
173 
177 
178 
180 
181  protected:
184 
185 
189 
190 
194 
195 
199  // Calculate Stress and constitutive tensor
200  void CalculateStressAndConstitutiveTensors(ModelDataType& rValues, MatrixType& rStressMatrix, Matrix& rConstitutiveMatrix) override
201  {
202  KRATOS_TRY
203 
204  // integrate "analytically" ps and pt from plastic variables. Then update the internal variables.
205 
206  PlasticDataType Variables;
207  this->InitializeVariables( rValues, Variables);
208 
209  const ModelDataType & rModelData = Variables.GetModelData();
210  const Properties & rMaterialProperties = rModelData.GetProperties();
211 
212  const double & rPs0 = rMaterialProperties[PS];
213  const double & rPt0 = rMaterialProperties[PT];
214  const double & rChis = rMaterialProperties[CHIS];
215  const double & rChit = rMaterialProperties[CHIT];
216  const double & rhos = rMaterialProperties[RHOS];
217  const double & rhot = rMaterialProperties[RHOT];
218  const double & k = rMaterialProperties[KSIM];
219 
220  const double & rPlasticVolDef = Variables.Internal.Variables[1];
221  const double & rPlasticDevDef = Variables.Internal.Variables[2];
222  const double & rPlasticVolDefAbs = Variables.Internal.Variables[6];
223 
224  double sq2_3 = sqrt(2.0/3.0);
225 
226  double ps;
227  ps = rPlasticVolDef + sq2_3 * rChis * rPlasticDevDef;
228  ps = (-rPs0) * std::exp( -rhos*ps);
229 
230  double pt;
231  pt = rPlasticVolDefAbs + sq2_3 * rChit * rPlasticDevDef;
232  pt = (-rPt0) * std::exp( rhot*pt);
233 
234  double pm;
235  pm = ps + (1.0+k)*pt;
236 
237 
238  mInternal.Variables[3] = ps;
239  mInternal.Variables[4] = pt;
240  mInternal.Variables[5] = pm;
241 
242  StructuredSoilModel::CalculateStressAndConstitutiveTensors( rValues, rStressMatrix, rConstitutiveMatrix);
243 
244  KRATOS_CATCH("")
245  }
249 
250 
254 
255 
259 
260 
262 
263  private:
266 
267 
271 
272 
276 
277 
281 
282 
286 
287 
291 
292 
296  friend class Serializer;
297 
298  virtual void save(Serializer& rSerializer) const override
299  {
301  }
302 
303  virtual void load(Serializer& rSerializer) override
304  {
305  KRATOS_SERIALIZE_LOAD_BASE_CLASS( rSerializer, BaseType )
306  }
307 
311 
312 
314 
315  }; // Class V2GensNovaModel
316 
318 
321 
322 
326 
327 
331 
332 
334 
336 
337 
338 } // namespace Kratos.
339 
340 #endif // KRATOS_V2_GENS_NOVA_MODEL_H_INCLUDED defined
341 
342 
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Short class definition.
Definition: gens_nova_hardening_rule.hpp:48
Short class definition.
Definition: gens_nova_yield_surface.hpp:51
Definition: amatrix_interface.h:41
void CalculateStressAndConstitutiveTensors(ModelDataType &rValues, MatrixType &rStressMatrix, Matrix &rConstitutiveMatrix) override
Definition: non_associative_plasticity_model.hpp:222
BaseType::PlasticDataType PlasticDataType
Definition: non_associative_plasticity_model.hpp:86
Short class definition.
Definition: plasticity_model.hpp:50
TYieldSurface::InternalVariablesType InternalVariablesType
Definition: plasticity_model.hpp:69
ConstitutiveModelData::SizeType SizeType
Definition: plasticity_model.hpp:63
ConstitutiveModelData::VoigtIndexType VoigtIndexType
Definition: plasticity_model.hpp:64
TYieldSurface::PlasticDataType PlasticDataType
Definition: plasticity_model.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
Short class definition.
Definition: structured_soil_model.hpp:66
Short class definition.
Definition: tamagnini_model.hpp:48
Short class definition.
Definition: v2_gens_nova_model.hpp:69
V2GensNovaModel()
Default constructor.
Definition: v2_gens_nova_model.hpp:107
YieldSurfaceType::Pointer YieldSurfacePointer
Definition: v2_gens_nova_model.hpp:83
virtual std::string Info() const override
Turn back information as a string.
Definition: v2_gens_nova_model.hpp:154
BaseType::VoigtIndexType VoigtIndexType
Definition: v2_gens_nova_model.hpp:91
BaseType::MaterialDataType MaterialDataType
Definition: v2_gens_nova_model.hpp:94
GensNovaYieldSurface< HardeningRuleType > YieldSurfaceType
Definition: v2_gens_nova_model.hpp:82
void CalculateStressAndConstitutiveTensors(ModelDataType &rValues, MatrixType &rStressMatrix, Matrix &rConstitutiveMatrix) override
Definition: v2_gens_nova_model.hpp:200
StructuredSoilModel< ElasticityModelType, YieldSurfaceType > BaseType
Definition: v2_gens_nova_model.hpp:86
ElasticityModelType::Pointer ElasticityModelPointer
Definition: v2_gens_nova_model.hpp:78
KRATOS_CLASS_POINTER_DEFINITION(V2GensNovaModel)
Pointer definition of V2GensNovaModel.
V2GensNovaModel(V2GensNovaModel const &rOther)
Copy constructor.
Definition: v2_gens_nova_model.hpp:110
BaseType::Pointer BaseTypePointer
Definition: v2_gens_nova_model.hpp:89
BaseType::MatrixType MatrixType
Definition: v2_gens_nova_model.hpp:92
V2GensNovaModel & operator=(V2GensNovaModel const &rOther)
Assignment operator.
Definition: v2_gens_nova_model.hpp:113
GensNovaHardeningRule HardeningRuleType
Definition: v2_gens_nova_model.hpp:81
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: v2_gens_nova_model.hpp:162
BaseType::InternalVariablesType InternalVariablesType
Definition: v2_gens_nova_model.hpp:96
BaseType::PlasticDataType PlasticDataType
Definition: v2_gens_nova_model.hpp:95
BaseType::SizeType SizeType
Definition: v2_gens_nova_model.hpp:90
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: v2_gens_nova_model.hpp:168
virtual ~V2GensNovaModel()
Destructor.
Definition: v2_gens_nova_model.hpp:126
BaseType::ModelDataType ModelDataType
Definition: v2_gens_nova_model.hpp:93
ConstitutiveModel::Pointer Clone() const override
Clone.
Definition: v2_gens_nova_model.hpp:120
TamagniniModel ElasticityModelType
Definition: v2_gens_nova_model.hpp:77
#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
void InitializeVariables(TContainerType &rContainer, const Variable< TDataType > &rOutputVariable, const Variable< TDataType > &rReferenceVariable)
Definition: temporal_method_utilities.h:36
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307
int k
Definition: quadrature.py:595
Definition: constitutive_model_data.hpp:92
Definition: constitutive_model_data.hpp:383
const Properties & GetProperties() const
Definition: constitutive_model_data.hpp:431