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.
johnson_cook_J2_thermo_plasticity_model.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosConstitutiveModelsApplication $
3 // Created by: $Author: JMCarbonell $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: April 2017 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_JOHNSON_COOK_J2_THERMO_PLASTICITY_MODEL_H_INCLUDED )
11 #define KRATOS_JOHNSON_COOK_J2_THERMO_PLASTICITY_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) JohnsonCookJ2ThermoPlasticityModel : public NonLinearRateDependentPlasticityModel<IncompressibleNeoHookeanModel, MisesHuberThermalYieldSurface<JohnsonCookThermalHardeningRule> >
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 
92 
95  {
96  BaseType::operator=(rOther);
97  return *this;
98  }
99 
101  ConstitutiveModel::Pointer Clone() const override
102  {
103  return Kratos::make_shared<JohnsonCookJ2ThermoPlasticityModel>(*this);
104  }
105 
108 
109 
113 
114 
118 
119 
123 
124 
130  void GetDomainVariablesList(std::vector<Variable<double> >& rScalarVariables,
131  std::vector<Variable<array_1d<double,3> > >& rComponentVariables) override
132  {
133  KRATOS_TRY
134 
135  PlasticityModel::GetDomainVariablesList(rScalarVariables, rComponentVariables);
136 
137  rScalarVariables.push_back(TEMPERATURE);
138 
139  KRATOS_CATCH(" ")
140  }
141 
142 
146  bool Has(const Variable<double>& rThisVariable) override
147  {
148  if(rThisVariable == PLASTIC_STRAIN || rThisVariable == DELTA_PLASTIC_STRAIN )
149  return true;
150 
151  if(rThisVariable == PLASTIC_DISSIPATION || rThisVariable == DELTA_PLASTIC_DISSIPATION )
152  return true;
153 
154  return false;
155  }
156 
157 
161  double& GetValue(const Variable<double>& rThisVariable, double& rValue) override
162  {
163 
164  rValue=0;
165 
166  if (rThisVariable==PLASTIC_STRAIN)
167  {
168  rValue = this->mInternal.Variables[0];
169  }
170 
171 
172  if (rThisVariable==DELTA_PLASTIC_STRAIN)
173  {
174  rValue = this->mInternal.Variables[0]-mPreviousInternal.Variables[0];
175  }
176 
177  if (rThisVariable==PLASTIC_DISSIPATION)
178  {
179  rValue = this->mThermalVariables.PlasticDissipation;
180  }
181 
182 
183  if (rThisVariable==DELTA_PLASTIC_DISSIPATION)
184  {
185  rValue = this->mThermalVariables.DeltaPlasticDissipation;
186  }
187 
188  return rValue;
189  }
190 
194 
195 
199 
201  std::string Info() const override
202  {
203  std::stringstream buffer;
204  buffer << "JohnsonCookJ2ThermoPlasticityModel" ;
205  return buffer.str();
206  }
207 
209  void PrintInfo(std::ostream& rOStream) const override
210  {
211  rOStream << "JohnsonCookJ2ThermoPlasticityModel";
212  }
213 
215  void PrintData(std::ostream& rOStream) const override
216  {
217  rOStream << "JohnsonCookJ2ThermoPlasticityModel Data";
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 JohnsonCookJ2ThermoPlasticityModel
317 
319 
322 
323 
327 
328 
332 
333 
335 
337 
338 
339 } // namespace Kratos.
340 
341 #endif // KRATOS_JOHNSON_COOK_J2_THERMO_PLASTICITY_MODEL_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Short class definition.
Definition: incompressible_neo_hookean_model.hpp:50
Definition: amatrix_interface.h:41
Short class definition.
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:51
BaseType::InternalVariablesType InternalVariablesType
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:77
BaseType::ModelDataType ModelDataType
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:74
void GetDomainVariablesList(std::vector< Variable< double > > &rScalarVariables, std::vector< Variable< array_1d< double, 3 > > > &rComponentVariables) override
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:130
NonLinearRateDependentPlasticityModel< ElasticityModelType, YieldSurfaceType > BaseType
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:67
MisesHuberThermalYieldSurface< HardeningRuleType > YieldSurfaceType
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:63
JohnsonCookJ2ThermoPlasticityModel()
Default constructor.
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:88
KRATOS_CLASS_POINTER_DEFINITION(JohnsonCookJ2ThermoPlasticityModel)
Pointer definition of JohnsonCookJ2ThermoPlasticityModel.
BaseType::PlasticDataType PlasticDataType
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:76
BaseType::MaterialDataType MaterialDataType
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:75
JohnsonCookThermalHardeningRule HardeningRuleType
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:62
BaseType::Pointer BaseTypePointer
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:70
BaseType::MatrixType MatrixType
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:73
ElasticityModelType::Pointer ElasticityModelPointer
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:59
ConstitutiveModel::Pointer Clone() const override
Clone.
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:101
BaseType::SizeType SizeType
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:71
double & GetValue(const Variable< double > &rThisVariable, double &rValue) override
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:161
bool Has(const Variable< double > &rThisVariable) override
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:146
~JohnsonCookJ2ThermoPlasticityModel() override
Destructor.
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:107
JohnsonCookJ2ThermoPlasticityModel(JohnsonCookJ2ThermoPlasticityModel const &rOther)
Copy constructor.
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:91
std::string Info() const override
Turn back information as a string.
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:201
YieldSurfaceType::Pointer YieldSurfacePointer
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:64
BaseType::VoigtIndexType VoigtIndexType
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:72
IncompressibleNeoHookeanModel ElasticityModelType
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:58
JohnsonCookJ2ThermoPlasticityModel & operator=(JohnsonCookJ2ThermoPlasticityModel const &rOther)
Assignment operator.
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:94
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:215
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: johnson_cook_J2_thermo_plasticity_model.hpp:209
Short class definition.
Definition: johnson_cook_thermal_hardening_rule.hpp:49
Short class definition.
Definition: mises_huber_thermal_yield_surface.hpp:50
Short class definition.
Definition: non_linear_rate_dependent_plasticity_model.hpp:50
BaseType::SizeType SizeType
Definition: non_linear_rate_dependent_plasticity_model.hpp:72
BaseType::PlasticDataType PlasticDataType
Definition: non_linear_rate_dependent_plasticity_model.hpp:77
BaseType::InternalVariablesType InternalVariablesType
Definition: non_linear_rate_dependent_plasticity_model.hpp:78
BaseType::VoigtIndexType VoigtIndexType
Definition: non_linear_rate_dependent_plasticity_model.hpp:73
void GetDomainVariablesList(std::vector< Variable< double > > &rScalarVariables, std::vector< Variable< array_1d< double, 3 > > > &rComponentVariables) override
Definition: plasticity_model.hpp:259
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