Skip to content
Snippets Groups Projects
Commit 1612a71d authored by Ludovic Noels's avatar Ludovic Noels
Browse files

fix bug for stochastic law

parent 9e3e2ea2
No related branches found
No related tags found
No related merge requests found
...@@ -1087,7 +1087,7 @@ void mlawNonLocalDamage::constitutive(const STensor3& F0,const STensor3& Fn,STen ...@@ -1087,7 +1087,7 @@ void mlawNonLocalDamage::constitutive(const STensor3& F0,const STensor3& Fn,STen
DirrEnergDF(2,1) = dEnePathFollowingdStrain[5]/sq2; DirrEnergDF(2,1) = dEnePathFollowingdStrain[5]/sq2;
STensor43 Cel, Sel; STensor43 Cel, Sel;
ElasticStiffness(&Cel); ElasticStiffness(statev_1,&Cel);
STensorOperation::inverseSTensor43(Cel,Sel); STensorOperation::inverseSTensor43(Cel,Sel);
static STensor3 I(1.); static STensor3 I(1.);
for (int i=0; i<3; i++){ for (int i=0; i<3; i++){
...@@ -2109,6 +2109,34 @@ const double mlawNonLocalDamage::poissonRatio() const ...@@ -2109,6 +2109,34 @@ const double mlawNonLocalDamage::poissonRatio() const
{ {
return _nu0; return _nu0;
} }
void mlawNonLocalDamage::ElasticStiffness(double *statev, STensor43* elasticTensor) const
{
fullMatrix<double> Cel_fullMatrix(6,6);
static double **Cel_matrix;
static bool init=false;
if(init==false)
{
mallocmatrix(&Cel_matrix,6,6);
init=true;
}
mat->get_elOp(statev,Cel_matrix);
for(int i=0;i<6;i++)
{
for(int j=0;j<6;j++){
Cel_fullMatrix(i,j)=Cel_matrix[i][j];
}
}
for(int i=3;i<6;i++)
{
for(int j=0;j<3;j++)
{
Cel_fullMatrix(i,j)*=(1./sq2);
Cel_fullMatrix(j,i)*=2.;
Cel_fullMatrix(j,i)*=(1./sq2);
}
}
STensorOperation::fromFullMatrixToSTensor43(Cel_fullMatrix,(*elasticTensor));
};
void mlawNonLocalDamage::ElasticStiffness(STensor43* elasticTensor) const void mlawNonLocalDamage::ElasticStiffness(STensor43* elasticTensor) const
{ {
......
...@@ -97,6 +97,7 @@ class mlawNonLocalDamage : public materialLaw ...@@ -97,6 +97,7 @@ class mlawNonLocalDamage : public materialLaw
virtual int getNbNonLocalVariables() const {return nlVar;}; virtual int getNbNonLocalVariables() const {return nlVar;};
virtual void updateCharacteristicLengthTensor(double** chara_Length, double *statev) const {}; virtual void updateCharacteristicLengthTensor(double** chara_Length, double *statev) const {};
virtual void ElasticStiffness(STensor43* elasticTensor) const; virtual void ElasticStiffness(STensor43* elasticTensor) const;
virtual void ElasticStiffness(double *statev, STensor43* elasticTensor) const;
virtual void ElasticStiffnessMtx(double *statev, STensor43* elasticTensor) const; virtual void ElasticStiffnessMtx(double *statev, STensor43* elasticTensor) const;
virtual void ElasticStiffnessInc(double *statev, STensor43* elasticTensor) const; virtual void ElasticStiffnessInc(double *statev, STensor43* elasticTensor) const;
virtual void ElasticStiffness_incOri(double e1, double e2, double e3,STensor43* elasticTensor) const; virtual void ElasticStiffness_incOri(double e1, double e2, double e3,STensor43* elasticTensor) const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment