Dot-product of symmetric tensors: forum bug fix
This commit is contained in:
parent
bc9b4612c8
commit
bc9513426a
9 changed files with 15 additions and 11 deletions
|
@ -25,6 +25,7 @@ License
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "Vector.H"
|
#include "Vector.H"
|
||||||
|
#include "Tensor.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -185,18 +186,21 @@ inline Vector<Cmpt> operator*(const SymmTensor<Cmpt>& st)
|
||||||
|
|
||||||
//- Inner-product between two symmetric tensors
|
//- Inner-product between two symmetric tensors
|
||||||
template <class Cmpt>
|
template <class Cmpt>
|
||||||
inline SymmTensor<Cmpt>
|
inline Tensor<Cmpt>
|
||||||
operator&(const SymmTensor<Cmpt>& st1, const SymmTensor<Cmpt>& st2)
|
operator&(const SymmTensor<Cmpt>& st1, const SymmTensor<Cmpt>& st2)
|
||||||
{
|
{
|
||||||
return SymmTensor<Cmpt>
|
return Tensor<Cmpt>
|
||||||
(
|
(
|
||||||
st1.xx()*st2.xx() + st1.xy()*st2.xy() + st1.xz()*st2.xz(),
|
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.xy() + st1.xy()*st2.yy() + st1.xz()*st2.yz(),
|
||||||
st1.xx()*st2.xz() + st1.xy()*st2.yz() + st1.xz()*st2.zz(),
|
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.xy() + st1.yy()*st2.yy() + st1.yz()*st2.yz(),
|
||||||
st1.xy()*st2.xz() + st1.yy()*st2.yz() + st1.yz()*st2.zz(),
|
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()
|
st1.xz()*st2.xz() + st1.yz()*st2.yz() + st1.zz()*st2.zz()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -535,7 +539,7 @@ class innerProduct<SymmTensor<Cmpt>, SymmTensor<Cmpt> >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef SymmTensor<Cmpt> type;
|
typedef Tensor<Cmpt> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
|
|
|
@ -101,7 +101,7 @@ void Foam::EPTT::correct()
|
||||||
==
|
==
|
||||||
etaP_/lambda_*twoD
|
etaP_/lambda_*twoD
|
||||||
+ twoSymm(C)
|
+ twoSymm(C)
|
||||||
- zeta_/2*((tau_ & twoD) + (twoD & tau_))
|
- zeta_*symm(tau_ & twoD)
|
||||||
- fvm::Sp
|
- fvm::Sp
|
||||||
(
|
(
|
||||||
(1/lambda_)*Foam::exp(epsilon_*lambda_/etaP_*tr(tau_)),
|
(1/lambda_)*Foam::exp(epsilon_*lambda_/etaP_*tr(tau_)),
|
||||||
|
|
|
@ -143,7 +143,7 @@ void Foam::Feta_PTT::correct()
|
||||||
==
|
==
|
||||||
etaPEff_/lambdaEff_*twoD
|
etaPEff_/lambdaEff_*twoD
|
||||||
+ twoSymm(C)
|
+ twoSymm(C)
|
||||||
- zeta_/2*((tau_ & twoD) + (twoD & tau_))
|
- zeta_*symm(tau_ & twoD)
|
||||||
- fvm::Sp(epsilon_/etaPEff_*tr(tau_) + 1/lambdaEff_, tau_)
|
- fvm::Sp(epsilon_/etaPEff_*tr(tau_) + 1/lambdaEff_, tau_)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ void Foam::Giesekus::correct()
|
||||||
==
|
==
|
||||||
etaP_/lambda_*twoD
|
etaP_/lambda_*twoD
|
||||||
+ twoSymm(C)
|
+ twoSymm(C)
|
||||||
- (alpha_/etaP_)*(tau_ & tau_)
|
- (alpha_/etaP_)*symm(tau_ & tau_)
|
||||||
- fvm::Sp(1/lambda_, tau_)
|
- fvm::Sp(1/lambda_, tau_)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ void Foam::LPTT::correct()
|
||||||
==
|
==
|
||||||
etaP_/lambda_*twoD
|
etaP_/lambda_*twoD
|
||||||
+ twoSymm(C)
|
+ twoSymm(C)
|
||||||
- zeta_/2*((tau_ & twoD) + (twoD & tau_))
|
- zeta_*symm(tau_ & twoD)
|
||||||
- fvm::Sp(epsilon_/etaP_*tr(tau_) + 1/lambda_, tau_)
|
- fvm::Sp(epsilon_/etaP_*tr(tau_) + 1/lambda_, tau_)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ void Foam::Leonov::correct()
|
||||||
+ fvm::div(phi(), sigma_)
|
+ fvm::div(phi(), sigma_)
|
||||||
==
|
==
|
||||||
twoSymm(C)
|
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
|
+ fvm::Sp
|
||||||
(
|
(
|
||||||
1/etaP_/6*
|
1/etaP_/6*
|
||||||
|
|
|
@ -129,7 +129,7 @@ void Foam::S_MDCPP::correct()
|
||||||
==
|
==
|
||||||
etaP_/lambdaOb_*twoD
|
etaP_/lambdaOb_*twoD
|
||||||
+ twoSymm(C)
|
+ twoSymm(C)
|
||||||
- zeta_/2*((tau_ & twoD) + (twoD & tau_))
|
- zeta_*symm(tau_ & twoD)
|
||||||
- fvm::Sp(1/lambdaOb_*fTau, tau_)
|
- fvm::Sp(1/lambdaOb_*fTau, tau_)
|
||||||
- (
|
- (
|
||||||
1/lambdaOb_*(etaP_/lambdaOb_/(1 - zeta_)*(fTau - aux)*I_)
|
1/lambdaOb_*(etaP_/lambdaOb_/(1 - zeta_)*(fTau - aux)*I_)
|
||||||
|
|
|
@ -154,7 +154,7 @@ void Foam::XPP_DE::correct()
|
||||||
S_
|
S_
|
||||||
)
|
)
|
||||||
- 1/lambdaOb_/Foam::sqr(Lambda_)*
|
- 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();
|
SEqn().relax();
|
||||||
|
|
|
@ -133,7 +133,7 @@ void Foam::XPP_SE::correct()
|
||||||
- (
|
- (
|
||||||
1/lambdaOb_*
|
1/lambdaOb_*
|
||||||
(
|
(
|
||||||
alpha_*lambdaOb_/etaP_*(tau_ & tau_)
|
alpha_*lambdaOb_/etaP_*symm(tau_ & tau_)
|
||||||
+ etaP_/lambdaOb_*(fTau - 1)*I_
|
+ etaP_/lambdaOb_*(fTau - 1)*I_
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Reference in a new issue