From dfa8cf417af75d5d7af2791077445db266e4db6c Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 26 Jul 2012 16:55:25 +0100 Subject: [PATCH 01/53] BUG: setFields: timeSelector overrides controlDict setting (more general: timeSelector should only be used for postprocessing utils) --- .../mesh/manipulation/polyDualMesh/polyDualMeshApp.C | 7 +------ applications/utilities/preProcessing/setFields/setFields.C | 7 ------- .../surface/surfaceMeshConvert/surfaceMeshConvert.C | 3 +-- .../surfaceMeshConvertTesting/surfaceMeshConvertTesting.C | 3 +-- .../surface/surfaceMeshExport/surfaceMeshExport.C | 3 +-- .../surface/surfaceMeshImport/surfaceMeshImport.C | 3 +-- .../utilities/surface/surfaceMeshInfo/surfaceMeshInfo.C | 3 +-- 7 files changed, 6 insertions(+), 23 deletions(-) diff --git a/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C b/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C index 2518dc0450..0969b1e560 100644 --- a/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C +++ b/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,6 @@ Usage #include "argList.H" #include "Time.H" -#include "timeSelector.H" #include "fvMesh.H" #include "unitConversion.H" #include "polyTopoChange.H" @@ -354,7 +353,6 @@ int main(int argc, char *argv[]) { # include "addOverwriteOption.H" argList::noParallel(); - timeSelector::addOptions(true, false); argList::validArgs.append("featureAngle [0-180]"); argList::addBoolOption @@ -376,9 +374,6 @@ int main(int argc, char *argv[]) # include "setRootCase.H" # include "createTime.H" - - instantList timeDirs = timeSelector::select0(runTime, args); - # include "createMesh.H" const word oldInstance = mesh.pointsInstance(); diff --git a/applications/utilities/preProcessing/setFields/setFields.C b/applications/utilities/preProcessing/setFields/setFields.C index 41c09b6053..ebc43d84f2 100644 --- a/applications/utilities/preProcessing/setFields/setFields.C +++ b/applications/utilities/preProcessing/setFields/setFields.C @@ -27,7 +27,6 @@ Description \*---------------------------------------------------------------------------*/ #include "argList.H" -#include "timeSelector.H" #include "Time.H" #include "fvMesh.H" #include "topoSetSource.H" @@ -360,14 +359,8 @@ public: int main(int argc, char *argv[]) { - timeSelector::addOptions(); - # include "setRootCase.H" # include "createTime.H" - - // Get times list - instantList timeDirs = timeSelector::select0(runTime, args); - # include "createMesh.H" Info<< "Reading setFieldsDict\n" << endl; diff --git a/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C b/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C index 357b2bd198..305786f963 100644 --- a/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C +++ b/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,7 +58,6 @@ Note \*---------------------------------------------------------------------------*/ #include "argList.H" -#include "timeSelector.H" #include "Time.H" #include "MeshedSurfaces.H" diff --git a/applications/utilities/surface/surfaceMeshConvertTesting/surfaceMeshConvertTesting.C b/applications/utilities/surface/surfaceMeshConvertTesting/surfaceMeshConvertTesting.C index 92f0ffbd3d..cbc5059f10 100644 --- a/applications/utilities/surface/surfaceMeshConvertTesting/surfaceMeshConvertTesting.C +++ b/applications/utilities/surface/surfaceMeshConvertTesting/surfaceMeshConvertTesting.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -52,7 +52,6 @@ Note \*---------------------------------------------------------------------------*/ #include "argList.H" -#include "timeSelector.H" #include "Time.H" #include "polyMesh.H" #include "triSurface.H" diff --git a/applications/utilities/surface/surfaceMeshExport/surfaceMeshExport.C b/applications/utilities/surface/surfaceMeshExport/surfaceMeshExport.C index c9b7d62113..7c9b3be904 100644 --- a/applications/utilities/surface/surfaceMeshExport/surfaceMeshExport.C +++ b/applications/utilities/surface/surfaceMeshExport/surfaceMeshExport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -59,7 +59,6 @@ Note \*---------------------------------------------------------------------------*/ #include "argList.H" -#include "timeSelector.H" #include "Time.H" #include "MeshedSurfaces.H" diff --git a/applications/utilities/surface/surfaceMeshImport/surfaceMeshImport.C b/applications/utilities/surface/surfaceMeshImport/surfaceMeshImport.C index e9f7f63710..3a14ac63c4 100644 --- a/applications/utilities/surface/surfaceMeshImport/surfaceMeshImport.C +++ b/applications/utilities/surface/surfaceMeshImport/surfaceMeshImport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -59,7 +59,6 @@ Note \*---------------------------------------------------------------------------*/ #include "argList.H" -#include "timeSelector.H" #include "Time.H" #include "MeshedSurfaces.H" diff --git a/applications/utilities/surface/surfaceMeshInfo/surfaceMeshInfo.C b/applications/utilities/surface/surfaceMeshInfo/surfaceMeshInfo.C index 08e6a99b38..80638bf4db 100644 --- a/applications/utilities/surface/surfaceMeshInfo/surfaceMeshInfo.C +++ b/applications/utilities/surface/surfaceMeshInfo/surfaceMeshInfo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,6 @@ Note \*---------------------------------------------------------------------------*/ #include "argList.H" -#include "timeSelector.H" #include "Time.H" #include "UnsortedMeshedSurfaces.H" From 789a385548466b9e4dd84eb2b100ed542d2ccaaa Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 27 Jul 2012 14:04:11 +0100 Subject: [PATCH 02/53] STYLE: vtkSurfaceWriter: 80 char limit --- src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C b/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C index a512419c50..5e6c38045b 100644 --- a/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C +++ b/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -170,6 +170,7 @@ namespace Foam { const symmTensor& v = values[elemI]; os << float(v[0]) << ' ' << float(v[1]) << ' ' << float(v[2]) + << ' ' << float(v[3]) << ' ' << float(v[4]) << ' ' << float(v[5]) << nl; @@ -190,7 +191,9 @@ namespace Foam { const tensor& v = values[elemI]; os << float(v[0]) << ' ' << float(v[1]) << ' ' << float(v[2]) + << ' ' << float(v[3]) << ' ' << float(v[4]) << ' ' << float(v[5]) + << ' ' << float(v[6]) << ' ' << float(v[7]) << ' ' << float(v[8]) << nl; } From 1464c4ff5c6b568ed6bf28475dfc8ae79dff741e Mon Sep 17 00:00:00 2001 From: Henry Date: Fri, 27 Jul 2012 14:56:01 +0100 Subject: [PATCH 03/53] multiphase (VoF): Added support for general turbulence models Required the addition of the divDevRhoR function to all incompressible turbulence models --- .../solvers/multiphase/cavitatingFoam/UEqn.H | 11 +---- .../multiphase/compressibleInterFoam/UEqn.H | 11 +---- .../solvers/multiphase/interFoam/UEqn.H | 11 +---- .../multiphase/interPhaseChangeFoam/UEqn.H | 11 +---- .../multiphase/multiphaseInterFoam/UEqn.H | 11 +---- .../solvers/multiphase/settlingFoam/UEqn.H | 1 - .../multiphase/twoLiquidMixingFoam/UEqn.H | 11 +---- .../functionObjects/forces/forces/forces.C | 4 +- .../LES/GenEddyVisc/GenEddyVisc.C | 23 ++++++++-- .../LES/GenEddyVisc/GenEddyVisc.H | 12 ++++- .../LES/GenSGSStress/GenSGSStress.C | 36 ++++++++++++++- .../LES/GenSGSStress/GenSGSStress.H | 16 +++++-- .../incompressible/LES/LESModel/LESModel.H | 20 --------- .../LES/Smagorinsky2/Smagorinsky2.C | 24 +++++++++- .../LES/Smagorinsky2/Smagorinsky2.H | 14 ++++-- .../LES/SpalartAllmaras/SpalartAllmaras.C | 23 ++++++++-- .../LES/SpalartAllmaras/SpalartAllmaras.H | 16 +++++-- .../LES/kOmegaSSTSAS/kOmegaSSTSAS.C | 23 ++++++++-- .../LES/kOmegaSSTSAS/kOmegaSSTSAS.H | 16 +++++-- .../incompressible/LES/laminar/laminar.C | 23 ++++++++-- .../incompressible/LES/laminar/laminar.H | 16 +++++-- .../LES/mixedSmagorinsky/mixedSmagorinsky.C | 26 ++++++++--- .../LES/mixedSmagorinsky/mixedSmagorinsky.H | 16 +++++-- .../LES/scaleSimilarity/scaleSimilarity.C | 16 +++++-- .../LES/scaleSimilarity/scaleSimilarity.H | 16 +++++-- .../incompressible/RAS/LRR/LRR.C | 38 ++++++++++++++++ .../incompressible/RAS/LRR/LRR.H | 7 +++ .../RAS/LamBremhorstKE/LamBremhorstKE.C | 16 +++++++ .../RAS/LamBremhorstKE/LamBremhorstKE.H | 7 +++ .../RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C | 45 ++++++++++++++++++- .../RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H | 7 +++ .../RAS/LaunderSharmaKE/LaunderSharmaKE.C | 16 +++++++ .../RAS/LaunderSharmaKE/LaunderSharmaKE.H | 7 +++ .../RAS/LienCubicKE/LienCubicKE.C | 17 +++++++ .../RAS/LienCubicKE/LienCubicKE.H | 7 +++ .../RAS/LienCubicKELowRe/LienCubicKELowRe.C | 17 +++++++ .../RAS/LienCubicKELowRe/LienCubicKELowRe.H | 7 +++ .../LienLeschzinerLowRe/LienLeschzinerLowRe.C | 17 ++++++- .../LienLeschzinerLowRe/LienLeschzinerLowRe.H | 7 +++ .../RAS/NonlinearKEShih/NonlinearKEShih.C | 17 +++++++ .../RAS/NonlinearKEShih/NonlinearKEShih.H | 7 +++ .../RAS/RNGkEpsilon/RNGkEpsilon.C | 16 +++++++ .../RAS/RNGkEpsilon/RNGkEpsilon.H | 7 +++ .../RAS/SpalartAllmaras/SpalartAllmaras.C | 16 +++++++ .../RAS/SpalartAllmaras/SpalartAllmaras.H | 7 +++ .../incompressible/RAS/kEpsilon/kEpsilon.C | 16 +++++++ .../incompressible/RAS/kEpsilon/kEpsilon.H | 7 +++ .../incompressible/RAS/kOmega/kOmega.C | 16 +++++++ .../incompressible/RAS/kOmega/kOmega.H | 7 +++ .../incompressible/RAS/kOmegaSST/kOmegaSST.C | 16 +++++++ .../incompressible/RAS/kOmegaSST/kOmegaSST.H | 7 +++ .../incompressible/RAS/kkLOmega/kkLOmega.C | 16 +++++++ .../incompressible/RAS/kkLOmega/kkLOmega.H | 7 +++ .../incompressible/RAS/laminar/laminar.C | 16 +++++++ .../incompressible/RAS/laminar/laminar.H | 7 +++ .../incompressible/RAS/qZeta/qZeta.C | 16 +++++++ .../incompressible/RAS/qZeta/qZeta.H | 7 +++ .../RAS/realizableKE/realizableKE.C | 16 +++++++ .../RAS/realizableKE/realizableKE.H | 7 +++ .../turbulenceModel/laminar/laminar.C | 16 +++++++ .../turbulenceModel/laminar/laminar.H | 7 +++ .../turbulenceModel/turbulenceModel.H | 7 +++ .../LTSInterFoam/wigleyHull/system/fvSchemes | 1 + .../mixerVessel2D/system/fvSchemes | 1 + .../mixerVessel2D/system/fvSchemes | 1 + .../les/throttle/system/fvSchemes | 1 + .../les/throttle3D/system/fvSchemes | 1 + .../ras/throttle/system/fvSchemes | 1 + .../les/depthCharge2D/system/fvSchemes | 2 +- .../les/depthCharge3D/system/fvSchemes | 2 +- .../ras/damBreakWithObstacle/system/fvSchemes | 1 + .../ras/floatingObject/system/fvSchemes | 1 + .../ras/sloshingTank2D/system/fvSchemes | 1 + .../ras/sloshingTank2D3DoF/system/fvSchemes | 1 + .../ras/sloshingTank3D/system/fvSchemes | 1 + .../ras/sloshingTank3D3DoF/system/fvSchemes | 1 + .../ras/sloshingTank3D6DoF/system/fvSchemes | 1 + .../ras/testTubeMixer/system/fvSchemes | 1 + .../laminar/capillaryRise/system/fvSchemes | 1 + .../laminar/damBreak/system/fvSchemes | 1 + .../les/nozzleFlow2D/system/fvSchemes | 2 +- .../interFoam/ras/damBreak/system/fvSchemes | 2 +- .../ras/damBreakPorousBaffle/system/fvSchemes | 2 +- .../LTSInterFoam/system/fvSchemes | 1 + .../ras/waterChannel/system/fvSchemes | 1 + .../ras/weirOverflow/system/fvSchemes | 2 +- .../laminar/damBreak/system/fvSchemes | 1 + .../cavitatingBullet/system/fvSchemes | 2 +- .../laminar/damBreak4phase/system/fvSchemes | 1 + .../damBreak4phaseFine/system/fvSchemes | 1 + .../lockExchange/system/fvSchemes | 2 +- 91 files changed, 774 insertions(+), 146 deletions(-) diff --git a/applications/solvers/multiphase/cavitatingFoam/UEqn.H b/applications/solvers/multiphase/cavitatingFoam/UEqn.H index 9a5761b59f..1ca0b9f0a5 100644 --- a/applications/solvers/multiphase/cavitatingFoam/UEqn.H +++ b/applications/solvers/multiphase/cavitatingFoam/UEqn.H @@ -1,17 +1,8 @@ - surfaceScalarField muEff - ( - "muEff", - twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nut()) - ); - fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(phi, U) - - fvm::laplacian(muEff, U) - //- (fvc::grad(U) & fvc::grad(muf)) - - fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + + turbulence->divDevRhoReff(rho, U) ); UEqn.relax(); diff --git a/applications/solvers/multiphase/compressibleInterFoam/UEqn.H b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H index 257f6d48b5..7cc250a66a 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/UEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H @@ -1,17 +1,8 @@ - surfaceScalarField muEff - ( - "muEff", - twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nut()) - ); - fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - - fvm::laplacian(muEff, U) - - (fvc::grad(U) & fvc::grad(muEff)) - //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + + turbulence->divDevRhoReff(rho, U) ); UEqn.relax(); diff --git a/applications/solvers/multiphase/interFoam/UEqn.H b/applications/solvers/multiphase/interFoam/UEqn.H index 257f6d48b5..7cc250a66a 100644 --- a/applications/solvers/multiphase/interFoam/UEqn.H +++ b/applications/solvers/multiphase/interFoam/UEqn.H @@ -1,17 +1,8 @@ - surfaceScalarField muEff - ( - "muEff", - twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nut()) - ); - fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - - fvm::laplacian(muEff, U) - - (fvc::grad(U) & fvc::grad(muEff)) - //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + + turbulence->divDevRhoReff(rho, U) ); UEqn.relax(); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H index b8fe82ff14..062c5523c9 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H @@ -1,18 +1,9 @@ - surfaceScalarField muEff - ( - "muEff", - twoPhaseProperties->muf() - + fvc::interpolate(rho*turbulence->nut()) - ); - fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - fvm::Sp(fvc::ddt(rho) + fvc::div(rhoPhi), U) - - fvm::laplacian(muEff, U) - - (fvc::grad(U) & fvc::grad(muEff)) - //- fvc::div(muEff*(fvc::interpolate(dev2(fvc::grad(U))) & mesh.Sf())) + + turbulence->divDevRhoReff(rho, U) ); UEqn.relax(); diff --git a/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H b/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H index 43ee1e3eb9..fbcba7db72 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H @@ -1,17 +1,8 @@ - surfaceScalarField muEff - ( - "muEff", - mixture.muf() - + fvc::interpolate(rho*turbulence->nut()) - ); - fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(mixture.rhoPhi(), U) - - fvm::laplacian(muEff, U) - - (fvc::grad(U) & fvc::grad(muEff)) - //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + + turbulence->divDevRhoReff(rho, U) ); UEqn.relax(); diff --git a/applications/solvers/multiphase/settlingFoam/UEqn.H b/applications/solvers/multiphase/settlingFoam/UEqn.H index d6232da309..ff6323bca2 100644 --- a/applications/solvers/multiphase/settlingFoam/UEqn.H +++ b/applications/solvers/multiphase/settlingFoam/UEqn.H @@ -11,7 +11,6 @@ ) - fvm::laplacian(muEff, U, "laplacian(muEff,U)") - (fvc::grad(U) & fvc::grad(muEff)) - //- fvc::div(muEff*dev2(T(fvc::grad(U)))) ); UEqn.relax(); diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H index 3dbb374774..7afd323dd0 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H @@ -1,17 +1,8 @@ - surfaceScalarField muEff - ( - "muEff", - twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nut()) - ); - fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - - fvm::laplacian(muEff, U) - - (fvc::grad(U) & fvc::grad(muEff)) - //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + + turbulence->divDevRhoReff(rho, U) ); UEqn.relax(); diff --git a/src/postProcessing/functionObjects/forces/forces/forces.C b/src/postProcessing/functionObjects/forces/forces/forces.C index 1dd26906b7..ee8b8bb1b3 100644 --- a/src/postProcessing/functionObjects/forces/forces/forces.C +++ b/src/postProcessing/functionObjects/forces/forces/forces.C @@ -66,14 +66,14 @@ Foam::tmp Foam::forces::devRhoReff() const const compressible::LESModel& les = obr_.lookupObject("LESProperties"); - return les.devRhoBeff(); + return les.devRhoReff(); } else if (obr_.foundObject("LESProperties")) { const incompressible::LESModel& les = obr_.lookupObject("LESProperties"); - return rho()*les.devBeff(); + return rho()*les.devReff(); } else if (obr_.foundObject("thermophysicalProperties")) { diff --git a/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.C b/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.C index 0c905a91ce..e4bde9ce7b 100644 --- a/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.C +++ b/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.C @@ -87,17 +87,34 @@ tmp GenEddyVisc::B() const } -tmp GenEddyVisc::devBeff() const +tmp GenEddyVisc::devReff() const { return -nuEff()*dev(twoSymm(fvc::grad(U()))); } -tmp GenEddyVisc::divDevBeff(volVectorField& U) const +tmp GenEddyVisc::divDevReff(volVectorField& U) const { return ( - - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(T(fvc::grad(U)))) + - fvm::laplacian(nuEff(), U) + - fvc::div(nuEff()*dev(T(fvc::grad(U)))) + ); +} + + +tmp GenEddyVisc::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.H b/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.H index 0746377eb7..105f62c664 100644 --- a/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.H +++ b/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.H @@ -118,11 +118,19 @@ public: //- Return the effective sub-grid turbulence stress tensor // including the laminar stress - virtual tmp devBeff() const; + virtual tmp devReff() const; //- Return the deviatoric part of the effective sub-grid // turbulence stress tensor including the laminar stress - virtual tmp divDevBeff(volVectorField& U) const; + virtual tmp divDevReff(volVectorField& U) const; + + //- Return the deviatoric part of the effective sub-grid + // turbulence stress tensor including the laminar stress + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; //- Correct Eddy-Viscosity and related properties virtual void correct(const tmp& gradU); diff --git a/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.C b/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.C index 9d385c21eb..cbc803da9d 100644 --- a/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.C +++ b/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.C @@ -115,7 +115,7 @@ GenSGSStress::GenSGSStress // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp GenSGSStress::devBeff() const +tmp GenSGSStress::devReff() const { return tmp ( @@ -135,7 +135,7 @@ tmp GenSGSStress::devBeff() const } -tmp GenSGSStress::divDevBeff +tmp GenSGSStress::divDevReff ( volVectorField& U ) const @@ -164,6 +164,38 @@ tmp GenSGSStress::divDevBeff } +tmp GenSGSStress::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + if (couplingFactor_.value() > 0.0) + { + return + ( + fvc::div(rho*B_ + couplingFactor_*rho*nuSgs_*fvc::grad(U)) + + fvc::laplacian + ( + (1.0 - couplingFactor_)*rho*nuSgs_, U, "laplacian(muEff,U)" + ) + - fvm::laplacian(muEff, U) + ); + } + else + { + return + ( + fvc::div(rho*B_) + + fvc::laplacian(rho*nuSgs_, U, "laplacian(muEff,U)") + - fvm::laplacian(muEff, U) + ); + } +} + + bool GenSGSStress::read() { if (LESModel::read()) diff --git a/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.H b/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.H index 36d84f9c77..6b805f70c2 100644 --- a/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.H +++ b/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.H @@ -128,11 +128,19 @@ public: //- Return the effective sub-grid turbulence stress tensor // including the laminar stress - virtual tmp devBeff() const; + virtual tmp devReff() const; - //- Returns div(B). - // This is the additional term due to the filtering of the NSE. - virtual tmp divDevBeff(volVectorField& U) const; + //- Return the deviatoric part of the effective sub-grid + // turbulence stress tensor including the laminar stress + virtual tmp divDevReff(volVectorField& U) const; + + //- Return the deviatoric part of the effective sub-grid + // turbulence stress tensor including the laminar stress + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; //- Read LESProperties dictionary virtual bool read(); diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H index deca26e793..3688cb8dec 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H @@ -202,14 +202,6 @@ public: //- Return the sub-grid stress tensor. virtual tmp B() const = 0; - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp devBeff() const = 0; - - //- Returns div(dev(Beff)). - // This is the additional term due to the filtering of the NSE. - virtual tmp divDevBeff(volVectorField& U) const = 0; - // RAS compatibility functions for the turbulenceModel base class @@ -225,18 +217,6 @@ public: return B(); } - //- Return the effective stress tensor including the laminar stress - virtual tmp devReff() const - { - return devBeff(); - } - - //- Return the source term for the momentum equation - virtual tmp divDevReff(volVectorField& U) const - { - return divDevBeff(U); - } - //- Correct Eddy-Viscosity and related properties. // This calls correct(const tmp& gradU) by supplying diff --git a/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.C b/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.C index 97d32bce9d..f53cf08282 100644 --- a/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.C +++ b/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.C @@ -81,7 +81,7 @@ tmp Smagorinsky2::B() const } -tmp Smagorinsky2::divDevBeff +tmp Smagorinsky2::divDevReff ( volVectorField& U ) const @@ -101,6 +101,28 @@ tmp Smagorinsky2::divDevBeff } +tmp Smagorinsky2::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volTensorField gradU(fvc::grad(U)); + + volSymmTensorField aniMuEff + ( + "muEff", + I*(rho*nuEff()) + (cD2_*rho*delta())*symm(gradU) + ); + + return + ( + - fvm::laplacian(aniMuEff, U) + - fvc::div(rho*nuEff()*dev(T(fvc::grad(U)))) + ); +} + + bool Smagorinsky2::read() { if (Smagorinsky::read()) diff --git a/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.H b/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.H index 89c77912cd..bcce2151bf 100644 --- a/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.H +++ b/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.H @@ -109,9 +109,17 @@ public: //- Return B. virtual tmp B() const; - //- Returns div(B). - // This is the additional term due to the filtering of the NSE. - virtual tmp divDevBeff(volVectorField& U) const; + //- Return the deviatoric part of the effective sub-grid + // turbulence stress tensor including the laminar stress + virtual tmp divDevReff(volVectorField& U) const; + + //- Return the deviatoric part of the effective sub-grid + // turbulence stress tensor including the laminar stress + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; //- Read LESProperties dictionary virtual bool read(); diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C index 6a34f90892..dd16e0ee93 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C @@ -338,17 +338,34 @@ tmp SpalartAllmaras::B() const } -tmp SpalartAllmaras::devBeff() const +tmp SpalartAllmaras::devReff() const { return -nuEff()*dev(twoSymm(fvc::grad(U()))); } -tmp SpalartAllmaras::divDevBeff(volVectorField& U) const +tmp SpalartAllmaras::divDevReff(volVectorField& U) const { return ( - - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(T(fvc::grad(U)))) + - fvm::laplacian(nuEff(), U) + - fvc::div(nuEff()*dev(T(fvc::grad(U)))) + ); +} + + +tmp SpalartAllmaras::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H index 7ed507712a..6fd50a2772 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H @@ -172,11 +172,19 @@ public: //- Return the effective sub-grid turbulence stress tensor // including the laminar stress - virtual tmp devBeff() const; + virtual tmp devReff() const; - //- Return the deviatoric part of the divergence of Beff - // i.e. the additional term in the filtered NSE. - virtual tmp divDevBeff(volVectorField& U) const; + //- Return the deviatoric part of the effective sub-grid + // turbulence stress tensor including the laminar stress + virtual tmp divDevReff(volVectorField& U) const; + + //- Return the deviatoric part of the effective sub-grid + // turbulence stress tensor including the laminar stress + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; //- Correct nuTilda and related properties virtual void correct(const tmp& gradU); diff --git a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C index 2ab771ac73..e676731654 100644 --- a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C +++ b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C @@ -425,17 +425,34 @@ tmp kOmegaSSTSAS::B() const } -tmp kOmegaSSTSAS::devBeff() const +tmp kOmegaSSTSAS::devReff() const { return -nuEff()*dev(twoSymm(fvc::grad(U()))); } -tmp kOmegaSSTSAS::divDevBeff(volVectorField& U) const +tmp kOmegaSSTSAS::divDevReff(volVectorField& U) const { return ( - - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(T(fvc::grad(U)))) + - fvm::laplacian(nuEff(), U) + - fvc::div(nuEff()*dev(T(fvc::grad(U)))) + ); +} + + +tmp kOmegaSSTSAS::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H index 2ca98380af..1b319429e5 100644 --- a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H +++ b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H @@ -249,11 +249,19 @@ public: //- Return the effective sub-grid turbulence stress tensor // including the laminar stress - virtual tmp devBeff() const; + virtual tmp devReff() const; - //- Return the deviatoric part of the divergence of Beff - // i.e. the additional term in the filtered NSE. - virtual tmp divDevBeff(volVectorField& U) const; + //- Return the deviatoric part of the effective sub-grid + // turbulence stress tensor including the laminar stress + virtual tmp divDevReff(volVectorField& U) const; + + //- Return the deviatoric part of the effective sub-grid + // turbulence stress tensor including the laminar stress + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; //- Solve the turbulence equations (k-w) and correct the turbulence // viscosity diff --git a/src/turbulenceModels/incompressible/LES/laminar/laminar.C b/src/turbulenceModels/incompressible/LES/laminar/laminar.C index c88ff32beb..8b3ec0474e 100644 --- a/src/turbulenceModels/incompressible/LES/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/LES/laminar/laminar.C @@ -136,17 +136,34 @@ tmp laminar::B() const } -tmp laminar::devBeff() const +tmp laminar::devReff() const { return -nu()*dev(twoSymm(fvc::grad(U()))); } -tmp laminar::divDevBeff(volVectorField& U) const +tmp laminar::divDevReff(volVectorField& U) const { return ( - - fvm::laplacian(nu(), U) - fvc::div(nu()*dev(T(fvc::grad(U)))) + - fvm::laplacian(nu(), U) + - fvc::div(nu()*dev(T(fvc::grad(U)))) + ); +} + + +tmp laminar::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) ); } diff --git a/src/turbulenceModels/incompressible/LES/laminar/laminar.H b/src/turbulenceModels/incompressible/LES/laminar/laminar.H index 14de7a142a..d7fa00c555 100644 --- a/src/turbulenceModels/incompressible/LES/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/LES/laminar/laminar.H @@ -104,13 +104,21 @@ public: //- Return the sub-grid stress tensor B. virtual tmp B() const; + //- Return the effective sub-grid turbulence stress tensor + // including the laminar stress + virtual tmp devReff() const; + //- Return the deviatoric part of the effective sub-grid // turbulence stress tensor including the laminar stress - virtual tmp devBeff() const; + virtual tmp divDevReff(volVectorField& U) const; - //- Return the deviatoric part of the divergence of Beff - // i.e. the additional term in the filtered NSE. - virtual tmp divDevBeff(volVectorField& U) const; + //- Return the deviatoric part of the effective sub-grid + // turbulence stress tensor including the laminar stress + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; //- Read LESProperties dictionary bool read(); diff --git a/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.C b/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.C index 4f2804577f..ed0e66e29c 100644 --- a/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.C +++ b/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.C @@ -91,25 +91,39 @@ tmp mixedSmagorinsky::B() const } -tmp mixedSmagorinsky::devBeff() const +tmp mixedSmagorinsky::devReff() const { return ( - scaleSimilarity::devBeff() - + Smagorinsky::devBeff() + scaleSimilarity::devReff() + + Smagorinsky::devReff() ); } -tmp mixedSmagorinsky::divDevBeff +tmp mixedSmagorinsky::divDevReff ( volVectorField& U ) const { return ( - scaleSimilarity::divDevBeff(U) - + Smagorinsky::divDevBeff(U) + scaleSimilarity::divDevReff(U) + + Smagorinsky::divDevReff(U) + ); +} + + +tmp mixedSmagorinsky::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + return + ( + scaleSimilarity::divDevRhoReff(rho, U) + + Smagorinsky::divDevRhoReff(rho, U) ); } diff --git a/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.H b/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.H index c8557db239..6d685f232f 100644 --- a/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.H +++ b/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.H @@ -129,11 +129,19 @@ public: //- Return the effective sub-grid turbulence stress tensor // including the laminar stress - virtual tmp devBeff() const; + virtual tmp devReff() const; - //- Implementation of div(B). This is necessary to override - // (and include) the div(B) terms from both the parent classes. - virtual tmp divDevBeff(volVectorField& U) const; + //- Return the deviatoric part of the effective sub-grid + // turbulence stress tensor including the laminar stress + virtual tmp divDevReff(volVectorField& U) const; + + //- Return the deviatoric part of the effective sub-grid + // turbulence stress tensor including the laminar stress + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; //- Correct Eddy-Viscosity and related properties virtual void correct(const tmp& gradU); diff --git a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C index b253573be1..c213f8432d 100644 --- a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C +++ b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C @@ -79,15 +79,25 @@ tmp scaleSimilarity::B() const } -tmp scaleSimilarity::devBeff() const +tmp scaleSimilarity::devReff() const { return dev(B()); } -tmp scaleSimilarity::divDevBeff(volVectorField& U) const +tmp scaleSimilarity::divDevReff(volVectorField& U) const { - return fvm::Su(fvc::div(devBeff()), U); + return fvm::Su(fvc::div(devReff()), U); +} + + +tmp scaleSimilarity::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + return fvm::Su(fvc::div(rho*devReff()), U); } diff --git a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H index 0dff31d87e..4707d6b0cb 100644 --- a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H +++ b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H @@ -106,13 +106,21 @@ public: //- Return the sub-grid stress tensor. virtual tmp B() const; + //- Return the effective sub-grid turbulence stress tensor + // including the laminar stress + virtual tmp devReff() const; + //- Return the deviatoric part of the effective sub-grid // turbulence stress tensor including the laminar stress - virtual tmp devBeff() const; + virtual tmp divDevReff(volVectorField& U) const; - //- Return the deviatoric part of the divergence of Beff - // i.e. the additional term in the filtered NSE. - virtual tmp divDevBeff(volVectorField& U) const; + //- Return the deviatoric part of the effective sub-grid + // turbulence stress tensor including the laminar stress + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; //- Correct Eddy-Viscosity and related properties virtual void correct(const tmp&); diff --git a/src/turbulenceModels/incompressible/RAS/LRR/LRR.C b/src/turbulenceModels/incompressible/RAS/LRR/LRR.C index 30afa63ce9..b5a64a3f0c 100644 --- a/src/turbulenceModels/incompressible/RAS/LRR/LRR.C +++ b/src/turbulenceModels/incompressible/RAS/LRR/LRR.C @@ -259,6 +259,44 @@ tmp LRR::divDevReff(volVectorField& U) const } +tmp LRR::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + if (couplingFactor_.value() > 0.0) + { + return + ( + fvc::div + ( + rho*R_ + couplingFactor_*(rho*nut_)*fvc::grad(U), + "div((rho*R))" + ) + + fvc::laplacian + ( + (1.0 - couplingFactor_)*rho*nut_, + U, + "laplacian(muEff,U)" + ) + - fvm::laplacian(muEff, U) + ); + } + else + { + return + ( + fvc::div(rho*R_) + + fvc::laplacian(rho*nut_, U, "laplacian(muEff,U)") + - fvm::laplacian(muEff, U) + ); + } +} + + bool LRR::read() { if (RASModel::read()) diff --git a/src/turbulenceModels/incompressible/RAS/LRR/LRR.H b/src/turbulenceModels/incompressible/RAS/LRR/LRR.H index 2f1a119b9c..dea191cfce 100644 --- a/src/turbulenceModels/incompressible/RAS/LRR/LRR.H +++ b/src/turbulenceModels/incompressible/RAS/LRR/LRR.H @@ -173,6 +173,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C b/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C index 1671c625a0..7dab09b740 100644 --- a/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C +++ b/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C @@ -204,6 +204,22 @@ tmp LamBremhorstKE::divDevReff(volVectorField& U) const } +tmp LamBremhorstKE::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) + ); +} + + bool LamBremhorstKE::read() { if (RASModel::read()) diff --git a/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H b/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H index 449055f4c5..ba61848712 100644 --- a/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H +++ b/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H @@ -147,6 +147,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C index aafa62af19..8fb4310bb3 100644 --- a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -276,7 +276,12 @@ tmp LaunderGibsonRSTM::divDevReff(volVectorField& U) const return ( fvc::div(R_ + couplingFactor_*nut_*fvc::grad(U), "div(R)") - + fvc::laplacian((1.0-couplingFactor_)*nut_, U, "laplacian(nuEff,U)") + + fvc::laplacian + ( + (1.0 - couplingFactor_)*nut_, + U, + "laplacian(nuEff,U)" + ) - fvm::laplacian(nuEff(), U) ); } @@ -292,6 +297,44 @@ tmp LaunderGibsonRSTM::divDevReff(volVectorField& U) const } +tmp LaunderGibsonRSTM::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + if (couplingFactor_.value() > 0.0) + { + return + ( + fvc::div + ( + rho*R_ + couplingFactor_*(rho*nut_)*fvc::grad(U), + "div((rho*R))" + ) + + fvc::laplacian + ( + (1.0 - couplingFactor_)*rho*nut_, + U, + "laplacian(muEff,U)" + ) + - fvm::laplacian(muEff, U) + ); + } + else + { + return + ( + fvc::div(rho*R_) + + fvc::laplacian(rho*nut_, U, "laplacian(muEff,U)") + - fvm::laplacian(muEff, U) + ); + } +} + + bool LaunderGibsonRSTM::read() { if (RASModel::read()) diff --git a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H index 0b6fc91b4b..c6f325d854 100644 --- a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H +++ b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H @@ -184,6 +184,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C b/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C index f0fa6e60c8..e20299c29f 100644 --- a/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C +++ b/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C @@ -210,6 +210,22 @@ tmp LaunderSharmaKE::divDevReff(volVectorField& U) const } +tmp LaunderSharmaKE::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) + ); +} + + bool LaunderSharmaKE::read() { if (RASModel::read()) diff --git a/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H b/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H index 3f2338e18e..625de1dcb8 100644 --- a/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H +++ b/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H @@ -164,6 +164,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.C b/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.C index 03e1e5aa1a..20d8dee951 100644 --- a/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.C +++ b/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.C @@ -298,6 +298,23 @@ tmp LienCubicKE::divDevReff(volVectorField& U) const } +tmp LienCubicKE::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + fvc::div(rho*nonlinearStress_) + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) + ); +} + + bool LienCubicKE::read() { if (RASModel::read()) diff --git a/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.H b/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.H index ebe7c373d8..56696f4253 100644 --- a/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.H +++ b/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.H @@ -159,6 +159,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.C b/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.C index e0bd0f0df9..da81b66edd 100644 --- a/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.C +++ b/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.C @@ -365,6 +365,23 @@ tmp LienCubicKELowRe::divDevReff(volVectorField& U) const } +tmp LienCubicKELowRe::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + fvc::div(rho*nonlinearStress_) + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) + ); +} + + bool LienCubicKELowRe::read() { if (RASModel::read()) diff --git a/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.H b/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.H index 0efd63a454..8794af1fc4 100644 --- a/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.H +++ b/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.H @@ -186,6 +186,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C index 91e288f104..de4ce7be75 100644 --- a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C +++ b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C @@ -243,12 +243,27 @@ tmp LienLeschzinerLowRe::divDevReff(volVectorField& U) const return ( - fvm::laplacian(nuEff(), U) - //- (fvc::grad(U) & fvc::grad(nuEff())) - fvc::div(nuEff()*T(fvc::grad(U))) ); } +tmp LienLeschzinerLowRe::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) + ); +} + + bool LienLeschzinerLowRe::read() { if (RASModel::read()) diff --git a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H index 3fa1c790fe..b99fffdcdf 100644 --- a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H +++ b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H @@ -156,6 +156,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.C b/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.C index 33cc03edac..4dbb7b7b68 100644 --- a/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.C +++ b/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.C @@ -287,6 +287,23 @@ tmp NonlinearKEShih::divDevReff(volVectorField& U) const } +tmp NonlinearKEShih::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + fvc::div(rho*nonlinearStress_) + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) + ); +} + + bool NonlinearKEShih::read() { if (RASModel::read()) diff --git a/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.H b/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.H index c7ad8a3713..f63f0c6565 100644 --- a/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.H +++ b/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.H @@ -162,6 +162,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C b/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C index 794d9f9b07..99c7cc4c77 100644 --- a/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C +++ b/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C @@ -220,6 +220,22 @@ tmp RNGkEpsilon::divDevReff(volVectorField& U) const } +tmp RNGkEpsilon::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) + ); +} + + bool RNGkEpsilon::read() { if (RASModel::read()) diff --git a/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H b/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H index 62b60b9804..077acc70f8 100644 --- a/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H +++ b/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H @@ -161,6 +161,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C index 1804ba5b01..4105cb1876 100644 --- a/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C @@ -337,6 +337,22 @@ tmp SpalartAllmaras::divDevReff(volVectorField& U) const } +tmp SpalartAllmaras::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) + ); +} + + bool SpalartAllmaras::read() { if (RASModel::read()) diff --git a/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H index fbd1248181..2e2626534d 100644 --- a/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H @@ -184,6 +184,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C b/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C index 99b4188cc0..6560ff4db6 100644 --- a/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C +++ b/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C @@ -192,6 +192,22 @@ tmp kEpsilon::divDevReff(volVectorField& U) const } +tmp kEpsilon::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) + ); +} + + bool kEpsilon::read() { if (RASModel::read()) diff --git a/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.H b/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.H index a3baf20513..df9b15d499 100644 --- a/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.H +++ b/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.H @@ -155,6 +155,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C b/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C index 7106c0ea2c..05eb253f5f 100644 --- a/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C +++ b/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C @@ -201,6 +201,22 @@ tmp kOmega::divDevReff(volVectorField& U) const } +tmp kOmega::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) + ); +} + + bool kOmega::read() { if (RASModel::read()) diff --git a/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.H b/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.H index 10729f334e..712aa1a193 100644 --- a/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.H +++ b/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.H @@ -188,6 +188,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C index c025076baa..3481bc5dba 100644 --- a/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C +++ b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C @@ -308,6 +308,22 @@ tmp kOmegaSST::divDevReff(volVectorField& U) const } +tmp kOmegaSST::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) + ); +} + + bool kOmegaSST::read() { if (RASModel::read()) diff --git a/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H index bd4b3742b5..94438d6825 100644 --- a/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H +++ b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H @@ -258,6 +258,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.C b/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.C index abf9b29cde..45f4f69d13 100644 --- a/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.C +++ b/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.C @@ -570,6 +570,22 @@ tmp kkLOmega::divDevReff(volVectorField& U) const } +tmp kkLOmega::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) + ); +} + + bool kkLOmega::read() { if (RASModel::read()) diff --git a/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.H b/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.H index 83db5f82d5..51ddfb7f04 100644 --- a/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.H +++ b/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.H @@ -276,6 +276,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C index 68adca77b3..3c4560c4dc 100644 --- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C @@ -177,6 +177,22 @@ tmp laminar::divDevReff(volVectorField& U) const } +tmp laminar::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) + ); +} + + bool laminar::read() { return RASModel::read(); diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H index 90afadff13..ce51d01c00 100644 --- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H @@ -105,6 +105,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + //- Correct the laminar viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.C b/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.C index 25940abb9e..722bff88b1 100644 --- a/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.C +++ b/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.C @@ -262,6 +262,22 @@ tmp qZeta::divDevReff(volVectorField& U) const } +tmp qZeta::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) + ); +} + + bool qZeta::read() { if (RASModel::read()) diff --git a/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.H b/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.H index ba8dc1b413..c9c272975d 100644 --- a/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.H +++ b/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.H @@ -211,6 +211,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.C b/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.C index 71058caa7d..2595b3f294 100644 --- a/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.C +++ b/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.C @@ -246,6 +246,22 @@ tmp realizableKE::divDevReff(volVectorField& U) const } +tmp realizableKE::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) + ); +} + + bool realizableKE::read() { if (RASModel::read()) diff --git a/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.H b/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.H index 045f333390..147febcb50 100644 --- a/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.H +++ b/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.H @@ -180,6 +180,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C index c102b52cb1..9d1e77d5ab 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C @@ -203,6 +203,22 @@ tmp laminar::divDevReff(volVectorField& U) const } +tmp laminar::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + volScalarField muEff("muEff", rho*nuEff()); + + return + ( + - fvm::laplacian(muEff, U) + - fvc::div(muEff*dev(T(fvc::grad(U)))) + ); +} + + void laminar::correct() { turbulenceModel::correct(); diff --git a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H index 72994e90fb..09cdf4faa7 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H @@ -111,6 +111,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + //- Correct the laminar viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H index 405cfef0bf..c2eacdaf39 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H @@ -204,6 +204,13 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const = 0; + //- Return the source term for the momentum equation + virtual tmp divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const = 0; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct() = 0; diff --git a/tutorials/multiphase/LTSInterFoam/wigleyHull/system/fvSchemes b/tutorials/multiphase/LTSInterFoam/wigleyHull/system/fvSchemes index 22366f437b..7018c5eaa7 100644 --- a/tutorials/multiphase/LTSInterFoam/wigleyHull/system/fvSchemes +++ b/tutorials/multiphase/LTSInterFoam/wigleyHull/system/fvSchemes @@ -32,6 +32,7 @@ divSchemes div(phirb,alpha) Gauss interfaceCompression; div(phi,k) Gauss upwind; div(phi,omega) Gauss upwind; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/MRFInterFoam/mixerVessel2D/system/fvSchemes b/tutorials/multiphase/MRFInterFoam/mixerVessel2D/system/fvSchemes index 41159c5be6..3827ac6548 100644 --- a/tutorials/multiphase/MRFInterFoam/mixerVessel2D/system/fvSchemes +++ b/tutorials/multiphase/MRFInterFoam/mixerVessel2D/system/fvSchemes @@ -30,6 +30,7 @@ divSchemes div(rho*phi,U) Gauss linear; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/MRFMultiphaseInterFoam/mixerVessel2D/system/fvSchemes b/tutorials/multiphase/MRFMultiphaseInterFoam/mixerVessel2D/system/fvSchemes index b4ad45237d..d1ed26cae3 100644 --- a/tutorials/multiphase/MRFMultiphaseInterFoam/mixerVessel2D/system/fvSchemes +++ b/tutorials/multiphase/MRFMultiphaseInterFoam/mixerVessel2D/system/fvSchemes @@ -30,6 +30,7 @@ divSchemes div(rho*phi,U) Gauss limitedLinearV 1; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes b/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes index 0c8bf54bb5..3d506aa1d7 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes +++ b/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes @@ -31,6 +31,7 @@ divSchemes div(phiv,rho) Gauss limitedLinear 0.2; div(phi,U) Gauss filteredLinear2V 0.2 0; div(phiv,k) Gauss filteredLinear2 0.2 0; + div((muEff*dev(T(grad(U))))) Gauss linear; } gradSchemes diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes index 0c8bf54bb5..3d506aa1d7 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes @@ -31,6 +31,7 @@ divSchemes div(phiv,rho) Gauss limitedLinear 0.2; div(phi,U) Gauss filteredLinear2V 0.2 0; div(phiv,k) Gauss filteredLinear2 0.2 0; + div((muEff*dev(T(grad(U))))) Gauss linear; } gradSchemes diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSchemes b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSchemes index 633e4a749e..32379fb2c2 100644 --- a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSchemes +++ b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSchemes @@ -32,6 +32,7 @@ divSchemes div(phi,U) Gauss limitedLinearV 1; div(phiv,omega) Gauss limitedLinear 1; div(phiv,k) Gauss limitedLinear 1; + div((muEff*dev(T(grad(U))))) Gauss linear; } gradSchemes diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSchemes b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSchemes index c35af6cc4f..903d94d30c 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSchemes +++ b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(phid2,p_rgh) Gauss upwind; div(rho*phi,T) Gauss upwind; div(phi,k) Gauss vanLeer; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/fvSchemes b/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/fvSchemes index c35af6cc4f..903d94d30c 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/fvSchemes +++ b/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(phid2,p_rgh) Gauss upwind; div(rho*phi,T) Gauss upwind; div(phi,k) Gauss vanLeer; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSchemes index fa6ef27c43..ba444728e1 100644 --- a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSchemes @@ -30,6 +30,7 @@ divSchemes div(rho*phi,U) Gauss upwind; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/fvSchemes index 5ce6b8ee17..852f5e0c74 100644 --- a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/fvSchemes @@ -32,6 +32,7 @@ divSchemes div(phirb,alpha) Gauss interfaceCompression; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/fvSchemes index a0a60315bd..b2c0af769d 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/fvSchemes @@ -30,6 +30,7 @@ divSchemes div(rho*phi,U) Gauss vanLeerV; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss vanLeer; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/fvSchemes index a0a60315bd..b2c0af769d 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/fvSchemes @@ -30,6 +30,7 @@ divSchemes div(rho*phi,U) Gauss vanLeerV; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss vanLeer; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/fvSchemes index a0a60315bd..b2c0af769d 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/fvSchemes @@ -30,6 +30,7 @@ divSchemes div(rho*phi,U) Gauss vanLeerV; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss vanLeer; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/system/fvSchemes index a0a60315bd..b2c0af769d 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/system/fvSchemes @@ -30,6 +30,7 @@ divSchemes div(rho*phi,U) Gauss vanLeerV; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss vanLeer; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/fvSchemes index a0a60315bd..b2c0af769d 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/fvSchemes @@ -30,6 +30,7 @@ divSchemes div(rho*phi,U) Gauss vanLeerV; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss vanLeer; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/system/fvSchemes index a0a60315bd..b2c0af769d 100644 --- a/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/system/fvSchemes @@ -30,6 +30,7 @@ divSchemes div(rho*phi,U) Gauss vanLeerV; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss vanLeer; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interFoam/laminar/capillaryRise/system/fvSchemes b/tutorials/multiphase/interFoam/laminar/capillaryRise/system/fvSchemes index c2c563142c..2a580ed9eb 100644 --- a/tutorials/multiphase/interFoam/laminar/capillaryRise/system/fvSchemes +++ b/tutorials/multiphase/interFoam/laminar/capillaryRise/system/fvSchemes @@ -30,6 +30,7 @@ divSchemes div(rho*phi,U) Gauss upwind; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSchemes b/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSchemes index 7bb78c013c..986a20eebe 100644 --- a/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSchemes +++ b/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSchemes @@ -30,6 +30,7 @@ divSchemes div(rho*phi,U) Gauss limitedLinearV 1; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/fvSchemes b/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/fvSchemes index be6806ad73..26e06a656b 100644 --- a/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/fvSchemes +++ b/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(phi,B) Gauss limitedLinear 1; div(B) Gauss linear; div(phi,nuTilda) Gauss limitedLinear 1; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interFoam/ras/damBreak/system/fvSchemes b/tutorials/multiphase/interFoam/ras/damBreak/system/fvSchemes index 28b3d7d20a..8ed8e03cc0 100644 --- a/tutorials/multiphase/interFoam/ras/damBreak/system/fvSchemes +++ b/tutorials/multiphase/interFoam/ras/damBreak/system/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phi,R) Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes index 28b3d7d20a..8ed8e03cc0 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phi,R) Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/fvSchemes b/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/fvSchemes index 22366f437b..7018c5eaa7 100644 --- a/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/fvSchemes +++ b/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/fvSchemes @@ -32,6 +32,7 @@ divSchemes div(phirb,alpha) Gauss interfaceCompression; div(phi,k) Gauss upwind; div(phi,omega) Gauss upwind; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSchemes b/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSchemes index 43847dd841..bb536c017c 100644 --- a/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSchemes +++ b/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSchemes @@ -33,6 +33,7 @@ divSchemes div(phi,k) Gauss upwind; div(phi,omega) $div(phi,k); + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interFoam/ras/weirOverflow/system/fvSchemes b/tutorials/multiphase/interFoam/ras/weirOverflow/system/fvSchemes index 28b3d7d20a..8ed8e03cc0 100644 --- a/tutorials/multiphase/interFoam/ras/weirOverflow/system/fvSchemes +++ b/tutorials/multiphase/interFoam/ras/weirOverflow/system/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phi,R) Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interMixingFoam/laminar/damBreak/system/fvSchemes b/tutorials/multiphase/interMixingFoam/laminar/damBreak/system/fvSchemes index ed937573ff..c80ccb314e 100644 --- a/tutorials/multiphase/interMixingFoam/laminar/damBreak/system/fvSchemes +++ b/tutorials/multiphase/interMixingFoam/laminar/damBreak/system/fvSchemes @@ -30,6 +30,7 @@ divSchemes div(rho*phi,U) Gauss limitedLinearV 1; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSchemes b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSchemes index c1b7f71206..44313d502d 100644 --- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSchemes +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSchemes @@ -30,9 +30,9 @@ divSchemes div(rhoPhi,U) Gauss linearUpwind grad(U); div(phi,omega) Gauss linearUpwind grad(omega); div(phi,k) Gauss linearUpwind grad(k); - div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; + div((muEff*dev(T(grad(U))))) Gauss linear; } gradSchemes diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/system/fvSchemes b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/system/fvSchemes index 6e3d6f1b84..e1436932da 100644 --- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/system/fvSchemes +++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/system/fvSchemes @@ -32,6 +32,7 @@ divSchemes div(rho*phi,U) Gauss upwind; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/system/fvSchemes b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/system/fvSchemes index 6e3d6f1b84..e1436932da 100644 --- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/system/fvSchemes +++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/system/fvSchemes @@ -32,6 +32,7 @@ divSchemes div(rho*phi,U) Gauss upwind; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSchemes b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSchemes index 4bb0230588..35930b9203 100644 --- a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSchemes +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSchemes @@ -33,7 +33,7 @@ divSchemes div(rho*phi,U) Gauss linear; div(phi,alpha1) Gauss vanLeer; div(phi,k) Gauss limitedLinear 1; - div(((rho*nuEff)*dev(grad(U).T()))) Gauss linear; + div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes From 4025894d2c2479af105f9e5afd1cba36e5f9d77e Mon Sep 17 00:00:00 2001 From: Henry Date: Fri, 27 Jul 2012 14:56:15 +0100 Subject: [PATCH 04/53] Updated headers --- src/postProcessing/functionObjects/forces/forces/forces.C | 2 +- .../incompressible/LES/GenEddyVisc/GenEddyVisc.C | 2 +- .../incompressible/LES/GenEddyVisc/GenEddyVisc.H | 2 +- .../incompressible/LES/GenSGSStress/GenSGSStress.C | 2 +- .../incompressible/LES/GenSGSStress/GenSGSStress.H | 2 +- .../incompressible/LES/Smagorinsky2/Smagorinsky2.C | 2 +- .../incompressible/LES/Smagorinsky2/Smagorinsky2.H | 2 +- .../incompressible/LES/SpalartAllmaras/SpalartAllmaras.C | 2 +- .../incompressible/LES/SpalartAllmaras/SpalartAllmaras.H | 2 +- .../incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C | 2 +- .../incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H | 2 +- src/turbulenceModels/incompressible/LES/laminar/laminar.C | 2 +- src/turbulenceModels/incompressible/LES/laminar/laminar.H | 2 +- .../incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.C | 2 +- .../incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.H | 2 +- .../incompressible/LES/scaleSimilarity/scaleSimilarity.C | 2 +- .../incompressible/LES/scaleSimilarity/scaleSimilarity.H | 2 +- src/turbulenceModels/incompressible/RAS/LRR/LRR.C | 2 +- src/turbulenceModels/incompressible/RAS/LRR/LRR.H | 2 +- .../incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C | 2 +- .../incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H | 2 +- .../incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C | 2 +- .../incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H | 2 +- .../incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C | 2 +- .../incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H | 2 +- .../RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C | 2 +- .../RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H | 2 +- .../incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C | 2 +- .../incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H | 2 +- .../incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H | 2 +- src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C | 2 +- src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.H | 2 +- src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C | 2 +- src/turbulenceModels/incompressible/RAS/kOmega/kOmega.H | 2 +- src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C | 2 +- src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H | 2 +- src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.H | 2 +- src/turbulenceModels/incompressible/RAS/laminar/laminar.C | 2 +- src/turbulenceModels/incompressible/RAS/laminar/laminar.H | 2 +- src/turbulenceModels/incompressible/RAS/qZeta/qZeta.C | 2 +- src/turbulenceModels/incompressible/RAS/qZeta/qZeta.H | 2 +- .../incompressible/RAS/realizableKE/realizableKE.C | 2 +- .../incompressible/RAS/realizableKE/realizableKE.H | 2 +- .../incompressible/turbulenceModel/laminar/laminar.C | 2 +- .../incompressible/turbulenceModel/laminar/laminar.H | 2 +- 45 files changed, 45 insertions(+), 45 deletions(-) diff --git a/src/postProcessing/functionObjects/forces/forces/forces.C b/src/postProcessing/functionObjects/forces/forces/forces.C index ee8b8bb1b3..ff9ba3a4e3 100644 --- a/src/postProcessing/functionObjects/forces/forces/forces.C +++ b/src/postProcessing/functionObjects/forces/forces/forces.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.C b/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.C index e4bde9ce7b..69795c56d7 100644 --- a/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.C +++ b/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.H b/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.H index 105f62c664..62c216ee3e 100644 --- a/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.H +++ b/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.C b/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.C index cbc803da9d..1618fb7f3b 100644 --- a/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.C +++ b/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.H b/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.H index 6b805f70c2..0456d69a71 100644 --- a/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.H +++ b/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.C b/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.C index f53cf08282..84fc1fc7be 100644 --- a/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.C +++ b/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.H b/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.H index bcce2151bf..c9133e4e87 100644 --- a/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.H +++ b/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C index dd16e0ee93..da8ab55e07 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H index 6fd50a2772..68e5ef4c73 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C index e676731654..12a6f1b3d1 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) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H index 1b319429e5..e61156f9c9 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) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/laminar/laminar.C b/src/turbulenceModels/incompressible/LES/laminar/laminar.C index 8b3ec0474e..5a78c213ee 100644 --- a/src/turbulenceModels/incompressible/LES/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/LES/laminar/laminar.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/laminar/laminar.H b/src/turbulenceModels/incompressible/LES/laminar/laminar.H index d7fa00c555..777a9228a7 100644 --- a/src/turbulenceModels/incompressible/LES/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/LES/laminar/laminar.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.C b/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.C index ed0e66e29c..b17f4ea572 100644 --- a/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.C +++ b/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.H b/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.H index 6d685f232f..72dca5d354 100644 --- a/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.H +++ b/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C index c213f8432d..61322de356 100644 --- a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C +++ b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H index 4707d6b0cb..c757a8165e 100644 --- a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H +++ b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/LRR/LRR.C b/src/turbulenceModels/incompressible/RAS/LRR/LRR.C index b5a64a3f0c..c2c7e5efbe 100644 --- a/src/turbulenceModels/incompressible/RAS/LRR/LRR.C +++ b/src/turbulenceModels/incompressible/RAS/LRR/LRR.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/LRR/LRR.H b/src/turbulenceModels/incompressible/RAS/LRR/LRR.H index dea191cfce..e787356008 100644 --- a/src/turbulenceModels/incompressible/RAS/LRR/LRR.H +++ b/src/turbulenceModels/incompressible/RAS/LRR/LRR.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C b/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C index 7dab09b740..10de46f587 100644 --- a/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C +++ b/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H b/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H index ba61848712..3ae7cfda29 100644 --- a/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H +++ b/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C index 8fb4310bb3..49326b1ff5 100644 --- a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H index c6f325d854..528a7dd5d6 100644 --- a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H +++ b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C b/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C index e20299c29f..c514a378e2 100644 --- a/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C +++ b/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H b/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H index 625de1dcb8..5e4ae36f5a 100644 --- a/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H +++ b/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C index de4ce7be75..15296cdf5b 100644 --- a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C +++ b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H index b99fffdcdf..5aebe9ea50 100644 --- a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H +++ b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C b/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C index 99c7cc4c77..460a6609ac 100644 --- a/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C +++ b/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H b/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H index 077acc70f8..2d06ee9ec1 100644 --- a/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H +++ b/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H index 2e2626534d..4190fc7d80 100644 --- a/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C b/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C index 6560ff4db6..029b9f9db7 100644 --- a/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C +++ b/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.H b/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.H index df9b15d499..89c94fe42f 100644 --- a/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.H +++ b/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C b/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C index 05eb253f5f..51e1fbd491 100644 --- a/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C +++ b/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.H b/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.H index 712aa1a193..1e63fd2eca 100644 --- a/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.H +++ b/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C index 3481bc5dba..e6c49db1c8 100644 --- a/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C +++ b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H index 94438d6825..60f2775b1b 100644 --- a/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H +++ b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.H b/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.H index 51ddfb7f04..dbd5ce0832 100644 --- a/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.H +++ b/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C index 3c4560c4dc..f0597b58da 100644 --- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H index ce51d01c00..ccebe774ed 100644 --- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.C b/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.C index 722bff88b1..1fd761b1d7 100644 --- a/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.C +++ b/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.H b/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.H index c9c272975d..9347998a2e 100644 --- a/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.H +++ b/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.C b/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.C index 2595b3f294..495b8930df 100644 --- a/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.C +++ b/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.H b/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.H index 147febcb50..ed2bc4841e 100644 --- a/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.H +++ b/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C index 9d1e77d5ab..a633c7a70e 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H index 09cdf4faa7..5b79ecd485 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License From 62206b32d277c6b2beb6edcc7d23c247f48f4e94 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 27 Jul 2012 16:38:38 +0100 Subject: [PATCH 05/53] BUG: volPointInterpolation: collocated point handling --- .../polyMesh/globalMeshData/globalMeshData.H | 7 ++- .../polyMesh/globalMeshData/globalPoints.C | 45 +++++++++++-------- .../polyMesh/globalMeshData/globalPoints.H | 8 +++- .../volPointInterpolate.C | 21 ++++----- .../volPointInterpolation.C | 8 +--- 5 files changed, 50 insertions(+), 39 deletions(-) diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H index 3a3c234821..1f9c51ac9f 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H @@ -323,8 +323,6 @@ class globalMeshData // its own master. Maybe store as well? void calcGlobalCoPointSlaves() const; - const labelListList& globalCoPointSlaves() const; - const mapDistribute& globalCoPointSlavesMap() const; //- Disallow default bitwise copy construct @@ -547,6 +545,11 @@ public: //- Is my edge same orientation as master edge const PackedBoolList& globalEdgeOrientation() const; + // Collocated point to collocated point + + const labelListList& globalCoPointSlaves() const; + const mapDistribute& globalCoPointSlavesMap() const; + // Coupled point to boundary faces. These are uncoupled boundary // faces only but include empty patches. diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C index 7ecd1b84a1..b4333fc3a7 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -339,6 +339,31 @@ bool Foam::globalPoints::storeInitialInfo } +void Foam::globalPoints::printProcPoint +( + const labelList& patchToMeshPoint, + const labelPair& pointInfo +) const +{ + label procI = globalIndexAndTransform::processor(pointInfo); + label index = globalIndexAndTransform::index(pointInfo); + label trafoI = globalIndexAndTransform::transformIndex(pointInfo); + + Pout<< " proc:" << procI; + Pout<< " localpoint:"; + Pout<< index; + Pout<< " through transform:" + << trafoI << " bits:" + << globalTransforms_.decodeTransformIndex(trafoI); + + if (procI == Pstream::myProcNo()) + { + label meshPointI = localToMeshPoint(patchToMeshPoint, index); + Pout<< " at:" << mesh_.points()[meshPointI]; + } +} + + void Foam::globalPoints::printProcPoints ( const labelList& patchToMeshPoint, @@ -347,23 +372,7 @@ void Foam::globalPoints::printProcPoints { forAll(pointInfo, i) { - label procI = globalIndexAndTransform::processor(pointInfo[i]); - label index = globalIndexAndTransform::index(pointInfo[i]); - label trafoI = globalIndexAndTransform::transformIndex(pointInfo[i]); - - Pout<< " proc:" << procI; - Pout<< " localpoint:"; - Pout<< index; - Pout<< " through transform:" - << trafoI << " bits:" - << globalTransforms_.decodeTransformIndex(trafoI); - - if (procI == Pstream::myProcNo()) - { - label meshPointI = localToMeshPoint(patchToMeshPoint, index); - Pout<< " at:" << mesh_.points()[meshPointI]; - } - + printProcPoint(patchToMeshPoint, pointInfo[i]); Pout<< endl; } } diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.H b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.H index daef012fe7..de7a6b88d0 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.H +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -206,6 +206,12 @@ class globalPoints ); //- Debug printing + void printProcPoint + ( + const labelList& patchToMeshPoint, + const labelPair& pointInfo + ) const; + void printProcPoints ( const labelList& patchToMeshPoint, diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C index 1e0aa90e41..0f2b751bbd 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,8 +51,8 @@ void volPointInterpolation::syncUntransformedData const indirectPrimitivePatch& cpp = gmd.coupledPatch(); const labelList& meshPoints = cpp.meshPoints(); - const mapDistribute& slavesMap = gmd.globalPointSlavesMap(); - const labelListList& slaves = gmd.globalPointSlaves(); + const mapDistribute& slavesMap = gmd.globalCoPointSlavesMap(); + const labelListList& slaves = gmd.globalCoPointSlaves(); List elems(slavesMap.constructSize()); forAll(meshPoints, i) @@ -105,8 +105,8 @@ void volPointInterpolation::pushUntransformedData const indirectPrimitivePatch& cpp = gmd.coupledPatch(); const labelList& meshPoints = cpp.meshPoints(); - const mapDistribute& slavesMap = gmd.globalPointSlavesMap(); - const labelListList& slaves = gmd.globalPointSlaves(); + const mapDistribute& slavesMap = gmd.globalCoPointSlavesMap(); + const labelListList& slaves = gmd.globalCoPointSlaves(); List elems(slavesMap.constructSize()); forAll(meshPoints, i) @@ -155,14 +155,14 @@ void volPointInterpolation::addSeparated refCast > (pf.boundaryField()[patchI]).initSwapAddSeparated ( - Pstream::blocking, //Pstream::nonBlocking, + Pstream::nonBlocking, pf.internalField() ); } } // Block for any outstanding requests - //Pstream::waitRequests(); + Pstream::waitRequests(); forAll(pf.boundaryField(), patchI) { @@ -171,7 +171,7 @@ void volPointInterpolation::addSeparated refCast > (pf.boundaryField()[patchI]).swapAddSeparated ( - Pstream::blocking, //Pstream::nonBlocking, + Pstream::nonBlocking, pf.internalField() ); } @@ -306,7 +306,6 @@ void volPointInterpolation::interpolateBoundaryField } // Sum collocated contributions - //mesh().globalData().syncPointData(pfi, plusEqOp()); syncUntransformedData(pfi, plusEqOp()); // And add separated contributions @@ -314,9 +313,7 @@ void volPointInterpolation::interpolateBoundaryField // Push master data to slaves. It is possible (not sure how often) for // a coupled point to have its master on a different patch so - // to make sure just push master data to slaves. Reuse the syncPointData - // structure. - //mesh().globalData().syncPointData(pfi, nopEqOp()); + // to make sure just push master data to slaves. pushUntransformedData(pfi); diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C index cb47e0a101..87305f2fa8 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -113,10 +113,8 @@ void volPointInterpolation::calcBoundaryAddressing() { boolList oldData(isPatchPoint_); - //mesh().globalData().syncPointData(isPatchPoint_, orEqOp()); syncUntransformedData(isPatchPoint_, orEqOp()); - forAll(isPatchPoint_, pointI) { if (isPatchPoint_[pointI] != oldData[pointI]) @@ -272,7 +270,7 @@ void volPointInterpolation::makeWeights() makeInternalWeights(sumWeights); - // Create boundary weights; add to sumWeights + // Create boundary weights; override sumWeights makeBoundaryWeights(sumWeights); @@ -292,7 +290,6 @@ void volPointInterpolation::makeWeights() // Sum collocated contributions - //mesh().globalData().syncPointData(sumWeights, plusEqOp()); syncUntransformedData(sumWeights, plusEqOp()); // And add separated contributions @@ -302,7 +299,6 @@ void volPointInterpolation::makeWeights() // a coupled point to have its master on a different patch so // to make sure just push master data to slaves. Reuse the syncPointData // structure. - //mesh().globalData().syncPointData(sumWeights, nopEqOp()); pushUntransformedData(sumWeights); From e3b5df72243468385cb8200923b9772af5c2d5f8 Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 30 Jul 2012 12:29:53 +0100 Subject: [PATCH 06/53] Added support for interpolating from volField::GeometricBoundaryField to surfaceField::GeometricBoundaryField --- .../basic/calculated/calculatedFvPatchField.C | 20 +++++++--- .../fvPatchFields/fvPatchField/fvPatchField.H | 7 ++++ .../calculated/calculatedFvsPatchField.C | 24 ++++++++---- .../fvsPatchField/fvsPatchField.H | 7 ++++ .../surfaceInterpolation/surfaceInterpolate.C | 37 +++++++++++++++++++ .../surfaceInterpolation/surfaceInterpolate.H | 16 +++++++- 6 files changed, 98 insertions(+), 13 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C index 1f179134fe..407e843f94 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C @@ -98,20 +98,19 @@ calculatedFvPatchField::calculatedFvPatchField template -template tmp > fvPatchField::NewCalculatedType ( - const fvPatchField& pf + const fvPatch& p ) { typename patchConstructorTable::iterator patchTypeCstrIter = - patchConstructorTablePtr_->find(pf.patch().type()); + patchConstructorTablePtr_->find(p.type()); if (patchTypeCstrIter != patchConstructorTablePtr_->end()) { return patchTypeCstrIter() ( - pf.patch(), + p, DimensionedField::null() ); } @@ -121,7 +120,7 @@ tmp > fvPatchField::NewCalculatedType ( new calculatedFvPatchField ( - pf.patch(), + p, DimensionedField::null() ) ); @@ -129,6 +128,17 @@ tmp > fvPatchField::NewCalculatedType } +template +template +tmp > fvPatchField::NewCalculatedType +( + const fvPatchField& pf +) +{ + return NewCalculatedType(pf.patch()); +} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H index 4dc1041ffc..ecace2a051 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H @@ -257,6 +257,13 @@ public: const dictionary& ); + //- Return a pointer to a new calculatedFvPatchField created on + // freestore without setting patchField values + static tmp > NewCalculatedType + ( + const fvPatch& + ); + //- Return a pointer to a new calculatedFvPatchField created on // freestore without setting patchField values template diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C index a22514c857..8fe86d7c51 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C @@ -97,21 +97,20 @@ calculatedFvsPatchField::calculatedFvsPatchField template -template tmp > fvsPatchField::NewCalculatedType ( - const fvsPatchField& pf + const fvPatch& p ) { typename patchConstructorTable::iterator patchTypeCstrIter = - patchConstructorTablePtr_->find(pf.patch().type()); + patchConstructorTablePtr_->find(p.type()); if (patchTypeCstrIter != patchConstructorTablePtr_->end()) { return patchTypeCstrIter() ( - pf.patch(), - Field::null() + p, + DimensionedField::null() ); } else @@ -120,14 +119,25 @@ tmp > fvsPatchField::NewCalculatedType ( new calculatedFvsPatchField ( - pf.patch(), - Field::null() + p, + DimensionedField::null() ) ); } } +template +template +tmp > fvsPatchField::NewCalculatedType +( + const fvsPatchField& pf +) +{ + return NewCalculatedType(pf.patch()); +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H index 7da763f09f..0ef4e29d39 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H @@ -247,6 +247,13 @@ public: const dictionary& ); + //- Return a pointer to a new calculatedFvsPatchField created on + // freestore without setting patchField values + static tmp > NewCalculatedType + ( + const fvPatch& + ); + //- Return a pointer to a new calculatedFvsPatchField created on // freestore without setting patchField values template diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.C index 84f04e3a94..9ea1dbf94f 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.C @@ -302,6 +302,43 @@ interpolate } +template +tmp > interpolate +( + const FieldField& fvpff +) +{ + FieldField* fvspffPtr + ( + new FieldField(fvpff.size()) + ); + + forAll(*fvspffPtr, patchi) + { + fvspffPtr->set + ( + patchi, + fvsPatchField::NewCalculatedType(fvpff[patchi].patch()).ptr() + ); + (*fvspffPtr)[patchi] = fvpff[patchi]; + } + + return tmp >(fvspffPtr); +} + + +template +tmp > interpolate +( + const tmp >& tfvpff +) +{ + tmp > tfvspff = interpolate(tfvpff()); + tfvpff.clear(); + return tfvspff; +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace fvc diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H index 00c0da4f65..2e9db64f94 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H @@ -163,12 +163,26 @@ namespace fvc const tmp >& tvf ); - //- Interpolate tmp field onto faces using 'interpolate(\)' + //- Interpolate field onto faces using 'interpolate(\)' template static tmp > interpolate ( const GeometricField& tvf ); + + //- Interpolate boundary field onto faces (simply a type conversion) + template + static tmp > interpolate + ( + const FieldField& fvpff + ); + + //- Interpolate boundary field onto faces (simply a type conversion) + template + static tmp > interpolate + ( + const tmp >& tfvpff + ); } From 1b337c84bf2864c725e18da6bce4804000648b29 Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 30 Jul 2012 12:30:09 +0100 Subject: [PATCH 07/53] Updated headers --- .../fvPatchFields/basic/calculated/calculatedFvPatchField.C | 2 +- .../fvsPatchFields/basic/calculated/calculatedFvsPatchField.C | 2 +- .../fields/fvsPatchFields/fvsPatchField/fvsPatchField.H | 2 +- .../surfaceInterpolation/surfaceInterpolate.C | 2 +- .../surfaceInterpolation/surfaceInterpolate.H | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C index 407e843f94..79b8c3750e 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C index 8fe86d7c51..efe80d2f73 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H index 0ef4e29d39..88fb9a7d58 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.C index 9ea1dbf94f..f4f4f54f65 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H index 2e9db64f94..f6f0cf04b6 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License From aac8468aa82c13a9273e96584ad60f4e81e4052f Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 30 Jul 2012 12:31:51 +0100 Subject: [PATCH 08/53] interDyMFoam: Update the phi boundary field for consistency for the p_rgh BC --- applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H | 2 ++ 1 file changed, 2 insertions(+) diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H b/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H index d942f2c501..42721c0018 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H @@ -4,6 +4,8 @@ volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); + phi.boundaryField() = + fvc::interpolate(U.boundaryField()) & mesh.Sf().boundaryField(); surfaceScalarField phiHbyA ( From 5f886ce3d6bf0f918a305a9415ee1a5d31c12aae Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 30 Jul 2012 12:36:22 +0100 Subject: [PATCH 09/53] fireFoam: Update the phi boundary field for consistency --- applications/solvers/combustion/fireFoam/pEqn.H | 3 +++ 1 file changed, 3 insertions(+) diff --git a/applications/solvers/combustion/fireFoam/pEqn.H b/applications/solvers/combustion/fireFoam/pEqn.H index 3f4f485cf6..eb263b8a50 100644 --- a/applications/solvers/combustion/fireFoam/pEqn.H +++ b/applications/solvers/combustion/fireFoam/pEqn.H @@ -4,6 +4,9 @@ volScalarField rAU(1.0/UEqn.A()); surfaceScalarField rhorAUf("Dp", fvc::interpolate(rho*rAU)); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn.H(); +phi.boundaryField() = + fvc::interpolate(rho.boundaryField()) + *(fvc::interpolate(U.boundaryField()) & mesh.Sf().boundaryField()); surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf()); From d405852e22a7c890d30d1042271b3c3eb57acb20 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 30 Jul 2012 15:55:31 +0100 Subject: [PATCH 10/53] STYLE: magSqr: extraneous foam --- src/postProcessing/foamCalcFunctions/field/magSqr/magSqr.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/postProcessing/foamCalcFunctions/field/magSqr/magSqr.C b/src/postProcessing/foamCalcFunctions/field/magSqr/magSqr.C index 084f87de4b..a608ade6bf 100644 --- a/src/postProcessing/foamCalcFunctions/field/magSqr/magSqr.C +++ b/src/postProcessing/foamCalcFunctions/field/magSqr/magSqr.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,7 @@ Foam::calcTypes::magSqr::~magSqr() void Foam::calcTypes::magSqr::init() { - Foam::argList::validArgs.append("magSqr"); + argList::validArgs.append("magSqr"); argList::validArgs.append("fieldName"); } From 1945632da9cbe295cab7b99843e2781bb82cd1a0 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 30 Jul 2012 15:57:15 +0100 Subject: [PATCH 11/53] ENH: dictionary: allow transfer of empty dictionary --- .../db/IOobjects/IOdictionary/IOdictionaryIO.C | 6 +++--- src/OpenFOAM/db/dictionary/dictionaryIO.C | 8 +++++++- src/Pstream/mpi/UIPread.C | 15 +++------------ 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C index 8585392e27..881250f3eb 100644 --- a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C +++ b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -102,7 +102,7 @@ void Foam::IOdictionary::readFile(const bool masterOnly) myComm.above(), 0, Pstream::msgType(), - IOstream::ASCII + IOstream::BINARY ); IOdictionary::readData(fromAbove); } @@ -121,7 +121,7 @@ void Foam::IOdictionary::readFile(const bool masterOnly) myComm.below()[belowI], 0, Pstream::msgType(), - IOstream::ASCII + IOstream::BINARY ); IOdictionary::writeData(toBelow); } diff --git a/src/OpenFOAM/db/dictionary/dictionaryIO.C b/src/OpenFOAM/db/dictionary/dictionaryIO.C index 03ce2b76a7..aa1321d914 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryIO.C +++ b/src/OpenFOAM/db/dictionary/dictionaryIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -80,6 +80,12 @@ Foam::autoPtr Foam::dictionary::New(Istream& is) bool Foam::dictionary::read(Istream& is, const bool keepHeader) { + // Check for empty dictionary + if (is.eof()) + { + return true; + } + if (!is.good()) { FatalIOErrorIn("dictionary::read(Istream&, bool)", is) diff --git a/src/Pstream/mpi/UIPread.C b/src/Pstream/mpi/UIPread.C index bcc6f4c412..19d6b16112 100644 --- a/src/Pstream/mpi/UIPread.C +++ b/src/Pstream/mpi/UIPread.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -107,12 +107,7 @@ Foam::UIPstream::UIPstream if (!messageSize_) { - FatalErrorIn - ( - "UIPstream::UIPstream(const commsTypes, const int, " - "DynamicList&, streamFormat, versionNumber)" - ) << "read failed" - << Foam::abort(FatalError); + setEof(); } } } @@ -199,11 +194,7 @@ Foam::UIPstream::UIPstream(const int fromProcNo, PstreamBuffers& buffers) if (!messageSize_) { - FatalErrorIn - ( - "UIPstream::UIPstream(const int, PstreamBuffers&)" - ) << "read failed" - << Foam::abort(FatalError); + setEof(); } } } From 79fcc1655f2ddb90f0e385973eb9642b676905b2 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 31 Jul 2012 09:10:10 +0100 Subject: [PATCH 12/53] ENH: regionSizeDistribution: restructuring. Output sum, average, deviation --- .../regionSizeDistribution.C | 788 ++++++++++++------ .../regionSizeDistribution.H | 145 +++- .../regionSizeDistributionTemplates.C | 81 ++ 3 files changed, 747 insertions(+), 267 deletions(-) create mode 100644 src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistributionTemplates.C diff --git a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C index b3aaac0dbf..8dbf0ec5a8 100644 --- a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C +++ b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C @@ -27,8 +27,8 @@ License #include "volFields.H" #include "regionSplit.H" #include "fvcVolumeIntegrate.H" -#include "Histogram.H" #include "mathematicalConstants.H" +#include "stringListOps.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -56,6 +56,281 @@ namespace Foam } +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::regionSizeDistribution::writeGraph +( + const coordSet& coords, + const word& valueName, + const scalarField& values +) const +{ + const fvMesh& mesh = refCast(obr_); + + const wordList valNames(1, valueName); + + fileName outputPath; + if (Pstream::parRun()) + { + outputPath = mesh.time().path()/".."/name_; + } + else + { + outputPath = mesh.time().path()/name_; + } + + if (mesh.name() != fvMesh::defaultRegion) + { + outputPath = outputPath/mesh.name(); + } + + mkDir(outputPath/mesh.time().timeName()); + OFstream str + ( + outputPath + / mesh.time().timeName() + / formatterPtr_().getFileName(coords, valNames) + ); + Info<< "Writing distribution of " << valueName << " to " << str.name() + << endl; + + List valPtrs(1); + valPtrs[0] = &values; + formatterPtr_().write(coords, valNames, valPtrs, str); +} + + +void Foam::regionSizeDistribution::writeAlphaFields +( + const regionSplit& regions, + const Map