10 #if !defined(KRATOS_SAINT_VENANT_KIRCHHOFF_MODEL_H_INCLUDED )
11 #define KRATOS_SAINT_VENANT_KIRCHHOFF_MODEL_H_INCLUDED
75 ConstitutiveModel::Pointer
Clone()
const override
77 return Kratos::make_shared<SaintVenantKirchhoffModel>(*
this);
99 this->CalculateStrainData(rValues, Variables);
106 const double& rLameMu = rMaterial.
GetLameMu();
108 double trace = (Variables.Strain.Matrix(0,0)+Variables.Strain.Matrix(1,1)+Variables.Strain.Matrix(2,2));
110 rDensityFunction = 0.5*rLameLambda*trace;
112 trace = Variables.Strain.Matrix(0,0)*Variables.Strain.Matrix(0,0)
113 + Variables.Strain.Matrix(0,1)*Variables.Strain.Matrix(1,0)
114 + Variables.Strain.Matrix(0,2)*Variables.Strain.Matrix(2,0)
115 + Variables.Strain.Matrix(1,0)*Variables.Strain.Matrix(0,1)
116 + Variables.Strain.Matrix(1,1)*Variables.Strain.Matrix(1,1)
117 + Variables.Strain.Matrix(1,2)*Variables.Strain.Matrix(2,1)
118 + Variables.Strain.Matrix(2,0)*Variables.Strain.Matrix(0,2)
119 + Variables.Strain.Matrix(2,1)*Variables.Strain.Matrix(1,2)
120 + Variables.Strain.Matrix(2,2)*Variables.Strain.Matrix(2,2);
124 rDensityFunction += rLameMu*trace;
135 this->CalculateStrainData(rValues,Variables);
148 this->CalculateAndAddStressTensor(Variables,rStressMatrix);
157 noalias( Variables.Strain.InverseMatrix ) =
prod( rTotalDeformationMatrix, rStressMatrix );
158 noalias( rStressMatrix ) =
prod( Variables.Strain.InverseMatrix,
trans(rTotalDeformationMatrix) );
171 this->CalculateStrainData(rValues,Variables);
174 this->CalculateAndAddConstitutiveMatrix(Variables,ConstitutiveTensor);
196 this->CalculateStrainData(rValues,Variables);
199 this->CalculateAndAddConstitutiveMatrix(Variables,ConstitutiveTensor);
208 this->CalculateAndAddStressTensor(Variables,rStressMatrix);
219 noalias( Variables.Strain.InverseMatrix ) =
prod( rTotalDeformationMatrix, rStressMatrix );
220 noalias( rStressMatrix ) =
prod( Variables.Strain.InverseMatrix,
trans(rTotalDeformationMatrix) );
239 if(YOUNG_MODULUS.Key() == 0 || rProperties[YOUNG_MODULUS] <= 0.00)
240 KRATOS_ERROR <<
"YOUNG_MODULUS has Key zero or invalid value" << std::endl;
242 if(POISSON_RATIO.Key() == 0){
243 KRATOS_ERROR <<
"POISSON_RATIO has Key zero invalid value" << std::endl;
246 const double&
nu = rProperties[POISSON_RATIO];
247 if( (
nu > 0.499 &&
nu < 0.501) || (nu < -0.999 && nu > -1.01) )
248 KRATOS_ERROR <<
"POISSON_RATIO has an invalid value" << std::endl;
272 std::string
Info()
const override
274 std::stringstream buffer;
275 buffer <<
"SaintVenantKirchhoffModel";
282 rOStream <<
"SaintVenantKirchhoffModel";
288 rOStream <<
"SaintVenantKirchhoffModel Data";
355 rValues.
State.
Set(ConstitutiveModelData::STRAIN_COMPUTED);
377 rValues.
State.
Set(ConstitutiveModelData::STRAIN_COMPUTED);
385 KRATOS_ERROR <<
"calling initialize SaintVenantKirchhoffModel .. StressMeasure is inconsistent" << std::endl;
398 noalias(rStressVector) =
prod(rConstitutiveTensor,rStrainVector);
400 rVariables.
State().
Set(ConstitutiveModelData::STRESS_COMPUTED);
415 const double& rLameMu = rMaterial.
GetLameMu();
418 rStressMatrix *= 2.0 * rLameMu;
421 trace *= rLameLambda;
423 rStressMatrix(0,0) += trace;
424 rStressMatrix(1,1) += trace;
425 rStressMatrix(2,2) += trace;
427 rVariables.
State().
Set(ConstitutiveModelData::STRESS_COMPUTED);
441 rConstitutiveTensor.
clear();
447 double coefficient = (rYoungModulus)/((1.0+rPoissonCoefficient)*(1.0-2.0*rPoissonCoefficient));
448 double component_0 = coefficient*(1.0-rPoissonCoefficient);
449 double component_1 = coefficient*rPoissonCoefficient;
450 double component_2 = coefficient*(0.5-rPoissonCoefficient);
454 rConstitutiveTensor ( 0 , 0 ) = component_0;
455 rConstitutiveTensor ( 1 , 1 ) = component_0;
456 rConstitutiveTensor ( 2 , 2 ) = component_0;
458 rConstitutiveTensor ( 3 , 3 ) = component_2;
459 rConstitutiveTensor ( 4 , 4 ) = component_2;
460 rConstitutiveTensor ( 5 , 5 ) = component_2;
462 rConstitutiveTensor ( 0 , 1 ) = component_1;
463 rConstitutiveTensor ( 1 , 0 ) = component_1;
465 rConstitutiveTensor ( 0 , 2 ) = component_1;
466 rConstitutiveTensor ( 2 , 0 ) = component_1;
468 rConstitutiveTensor ( 1 , 2 ) = component_1;
469 rConstitutiveTensor ( 2 , 1 ) = component_1;
472 rVariables.
State().
Set(ConstitutiveModelData::CONSTITUTIVE_MATRIX_COMPUTED);
527 void save(
Serializer& rSerializer)
const override
StressMeasureType
Definition: constitutive_model_data.hpp:83
@ StressMeasure_Kirchhoff
static void RightCauchyToGreenLagrangeStrain(const MatrixType &rRightCauchyGreen, MatrixType &rStrainMatrix)
Definition: constitutive_model_utilities.hpp:196
static MatrixType & VectorToSymmetricTensor(const array_1d< double, 6 > &rVector, MatrixType &rMatrix)
Definition: constitutive_model_utilities.hpp:568
static void LeftCauchyToAlmansiStrain(const MatrixType &rLeftCauchyGreen, MatrixType &rStrainMatrix)
Definition: constitutive_model_utilities.hpp:214
static void InvertMatrix3(const MatrixType &InputMatrix, MatrixType &InvertedMatrix, double &InputMatrixDet)
Definition: constitutive_model_utilities.hpp:1043
static Matrix & ConstitutiveTensorToMatrix(const BoundedMatrix< double, 6, 6 > &rTensor, Matrix &rMatrix)
Definition: constitutive_model_utilities.hpp:423
static void PushForwardConstitutiveMatrix(Matrix &rConstitutiveMatrix, const Matrix &rF)
Definition: constitutive_model_utilities.hpp:1371
void Set(const Flags ThisFlag)
Definition: flags.cpp:33
Short class definition.
Definition: hyper_elastic_model.hpp:50
HyperElasticModel & operator=(HyperElasticModel const &rOther)
Assignment operator.
Definition: hyper_elastic_model.cpp:59
Definition: amatrix_interface.h:41
void clear()
Definition: amatrix_interface.h:284
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
Short class definition.
Definition: saint_venant_kirchhoff_model.hpp:48
void CalculateStrainData(ModelDataType &rValues, HyperElasticDataType &rVariables) override
Definition: saint_venant_kirchhoff_model.hpp:318
void CalculateStressTensor(ModelDataType &rValues, MatrixType &rStressMatrix) override
Definition: saint_venant_kirchhoff_model.hpp:130
ConstitutiveModel::Pointer Clone() const override
Clone.
Definition: saint_venant_kirchhoff_model.hpp:75
void CalculateStressAndConstitutiveTensors(ModelDataType &rValues, MatrixType &rStressMatrix, Matrix &rConstitutiveMatrix) override
Definition: saint_venant_kirchhoff_model.hpp:191
void CalculateAndAddStressTensor(HyperElasticDataType &rVariables, MatrixType &rStressMatrix) override
Definition: saint_venant_kirchhoff_model.hpp:406
void CalculateStrainEnergy(ModelDataType &rValues, double &rDensityFunction) override
Definition: saint_venant_kirchhoff_model.hpp:94
void CalculateAndAddConstitutiveMatrix(HyperElasticDataType &rVariables, BoundedMatrix< double, 6, 6 > &rConstitutiveTensor)
Definition: saint_venant_kirchhoff_model.hpp:433
void CalculateConstitutiveTensor(ModelDataType &rValues, Matrix &rConstitutiveMatrix) override
Definition: saint_venant_kirchhoff_model.hpp:166
SaintVenantKirchhoffModel & operator=(SaintVenantKirchhoffModel const &rOther)
Assignment operator.
Definition: saint_venant_kirchhoff_model.hpp:68
SaintVenantKirchhoffModel()
Default constructor.
Definition: saint_venant_kirchhoff_model.hpp:62
KRATOS_CLASS_POINTER_DEFINITION(SaintVenantKirchhoffModel)
Pointer definition of SaintVenantKirchhoffModel.
void CalculateAndAddStressTensor(HyperElasticDataType &rVariables, BoundedMatrix< double, 6, 6 > &rConstitutiveTensor, VectorType &rStrainVector, VectorType &rStressVector)
Definition: saint_venant_kirchhoff_model.hpp:394
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: saint_venant_kirchhoff_model.hpp:286
SaintVenantKirchhoffModel(SaintVenantKirchhoffModel const &rOther)
Copy constructor.
Definition: saint_venant_kirchhoff_model.hpp:65
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: saint_venant_kirchhoff_model.hpp:280
~SaintVenantKirchhoffModel() override
Destructor.
Definition: saint_venant_kirchhoff_model.hpp:81
std::string Info() const override
Turn back information as a string.
Definition: saint_venant_kirchhoff_model.hpp:272
int Check(const Properties &rProperties, const ProcessInfo &rCurrentProcessInfo) override
Definition: saint_venant_kirchhoff_model.hpp:235
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
#define KRATOS_ERROR
Definition: exception.h:161
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
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
nu
Definition: isotropic_damage_automatic_differentiation.py:135
def load(f)
Definition: ode_solve.py:307
Definition: constitutive_model_data.hpp:92
const double & GetLameMu() const
Definition: constitutive_model_data.hpp:111
const double & GetYoungModulus() const
Definition: constitutive_model_data.hpp:110
const double & GetLameLambda() const
Definition: constitutive_model_data.hpp:113
const double & GetPoissonCoefficient() const
Definition: constitutive_model_data.hpp:109
Definition: constitutive_model_data.hpp:383
const MatrixType & GetDeltaDeformationMatrix() const
Definition: constitutive_model_data.hpp:455
void SetStrainMeasure(StrainMeasureType Measure)
Definition: constitutive_model_data.hpp:424
const MaterialData & GetMaterialParameters() const
Definition: constitutive_model_data.hpp:462
const StressMeasureType & GetStressMeasure() const
Definition: constitutive_model_data.hpp:452
const MatrixType & GetTotalDeformationMatrix() const
Definition: constitutive_model_data.hpp:456
Flags State
Definition: constitutive_model_data.hpp:399
MatrixType StrainMatrix
Definition: constitutive_model_data.hpp:402
Definition: hyper_elastic_model.hpp:108
StrainData Strain
Definition: hyper_elastic_model.hpp:117
Flags & State()
Definition: hyper_elastic_model.hpp:128
void SetState(Flags &rState)
Definition: hyper_elastic_model.hpp:120
void SetModelData(const ModelDataType &rModelData)
Definition: hyper_elastic_model.hpp:121
const ModelDataType & GetModelData() const
Definition: hyper_elastic_model.hpp:124
MatrixType InverseMatrix
Definition: hyper_elastic_model.hpp:102
MatrixType Matrix
Definition: hyper_elastic_model.hpp:101