diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C index 2fc874981ef9a81d7a93f02b12d6daa3d2228c34..c151f4ffcb1a2b7afde76444016bc5a92581f999 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C @@ -157,7 +157,7 @@ int main(int argc, char *argv[]) + aphiv_neg*(rho_neg*(e_neg + 0.5*magSqr(U_neg)) + p_neg) + aSf*p_pos - aSf*p_neg; - volTensorField tauMC("tauMC", mu*dev2(fvc::grad(U)().T())); + volTensorField tauMC("tauMC", mu*dev2(Foam::T(fvc::grad(U)))); // --- Solve density Info<< max(rho) << " " << min(rho) << endl; diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C index 1f77191f4cef657f48666a4067bdb7091999a332..42c8eb11d6bf8939c15f32884259603a060c5cc8 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C @@ -139,7 +139,7 @@ int main(int argc, char *argv[]) + aphiv_neg*(rho_neg*(e_neg + 0.5*magSqr(U_neg)) + p_neg) + aSf*p_pos - aSf*p_neg; - volTensorField tauMC("tauMC", mu*dev2(fvc::grad(U)().T())); + volTensorField tauMC("tauMC", mu*dev2(Foam::T(fvc::grad(U)))); // --- Solve density solve(fvm::ddt(rho) + fvc::div(phi)); diff --git a/etc/settings.sh b/etc/settings.sh index 785c3f97dde17d3c10cc6f8bef3eb5cf69b93faf..f9bd097de3758ced6bf5991820c415cbad110f06 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -259,7 +259,8 @@ unset MPI_ARCH_PATH MPI_HOME case "$WM_MPLIB" in OPENMPI) - mpi_version=openmpi-1.4.1 + #mpi_version=openmpi-1.4.1 + mpi_version=openmpi-1.5 export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mpi_version # Tell OpenMPI where to find its install directory diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.C b/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.C index 7a765d056814eab1ec1a8925a3b7ea72025b6104..f015cf5157d44017c7d247df61f58e9fac8f7035 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.C @@ -36,6 +36,7 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +UNARY_FUNCTION(tensor, tensor, T, transform) UNARY_FUNCTION(scalar, tensor, tr, transform) UNARY_FUNCTION(sphericalTensor, tensor, sph, transform) UNARY_FUNCTION(symmTensor, tensor, symm, transform) diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.H b/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.H index 30b664e909677310a6196ab5a39efda60a61d922..e70b3d1f776eeb132ba85d0874453cc1c907e3ae 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.H @@ -49,6 +49,7 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +UNARY_FUNCTION(tensor, tensor, T, transform) UNARY_FUNCTION(scalar, tensor, tr, transform) UNARY_FUNCTION(sphericalTensor, tensor, sph, transform) UNARY_FUNCTION(symmTensor, tensor, symm, transform) diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C index ee623a30bbeed8732506b3796364c07b18251060..93dcdd8cb1e36298576701a2fcd68574dfe4c0a9 100644 --- a/src/OpenFOAM/global/argList/argList.C +++ b/src/OpenFOAM/global/argList/argList.C @@ -736,7 +736,7 @@ Foam::argList::argList { Info<< "Slaves : " << slaveProcs << nl; if (roots.size()) - { + { Info<< "Roots : " << roots << nl; } Info<< "Pstream initialized with:" << nl @@ -770,7 +770,8 @@ Foam::argList::argList if (bannerEnabled) { - Info<< "Monitoring run-time modified files using " + Info<< "fileModificationChecking : " + << "Monitoring run-time modified files using " << regIOobject::fileCheckTypesNames [ regIOobject::fileModificationChecking diff --git a/src/turbulenceModels/LES/LESdeltas/Make/files b/src/turbulenceModels/LES/LESdeltas/Make/files index a2513976396a8c8fb805ad035ee327ccb0f15edf..b7d627cb48ec3127b8261575f2e3818019e0b33a 100644 --- a/src/turbulenceModels/LES/LESdeltas/Make/files +++ b/src/turbulenceModels/LES/LESdeltas/Make/files @@ -2,5 +2,6 @@ LESdelta/LESdelta.C cubeRootVolDelta/cubeRootVolDelta.C PrandtlDelta/PrandtlDelta.C smoothDelta/smoothDelta.C +maxhxhyhzDelta/maxhxhyhzDelta.C LIB = $(FOAM_LIBBIN)/libLESdeltas diff --git a/src/turbulenceModels/LES/LESdeltas/maxhxhyhzDelta/maxhxhyhzDelta.C b/src/turbulenceModels/LES/LESdeltas/maxhxhyhzDelta/maxhxhyhzDelta.C new file mode 100644 index 0000000000000000000000000000000000000000..0ba1d63b1aa42642dcadf10a0e81f86d734096c5 --- /dev/null +++ b/src/turbulenceModels/LES/LESdeltas/maxhxhyhzDelta/maxhxhyhzDelta.C @@ -0,0 +1,142 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "maxhxhyhzDelta.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTypeNameAndDebug(maxhxhyhzDelta, 0); +addToRunTimeSelectionTable(LESdelta, maxhxhyhzDelta, dictionary); + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void maxhxhyhzDelta::calcDelta() +{ + label nD = mesh().nGeometricD(); + + tmp<volScalarField> hmax + ( + new volScalarField + ( + IOobject + ( + "hmax", + mesh().time().timeName(), + mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh(), + dimensionedScalar("zrero", dimLength, 0.0) + ) + ); + + const cellList& cells = mesh().cells(); + + forAll(cells,cellI) + { + scalar deltaMaxTmp = 0.0; + const labelList& cFaces = mesh().cells()[cellI]; + const point& centrevector = mesh().cellCentres()[cellI]; + + forAll(cFaces, cFaceI) + { + label faceI = cFaces[cFaceI]; + const point& facevector = mesh().faceCentres()[faceI]; + scalar tmp = mag(facevector - centrevector); + if (tmp > deltaMaxTmp) + { + deltaMaxTmp = tmp; + } + } + hmax()[cellI] = deltaCoeff_*deltaMaxTmp; + } + + if (nD == 3) + { + delta_.internalField() = hmax(); + } + else if (nD == 2) + { + WarningIn("maxhxhyhzDelta::calcDelta()") + << "Case is 2D, LES is not strictly applicable\n" + << endl; + + delta_.internalField() = hmax(); + } + else + { + FatalErrorIn("maxhxhyhzDelta::calcDelta()") + << "Case is not 3D or 2D, LES is not applicable" + << exit(FatalError); + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +maxhxhyhzDelta::maxhxhyhzDelta +( + const word& name, + const fvMesh& mesh, + const dictionary& dd +) +: + LESdelta(name, mesh), + deltaCoeff_(readScalar(dd.subDict(type() + "Coeffs").lookup("deltaCoeff"))) +{ + calcDelta(); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void maxhxhyhzDelta::read(const dictionary& dd) +{ + dd.subDict(type() + "Coeffs").lookup("deltaCoeff") >> deltaCoeff_; + calcDelta(); +} + + +void maxhxhyhzDelta::correct() +{ + if (mesh_.changing()) + { + calcDelta(); + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESdeltas/maxhxhyhzDelta/maxhxhyhzDelta.H b/src/turbulenceModels/LES/LESdeltas/maxhxhyhzDelta/maxhxhyhzDelta.H new file mode 100644 index 0000000000000000000000000000000000000000..30f26e6bd09ef902fe2f9dbc2f12ee6b3e307d78 --- /dev/null +++ b/src/turbulenceModels/LES/LESdeltas/maxhxhyhzDelta/maxhxhyhzDelta.H @@ -0,0 +1,111 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::maxhxhyhzDelta + +Description + maxhxhyhzDelta takes the maximum of the three dimensions per cell: + max(hx, hy, hz). Valid for structures hexahedral cells only. + + +SourceFiles + maxhxhyhzDelta.C + +\*---------------------------------------------------------------------------*/ + +#ifndef maxhxhyhzDeltaDelta_H +#define maxhxhyhzDeltaDelta_H + +#include "LESdelta.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class maxhxhyhzDelta Declaration +\*---------------------------------------------------------------------------*/ + +class maxhxhyhzDelta +: + public LESdelta +{ + // Private data + + scalar deltaCoeff_; // + + + // Private Member Functions + + //- Disallow default bitwise copy construct and assignment + maxhxhyhzDelta(const maxhxhyhzDelta&); + void operator=(const maxhxhyhzDelta&); + + // Calculate the delta values + void calcDelta(); + + +public: + + //- Runtime type information + TypeName("maxhxhyhzDelta"); + + + // Constructors + + //- Construct from name, mesh and IOdictionary + maxhxhyhzDelta + ( + const word& name, + const fvMesh& mesh, + const dictionary& + ); + + + //- Destructor + virtual ~maxhxhyhzDelta() + {} + + + // Member Functions + + //- Read the LESdelta dictionary + virtual void read(const dictionary&); + + // Correct values + virtual void correct(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +#endif + +// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.C b/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.C index cb36acd1d26717b24de0cfaeb9b08d25c0f878e6..2fa4e4324de557589afd5dc021ba284547910fb3 100644 --- a/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.C +++ b/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.C @@ -134,7 +134,7 @@ tmp<fvVectorMatrix> GenEddyVisc::divDevRhoBeff(volVectorField& U) const { return ( - - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(fvc::grad(U)().T())) + - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.C b/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.C index 65d2126f236b49cef141df42cb23a03b7b073e4f..9073d79b9524fc06a0395217db88f645303bed6f 100644 --- a/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.C +++ b/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.C @@ -143,7 +143,7 @@ tmp<fvVectorMatrix> GenSGSStress::divDevRhoBeff(volVectorField& U) const fvc::div(rho()*B_ + 0.05*muSgs_*fvc::grad(U)) + fvc::laplacian(0.95*muSgs_, U, "laplacian(muEff,U)") - fvm::laplacian(muEff(), U) - - fvc::div(mu()*dev2(fvc::grad(U)().T())) + - fvc::div(mu()*dev2(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.C index f674b03e40393d6afda5aa1a357f079c4b4b22b2..57175b380b73a83f6f88cba8b6cc136f63a35889 100644 --- a/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.C @@ -285,7 +285,7 @@ tmp<fvVectorMatrix> SpalartAllmaras::divDevRhoBeff(volVectorField& U) const { return ( - - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(fvc::grad(U)().T())) + - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/compressible/RAS/LRR/LRR.C b/src/turbulenceModels/compressible/RAS/LRR/LRR.C index b90b1f5f146af990cb9e9e24f2d2bee0ac9cdb8e..f07252c7e29e2071b760854bdc324fdfbe1896e6 100644 --- a/src/turbulenceModels/compressible/RAS/LRR/LRR.C +++ b/src/turbulenceModels/compressible/RAS/LRR/LRR.C @@ -274,7 +274,7 @@ tmp<fvVectorMatrix> LRR::divDevRhoReff(volVectorField& U) const fvc::div(rho_*R_ + couplingFactor_*mut_*fvc::grad(U)) + fvc::laplacian((1.0 - couplingFactor_)*mut_, U) - fvm::laplacian(muEff(), U) - - fvc::div(mu()*dev2(fvc::grad(U)().T())) + - fvc::div(mu()*dev2(T(fvc::grad(U)))) ); } else @@ -284,7 +284,7 @@ tmp<fvVectorMatrix> LRR::divDevRhoReff(volVectorField& U) const fvc::div(rho_*R_) + fvc::laplacian(mut_, U) - fvm::laplacian(muEff(), U) - - fvc::div(mu()*dev2(fvc::grad(U)().T())) + - fvc::div(mu()*dev2(T(fvc::grad(U)))) ); } } diff --git a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C index 130c7a6dcbfc4586c68f6f6985435eb3421d5fc7..411bde1e35440eef3b1b1e4d08226f9a80fbef11 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -303,7 +303,7 @@ tmp<fvVectorMatrix> LaunderGibsonRSTM::divDevRhoReff(volVectorField& U) const fvc::div(rho_*R_ + couplingFactor_*mut_*fvc::grad(U)) + fvc::laplacian((1.0 - couplingFactor_)*mut_, U) - fvm::laplacian(muEff(), U) - - fvc::div(mu()*dev2(fvc::grad(U)().T())) + - fvc::div(mu()*dev2(T(fvc::grad(U)))) ); } else @@ -313,7 +313,7 @@ tmp<fvVectorMatrix> LaunderGibsonRSTM::divDevRhoReff(volVectorField& U) const fvc::div(rho_*R_) + fvc::laplacian(mut_, U) - fvm::laplacian(muEff(), U) - - fvc::div(mu()*dev2(fvc::grad(U)().T())) + - fvc::div(mu()*dev2(T(fvc::grad(U)))) ); } } diff --git a/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C b/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C index 452e0b5a5251a896434b3963b71ad68224505e1c..94cbc64e76f31d687af015fdcb416dc4718ca82f 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C +++ b/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C @@ -248,7 +248,7 @@ tmp<fvVectorMatrix> LaunderSharmaKE::divDevRhoReff(volVectorField& U) const { return ( - - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(fvc::grad(U)().T())) + - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.C b/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.C index 1e4fc21cb738fad0bb2c607a71ddc34b4e6eba7d..70aaedec2a410c7244b2951999de17179af366a7 100644 --- a/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.C +++ b/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.C @@ -247,7 +247,7 @@ tmp<fvVectorMatrix> RNGkEpsilon::divDevRhoReff(volVectorField& U) const { return ( - - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(fvc::grad(U)().T())) + - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.C index b391afff0989286e5844b62a86f620f128168ee1..04022940e877a88e678dcd38b744008d85e64c99 100644 --- a/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.C @@ -345,7 +345,7 @@ tmp<fvVectorMatrix> SpalartAllmaras::divDevRhoReff(volVectorField& U) const return ( - fvm::laplacian(muEff_, U) - - fvc::div(muEff_*dev2(fvc::grad(U)().T())) + - fvc::div(muEff_*dev2(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.C b/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.C index 160ada3f60a0a75404c08e743717e0e23de2b42f..6f26937754b7d23b6cd79f07c95d369a25f306c4 100644 --- a/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.C +++ b/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.C @@ -230,7 +230,7 @@ tmp<fvVectorMatrix> kEpsilon::divDevRhoReff(volVectorField& U) const return ( - fvm::laplacian(muEff(), U) - - fvc::div(muEff()*dev2(fvc::grad(U)().T())) + - fvc::div(muEff()*dev2(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C index 96d14423eca0f612986fcc706ff9a02999e9d7aa..c4ad4c93acd402123c5e3894018bc3f2778b9e89 100644 --- a/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C +++ b/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C @@ -327,7 +327,7 @@ tmp<fvVectorMatrix> kOmegaSST::divDevRhoReff(volVectorField& U) const { return ( - - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(fvc::grad(U)().T())) + - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/compressible/RAS/laminar/laminar.C b/src/turbulenceModels/compressible/RAS/laminar/laminar.C index a98801842a04c658d254ffd3b2bc612dcabaca2a..71a1ee088665daa2cfeffa3743944117b9c7ca22 100644 --- a/src/turbulenceModels/compressible/RAS/laminar/laminar.C +++ b/src/turbulenceModels/compressible/RAS/laminar/laminar.C @@ -194,7 +194,7 @@ tmp<fvVectorMatrix> laminar::divDevRhoReff(volVectorField& U) const return ( - fvm::laplacian(muEff(), U) - - fvc::div(muEff()*dev2(fvc::grad(U)().T())) + - fvc::div(muEff()*dev2(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.C b/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.C index a81e76be6eed1a3b4b20118b5204b64a7162717a..b32aa5a079e7b103eb79e152d9c543a51c78479a 100644 --- a/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.C +++ b/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.C @@ -261,7 +261,7 @@ tmp<fvVectorMatrix> realizableKE::divDevRhoReff(volVectorField& U) const { return ( - - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(fvc::grad(U)().T())) + - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C index b51f3938a6ca3ebe740e528e9287739f560eddad..8cf38ca5adca065fa2529ee2b26f2cf633748bd3 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C +++ b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C @@ -215,7 +215,7 @@ tmp<fvVectorMatrix> laminar::divDevRhoReff(volVectorField& U) const return ( - fvm::laplacian(muEff(), U) - - fvc::div(muEff()*dev2(fvc::grad(U)().T())) + - fvc::div(muEff()*dev2(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.C b/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.C index e3fe43a5f3d87a32b003f5b0690e6da50db646c3..0399ecccc8a87e369aa4ad483156410c1892388a 100644 --- a/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.C +++ b/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.C @@ -97,7 +97,7 @@ tmp<fvVectorMatrix> GenEddyVisc::divDevBeff(volVectorField& U) const { return ( - - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(fvc::grad(U)().T())) + - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H index eafb352fb2c9b501d2cba7e6caa96068a1f20b1a..9e6c8845ec842d28b9cf41e39888c052fe53a019 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H @@ -182,7 +182,7 @@ public: } //- Access function to filter width - inline const volScalarField& delta() const + virtual const volScalarField& delta() const { return delta_(); } diff --git a/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.C b/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.C index 95574f28ef7ba39f3ed64d40ae03a4c536557eb5..5e853c054a7c723f4c8d75c735e5e7cc37609bd9 100644 --- a/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.C +++ b/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.C @@ -96,7 +96,7 @@ tmp<fvVectorMatrix> Smagorinsky2::divDevBeff return ( - - fvm::laplacian(aniNuEff, U) - fvc::div(nuEff()*dev(fvc::grad(U)().T())) + - fvm::laplacian(aniNuEff, U) - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C index 90ffc2adbae95a84385b058ae99b2e1c5fa229d5..ba09ee6572c6f2805bf82526f111a1830e548d20 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C @@ -349,7 +349,7 @@ tmp<fvVectorMatrix> SpalartAllmaras::divDevBeff(volVectorField& U) const { return ( - - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(fvc::grad(U)().T())) + - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C index a7de909e459c6dbe3fa88a46329fa189928ab14e..f1e008eab1ff54db60503f2399274300ffa2e65f 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C @@ -25,6 +25,7 @@ License #include "IDDESDelta.H" #include "addToRunTimeSelectionTable.H" +#include "wallDistReflection.H" #include "wallDist.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -42,25 +43,50 @@ void Foam::IDDESDelta::calcDelta() { label nD = mesh().nGeometricD(); - volScalarField delta + const volScalarField& hmax = hmax_(); + + // initialise wallNorm + wallDistReflection wallNorm(mesh()); + + const volVectorField& n = wallNorm.n(); + + tmp<volScalarField> faceToFacenMax ( - IOobject + new volScalarField ( - "delta", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("zero", dimLength, SMALL), - calculatedFvPatchScalarField::typeName + IOobject + ( + "faceToFaceMax", + mesh().time().timeName(), + mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh(), + dimensionedScalar("zrero", dimLength, 0.0) + ) ); - delta.internalField() = pow(mesh_.V(), 1.0/3.0); + const cellList& cells = mesh().cells(); - // initialise hwn as wall distance - volScalarField hwn = wallDist(mesh()).y(); + forAll(cells,cellI) + { + scalar deltaMaxTmp = 0.0; + const labelList& cFaces = mesh().cells()[cellI]; + const point& faceCentre = mesh().faceCentres()[cFaces[0]]; + const vector nCell = n[cellI]; + forAll(cFaces, cFaceI) + { + label faceI = cFaces[cFaceI]; + const point& faceCentreTwo = mesh().faceCentres()[faceI]; + scalar tmp = (faceCentre - faceCentreTwo) & nCell; + if (tmp > deltaMaxTmp) + { + deltaMaxTmp = tmp; + } + } + faceToFacenMax()[cellI] = deltaMaxTmp; + } if (nD == 3) { @@ -68,8 +94,12 @@ void Foam::IDDESDelta::calcDelta() deltaCoeff_ *min ( - max(max(cw_*wallDist(mesh()).y(), cw_*delta), hwn), - delta + max + ( + max(cw_*wallDist(mesh()).y(), cw_*hmax), + faceToFacenMax() + ), + hmax ); } else if (nD == 2) @@ -82,8 +112,8 @@ void Foam::IDDESDelta::calcDelta() deltaCoeff_ *min ( - max(max(cw_*wallDist(mesh()).y(), cw_*delta), hwn), - delta + max(max(cw_*wallDist(mesh()).y(), cw_*hmax), faceToFacenMax()), + hmax ); } else @@ -105,8 +135,12 @@ Foam::IDDESDelta::IDDESDelta ) : LESdelta(name, mesh), - deltaCoeff_(readScalar(dd.subDict(type() + "Coeffs").lookup("deltaCoeff"))), - cw_(0) + hmax_(LESdelta::New("hmax", mesh, dd.parent())), + deltaCoeff_ + ( + readScalar(dd.subDict(type()+"Coeffs").lookup("deltaCoeff")) + ), + cw_(0.15) { dd.subDict(type() + "Coeffs").readIfPresent("cw", cw_); calcDelta(); @@ -127,6 +161,7 @@ void Foam::IDDESDelta::correct() if (mesh_.changing()) { calcDelta(); + hmax_().correct(); } } diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.H b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.H index e738f6740cbcccb2e59f5e87d04b71a93362d6fc..8f74dbacc937824adab27b5024444366b3c4884a 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.H +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.H @@ -54,6 +54,7 @@ class IDDESDelta { // Private data + autoPtr<LESdelta> hmax_; scalar deltaCoeff_; scalar cw_; @@ -85,9 +86,10 @@ public: ); - //- Destructor - ~IDDESDelta() - {} + // Destructor + + ~IDDESDelta() + {} // Member Functions diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C index 50ea893c03b7d0695b9d933542929327f9bbf67c..e06b1d2615a36dbb7aa6b307079844cb7f2c65d6 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C @@ -44,26 +44,9 @@ addToRunTimeSelectionTable(LESModel, SpalartAllmarasIDDES, dictionary); tmp<volScalarField> SpalartAllmarasIDDES::alpha() const { - volScalarField delta - ( - IOobject - ( - "delta", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("zero", dimLength, SMALL), - calculatedFvPatchScalarField::typeName - ); - - delta.internalField() = pow(mesh_.V(), 1.0/3.0); - return max ( - 0.25 - y_/delta, + 0.25 - y_/static_cast<const volScalarField&>(hmax_()), scalar(-5) ); } @@ -166,7 +149,24 @@ SpalartAllmarasIDDES::SpalartAllmarasIDDES ) : SpalartAllmaras(U, phi, transport, turbulenceModelName, modelName), - + hmax_ + ( + LESdelta::New + ( + "hmax", + mesh_, + *this + ) + ), + IDDESDelta_ + ( + LESdelta::New + ( + "IDDESDelta", + mesh_, + this->subDict(typeName + "Coeffs") + ) + ), fwStar_ ( dimensioned<scalar>::lookupOrAddToDict diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H index 832b4947c5504d05460fb8a5ae34cd5290434f38..80b13e1ec087852e42155788a861b2e0d0b9f41b 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H @@ -58,6 +58,8 @@ class SpalartAllmarasIDDES // Model constants + autoPtr<LESdelta> hmax_; + autoPtr<LESdelta> IDDESDelta_; dimensionedScalar fwStar_; dimensionedScalar cl_; dimensionedScalar ct_; @@ -117,6 +119,12 @@ public: // Member Functions + //- Access function to filter width + virtual const volScalarField& delta() const + { + return IDDESDelta_(); + } + //- Read LESProperties dictionary virtual bool read(); }; diff --git a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C index 7eb2619cd846fd81743192e639b5842498b22c42..3a1c1eb75a55f63f60cd23ed856275a889408331 100644 --- a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C +++ b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C @@ -435,7 +435,7 @@ tmp<fvVectorMatrix> kOmegaSSTSAS::divDevBeff(volVectorField& U) const { return ( - - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(fvc::grad(U)().T())) + - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/LES/laminar/laminar.C b/src/turbulenceModels/incompressible/LES/laminar/laminar.C index ad524887cdc8cec5165bb953ae2f78423bc92698..767dfeae22575e64f400112d729ea32e898eba70 100644 --- a/src/turbulenceModels/incompressible/LES/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/LES/laminar/laminar.C @@ -146,7 +146,7 @@ tmp<fvVectorMatrix> laminar::divDevBeff(volVectorField& U) const { return ( - - fvm::laplacian(nu(), U) - fvc::div(nu()*dev(fvc::grad(U)().T())) + - fvm::laplacian(nu(), U) - fvc::div(nu()*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C b/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C index 46fc6a8863120a09718e4215a695245769ea8aa4..c60df67eeec3b04fd2fccb0cd828d464f471c1ab 100644 --- a/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C +++ b/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C @@ -199,7 +199,7 @@ tmp<fvVectorMatrix> LamBremhorstKE::divDevReff(volVectorField& U) const return ( - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(fvc::grad(U)().T())) + - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C b/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C index ee34ef8be7dc6b538be9edc63601babc6c53cb1f..3d92720c3cc8920338f2a2776875d51f9aaa3d6d 100644 --- a/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C +++ b/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C @@ -205,7 +205,7 @@ tmp<fvVectorMatrix> LaunderSharmaKE::divDevReff(volVectorField& U) const return ( - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(fvc::grad(U)().T())) + - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.C b/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.C index 0154cf2c8b38dc7d3ec3e5b1f3e623f709741d1f..c7ad938fe272046d63c96d12d3c92a66e3f083c4 100644 --- a/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.C +++ b/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.C @@ -294,7 +294,7 @@ tmp<fvVectorMatrix> LienCubicKE::divDevReff(volVectorField& U) const ( fvc::div(nonlinearStress_) - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(fvc::grad(U)().T())) + - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.C b/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.C index b961771ea26960ca35b1e61e9642448dd04f5199..c81f604388f47b2e0a9bcfe4a51a21f0181ac294 100644 --- a/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.C +++ b/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.C @@ -358,7 +358,7 @@ tmp<fvVectorMatrix> LienCubicKELowRe::divDevReff(volVectorField& U) const ( fvc::div(nonlinearStress_) - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(fvc::grad(U)().T())) + - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C index 4a76228d23f2c368a1b392510825f9fe69d18950..b12f4774c0abdec0eb2db8048cac1e4f887a12fd 100644 --- a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C +++ b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C @@ -244,7 +244,7 @@ tmp<fvVectorMatrix> LienLeschzinerLowRe::divDevReff(volVectorField& U) const ( - fvm::laplacian(nuEff(), U) //- (fvc::grad(U) & fvc::grad(nuEff())) - - fvc::div(nuEff()*fvc::grad(U)().T()) + - fvc::div(nuEff()*T(fvc::grad(U))) ); } diff --git a/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.C b/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.C index facd5b4453edb95a771104215b26461198ef8722..318791559f553b08ce8ff472e79a92790c60a311 100644 --- a/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.C +++ b/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.C @@ -284,7 +284,7 @@ tmp<fvVectorMatrix> NonlinearKEShih::divDevReff(volVectorField& U) const ( fvc::div(nonlinearStress_) - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(fvc::grad(U)().T())) + - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C b/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C index b7ecd8548390b626f483af56de6988a68cdd7dbe..9d9f8f009395d38f9d5317831f750ac07379d8d2 100644 --- a/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C +++ b/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C @@ -215,7 +215,7 @@ tmp<fvVectorMatrix> RNGkEpsilon::divDevReff(volVectorField& U) const return ( - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(fvc::grad(U)().T())) + - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C index c8d51febd2cb3fd85fcd67c7ee23f2627d264843..02eeaa318f5cb2b7b4db8508c82b4caf70c7da8d 100644 --- a/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C @@ -325,7 +325,7 @@ tmp<fvVectorMatrix> SpalartAllmaras::divDevReff(volVectorField& U) const return ( - fvm::laplacian(nuEff_, U) - - fvc::div(nuEff_*dev(fvc::grad(U)().T())) + - fvc::div(nuEff_*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C b/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C index d7dd3c2578b1686e7295227285ce801272ea553c..50eb3c22836120dbb973bc26d85d0326fe3c56e7 100644 --- a/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C +++ b/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C @@ -187,7 +187,7 @@ tmp<fvVectorMatrix> kEpsilon::divDevReff(volVectorField& U) const return ( - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(fvc::grad(U)().T())) + - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C b/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C index f316234661d01b2decf68186d6f3fff98b359efa..77f62cb5bbb9d6dd60423932e1dbbf29a6f2e52c 100644 --- a/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C +++ b/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C @@ -196,7 +196,7 @@ tmp<fvVectorMatrix> kOmega::divDevReff(volVectorField& U) const return ( - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(fvc::grad(U)().T())) + - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C index 6dbebeb0d76e03a888cae873eead8f3240fded84..60dc98395ab37b200ba547a3e929a79b76fec682 100644 --- a/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C +++ b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C @@ -303,7 +303,7 @@ tmp<fvVectorMatrix> kOmegaSST::divDevReff(volVectorField& U) const return ( - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(fvc::grad(U)().T())) + - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C index afc6803e039503848eb530268e6a842ae0f83e07..9a7a2a3e0fab9541be4744df06af919b45e4b47e 100644 --- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C @@ -172,7 +172,7 @@ tmp<fvVectorMatrix> laminar::divDevReff(volVectorField& U) const return ( - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(fvc::grad(U)().T())) + - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.C b/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.C index 41929db9fea6375797be61447defb43c9f8d2869..8fb23887ce34d2416c4b399fff0e5b6aad60a2cf 100644 --- a/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.C +++ b/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.C @@ -257,7 +257,7 @@ tmp<fvVectorMatrix> qZeta::divDevReff(volVectorField& U) const return ( - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(fvc::grad(U)().T())) + - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.C b/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.C index 5f870de0a7d0a758d8807e5f11a304247c8c258f..d6e49f0b666005408a9c156c614cddf16272d89f 100644 --- a/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.C +++ b/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.C @@ -237,7 +237,7 @@ tmp<fvVectorMatrix> realizableKE::divDevReff(volVectorField& U) const return ( - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(fvc::grad(U)().T())) + - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C index 580f764d5a71e68a350ccf888ed45d51049921c3..7ab42b7fb8854b8f1c8db1889a012111ba1dec1a 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C @@ -198,7 +198,7 @@ tmp<fvVectorMatrix> laminar::divDevReff(volVectorField& U) const return ( - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(fvc::grad(U)().T())) + - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); } diff --git a/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSchemes b/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSchemes index a8972de9c21ff328620287f235550820b024266d..124240f261b5f783b57e6fe54d398be11871dc6d 100644 --- a/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phi,R) Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) Gauss upwind; - div((nuEff*dev(grad(U).T()))) Gauss linear; + div((nuEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes