diff --git a/README b/README index b6df934336f23b3a9811b03c543439a1edf5b91e..459dde3d321f1fcda48c50e2c0923adf7c4df266 100644 --- a/README +++ b/README @@ -22,37 +22,35 @@ If the user wishes to run OpenFOAM in 32/64-bit mode they should consult the section "Running OpenFOAM in 32-bit mode". -** Qt (from http://trolltech.com/products/qt) - The ParaView 3.6 visualisation package requires that Qt version 4.3.x MUST - be installed on the system. Earlier or more recent versions (4.2.x or - 4.4.x) will NOT work. To check whether Qt4 is installed, and the version, - type: - + qmake --version - - The ParaView binary executables in the ThirdParty distribution will only - work with PRECISELY the same version of Qt with which it was compiled. The - 64-bit version of ParaView was compiled with Qt-4.3.1 (with openSuSE-10.3) - and the 32-bit version of ParaView was compiled with Qt-4.3.2 (with - ubuntu-7.10). If the user finds that a ParaView binary fails to run, then - it is almost certainly due to a conflict in compiled and installed Qt - versions and they will need to consult the section below on "Compiling - ParaView and the PV3FoamReader module." - - The default versions of Qt used by some GNU/Linux releases are as follows. - + ubuntu-7.10: Version 4.3.2 - + ubuntu-8.04: Version 4.3.4 - + openSuSE-10.2: Version 4.2.1 - too old - + openSuSE-10.3: Version 4.3.1 - + openSuSE-11.0: Version 4.4.0 - too new - - Compilation and running of ParaView has been successful using the libraries - downloaded in the "libqt4-dev" package on ubuntu. - - If you don't have an appropriate version of Qt installed you can download - the sources from TrollTech e.g.: - ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.3.5.tar.bz2 - and compile and install in /usr/local or some other location that does to - conflict with the pre-installed version. +*** Qt (from http://trolltech.com/products/qt) + The ParaView 3.6.1 visualisation package suggests that Qt version 4.3.x + be installed on the system. The source may build against more recent + versions, but this is done at the user's own risk. To check whether Qt4 is + installed, and the version, type: + + qmake --version + + Both 32-bit and 64-bit version of ParaView were compiled with Qt-4.4.3 (with + openSUSE-11.1). If the user finds that a ParaView binary fails to run, then + it is almost certainly due to a conflict in compiled and installed Qt + versions and they will need to consult the section below on "Compiling + ParaView and the PV3FoamReader module." + + The default versions of Qt used by some GNU/Linux releases are as follows. + + ubuntu-7.10: Version 4.3.2 + + ubuntu-8.04: Version 4.3.4 + + openSUSE-10.2: Version 4.2.1 - too old + + openSUSE-10.3: Version 4.3.1 + + openSUSE-11.0: Version 4.4.0 + + openSUSE-11.1: Version 4.4.3 + + Compilation and running of ParaView has been successful using the libraries + downloaded in the "libqt4-dev" package on ubuntu. + + If you don't have an appropriate version of Qt installed you can download + the sources from TrollTech e.g.: + ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.3.5.tar.bz2 + and compile and install in /usr/local or some other location that does not + conflict with the pre-installed version. * Installation Download and unpack the files in the $HOME/OpenFOAM directory as described in: @@ -62,7 +60,7 @@ in the OpenFOAM release. e.g. in + $HOME/OpenFOAM/OpenFOAM-<VERSION>/etc/ - + where <VERSION> corresponds to the version 1.5, 1.6, ... + + where <VERSION> corresponds to the version 1.6, 1.7, ... 1) EITHER, if running bash or ksh (if in doubt type 'echo $SHELL'), source the etc/bashrc file by adding the following line to the end of your @@ -113,7 +111,7 @@ which may be obtained from http://gcc.gnu.org/. Install the compiler in - $WM_PROJECT_INST_DIR/ThirdParty/gcc-<GCC_VERSION>/platforms/$WM_ARCH$WM_COMPILER_ARCH/ + $WM_THIRD_PARTY_DIR/gcc-<GCC_VERSION>/platforms/$WM_ARCH$WM_COMPILER_ARCH/ and change the gcc version number in $WM_PROJECT_DIR/etc/settings.sh and $WM_PROJECT_DIR/etc/settings.csh appropriately and finally update the environment variables as in section 3. @@ -121,10 +119,12 @@ Now go to the top-level source directory $WM_PROJECT_DIR and execute the top-level build script './Allwmake'. In principle this will build everything, but if problems occur with the build order it may be necessary to update the - environment variables and re-execute 'Allwmake'. If you experience - difficulties with building the source-pack, or your platform is not currently - supported, please contact <enquiries@OpenCFD.co.uk> to negotiate a support - contract and we will do the port and maintain it for future releases. + environment variables and re-execute './Allwmake'. + + If you experience difficulties with building the source-pack, or your platform + is not currently supported, please contact <enquiries@OpenCFD.co.uk> to + negotiate a support contract and we will do the port and maintain it for + future releases. * Testing the installation To check your installation setup, execute the 'foamInstallationTest' script @@ -154,14 +154,14 @@ + icoFoam + paraFoam -* Compiling Paraview 3 and the PV3FoamReader module - A version of Qt 4.3.x must be installed to compile ParaView. The +* Compiling Paraview 3.6.1 and the PV3FoamReader module + A version of Qt 4.3.x must be installed to fully compile ParaView. The compilation is a fairly simple process using the makeParaView script - (found in ThirdParty directory) that has worked in our tests with other + (found in ThirdParty directory), which has worked in our tests with other packages supplied in the ThirdParty directory, namely cmake-2.6.4 and - gcc-4.3.3. Execute the following: + gcc-4.3.3. Execute the following: + cd $WM_THIRD_PARTY_DIR - + rm -rf paraview-3.6/platforms + + rm -rf paraview-3.6.1/platforms + ./makeParaView diff --git a/applications/solvers/compressible/rhoCentralFoam/createFields.H b/applications/solvers/compressible/rhoCentralFoam/createFields.H index daf3a88435cc8b9bfbae14ab33085c9dcd72d55e..fc65b3e5b40b3fdc54e58dc8100707aa4fece3d6 100644 --- a/applications/solvers/compressible/rhoCentralFoam/createFields.H +++ b/applications/solvers/compressible/rhoCentralFoam/createFields.H @@ -7,7 +7,7 @@ autoPtr<basicPsiThermo> pThermo basicPsiThermo& thermo = pThermo(); volScalarField& p = thermo.p(); -volScalarField& h = thermo.h(); +volScalarField& e = thermo.e(); const volScalarField& T = thermo.T(); const volScalarField& psi = thermo.psi(); const volScalarField& mu = thermo.mu(); @@ -70,7 +70,7 @@ volScalarField rhoE IOobject::NO_READ, IOobject::NO_WRITE ), - rho*(h + 0.5*magSqr(U)) - p + rho*(e + 0.5*magSqr(U)) ); surfaceScalarField pos diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C index f418f176374b384112da5f8cd760be97d61efc02..f01a2d5a8a323c3ce94486b972028ec5ca5973d1 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C @@ -76,10 +76,10 @@ int main(int argc, char *argv[]) surfaceScalarField rPsi_neg = fvc::interpolate(rPsi, neg, "reconstruct(T)"); - surfaceScalarField h_pos = - fvc::interpolate(h, pos, "reconstruct(T)"); - surfaceScalarField h_neg = - fvc::interpolate(h, neg, "reconstruct(T)"); + surfaceScalarField e_pos = + fvc::interpolate(e, pos, "reconstruct(T)"); + surfaceScalarField e_neg = + fvc::interpolate(e, neg, "reconstruct(T)"); surfaceVectorField U_pos = rhoU_pos/rho_pos; surfaceVectorField U_neg = rhoU_neg/rho_neg; @@ -132,8 +132,8 @@ int main(int argc, char *argv[]) + (a_pos*p_pos + a_neg*p_neg)*mesh.Sf(); surfaceScalarField phiEp = - aphiv_pos*rho_pos*(h_pos + 0.5*magSqr(U_pos)) - + aphiv_neg*rho_neg*(h_neg + 0.5*magSqr(U_neg)) + aphiv_pos*(rho_pos*(e_pos + 0.5*magSqr(U_pos)) + p_pos) + + 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())); @@ -156,7 +156,7 @@ int main(int argc, char *argv[]) { solve ( - fvm::ddt(rho, U) - fvc::ddt(rho,U) + fvm::ddt(rho, U) - fvc::ddt(rho, U) - fvm::laplacian(mu, U) - fvc::div(tauMC) ); @@ -180,28 +180,27 @@ int main(int argc, char *argv[]) - fvc::div(sigmaDotU) ); - h = (rhoE + p)/rho - 0.5*magSqr(U); - h.correctBoundaryConditions(); + e = rhoE/rho - 0.5*magSqr(U); + e.correctBoundaryConditions(); thermo.correct(); rhoE.boundaryField() = rho.boundaryField()* ( - h.boundaryField() + 0.5*magSqr(U.boundaryField()) - ) - - p.boundaryField(); + e.boundaryField() + 0.5*magSqr(U.boundaryField()) + ); if (!inviscid) { volScalarField k("k", thermo.Cp()*mu/Pr); solve ( - fvm::ddt(rho, h) - fvc::ddt(rho, h) - - fvm::laplacian(thermo.alpha(), h) - + fvc::laplacian(thermo.alpha(), h) + fvm::ddt(rho, e) - fvc::ddt(rho, e) + - fvm::laplacian(thermo.alpha(), e) + + fvc::laplacian(thermo.alpha(), e) - fvc::laplacian(k, T) ); thermo.correct(); - rhoE = rho*(h + 0.5*magSqr(U)) - p; + rhoE = rho*(e + 0.5*magSqr(U)); } p.dimensionedInternalField() = diff --git a/applications/test/router/routerDict b/applications/test/router/routerDict index 0d349d5f8b38783b39d690e44531d3c46fd62139..b21e5544fef1f40899ad547f356ee81f0a32c5db 100644 --- a/applications/test/router/routerDict +++ b/applications/test/router/routerDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMeshDict b/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMeshDict index 1edf2946d6c4a64b8b2e0f841b21cd289b20966d..d2d9941d63d11f7c2e220a15594f52b122c84619 100644 --- a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMeshDict +++ b/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMeshDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/mesh/advanced/modifyMesh/modifyMeshDict b/applications/utilities/mesh/advanced/modifyMesh/modifyMeshDict index 00cba81e43b9ccfda0c6e3267c64ffe8266bff4f..f2cf26169293c0ec4e8bff832f82720ae594dc13 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/modifyMeshDict +++ b/applications/utilities/mesh/advanced/modifyMesh/modifyMeshDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/mesh/advanced/selectCells/selectCellsDict b/applications/utilities/mesh/advanced/selectCells/selectCellsDict index 6211d4c8f071e19784653870f7889978d3451ee4..eb10e23d7880fefd65caa91ab5f009d0a8f17046 100644 --- a/applications/utilities/mesh/advanced/selectCells/selectCellsDict +++ b/applications/utilities/mesh/advanced/selectCells/selectCellsDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeProperties b/applications/utilities/mesh/generation/extrudeMesh/extrudeProperties index 8bf73c4bf2ca89172987fec01fcd6939249f409e..45618034deb13b6a1e5c55bfc02e7bedd9928203 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeProperties +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeProperties @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict index b19b207124979ab412a80fcb8e88506be8f98c77..cd7c13d7833918b5386b977d7a7a04aed077c975 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/mesh/manipulation/cellSet/cellSetDict b/applications/utilities/mesh/manipulation/cellSet/cellSetDict index fd11ab871d9b66a0bb4b3c89feb0d7d8015b40c4..1108d6c3d9da9bd27324c20ac1f5a7aa3fbbf444 100644 --- a/applications/utilities/mesh/manipulation/cellSet/cellSetDict +++ b/applications/utilities/mesh/manipulation/cellSet/cellSetDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatchDict b/applications/utilities/mesh/manipulation/createPatch/createPatchDict index 7dc93d5abaf160ff2b6a37b0b095efe3ad069066..2ab9a8b3ccb8fc39b2188ef86e62b8ade9952fb8 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatchDict +++ b/applications/utilities/mesh/manipulation/createPatch/createPatchDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/mesh/manipulation/faceSet/faceSetDict b/applications/utilities/mesh/manipulation/faceSet/faceSetDict index 4d5abe2a5e3788492577a91e357b874e61ec0b95..fd0ea0c09d1e291f3f4166ebc933ac9835dab7f0 100644 --- a/applications/utilities/mesh/manipulation/faceSet/faceSetDict +++ b/applications/utilities/mesh/manipulation/faceSet/faceSetDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/mesh/manipulation/mirrorMesh/mirrorMeshDict b/applications/utilities/mesh/manipulation/mirrorMesh/mirrorMeshDict index bb6cfe7a1e28becca801e96913654cd69d0feaab..0405c7cfedec65777353544f2ed86e60c7fd3617 100644 --- a/applications/utilities/mesh/manipulation/mirrorMesh/mirrorMeshDict +++ b/applications/utilities/mesh/manipulation/mirrorMesh/mirrorMeshDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/mesh/manipulation/pointSet/pointSetDict b/applications/utilities/mesh/manipulation/pointSet/pointSetDict index 895dcd7f0aec3d01e875c335962a85ae0c6211f7..7d4dd656ae87fdb50d79a22b939b08da2b5db8ac 100644 --- a/applications/utilities/mesh/manipulation/pointSet/pointSetDict +++ b/applications/utilities/mesh/manipulation/pointSet/pointSetDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/mesh/manipulation/refineMesh/refineMeshDict b/applications/utilities/mesh/manipulation/refineMesh/refineMeshDict index f05502b755ca3e3d1db38c2b1b077f6efbc26bb2..5a460c5d2ee1dd3f562200eb0a442bb04562f327 100644 --- a/applications/utilities/mesh/manipulation/refineMesh/refineMeshDict +++ b/applications/utilities/mesh/manipulation/refineMesh/refineMeshDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/foamDataToFluentDict b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/foamDataToFluentDict index 469257e90a53c32c2b4837de779246c9e0f27d4f..da3b4fef6efe82239976713692a2404ec9464362 100644 --- a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/foamDataToFluentDict +++ b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/foamDataToFluentDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/particleTrackProperties b/applications/utilities/postProcessing/lagrangian/particleTracks/particleTrackProperties index 1dcc0258d537ffe209e6ce5ea19a7a6a31a6536c..7c073e899cfc2f749e7af50c50dc4c4a6c3d0212 100644 --- a/applications/utilities/postProcessing/lagrangian/particleTracks/particleTrackProperties +++ b/applications/utilities/postProcessing/lagrangian/particleTracks/particleTrackProperties @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5.x | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/postChannelDict b/applications/utilities/postProcessing/miscellaneous/postChannel/postChannelDict index d63cd656675c6ebe4aecf1608dca9b561a5a3fe8..37739bb8590ad181f83f6d7e9b40a4e24681d2ef 100644 --- a/applications/utilities/postProcessing/miscellaneous/postChannel/postChannelDict +++ b/applications/utilities/postProcessing/miscellaneous/postChannel/postChannelDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/postProcessing/sampling/sample/sampleDict b/applications/utilities/postProcessing/sampling/sample/sampleDict index 4284b2878c3ae308b563648976ce56fb28eed41c..f3659e728a052a2e77a90d458444d072f4ff5e59 100644 --- a/applications/utilities/postProcessing/sampling/sample/sampleDict +++ b/applications/utilities/postProcessing/sampling/sample/sampleDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C index b2f31cb61c0d7901987f03a4ddcbf1fe9b53e0bc..91197141efbd15eb87dd150320398de390d0bb31 100644 --- a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C +++ b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C @@ -71,10 +71,13 @@ void calcIncompressibleYPlus const volScalarField::GeometricBoundaryField nutPatches = RASModel->nut()().boundaryField(); + bool foundNutPatch = false; forAll(nutPatches, patchi) { if (isA<wallFunctionPatchField>(nutPatches[patchi])) { + foundNutPatch = true; + const wallFunctionPatchField& nutPw = dynamic_cast<const wallFunctionPatchField&> (nutPatches[patchi]); @@ -88,6 +91,12 @@ void calcIncompressibleYPlus << " average: " << average(Yp) << nl << endl; } } + + if (!foundNutPatch) + { + Info<< " no " << wallFunctionPatchField::typeName << " patches" + << endl; + } } @@ -142,10 +151,13 @@ void calcCompressibleYPlus const volScalarField::GeometricBoundaryField mutPatches = RASModel->mut()().boundaryField(); + bool foundMutPatch = false; forAll(mutPatches, patchi) { if (isA<wallFunctionPatchField>(mutPatches[patchi])) { + foundMutPatch = true; + const wallFunctionPatchField& mutPw = dynamic_cast<const wallFunctionPatchField&> (mutPatches[patchi]); @@ -159,6 +171,12 @@ void calcCompressibleYPlus << " average: " << average(Yp) << nl << endl; } } + + if (!foundMutPatch) + { + Info<< " no " << wallFunctionPatchField::typeName << " patches" + << endl; + } } diff --git a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/Make/options b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/Make/options index 89e52b6d520dc088e6516df08f0f521f188a6353..1d01ecc4c31db673f8e8b0ace9c81a79eda953e5 100644 --- a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/Make/options +++ b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/Make/options @@ -1,6 +1,13 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude EXE_LIBS = \ + -lincompressibleRASModels \ + -lbasicThermophysicalModels \ + -lspecie \ + -lcompressibleRASModels \ -lfiniteVolume diff --git a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C index dde4becd3f6e3c9021f39678d5017f1b648228e0..166386c8e3333bbf4c61e8928d982316e4df5290 100644 --- a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C +++ b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C @@ -26,14 +26,13 @@ Application applyWallFunctionBounaryConditions Description - Updates OpenFOAM RAS cases to use the new wall function framework + Updates OpenFOAM RAS cases to use the new (v1.6) wall function framework Attempts to determine whether case is compressible or incompressible, or can be supplied with -compressible command line argument \*---------------------------------------------------------------------------*/ - #include "argList.H" #include "fvMesh.H" #include "Time.H" @@ -42,6 +41,16 @@ Description #include "wallPolyPatch.H" +#include "incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H" +#include "incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H" +#include "incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H" +#include "incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H" + +#include "compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H" +#include "compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H" +#include "compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H" +#include "compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H" + using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -105,25 +114,6 @@ bool caseIsCompressible(const fvMesh& mesh) } } - // Attempt hydrostatic pressure field - IOobject pdHeader - ( - "pd", - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ); - - if (pdHeader.headerOk()) - { - volScalarField pd(pdHeader, mesh); - if (pd.dimensions() == dimMass/sqr(dimTime)/dimLength) - { - return true; - } - } - // If none of the above are true, assume that the case is incompressible return false; } @@ -231,15 +221,125 @@ void replaceBoundaryType } -int main(int argc, char *argv[]) +void updateCompressibleCase(const fvMesh& mesh) { + Info<< "Case treated as compressible" << nl << endl; + createVolScalarField + ( + mesh, + "mut", + dimArea/dimTime*dimDensity + ); + replaceBoundaryType + ( + mesh, + "mut", + compressible::RASModels::mutWallFunctionFvPatchScalarField::typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "epsilon", + compressible::RASModels::epsilonWallFunctionFvPatchScalarField:: + typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "omega", + compressible::RASModels::omegaWallFunctionFvPatchScalarField::typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "k", + compressible::RASModels::kqRWallFunctionFvPatchField<scalar>::typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "q", + compressible::RASModels::kqRWallFunctionFvPatchField<scalar>::typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "R", + compressible::RASModels::kqRWallFunctionFvPatchField<symmTensor>:: + typeName, + "(0 0 0 0 0 0)" + ); +} + + +void updateIncompressibleCase(const fvMesh& mesh) +{ + Info<< "Case treated as incompressible" << nl << endl; + createVolScalarField(mesh, "nut", dimArea/dimTime); + + replaceBoundaryType + ( + mesh, + "nut", + incompressible::RASModels::nutWallFunctionFvPatchScalarField::typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "epsilon", + incompressible::RASModels::epsilonWallFunctionFvPatchScalarField:: + typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "omega", + incompressible::RASModels::omegaWallFunctionFvPatchScalarField:: + typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "k", + incompressible::RASModels::kqRWallFunctionFvPatchField<scalar>:: + typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "q", + incompressible::RASModels::kqRWallFunctionFvPatchField<scalar>:: + typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "R", + incompressible::RASModels::kqRWallFunctionFvPatchField<symmTensor>:: + typeName, + "(0 0 0 0 0 0)" + ); +} + -# include "addTimeOptions.H" +int main(int argc, char *argv[]) +{ + #include "addTimeOptions.H" argList::validOptions.insert("compressible", ""); -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" bool compressible = args.optionFound("compressible"); @@ -249,28 +349,13 @@ int main(int argc, char *argv[]) if (compressible || caseIsCompressible(mesh)) { - Info<< "Case treated as compressible" << nl << endl; - createVolScalarField - ( - mesh, - "mut", - dimArea/dimTime*dimDensity - ); - replaceBoundaryType(mesh, "mut", "mutWallFunction", "0"); + updateCompressibleCase(mesh); } else { - Info<< "Case treated as incompressible" << nl << endl; - createVolScalarField(mesh, "nut", dimArea/dimTime); - replaceBoundaryType(mesh, "nut", "nutWallFunction", "0"); + updateIncompressibleCase(mesh); } - replaceBoundaryType(mesh, "epsilon", "epsilonWallFunction", "0"); - replaceBoundaryType(mesh, "omega", "omegaWallFunction", "0"); - replaceBoundaryType(mesh, "k", "kqRWallFunction", "0"); - replaceBoundaryType(mesh, "q", "kqRWallFunction", "0"); - replaceBoundaryType(mesh, "R", "kqRWallFunction", "(0 0 0 0 0 0)"); - Info<< "End\n" << endl; return 0; diff --git a/applications/utilities/preProcessing/changeDictionary/changeDictionaryDict b/applications/utilities/preProcessing/changeDictionary/changeDictionaryDict index 946682c0dc4ad670b9a733b35d9d123f7bf26f96..05183586785ea3802ee6a3a0ab9d0b3ef5556eab 100644 --- a/applications/utilities/preProcessing/changeDictionary/changeDictionaryDict +++ b/applications/utilities/preProcessing/changeDictionary/changeDictionaryDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/preProcessing/mapFields/mapFieldsDict b/applications/utilities/preProcessing/mapFields/mapFieldsDict index 3f78955a0558da2b88ab5328ad8ce02758ae000a..f2d360247219e6a3b57cc85b5f45e814e0fcbda1 100644 --- a/applications/utilities/preProcessing/mapFields/mapFieldsDict +++ b/applications/utilities/preProcessing/mapFields/mapFieldsDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/preProcessing/setFields/setFieldsDict b/applications/utilities/preProcessing/setFields/setFieldsDict index 13521c54731e909114fdb9ea0e09594bfea00f9a..af1bf618453e976f68b0350c8ede723810b0f7e1 100644 --- a/applications/utilities/preProcessing/setFields/setFieldsDict +++ b/applications/utilities/preProcessing/setFields/setFieldsDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/surface/surfaceMeshConvert/coordinateSystems b/applications/utilities/surface/surfaceMeshConvert/coordinateSystems index b414b6b81b78470aaba4652a4b8e8fd8d1f878d6..0ce72e67bc2cf6af42ce1b67b52355378225f733 100644 --- a/applications/utilities/surface/surfaceMeshConvert/coordinateSystems +++ b/applications/utilities/surface/surfaceMeshConvert/coordinateSystems @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/surface/surfaceSubset/surfaceSubsetDict b/applications/utilities/surface/surfaceSubset/surfaceSubsetDict index 83f5399b4431f23bb58557ed8eab60fba36f3888..ed06d0a39ccac848031c4ab5ea2003659df92f6c 100644 --- a/applications/utilities/surface/surfaceSubset/surfaceSubsetDict +++ b/applications/utilities/surface/surfaceSubset/surfaceSubsetDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/thermophysical/adiabaticFlameT/Hydrogen.log b/applications/utilities/thermophysical/adiabaticFlameT/Hydrogen.log index 954e40b6b75cf949e8f5b9c465000ec6bf9a29f1..cd2ea615d4d6bbd72e7fe4ad197708e6792f164d 100644 --- a/applications/utilities/thermophysical/adiabaticFlameT/Hydrogen.log +++ b/applications/utilities/thermophysical/adiabaticFlameT/Hydrogen.log @@ -1,7 +1,7 @@ /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/thermophysical/adiabaticFlameT/Methane.log b/applications/utilities/thermophysical/adiabaticFlameT/Methane.log index c27fa56c2ebeea133231b78e9dcaca86931a4282..1e65197392d1240bd5030b4aa93ba353812f118e 100644 --- a/applications/utilities/thermophysical/adiabaticFlameT/Methane.log +++ b/applications/utilities/thermophysical/adiabaticFlameT/Methane.log @@ -1,7 +1,7 @@ /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/thermophysical/adiabaticFlameT/Propane.log b/applications/utilities/thermophysical/adiabaticFlameT/Propane.log index 37aa406a656531bb3f24fa9e61be21fc45b7da65..45e2b912f619fb7698fdb2fc07935360cd2d0e32 100644 --- a/applications/utilities/thermophysical/adiabaticFlameT/Propane.log +++ b/applications/utilities/thermophysical/adiabaticFlameT/Propane.log @@ -1,7 +1,7 @@ /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/thermophysical/adiabaticFlameT/controlDict b/applications/utilities/thermophysical/adiabaticFlameT/controlDict index e7970f8e6ddd691422df3a24b61bf14bcbd012ce..289c9733818956fd9793529facf9751c4f153199 100644 --- a/applications/utilities/thermophysical/adiabaticFlameT/controlDict +++ b/applications/utilities/thermophysical/adiabaticFlameT/controlDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/thermophysical/equilibriumFlameT/Hydrogen.log b/applications/utilities/thermophysical/equilibriumFlameT/Hydrogen.log index 8884bc24996dd0dd6d39b9fd60f57dd4b8f5f3ff..20f74642e85b2bcc56017f880446fadd37d51c4b 100644 --- a/applications/utilities/thermophysical/equilibriumFlameT/Hydrogen.log +++ b/applications/utilities/thermophysical/equilibriumFlameT/Hydrogen.log @@ -1,7 +1,7 @@ /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/thermophysical/equilibriumFlameT/controlDict b/applications/utilities/thermophysical/equilibriumFlameT/controlDict index 65893bfd38f2b0bfeff4a6776f31d3c2d83fba0d..666313208bb1819313bf18c973303d71e246920e 100644 --- a/applications/utilities/thermophysical/equilibriumFlameT/controlDict +++ b/applications/utilities/thermophysical/equilibriumFlameT/controlDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/etc/cellModels b/etc/cellModels index f1f75fb2e8bcfc7689daeee771d7980a70a718f3..ca710a777bf85f736a6ffe22d55b46becfcf860e 100644 --- a/etc/cellModels +++ b/etc/cellModels @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/src/conversion/meshTables/remappingDict b/src/conversion/meshTables/remappingDict index bde8b0b38a8b03966a0d2dab18d7ed000cadf67a..16ca7f9b811cdad720bddbbf4685d6b25dfc06a9 100644 --- a/src/conversion/meshTables/remappingDict +++ b/src/conversion/meshTables/remappingDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5.x | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicMeshDict b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicMeshDict index 158c0a9c2636f5d717f56ce9ccb07ec9b5b52ef4..6502bb5d9674b664d63633e81f0cc86b6de9c2c4 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicMeshDict +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicMeshDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.C b/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.C index 080f02765881f785be50c5cdbf01ac6bd9d92981..ca0c0a757857d417846eed1ce3f3e2ca836d0703 100644 --- a/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.C +++ b/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.H b/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.H index bc04b45b7c13d2daa2012d9346c256f4e0f10e3e..773aecd87129929b35d871c3db6e451155ba6ddd 100644 --- a/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.H +++ b/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/foamCalcFunctions/basic/addSubtract/writeAddSubtractField.C b/src/postProcessing/foamCalcFunctions/basic/addSubtract/writeAddSubtractField.C index 79cd9a7cf81cacba17902687acb634fa5656f61d..03b01a12c91c7c18d958bb3cfa97c675b80e073f 100644 --- a/src/postProcessing/foamCalcFunctions/basic/addSubtract/writeAddSubtractField.C +++ b/src/postProcessing/foamCalcFunctions/basic/addSubtract/writeAddSubtractField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/foamCalcFunctions/basic/addSubtract/writeAddSubtractValue.C b/src/postProcessing/foamCalcFunctions/basic/addSubtract/writeAddSubtractValue.C index 2f8872b54a853908196d269db5aafa210bce8e26..2c6f4c88e785b09e29c58299dcd699a3fd506aca 100644 --- a/src/postProcessing/foamCalcFunctions/basic/addSubtract/writeAddSubtractValue.C +++ b/src/postProcessing/foamCalcFunctions/basic/addSubtract/writeAddSubtractValue.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/foamCalcFunctions/field/interpolate/interpolate.C b/src/postProcessing/foamCalcFunctions/field/interpolate/interpolate.C index aa319343ae2792c4dfffff9a5f96f16f8ef375a0..9a00b63386385521587ae612b0c83eddb9379485 100644 --- a/src/postProcessing/foamCalcFunctions/field/interpolate/interpolate.C +++ b/src/postProcessing/foamCalcFunctions/field/interpolate/interpolate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/foamCalcFunctions/field/interpolate/interpolate.H b/src/postProcessing/foamCalcFunctions/field/interpolate/interpolate.H index 156a2c263fceb8e51cbce8c41919005f958f7de1..2349054bf32733b5f3dc08bdca7015090b372bc3 100644 --- a/src/postProcessing/foamCalcFunctions/field/interpolate/interpolate.H +++ b/src/postProcessing/foamCalcFunctions/field/interpolate/interpolate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/foamCalcFunctions/field/interpolate/writeInterpolateField.C b/src/postProcessing/foamCalcFunctions/field/interpolate/writeInterpolateField.C index 88b1a295aa12e4a90321016b7c4101242bfef9c5..c9066390e22c1c1eff3d7965dac96973207c3625 100644 --- a/src/postProcessing/foamCalcFunctions/field/interpolate/writeInterpolateField.C +++ b/src/postProcessing/foamCalcFunctions/field/interpolate/writeInterpolateField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/foamCalcFunctions/field/randomise/randomise.C b/src/postProcessing/foamCalcFunctions/field/randomise/randomise.C index 7c218e1b77a859660e2e4145f6f823723783914f..8a956c1911656f20866fd8ac6c9b993eaa0e56f5 100644 --- a/src/postProcessing/foamCalcFunctions/field/randomise/randomise.C +++ b/src/postProcessing/foamCalcFunctions/field/randomise/randomise.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/foamCalcFunctions/field/randomise/randomise.H b/src/postProcessing/foamCalcFunctions/field/randomise/randomise.H index 3bc4cec24062f672195f89a801cec4556065d53d..c699db17c457277b7b78c04475ce342bc807849a 100644 --- a/src/postProcessing/foamCalcFunctions/field/randomise/randomise.H +++ b/src/postProcessing/foamCalcFunctions/field/randomise/randomise.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/foamCalcFunctions/field/randomise/writeRandomField.C b/src/postProcessing/foamCalcFunctions/field/randomise/writeRandomField.C index 5bc72adcb7ebbb1b0efc138a2a5b7f7d4c01dd6d..1a2360c7e7e22ebb4a1339d9e8daea8e6eb2480d 100644 --- a/src/postProcessing/foamCalcFunctions/field/randomise/writeRandomField.C +++ b/src/postProcessing/foamCalcFunctions/field/randomise/writeRandomField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/field/fieldAverage/controlDict b/src/postProcessing/functionObjects/field/fieldAverage/controlDict index f9f34b9c058d81c2a6f3242d068685a800bb0e93..0132aa91ddc1efe904f7858375e4d2338c4cd8f6 100644 --- a/src/postProcessing/functionObjects/field/fieldAverage/controlDict +++ b/src/postProcessing/functionObjects/field/fieldAverage/controlDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/src/sampling/probes/probesDict b/src/sampling/probes/probesDict index f818d09bb4915d7d4278e37265c9beb0069b1173..83da4ce91a74c56f4e7243769c7a3506d070cf96 100644 --- a/src/sampling/probes/probesDict +++ b/src/sampling/probes/probesDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | +| \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C b/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C index 0517a06ec20498b1cf01e9ab211f1cb8be325ceb..886f7039157ff7cb1e9385d13e2522dda5683bc2 100644 --- a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C +++ b/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C @@ -29,6 +29,7 @@ License #include "perfectGas.H" #include "eConstThermo.H" +#include "hConstThermo.H" #include "janafThermo.H" #include "specieThermo.H" @@ -63,6 +64,24 @@ makeBasicPsiThermo perfectGas ); +makeBasicPsiThermo +( + ePsiThermo, + pureMixture, + constTransport, + hConstThermo, + perfectGas +); + +makeBasicPsiThermo +( + ePsiThermo, + pureMixture, + sutherlandTransport, + hConstThermo, + perfectGas +); + makeBasicPsiThermo ( ePsiThermo, diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.H b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.H index b4a90987f1055bd730289fd30609a0f5918e2d65..f7faa3f1d020cb69358f6c8df616e7876c1950af 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.H +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.H @@ -26,7 +26,8 @@ Class Foam::MarshakRadiationFvPatchScalarField Description - Radiation temperature taken from calculated temperaure + Marshak boundary for radiation G field + - radiation temperature taken from patch value SourceFiles MarshakRadiationFvPatchScalarField.C diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiationFixedT/MarshakRadiationFixedTMixedFvPatchScalarField.H b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiationFixedT/MarshakRadiationFixedTMixedFvPatchScalarField.H index a983f60b02f1b929220e1c2bd31ae4e90c57217c..49fc1bed675496dac23eea1853fbe42f6fdcbbf7 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiationFixedT/MarshakRadiationFixedTMixedFvPatchScalarField.H +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiationFixedT/MarshakRadiationFixedTMixedFvPatchScalarField.H @@ -26,7 +26,8 @@ Class Foam::MarshakRadiationFixedTMixedFvPatchScalarField Description - Radiation temperature specified + Marshak boundary for radiation G field + - radiation temperature specified SourceFiles MarshakRadiationFixedTMixedFvPatchScalarField.C diff --git a/src/thermophysicalModels/radiation/radiationModel/fvDOM/fvDOM/fvDOM.H b/src/thermophysicalModels/radiation/radiationModel/fvDOM/fvDOM/fvDOM.H index 183ce1b9a8320984e21a2ad43bd87599a67c9740..ffbe5400b6979c5c6c51021d36fe29240b47a378 100644 --- a/src/thermophysicalModels/radiation/radiationModel/fvDOM/fvDOM/fvDOM.H +++ b/src/thermophysicalModels/radiation/radiationModel/fvDOM/fvDOM/fvDOM.H @@ -27,7 +27,7 @@ Class Description - Finite Volume Discrete Ordinary Method. Solves the RTE equation for n + Finite Volume Discrete Ordinates Method. Solves the RTE equation for n directions in a participating media, not including scatter. Available absorption models: diff --git a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C index 4749b46c0725876a76250fd3f63bfe5160aaa0fc..7096314fe34aaddbeea31b6e88cab49a70719bf6 100644 --- a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C +++ b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.H b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.H index 51336089bc064d8e5bf437c20f9212050a00ce44..d36be7583cc2f069f00a7b95aaccc14b48a20a4e 100644 --- a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.H +++ b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C index 24c0fe8fb1c90ce1f2b9914f44a7985af2534b28..37cc58fdd521b83670c7304a0b573245e07f7cde 100644 --- a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C +++ b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C index 73c332895643304166c575981d40d2a48f95a2f9..ad2115cdb1b9df888344bbcf9d963a3fa98e8033 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H index a20db7eaccf12d1ccd66a892907312cfa42918ec..4f21ba6472e13b70e057bb874911659fe3d1c6ba 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,8 +36,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef alphatWallFunctionFvPatchScalarField_H -#define alphatWallFunctionFvPatchScalarField_H +#ifndef compressibleAlphatWallFunctionFvPatchScalarField_H +#define compressibleAlphatWallFunctionFvPatchScalarField_H #include "fixedValueFvPatchFields.H" diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index d505db1f08c8076e8a2c14f381ed02dba93e3792..dc6f2a3644eef7a1b0456165b115ca8e0e754a95 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H index 31cbf011d86f41fac22408472556e27f749054e6..5d5865e11edceb1df7ebbdc8509031d74799f907 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,8 +35,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef epsilonWallFunctionFvPatchScalarField_H -#define epsilonWallFunctionFvPatchScalarField_H +#ifndef compressibleEpsilonWallFunctionFvPatchScalarField_H +#define compressibleEpsilonWallFunctionFvPatchScalarField_H #include "fixedInternalValueFvPatchField.H" diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H index 60baa36ff4b8b95e29c702ca1ae79dcc45dc95b8..7d1954f982c596483cf97314c49baabf79264766 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,8 +34,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef kqRWallFunctionFvPatchField_H -#define kqRWallFunctionFvPatchField_H +#ifndef compressiblekqRWallFunctionFvPatchField_H +#define compressiblekqRWallFunctionFvPatchField_H #include "zeroGradientFvPatchField.H" diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.C index e25b7ff0232e6091a6a0219a870870a96321d0ff..7d968255ece1f98a54f8bbeafd3f6fcc9410f23d 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.H index bd72c6a7321863ac4300cfd5b6b60561a9ff9e3a..f43671a48e46f782cb0a1f8d37bd60d7c0f7563d 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C index ed4acb4da05ae4f21a0e521e5f029459c0ec5f2b..0eaf6d0e00f3a3f913e4a70928299280b476346c 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,7 +40,7 @@ namespace RASModels { -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // scalar mutRoughWallFunctionFvPatchScalarField::fnRough ( @@ -65,6 +65,60 @@ scalar mutRoughWallFunctionFvPatchScalarField::fnRough } +tmp<scalarField> mutRoughWallFunctionFvPatchScalarField::calcMut() const +{ + const label patchI = patch().index(); + + const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); + const scalarField& y = rasModel.y()[patchI]; + const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; + const tmp<volScalarField> tk = rasModel.k(); + const volScalarField& k = tk(); + const scalarField& muw = rasModel.mu().boundaryField()[patchI]; + + const scalar Cmu25 = pow(Cmu_, 0.25); + + tmp<scalarField> tmutw(new scalarField(patch().size(), 0.0)); + scalarField& mutw = tmutw(); + + forAll(mutw, faceI) + { + label faceCellI = patch().faceCells()[faceI]; + + scalar uStar = Cmu25*sqrt(k[faceCellI]); + + scalar yPlus = uStar*y[faceI]/(muw[faceI]/rhow[faceI]); + + scalar KsPlus = uStar*Ks_[faceI]/(muw[faceI]/rhow[faceI]); + + scalar Edash = E_; + scalar yPlusLamNew = yPlusLam_; + if (KsPlus > 2.25) + { + Edash /= fnRough(KsPlus, Cs_[faceI]); + yPlusLamNew = rasModel.yPlusLam(kappa_, Edash); + } + + if (debug) + { + Info<< "yPlus = " << yPlus + << ", KsPlus = " << KsPlus + << ", Edash = " << Edash + << ", yPlusLam = " << yPlusLam_ + << endl; + } + + if (yPlus > yPlusLamNew) + { + mutw[faceI] = + muw[faceI]*(yPlus*kappa_/log(max(Edash*yPlus, 1+1e-4)) - 1); + } + } + + return tmutw; +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField @@ -158,61 +212,6 @@ void mutRoughWallFunctionFvPatchScalarField::rmap } -tmp<scalarField> mutRoughWallFunctionFvPatchScalarField::calcMut() const -{ - const label patchI = patch().index(); - - const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); - const scalarField& y = rasModel.y()[patchI]; - const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; - const tmp<volScalarField> tk = rasModel.k(); - const volScalarField& k = tk(); - const scalarField& muw = rasModel.mu().boundaryField()[patchI]; - - const scalar Cmu25 = pow(Cmu_, 0.25); - - tmp<scalarField> tmutw(new scalarField(patch().size(), 0.0)); - scalarField& mutw = tmutw(); - - forAll(mutw, faceI) - { - label faceCellI = patch().faceCells()[faceI]; - - scalar uStar = Cmu25*sqrt(k[faceCellI]); - - scalar yPlus = uStar*y[faceI]/(muw[faceI]/rhow[faceI]); - - scalar KsPlus = uStar*Ks_[faceI]/(muw[faceI]/rhow[faceI]); - - scalar Edash = E_; - scalar yPlusLamNew = yPlusLam; - if (KsPlus > 2.25) - { - Edash /= fnRough(KsPlus, Cs_[faceI]); - yPlusLamNew = rasModel.yPlusLam(kappa_, Edash); - } - - if (debug) - { - Info<< "yPlus = " << yPlus - << ", KsPlus = " << KsPlus - << ", Edash = " << Edash - << ", yPlusLam = " << yPlusLam - << endl; - } - - if (yPlus > yPlusLamNew) - { - mutw[faceI] = - muw[faceI]*(yPlus*kappa_/log(max(Edash*yPlus, 1+1e-4)) - 1); - } - } - - return tmutw; -} - - void mutRoughWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField<scalar>::write(os); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H index 4cbe9ee09cfde5b05f25ffbc3e1c37ed870da7a3..935ab29582bc187cb88fe1f02de029c9cf734cd6 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,8 +40,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef mutRoughWallFunctionFvPatchScalarField_H -#define mutRoughWallFunctionFvPatchScalarField_H +#ifndef compressibleMutRoughWallFunctionFvPatchScalarField_H +#define compressibleMutRoughWallFunctionFvPatchScalarField_H #include "mutWallFunctionFvPatchScalarField.H" diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C index c1876610959d0d2b96cd9fa1036ba8ce836ea133..3a1d0b7ab01a1a8ed62c6bc9f11a532150f5b2d2 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C @@ -39,6 +39,8 @@ namespace compressible namespace RASModels { +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + tmp<scalarField> mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus ( @@ -48,7 +50,6 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus const label patchI = patch().index(); const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); const scalarField& y = rasModel.y()[patchI]; const scalarField& muw = rasModel.mu().boundaryField()[patchI]; const fvPatchScalarField& rho = rasModel.rho().boundaryField()[patchI]; @@ -74,7 +75,7 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus const scalar Re = rho[facei]*magUpara*y[facei]/muw[facei]; const scalar kappaRe = kappa_*Re; - scalar yp = yPlusLam; + scalar yp = yPlusLam_; const scalar ryPlusLam = 1.0/yp; int iter = 0; @@ -146,7 +147,7 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus const scalar Re = rho[facei]*magUpara*y[facei]/muw[facei]; const scalar kappaRe = kappa_*Re; - scalar yp = yPlusLam; + scalar yp = yPlusLam_; const scalar ryPlusLam = 1.0/yp; int iter = 0; @@ -171,6 +172,38 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus } +tmp<scalarField> +mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcMut() const +{ + const label patchI = patch().index(); + + const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); + const scalarField& y = rasModel.y()[patchI]; + const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; + const scalarField& muw = rasModel.mu().boundaryField()[patchI]; + const fvPatchScalarField& rho = rasModel.rho().boundaryField()[patchI]; + + scalarField magUp = mag(Uw.patchInternalField() - Uw); + + tmp<scalarField> tyPlus = calcYPlus(magUp); + scalarField& yPlus = tyPlus(); + + tmp<scalarField> tmutw(new scalarField(patch().size(), 0.0)); + scalarField& mutw = tmutw(); + + forAll(yPlus, facei) + { + if (yPlus[facei] > yPlusLam_) + { + const scalar Re = rho[facei]*magUp[facei]*y[facei]/muw[facei]; + mutw[facei] = muw[facei]*(sqr(yPlus[facei])/Re - 1); + } + } + + return tmutw; +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField:: @@ -247,39 +280,6 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp<scalarField> -mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcMut() const -{ - const label patchI = patch().index(); - - const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); - const scalarField& y = rasModel.y()[patchI]; - const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; - const scalarField& muw = rasModel.mu().boundaryField()[patchI]; - const fvPatchScalarField& rho = rasModel.rho().boundaryField()[patchI]; - - scalarField magUp = mag(Uw.patchInternalField() - Uw); - - tmp<scalarField> tyPlus = calcYPlus(magUp); - scalarField& yPlus = tyPlus(); - - tmp<scalarField> tmutw(new scalarField(patch().size(), 0.0)); - scalarField& mutw = tmutw(); - - forAll(yPlus, facei) - { - if (yPlus[facei] > yPlusLam) - { - const scalar Re = rho[facei]*magUp[facei]*y[facei]/muw[facei]; - mutw[facei] = muw[facei]*(sqr(yPlus[facei])/Re - 1); - } - } - - return tmutw; -} - - tmp<scalarField> mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::yPlus() const { diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H index 2414825d2130249210a87ee3142b9dafea9de8d4..ff321bf622b9831c7b3c8ac3f038b601049f3d51 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H @@ -34,8 +34,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H -#define mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H +#ifndef compressibleMutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H +#define compressibleMutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H #include "mutWallFunctionFvPatchScalarField.H" diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C index 052b22664b42d1f92358729e2b8cbde466c1ae41..c2a49ac7510ef48bd1b38b8e95a693328abc1ba0 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C @@ -50,7 +50,6 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus const label patchI = patch().index(); const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); const scalarField& y = rasModel.y()[patchI]; const fvPatchScalarField& rhow = rasModel.rho().boundaryField()[patchI]; const fvPatchScalarField& muw = rasModel.mu().boundaryField()[patchI]; @@ -62,7 +61,7 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus { scalar kappaRe = kappa_*magUp[faceI]*y[faceI]/(muw[faceI]/rhow[faceI]); - scalar yp = yPlusLam; + scalar yp = yPlusLam_; scalar ryPlusLam = 1.0/yp; int iter = 0; @@ -82,6 +81,35 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus } +tmp<scalarField> +mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcMut() const +{ + const label patchI = patch().index(); + + const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); + const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; + const scalarField magUp = mag(Uw.patchInternalField() - Uw); + const fvPatchScalarField& muw = rasModel.mu().boundaryField()[patchI]; + + tmp<scalarField> tyPlus = calcYPlus(magUp); + scalarField& yPlus = tyPlus(); + + tmp<scalarField> tmutw(new scalarField(patch().size(), 0.0)); + scalarField& mutw = tmutw(); + + forAll(yPlus, faceI) + { + if (yPlus[faceI] > yPlusLam_) + { + mutw[faceI] = + muw[faceI]*(yPlus[faceI]*kappa_/log(E_*yPlus[faceI]) - 1.0); + } + } + + return tmutw; +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // mutSpalartAllmarasStandardWallFunctionFvPatchScalarField:: @@ -143,36 +171,6 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp<scalarField> -mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcMut() const -{ - const label patchI = patch().index(); - - const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); - const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; - const scalarField magUp = mag(Uw.patchInternalField() - Uw); - const fvPatchScalarField& muw = rasModel.mu().boundaryField()[patchI]; - - tmp<scalarField> tyPlus = calcYPlus(magUp); - scalarField& yPlus = tyPlus(); - - tmp<scalarField> tmutw(new scalarField(patch().size(), 0.0)); - scalarField& mutw = tmutw(); - - forAll(yPlus, faceI) - { - if (yPlus[faceI] > yPlusLam) - { - mutw[faceI] = - muw[faceI]*(yPlus[faceI]*kappa_/log(E_*yPlus[faceI]) - 1.0); - } - } - - return tmutw; -} - - tmp<scalarField> mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::yPlus() const { diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H index 09ba112ce4fc58469ba5127cb3567ec989a0b72d..409bc0b9eb2ea5c84f879d3b7de76d216a72f824 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H @@ -34,8 +34,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef mutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H -#define mutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H +#ifndef compressibleMutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H +#define compressibleMutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H #include "mutWallFunctionFvPatchScalarField.H" diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C index 23874146ea1b65f91386026e2892e6a83c9e0190..85e9c7e60a447e83a47ed6ab456a91634e3cc8bd 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C @@ -105,6 +105,21 @@ tmp<scalarField> mutSpalartAllmarasWallFunctionFvPatchScalarField::calcUTau } +tmp<scalarField> +mutSpalartAllmarasWallFunctionFvPatchScalarField::calcMut() const +{ + const label patchI = patch().index(); + + const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); + const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; + const scalarField magGradU = mag(Uw.snGrad()); + const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; + const scalarField& muw = rasModel.mu().boundaryField()[patchI]; + + return max(0.0, rhow*sqr(calcUTau(magGradU))/magGradU - muw); +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // mutSpalartAllmarasWallFunctionFvPatchScalarField:: @@ -166,21 +181,6 @@ mutSpalartAllmarasWallFunctionFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp<scalarField> -mutSpalartAllmarasWallFunctionFvPatchScalarField::calcMut() const -{ - const label patchI = patch().index(); - - const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; - const scalarField magGradU = mag(Uw.snGrad()); - const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; - const scalarField& muw = rasModel.mu().boundaryField()[patchI]; - - return max(0.0, rhow*sqr(calcUTau(magGradU))/magGradU - muw); -} - - tmp<scalarField> mutSpalartAllmarasWallFunctionFvPatchScalarField::yPlus() const { diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.H index 69f12cd87a0509c30bfeb6a6efc647471c3fc68d..fc37af6d82aaf92a03497466bff14bb67b500699 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.H @@ -34,8 +34,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef mutSpalartAllmarasWallFunctionFvPatchScalarField_H -#define mutSpalartAllmarasWallFunctionFvPatchScalarField_H +#ifndef compressibleMutSpalartAllmarasWallFunctionFvPatchScalarField_H +#define compressibleMutSpalartAllmarasWallFunctionFvPatchScalarField_H #include "mutWallFunctionFvPatchScalarField.H" diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C index dcd52cc4e1b5b54ba500334d068f7f815ccc9165..18ea20963c383bad2952edc4bacd84c964237cf8 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,7 +40,7 @@ namespace compressible namespace RASModels { -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // void mutWallFunctionFvPatchScalarField::checkType() { @@ -56,6 +56,63 @@ void mutWallFunctionFvPatchScalarField::checkType() } +scalar mutWallFunctionFvPatchScalarField::calcYPlusLam +( + const scalar kappa, + const scalar E +) const +{ + scalar ypl = 11.0; + + for (int i=0; i<10; i++) + { + ypl = log(E*ypl)/kappa; + } + + return ypl; +} + + +tmp<scalarField> mutWallFunctionFvPatchScalarField::calcMut() const +{ + const label patchI = patch().index(); + const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); + const scalarField& y = rasModel.y()[patchI]; + const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; + const tmp<volScalarField> tk = rasModel.k(); + const volScalarField& k = tk(); + const scalarField& muw = rasModel.mu().boundaryField()[patchI]; + + const scalar Cmu25 = pow(Cmu_, 0.25); + + tmp<scalarField> tmutw(new scalarField(patch().size(), 0.0)); + scalarField& mutw = tmutw(); + + forAll(mutw, faceI) + { + label faceCellI = patch().faceCells()[faceI]; + + scalar yPlus = + Cmu25*y[faceI]*sqrt(k[faceCellI])/(muw[faceI]/rhow[faceI]); + + if (yPlus > yPlusLam_) + { + mutw[faceI] = muw[faceI]*(yPlus*kappa_/log(E_*yPlus) - 1); + } + } + + return tmutw; +} + + +void mutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const +{ + os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; + os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; + os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField @@ -67,7 +124,8 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(p, iF), Cmu_(0.09), kappa_(0.41), - E_(9.8) + E_(9.8), + yPlusLam_(calcYPlusLam(kappa_, E_)) {} @@ -82,7 +140,8 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(ptf, p, iF, mapper), Cmu_(ptf.Cmu_), kappa_(ptf.kappa_), - E_(ptf.E_) + E_(ptf.E_), + yPlusLam_(ptf.yPlusLam_) {} @@ -96,7 +155,8 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(p, iF, dict), Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)), kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - E_(dict.lookupOrDefault<scalar>("E", 9.8)) + E_(dict.lookupOrDefault<scalar>("E", 9.8)), + yPlusLam_(calcYPlusLam(kappa_, E_)) {} @@ -108,7 +168,8 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(wfpsf), Cmu_(wfpsf.Cmu_), kappa_(wfpsf.kappa_), - E_(wfpsf.E_) + E_(wfpsf.E_), + yPlusLam_(wfpsf.yPlusLam_) {} @@ -121,7 +182,8 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(wfpsf, iF), Cmu_(wfpsf.Cmu_), kappa_(wfpsf.kappa_), - E_(wfpsf.E_) + E_(wfpsf.E_), + yPlusLam_(wfpsf.yPlusLam_) {} @@ -135,40 +197,6 @@ void mutWallFunctionFvPatchScalarField::updateCoeffs() } -tmp<scalarField> mutWallFunctionFvPatchScalarField::calcMut() const -{ - const label patchI = patch().index(); - const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); - const scalarField& y = rasModel.y()[patchI]; - const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; - const tmp<volScalarField> tk = rasModel.k(); - const volScalarField& k = tk(); - const scalarField& muw = rasModel.mu().boundaryField()[patchI]; - - const scalar Cmu25 = pow(Cmu_, 0.25); - - tmp<scalarField> tmutw(new scalarField(patch().size(), 0.0)); - scalarField& mutw = tmutw(); - - forAll(mutw, faceI) - { - label faceCellI = patch().faceCells()[faceI]; - - scalar yPlus = - Cmu25*y[faceI]*sqrt(k[faceCellI]) - /(muw[faceI]/rhow[faceI]); - - if (yPlus > yPlusLam) - { - mutw[faceI] = muw[faceI]*(yPlus*kappa_/log(E_*yPlus) - 1); - } - } - - return tmutw; -} - - tmp<scalarField> mutWallFunctionFvPatchScalarField::yPlus() const { const label patchI = patch().index(); @@ -194,14 +222,6 @@ void mutWallFunctionFvPatchScalarField::write(Ostream& os) const } -void mutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const -{ - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; -} - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // makePatchTypeField(fvPatchScalarField, mutWallFunctionFvPatchScalarField); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H index 3945c345e9452db2a50337ca096fe25c7e2a2f35..d90bf01e6eca80aea13b5fd7b3f90b3a089c5ec7 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,8 +35,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef mutWallFunctionFvPatchScalarField_H -#define mutWallFunctionFvPatchScalarField_H +#ifndef compressibleMutWallFunctionFvPatchScalarField_H +#define compressibleMutWallFunctionFvPatchScalarField_H #include "fixedValueFvPatchFields.H" @@ -70,12 +70,18 @@ protected: //- E coefficient scalar E_; + //- Y+ at the edge of the laminar sublayer + scalar yPlusLam_; + // Protected member functions //- Check the type of the patch virtual void checkType(); + //- Calculate the Y+ at the edge of the laminar sublayer + virtual scalar calcYPlusLam(const scalar kappa, const scalar E) const; + //- Calculate the turbulence viscosity virtual tmp<scalarField> calcMut() const; diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index f841402c6cc43cfa67294378a083697a8887bea7..f377694b2156fc3dd9601e550b0ae9beb1115f52 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -197,7 +197,7 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs() const scalarField magGradUw = mag(Uw.snGrad()); - // Set epsilon and G + // Set omega and G forAll(mutw, faceI) { label faceCellI = patch().faceCells()[faceI]; diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H index be50b4a33fa8355afa35d4bcd215857ebeeaa584..2eb47792791517e84f79a3d2a07ad04ca14bdb76 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,8 +33,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef omegaWallFunctionFvPatchScalarField_H -#define omegaWallFunctionFvPatchScalarField_H +#ifndef compressibleOmegaWallFunctionFvPatchScalarField_H +#define compressibleOmegaWallFunctionFvPatchScalarField_H #include "fixedInternalValueFvPatchField.H" diff --git a/src/turbulenceModels/compressible/RAS/include/wallDissipationI.H b/src/turbulenceModels/compressible/RAS/include/wallDissipationI.H deleted file mode 100644 index dbd0b561b16a761965c987f87d9bf0a09557d109..0000000000000000000000000000000000000000 --- a/src/turbulenceModels/compressible/RAS/include/wallDissipationI.H +++ /dev/null @@ -1,51 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Global - wallDissipation - -Description - Set wall dissipation in the epsilon matrix - -\*---------------------------------------------------------------------------*/ - -{ - const fvPatchList& patches = mesh_.boundary(); - - forAll(patches, patchi) - { - const fvPatch& p = patches[patchi]; - - if (isType<wallFvPatch>(p)) - { - epsEqn().setValues - ( - p.faceCells(), - epsilon_.boundaryField()[patchi].patchInternalField() - ); - } - } -} - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/include/wallFunctionsI.H b/src/turbulenceModels/compressible/RAS/include/wallFunctionsI.H deleted file mode 100644 index 698264ed526f7bddfc638815739d77bb5afec9ff..0000000000000000000000000000000000000000 --- a/src/turbulenceModels/compressible/RAS/include/wallFunctionsI.H +++ /dev/null @@ -1,128 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Global - wallFunctions - -Description - Calculate wall dissipation from wall-functions. - -\*---------------------------------------------------------------------------*/ - -{ - labelList cellBoundaryFaceCount(epsilon_.size(), 0); - - scalar Cmu25 = pow(Cmu_.value(), 0.25); - scalar Cmu75 = pow(Cmu_.value(), 0.75); - - const fvPatchList& patches = mesh_.boundary(); - - //- Initialise the near-wall G field to zero - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isType<wallFvPatch>(curPatch)) - { - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - epsilon_[faceCelli] = 0.0; - G[faceCelli] = 0.0; - } - } - } - - //- Accumulate the wall face contributions to epsilon and G - // Increment cellBoundaryFaceCount for each face for averaging - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isType<wallFvPatch>(curPatch)) - { -# include "checkPatchFieldTypes.H" - - const scalarField& rhow = rho_.boundaryField()[patchi]; - - const scalarField& muw = mu().boundaryField()[patchi]; - const scalarField& mutw = mut_.boundaryField()[patchi]; - - scalarField magFaceGradU = - mag(U_.boundaryField()[patchi].snGrad()); - - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - scalar yPlus = - Cmu25*RASModel::y_[patchi][facei] - *sqrt(k_[faceCelli]) - /(muw[facei]/rhow[facei]); - - // For corner cells (with two boundary or more faces), - // epsilon and G in the near-wall cell are calculated - // as an average - - cellBoundaryFaceCount[faceCelli]++; - - epsilon_[faceCelli] += - Cmu75*pow(k_[faceCelli], 1.5) - /(kappa_.value()*RASModel::y_[patchi][facei]); - - if (yPlus > yPlusLam_) - { - G[faceCelli] += - (mutw[facei] + muw[facei]) - *magFaceGradU[facei] - *Cmu25*sqrt(k_[faceCelli]) - /(kappa_.value()*RASModel::y_[patchi][facei]); - } - } - } - } - - - // Perform the averaging - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isType<wallFvPatch>(curPatch)) - { - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - epsilon_[faceCelli] /= cellBoundaryFaceCount[faceCelli]; - G[faceCelli] /= cellBoundaryFaceCount[faceCelli]; - } - } - } -} - - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/include/wallViscosityI.H b/src/turbulenceModels/compressible/RAS/include/wallViscosityI.H deleted file mode 100644 index b775fcea7fcea8467b4ad01455fb3de61d8e8419..0000000000000000000000000000000000000000 --- a/src/turbulenceModels/compressible/RAS/include/wallViscosityI.H +++ /dev/null @@ -1,73 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Global - wallViscosity - -Description - Calculate wall viscosity from wall-functions. - -\*---------------------------------------------------------------------------*/ - -{ - scalar Cmu25 = pow(Cmu_.value(), 0.25); - - const fvPatchList& patches = mesh_.boundary(); - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isType<wallFvPatch>(curPatch)) - { - const scalarField& rhow = rho_.boundaryField()[patchi]; - - const scalarField& muw = mu().boundaryField()[patchi]; - scalarField& mutw = mut_.boundaryField()[patchi]; - - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - scalar yPlus = - Cmu25*RASModel::y_[patchi][facei] - *sqrt(k_[faceCelli])/(muw[facei]/rhow[facei]); - - if (yPlus > yPlusLam_) - { - mutw[facei] = - muw[facei] - *(yPlus*kappa_.value()/log(E_.value()*yPlus) - 1); - } - else - { - mutw[facei] = 0.0; - } - } - } - } -} - - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C index c440294badea5db6bb6b912e4027a0d33d0643ad..0932bb524eeed23598afcb244f8fe0639390b062 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C @@ -155,13 +155,13 @@ SpalartAllmaras::SpalartAllmaras : LESModel(modelName, U, phi, transport), - alphaNut_ + sigmaNut_ ( dimensioned<scalar>::lookupOrAddToDict ( - "alphaNut", + "sigmaNut", coeffDict_, - 1.5 + 0.66666 ) ), kappa_ @@ -169,7 +169,7 @@ SpalartAllmaras::SpalartAllmaras dimensioned<scalar>::lookupOrAddToDict ( "kappa", - *this, + coeffDict_, 0.41 ) ), @@ -227,7 +227,7 @@ SpalartAllmaras::SpalartAllmaras 0.07 ) ), - Cw1_(Cb1_/sqr(kappa_) + alphaNut_*(1.0 + Cb2_)), + Cw1_(Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_), Cw2_ ( dimensioned<scalar>::lookupOrAddToDict @@ -301,11 +301,11 @@ void SpalartAllmaras::correct(const tmp<volTensorField>& gradU) + fvm::div(phi(), nuTilda_) - fvm::laplacian ( - alphaNut_*(nuTilda_ + nu()), + (nuTilda_ + nu())/sigmaNut_, nuTilda_, "laplacian(DnuTildaEff,nuTilda)" ) - - alphaNut_*Cb2_*magSqr(fvc::grad(nuTilda_)) + - Cb2_/sigmaNut_*magSqr(fvc::grad(nuTilda_)) == Cb1_*STilda*nuTilda_ - fvm::Sp(Cw1_*fw(STilda, dTilda)*nuTilda_/sqr(dTilda), nuTilda_) @@ -358,7 +358,7 @@ bool SpalartAllmaras::read() { if (LESModel::read()) { - alphaNut_.readIfPresent(coeffDict()); + sigmaNut_.readIfPresent(coeffDict()); kappa_.readIfPresent(*this); Cb1_.readIfPresent(coeffDict()); Cb2_.readIfPresent(coeffDict()); @@ -366,7 +366,7 @@ bool SpalartAllmaras::read() Cv2_.readIfPresent(coeffDict()); CDES_.readIfPresent(coeffDict()); ck_.readIfPresent(coeffDict()); - Cw1_ = Cb1_/sqr(kappa_) + alphaNut_*(1.0 + Cb2_); + Cw1_ = Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_; Cw2_.readIfPresent(coeffDict()); Cw3_.readIfPresent(coeffDict()); diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H index a1f951ac9205eaa3db37d7c00e90f01f0c794a4d..03058f5b686e3cb8b693fe04f3f1e0e6ab015493 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H @@ -71,7 +71,7 @@ protected: // Protected data - dimensionedScalar alphaNut_; + dimensionedScalar sigmaNut_; dimensionedScalar kappa_; diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.C b/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.C index c4886795e5cdb02029a91b349f5c3eb3dda0058a..b15016a8743c444f85f7e34080867f2137d8e945 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.C +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.H b/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.H index c71cd795c902c76a842a67e7f42423fd234c3073..ad1f3069b6c55fe94048f969919c7e2360a64c8d 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.H +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C index 005ee2eb1610b6f43a58db645123f7096f015b44..53910d3c3aaf9be050029027aad06fdc3421b886 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -60,7 +60,8 @@ void Foam::IDDESDelta::calcDelta() { label faceI = cFaces[cFaceI]; const point& facevector = mesh().faceCentres()[faceI]; - scalar tmp = mag(facevector-centrevector); + scalar tmp = mag(facevector - centrevector); + if (tmp > deltamaxTmp) { deltamaxTmp = tmp; @@ -79,7 +80,11 @@ void Foam::IDDESDelta::calcDelta() { delta_.internalField() = deltaCoeff_ - *min(max(max(cw_*wallDist(mesh()).y(),cw_*deltamax),hwn),deltamax); + *min + ( + max(max(cw_*wallDist(mesh()).y(), cw_*deltamax), hwn), + deltamax + ); } else if (nD == 2) { @@ -89,12 +94,16 @@ void Foam::IDDESDelta::calcDelta() delta_.internalField() = deltaCoeff_ - *min(max(max(cw_*wallDist(mesh()).y(),cw_*deltamax),hwn),deltamax); + *min + ( + max(max(cw_*wallDist(mesh()).y(), cw_*deltamax), hwn), + deltamax + ); } else { FatalErrorIn("IDDESDelta::calcDelta()") - << "Case is not 3D or 2D, LES is not applicable" + << "Case is not 3D or 2D, LES is not strictly applicable" << exit(FatalError); } } diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.H b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.H index a063cd3d15c6cf33b4ac8a8f59b079536cceb964..44cfb918cde75adb50133bd9af4c556df8c7a309 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.H +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -46,7 +46,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class IDDESDelta Declaration + Class IDDESDelta Declaration \*---------------------------------------------------------------------------*/ class IDDESDelta diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C index 27975444a8a42a22b0f83bd06ede0d13d1145e14..22f9b638e21dadc30e3a0f027fa61d073290304f 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H index 34e79f857bba2b1b9539330d211421d44820203a..21dd250d491d884cf1db1b519b0cb342268ceddc 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C index 7c7b17b1dde068ecd2fc66f86ecd2514c0198690..a3c9fd1b50605ffb99b7943ee18b6245f9c0f714 100644 --- a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C +++ b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H index d20a6524dbd279cc6053e0b7523841b5054766f9..05632f924259b7536c22277961971970cc27c114 100644 --- a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H +++ b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C b/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C index 900cd1a24eac096fa57d6c1bfac52379a36b526e..bfa6bb78a17caaf44b37338efa140b9522c3fb7b 100644 --- a/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C +++ b/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.H b/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.H index 26ab42f4b80c8bd6d60cd388022dc864bec13746..615834f9e804b54b291db21de1dae1269e0d7ada 100644 --- a/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.H +++ b/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C b/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C index f5b057f8aae084c69f2960f50aa9f93c1f0b6091..130bb90ca55036e31821a8ac60a881a084cc7565 100644 --- a/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C +++ b/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index 7f0ffd2ed8c31c5ffb95e917984094f90d2a4f66..93cad8188c8d1c6902f6481eca354330efc7b556 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H index 311e83d4eba04e22b84424ddb6599c72144d6218..bd98cced766d083197d6109c06e4363445ebf8df 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H index b97a56239e915ddb6aefdf82b14201f7513ad1ed..e7405e9146257ecaa34dbb634401d3e21501c627 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.C index 903f35dc43fee3d5e0e8f12381baf724e997cf40..e6100256965ee217f7d4310d44c13dc5ef66af62 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.H index 39cc173c3399fbbb1dcfe448785e80c6eafa027f..c8cbc58e0f347aa9a59f656313e42859d5dc0631 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C index e26e652a1aa66bfe497c47b4d661181659fc71c4..48d9ba1dde63777ea5ada9c0e274b7fa8a66794f 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,7 +39,7 @@ namespace incompressible namespace RASModels { -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // scalar nutRoughWallFunctionFvPatchScalarField::fnRough ( @@ -64,6 +64,68 @@ scalar nutRoughWallFunctionFvPatchScalarField::fnRough } +tmp<scalarField> nutRoughWallFunctionFvPatchScalarField::calcNut() const +{ + const label patchI = patch().index(); + + const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); + const scalarField& y = rasModel.y()[patchI]; + const tmp<volScalarField> tk = rasModel.k(); + const volScalarField& k = tk(); + const scalarField& nuw = rasModel.nu().boundaryField()[patchI]; + + const scalar Cmu25 = pow(Cmu_, 0.25); + + tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); + scalarField& nutw = tnutw(); + + forAll(nutw, faceI) + { + label faceCellI = patch().faceCells()[faceI]; + + scalar uStar = Cmu25*sqrt(k[faceCellI]); + scalar yPlus = uStar*y[faceI]/nuw[faceI]; + scalar KsPlus = uStar*Ks_[faceI]/nuw[faceI]; + + scalar Edash = E_; + + if (KsPlus > 2.25) + { + Edash /= fnRough(KsPlus, Cs_[faceI]); + } + + if (yPlus > yPlusLam_) + { + scalar limitingNutw = max(nutw[faceI], nuw[faceI]); + + // To avoid oscillations limit the change in the wall viscosity + // which is particularly important if it temporarily becomes zero + nutw[faceI] = + max + ( + min + ( + nuw[faceI] + *(yPlus*kappa_/log(max(Edash*yPlus, 1+1e-4)) - 1), + 2*limitingNutw + ), 0.5*limitingNutw + ); + } + + if (debug) + { + Info<< "yPlus = " << yPlus + << ", KsPlus = " << KsPlus + << ", Edash = " << Edash + << ", nutw = " << nutw[faceI] + << endl; + } + } + + return tnutw; +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // nutRoughWallFunctionFvPatchScalarField::nutRoughWallFunctionFvPatchScalarField @@ -157,69 +219,6 @@ void nutRoughWallFunctionFvPatchScalarField::rmap } -tmp<scalarField> nutRoughWallFunctionFvPatchScalarField::calcNut() const -{ - const label patchI = patch().index(); - - const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); - const scalarField& y = rasModel.y()[patchI]; - const tmp<volScalarField> tk = rasModel.k(); - const volScalarField& k = tk(); - const scalarField& nuw = rasModel.nu().boundaryField()[patchI]; - - const scalar Cmu25 = pow(Cmu_, 0.25); - - tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); - scalarField& nutw = tnutw(); - - forAll(nutw, faceI) - { - label faceCellI = patch().faceCells()[faceI]; - - scalar uStar = Cmu25*sqrt(k[faceCellI]); - scalar yPlus = uStar*y[faceI]/nuw[faceI]; - scalar KsPlus = uStar*Ks_[faceI]/nuw[faceI]; - - scalar Edash = E_; - - if (KsPlus > 2.25) - { - Edash /= fnRough(KsPlus, Cs_[faceI]); - } - - if (yPlus > yPlusLam) - { - scalar limitingNutw = max(nutw[faceI], nuw[faceI]); - - // To avoid oscillations limit the change in the wall viscosity - // which is particularly important if it temporarily becomes zero - nutw[faceI] = - max - ( - min - ( - nuw[faceI] - *(yPlus*kappa_/log(max(Edash*yPlus, 1+1e-4)) - 1), - 2*limitingNutw - ), 0.5*limitingNutw - ); - } - - if (debug) - { - Info<< "yPlus = " << yPlus - << ", KsPlus = " << KsPlus - << ", Edash = " << Edash - << ", nutw = " << nutw[faceI] - << endl; - } - } - - return tnutw; -} - - void nutRoughWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField<scalar>::write(os); diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.H index fc87756a8f728b5c8837c600640031297b5c8b39..488bf391450ccca32bdee9200513265e430f6b74 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C index e2de2dae71e66b405f17e27aba5404ae6f076a80..760559f6798a2863069b2776ffa925ec0a91a09f 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C @@ -39,7 +39,39 @@ namespace incompressible namespace RASModels { -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +tmp<scalarField> +nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcNut() const +{ + const label patchI = patch().index(); + + const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); + const scalarField& y = rasModel.y()[patchI]; + const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; + const scalarField& nuw = rasModel.nu().boundaryField()[patchI]; + + // The flow velocity at the adjacent cell centre + const scalarField magUp = mag(Uw.patchInternalField() - Uw); + + tmp<scalarField> tyPlus = calcYPlus(magUp); + scalarField& yPlus = tyPlus(); + + tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); + scalarField& nutw = tnutw(); + + forAll(yPlus, facei) + { + if (yPlus[facei] > yPlusLam_) + { + const scalar Re = magUp[facei]*y[facei]/nuw[facei]; + nutw[facei] = nuw[facei]*(sqr(yPlus[facei])/Re - 1); + } + } + + return tnutw; +} + tmp<scalarField> nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus @@ -50,7 +82,6 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus const label patchI = patch().index(); const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); const scalarField& y = rasModel.y()[patchI]; const scalarField& nuw = rasModel.nu().boundaryField()[patchI]; @@ -75,7 +106,7 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus const scalar Re = magUpara*y[facei]/nuw[facei]; const scalar kappaRe = kappa_*Re; - scalar yp = yPlusLam; + scalar yp = yPlusLam_; const scalar ryPlusLam = 1.0/yp; int iter = 0; @@ -133,7 +164,7 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus && yp > VSMALL ); - yPlus[facei] = yp; + yPlus[facei] = max(0.0, yp); } } } @@ -146,7 +177,7 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus const scalar Re = magUpara*y[facei]/nuw[facei]; const scalar kappaRe = kappa_*Re; - scalar yp = yPlusLam; + scalar yp = yPlusLam_; const scalar ryPlusLam = 1.0/yp; int iter = 0; @@ -159,7 +190,7 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus } while(mag(ryPlusLam*(yp - yPlusLast)) > 0.0001 && ++iter < 10); - yPlus[facei] = yp; + yPlus[facei] = max(0.0, yp); } } @@ -243,39 +274,6 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp<scalarField> -nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcNut() const -{ - const label patchI = patch().index(); - - const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); - const scalarField& y = rasModel.y()[patchI]; - const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; - const scalarField& nuw = rasModel.nu().boundaryField()[patchI]; - - // The flow velocity at the adjacent cell centre - const scalarField magUp = mag(Uw.patchInternalField() - Uw); - - tmp<scalarField> tyPlus = calcYPlus(magUp); - scalarField& yPlus = tyPlus(); - - tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); - scalarField& nutw = tnutw(); - - forAll(yPlus, facei) - { - if (yPlus[facei] > yPlusLam) - { - const scalar Re = magUp[facei]*y[facei]/nuw[facei]; - nutw[facei] = nuw[facei]*(sqr(yPlus[facei])/Re - 1); - } - } - - return tnutw; -} - - tmp<scalarField> nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::yPlus() const { diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C index 7bea1742fb8e66a6c552e30330a77e6fe48e824e..e3c3e556711e8c174e2694f4b81f5ae38cee8d31 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C @@ -41,6 +41,35 @@ namespace RASModels // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // +tmp<scalarField> +nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcNut() const +{ + const label patchI = patch().index(); + + const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); + const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; + const scalarField magUp = mag(Uw.patchInternalField() - Uw); + const scalarField& nuw = rasModel.nu().boundaryField()[patchI]; + + tmp<scalarField> tyPlus = calcYPlus(magUp); + scalarField& yPlus = tyPlus(); + + tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); + scalarField& nutw = tnutw(); + + forAll(yPlus, facei) + { + if (yPlus[facei] > yPlusLam_) + { + nutw[facei] = + nuw[facei]*(yPlus[facei]*kappa_/log(E_*yPlus[facei]) - 1.0); + } + } + + return tnutw; +} + + tmp<scalarField> nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus ( @@ -50,7 +79,6 @@ nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus const label patchI = patch().index(); const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); const scalarField& y = rasModel.y()[patchI]; const scalarField& nuw = rasModel.nu().boundaryField()[patchI]; @@ -61,7 +89,7 @@ nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus { scalar kappaRe = kappa_*magUp[facei]*y[facei]/nuw[facei]; - scalar yp = yPlusLam; + scalar yp = yPlusLam_; scalar ryPlusLam = 1.0/yp; int iter = 0; @@ -142,36 +170,6 @@ nutSpalartAllmarasStandardWallFunctionFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp<scalarField> -nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcNut() const -{ - const label patchI = patch().index(); - - const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); - const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; - const scalarField magUp = mag(Uw.patchInternalField() - Uw); - const scalarField& nuw = rasModel.nu().boundaryField()[patchI]; - - tmp<scalarField> tyPlus = calcYPlus(magUp); - scalarField& yPlus = tyPlus(); - - tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); - scalarField& nutw = tnutw(); - - forAll(yPlus, facei) - { - if (yPlus[facei] > yPlusLam) - { - nutw[facei] = - nuw[facei]*(yPlus[facei]*kappa_/log(E_*yPlus[facei]) - 1.0); - } - } - - return tnutw; -} - - tmp<scalarField> nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::yPlus() const { diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C index 99187abb64279d758ebf32bd09db3303ed82d89a..a2d4b746a827b090735968c9e3332227ee11dcf2 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C @@ -39,7 +39,21 @@ namespace incompressible namespace RASModels { -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +tmp<scalarField> +nutSpalartAllmarasWallFunctionFvPatchScalarField::calcNut() const +{ + const label patchI = patch().index(); + + const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); + const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; + const scalarField magGradU = mag(Uw.snGrad()); + const scalarField& nuw = rasModel.nu().boundaryField()[patchI]; + + return max(0.0, sqr(calcUTau(magGradU))/magGradU - nuw); +} + tmp<scalarField> nutSpalartAllmarasWallFunctionFvPatchScalarField::calcUTau ( @@ -159,20 +173,6 @@ nutSpalartAllmarasWallFunctionFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp<scalarField> -nutSpalartAllmarasWallFunctionFvPatchScalarField::calcNut() const -{ - const label patchI = patch().index(); - - const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; - const scalarField magGradU = mag(Uw.snGrad()); - const scalarField& nuw = rasModel.nu().boundaryField()[patchI]; - - return max(0.0, sqr(calcUTau(magGradU))/magGradU - nuw); -} - - tmp<scalarField> nutSpalartAllmarasWallFunctionFvPatchScalarField::yPlus() const { diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C index 0fdefb2b51431dbf3116acf394e0e8c94db94b1d..aef4df68b32688eca2b523013c2e879f1a573c10 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,6 +56,62 @@ void nutWallFunctionFvPatchScalarField::checkType() } +scalar nutWallFunctionFvPatchScalarField::calcYPlusLam +( + const scalar kappa, + const scalar E +) const +{ + scalar ypl = 11.0; + + for (int i=0; i<10; i++) + { + ypl = log(E*ypl)/kappa; + } + + return ypl; +} + + +tmp<scalarField> nutWallFunctionFvPatchScalarField::calcNut() const +{ + const label patchI = patch().index(); + + const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); + const scalarField& y = rasModel.y()[patchI]; + const tmp<volScalarField> tk = rasModel.k(); + const volScalarField& k = tk(); + const scalarField& nuw = rasModel.nu().boundaryField()[patchI]; + + const scalar Cmu25 = pow(Cmu_, 0.25); + + tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); + scalarField& nutw = tnutw(); + + forAll(nutw, faceI) + { + label faceCellI = patch().faceCells()[faceI]; + + scalar yPlus = Cmu25*y[faceI]*sqrt(k[faceCellI])/nuw[faceI]; + + if (yPlus > yPlusLam_) + { + nutw[faceI] = nuw[faceI]*(yPlus*kappa_/log(E_*yPlus) - 1.0); + } + } + + return tnutw; +} + + +void nutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const +{ + os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; + os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; + os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField @@ -67,7 +123,8 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(p, iF), Cmu_(0.09), kappa_(0.41), - E_(9.8) + E_(9.8), + yPlusLam_(calcYPlusLam(kappa_, E_)) { checkType(); } @@ -84,7 +141,8 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(ptf, p, iF, mapper), Cmu_(ptf.Cmu_), kappa_(ptf.kappa_), - E_(ptf.E_) + E_(ptf.E_), + yPlusLam_(ptf.yPlusLam_) { checkType(); } @@ -100,7 +158,8 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(p, iF, dict), Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)), kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - E_(dict.lookupOrDefault<scalar>("E", 9.8)) + E_(dict.lookupOrDefault<scalar>("E", 9.8)), + yPlusLam_(calcYPlusLam(kappa_, E_)) { checkType(); } @@ -114,7 +173,8 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(wfpsf), Cmu_(wfpsf.Cmu_), kappa_(wfpsf.kappa_), - E_(wfpsf.E_) + E_(wfpsf.E_), + yPlusLam_(wfpsf.yPlusLam_) { checkType(); } @@ -129,7 +189,8 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(wfpsf, iF), Cmu_(wfpsf.Cmu_), kappa_(wfpsf.kappa_), - E_(wfpsf.E_) + E_(wfpsf.E_), + yPlusLam_(wfpsf.yPlusLam_) { checkType(); } @@ -145,38 +206,6 @@ void nutWallFunctionFvPatchScalarField::updateCoeffs() } -tmp<scalarField> nutWallFunctionFvPatchScalarField::calcNut() const -{ - const label patchI = patch().index(); - - const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); - const scalarField& y = rasModel.y()[patchI]; - const tmp<volScalarField> tk = rasModel.k(); - const volScalarField& k = tk(); - const scalarField& nuw = rasModel.nu().boundaryField()[patchI]; - - const scalar Cmu25 = pow(Cmu_, 0.25); - - tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); - scalarField& nutw = tnutw(); - - forAll(nutw, faceI) - { - label faceCellI = patch().faceCells()[faceI]; - - scalar yPlus = Cmu25*y[faceI]*sqrt(k[faceCellI])/nuw[faceI]; - - if (yPlus > yPlusLam) - { - nutw[faceI] = nuw[faceI]*(yPlus*kappa_/log(E_*yPlus) - 1.0); - } - } - - return tnutw; -} - - tmp<scalarField> nutWallFunctionFvPatchScalarField::yPlus() const { const label patchI = patch().index(); @@ -201,14 +230,6 @@ void nutWallFunctionFvPatchScalarField::write(Ostream& os) const } -void nutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const -{ - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; -} - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // makePatchTypeField(fvPatchScalarField, nutWallFunctionFvPatchScalarField); diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H index cb68c36f1f285a5ec4e9467d2078ca7350ce0bb4..369d718b0acd910d1e87f1c1b61289212db7d445 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,12 +70,18 @@ protected: //- E coefficient scalar E_; + //- Y+ at the edge of the laminar sublayer + scalar yPlusLam_; + // Protected member functions //- Check the type of the patch virtual void checkType(); + //- Calculate the Y+ at the edge of the laminar sublayer + virtual scalar calcYPlusLam(const scalar kappa, const scalar E) const; + //- Calculate the turbulence viscosity virtual tmp<scalarField> calcNut() const; diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 32ed9418833117f568748b2bc98dc220f2b91c5f..300b0aaf4f2b77266ccbb422d0aef49dbd6abe7f 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -189,7 +189,7 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs() const scalarField magGradUw = mag(Uw.snGrad()); - // Set epsilon and G + // Set omega and G forAll(nutw, faceI) { label faceCellI = patch().faceCells()[faceI]; diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H index 5e1186b3023f26744c131e173362cb0ffa22e653..ce9060de8a097c0003a4854d51983e4997e55376 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/include/wallFunctionsI.H.old b/src/turbulenceModels/incompressible/RAS/include/wallFunctionsI.H.old deleted file mode 100644 index 63095f6120f31a0ba599aa9e0fc2160b4287db68..0000000000000000000000000000000000000000 --- a/src/turbulenceModels/incompressible/RAS/include/wallFunctionsI.H.old +++ /dev/null @@ -1,126 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Global - wallFunctions - -Description - Calculate wall generation and dissipation from wall-functions. - -\*---------------------------------------------------------------------------*/ - -{ - labelList cellBoundaryFaceCount(epsilon_.size(), 0); - - scalar Cmu25 = pow(Cmu_.value(), 0.25); - scalar Cmu75 = pow(Cmu_.value(), 0.75); - - const fvPatchList& patches = mesh_.boundary(); - - //- Initialise the near-wall epsilon and G fields to zero - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isType<wallFvPatch>(curPatch)) - { - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - epsilon_[faceCelli] = 0.0; - G[faceCelli] = 0.0; - } - } - } - - //- Accumulate the wall face contributions to epsilon and G - // Increment cellBoundaryFaceCount for each face for averaging - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isType<wallFvPatch>(curPatch)) - { -# include "checkPatchFieldTypes.H" - - const scalarField& nuw = nu().boundaryField()[patchi]; - const scalarField& nutw = nut_.boundaryField()[patchi]; - - scalarField magFaceGradU = - mag(U_.boundaryField()[patchi].snGrad()); - - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - scalar yPlus = - Cmu25*RASModel::y_[patchi][facei] - *sqrt(k_[faceCelli]) - /nuw[facei]; - - // For corner cells (with two boundary or more faces), - // epsilon and G in the near-wall cell are calculated - // as an average - - cellBoundaryFaceCount[faceCelli]++; - - epsilon_[faceCelli] += - Cmu75*pow(k_[faceCelli], 1.5) - /(kappa_.value()*RASModel::y_[patchi][facei]); - - if (yPlus > yPlusLam_) - { - G[faceCelli] += - (nutw[facei] + nuw[facei]) - *magFaceGradU[facei] - *Cmu25*sqrt(k_[faceCelli]) - /(kappa_.value()*RASModel::y_[patchi][facei]); - } - } - } - } - - - // Perform the averaging - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isType<wallFvPatch>(curPatch)) - { - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - epsilon_[faceCelli] /= cellBoundaryFaceCount[faceCelli]; - G[faceCelli] /= cellBoundaryFaceCount[faceCelli]; - } - } - } -} - - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/include/wallViscosityI.H.old b/src/turbulenceModels/incompressible/RAS/include/wallViscosityI.H.old deleted file mode 100644 index a9d963f97634cde44c5d2de4fea87d9ce1a24576..0000000000000000000000000000000000000000 --- a/src/turbulenceModels/incompressible/RAS/include/wallViscosityI.H.old +++ /dev/null @@ -1,70 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Global - wallViscosity - -Description - Calculate wall viscosity from wall-functions. - -\*---------------------------------------------------------------------------*/ - -{ - scalar Cmu25 = pow(Cmu_.value(), 0.25); - - const fvPatchList& patches = mesh_.boundary(); - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isType<wallFvPatch>(curPatch)) - { - const scalarField& nuw = nu().boundaryField()[patchi]; - scalarField& nutw = nut_.boundaryField()[patchi]; - - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - scalar yPlus = - Cmu25*y_[patchi][facei]*sqrt(k_[faceCelli])/nuw[facei]; - - if (yPlus > yPlusLam_) - { - nutw[facei] = - nuw[facei] - *(yPlus*kappa_.value()/log(E_.value()*yPlus) - 1); - } - else - { - nutw[facei] = 0.0; - } - } - } - } -} - - -// ************************************************************************* // diff --git a/tutorials/compressible/rhoCentralFoam/Allclean b/tutorials/compressible/rhoCentralFoam/Allclean index c783ce638816a8524a36cdb294a5bc8390b786ee..4ac5daed0655f0707c67a13d96c66b30ab310250 100755 --- a/tutorials/compressible/rhoCentralFoam/Allclean +++ b/tutorials/compressible/rhoCentralFoam/Allclean @@ -20,7 +20,7 @@ do cp -r $case/0.org $case/0 fi - (cd $case && foamCleanTutorials) + (cd $case && foamCleanTutorials && cleanSamples) if [ "$case" = "biconic25-55Run35" ] then diff --git a/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/constant/thermophysicalProperties index b1205e97f4d64c64a12b72b8098389bb788f1891..55925db2922137712c72d2348b9b736925cac957 100644 --- a/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType ePsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>; mixture air 1 28.96 1004.5 0 1.458e-06 110.4; diff --git a/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/system/fvSolution b/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/system/fvSolution index fafaa677765263332ebfadfb97212333b25f93ac..09395b92a3847d2251a7c237622f793ee0d3f607 100644 --- a/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/system/fvSolution +++ b/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/system/fvSolution @@ -41,7 +41,7 @@ solvers relTol 0; } - h + e { solver smoothSolver; smoother GaussSeidel; diff --git a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/constant/thermophysicalProperties index 235296e9d84a86ae920b3e53df3485ec5ea2f3a9..b156eb8224f5ce0adf81a75640f7cbb16ee6baa3 100644 --- a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/constant/thermophysicalProperties @@ -17,7 +17,7 @@ FoamFile Pr Pr [ 0 0 0 0 0 0 0 ] 0.72; -thermoType hPsiThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>; +thermoType ePsiThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>; mixture N2 1 28.01348 100 10000 1000 2.9525407 0.0013968838 -4.9262577e-07 7.8600091e-11 -4.6074978e-15 -923.93753 5.8718221 3.5309628 -0.0001236595 -5.0299339e-07 2.4352768e-09 -1.4087954e-12 -1046.9637 2.9674391 1.458e-06 110; diff --git a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/system/fvSolution b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/system/fvSolution index fb7580f8ddc00ad0c8d69c0a5e173f6329f171ba..1b0e6d8a3ead5c28ae50b5b4cc3c7d6e98cda206 100644 --- a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/system/fvSolution +++ b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/system/fvSolution @@ -41,7 +41,7 @@ solvers relTol 0.01; } - h + e { solver smoothSolver; smoother GaussSeidel; diff --git a/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties index b59bf35129cbbba9a15737b278989c83fb09b269..e2ad38ed54e33298745b2d2204c38af785c8241b 100644 --- a/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType ePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; mixture normalisedGas 1 11640.3 2.5 0 0 1; diff --git a/tutorials/compressible/rhoCentralFoam/obliqueShock/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/obliqueShock/constant/thermophysicalProperties index b59bf35129cbbba9a15737b278989c83fb09b269..e2ad38ed54e33298745b2d2204c38af785c8241b 100644 --- a/tutorials/compressible/rhoCentralFoam/obliqueShock/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/obliqueShock/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType ePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; mixture normalisedGas 1 11640.3 2.5 0 0 1; diff --git a/tutorials/compressible/rhoCentralFoam/shockTube/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/shockTube/constant/thermophysicalProperties index b10f83c4495bf34f8ffe0d7307e10e5cd3ec1ffc..399265308767432ead1fa1803e84331b5390c9d7 100644 --- a/tutorials/compressible/rhoCentralFoam/shockTube/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/shockTube/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType ePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; mixture air 1 28.96 1004.5 2.544e+06 0 1; diff --git a/tutorials/compressible/rhoCentralFoam/wedge15Ma5/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/wedge15Ma5/constant/thermophysicalProperties index b59bf35129cbbba9a15737b278989c83fb09b269..e2ad38ed54e33298745b2d2204c38af785c8241b 100644 --- a/tutorials/compressible/rhoCentralFoam/wedge15Ma5/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/wedge15Ma5/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; +thermoType ePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; mixture normalisedGas 1 11640.3 2.5 0 0 1;