Skip to content
Snippets Groups Projects
Commit 38b346df authored by Vinayak Gholap's avatar Vinayak Gholap
Browse files

Merge branch 'master' into vinayak

parents d0d6f7bc e413179d
No related branches found
No related tags found
1 merge request!419Updates in strong coupling tests (change cpvac, Kvac to get right delatT in...
......@@ -388,6 +388,13 @@ void mlawElecMagGenericThermoMech::constitutive(
fluxT,dP_TMdT,dqdgradT,dqdT,dqdF,stiff,
wth,dwthdt,dwthdF,mechSource,dmechSourcedT,
dmechSourcedF,elasticTangent);
if(STensorOperation::isnan(P_TM))
{
Msg::Info("mlawGenericTM::constitutive did not converge");
P(0,0) = P(1,1) = P(2,2) = sqrt(-1.); // to exist NR and performed next step with a smaller incremene
return;
}
P = P_TM;
if(stiff)
......
......@@ -515,6 +515,12 @@ void mlawGenericTM::constitutive(const STensor3 &F0,
&qTM1.getRefToIpMeca(),
TangentMeca, stiff,
&elasticTangentMeca, dTangentMeca);
if(STensorOperation::isnan(Pmeca))
{
Msg::Info("mlawGenericTM::constitutive did not converge");
P(0,0) = P(1,1) = P(2,2) = sqrt(-1.); // to exist NR and performed next step with a smaller incremene
return;
}
STensor3 dPmecadT;
STensor43 dPmecadF;
......
......@@ -1293,7 +1293,9 @@ void mlawPhenomenologicalSMP::constitutive(
STensorOperation::multSTensor3(F0,FthAM0inv,FmAM0);
if (zg<=toleranceOnZg)
{constitutive1(q0, q1,
{
bool success=
constitutive1(q0, q1,
T0, T, stiff, F0, Fn,
FthG0, FthG, FmG0, FmG, dFthGdT, dFthGdF,
FthR0, FthR, FmR0, FmR, dFthRdT, dFthRdF,
......@@ -1305,10 +1307,18 @@ void mlawPhenomenologicalSMP::constitutive(
PsiAM, dPlasAM, dPlasAMdT, dPlasAMdF, dViscAM, dViscAMdT, dViscAMdF,
PAM, dPAMdT, TangentAM,
PsiRL2, PRL2, dPRL2dT, TangentRL2,
PsiAML2, PAML2, dPAML2dT, TangentAML2);}
PsiAML2, PAML2, dPAML2dT, TangentAML2);
if(!success)
{
Msg::Info("mlawPhenomenologicalSMP::constitutive did not converge");
P(0,0) = P(1,1) = P(2,2) = sqrt(-1.); // to exist NR and performed next step with a smaller incremene
return;
}
}
if ((zg>toleranceOnZg)and(zg<1.-toleranceOnZg))
{constitutive2(q0, q1,
{bool success=constitutive2(q0, q1,
T0, T, stiff, F0, Fn,
FthG0, FthG, FmG0, FmG, dFthGdT, dFthGdF,
FthR0, FthR, FmR0, FmR, dFthRdT, dFthRdF,
......@@ -1320,10 +1330,19 @@ void mlawPhenomenologicalSMP::constitutive(
PsiAM, dPlasAM, dPlasAMdT, dPlasAMdF, dViscAM, dViscAMdT, dViscAMdF,
PAM, dPAMdT, TangentAM,
PsiRL2, PRL2, dPRL2dT, TangentRL2,
PsiAML2, PAML2, dPAML2dT, TangentAML2);}
PsiAML2, PAML2, dPAML2dT, TangentAML2);
if(!success)
{
Msg::Info("mlawPhenomenologicalSMP::constitutive did not converge");
P(0,0) = P(1,1) = P(2,2) = sqrt(-1.); // to exist NR and performed next step with a smaller incremene
return;
}
}
if (zg>=1.-toleranceOnZg)
{constitutive3(q0, q1,
{bool success=constitutive3(q0, q1,
T0, T, stiff, F0, Fn,
FthG0, FthG, FmG0, FmG, dFthGdT, dFthGdF,
FthR0, FthR, FmR0, FmR, dFthRdT, dFthRdF,
......@@ -1335,7 +1354,15 @@ void mlawPhenomenologicalSMP::constitutive(
PsiAM, dPlasAM, dPlasAMdT, dPlasAMdF, dViscAM, dViscAMdT, dViscAMdF,
PAM, dPAMdT, TangentAM,
PsiRL2, PRL2, dPRL2dT, TangentRL2,
PsiAML2, PAML2, dPAML2dT, TangentAML2);}
PsiAML2, PAML2, dPAML2dT, TangentAML2);
if(!success)
{
Msg::Info("mlawPhenomenologicalSMP::constitutive did not converge");
P(0,0) = P(1,1) = P(2,2) = sqrt(-1.); // to exist NR and performed next step with a smaller incremene
return;
}
}
double VFAM2=VFAM;
......@@ -1768,7 +1795,7 @@ void mlawPhenomenologicalSMP::assembleDDissParti(const STensor3 &dDissVEVPdFVEVP
}
void mlawPhenomenologicalSMP::constitutive1
bool mlawPhenomenologicalSMP::constitutive1
(const IPPhenomenologicalSMP *q0, IPPhenomenologicalSMP *q1,
const double T0, const double T, const bool stiff, const STensor3& F0, const STensor3& Fn,
const STensor3& FthG0, const STensor3& FthG, const STensor3& FmG0, const STensor3& FmG, const STensor3 &dFthGdT, const STensor43 &dFthGdF,
......@@ -1851,6 +1878,12 @@ void mlawPhenomenologicalSMP::constitutive1
lawR->constitutive(FR0,FRn, PVEVPR, &(q0->getConstRefToIPHyperViscoElastoPlasticR()), &(q1->getRefToIPHyperViscoElastoPlasticR()),dPVEVPRdFR,stiff);
if (STensorOperation::isnan(PVEVPR))
{
Msg::Info("mlawPhenomenologicalSMP::constitutive1 did not converge");
return false;
}
assemblePParti(PVEVPR, FfR, FthR, Fn, PR);
assembleTangentParti(PR, dPVEVPRdFR, dPVEVPRdT, FfR, FthR, dFthRdF, dFthRdT, Fn, TangentR, dPRdT);
......@@ -1895,7 +1928,12 @@ void mlawPhenomenologicalSMP::constitutive1
anisotropicThermalAlphaCoefTanhTempBulkAM, anisotropicThermalAlphaCoefTanhTempShearAM);
lawAM->constitutive(FAM0,FAMn, PVEVPAM, &(q0->getConstRefToIPHyperViscoElastoPlasticAM()), &(q1->getRefToIPHyperViscoElastoPlasticAM()),dPVEVPAMdFAM,stiff);
if (STensorOperation::isnan(PVEVPAM))
{
Msg::Info("mlawPhenomenologicalSMP::constitutive1 did not converge");
return false;
}
assemblePParti(PVEVPAM, FfAM, FthAM, Fn, PAM);
assembleTangentParti(PAM, dPVEVPAMdFAM, dPVEVPAMdT, FfAM, FthAM, dFthAMdF, dFthAMdT, Fn, TangentAM, dPAMdT);
......@@ -1949,6 +1987,11 @@ void mlawPhenomenologicalSMP::constitutive1
if(_EPFunc_AM!=NULL)
{
_EPFunc_AM->constitutive(FAML2n, PVEVPAML2, stiff, &dPVEVPAML2dFAML2);
if (STensorOperation::isnan(PVEVPAML2))
{
Msg::Info("mlawPhenomenologicalSMP::constitutive1 did not converge");
return false;
}
PsiAML2= _EPFunc_AM->get(FAML2n);
assemblePParti(PVEVPAML2, FfAM, FthAM, Fn, PAML2);
assembleTangentParti(PAML2, dPVEVPAML2dFAML2, dPVEVPAML2dT, FfAM, FthAM, dFthAMdF, dFthAMdT, Fn, TangentAML2, dPAML2dT);
......@@ -1995,10 +2038,10 @@ void mlawPhenomenologicalSMP::constitutive1
STensorOperation::multSTensor3(Fvei_int, FfGinv, Fvei_int2);
STensorOperation::multSTensor3(Fvei_int2, FpGinv, FveG);
return true;
}
void mlawPhenomenologicalSMP::constitutive2
bool mlawPhenomenologicalSMP::constitutive2
(const IPPhenomenologicalSMP *q0, IPPhenomenologicalSMP *q1,
const double T0, const double T, const bool stiff, const STensor3& F0, const STensor3& Fn,
const STensor3& FthG0, const STensor3& FthG, const STensor3& FmG0, const STensor3& FmG, const STensor3 &dFthGdT, const STensor43 &dFthGdF,
......@@ -2063,6 +2106,11 @@ void mlawPhenomenologicalSMP::constitutive2
lawG->constitutive(FG0,FGn, PVEVPG, &(q0->getConstRefToIPHyperViscoElastoPlasticG()), &(q1->getRefToIPHyperViscoElastoPlasticG()),dPVEVPGdFG,stiff);
if (STensorOperation::isnan(PVEVPG))
{
Msg::Info("mlawPhenomenologicalSMP::constitutive2 did not converge");
return false;
}
assemblePParti(PVEVPG, FfG, FthG, Fn, PG);
assembleTangentParti(PG, dPVEVPGdFG, dPVEVPGdT, FfG, FthG, dFthGdF, dFthGdT, Fn, TangentG, dPGdT);
......@@ -2112,6 +2160,11 @@ void mlawPhenomenologicalSMP::constitutive2
lawR->constitutive(FR0,FRn, PVEVPR, &(q0->getConstRefToIPHyperViscoElastoPlasticR()), &(q1->getRefToIPHyperViscoElastoPlasticR()),dPVEVPRdFR,stiff);
if (STensorOperation::isnan(PVEVPR))
{
Msg::Info("mlawPhenomenologicalSMP::constitutive2 did not converge");
return false;
}
assemblePParti(PVEVPR, FfR, FthR, Fn, PR);
assembleTangentParti(PR, dPVEVPRdFR, dPVEVPRdT, FfR, FthR, dFthRdF, dFthRdT, Fn, TangentR, dPRdT);
......@@ -2155,6 +2208,11 @@ void mlawPhenomenologicalSMP::constitutive2
anisotropicThermalAlphaCoefTanhTempBulkAM, anisotropicThermalAlphaCoefTanhTempShearAM);
lawAM->constitutive(FAM0,FAMn, PVEVPAM, &(q0->getConstRefToIPHyperViscoElastoPlasticAM()), &(q1->getRefToIPHyperViscoElastoPlasticAM()),dPVEVPAMdFAM,stiff);
if (STensorOperation::isnan(PVEVPAM))
{
Msg::Info("mlawPhenomenologicalSMP::constitutive1 did not converge");
return false;
}
assemblePParti(PVEVPAM, FfAM, FthAM, Fn, PAM);
assembleTangentParti(PAM, dPVEVPAMdFAM, dPVEVPAMdT, FfAM, FthAM, dFthAMdF, dFthAMdT, Fn, TangentAM, dPAMdT);
......@@ -2188,6 +2246,11 @@ void mlawPhenomenologicalSMP::constitutive2
if(_EPFunc_R!=NULL)
{
_EPFunc_R->constitutive(FRL2n, PVEVPRL2, stiff, &dPVEVPRL2dFRL2);
if (STensorOperation::isnan(PVEVPRL2))
{
Msg::Info("mlawPhenomenologicalSMP::constitutive2 did not converge");
return false;
}
PsiRL2= _EPFunc_R->get(FRL2n);
assemblePParti(PVEVPRL2, FfR, FthR, Fn, PRL2);
assembleTangentParti(PRL2, dPVEVPRL2dFRL2, dPVEVPRL2dT, FfR, FthR, dFthRdF, dFthRdT, Fn, TangentRL2, dPRL2dT);
......@@ -2208,18 +2271,23 @@ void mlawPhenomenologicalSMP::constitutive2
if(_EPFunc_AM!=NULL)
{
_EPFunc_AM->constitutive(FAML2n, PVEVPAML2, stiff, &dPVEVPAML2dFAML2);
if (STensorOperation::isnan(PVEVPAML2))
{
Msg::Info("mlawPhenomenologicalSMP::constitutive2 did not converge");
return false;
}
PsiAML2= _EPFunc_AM->get(FAML2n);
assemblePParti(PVEVPAML2, FfAM, FthAM, Fn, PAML2);
assembleTangentParti(PAML2, dPVEVPAML2dFAML2, dPVEVPAML2dT, FfAM, FthAM, dFthAMdF, dFthAMdT, Fn, TangentAML2, dPAML2dT);
}
return true;
}
void mlawPhenomenologicalSMP::constitutive3
bool mlawPhenomenologicalSMP::constitutive3
(const IPPhenomenologicalSMP *q0, IPPhenomenologicalSMP *q1,
const double T0, const double T, const bool stiff, const STensor3& F0, const STensor3& Fn,
const STensor3& FthG0, const STensor3& FthG, const STensor3& FmG0, const STensor3& FmG, const STensor3 &dFthGdT, const STensor43 &dFthGdF,
......@@ -2289,6 +2357,11 @@ void mlawPhenomenologicalSMP::constitutive3
anisotropicThermalAlphaCoefTanhTempBulkG, anisotropicThermalAlphaCoefTanhTempShearG);
lawG->constitutive(FG0,FGn, PVEVPG, &(q0->getConstRefToIPHyperViscoElastoPlasticG()), &(q1->getRefToIPHyperViscoElastoPlasticG()),dPVEVPGdFG,stiff);
if (STensorOperation::isnan(PVEVPG))
{
Msg::Info("mlawPhenomenologicalSMP::constitutive3 did not converge");
return false;
}
assemblePParti(PVEVPG, FfG, FthG, Fn, PG);
assembleTangentParti(PG, dPVEVPGdFG, dPVEVPGdT, FfG, FthG, dFthGdF, dFthGdT, Fn, TangentG, dPGdT);
......@@ -2368,6 +2441,12 @@ void mlawPhenomenologicalSMP::constitutive3
anisotropicThermalAlphaCoefTanhTempBulkAM, anisotropicThermalAlphaCoefTanhTempShearAM);
lawAM->constitutive(FAM0,FAMn, PVEVPAM, &(q0->getConstRefToIPHyperViscoElastoPlasticAM()), &(q1->getRefToIPHyperViscoElastoPlasticAM()),dPVEVPAMdFAM,stiff);
if (STensorOperation::isnan(PVEVPAM))
{
Msg::Info("mlawPhenomenologicalSMP::constitutive3 did not converge");
return false;
}
assemblePParti(PVEVPAM, FfAM, FthAM, Fn, PAM);
assembleTangentParti(PAM, dPVEVPAMdFAM, dPVEVPAMdT, FfAM, FthAM, dFthAMdF, dFthAMdT, Fn, TangentAM, dPAMdT);
......@@ -2401,6 +2480,12 @@ void mlawPhenomenologicalSMP::constitutive3
if(_EPFunc_R!=NULL)
{
_EPFunc_R->constitutive(FRL2n, PVEVPRL2, stiff, &dPVEVPRL2dFRL2);
if (STensorOperation::isnan(PVEVPRL2))
{
Msg::Info("mlawPhenomenologicalSMP::constitutive3 did not converge");
return false;
}
PsiRL2= _EPFunc_R->get(FRL2n);
assemblePParti(PVEVPRL2, FfR, FthR, Fn, PRL2);
assembleTangentParti(PRL2, dPVEVPRL2dFRL2, dPVEVPRL2dT, FfR, FthR, dFthRdF, dFthRdT, Fn, TangentRL2, dPRL2dT);
......@@ -2421,6 +2506,11 @@ void mlawPhenomenologicalSMP::constitutive3
if(_EPFunc_AM!=NULL)
{
_EPFunc_AM->constitutive(FAML2n, PVEVPAML2, stiff, &dPVEVPAML2dFAML2);
if (STensorOperation::isnan(PVEVPAML2))
{
Msg::Info("mlawPhenomenologicalSMP::constitutive3 did not converge");
return false;
}
PsiAML2= _EPFunc_AM->get(FAML2n);
assemblePParti(PVEVPAML2, FfAM, FthAM, Fn, PAML2);
assembleTangentParti(PAML2, dPVEVPAML2dFAML2, dPVEVPAML2dT, FfAM, FthAM, dFthAMdF, dFthAMdT, Fn, TangentAML2, dPAML2dT);
......@@ -2428,7 +2518,7 @@ void mlawPhenomenologicalSMP::constitutive3
// TangentG.print("con1 TanG");
// TangentAM.print("con1 TanAM");
return true;
}
......
......@@ -825,7 +825,7 @@ public:
STensor3 &dmechSourcedF,
STensor43 *elasticTangent=NULL
) const;
void constitutive1(
bool constitutive1(
const IPPhenomenologicalSMP *q0, IPPhenomenologicalSMP *q1,
const double T0, const double T, const bool stiff, const STensor3& F0, const STensor3& Fn,
const STensor3& FthG0, const STensor3& FthG, const STensor3& FmG0, const STensor3& FmG, const STensor3 &dFthGdT, const STensor43 &dFthGdF,
......@@ -840,7 +840,7 @@ public:
double &PsiRL2, STensor3 &PRL2, STensor3 &dPRL2dT, STensor43 &TangentRL2,
double &PsiAML2, STensor3 &PAML2, STensor3 &dPAML2dT, STensor43 &TangentAML2) const;
void constitutive2(
bool constitutive2(
const IPPhenomenologicalSMP *q0, IPPhenomenologicalSMP *q1,
const double T0, const double T, const bool stiff, const STensor3& F0, const STensor3& Fn,
const STensor3& FthG0, const STensor3& FthG, const STensor3& FmG0, const STensor3& FmG, const STensor3 &dFthGdT, const STensor43 &dFthGdF,
......@@ -855,7 +855,7 @@ public:
double &PsiRL2, STensor3 &PRL2, STensor3 &dPRL2dT, STensor43 &TangentRL2,
double &PsiAML2, STensor3 &PAML2, STensor3 &dPAML2dT, STensor43 &TangentAML2) const;
void constitutive3(
bool constitutive3(
const IPPhenomenologicalSMP *q0, IPPhenomenologicalSMP *q1,
const double T0, const double T, const bool stiff, const STensor3& F0, const STensor3& Fn,
const STensor3& FthG0, const STensor3& FthG, const STensor3& FmG0, const STensor3& FmG, const STensor3 &dFthGdT, const STensor43 &dFthGdF,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment