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.
baker_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_BAKER_JOHNSON_COOK_J2_THERMO_PLASTICITY_MODEL_H_INCLUDED )
11 #define KRATOS_BAKER_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) BakerJohnsonCookJ2ThermoPlasticityModel : public NonLinearRateDependentPlasticityModel<IncompressibleNeoHookeanModel, MisesHuberThermalYieldSurface<BakerJohnsonCookThermalHardeningRule> >
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<BakerJohnsonCookJ2ThermoPlasticityModel>(*this);
104  }
105 
108 
109 
113 
114 
118 
119 
123 
129  void GetDomainVariablesList(std::vector<Variable<double> >& rScalarVariables,
130  std::vector<Variable<array_1d<double,3> > >& rComponentVariables) override
131  {
132  KRATOS_TRY
133 
134  PlasticityModel::GetDomainVariablesList(rScalarVariables, rComponentVariables);
135 
136  rScalarVariables.push_back(TEMPERATURE);
137 
138  KRATOS_CATCH(" ")
139  }
140 
141 
145  bool Has(const Variable<double>& rThisVariable) override
146  {
147  if(rThisVariable == PLASTIC_STRAIN || rThisVariable == DELTA_PLASTIC_STRAIN )
148  return true;
149 
150  if(rThisVariable == PLASTIC_DISSIPATION || rThisVariable == DELTA_PLASTIC_DISSIPATION )
151  return true;
152 
153  return false;
154  }
155 
156 
160  double& GetValue(const Variable<double>& rThisVariable, double& rValue) override
161  {
162 
163  rValue=0;
164 
165  if (rThisVariable==PLASTIC_STRAIN)
166  {
167  rValue = this->mInternal.Variables[0];
168  }
169 
170 
171  if (rThisVariable==DELTA_PLASTIC_STRAIN)
172  {
173  rValue = this->mInternal.Variables[0]-mPreviousInternal.Variables[0];
174  }
175 
176  if (rThisVariable==PLASTIC_DISSIPATION)
177  {
178  rValue = this->mThermalVariables.PlasticDissipation;
179  }
180 
181 
182  if (rThisVariable==DELTA_PLASTIC_DISSIPATION)
183  {
184  rValue = this->mThermalVariables.DeltaPlasticDissipation;
185  }
186 
187  return rValue;
188  }
189 
193 
194 
198 
200  std::string Info() const override
201  {
202  std::stringstream buffer;
203  buffer << "BakerJohnsonCookJ2ThermoPlasticityModel" ;
204  return buffer.str();
205  }
206 
208  void PrintInfo(std::ostream& rOStream) const override
209  {
210  rOStream << "BakerJohnsonCookJ2ThermoPlasticityModel";
211  }
212 
214  void PrintData(std::ostream& rOStream) const override
215  {
216  rOStream << "BakerJohnsonCookJ2ThermoPlasticityModel Data";
217  }
218 
222 
223 
225 
226  protected:
229 
230 
234 
235 
239 
240 
244 
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  void save(Serializer& rSerializer) const override
299  {
301  }
302 
303  void load(Serializer& rSerializer) override
304  {
305  KRATOS_SERIALIZE_LOAD_BASE_CLASS( rSerializer, BaseType )
306  }
307 
311 
312 
314 
315  }; // Class BakerJohnsonCookJ2ThermoPlasticityModel
316 
318 
321 
322 
326 
327 
331 
332 
334 
336 
337 
338 } // namespace Kratos.
339 
340 #endif // KRATOS_BAKER_JOHNSON_COOK_J2_THERMO_PLASTICITY_MODEL_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Short class definition.
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:51
KRATOS_CLASS_POINTER_DEFINITION(BakerJohnsonCookJ2ThermoPlasticityModel)
Pointer definition of BakerJohnsonCookJ2ThermoPlasticityModel.
YieldSurfaceType::Pointer YieldSurfacePointer
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:64
ConstitutiveModel::Pointer Clone() const override
Clone.
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:101
IncompressibleNeoHookeanModel ElasticityModelType
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:58
BakerJohnsonCookJ2ThermoPlasticityModel()
Default constructor.
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:88
bool Has(const Variable< double > &rThisVariable) override
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:145
BakerJohnsonCookJ2ThermoPlasticityModel & operator=(BakerJohnsonCookJ2ThermoPlasticityModel const &rOther)
Assignment operator.
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:94
BaseType::MaterialDataType MaterialDataType
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:75
std::string Info() const override
Turn back information as a string.
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:200
ElasticityModelType::Pointer ElasticityModelPointer
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:59
BaseType::SizeType SizeType
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:71
BaseType::ModelDataType ModelDataType
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:74
BaseType::PlasticDataType PlasticDataType
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:76
double & GetValue(const Variable< double > &rThisVariable, double &rValue) override
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:160
NonLinearRateDependentPlasticityModel< ElasticityModelType, YieldSurfaceType > BaseType
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:67
~BakerJohnsonCookJ2ThermoPlasticityModel() override
Destructor.
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:107
BakerJohnsonCookJ2ThermoPlasticityModel(BakerJohnsonCookJ2ThermoPlasticityModel const &rOther)
Copy constructor.
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:91
BaseType::Pointer BaseTypePointer
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:70
MisesHuberThermalYieldSurface< HardeningRuleType > YieldSurfaceType
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:63
void GetDomainVariablesList(std::vector< Variable< double > > &rScalarVariables, std::vector< Variable< array_1d< double, 3 > > > &rComponentVariables) override
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:129
BaseType::MatrixType MatrixType
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:73
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:208
BaseType::VoigtIndexType VoigtIndexType
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:72
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:214
BaseType::InternalVariablesType InternalVariablesType
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:77
BakerJohnsonCookThermalHardeningRule HardeningRuleType
Definition: baker_johnson_cook_J2_thermo_plasticity_model.hpp:62
Short class definition.
Definition: baker_johnson_cook_thermal_hardening_rule.hpp:49
Short class definition.
Definition: incompressible_neo_hookean_model.hpp:50
Definition: amatrix_interface.h:41
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