diff --git a/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H b/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H index 2a0ea5756..b225185fb 100644 --- a/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H +++ b/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H @@ -25,6 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "Vector.H" +#include "Tensor.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -185,18 +186,21 @@ inline Vector operator*(const SymmTensor& st) //- Inner-product between two symmetric tensors template -inline SymmTensor +inline Tensor operator&(const SymmTensor& st1, const SymmTensor& st2) { - return SymmTensor + return Tensor ( st1.xx()*st2.xx() + st1.xy()*st2.xy() + st1.xz()*st2.xz(), st1.xx()*st2.xy() + st1.xy()*st2.yy() + st1.xz()*st2.yz(), st1.xx()*st2.xz() + st1.xy()*st2.yz() + st1.xz()*st2.zz(), + st1.xy()*st2.xx() + st1.yy()*st2.xy() + st1.yz()*st2.xz(), st1.xy()*st2.xy() + st1.yy()*st2.yy() + st1.yz()*st2.yz(), st1.xy()*st2.xz() + st1.yy()*st2.yz() + st1.yz()*st2.zz(), + st1.xz()*st2.xx() + st1.yz()*st2.xy() + st1.zz()*st2.xz(), + st1.xz()*st2.xy() + st1.yz()*st2.yy() + st1.zz()*st2.yz(), st1.xz()*st2.xz() + st1.yz()*st2.yz() + st1.zz()*st2.zz() ); } @@ -535,7 +539,7 @@ class innerProduct, SymmTensor > { public: - typedef SymmTensor type; + typedef Tensor type; }; template diff --git a/src/transportModels/viscoelastic/viscoelasticLaws/EPTT/EPTT.C b/src/transportModels/viscoelastic/viscoelasticLaws/EPTT/EPTT.C index a9fd94b8a..8a4ec2023 100644 --- a/src/transportModels/viscoelastic/viscoelasticLaws/EPTT/EPTT.C +++ b/src/transportModels/viscoelastic/viscoelasticLaws/EPTT/EPTT.C @@ -101,7 +101,7 @@ void Foam::EPTT::correct() == etaP_/lambda_*twoD + twoSymm(C) - - zeta_/2*((tau_ & twoD) + (twoD & tau_)) + - zeta_*symm(tau_ & twoD) - fvm::Sp ( (1/lambda_)*Foam::exp(epsilon_*lambda_/etaP_*tr(tau_)), diff --git a/src/transportModels/viscoelastic/viscoelasticLaws/Feta-PTT/Feta_PTT.C b/src/transportModels/viscoelastic/viscoelasticLaws/Feta-PTT/Feta_PTT.C index 5477d87dd..8a6b1d461 100644 --- a/src/transportModels/viscoelastic/viscoelasticLaws/Feta-PTT/Feta_PTT.C +++ b/src/transportModels/viscoelastic/viscoelasticLaws/Feta-PTT/Feta_PTT.C @@ -143,7 +143,7 @@ void Foam::Feta_PTT::correct() == etaPEff_/lambdaEff_*twoD + twoSymm(C) - - zeta_/2*((tau_ & twoD) + (twoD & tau_)) + - zeta_*symm(tau_ & twoD) - fvm::Sp(epsilon_/etaPEff_*tr(tau_) + 1/lambdaEff_, tau_) ); diff --git a/src/transportModels/viscoelastic/viscoelasticLaws/Giesekus/Giesekus.C b/src/transportModels/viscoelastic/viscoelasticLaws/Giesekus/Giesekus.C index 38e0510b2..a8d67ac1f 100644 --- a/src/transportModels/viscoelastic/viscoelasticLaws/Giesekus/Giesekus.C +++ b/src/transportModels/viscoelastic/viscoelasticLaws/Giesekus/Giesekus.C @@ -102,7 +102,7 @@ void Foam::Giesekus::correct() == etaP_/lambda_*twoD + twoSymm(C) - - (alpha_/etaP_)*(tau_ & tau_) + - (alpha_/etaP_)*symm(tau_ & tau_) - fvm::Sp(1/lambda_, tau_) ); diff --git a/src/transportModels/viscoelastic/viscoelasticLaws/LPTT/LPTT.C b/src/transportModels/viscoelastic/viscoelasticLaws/LPTT/LPTT.C index 9d663d2ec..419a770c0 100644 --- a/src/transportModels/viscoelastic/viscoelasticLaws/LPTT/LPTT.C +++ b/src/transportModels/viscoelastic/viscoelasticLaws/LPTT/LPTT.C @@ -103,7 +103,7 @@ void Foam::LPTT::correct() == etaP_/lambda_*twoD + twoSymm(C) - - zeta_/2*((tau_ & twoD) + (twoD & tau_)) + - zeta_*symm(tau_ & twoD) - fvm::Sp(epsilon_/etaP_*tr(tau_) + 1/lambda_, tau_) ); diff --git a/src/transportModels/viscoelastic/viscoelasticLaws/Leonov/Leonov.C b/src/transportModels/viscoelastic/viscoelasticLaws/Leonov/Leonov.C index 2e6039c2d..23fa259e1 100644 --- a/src/transportModels/viscoelastic/viscoelasticLaws/Leonov/Leonov.C +++ b/src/transportModels/viscoelastic/viscoelasticLaws/Leonov/Leonov.C @@ -130,7 +130,7 @@ void Foam::Leonov::correct() + fvm::div(phi(), sigma_) == twoSymm(C) - - 1/etaP_/2*((sigma_ & sigma_) - Foam::pow((etaP_/lambda_), 2)*I_) + - 1/etaP_/2*(symm(sigma_ & sigma_) - Foam::pow((etaP_/lambda_), 2)*I_) + fvm::Sp ( 1/etaP_/6* diff --git a/src/transportModels/viscoelastic/viscoelasticLaws/S_MDCPP/S_MDCPP.C b/src/transportModels/viscoelastic/viscoelasticLaws/S_MDCPP/S_MDCPP.C index 11dc2be6c..4a7318daa 100644 --- a/src/transportModels/viscoelastic/viscoelasticLaws/S_MDCPP/S_MDCPP.C +++ b/src/transportModels/viscoelastic/viscoelasticLaws/S_MDCPP/S_MDCPP.C @@ -129,7 +129,7 @@ void Foam::S_MDCPP::correct() == etaP_/lambdaOb_*twoD + twoSymm(C) - - zeta_/2*((tau_ & twoD) + (twoD & tau_)) + - zeta_*symm(tau_ & twoD) - fvm::Sp(1/lambdaOb_*fTau, tau_) - ( 1/lambdaOb_*(etaP_/lambdaOb_/(1 - zeta_)*(fTau - aux)*I_) diff --git a/src/transportModels/viscoelastic/viscoelasticLaws/XPP_DE/XPP_DE.C b/src/transportModels/viscoelastic/viscoelasticLaws/XPP_DE/XPP_DE.C index 0ef6ae626..3ccf0d70a 100644 --- a/src/transportModels/viscoelastic/viscoelasticLaws/XPP_DE/XPP_DE.C +++ b/src/transportModels/viscoelastic/viscoelasticLaws/XPP_DE/XPP_DE.C @@ -154,7 +154,7 @@ void Foam::XPP_DE::correct() S_ ) - 1/lambdaOb_/Foam::sqr(Lambda_)* - (3*alpha_*Foam::pow(Lambda_, 4)*(S_ & S_) - (1 - alpha_)/3*I_) + (3*alpha_*Foam::pow(Lambda_, 4)*symm(S_ & S_) - (1 - alpha_)/3*I_) ); SEqn().relax(); diff --git a/src/transportModels/viscoelastic/viscoelasticLaws/XPP_SE/XPP_SE.C b/src/transportModels/viscoelastic/viscoelasticLaws/XPP_SE/XPP_SE.C index aabca9727..4b0ffaed4 100644 --- a/src/transportModels/viscoelastic/viscoelasticLaws/XPP_SE/XPP_SE.C +++ b/src/transportModels/viscoelastic/viscoelasticLaws/XPP_SE/XPP_SE.C @@ -133,7 +133,7 @@ void Foam::XPP_SE::correct() - ( 1/lambdaOb_* ( - alpha_*lambdaOb_/etaP_*(tau_ & tau_) + alpha_*lambdaOb_/etaP_*symm(tau_ & tau_) + etaP_/lambdaOb_*(fTau - 1)*I_ ) )