Skip to content
Snippets Groups Projects
Commit dcedfefe authored by Ujwal Kishore Jinaga's avatar Ujwal Kishore Jinaga :clown:
Browse files

Changes related to the rotation tensor, check the files

parent 78746216
Branches
No related tags found
No related merge requests found
......@@ -647,7 +647,7 @@ void STensorOperation::alignEigenDecomposition_NormBased_indexOnly(const STensor
eigenValReal1(0) = a1; eigenValReal1(1) = a2; eigenValReal1(2) = a3;
// Initialise 2
double norm(0.), norm_min(1.e+20);
double norm(0.), norm_min(1.e+20), normamised_norm(0.);
static STensor3 A_reformed;
// Generate permutated eigVal vector
......@@ -683,8 +683,12 @@ void STensorOperation::alignEigenDecomposition_NormBased_indexOnly(const STensor
}
// Assign the aligned indices
normamised_norm = norm_min; // /pow(A.dotprod(),0.5);
Msg::Info("normamised_norm of A = %f",normamised_norm);
if(normamised_norm > 1.e-5){
alignedIndex = eigenValReal1_permuted_Index;
}
}
void STensorOperation::alignEigenDecomposition_TangentBased_indexOnly(const STensor3& A, const STensor3& B, fullVector<int>& alignedIndex){
......
......@@ -501,7 +501,7 @@ void mlawNonLinearTVENonLinearTVP2::predictorCorrector_TVP_nonAssociatedFlow_non
}
else if(_rotationCorrectionScheme == 2){
Ee0_rot = q0->_Ee;
// STensorOperation::alignEigenDecomposition_NormBased_indexOnly(q0->_Ee,Ee,alignedIndex);
STensorOperation::alignEigenDecomposition_NormBased_indexOnly(q0->_Ee,Ee,alignedIndex);
// STensorOperation::alignEigenDecomposition_EigenVectorDotProductBased_indexOnly(q0->_Ee,Ee,alignedIndex);
// STensorOperation::alignEigenDecomposition_TangentBased_indexOnly(q0->_Ee,Ee,alignedIndex);
// STensorOperation::alignEigenDecomposition_NormAndDotProductBased_indexOnly(q0->_Ee,Ee,alignedIndex);
......@@ -514,8 +514,8 @@ void mlawNonLinearTVENonLinearTVP2::predictorCorrector_TVP_nonAssociatedFlow_non
mlawNonLinearTVM::ThermoViscoElasticPredictor(Ee,q0->_Ee,q0,q1,Ke,Ge,T0,T,stiff,Bd_stiffnessTerm,&Ge_TrEeTensor);
}
else{
mlawNonLinearTVM::ThermoViscoElasticPredictor(Ee,q0->_Ee,q0,q1,Ke,Ge,T0,T,stiff,Bd_stiffnessTerm,&Ge_TrEeTensor);
// mlawNonLinearTVM::ThermoViscoElasticPredictor_forTVP(Ce,Ee,Ee0_rot,q0,q1,Ke,Ge,T0,T,stiff,alignedIndex,Bd_stiffnessTerm,&Ge_TrEeTensor,&rotationStiffness); // NEW EIGEN
// mlawNonLinearTVM::ThermoViscoElasticPredictor(Ee,q0->_Ee,q0,q1,Ke,Ge,T0,T,stiff,Bd_stiffnessTerm,&Ge_TrEeTensor);
mlawNonLinearTVM::ThermoViscoElasticPredictor_forTVP(Ce,Ee,Ee0_rot,q0,q1,Ke,Ge,T0,T,stiff,alignedIndex,Bd_stiffnessTerm,&Ge_TrEeTensor,&rotationStiffness); // NEW EIGEN
}
Ge_TrEeTensor_pr = Ge_TrEeTensor;
rotationStiffness_pr = rotationStiffness;
......@@ -525,8 +525,8 @@ void mlawNonLinearTVENonLinearTVP2::predictorCorrector_TVP_nonAssociatedFlow_non
mlawNonLinearTVM::ThermoViscoElasticPredictor(Ee,q0->_Ee,q0,q1,Ke,Ge,T0,T,stiff,Bd_stiffnessTerm);
}
else{
mlawNonLinearTVM::ThermoViscoElasticPredictor(Ee,q0->_Ee,q0,q1,Ke,Ge,T0,T,stiff,Bd_stiffnessTerm);
// mlawNonLinearTVM::ThermoViscoElasticPredictor_forTVP(Ce,Ee,Ee0_rot,q0,q1,Ke,Ge,T0,T,stiff,alignedIndex,Bd_stiffnessTerm,NULL,&rotationStiffness); // NEW EIGEN
// mlawNonLinearTVM::ThermoViscoElasticPredictor(Ee,q0->_Ee,q0,q1,Ke,Ge,T0,T,stiff,Bd_stiffnessTerm);
mlawNonLinearTVM::ThermoViscoElasticPredictor_forTVP(Ce,Ee,Ee0_rot,q0,q1,Ke,Ge,T0,T,stiff,alignedIndex,Bd_stiffnessTerm,NULL,&rotationStiffness); // NEW EIGEN
}
rotationStiffness_pr = rotationStiffness;
}
......@@ -806,12 +806,12 @@ void mlawNonLinearTVENonLinearTVP2::predictorCorrector_TVP_nonAssociatedFlow_non
// Update Phi
if (_extraBranchNLType == TensionCompressionRegularisedType || _extraBranchNLType == hyper_exp_TCasymm_Type || _ExtraBranch_TVE_option == 3 || _ExtraBranch_TVE_option == 4 || _ExtraBranch_TVE_option == 5){
// TC asymmetry -> for either case of TensionCompressionRegularisedType and _ExtraBranch_TVE_option == 3
getIterated_DPhi(F,T0,T,q0,q1,Gamma,Cxtr,Cxdev,Cepr,Eepr,trXn,devXn,Ke,Ge,Ge_Tensor,ptilde,devPhi,Phi,N,expGN,dexpAdA,
Dho,Dho2inv,Dho2_u_inv,Dho2_v_inv,Fp1,alignedIndex,&Ge_TrEeTensor,&rotationStiffness);
getIterated_DPhi(T0,T,q0,q1,Gamma,Cxtr,Cxdev,Cepr,Eepr,trXn,devXn,Ke,Ge,Ge_Tensor,ptilde,devPhi,Phi,N,expGN,dexpAdA,
Dho,Dho2inv,Dho2_u_inv,Dho2_v_inv,alignedIndex,&Ge_TrEeTensor,&rotationStiffness);
}
else{
getIterated_DPhi(F,T0,T,q0,q1,Gamma,Cxtr,Cxdev,Cepr,Eepr,trXn,devXn,Ke,Ge,Ge_Tensor,ptilde,devPhi,Phi,N,expGN,dexpAdA,
Dho,Dho2inv,Dho2_u_inv,Dho2_v_inv,Fp1,alignedIndex,NULL,&rotationStiffness);
getIterated_DPhi(T0,T,q0,q1,Gamma,Cxtr,Cxdev,Cepr,Eepr,trXn,devXn,Ke,Ge,Ge_Tensor,ptilde,devPhi,Phi,N,expGN,dexpAdA,
Dho,Dho2inv,Dho2_u_inv,Dho2_v_inv,alignedIndex,NULL,&rotationStiffness);
}
PhiEq = sqrt(1.5*devPhi.dotprod());
......@@ -859,12 +859,12 @@ void mlawNonLinearTVENonLinearTVP2::predictorCorrector_TVP_nonAssociatedFlow_non
// Correct Phi
if (_extraBranchNLType == TensionCompressionRegularisedType || _extraBranchNLType == hyper_exp_TCasymm_Type || _ExtraBranch_TVE_option == 3 || _ExtraBranch_TVE_option == 4 || _ExtraBranch_TVE_option == 5){
// TC asymmetry -> for either case of TensionCompressionRegularisedType and _ExtraBranch_TVE_option == 3
getIterated_DPhi(F,T0,T,q0,q1,Gamma,Cxtr,Cxdev,Cepr,Eepr,trXn,devXn,Ke,Ge,Ge_Tensor,ptilde,devPhi,Phi,N,expGN,dexpAdA,
Dho,Dho2inv,Dho2_u_inv,Dho2_v_inv,Fp1,alignedIndex,&Ge_TrEeTensor,&rotationStiffness);
getIterated_DPhi(T0,T,q0,q1,Gamma,Cxtr,Cxdev,Cepr,Eepr,trXn,devXn,Ke,Ge,Ge_Tensor,ptilde,devPhi,Phi,N,expGN,dexpAdA,
Dho,Dho2inv,Dho2_u_inv,Dho2_v_inv,alignedIndex,&Ge_TrEeTensor,&rotationStiffness);
}
else{
getIterated_DPhi(F,T0,T,q0,q1,Gamma,Cxtr,Cxdev,Cepr,Eepr,trXn,devXn,Ke,Ge,Ge_Tensor,ptilde,devPhi,Phi,N,expGN,dexpAdA,
Dho,Dho2inv,Dho2_u_inv,Dho2_v_inv,Fp1,alignedIndex,NULL,&rotationStiffness);
getIterated_DPhi(T0,T,q0,q1,Gamma,Cxtr,Cxdev,Cepr,Eepr,trXn,devXn,Ke,Ge,Ge_Tensor,ptilde,devPhi,Phi,N,expGN,dexpAdA,
Dho,Dho2inv,Dho2_u_inv,Dho2_v_inv,alignedIndex,NULL,&rotationStiffness);
}
PhiEq = sqrt(1.5*devPhi.dotprod());
......@@ -2189,27 +2189,19 @@ void mlawNonLinearTVENonLinearTVP2::getDho(const double& Gamma, const STensor3&
Dho2_v_inv = 1./Dho2_v;
}
void mlawNonLinearTVENonLinearTVP2::getIterated_DPhi(const STensor3& F, const double& T0, const double& T, const IPNonLinearTVP *q0, IPNonLinearTVP *q1,
void mlawNonLinearTVENonLinearTVP2::getIterated_DPhi(const double& T0, const double& T, const IPNonLinearTVP *q0, IPNonLinearTVP *q1,
double& Gamma, const double& Cxtr, const double& Cxdev,
const STensor3& Cepr, const STensor3& Eepr,
const double& trXn, const STensor3& devXn,
double& Ke, double& Ge, STensor43& Ge_Tensor,
double& ptilde, STensor3& devPhi,
STensor3& Phi, STensor3& N, STensor3& expGN, STensor43& dexpAdA,
STensor43& Dho, STensor43& Dho2inv, STensor43& Dho2_u_inv , double& Dho2_v_inv, STensor3& Fp1, fullVector<int>& alignedIndex,
STensor43& Dho, STensor43& Dho2inv, STensor43& Dho2_u_inv , double& Dho2_v_inv, fullVector<int>& alignedIndex,
STensor43* Ge_TrEeTensor, STensor43* rotationStiffness) const{
// This function calculates Phi iteratively.
// At every iteration it will calculate Ee, corKir and N
// EIGEN NEW - Initialise Fe
static STensor3 Fpinv;
STensor3& Fe = q1->_Fe;
STensorOperation::multSTensor3(expGN,q0->_Fp,Fp1);
STensorOperation::inverseSTensor3(Fp1,Fpinv);
STensorOperation::multSTensor3(F,Fpinv,Fe);
// EIGEN NEW - Initialise Fe
// Initialise GammaN in IP -> for mechSrc later
STensor3& GammaN = q1->getRefToGammaN();
......@@ -2498,11 +2490,7 @@ void mlawNonLinearTVENonLinearTVP2::getIterated_DPhi(const STensor3& F, const do
for (int j=0; j<3; j++)
Ee(i,j) = Eepr(i,j) - Gamma*N(i,j);
// EIGEN NEW - update Fe
STensorOperation::multSTensor3(expGN,q0->_Fp,Fp1);
STensorOperation::inverseSTensor3(Fp1,Fpinv);
STensorOperation::multSTensor3(F,Fpinv,Fe);
// EIGEN NEW
if(_rotationCorrectionScheme == 2){
Ee0_rot = q0->_Ee;
STensorOperation::alignEigenDecomposition_NormBased_indexOnly(q0->_Ee,Ee,alignedIndex);
......@@ -2899,8 +2887,8 @@ void mlawNonLinearTVENonLinearTVP2::TEST_predictorCorrector_TVP_nonAssociatedFlo
}
// Update Phi
getIterated_DPhi(F,T0,T,q0,q1,Gamma,Cxtr,Cxdev,Cepr,Eepr,trXn,devXn,Ke,Ge,Ge_Tensor,ptilde,devPhi,Phi,N,expGN,dexpAdA,
Dho,Dho2inv,Dho2_u_inv,Dho2_v_inv,Fp1);
getIterated_DPhi(T0,T,q0,q1,Gamma,Cxtr,Cxdev,Cepr,Eepr,trXn,devXn,Ke,Ge,Ge_Tensor,ptilde,devPhi,Phi,N,expGN,dexpAdA,
Dho,Dho2inv,Dho2_u_inv,Dho2_v_inv);
PhiEq = sqrt(1.5*devPhi.dotprod());
// Update A
......@@ -2944,8 +2932,8 @@ void mlawNonLinearTVENonLinearTVP2::TEST_predictorCorrector_TVP_nonAssociatedFlo
}
// Correct Phi
getIterated_DPhi(F,T0,T,q0,q1,Gamma,Cxtr,Cxdev,Cepr,Eepr,trXn,devXn,Ke,Ge,Ge_Tensor,ptilde,devPhi,Phi,N,expGN,dexpAdA,
Dho,Dho2inv,Dho2_u_inv,Dho2_v_inv,Fp1);
getIterated_DPhi(T0,T,q0,q1,Gamma,Cxtr,Cxdev,Cepr,Eepr,trXn,devXn,Ke,Ge,Ge_Tensor,ptilde,devPhi,Phi,N,expGN,dexpAdA,
Dho,Dho2inv,Dho2_u_inv,Dho2_v_inv);
PhiEq = sqrt(1.5*devPhi.dotprod());
// Correct Normal, H = expGN
......
......@@ -24,14 +24,14 @@ class mlawNonLinearTVENonLinearTVP2 : public mlawNonLinearTVP{
virtual void freeEnergyPlasticityDerivatives(const IPNonLinearTVP *q0, IPNonLinearTVP *q1, const double& T0, const double& T, STensor3& dPsy_TVPdF, double& dPsy_TVPdT) const;
virtual void getIterated_DPhi(const STensor3& F, const double& T0, const double& T, const IPNonLinearTVP *q0, IPNonLinearTVP *q1,
virtual void getIterated_DPhi(const double& T0, const double& T, const IPNonLinearTVP *q0, IPNonLinearTVP *q1,
double& Gamma, const double& Cxtr, const double& Cxdev,
const STensor3& Cepr, const STensor3& Eepr,
const double& trXn, const STensor3& devXn,
double& Ke, double& Ge, STensor43& Ge_Tensor,
double& ptilde, STensor3& devPhi,
STensor3& Phi, STensor3& N, STensor3& expGN, STensor43& dexpAdA,
STensor43& Dho, STensor43& Dho2inv, STensor43& Dho2_u_inv, double& Dho2_v_inv, STensor3& Fp1, fullVector<int>& alignedIndex,
STensor43& Dho, STensor43& Dho2inv, STensor43& Dho2_u_inv, double& Dho2_v_inv, fullVector<int>& alignedIndex,
STensor43* Ge_TrEeTensor = NULL, STensor43* rotationStiffness = NULL) const;
virtual void getDho(const double& Gamma, const STensor3& Cepr, const STensor3& Ceinvpr, const STensor3& KS,
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment