10 #if !defined(KRATOS_NON_LINEAR_RATE_DEPENDENT_PLASTICITY_MODEL_H_INCLUDED )
11 #define KRATOS_NON_LINEAR_RATE_DEPENDENT_PLASTICITY_MODEL_H_INCLUDED
48 template<
class TElasticityModel,
class TYieldSurface>
104 ConstitutiveModel::Pointer
Clone()
const override
106 return Kratos::make_shared<NonLinearRateDependentPlasticityModel>(*
this);
138 std::string
Info()
const override
140 std::stringstream buffer;
141 buffer <<
"NonLinearRateDependentPlasticityModel" ;
148 rOStream <<
"NonLinearRateDependentPlasticityModel";
154 rOStream <<
"NonLinearRateDependentPlasticityModel Data";
187 bool converged =
false;
190 rVariables.State().Set(ConstitutiveModelData::PLASTIC_RATE_REGION,
true);
191 rVariables.RateFactor=1;
192 converged = CalculateRateDependentReturnMapping(rVariables,rStressMatrix);
198 const double& rDeltaTime = rModelData.
GetProcessInfo()[DELTA_TIME];
201 const double& rPlasticStrainRate = rProperties[PLASTIC_STRAIN_RATE];
204 double MaterialDeltaPlasticStrain = rPlasticStrainRate * rDeltaTime;
208 double& rDeltaGamma = rVariables.DeltaInternal.Variables[0];
210 if( sqrt(2.0/3.0) * rDeltaGamma < MaterialDeltaPlasticStrain ){
215 rVariables.State().Set(ConstitutiveModelData::PLASTIC_RATE_REGION,
false);
216 rVariables.RateFactor=0;
218 converged = CalculateRateIndependentReturnMapping(rVariables,rStressMatrix);
236 unsigned int iter = 0;
237 double Tolerance = 1
e-5;
238 double MaxIterations = 50;
241 double DeltaDeltaGamma = 0;
242 double DeltaStateFunction = 0;
243 double DeltaPlasticStrain = 0;
245 double& rEquivalentPlasticStrainOld = this->mPreviousInternal.Variables[0];
246 double& rEquivalentPlasticStrain = rVariables.Internal.Variables[0];
247 double& rDeltaGamma = rVariables.DeltaInternal.Variables[0];
251 const double& rDeltaTime = rModelData.
GetProcessInfo()[DELTA_TIME];
254 const double& rPlasticStrainRate = rProperties[PLASTIC_STRAIN_RATE];
257 rEquivalentPlasticStrain = 0;
258 rDeltaGamma = sqrt(3.0*0.5) * rPlasticStrainRate * rDeltaTime;
260 DeltaPlasticStrain = sqrt(2.0/3.0) * rDeltaGamma;
261 rEquivalentPlasticStrain = rEquivalentPlasticStrainOld + DeltaPlasticStrain;
263 double StateFunction = this->mYieldSurface.CalculateStateFunction( rVariables, StateFunction );
266 while ( fabs(StateFunction)>=Tolerance && iter<=MaxIterations)
269 DeltaStateFunction = this->mYieldSurface.CalculateDeltaStateFunction( rVariables, DeltaStateFunction );
272 DeltaDeltaGamma = StateFunction/DeltaStateFunction;
273 rDeltaGamma += DeltaDeltaGamma;
276 DeltaPlasticStrain = sqrt(2.0/3.0) * rDeltaGamma;
280 rEquivalentPlasticStrain = rEquivalentPlasticStrainOld +
alpha * DeltaPlasticStrain;
283 StateFunction = this->mYieldSurface.CalculateStateFunction( rVariables, StateFunction );
289 if(iter>MaxIterations)
304 unsigned int iter = 0;
305 double Tolerance = 1
e-5;
306 double MaxIterations = 50;
309 double DeltaDeltaGamma = 0;
310 double DeltaStateFunction = 0;
311 double DeltaPlasticStrain = 0;
313 double& rEquivalentPlasticStrainOld = this->mPreviousInternal.Variables[0];
314 double& rEquivalentPlasticStrain = rVariables.Internal.Variables[0];
315 double& rDeltaGamma = rVariables.DeltaInternal.Variables[0];
317 rEquivalentPlasticStrain = 0;
320 DeltaPlasticStrain = sqrt(2.0/3.0) * rDeltaGamma;
321 rEquivalentPlasticStrain = rEquivalentPlasticStrainOld + DeltaPlasticStrain;
323 double StateFunction = rVariables.TrialStateFunction;
326 while ( fabs(StateFunction)>=Tolerance && iter<=MaxIterations)
329 DeltaStateFunction = this->mYieldSurface.CalculateDeltaStateFunction( rVariables, DeltaStateFunction );
332 DeltaDeltaGamma = StateFunction/DeltaStateFunction;
333 rDeltaGamma += DeltaDeltaGamma;
336 DeltaPlasticStrain = sqrt(2.0/3.0) * rDeltaGamma;
340 rEquivalentPlasticStrain = rEquivalentPlasticStrainOld +
alpha * DeltaPlasticStrain;
343 StateFunction = this->mYieldSurface.CalculateStateFunction( rVariables, StateFunction );
349 if(iter>MaxIterations)
366 const double& rEquivalentPlasticStrain = rVariables.GetInternalVariables()[0];
367 const double& rEquivalentPlasticStrainOld = this->mPreviousInternal.Variables[0];
369 double& rDeltaGamma = rVariables.Internal.Variables[0];
370 const double& rDeltaTime = rModelData.
GetProcessInfo()[DELTA_TIME];
374 rDeltaGamma = sqrt(3.0*0.5) * ( rEquivalentPlasticStrain - rEquivalentPlasticStrainOld );
377 this->UpdateStressConfiguration(rVariables,rStressMatrix);
380 if( rDeltaGamma > 0 ){
382 const Properties& rProperties = rModelData.GetProperties();
384 const double& rPlasticStrainRate =rProperties[PLASTIC_STRAIN_RATE];
386 double MaterialDeltaPlasticStrain = rPlasticStrainRate * rDeltaTime;
389 rVariables.State().Set(ConstitutiveModelData::PLASTIC_RATE_REGION,
true);
390 rVariables.RateFactor=1;
392 if( sqrt(2.0/3.0) * rDeltaGamma < MaterialDeltaPlasticStrain ){
395 rVariables.State().Set(ConstitutiveModelData::PLASTIC_RATE_REGION,
false);
396 rVariables.RateFactor=0;
399 this->CalculateImplexThermalDissipation( rVariables );
401 rVariables.State().Set(ConstitutiveModelData::PLASTIC_REGION,
true);
406 this->mThermalVariables.PlasticDissipation = 0;
407 this->mThermalVariables.DeltaPlasticDissipation = 0;
419 unsigned int iter = 0;
420 double MaxIterations = 10;
423 double& rDeltaGamma = rVariables.DeltaInternal.Variables[0];
424 double DeltaGamma = sqrt(2.0/3.0) * rDeltaGamma;
426 double StateFunction = this->mYieldSurface.CalculateStateFunction( rVariables, StateFunction );
427 double R0 = sqrt(2.0/3.0) * rDeltaGamma * StateFunction;
431 double& rEquivalentPlasticStrain = rVariables.GetInternalVariables()[0];
432 const double& rEquivalentPlasticStrainOld = this->mPreviousInternal.Variables[0];
434 rEquivalentPlasticStrain = rEquivalentPlasticStrainOld + sqrt(2.0/3.0) * rDeltaGamma;
435 StateFunction = this->mYieldSurface.CalculateStateFunction( rVariables, StateFunction );
437 double R1 = sqrt(2.0/3.0) * rDeltaGamma * StateFunction;
445 if(fabs(R1)<fabs(R0))
455 while ( fabs(R2/R0start)>0.3 && iter<MaxIterations && (R1*R0)<0 && fabs(R1)>1
e-7 && fabs(R0)>1
e-7 )
458 rAlpha = 0.5*(nabla+
delta);
460 rDeltaGamma *= rAlpha;
462 rEquivalentPlasticStrain = rEquivalentPlasticStrainOld + sqrt(2.0/3.0) * rDeltaGamma;
464 StateFunction = this->mYieldSurface.CalculateStateFunction( rVariables, StateFunction );
466 R2 = sqrt(2.0/3.0) * rDeltaGamma * StateFunction;
468 rDeltaGamma /= rAlpha;
489 rDeltaGamma = DeltaGamma;
492 std::cout<<
" [ LINE SEARCH: (Iterations: "<<iter<<
", rAlpha: "<<rAlpha<<
") ] "<<std::endl;
495 if(rAlpha>1 || rAlpha<=0)
550 void save(
Serializer& rSerializer)
const override
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: amatrix_interface.h:41
Short class definition.
Definition: non_linear_associative_plasticity_model.hpp:50
BaseType::PlasticDataType PlasticDataType
Definition: non_linear_associative_plasticity_model.hpp:72
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::MatrixType MatrixType
Definition: non_linear_rate_dependent_plasticity_model.hpp:74
~NonLinearRateDependentPlasticityModel() override
Destructor.
Definition: non_linear_rate_dependent_plasticity_model.hpp:110
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: non_linear_rate_dependent_plasticity_model.hpp:152
bool CalculateReturnMapping(PlasticDataType &rVariables, MatrixType &rStressMatrix) override
Definition: non_linear_rate_dependent_plasticity_model.hpp:183
BaseType::ModelDataType ModelDataType
Definition: non_linear_rate_dependent_plasticity_model.hpp:75
NonLinearAssociativePlasticityModel< ElasticityModelType, YieldSurfaceType > DerivedType
Definition: non_linear_rate_dependent_plasticity_model.hpp:65
ConstitutiveModel::Pointer Clone() const override
Clone.
Definition: non_linear_rate_dependent_plasticity_model.hpp:104
BaseType::PlasticDataType PlasticDataType
Definition: non_linear_rate_dependent_plasticity_model.hpp:77
bool CalculateRateDependentReturnMapping(PlasticDataType &rVariables, MatrixType &rStressMatrix)
Definition: non_linear_rate_dependent_plasticity_model.hpp:231
NonLinearRateDependentPlasticityModel(ElasticityModelPointer pElasticityModel, YieldSurfacePointer pYieldSurface)
Constructor.
Definition: non_linear_rate_dependent_plasticity_model.hpp:91
NonLinearRateDependentPlasticityModel & operator=(NonLinearRateDependentPlasticityModel const &rOther)
Assignment operator.
Definition: non_linear_rate_dependent_plasticity_model.hpp:97
NonLinearRateDependentPlasticityModel()
Default constructor.
Definition: non_linear_rate_dependent_plasticity_model.hpp:88
NonLinearRateDependentPlasticityModel(NonLinearRateDependentPlasticityModel const &rOther)
Copy constructor.
Definition: non_linear_rate_dependent_plasticity_model.hpp:94
TElasticityModel ElasticityModelType
Definition: non_linear_rate_dependent_plasticity_model.hpp:57
YieldSurfaceType::Pointer YieldSurfacePointer
Definition: non_linear_rate_dependent_plasticity_model.hpp:62
bool CalculateRateIndependentReturnMapping(PlasticDataType &rVariables, MatrixType &rStressMatrix)
Definition: non_linear_rate_dependent_plasticity_model.hpp:299
BaseType::Pointer BaseTypePointer
Definition: non_linear_rate_dependent_plasticity_model.hpp:71
PlasticityModel< ElasticityModelType, YieldSurfaceType > BaseType
Definition: non_linear_rate_dependent_plasticity_model.hpp:68
std::string Info() const override
Turn back information as a string.
Definition: non_linear_rate_dependent_plasticity_model.hpp:138
double & CalculateLineSearch(PlasticDataType &rVariables, double &rAlpha)
Definition: non_linear_rate_dependent_plasticity_model.hpp:414
KRATOS_CLASS_POINTER_DEFINITION(NonLinearRateDependentPlasticityModel)
Pointer definition of NonLinearRateDependentPlasticityModel.
BaseType::InternalVariablesType InternalVariablesType
Definition: non_linear_rate_dependent_plasticity_model.hpp:78
void CalculateImplexReturnMapping(PlasticDataType &rVariables, MatrixType &rStressMatrix) override
Definition: non_linear_rate_dependent_plasticity_model.hpp:360
TYieldSurface YieldSurfaceType
Definition: non_linear_rate_dependent_plasticity_model.hpp:61
BaseType::MaterialDataType MaterialDataType
Definition: non_linear_rate_dependent_plasticity_model.hpp:76
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: non_linear_rate_dependent_plasticity_model.hpp:146
ElasticityModelType::Pointer ElasticityModelPointer
Definition: non_linear_rate_dependent_plasticity_model.hpp:58
BaseType::VoigtIndexType VoigtIndexType
Definition: non_linear_rate_dependent_plasticity_model.hpp:73
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
#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
alpha
Definition: generate_convection_diffusion_explicit_element.py:113
def load(f)
Definition: ode_solve.py:307
double precision, dimension(3, 3), public delta
Definition: TensorModule.f:16
e
Definition: run_cpp_mpi_tests.py:31
Definition: constitutive_model_data.hpp:92
Definition: constitutive_model_data.hpp:383
const Properties & GetProperties() const
Definition: constitutive_model_data.hpp:431
const ProcessInfo & GetProcessInfo() const
Definition: constitutive_model_data.hpp:435