ENH: Tensor/SymmTensor: add devSymm and devTwoSymm funcs to avoid intermediates

This commit is contained in:
Kutalmis Bercin 2023-03-22 10:34:28 +00:00
parent f98ecb38dc
commit 59b1cf080e
56 changed files with 185 additions and 105 deletions

View File

@ -223,7 +223,7 @@ if (ign.ignited())
volScalarField R(Gstar*XiEqStar/(XiEqStar - scalar(1))); volScalarField R(Gstar*XiEqStar/(XiEqStar - scalar(1)));
volScalarField G(R*(XiEq - scalar(1.001))/XiEq); volScalarField G(R*(XiEq - scalar(1.001))/XiEq);
//R *= (Gstar + 2*mag(dev(symm(fvc::grad(U)))))/Gstar; //R *= (Gstar + 2*mag(devSymm(fvc::grad(U))))/Gstar;
// Solve for the flame wrinkling // Solve for the flame wrinkling
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2015-2021 OpenCFD Ltd. Copyright (C) 2015-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -326,7 +326,7 @@ int main(int argc, char *argv[])
volScalarField nut(calcNut(mesh, U)); volScalarField nut(calcNut(mesh, U));
// Blend nut using boundary layer profile // Blend nut using boundary layer profile
volScalarField S("S", mag(dev(symm(fvc::grad(U))))); volScalarField S("S", mag(devSymm(fvc::grad(U))));
nut = (1 - mask)*nut + mask*sqr(kappa*min(y, ybl))*::sqrt(2)*S; nut = (1 - mask)*nut + mask*sqr(kappa*min(y, ybl))*::sqrt(2)*S;
// Do not correct BC - wall functions will 'undo' manipulation above // Do not correct BC - wall functions will 'undo' manipulation above

View File

@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -45,6 +46,8 @@ UNARY_FUNCTION(scalar, symmTensor, tr, transform)
UNARY_FUNCTION(sphericalTensor, symmTensor, sph, transform) UNARY_FUNCTION(sphericalTensor, symmTensor, sph, transform)
UNARY_FUNCTION(symmTensor, symmTensor, symm, transform) UNARY_FUNCTION(symmTensor, symmTensor, symm, transform)
UNARY_FUNCTION(symmTensor, symmTensor, twoSymm, transform) UNARY_FUNCTION(symmTensor, symmTensor, twoSymm, transform)
UNARY_FUNCTION(symmTensor, symmTensor, devSymm, transform)
UNARY_FUNCTION(symmTensor, symmTensor, devTwoSymm, transform)
UNARY_FUNCTION(symmTensor, symmTensor, dev, transform) UNARY_FUNCTION(symmTensor, symmTensor, dev, transform)
UNARY_FUNCTION(symmTensor, symmTensor, dev2, transform) UNARY_FUNCTION(symmTensor, symmTensor, dev2, transform)
UNARY_FUNCTION(scalar, symmTensor, det, pow3) UNARY_FUNCTION(scalar, symmTensor, det, pow3)

View File

@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -57,6 +58,8 @@ UNARY_FUNCTION(scalar, symmTensor, tr, transform)
UNARY_FUNCTION(sphericalTensor, symmTensor, sph, transform) UNARY_FUNCTION(sphericalTensor, symmTensor, sph, transform)
UNARY_FUNCTION(symmTensor, symmTensor, symm, transform) UNARY_FUNCTION(symmTensor, symmTensor, symm, transform)
UNARY_FUNCTION(symmTensor, symmTensor, twoSymm, transform) UNARY_FUNCTION(symmTensor, symmTensor, twoSymm, transform)
UNARY_FUNCTION(symmTensor, symmTensor, devSymm, transform)
UNARY_FUNCTION(symmTensor, symmTensor, devTwoSymm, transform)
UNARY_FUNCTION(symmTensor, symmTensor, dev, transform) UNARY_FUNCTION(symmTensor, symmTensor, dev, transform)
UNARY_FUNCTION(symmTensor, symmTensor, dev2, transform) UNARY_FUNCTION(symmTensor, symmTensor, dev2, transform)
UNARY_FUNCTION(scalar, symmTensor, det, transform) UNARY_FUNCTION(scalar, symmTensor, det, transform)

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2013 OpenFOAM Foundation Copyright (C) 2011-2013 OpenFOAM Foundation
Copyright (C) 2020-2021 OpenCFD Ltd. Copyright (C) 2020-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -43,6 +43,8 @@ UNARY_FUNCTION(scalar, tensor, tr, transform)
UNARY_FUNCTION(sphericalTensor, tensor, sph, transform) UNARY_FUNCTION(sphericalTensor, tensor, sph, transform)
UNARY_FUNCTION(symmTensor, tensor, symm, transform) UNARY_FUNCTION(symmTensor, tensor, symm, transform)
UNARY_FUNCTION(symmTensor, tensor, twoSymm, transform) UNARY_FUNCTION(symmTensor, tensor, twoSymm, transform)
UNARY_FUNCTION(symmTensor, tensor, devSymm, transform)
UNARY_FUNCTION(symmTensor, tensor, devTwoSymm, transform)
UNARY_FUNCTION(tensor, tensor, skew, transform) UNARY_FUNCTION(tensor, tensor, skew, transform)
UNARY_FUNCTION(tensor, tensor, dev, transform) UNARY_FUNCTION(tensor, tensor, dev, transform)
UNARY_FUNCTION(tensor, tensor, dev2, transform) UNARY_FUNCTION(tensor, tensor, dev2, transform)

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2020-2021 OpenCFD Ltd. Copyright (C) 2020-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -56,6 +56,8 @@ UNARY_FUNCTION(scalar, tensor, tr, transform)
UNARY_FUNCTION(sphericalTensor, tensor, sph, transform) UNARY_FUNCTION(sphericalTensor, tensor, sph, transform)
UNARY_FUNCTION(symmTensor, tensor, symm, transform) UNARY_FUNCTION(symmTensor, tensor, symm, transform)
UNARY_FUNCTION(symmTensor, tensor, twoSymm, transform) UNARY_FUNCTION(symmTensor, tensor, twoSymm, transform)
UNARY_FUNCTION(symmTensor, tensor, devSymm, transform)
UNARY_FUNCTION(symmTensor, tensor, devTwoSymm, transform)
UNARY_FUNCTION(tensor, tensor, skew, transform) UNARY_FUNCTION(tensor, tensor, skew, transform)
UNARY_FUNCTION(tensor, tensor, dev, transform) UNARY_FUNCTION(tensor, tensor, dev, transform)
UNARY_FUNCTION(tensor, tensor, dev2, transform) UNARY_FUNCTION(tensor, tensor, dev2, transform)

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2019-2022 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -205,6 +205,8 @@ UNARY_FUNCTION(scalar, symmTensor, tr)
UNARY_FUNCTION(sphericalTensor, symmTensor, sph) UNARY_FUNCTION(sphericalTensor, symmTensor, sph)
UNARY_FUNCTION(symmTensor, symmTensor, symm) UNARY_FUNCTION(symmTensor, symmTensor, symm)
UNARY_FUNCTION(symmTensor, symmTensor, twoSymm) UNARY_FUNCTION(symmTensor, symmTensor, twoSymm)
UNARY_FUNCTION(symmTensor, symmTensor, devSymm)
UNARY_FUNCTION(symmTensor, symmTensor, devTwoSymm)
UNARY_FUNCTION(symmTensor, symmTensor, dev) UNARY_FUNCTION(symmTensor, symmTensor, dev)
UNARY_FUNCTION(symmTensor, symmTensor, dev2) UNARY_FUNCTION(symmTensor, symmTensor, dev2)
UNARY_FUNCTION(scalar, symmTensor, det) UNARY_FUNCTION(scalar, symmTensor, det)

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019-2022 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -155,6 +155,8 @@ UNARY_FUNCTION(scalar, symmTensor, tr)
UNARY_FUNCTION(sphericalTensor, symmTensor, sph) UNARY_FUNCTION(sphericalTensor, symmTensor, sph)
UNARY_FUNCTION(symmTensor, symmTensor, symm) UNARY_FUNCTION(symmTensor, symmTensor, symm)
UNARY_FUNCTION(symmTensor, symmTensor, twoSymm) UNARY_FUNCTION(symmTensor, symmTensor, twoSymm)
UNARY_FUNCTION(symmTensor, symmTensor, devSymm)
UNARY_FUNCTION(symmTensor, symmTensor, devTwoSymm)
UNARY_FUNCTION(symmTensor, symmTensor, dev) UNARY_FUNCTION(symmTensor, symmTensor, dev)
UNARY_FUNCTION(symmTensor, symmTensor, dev2) UNARY_FUNCTION(symmTensor, symmTensor, dev2)
UNARY_FUNCTION(scalar, symmTensor, det) UNARY_FUNCTION(scalar, symmTensor, det)

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2019-2022 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -208,6 +208,8 @@ UNARY_FUNCTION(scalar, tensor, tr)
UNARY_FUNCTION(sphericalTensor, tensor, sph) UNARY_FUNCTION(sphericalTensor, tensor, sph)
UNARY_FUNCTION(symmTensor, tensor, symm) UNARY_FUNCTION(symmTensor, tensor, symm)
UNARY_FUNCTION(symmTensor, tensor, twoSymm) UNARY_FUNCTION(symmTensor, tensor, twoSymm)
UNARY_FUNCTION(symmTensor, tensor, devSymm)
UNARY_FUNCTION(symmTensor, tensor, devTwoSymm)
UNARY_FUNCTION(tensor, tensor, skew) UNARY_FUNCTION(tensor, tensor, skew)
UNARY_FUNCTION(tensor, tensor, dev) UNARY_FUNCTION(tensor, tensor, dev)
UNARY_FUNCTION(tensor, tensor, dev2) UNARY_FUNCTION(tensor, tensor, dev2)

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019-2022 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -160,6 +160,8 @@ UNARY_FUNCTION(scalar, tensor, tr)
UNARY_FUNCTION(sphericalTensor, tensor, sph) UNARY_FUNCTION(sphericalTensor, tensor, sph)
UNARY_FUNCTION(symmTensor, tensor, symm) UNARY_FUNCTION(symmTensor, tensor, symm)
UNARY_FUNCTION(symmTensor, tensor, twoSymm) UNARY_FUNCTION(symmTensor, tensor, twoSymm)
UNARY_FUNCTION(symmTensor, tensor, devSymm)
UNARY_FUNCTION(symmTensor, tensor, devTwoSymm)
UNARY_FUNCTION(tensor, tensor, skew) UNARY_FUNCTION(tensor, tensor, skew)
UNARY_FUNCTION(tensor, tensor, dev) UNARY_FUNCTION(tensor, tensor, dev)
UNARY_FUNCTION(tensor, tensor, dev2) UNARY_FUNCTION(tensor, tensor, dev2)

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2019-2022 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -200,6 +200,8 @@ UNARY_FUNCTION(scalar, symmTensor, tr)
UNARY_FUNCTION(sphericalTensor, symmTensor, sph) UNARY_FUNCTION(sphericalTensor, symmTensor, sph)
UNARY_FUNCTION(symmTensor, symmTensor, symm) UNARY_FUNCTION(symmTensor, symmTensor, symm)
UNARY_FUNCTION(symmTensor, symmTensor, twoSymm) UNARY_FUNCTION(symmTensor, symmTensor, twoSymm)
UNARY_FUNCTION(symmTensor, symmTensor, devSymm)
UNARY_FUNCTION(symmTensor, symmTensor, devTwoSymm)
UNARY_FUNCTION(symmTensor, symmTensor, dev) UNARY_FUNCTION(symmTensor, symmTensor, dev)
UNARY_FUNCTION(symmTensor, symmTensor, dev2) UNARY_FUNCTION(symmTensor, symmTensor, dev2)
UNARY_FUNCTION(scalar, symmTensor, det) UNARY_FUNCTION(scalar, symmTensor, det)

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019-2022 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -44,6 +44,8 @@ UNARY_FUNCTION(scalar, tensor, tr)
UNARY_FUNCTION(sphericalTensor, tensor, sph) UNARY_FUNCTION(sphericalTensor, tensor, sph)
UNARY_FUNCTION(symmTensor, tensor, symm) UNARY_FUNCTION(symmTensor, tensor, symm)
UNARY_FUNCTION(symmTensor, tensor, twoSymm) UNARY_FUNCTION(symmTensor, tensor, twoSymm)
UNARY_FUNCTION(symmTensor, tensor, devSymm)
UNARY_FUNCTION(symmTensor, tensor, devTwoSymm)
UNARY_FUNCTION(tensor, tensor, skew) UNARY_FUNCTION(tensor, tensor, skew)
UNARY_FUNCTION(tensor, tensor, dev) UNARY_FUNCTION(tensor, tensor, dev)
UNARY_FUNCTION(tensor, tensor, dev2) UNARY_FUNCTION(tensor, tensor, dev2)

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2019-2022 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -184,6 +184,8 @@ UNARY_FUNCTION(scalar, tensor, tr)
UNARY_FUNCTION(sphericalTensor, tensor, sph) UNARY_FUNCTION(sphericalTensor, tensor, sph)
UNARY_FUNCTION(symmTensor, tensor, symm) UNARY_FUNCTION(symmTensor, tensor, symm)
UNARY_FUNCTION(symmTensor, tensor, twoSymm) UNARY_FUNCTION(symmTensor, tensor, twoSymm)
UNARY_FUNCTION(symmTensor, tensor, devSymm)
UNARY_FUNCTION(symmTensor, tensor, devTwoSymm)
UNARY_FUNCTION(tensor, tensor, skew) UNARY_FUNCTION(tensor, tensor, skew)
UNARY_FUNCTION(tensor, tensor, dev) UNARY_FUNCTION(tensor, tensor, dev)
UNARY_FUNCTION(tensor, tensor, dev2) UNARY_FUNCTION(tensor, tensor, dev2)

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2019-2022 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -257,6 +257,8 @@ UNARY_FUNCTION(scalar, symmTensor, tr, transform)
UNARY_FUNCTION(sphericalTensor, symmTensor, sph, transform) UNARY_FUNCTION(sphericalTensor, symmTensor, sph, transform)
UNARY_FUNCTION(symmTensor, symmTensor, symm, transform) UNARY_FUNCTION(symmTensor, symmTensor, symm, transform)
UNARY_FUNCTION(symmTensor, symmTensor, twoSymm, transform) UNARY_FUNCTION(symmTensor, symmTensor, twoSymm, transform)
UNARY_FUNCTION(symmTensor, symmTensor, devSymm, transform)
UNARY_FUNCTION(symmTensor, symmTensor, devTwoSymm, transform)
UNARY_FUNCTION(symmTensor, symmTensor, dev, transform) UNARY_FUNCTION(symmTensor, symmTensor, dev, transform)
UNARY_FUNCTION(symmTensor, symmTensor, dev2, transform) UNARY_FUNCTION(symmTensor, symmTensor, dev2, transform)
UNARY_FUNCTION(scalar, symmTensor, det, pow3) UNARY_FUNCTION(scalar, symmTensor, det, pow3)

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019-2022 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -156,6 +156,8 @@ UNARY_FUNCTION(scalar, symmTensor, tr, transform)
UNARY_FUNCTION(sphericalTensor, symmTensor, sph, transform) UNARY_FUNCTION(sphericalTensor, symmTensor, sph, transform)
UNARY_FUNCTION(symmTensor, symmTensor, symm, transform) UNARY_FUNCTION(symmTensor, symmTensor, symm, transform)
UNARY_FUNCTION(symmTensor, symmTensor, twoSymm, transform) UNARY_FUNCTION(symmTensor, symmTensor, twoSymm, transform)
UNARY_FUNCTION(symmTensor, symmTensor, devSymm, transform)
UNARY_FUNCTION(symmTensor, symmTensor, devTwoSymm, transform)
UNARY_FUNCTION(symmTensor, symmTensor, dev, transform) UNARY_FUNCTION(symmTensor, symmTensor, dev, transform)
UNARY_FUNCTION(symmTensor, symmTensor, dev2, transform) UNARY_FUNCTION(symmTensor, symmTensor, dev2, transform)
UNARY_FUNCTION(scalar, symmTensor, det, transform) UNARY_FUNCTION(scalar, symmTensor, det, transform)

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2013 OpenFOAM Foundation Copyright (C) 2011-2013 OpenFOAM Foundation
Copyright (C) 2019-2022 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -261,6 +261,8 @@ UNARY_FUNCTION(scalar, tensor, tr, transform)
UNARY_FUNCTION(sphericalTensor, tensor, sph, transform) UNARY_FUNCTION(sphericalTensor, tensor, sph, transform)
UNARY_FUNCTION(symmTensor, tensor, symm, transform) UNARY_FUNCTION(symmTensor, tensor, symm, transform)
UNARY_FUNCTION(symmTensor, tensor, twoSymm, transform) UNARY_FUNCTION(symmTensor, tensor, twoSymm, transform)
UNARY_FUNCTION(symmTensor, tensor, devSymm, transform)
UNARY_FUNCTION(symmTensor, tensor, devTwoSymm, transform)
UNARY_FUNCTION(tensor, tensor, skew, transform) UNARY_FUNCTION(tensor, tensor, skew, transform)
UNARY_FUNCTION(tensor, tensor, dev, transform) UNARY_FUNCTION(tensor, tensor, dev, transform)
UNARY_FUNCTION(tensor, tensor, dev2, transform) UNARY_FUNCTION(tensor, tensor, dev2, transform)

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019-2022 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -160,6 +160,8 @@ UNARY_FUNCTION(scalar, tensor, tr, transform)
UNARY_FUNCTION(sphericalTensor, tensor, sph, transform) UNARY_FUNCTION(sphericalTensor, tensor, sph, transform)
UNARY_FUNCTION(symmTensor, tensor, symm, transform) UNARY_FUNCTION(symmTensor, tensor, symm, transform)
UNARY_FUNCTION(symmTensor, tensor, twoSymm, transform) UNARY_FUNCTION(symmTensor, tensor, twoSymm, transform)
UNARY_FUNCTION(symmTensor, tensor, devSymm, transform)
UNARY_FUNCTION(symmTensor, tensor, devTwoSymm, transform)
UNARY_FUNCTION(tensor, tensor, skew, transform) UNARY_FUNCTION(tensor, tensor, skew, transform)
UNARY_FUNCTION(tensor, tensor, dev, transform) UNARY_FUNCTION(tensor, tensor, dev, transform)
UNARY_FUNCTION(tensor, tensor, dev2, transform) UNARY_FUNCTION(tensor, tensor, dev2, transform)

View File

@ -473,6 +473,22 @@ inline SymmTensor<Cmpt> twoSymm(const SymmTensor<Cmpt>& st)
} }
//- Return the deviatoric part of the symmetric part of a SymmTensor
template<class Cmpt>
inline SymmTensor<Cmpt> devSymm(const SymmTensor<Cmpt>& st)
{
return dev(st);
}
//- Return the deviatoric part of twice the symmetric part of a SymmTensor
template<class Cmpt>
inline SymmTensor<Cmpt> devTwoSymm(const SymmTensor<Cmpt>& st)
{
return dev2(st);
}
//- Return the deviatoric part of a SymmTensor //- Return the deviatoric part of a SymmTensor
template<class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt> dev(const SymmTensor<Cmpt>& st) inline SymmTensor<Cmpt> dev(const SymmTensor<Cmpt>& st)

View File

@ -760,6 +760,36 @@ inline SymmTensor<Cmpt> twoSymm(const Tensor<Cmpt>& t)
} }
//- Return the deviatoric part of the symmetric part of a Tensor
template<class Cmpt>
inline SymmTensor<Cmpt> devSymm(const Tensor<Cmpt>& t)
{
const Cmpt sph(tr(t)/3.0);
return SymmTensor<Cmpt>
(
t.xx() - sph, 0.5*(t.xy() + t.yx()), 0.5*(t.xz() + t.zx()),
t.yy() - sph, 0.5*(t.yz() + t.zy()),
t.zz() - sph
);
}
//- Return the deviatoric part of twice the symmetric part of a Tensor
template<class Cmpt>
inline SymmTensor<Cmpt> devTwoSymm(const Tensor<Cmpt>& t)
{
const Cmpt sph((2.0/3.0)*tr(t));
return SymmTensor<Cmpt>
(
2*t.xx() - sph, (t.xy() + t.yx()), (t.xz() + t.zx()),
2*t.yy() - sph, (t.yz() + t.zy()),
2*t.zz() - sph
);
}
//- Return the skew-symmetric part of a Tensor //- Return the skew-symmetric part of a Tensor
template<class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> skew(const Tensor<Cmpt>& t) inline Tensor<Cmpt> skew(const Tensor<Cmpt>& t)

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -107,7 +107,7 @@ void LienCubicKE::correctNonlinearStress(const volTensorField& gradU)
*( *(
Cbeta1_*dev(innerSqr(S)) Cbeta1_*dev(innerSqr(S))
+ Cbeta2_*twoSymm(S&W) + Cbeta2_*twoSymm(S&W)
+ Cbeta3_*dev(symm(W&W)) + Cbeta3_*devSymm(W&W)
) )
// Cubic terms // Cubic terms

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019-2021 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -71,7 +71,7 @@ void ShihQuadraticKE::correctNonlinearStress(const volTensorField& gradU)
*( *(
Cbeta1_*dev(innerSqr(S)) Cbeta1_*dev(innerSqr(S))
+ Cbeta2_*twoSymm(S&W) + Cbeta2_*twoSymm(S&W)
+ Cbeta3_*dev(symm(W&W)) + Cbeta3_*devSymm(W&W)
); );
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -626,7 +626,7 @@ void kkLOmega::correct()
const volScalarField Omega(sqrt(2.0)*mag(skew(gradU))); const volScalarField Omega(sqrt(2.0)*mag(skew(gradU)));
const volScalarField S2(2.0*magSqr(dev(symm(gradU)))); const volScalarField S2(2.0*magSqr(devSymm(gradU)));
const volScalarField ktS(fSS(Omega)*fw*kt_); const volScalarField ktS(fSS(Omega)*fw*kt_);

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2013-2017 OpenFOAM Foundation Copyright (C) 2013-2017 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -292,7 +292,7 @@ continuousGasKEpsilon<BasicTurbulenceModel>::R() const
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
((2.0/3.0)*I)*tk() - (nutEff_)*dev(twoSymm(fvc::grad(this->U_))), ((2.0/3.0)*I)*tk() - (nutEff_)*devTwoSymm(fvc::grad(this->U_)),
tk().boundaryField().types() tk().boundaryField().types()
) )
); );

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2013-2017 OpenFOAM Foundation Copyright (C) 2013-2017 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd. Copyright (C) 2020-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -612,7 +612,7 @@ void mixtureKEpsilon<BasicTurbulenceModel>::correct()
new volScalarField new volScalarField
( (
this->GName(), this->GName(),
nutl*(tgradUl() && dev(twoSymm(tgradUl()))) nutl*(tgradUl() && devTwoSymm(tgradUl()))
) )
); );
tgradUl.clear(); tgradUl.clear();
@ -632,7 +632,7 @@ void mixtureKEpsilon<BasicTurbulenceModel>::correct()
new volScalarField new volScalarField
( (
this->GName(), this->GName(),
nutg*(tgradUg() && dev(twoSymm(tgradUg()))) nutg*(tgradUg() && devTwoSymm(tgradUg()))
) )
); );
tgradUg.clear(); tgradUg.clear();

View File

@ -7,7 +7,7 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2022 Upstream CFD GmbH Copyright (C) 2022 Upstream CFD GmbH
Copyright (C) 2016-2022 OpenCFD Ltd. Copyright (C) 2016-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -174,7 +174,7 @@ tmp<volScalarField::Internal> kOmegaSSTBase<BasicEddyViscosityModel>::GbyNu0
return tmp<volScalarField::Internal>::New return tmp<volScalarField::Internal>::New
( (
IOobject::scopedName(this->type(), "GbyNu"), IOobject::scopedName(this->type(), "GbyNu"),
gradU() && dev(twoSymm(gradU())) gradU() && devTwoSymm(gradU())
); );
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2015-2017 OpenFOAM Foundation Copyright (C) 2015-2017 OpenFOAM Foundation
Copyright (C) 2019-2021 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -44,7 +44,7 @@ tmp<volSymmTensorField> WALE<BasicTurbulenceModel>::Sd
const volTensorField& gradU const volTensorField& gradU
) const ) const
{ {
return dev(symm(gradU & gradU)); return devSymm(gradU & gradU);
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019-2021 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -96,7 +96,7 @@ volScalarField dynamicKEqn<BasicTurbulenceModel>::Ce
template<class BasicTurbulenceModel> template<class BasicTurbulenceModel>
volScalarField dynamicKEqn<BasicTurbulenceModel>::Ce() const volScalarField dynamicKEqn<BasicTurbulenceModel>::Ce() const
{ {
const volSymmTensorField D(dev(symm(fvc::grad(this->U_)))); const volSymmTensorField D(devSymm(fvc::grad(this->U_)));
volScalarField KK volScalarField KK
( (
@ -240,7 +240,7 @@ void dynamicKEqn<BasicTurbulenceModel>::correct()
volScalarField divU(fvc::div(fvc::absolute(this->phi(), U))); volScalarField divU(fvc::div(fvc::absolute(this->phi(), U)));
tmp<volTensorField> tgradU(fvc::grad(U)); tmp<volTensorField> tgradU(fvc::grad(U));
const volSymmTensorField D(dev(symm(tgradU()))); const volSymmTensorField D(devSymm(tgradU()));
const volScalarField G(this->GName(), 2.0*nut*(tgradU() && D)); const volScalarField G(this->GName(), 2.0*nut*(tgradU() && D));
tgradU.clear(); tgradU.clear();

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -44,7 +44,7 @@ void dynamicLagrangian<BasicTurbulenceModel>::correctNut
const tmp<volTensorField>& gradU const tmp<volTensorField>& gradU
) )
{ {
this->nut_ = (flm_/fmm_)*sqr(this->delta())*mag(dev(symm(gradU))); this->nut_ = (flm_/fmm_)*sqr(this->delta())*mag(devSymm(gradU));
this->nut_.correctBoundaryConditions(); this->nut_.correctBoundaryConditions();
fv::options::New(this->mesh_).correct(this->nut_); fv::options::New(this->mesh_).correct(this->nut_);
@ -171,11 +171,11 @@ void dynamicLagrangian<BasicTurbulenceModel>::correct()
tmp<volTensorField> tgradU(fvc::grad(U)); tmp<volTensorField> tgradU(fvc::grad(U));
const volTensorField& gradU = tgradU(); const volTensorField& gradU = tgradU();
volSymmTensorField S(dev(symm(gradU))); volSymmTensorField S(devSymm(gradU));
volScalarField magS(mag(S)); volScalarField magS(mag(S));
volVectorField Uf(filter_(U)); volVectorField Uf(filter_(U));
volSymmTensorField Sf(dev(symm(fvc::grad(Uf)))); volSymmTensorField Sf(devSymm(fvc::grad(Uf)));
volScalarField magSf(mag(Sf)); volScalarField magSf(mag(Sf));
volSymmTensorField L(dev(filter_(sqr(U)) - (sqr(filter_(U))))); volSymmTensorField L(dev(filter_(sqr(U)) - (sqr(filter_(U)))));

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2020-2021 OpenCFD Ltd. Copyright (C) 2020-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -160,7 +160,7 @@ void kEqn<BasicTurbulenceModel>::correct()
volScalarField divU(fvc::div(fvc::absolute(this->phi(), U))); volScalarField divU(fvc::div(fvc::absolute(this->phi(), U)));
tmp<volTensorField> tgradU(fvc::grad(U)); tmp<volTensorField> tgradU(fvc::grad(U));
volScalarField G(this->GName(), nut*(tgradU() && dev(twoSymm(tgradU())))); volScalarField G(this->GName(), nut*(tgradU() && devTwoSymm(tgradU())));
tgradU.clear(); tgradU.clear();
tmp<fvScalarMatrix> kEqn tmp<fvScalarMatrix> kEqn

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2022 Upstream CFD GmbH Copyright (C) 2022 Upstream CFD GmbH
Copyright (C) 2022 OpenCFD Ltd. Copyright (C) 2022-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -141,7 +141,7 @@ tmp<volScalarField> sigma<BasicTurbulenceModel>::k() const
IOobject::groupName("k", this->U_.group()), IOobject::groupName("k", this->U_.group()),
(2.0*Ck_/this->Ce_) (2.0*Ck_/this->Ce_)
*sqr(this->delta()) *sqr(this->delta())
*magSqr(dev(symm(fvc::grad(this->U_)))) *magSqr(devSymm(fvc::grad(this->U_)))
); );
} }

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2022 OpenCFD Ltd. Copyright (C) 2022-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -524,7 +524,7 @@ void EBRSM<BasicTurbulenceModel>::correct()
k_ k_
*( *(
(g3_ - g3star_*mag(B))*S (g3_ - g3star_*mag(B))*S
+ g4_*dev(twoSymm(B & S)) + g4_*devTwoSymm(B & S)
+ g5_*twoSymm(B & W.T()) + g5_*twoSymm(B & W.T())
); );
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -365,7 +365,7 @@ void LRR<BasicTurbulenceModel>::correct()
REqn.ref() += REqn.ref() +=
((3*pow(Cmu_, 0.75)/kappa_)*(alpha*rho*sqrt(k_)/y_)) ((3*pow(Cmu_, 0.75)/kappa_)*(alpha*rho*sqrt(k_)/y_))
*dev(symm((n_ & reflect)*n_)); *devSymm((n_ & reflect)*n_);
} }
REqn.ref().relax(); REqn.ref().relax();

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -262,7 +262,7 @@ void LaunderSharmaKE<BasicTurbulenceModel>::correct()
volScalarField D(2.0*this->nu()*magSqr(fvc::grad(sqrt(k_)))); volScalarField D(2.0*this->nu()*magSqr(fvc::grad(sqrt(k_))));
tmp<volTensorField> tgradU = fvc::grad(U); tmp<volTensorField> tgradU = fvc::grad(U);
volScalarField G(this->GName(), nut*(tgradU() && dev(twoSymm(tgradU())))); volScalarField G(this->GName(), nut*(tgradU() && devTwoSymm(tgradU())));
tgradU.clear(); tgradU.clear();

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -265,7 +265,7 @@ void RNGkEpsilon<BasicTurbulenceModel>::correct()
const volScalarField::Internal GbyNu const volScalarField::Internal GbyNu
( (
IOobject::scopedName(this->type(), "GbyNu"), IOobject::scopedName(this->type(), "GbyNu"),
tgradU().v() && dev(twoSymm(tgradU().v())) tgradU().v() && devTwoSymm(tgradU().v())
); );
tgradU.clear(); tgradU.clear();

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2015-2016 OpenFOAM Foundation Copyright (C) 2015-2016 OpenFOAM Foundation
Copyright (C) 2018-2020 OpenCFD Ltd Copyright (C) 2018-2023 OpenCFD Ltd
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -366,7 +366,7 @@ void SSG<BasicTurbulenceModel>::correct()
+ alpha*rho*k_ + alpha*rho*k_
*( *(
(C3_ - C3s_*mag(b))*dev(S) (C3_ - C3s_*mag(b))*dev(S)
+ C4_*dev(twoSymm(b&S)) + C4_*devTwoSymm(b&S)
+ C5_*twoSymm(b&Omega) + C5_*twoSymm(b&Omega)
) )
+ fvOptions(alpha, rho, R) + fvOptions(alpha, rho, R)

View File

@ -246,7 +246,7 @@ void kEpsilon<BasicTurbulenceModel>::correct()
const volScalarField::Internal GbyNu const volScalarField::Internal GbyNu
( (
IOobject::scopedName(this->type(), "GbyNu"), IOobject::scopedName(this->type(), "GbyNu"),
tgradU().v() && dev(twoSymm(tgradU().v())) tgradU().v() && devTwoSymm(tgradU().v())
); );
const volScalarField::Internal G(this->GName(), nut()*GbyNu); const volScalarField::Internal G(this->GName(), nut()*GbyNu);
tgradU.clear(); tgradU.clear();

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -204,7 +204,7 @@ void kOmega<BasicTurbulenceModel>::correct()
tmp<volTensorField> tgradU = fvc::grad(U); tmp<volTensorField> tgradU = fvc::grad(U);
const volScalarField::Internal GbyNu const volScalarField::Internal GbyNu
( (
tgradU().v() && dev(twoSymm(tgradU().v())) tgradU().v() && devTwoSymm(tgradU().v())
); );
const volScalarField::Internal G(this->GName(), nut()*GbyNu); const volScalarField::Internal G(this->GName(), nut()*GbyNu);
tgradU.clear(); tgradU.clear();

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -47,7 +47,7 @@ tmp<volScalarField> realizableKE<BasicTurbulenceModel>::rCmu
const volScalarField& magS const volScalarField& magS
) )
{ {
tmp<volSymmTensorField> tS = dev(symm(gradU)); tmp<volSymmTensorField> tS = devSymm(gradU);
const volSymmTensorField& S = tS(); const volSymmTensorField& S = tS();
volScalarField W volScalarField W
@ -92,7 +92,7 @@ template<class BasicTurbulenceModel>
void realizableKE<BasicTurbulenceModel>::correctNut() void realizableKE<BasicTurbulenceModel>::correctNut()
{ {
tmp<volTensorField> tgradU = fvc::grad(this->U_); tmp<volTensorField> tgradU = fvc::grad(this->U_);
volScalarField S2(2*magSqr(dev(symm(tgradU())))); volScalarField S2(2*magSqr(devSymm(tgradU())));
volScalarField magS(sqrt(S2)); volScalarField magS(sqrt(S2));
correctNut(tgradU(), S2, magS); correctNut(tgradU(), S2, magS);
} }
@ -266,13 +266,13 @@ void realizableKE<BasicTurbulenceModel>::correct()
volScalarField divU(fvc::div(fvc::absolute(this->phi(), U))); volScalarField divU(fvc::div(fvc::absolute(this->phi(), U)));
tmp<volTensorField> tgradU = fvc::grad(U); tmp<volTensorField> tgradU = fvc::grad(U);
volScalarField S2(2*magSqr(dev(symm(tgradU())))); volScalarField S2(2*magSqr(devSymm(tgradU())));
volScalarField magS(sqrt(S2)); volScalarField magS(sqrt(S2));
volScalarField eta(magS*k_/epsilon_); volScalarField eta(magS*k_/epsilon_);
volScalarField C1(max(eta/(scalar(5) + eta), scalar(0.43))); volScalarField C1(max(eta/(scalar(5) + eta), scalar(0.43)));
volScalarField G(this->GName(), nut*(tgradU() && dev(twoSymm(tgradU())))); volScalarField G(this->GName(), nut*(tgradU() && devTwoSymm(tgradU())));
// Update epsilon and G at the wall // Update epsilon and G at the wall
epsilon_.boundaryFieldRef().updateCoeffs(); epsilon_.boundaryFieldRef().updateCoeffs();

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2015-2017 OpenFOAM Foundation Copyright (C) 2015-2017 OpenFOAM Foundation
Copyright (C) 2020-2022 OpenCFD Ltd. Copyright (C) 2020-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -93,7 +93,7 @@ void Foam::ReynoldsStress<BasicTurbulenceModel>::correctWallShearStress
// Set the wall Reynolds-stress to the near-wall shear-stress // Set the wall Reynolds-stress to the near-wall shear-stress
// Note: the spherical part of the normal stress is included in // Note: the spherical part of the normal stress is included in
// the pressure // the pressure
Rw[facei] = -nutw[facei]*2*dev(symm(gradUw)); Rw[facei] = -nutw[facei]*2*devSymm(gradUw);
} }
} }
} }
@ -288,7 +288,7 @@ Foam::ReynoldsStress<BasicTurbulenceModel>::devRhoReff
), ),
this->alpha_*this->rho_*R_ this->alpha_*this->rho_*R_
- (this->alpha_*this->rho_*this->nu()) - (this->alpha_*this->rho_*this->nu())
*dev(twoSymm(fvc::grad(U))) *devTwoSymm(fvc::grad(U))
) )
); );
} }

View File

@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2013-2017 OpenFOAM Foundation Copyright (C) 2013-2017 OpenFOAM Foundation
Copyright (C) 2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -116,7 +117,7 @@ Foam::eddyViscosity<BasicTurbulenceModel>::R() const
IOobject::NO_WRITE, IOobject::NO_WRITE,
IOobject::NO_REGISTER IOobject::NO_REGISTER
), ),
((2.0/3.0)*I)*tk() - (nut_)*dev(twoSymm(fvc::grad(this->U_))), ((2.0/3.0)*I)*tk() - (nut_)*devTwoSymm(fvc::grad(this->U_)),
patchFieldTypes patchFieldTypes
) )
); );

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2016-2017 OpenFOAM Foundation Copyright (C) 2016-2017 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -139,7 +139,7 @@ Maxwell<BasicTurbulenceModel>::devRhoReff(const volVectorField& U) const
), ),
this->alpha_*this->rho_*sigma_ this->alpha_*this->rho_*sigma_
- (this->alpha_*this->rho_*this->nu()) - (this->alpha_*this->rho_*this->nu())
*dev(twoSymm(fvc::grad(U))) *devTwoSymm(fvc::grad(U))
) )
); );
} }

View File

@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2013-2017 OpenFOAM Foundation Copyright (C) 2013-2017 OpenFOAM Foundation
Copyright (C) 2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -95,7 +96,7 @@ Foam::linearViscousStress<BasicTurbulenceModel>::devRhoReff
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
(-(this->alpha_*this->rho_*this->nuEff())) (-(this->alpha_*this->rho_*this->nuEff()))
*dev(twoSymm(fvc::grad(U))) *devTwoSymm(fvc::grad(U))
) )
); );
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2018 OpenFOAM Foundation Copyright (C) 2018 OpenFOAM Foundation
Copyright (C) 2018-2020 OpenCFD Ltd. Copyright (C) 2018-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -415,7 +415,7 @@ void kEpsilonLopesdaCosta<BasicTurbulenceModel>::correct()
volScalarField::Internal G volScalarField::Internal G
( (
this->GName(), this->GName(),
nut.v()*(dev(twoSymm(tgradU().v())) && tgradU().v()) nut.v()*(devTwoSymm(tgradU().v()) && tgradU().v())
); );
tgradU.clear(); tgradU.clear();

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2021 OpenCFD Ltd. Copyright (C) 2021-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -430,7 +430,7 @@ void kL<BasicTurbulenceModel>::correct()
const volScalarField::Internal G const volScalarField::Internal G
( (
this->GName(), this->GName(),
nut.v()*2*magSqr(dev(symm(tgradU.cref().v()))) nut.v()*2*magSqr(devSymm(tgradU.cref().v()))
); );
tgradU.clear(); tgradU.clear();

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2017-2022 OpenCFD Ltd. Copyright (C) 2017-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -126,7 +126,7 @@ Foam::heatTransferCoeffModels::ReynoldsAnalogy::devReff() const
const auto& U = mesh_.lookupObject<volVectorField>(UName_); const auto& U = mesh_.lookupObject<volVectorField>(UName_);
return -thermo.nu()*dev(twoSymm(fvc::grad(U))); return -thermo.nu()*devTwoSymm(fvc::grad(U));
} }
else if (mesh_.foundObject<transportModel>("transportProperties")) else if (mesh_.foundObject<transportModel>("transportProperties"))
{ {
@ -135,7 +135,7 @@ Foam::heatTransferCoeffModels::ReynoldsAnalogy::devReff() const
const auto& U = mesh_.lookupObject<volVectorField>(UName_); const auto& U = mesh_.lookupObject<volVectorField>(UName_);
return -laminarT.nu()*dev(twoSymm(fvc::grad(U))); return -laminarT.nu()*devTwoSymm(fvc::grad(U));
} }
else if (mesh_.foundObject<dictionary>("transportProperties")) else if (mesh_.foundObject<dictionary>("transportProperties"))
{ {
@ -146,7 +146,7 @@ Foam::heatTransferCoeffModels::ReynoldsAnalogy::devReff() const
const auto& U = mesh_.lookupObject<volVectorField>(UName_); const auto& U = mesh_.lookupObject<volVectorField>(UName_);
return -nu*dev(twoSymm(fvc::grad(U))); return -nu*devTwoSymm(fvc::grad(U));
} }
FatalErrorInFunction FatalErrorInFunction

View File

@ -230,27 +230,27 @@ Foam::functionObjects::forces::devRhoReff
const auto& turb = const auto& turb =
lookupObject<icoTurbModel>(icoTurbModel::propertiesName); lookupObject<icoTurbModel>(icoTurbModel::propertiesName);
return -rho(patchi)*turb.nuEff(patchi)*dev(twoSymm(gradUp)); return -rho(patchi)*turb.nuEff(patchi)*devTwoSymm(gradUp);
} }
else if (foundObject<cmpTurbModel>(cmpTurbModel::propertiesName)) else if (foundObject<cmpTurbModel>(cmpTurbModel::propertiesName))
{ {
const auto& turb = const auto& turb =
lookupObject<cmpTurbModel>(cmpTurbModel::propertiesName); lookupObject<cmpTurbModel>(cmpTurbModel::propertiesName);
return -turb.muEff(patchi)*dev(twoSymm(gradUp)); return -turb.muEff(patchi)*devTwoSymm(gradUp);
} }
else if (foundObject<fluidThermo>(fluidThermo::dictName)) else if (foundObject<fluidThermo>(fluidThermo::dictName))
{ {
const auto& thermo = lookupObject<fluidThermo>(fluidThermo::dictName); const auto& thermo = lookupObject<fluidThermo>(fluidThermo::dictName);
return -thermo.mu(patchi)*dev(twoSymm(gradUp)); return -thermo.mu(patchi)*devTwoSymm(gradUp);
} }
else if (foundObject<transportModel>("transportProperties")) else if (foundObject<transportModel>("transportProperties"))
{ {
const auto& laminarT = const auto& laminarT =
lookupObject<transportModel>("transportProperties"); lookupObject<transportModel>("transportProperties");
return -rho(patchi)*laminarT.nu(patchi)*dev(twoSymm(gradUp)); return -rho(patchi)*laminarT.nu(patchi)*devTwoSymm(gradUp);
} }
else if (foundObject<dictionary>("transportProperties")) else if (foundObject<dictionary>("transportProperties"))
{ {
@ -259,7 +259,7 @@ Foam::functionObjects::forces::devRhoReff
const dimensionedScalar nu("nu", dimViscosity, transportProperties); const dimensionedScalar nu("nu", dimViscosity, transportProperties);
return -rho(patchi)*nu.value()*dev(twoSymm(gradUp)); return -rho(patchi)*nu.value()*devTwoSymm(gradUp);
} }
else else
{ {

View File

@ -7,7 +7,7 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2007-2019, 2022 PCOpt/NTUA Copyright (C) 2007-2019, 2022 PCOpt/NTUA
Copyright (C) 2013-2019, 2022 FOSS GP Copyright (C) 2013-2019, 2022 FOSS GP
Copyright (C) 2019-2020 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -242,7 +242,7 @@ void objectiveForce::update_dxdbMultiplier()
void objectiveForce::update_boundarydJdnut() void objectiveForce::update_boundarydJdnut()
{ {
const volVectorField& U = vars_.U(); const volVectorField& U = vars_.U();
volSymmTensorField devGradU(dev(twoSymm(fvc::grad(U)))); volSymmTensorField devGradU(devTwoSymm(fvc::grad(U)));
for (const label patchI : forcePatches_) for (const label patchI : forcePatches_)
{ {

View File

@ -7,7 +7,7 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2007-2019, 2022 PCOpt/NTUA Copyright (C) 2007-2019, 2022 PCOpt/NTUA
Copyright (C) 2013-2019, 2022 FOSS GP Copyright (C) 2013-2019, 2022 FOSS GP
Copyright (C) 2019-2020 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -294,7 +294,7 @@ void objectiveMoment::update_dxdbDirectMultiplier()
void objectiveMoment::update_boundarydJdnut() void objectiveMoment::update_boundarydJdnut()
{ {
const volVectorField& U = vars_.U(); const volVectorField& U = vars_.U();
volSymmTensorField devGradU(dev(twoSymm(fvc::grad(U)))); volSymmTensorField devGradU(devTwoSymm(fvc::grad(U)));
for (const label patchI : momentPatches_) for (const label patchI : momentPatches_)
{ {

View File

@ -7,7 +7,7 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2007-2019 PCOpt/NTUA
Copyright (C) 2013-2019 FOSS GP Copyright (C) 2013-2019 FOSS GP
Copyright (C) 2019 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -92,7 +92,7 @@ tmp<volSymmTensorField> adjointLaminar::devReff
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
-nu()*dev(twoSymm(fvc::grad(U))) -nu()*devTwoSymm(fvc::grad(U))
) )
); );
} }

View File

@ -7,7 +7,7 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2007-2021 PCOpt/NTUA Copyright (C) 2007-2021 PCOpt/NTUA
Copyright (C) 2013-2021 FOSS GP Copyright (C) 2013-2021 FOSS GP
Copyright (C) 2019-2020 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -723,7 +723,7 @@ tmp<volSymmTensorField> adjointSpalartAllmaras::devReff
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
-nuEff()*dev(twoSymm(fvc::grad(U))) -nuEff()*devTwoSymm(fvc::grad(U))
); );
} }

View File

@ -1052,7 +1052,7 @@ void adjointkOmegaSST::updatePrimalRelatedFields()
S2_ = 2*magSqr(symm(gradU_)) S2_ = 2*magSqr(symm(gradU_))
+ dimensionedScalar(dimless/sqr(dimTime), 1.e-21); + dimensionedScalar(dimless/sqr(dimTime), 1.e-21);
S_ = sqrt(S2_); S_ = sqrt(S2_);
GbyNu0_ = gradU_ && dev(twoSymm(gradU_)); GbyNu0_ = gradU_ && devTwoSymm(gradU_);
// Instead of computing G directly here, delegate to RASModelVariables // Instead of computing G directly here, delegate to RASModelVariables
// to make sure G is computed consistently when the primal fields are // to make sure G is computed consistently when the primal fields are
@ -1808,7 +1808,7 @@ tmp<volSymmTensorField> adjointkOmegaSST::devReff
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
-nuEff()*dev(twoSymm(fvc::grad(U))) -nuEff()*devTwoSymm(fvc::grad(U))
); );
} }
@ -2320,7 +2320,7 @@ tmp<volTensorField> adjointkOmegaSST::FISensitivityTerm()
+ ( + (
case_1_GPrime_*wa()*gamma_ case_1_GPrime_*wa()*gamma_
+ case_1_Pk_*ka()*nutRef() + case_1_Pk_*ka()*nutRef()
)*2.*T(gradU_ & dev(twoSymm(gradU_)))*zeroFirstCell_ )*2.*T(gradU_ & devTwoSymm(gradU_))*zeroFirstCell_
// S2 (includes contribution from nut in UEqn as well) // S2 (includes contribution from nut in UEqn as well)
+ ( + (
dR_dnut()*a1_*k()/(b1_*S_*S_*S_*F2_) dR_dnut()*a1_*k()/(b1_*S_*S_*S_*F2_)

View File

@ -7,7 +7,7 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2007-2019 PCOpt/NTUA
Copyright (C) 2013-2019 FOSS GP Copyright (C) 2013-2019 FOSS GP
Copyright (C) 2019-2021 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -436,7 +436,7 @@ tmp<volSymmTensorField> RASModelVariables::devReff
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
- (laminarTransport.nu() + nutRef())*dev(twoSymm(fvc::grad(U))) - (laminarTransport.nu() + nutRef())*devTwoSymm(fvc::grad(U))
); );
} }

View File

@ -7,7 +7,7 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2007-2019 PCOpt/NTUA
Copyright (C) 2013-2019 FOSS GP Copyright (C) 2013-2019 FOSS GP
Copyright (C) 2019-2020 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -114,7 +114,7 @@ tmp<volScalarField::Internal> kOmegaSST::computeG()
volScalarField::Internal GbyNu0 volScalarField::Internal GbyNu0
( (
IOobject::scopedName(this->type(), "GbyNu"), IOobject::scopedName(this->type(), "GbyNu"),
(tgradU() && dev(twoSymm(tgradU()))) (tgradU() && devTwoSymm(tgradU()))
); );
// NB: leave tmp registered (for correctBoundaryConditions) // NB: leave tmp registered (for correctBoundaryConditions)

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2018 OpenFOAM Foundation Copyright (C) 2011-2018 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -256,7 +256,7 @@ Foam::RASModels::kineticTheoryModel::R() const
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
- (nut_)*dev(twoSymm(fvc::grad(U_))) - (nut_)*devTwoSymm(fvc::grad(U_))
- (lambda_*fvc::div(phi_))*symmTensor::I - (lambda_*fvc::div(phi_))*symmTensor::I
) )
); );
@ -335,7 +335,7 @@ Foam::RASModels::kineticTheoryModel::devRhoReff
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
- (rho_*nut_) - (rho_*nut_)
*dev(twoSymm(fvc::grad(U))) *devTwoSymm(fvc::grad(U))
- ((rho_*lambda_)*fvc::div(phi_))*symmTensor::I - ((rho_*lambda_)*fvc::div(phi_))*symmTensor::I
) )
); );

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd. Copyright (C) 2019-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -256,7 +256,7 @@ Foam::RASModels::kineticTheoryModel::R() const
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
- (nut_)*dev(twoSymm(fvc::grad(U_))) - (nut_)*devTwoSymm(fvc::grad(U_))
- (lambda_*fvc::div(phi_))*symmTensor::I - (lambda_*fvc::div(phi_))*symmTensor::I
) )
); );
@ -335,7 +335,7 @@ Foam::RASModels::kineticTheoryModel::devRhoReff
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
- (rho_*nut_) - (rho_*nut_)
*dev(twoSymm(fvc::grad(U))) *devTwoSymm(fvc::grad(U))
- ((rho_*lambda_)*fvc::div(phi_))*symmTensor::I - ((rho_*lambda_)*fvc::div(phi_))*symmTensor::I
) )
); );

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2020-2021 OpenCFD Ltd. Copyright (C) 2020-2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -328,14 +328,14 @@ tmp<Foam::volSymmTensorField> filmTurbulenceModel::devRhoReff() const
const auto& thermo = const auto& thermo =
m.lookupObject<fluidThermo>(fluidThermo::dictName); m.lookupObject<fluidThermo>(fluidThermo::dictName);
return -thermo.mu()*dev(twoSymm(fvc::grad(U))); return -thermo.mu()*devTwoSymm(fvc::grad(U));
} }
else if (m.foundObject<transportModel>("transportProperties")) else if (m.foundObject<transportModel>("transportProperties"))
{ {
const auto& laminarT = const auto& laminarT =
m.lookupObject<transportModel>("transportProperties"); m.lookupObject<transportModel>("transportProperties");
return -rho()*laminarT.nu()*dev(twoSymm(fvc::grad(U))); return -rho()*laminarT.nu()*devTwoSymm(fvc::grad(U));
} }
else if (m.foundObject<dictionary>("transportProperties")) else if (m.foundObject<dictionary>("transportProperties"))
{ {
@ -344,7 +344,7 @@ tmp<Foam::volSymmTensorField> filmTurbulenceModel::devRhoReff() const
const dimensionedScalar nu("nu", dimViscosity, transportProperties); const dimensionedScalar nu("nu", dimViscosity, transportProperties);
return -rho()*nu*dev(twoSymm(fvc::grad(U))); return -rho()*nu*devTwoSymm(fvc::grad(U));
} }
else else
{ {