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.
simo_ju_yield_surface.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosConstitutiveModelsApplication $
3 // Created by: $Author: IPouplana $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: April 2017 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_SIMO_JU_YIELD_SURFACE_H_INCLUDED )
11 #define KRATOS_SIMO_JU_YIELD_SURFACE_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
19 
20 namespace Kratos
21 {
24 
27 
31 
35 
39 
43 
45 
47  template<class THardeningRule>
48  class SimoJuYieldSurface
49  : public YieldSurface<THardeningRule>
50  {
51  public:
54 
59 
61  typedef typename BaseType::Pointer BaseTypePointer;
63 
66 
70 
73 
75  SimoJuYieldSurface(SimoJuYieldSurface const& rOther) : BaseType(rOther) {}
76 
79  {
80  BaseType::operator=(rOther);
81  return *this;
82  }
83 
85  BaseTypePointer Clone() const override
86  {
87  return Kratos::make_shared<SimoJuYieldSurface>(*this);
88  }
89 
91  ~SimoJuYieldSurface() override {}
92 
93 
97 
98 
102 
107  double& CalculateYieldCondition(const PlasticDataType& rVariables, double & rYieldCondition) override
108  {
109  KRATOS_TRY
110 
111  const ModelDataType& rModelData = rVariables.GetModelData();
112  const double& StrengthRatio = rModelData.GetProperties()[STRENGTH_RATIO];
113 
114  const double& rStressNorm = rVariables.GetStressNorm();
115  const double& rTheta = rVariables.GetRateFactor();
116 
117  rYieldCondition = (rTheta+(1.0-rTheta)/StrengthRatio)*sqrt(rStressNorm);
118 
119  return rYieldCondition;
120 
121  KRATOS_CATCH(" ")
122  }
123 
128  double& CalculateStateFunction(const PlasticDataType& rVariables, double & rStateFunction) override
129  {
130  KRATOS_TRY
131 
132  rStateFunction = this->mHardeningRule.CalculateHardening(rVariables,rStateFunction);
133 
134  return rStateFunction;
135 
136  KRATOS_CATCH(" ")
137  }
138 
139 
144  double& CalculateDeltaStateFunction(const PlasticDataType& rVariables, double & rDeltaStateFunction) override
145  {
146  KRATOS_TRY
147 
148  rDeltaStateFunction = this->mHardeningRule.CalculateDeltaHardening(rVariables,rDeltaStateFunction);
149 
150  return rDeltaStateFunction;
151 
152  KRATOS_CATCH(" ")
153  }
154 
155 
159 
160 
164 
165 
169 
171  std::string Info() const override
172  {
173  std::stringstream buffer;
174  buffer << "YieldSurface" ;
175  return buffer.str();
176  }
177 
179  void PrintInfo(std::ostream& rOStream) const override
180  {
181  rOStream << "SimoJuYieldSurface";
182  }
183 
185  void PrintData(std::ostream& rOStream) const override
186  {
187  rOStream << "SimoJuYieldSurface Data";
188  }
189 
193 
194 
196 
197  protected:
200 
201 
205 
206 
210 
211 
215 
219 
220 
224 
225 
229 
230 
232 
233  private:
236 
237 
241 
242 
246 
247 
251 
252 
256 
257 
261  friend class Serializer;
262 
263  void save(Serializer& rSerializer) const override
264  {
266  }
267 
268  void load(Serializer& rSerializer) override
269  {
271  }
272 
276 
277 
281 
283 
284  }; // Class SimoJuYieldSurface
285 
287 
290 
291 
295 
297 
299 
300 } // namespace Kratos.
301 
302 #endif // KRATOS_SIMO_JU_YIELD_SURFACE_H_INCLUDED defined
Definition: amatrix_interface.h:41
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: simo_ju_yield_surface.h:56
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: simo_ju_yield_surface.hpp:185
ConstitutiveModelData::MaterialData MaterialDataType
Definition: simo_ju_yield_surface.hpp:58
KRATOS_CLASS_POINTER_DEFINITION(SimoJuYieldSurface)
Pointer definition of SimoJuYieldSurface.
ConstitutiveModelData::ModelData ModelDataType
Definition: simo_ju_yield_surface.hpp:57
YieldSurface< THardeningRule > BaseType
Definition: simo_ju_yield_surface.hpp:60
double & CalculateStateFunction(const PlasticDataType &rVariables, double &rStateFunction) override
Definition: simo_ju_yield_surface.hpp:128
ConstitutiveModelData::VectorType VectorType
Definition: simo_ju_yield_surface.hpp:56
SimoJuYieldSurface & operator=(SimoJuYieldSurface const &rOther)
Assignment operator.
Definition: simo_ju_yield_surface.hpp:78
~SimoJuYieldSurface() override
Destructor.
Definition: simo_ju_yield_surface.hpp:91
BaseType::PlasticDataType PlasticDataType
Definition: simo_ju_yield_surface.hpp:62
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: simo_ju_yield_surface.hpp:179
SimoJuYieldSurface(SimoJuYieldSurface const &rOther)
Copy constructor.
Definition: simo_ju_yield_surface.hpp:75
double & CalculateYieldCondition(const PlasticDataType &rVariables, double &rYieldCondition) override
Definition: simo_ju_yield_surface.hpp:107
BaseTypePointer Clone() const override
Clone.
Definition: simo_ju_yield_surface.hpp:85
ConstitutiveModelData::MatrixType MatrixType
Definition: simo_ju_yield_surface.hpp:55
double & CalculateDeltaStateFunction(const PlasticDataType &rVariables, double &rDeltaStateFunction) override
Definition: simo_ju_yield_surface.hpp:144
std::string Info() const override
Turn back information as a string.
Definition: simo_ju_yield_surface.hpp:171
BaseType::Pointer BaseTypePointer
Definition: simo_ju_yield_surface.hpp:61
SimoJuYieldSurface()
Default constructor.
Definition: simo_ju_yield_surface.hpp:72
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
def load(f)
Definition: ode_solve.py:307
Definition: constitutive_model_data.hpp:92
Definition: constitutive_model_data.hpp:383
const Properties & GetProperties() const
Definition: constitutive_model_data.hpp:431