From a6200b5d92104a4e05a75ec2d3e8be7b34feda9a Mon Sep 17 00:00:00 2001 From: FLE_Knight <ujwalkishore.jinaga@mail.polimi.it> Date: Fri, 13 Jan 2023 17:48:56 +0100 Subject: [PATCH] addedCheckCommutativity --- .../materialLaw/mlawNonLinearTVP.cpp | 21 +++++++++++-------- .../materialLaw/mlawNonLinearTVP.h | 2 +- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/NonLinearSolver/materialLaw/mlawNonLinearTVP.cpp b/NonLinearSolver/materialLaw/mlawNonLinearTVP.cpp index b38620923..f268df7f2 100644 --- a/NonLinearSolver/materialLaw/mlawNonLinearTVP.cpp +++ b/NonLinearSolver/materialLaw/mlawNonLinearTVP.cpp @@ -126,20 +126,20 @@ void mlawNonLinearTVP::getModifiedMandel(const STensor3& C, const IPNonLinearTVP M = 0.5*(corKir + temp2); }; -void mlawNonLinearTVP::checkCommutavity(const STensor3& C, const STensor3& S, const IPNonLinearTVP *q1) const{ +void mlawNonLinearTVP::checkCommutavity(STensor3& commuteCheck,const STensor3& Ce, const STensor3& S, const IPNonLinearTVP *q1) const{ const STensor3& M = q1->getConstRefToModifiedMandel(); const STensor3& corKir = q1->getConstRefToCorotationalKirchhoffStress(); - STensor3 temp1, temp2, temp3, temp4, temp5, temp6; - STensorOperation::multSTensor3(C, S, temp1); - STensorOperation::multSTensor3(S, C, temp2); - STensorOperation::multSTensor3(corKir, C, temp3); - STensorOperation::multSTensor3(C, corKir, temp4); + STensor3 temp1, temp2, temp3, temp4, temp6; + STensorOperation::multSTensor3(Ce, S, temp1); + STensorOperation::multSTensor3(S, Ce, temp2); + STensorOperation::multSTensor3(corKir, Ce, temp3); + STensorOperation::multSTensor3(Ce, corKir, temp4); // Check S - temp5 = temp1; - temp5 -= temp2; + commuteCheck = temp1; + commuteCheck -= temp2; // Check corKir (just for fun) temp6 = temp3; @@ -1321,7 +1321,10 @@ void mlawNonLinearTVP::predictorCorrector_TVP_nonAssociatedFlow(const STensor3& P(i,j) += Fe(i,k)*S(k,l)*Fpinv(j,l); } - + // check Commutavity + static STensor3 Check; + checkCommutavity(Check,Ce,S,q1); + // defo energy // q1->getRefToElasticEnergy()=deformationEnergy(*q1); q1->getRefToViscousEnergyPart()=viscousEnergy(*q0,*q1)+q0->getConstRefToViscousEnergyPart(); diff --git a/NonLinearSolver/materialLaw/mlawNonLinearTVP.h b/NonLinearSolver/materialLaw/mlawNonLinearTVP.h index aa906bead..060ed56a4 100644 --- a/NonLinearSolver/materialLaw/mlawNonLinearTVP.h +++ b/NonLinearSolver/materialLaw/mlawNonLinearTVP.h @@ -32,7 +32,7 @@ class mlawNonLinearTVP : public mlawNonLinearTVE{ // NEW virtual void hardening(const IPNonLinearTVP* q0, IPNonLinearTVP* q1, const double& T) const; virtual void getModifiedMandel(const STensor3& C, const IPNonLinearTVP *q0_, IPNonLinearTVP *q1) const; - virtual void checkCommutavity(const STensor3& C, const STensor3& S, const IPNonLinearTVP *q1) const; + virtual void checkCommutavity(STensor3& commuteCheck, const STensor3& Ce, const STensor3& S, const IPNonLinearTVP *q1) const; virtual void getChabocheCoeffs(fullVector<double>& coeffs, const double& opt, const IPNonLinearTVP *q1) const; virtual void getPlasticPotential(const double& phiP, const double& phiE, double& Px) const; virtual void getYieldCoefficientTempDers(const IPNonLinearTVP *q1, const double& T, fullVector<double>& DcoeffsDT, fullVector<double>& DDcoeffsDTT) const; -- GitLab