Skip to content
Snippets Groups Projects
Commit 28320877 authored by Van Dung NGUYEN's avatar Van Dung NGUYEN
Browse files

add new ipdata

parent db518d38
Branches
Tags
No related merge requests found
...@@ -386,6 +386,15 @@ inline double dot(const STensor3& a, const STensor3& b){ ...@@ -386,6 +386,15 @@ inline double dot(const STensor3& a, const STensor3& b){
} }
} }
}; };
inline void multSTensor3FirstTransposeAdd(const STensor3& a, const STensor3&b, STensor3& c){
for (int i=0; i<3; i++){
for (int j=0; j<3; j++){
for (int k=0; k<3; k++){
c(i,j) +=a(k,i)*b(k,j);
}
}
}
};
inline void multSTensor3STensor43(const STensor3& a, const STensor43& b, STensor3& c){ inline void multSTensor3STensor43(const STensor3& a, const STensor43& b, STensor3& c){
for (int i=0; i<3; i++){ for (int i=0; i<3; i++){
......
...@@ -73,6 +73,7 @@ mysolver.displacementBC("Face",12,1,0.) ...@@ -73,6 +73,7 @@ mysolver.displacementBC("Face",12,1,0.)
mysolver.displacementBC("Face",13,1,1e-3) mysolver.displacementBC("Face",13,1,1e-3)
mysolver.internalPointBuildView("eq strain",IPField.GL_EQUIVALENT_STRAIN, 1, 1)
mysolver.internalPointBuildView("svm",IPField.SVM, 1, 1) mysolver.internalPointBuildView("svm",IPField.SVM, 1, 1)
mysolver.internalPointBuildView("sig_xx",IPField.SIG_XX, 1, 1) mysolver.internalPointBuildView("sig_xx",IPField.SIG_XX, 1, 1)
mysolver.internalPointBuildView("sig_yy",IPField.SIG_YY, 1, 1) mysolver.internalPointBuildView("sig_yy",IPField.SIG_YY, 1, 1)
......
...@@ -481,6 +481,15 @@ double dG3DIPVariable::get(const int comp) const ...@@ -481,6 +481,15 @@ double dG3DIPVariable::get(const int comp) const
if (this->isDeleted()) return 1.; if (this->isDeleted()) return 1.;
else return 0.; else return 0.;
} }
else if (comp == IPField::GL_EQUIVALENT_STRAIN){
static STensor3 E, devE;
static double trE;
STensorOperation::diag(E,-1.);
STensorOperation::multSTensor3FirstTransposeAdd(F,F,E);
E *= (0.5);
STensorOperation::decomposeDevTr(E,devE,trE);
return sqrt(2.*devE.dotprod()/3.);
}
else if (comp == IPField::GL_XX){ else if (comp == IPField::GL_XX){
static STensor3 FTF; static STensor3 FTF;
STensorOperation::multSTensor3FirstTranspose(F,F,FTF); STensorOperation::multSTensor3FirstTranspose(F,F,FTF);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment