10 #if !defined(KRATOS_STRUCTURED_SOIL_MODEL_H_INCLUDED )
11 #define KRATOS_STRUCTURED_SOIL_MODEL_H_INCLUDED
64 template<
class TElasticityModel,
class TYieldSurface>
118 ConstitutiveModel::Pointer
Clone()
const override
144 if (mInitialized ==
false) {
151 double k = rMaterialProperties[KSIM];
153 double & rPS = Variables.Internal.Variables[3];
154 double & rPT = Variables.Internal.Variables[4];
155 double & rPCstar = Variables.Internal.Variables[5];
157 rPS = -rMaterialProperties[PS];
158 rPT = -rMaterialProperties[PT];
159 rPCstar = rPS + (1.0+
k)*rPT;
162 this->UpdateInternalVariables(rValues, Variables,
Stress);
167 this->mElasticityModel.InitializeModel( rValues );
195 if(rThisVariable == PLASTIC_STRAIN || rThisVariable == DELTA_PLASTIC_STRAIN )
206 const double& rValue,
211 if ( rVariable == NONLOCAL_PLASTIC_VOL_DEF) {
212 this->mInternal.Variables[7] = rValue;
214 else if ( rVariable == NONLOCAL_PLASTIC_DEV_DEF) {
215 this->mInternal.Variables[8] = rValue;
217 else if ( rVariable == NONLOCAL_PLASTIC_VOL_DEF_ABS) {
218 this->mInternal.Variables[9] = rValue;
234 if (rThisVariable==PLASTIC_STRAIN)
236 rValue = this->mInternal.Variables[0];
238 else if (rThisVariable==DELTA_PLASTIC_STRAIN)
240 rValue = this->mInternal.Variables[0]-this->mPreviousInternal.Variables[0];
242 else if ( rThisVariable == PS)
244 rValue = this->mInternal.Variables[3];
246 else if ( rThisVariable == PT)
248 rValue = this->mInternal.Variables[4];
250 else if ( rThisVariable == PM)
252 rValue = this->mInternal.Variables[5];
254 else if ( rThisVariable == PLASTIC_VOL_DEF)
256 rValue = this->mInternal.Variables[1];
258 else if ( rThisVariable == PLASTIC_DEV_DEF)
260 rValue = this->mInternal.Variables[2];
262 else if ( rThisVariable == PLASTIC_VOL_DEF_ABS)
264 rValue = this->mInternal.Variables[6];
266 else if ( rThisVariable == NONLOCAL_PLASTIC_VOL_DEF)
268 rValue = this->mPreviousInternal.Variables[7];
270 else if ( rThisVariable == NONLOCAL_PLASTIC_DEV_DEF)
272 rValue = this->mPreviousInternal.Variables[8];
274 else if ( rThisVariable == NONLOCAL_PLASTIC_VOL_DEF_ABS)
276 rValue = this->mPreviousInternal.Variables[9];
296 virtual std::string
Info()
const override
298 std::stringstream buffer;
299 buffer <<
"StructuredSoilModel" ;
304 virtual void PrintInfo(std::ostream& rOStream)
const override
306 rOStream <<
"StructuredSoilModel";
310 virtual void PrintData(std::ostream& rOStream)
const override
312 rOStream <<
"StructuredSoilModel Data";
354 Matrix ElasticMatrix(6,6);
356 this->mElasticityModel.CalculateConstitutiveTensor( rValues, ElasticMatrix);
358 VectorType DeltaStressYieldCondition = this->mYieldSurface.CalculateDeltaStressYieldCondition( rVariables, DeltaStressYieldCondition);
360 PlasticPotentialDerivative = DeltaStressYieldCondition;
365 double H = this->mYieldSurface.GetHardeningRule().CalculateDeltaHardening( rVariables,
H, PlasticPotDerTensor);
370 Matrix PlasticUpdateMatrix(6,6);
373 for (
unsigned int i = 0;
i < 6;
i++) {
374 denom += AuxF(
i)*PlasticPotentialDerivative(
i);
375 for (
unsigned int j = 0;
j < 6;
j++) {
376 PlasticUpdateMatrix(
i,
j) = AuxF(
i) * AuxG(
j);
380 rEPMatrix -= PlasticUpdateMatrix / (
H + denom);
392 const ModelDataType & rModelData = rVariables.GetModelData();
393 const Properties & rMaterialProperties = rModelData.GetProperties();
394 const double & rhos = rMaterialProperties[RHOS];
395 const double & rhot = rMaterialProperties[RHOT];
396 double k = rMaterialProperties[KSIM];
398 const double & rChis = rMaterialProperties[CHIS];
399 const double & rChit = rMaterialProperties[CHIT];
403 double & rPlasticVolDef = rVariables.Internal.Variables[1];
404 double & rPlasticMultiplier = rVariables.Internal.Variables[0];
405 double & rPlasticDevDef = rVariables.Internal.Variables[2];
406 double & rPS = rVariables.Internal.Variables[3];
407 double & rPT = rVariables.Internal.Variables[4];
408 double & rPCstar = rVariables.Internal.Variables[5];
410 Matrix ElasticMatrix(6,6);
412 this->mElasticityModel.CalculateConstitutiveTensor( rValues, ElasticMatrix);
414 VectorType DeltaStressYieldCondition = this->mYieldSurface.CalculateDeltaStressYieldCondition( rVariables, DeltaStressYieldCondition);
416 PlasticPotentialDerivative = DeltaStressYieldCondition;
420 double H = this->mYieldSurface.GetHardeningRule().CalculateDeltaHardening( rVariables,
H, PlasticPotDerTensor);
422 MatrixType StrainMatrix =
prod( rDeltaDeformationMatrix,
trans( rDeltaDeformationMatrix) );
424 this->ConvertCauchyGreenTensorToHenckyVector( StrainMatrix, StrainVector);
427 AuxVector =
prod( ElasticMatrix, StrainVector);
433 DeltaGamma /= Denominador;
439 this->ConvertHenckyVectorToCauchyGreenTensor( -DeltaGamma * PlasticPotentialDerivative / 2.0, UpdateMatrix);
440 UpdateMatrix =
prod( rDeltaDeformationMatrix, UpdateMatrix);
446 this->mElasticityModel.CalculateStressTensor( rValues, StressMatrix);
448 rPlasticMultiplier += DeltaGamma;
449 double VolPlasticIncr = 0.0;
450 for (
unsigned int i = 0;
i < 3;
i++)
451 VolPlasticIncr += DeltaGamma * DeltaStressYieldCondition(
i);
452 rPlasticVolDef += VolPlasticIncr;
454 double DevPlasticIncr = 0.0;
455 for (
unsigned int i = 0;
i < 3;
i++)
456 DevPlasticIncr += pow( DeltaGamma * DeltaStressYieldCondition(
i) - VolPlasticIncr/3.0, 2.0);
457 for (
unsigned int i = 3;
i < 6;
i++)
458 DevPlasticIncr += 2.0 * pow( DeltaGamma * DeltaStressYieldCondition(
i) /2.0 , 2.0);
459 DevPlasticIncr = sqrt(DevPlasticIncr);
460 rPlasticDevDef += DevPlasticIncr;
463 double hs = rhos * ( rPS) * ( VolPlasticIncr + rChis*sqrt(2.0/3.0) * DevPlasticIncr );
464 double ht = rhot * (-rPT) * (fabs(VolPlasticIncr) + rChit*sqrt(2.0/3.0) * DevPlasticIncr );
469 rPCstar = rPS + (1.0 +
k)*rPT;
481 this->mPreviousInternal.Variables[6] = this->mInternal.Variables[6];
482 this->mInternal.Variables[6] = this->mInternal.Variables[6] + fabs( rVariables.Internal.Variables[1] - this->mInternal.Variables[1]);
483 for (
unsigned int i = 0;
i < 6;
i++) {
484 double & rCurrentPlasticVariable = rVariables.Internal.Variables[
i];
485 double & rPreviousPlasticVariable = this->mInternal.Variables[
i];
487 this->mPreviousInternal.Variables[
i] = rPreviousPlasticVariable;
488 rPreviousPlasticVariable = rCurrentPlasticVariable;
504 double Tolerance = 1
e-7;
507 this->mElasticityModel.CalculateStressTensor( rValues, StressMatrix);
513 const ModelDataType & rModelData = rVariables.GetModelData();
515 double rhos = rMaterialProperties[RHOS];
516 double rhot = rMaterialProperties[RHOT];
517 double chis = rMaterialProperties[CHIS];
518 double chit = rMaterialProperties[CHIT];
519 double k = rMaterialProperties[KSIM];
521 double & rPlasticVolDef = rVariables.Internal.Variables[1];
523 double & rPlasticDevDef = rVariables.Internal.Variables[2];
524 double & rPS = rVariables.Internal.Variables[3];
525 double & rPT = rVariables.Internal.Variables[4];
526 double & rPCstar = rVariables.Internal.Variables[5];
528 for (
unsigned int i = 0;
i < 150;
i++) {
530 Matrix ElasticMatrix(6,6);
532 this->mElasticityModel.CalculateConstitutiveTensor( rValues, ElasticMatrix);
534 VectorType DeltaStressYieldCondition = this->mYieldSurface.CalculateDeltaStressYieldCondition( rVariables, DeltaStressYieldCondition);
536 PlasticPotentialDerivative = DeltaStressYieldCondition;
540 double H = this->mYieldSurface.GetHardeningRule().CalculateDeltaHardening( rVariables,
H, PlasticPotDerTensor);
546 this->ConvertHenckyVectorToCauchyGreenTensor( -DeltaGamma * PlasticPotentialDerivative / 2.0, UpdateMatrix);
551 this->mElasticityModel.CalculateStressTensor( rValues, StressMatrix);
553 double VolPlasticIncr = 0.0;
554 for (
unsigned int i = 0;
i < 3;
i++)
555 VolPlasticIncr += DeltaGamma * DeltaStressYieldCondition(
i);
556 rPlasticVolDef += VolPlasticIncr;
558 double DevPlasticIncr = 0.0;
559 for (
unsigned int i = 0;
i < 3;
i++)
560 DevPlasticIncr += pow( DeltaGamma * DeltaStressYieldCondition(
i) - VolPlasticIncr/3.0, 2.0);
561 for (
unsigned int i = 3;
i < 6;
i++)
562 DevPlasticIncr += 2.0 * pow( DeltaGamma * DeltaStressYieldCondition(
i) /2.0 , 2.0);
563 DevPlasticIncr = DeltaGamma/fabs(DeltaGamma) * sqrt(DevPlasticIncr);
564 rPlasticDevDef += DevPlasticIncr;
567 double hs = rhos * rPS * (VolPlasticIncr + chis * sqrt(2.0/3.0)* DevPlasticIncr);
568 double ht = rhot * (-rPT) * ( fabs(VolPlasticIncr) + chit*sqrt(2.0/3.0)*DevPlasticIncr);
572 rPCstar = rPS + (1.0 +
k)*rPT;
582 std::cout <<
" theStressPointDidNotReturnedCorrectly " <<
YieldSurface << std::endl;
638 virtual void save(
Serializer& rSerializer)
const override
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
static MatrixType & StrainVectorToTensor(const array_1d< double, 6 > &rVector, MatrixType &rMatrix)
Definition: constitutive_model_utilities.hpp:619
Definition: amatrix_interface.h:41
static double Dot(const Vector &rFirstVector, const Vector &rSecondVector)
Performs the dot product of two vectors of arbitrary size.
Definition: math_utils.h:669
Short class definition.
Definition: non_associative_plasticity_model.hpp:63
virtual double & GetValue(const Variable< double > &rThisVariable, double &rValue) override
Definition: non_associative_plasticity_model.hpp:139
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
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
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
BaseType::PlasticDataType PlasticDataType
Definition: structured_soil_model.hpp:93
BaseType::VoigtIndexType VoigtIndexType
Definition: structured_soil_model.hpp:88
TElasticityModel ElasticityModelType
Definition: structured_soil_model.hpp:73
bool mInitialized
Definition: structured_soil_model.hpp:332
virtual void UpdateInternalVariables(ModelDataType &rValues, PlasticDataType &rVariables, const MatrixType &rStressMatrix) override
Definition: structured_soil_model.hpp:477
BaseType::ModelDataType ModelDataType
Definition: structured_soil_model.hpp:91
BaseType::InternalVariablesType InternalVariablesType
Definition: structured_soil_model.hpp:94
BaseType::Pointer BaseTypePointer
Definition: structured_soil_model.hpp:86
ConstitutiveModel::Pointer Clone() const override
Clone.
Definition: structured_soil_model.hpp:118
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: structured_soil_model.hpp:304
virtual ~StructuredSoilModel()
Destructor.
Definition: structured_soil_model.hpp:124
virtual void ReturnStressToYieldSurface(ModelDataType &rValues, PlasticDataType &rVariables) override
Definition: structured_soil_model.hpp:498
BaseType::VectorType VectorType
Definition: structured_soil_model.hpp:90
virtual std::string Info() const override
Turn back information as a string.
Definition: structured_soil_model.hpp:296
StructuredSoilModel(StructuredSoilModel const &rOther)
Copy constructor.
Definition: structured_soil_model.hpp:108
void SetValue(const Variable< double > &rVariable, const double &rValue, const ProcessInfo &rCurrentProcessInfo) override
Definition: structured_soil_model.hpp:205
NonAssociativePlasticityModel< ElasticityModelType, YieldSurfaceType > DerivedType
Definition: structured_soil_model.hpp:80
virtual bool Has(const Variable< double > &rThisVariable) override
Definition: structured_soil_model.hpp:193
StructuredSoilModel()
Default constructor.
Definition: structured_soil_model.hpp:105
virtual double & GetValue(const Variable< double > &rThisVariable, double &rValue) override
Definition: structured_soil_model.hpp:228
TYieldSurface YieldSurfaceType
Definition: structured_soil_model.hpp:76
StructuredSoilModel & operator=(StructuredSoilModel const &rOther)
Assignment operator.
Definition: structured_soil_model.hpp:111
PlasticityModel< ElasticityModelType, YieldSurfaceType > BaseType
Definition: structured_soil_model.hpp:83
void ComputeOneStepElastoPlasticProblem(ModelDataType &rValues, PlasticDataType &rVariables, const MatrixType &rDeltaDeformationMatrix) override
Definition: structured_soil_model.hpp:387
void InitializeModel(ModelDataType &rValues) override
Definition: structured_soil_model.hpp:140
BaseType::MatrixType MatrixType
Definition: structured_soil_model.hpp:89
void ComputeElastoPlasticTangentMatrix(ModelDataType &rValues, PlasticDataType &rVariables, Matrix &rEPMatrix) override
Definition: structured_soil_model.hpp:348
KRATOS_CLASS_POINTER_DEFINITION(StructuredSoilModel)
Pointer definition of StructuredSoilModel.
BaseType::SizeType SizeType
Definition: structured_soil_model.hpp:87
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: structured_soil_model.hpp:310
BaseType::MaterialDataType MaterialDataType
Definition: structured_soil_model.hpp:92
virtual int Check(const Properties &rMaterialProperties, const ProcessInfo &rCurrentProcessInfo) override
Definition: structured_soil_model.hpp:175
Short class definition.
Definition: yield_surface.hpp:50
virtual double & CalculateYieldCondition(const PlasticDataType &rVariables, double &rYieldCondition)
Definition: yield_surface.hpp:108
#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
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
AMatrix::MatrixProductExpression< TExpression1Type, TExpression2Type > prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:568
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
AMatrix::TransposeMatrix< const T > trans(const T &TheMatrix)
Definition: amatrix_interface.h:486
H
Definition: generate_droplet_dynamics.py:257
Stress
Definition: isotropic_damage_automatic_differentiation.py:135
def load(f)
Definition: ode_solve.py:307
int k
Definition: quadrature.py:595
int j
Definition: quadrature.py:648
integer i
Definition: TensorModule.f:17
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
MatrixType StrainMatrix
Definition: constitutive_model_data.hpp:402