10 #if !defined(KRATOS_ISOCHORIC_OGDEN_MODEL_H_INCLUDED )
11 #define KRATOS_ISOCHORIC_OGDEN_MODEL_H_INCLUDED
75 ConstitutiveModel::Pointer
Clone()
const override
77 return Kratos::make_shared<IsochoricOgdenModel>(*
this);
101 rDensityFunction = 0;
123 Variables.State().Set(ConstitutiveModelData::STRESS_COMPUTED);
180 std::string
Info()
const override
182 std::stringstream buffer;
183 buffer <<
"IsochoricOgdenModel";
190 rOStream <<
"IsochoricOgdenModel";
196 rOStream <<
"IsochoricOgdenModel Data";
233 for(
unsigned int i=0;
i<3;
i++)
326 for(
unsigned int i=0;
i<3;
i++)
337 for(
unsigned int i=0;
i<3;
i++)
364 noalias(rStressMatrix) += StressMatrix;
373 noalias(rStressMatrix) += StressMatrix;
391 unsigned int size = (rModelParameters.size()/2.0);
392 double athird = 1.0/3.0;
394 for(
unsigned int i=0;
i<3;
i++)
396 for(
unsigned int p=0;
p<size;
p++)
398 const double& mu_p = rModelParameters[
p];
399 const double& alpha_p = rModelParameters[
p+size];
421 unsigned int size = (rModelParameters.size()/2.0);
422 double athird = 1.0/3.0;
424 for(
unsigned int i=0;
i<3;
i++)
426 for(
unsigned int j=0;
j<3;
j++)
429 for(
unsigned int p=0;
p<size;
p++)
431 const double& mu_p = rModelParameters[
p];
432 const double& alpha_p = rModelParameters[
p+size];
458 MatrixType& DeltaDeformationMatrix = Values.rConstitutiveLawData().DeltaDeformationMatrix;
459 MatrixType& TotalDeformationMatrix = Values.rConstitutiveLawData().TotalDeformationMatrix;
464 const SizeType& rVoigtSize = Values.GetVoigtSize();
465 const VoigtIndexType& rIndexVoigtTensor = Values.GetVoigtIndexTensor();
467 Vector StressVectorI(rVoigtSize);
468 Vector StressVectorII(rVoigtSize);
471 for(
unsigned int i=0;
i<rVoigtSize;
i++)
474 double deltavalue = 1
e-10;
476 deltavalue = value * 1
e-8;
483 DeltaDeformationMatrix(rIndexVoigtTensor[
i][0],rIndexVoigtTensor[
i][1]) += deltavalue;
496 DeltaDeformationMatrix(rIndexVoigtTensor[
i][0],rIndexVoigtTensor[
i][1]) -= deltavalue;
506 for(
unsigned int j=0;
j<rVoigtSize;
j++)
508 rConstitutiveMatrix(
j,
i) = (-1) * (StressVectorI[
j] - StressVectorII[
j]) / (2.0*deltavalue);
528 const VoigtIndexType& rIndexVoigtTensor = rModelData.GetVoigtIndexTensor();
550 rIndexVoigtTensor[
i][0],rIndexVoigtTensor[
i][1],
551 rIndexVoigtTensor[
j][0],rIndexVoigtTensor[
j][1]);
555 rIndexVoigtTensor[
i][0],rIndexVoigtTensor[
i][1],
556 rIndexVoigtTensor[
j][0],rIndexVoigtTensor[
j][1]);
564 rVariables.
State().
Set(ConstitutiveModelData::CONSTITUTIVE_MATRIX_COMPUTED,
true);
574 const unsigned int&
i,
const unsigned int&
j)
override
583 unsigned int size = (rModelParameters.size()/2.0);
584 double athird = 1.0/3.0;
587 for(
unsigned int p=0;
p<size;
p++)
589 const double& mu_p = rModelParameters[
p];
590 const double& alpha_p = rModelParameters[
p+size];
606 const unsigned int&
i,
const unsigned int&
j)
override
614 unsigned int size = (rModelParameters.size()/2.0);
617 for(
unsigned int p=0;
p<size;
p++)
619 const double& mu_p = rModelParameters[
p];
620 const double& alpha_p = rModelParameters[
p+size];
636 const unsigned int&
a,
const unsigned int&
b,
637 const unsigned int&
c,
const unsigned int&
d)
643 if(
a ==
b &&
c ==
d ){
648 else if(
a ==
c &&
b ==
d ){
651 rCabcd = Cabcd - rStressEigenValues[
a];
835 const unsigned int&
a,
const unsigned int&
b,
836 const unsigned int&
c,
const unsigned int&
d)
861 rCabcd += (lambda*lambda) * Dabcd;
863 rCabcd += (lambda*lambda) * Dabcd;
865 rCabcd -= 0.5 * dD * lambda * Dabcd;
881 const unsigned int&
a,
const unsigned int&
b,
882 const unsigned int&
c,
const unsigned int&
d)
906 rCabcd += (lambda*lambda) * Dabcd;
908 rCabcd += (lambda*lambda) * Dabcd;
910 rCabcd -= 0.5 * dD * lambda * Dabcd;
926 const unsigned int&
a,
const unsigned int&
b,
927 const unsigned int&
c,
const unsigned int&
d)
override
992 unsigned int size = (rModelParameters.size()/2.0);
994 for(
unsigned int p=0;
p<size;
p++)
996 const double& mu_p = rModelParameters[
p];
997 const double& alpha_p = rModelParameters[
p+size];
1033 rDerivative = rMaterial.
GetBulkModulus() * std::log( rVariables.Strain.Invariants.J );
1035 rDerivative /= rVariables.Strain.Invariants.J;
1055 rDerivative = rMaterial.
GetBulkModulus() * (1.0 -std::log(rVariables.Strain.Invariants.J)) / (rVariables.Strain.Invariants.J * rVariables.Strain.Invariants.J);
1113 void save(
Serializer& rSerializer)
const override
StressMeasureType
Definition: constitutive_model_data.hpp:83
@ StressMeasure_Kirchhoff
const unsigned int(*)[2] VoigtIndexType
Definition: constitutive_model.hpp:55
ConstitutiveModelData::SizeType SizeType
Definition: constitutive_model.hpp:66
static double & CalculateFourthOrderUnitTensor(double &rValue, const unsigned int &a, const unsigned int &b, const unsigned int &c, const unsigned int &d)
Definition: constitutive_model_utilities.hpp:1140
static double & CalculateFourthOrderTensorProduct(const MatrixType &rMatrixA, const MatrixType &rMatrixB, double &rValue, const unsigned int &a, const unsigned int &b, const unsigned int &c, const unsigned int &d)
Definition: constitutive_model_utilities.hpp:1250
static Vector & StressTensorToVector(const MatrixType &rStressTensor, Vector &rStressVector)
Definition: constitutive_model_utilities.hpp:843
static double & CalculateFourthOrderTensor(const MatrixType &rMatrix, double &rValue, const double &a, const double &b, const double &c, const double &d)
Definition: constitutive_model_utilities.hpp:1187
void Set(const Flags ThisFlag)
Definition: flags.cpp:33
double & GetJLeftCauchyGreenSquare1stDerivative(const StrainData &rStrain, double &rDerivative, const double &a, const double &b, const double &c, const double &d)
Definition: hyper_elastic_model.cpp:662
MatrixType & GetJLeftCauchyGreenDerivative(const StrainData &rStrain, MatrixType &rDerivative)
Definition: hyper_elastic_model.cpp:635
MatrixType & GetJRightCauchyGreenDerivative(const StrainData &rStrain, MatrixType &rDerivative)
Definition: hyper_elastic_model.cpp:565
double & GetJRightCauchyGreenSquare1stDerivative(const StrainData &rStrain, double &rDerivative, const double &a, const double &b, const double &c, const double &d)
dJ/dC
Definition: hyper_elastic_model.cpp:592
static const MatrixType msIdentityMatrix
Definition: hyper_elastic_model.hpp:322
double & GetJLeftCauchyGreen2ndDerivative(const StrainData &rStrain, double &rDerivative, const double &a, const double &b, const double &c, const double &d)
Definition: hyper_elastic_model.cpp:679
virtual double & AddIsochoricConstitutiveComponent(HyperElasticDataType &rVariables, double &rCabcd, const unsigned int &a, const unsigned int &b, const unsigned int &c, const unsigned int &d)
Definition: hyper_elastic_model.cpp:468
double & GetJRightCauchyGreen2ndDerivative(const StrainData &rStrain, double &rDerivative, const double &a, const double &b, const double &c, const double &d)
Definition: hyper_elastic_model.cpp:610
Definition: amatrix_interface.h:41
Short class definition.
Definition: isochoric_ogden_model.hpp:48
void CalculateAndAddVolumetricStressTensor(HyperElasticDataType &rVariables, MatrixType &rStressMatrix) override
Definition: isochoric_ogden_model.hpp:350
std::string Info() const override
Turn back information as a string.
Definition: isochoric_ogden_model.hpp:180
void CalculateStrainEnergy(ModelDataType &rValues, double &rDensityFunction) override
Definition: isochoric_ogden_model.hpp:94
~IsochoricOgdenModel() override
Destructor.
Definition: isochoric_ogden_model.hpp:81
IsochoricOgdenModel(IsochoricOgdenModel const &rOther)
Copy constructor.
Definition: isochoric_ogden_model.hpp:65
void CalculateConstitutiveTensor(ModelDataType &rValues, Matrix &rConstitutiveMatrix) override
Definition: isochoric_ogden_model.hpp:129
ConstitutiveModel::Pointer Clone() const override
Clone.
Definition: isochoric_ogden_model.hpp:75
void CalculateAndAddIsochoricStrainEnergy(HyperElasticDataType &rVariables, double &rIsochoricDensityFunction) override
Definition: isochoric_ogden_model.hpp:984
void CalculateScalingFactors(HyperElasticDataType &rVariables) override
Definition: isochoric_ogden_model.hpp:971
virtual void CalculateAndAddPerturbedConstitutiveTensor(HyperElasticDataType &rVariables, Matrix &rConstitutiveMatrix)
Definition: isochoric_ogden_model.hpp:451
void CalculateAndAddVolumetricStrainEnergy(HyperElasticDataType &rVariables, double &rVolumetricDensityFunction) override
Definition: isochoric_ogden_model.hpp:1005
void CalculateStressAndConstitutiveTensors(ModelDataType &rValues, MatrixType &rStressMatrix, Matrix &rConstitutiveMatrix) override
Definition: isochoric_ogden_model.hpp:144
void CalculateAndAddConstitutiveTensor(HyperElasticDataType &rVariables, Matrix &rConstitutiveMatrix) override
Definition: isochoric_ogden_model.hpp:521
double & CalculateStressDerivativesII(HyperElasticDataType &rVariables, double &rValue, const unsigned int &i, const unsigned int &j) override
Definition: isochoric_ogden_model.hpp:605
virtual double & AddIsochoricConstitutiveComponent(HyperElasticDataType &rVariables, double &rCabcd, const array_1d< double, 3 > &rStressEigenValues, const unsigned int &a, const unsigned int &b, const unsigned int &c, const unsigned int &d)
Definition: isochoric_ogden_model.hpp:634
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: isochoric_ogden_model.hpp:194
IsochoricOgdenModel & operator=(IsochoricOgdenModel const &rOther)
Assignment operator.
Definition: isochoric_ogden_model.hpp:68
double & GetVolumetricFunction1stJDerivative(HyperElasticDataType &rVariables, double &rDerivative) override
Definition: isochoric_ogden_model.hpp:1019
void CalculateStressTensor(ModelDataType &rValues, MatrixType &rStressMatrix) override
Definition: isochoric_ogden_model.hpp:110
void CalculateStrainData(ModelDataType &rValues, HyperElasticDataType &rVariables) override
Definition: isochoric_ogden_model.hpp:226
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: isochoric_ogden_model.hpp:188
void CalculateAndAddIsochoricStressTensor(HyperElasticDataType &rVariables, MatrixType &rStressMatrix) override
Definition: isochoric_ogden_model.hpp:313
void CalculateInvariants(HyperElasticDataType &rVariables) override
Definition: isochoric_ogden_model.hpp:277
KRATOS_CLASS_POINTER_DEFINITION(IsochoricOgdenModel)
Pointer definition of IsochoricOgdenModel.
void CalculateMainStresses(HyperElasticDataType &rVariables, array_1d< double, 3 > &rMainStresses) override
Definition: isochoric_ogden_model.hpp:383
double & GetVolumetricFunction2ndJDerivative(HyperElasticDataType &rVariables, double &rDerivative) override
Definition: isochoric_ogden_model.hpp:1043
double & AddVolumetricConstitutiveComponent(HyperElasticDataType &rVariables, double &rCabcd, const unsigned int &a, const unsigned int &b, const unsigned int &c, const unsigned int &d) override
Definition: isochoric_ogden_model.hpp:925
void CalculateMainStressDerivatives(HyperElasticDataType &rVariables, MatrixType &rStressDerivatives) override
Definition: isochoric_ogden_model.hpp:412
virtual double & GetEigenProductLeftCauchyGreenDerivative(HyperElasticDataType &rVariables, const unsigned int &i, double &rCabcd, const unsigned int &a, const unsigned int &b, const unsigned int &c, const unsigned int &d)
Definition: isochoric_ogden_model.hpp:880
double & CalculateStressDerivativesI(HyperElasticDataType &rVariables, double &rValue, const unsigned int &i, const unsigned int &j) override
Definition: isochoric_ogden_model.hpp:573
virtual double & GetEigenProductRightCauchyGreenDerivative(HyperElasticDataType &rVariables, const unsigned int &i, double &rCabcd, const unsigned int &a, const unsigned int &b, const unsigned int &c, const unsigned int &d)
Definition: isochoric_ogden_model.hpp:834
IsochoricOgdenModel()
Default constructor.
Definition: isochoric_ogden_model.hpp:62
Short class definition.
Definition: ogden_model.hpp:50
OgdenModel & operator=(OgdenModel const &rOther)
Assignment operator.
Definition: ogden_model.cpp:47
void CalculateStrainData(ModelDataType &rValues, HyperElasticDataType &rVariables) override
Definition: ogden_model.cpp:209
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
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
AMatrix::VectorOuterProductExpression< TExpression1Type, TExpression2Type > outer_prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:582
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
f
Definition: generate_convection_diffusion_explicit_element.py:112
a
Definition: generate_stokes_twofluid_element.py:77
b
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:31
c
Definition: generate_weakly_compressible_navier_stokes_element.py:108
def load(f)
Definition: ode_solve.py:307
int d
Definition: ode_solve.py:397
int j
Definition: quadrature.py:648
p
Definition: sensitivityMatrix.py:52
integer i
Definition: TensorModule.f:17
e
Definition: run_cpp_mpi_tests.py:31
Definition: constitutive_model_data.hpp:92
const double & GetBulkModulus() const
Definition: constitutive_model_data.hpp:114
const std::vector< double > & GetModelParameters() const
Definition: constitutive_model_data.hpp:116
Definition: constitutive_model_data.hpp:383
const MatrixType & GetDeltaDeformationMatrix() const
Definition: constitutive_model_data.hpp:455
const StressMeasureType & GetStressMeasure() const
Definition: constitutive_model_data.hpp:452
const SizeType & GetVoigtSize() const
Definition: constitutive_model_data.hpp:436
const double & GetTotalDeformationDet() const
Definition: constitutive_model_data.hpp:449
const MatrixType & GetTotalDeformationMatrix() const
Definition: constitutive_model_data.hpp:456
MatrixType StressMatrix
Definition: constitutive_model_data.hpp:401
double Alpha4
Definition: hyper_elastic_model.hpp:71
double Beta4
Definition: hyper_elastic_model.hpp:76
Definition: hyper_elastic_model.hpp:108
StrainData Strain
Definition: hyper_elastic_model.hpp:117
Flags & State()
Definition: hyper_elastic_model.hpp:128
HyperElasticFactors Factors
Definition: hyper_elastic_model.hpp:116
const MaterialDataType & GetMaterialParameters() const
Definition: hyper_elastic_model.hpp:125
const ModelDataType & GetModelData() const
Definition: hyper_elastic_model.hpp:124
StrainEigenData Eigen
Definition: hyper_elastic_model.hpp:99
MatrixType InverseMatrix
Definition: hyper_elastic_model.hpp:102
StrainInvariants Invariants
Definition: hyper_elastic_model.hpp:98
MatrixType Matrix
Definition: hyper_elastic_model.hpp:101
MatrixType Vectors
Definition: hyper_elastic_model.hpp:91
array_1d< double, 3 > Values
Definition: hyper_elastic_model.hpp:90
double I2
Definition: hyper_elastic_model.hpp:57
double J
Definition: hyper_elastic_model.hpp:60
double I1
Definition: hyper_elastic_model.hpp:56
double J_13
Definition: hyper_elastic_model.hpp:61
double I3
Definition: hyper_elastic_model.hpp:58