diff --git a/applications/solvers/combustion/PDRFoam/Make/options b/applications/solvers/combustion/PDRFoam/Make/options index b6c6398fd..6b89ae638 100644 --- a/applications/solvers/combustion/PDRFoam/Make/options +++ b/applications/solvers/combustion/PDRFoam/Make/options @@ -8,8 +8,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ @@ -20,8 +20,8 @@ EXE_INC = \ EXE_LIBS = \ -lengine \ -lmeshTools \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lfluidThermophysicalModels \ -lreactionThermophysicalModels \ -lspecie \ diff --git a/applications/solvers/combustion/PDRFoam/PDRFoam.C b/applications/solvers/combustion/PDRFoam/PDRFoam.C index ad6e2d029..1d56ab28f 100644 --- a/applications/solvers/combustion/PDRFoam/PDRFoam.C +++ b/applications/solvers/combustion/PDRFoam/PDRFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -69,7 +69,7 @@ Description #include "fvCFD.H" #include "psiuReactionThermo.H" -#include "RASModel.H" +#include "turbulentFluidThermoModel.H" #include "laminarFlameSpeed.H" #include "XiModel.H" #include "PDRDragModel.H" diff --git a/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C b/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C index 88d6305e1..190432570 100644 --- a/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C +++ b/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,7 +58,7 @@ Description #include "fvCFD.H" #include "dynamicFvMesh.H" #include "psiuReactionThermo.H" -#include "RASModel.H" +#include "turbulentFluidThermoModel.H" #include "laminarFlameSpeed.H" #include "XiModel.H" #include "PDRDragModel.H" diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C index 426e65981..de5b26c13 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "basicXiSubXiEq.H" +#include "zeroGradientFvPatchFields.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C index 05aeb059f..f5a76fa5c 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "basicXiSubG.H" +#include "zeroGradientFvPatchFields.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H index feb9ae8d4..4cf942280 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,7 +38,7 @@ SourceFiles #include "IOdictionary.H" #include "psiuReactionThermo.H" -#include "RASModel.H" +#include "turbulentFluidThermoModel.H" #include "multivariateSurfaceInterpolationScheme.H" #include "runTimeSelectionTables.H" diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C index d8e3a9ed9..be2cc6dab 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "basic.H" +#include "zeroGradientFvPatchFields.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C index 12cfba078..73dbee566 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,8 +27,6 @@ License #include "PDRDragModel.H" #include "addToRunTimeSelectionTable.H" -#include "backwardsCompatibilityWallFunctions.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -47,15 +45,27 @@ addToRunTimeSelectionTable(RASModel, PDRkEpsilon, dictionary); PDRkEpsilon::PDRkEpsilon ( + const geometricOneField& alpha, const volScalarField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const fluidThermo& thermophysicalModel, const word& turbulenceModelName, const word& modelName ) : - kEpsilon(rho, U, phi, thermophysicalModel, turbulenceModelName, modelName), + Foam::RASModels::kEpsilon<eddyDiffusivity<compressible::turbulenceModel> > + ( + geometricOneField(), + rho, + U, + phi, + phi, + thermophysicalModel, + turbulenceModelName, + modelName + ), C4_ ( @@ -96,12 +106,12 @@ void PDRkEpsilon::correct() if (!turbulence_) { // Re-calculate viscosity - mut_ = rho_*Cmu_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); + nut_ = Cmu_*sqr(k_)/epsilon_; + nut_.correctBoundaryConditions(); // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); + //***HGWalphat_ = mut_/Prt_; + //alphat_.correctBoundaryConditions(); return; } @@ -116,7 +126,7 @@ void PDRkEpsilon::correct() } tmp<volTensorField> tgradU = fvc::grad(U_); - volScalarField G(GName(), mut_*(tgradU() && dev(twoSymm(tgradU())))); + volScalarField G(GName(), rho_*nut_*(tgradU() && dev(twoSymm(tgradU())))); tgradU.clear(); // Update espsilon and G at the wall @@ -143,7 +153,7 @@ void PDRkEpsilon::correct() ( betav*fvm::ddt(rho_, epsilon_) + fvm::div(phi_, epsilon_) - - fvm::laplacian(DepsilonEff(), epsilon_) + - fvm::laplacian(rho_*DepsilonEff(), epsilon_) == C1_*betav*G*epsilon_/k_ + 1.5*pow(Cmu_, 3.0/4.0)*GR*sqrt(k_)/LI @@ -165,7 +175,7 @@ void PDRkEpsilon::correct() ( betav*fvm::ddt(rho_, k_) + fvm::div(phi_, k_) - - fvm::laplacian(DkEff(), k_) + - fvm::laplacian(rho_*DkEff(), k_) == betav*G + GR - fvm::SuSp((2.0/3.0)*betav*rho_*divU, k_) @@ -177,12 +187,12 @@ void PDRkEpsilon::correct() bound(k_, kMin_); // Re-calculate viscosity - mut_ = rho_*Cmu_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); + nut_ = Cmu_*sqr(k_)/epsilon_; + nut_.correctBoundaryConditions(); // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); + //***HGWalphat_ = mut_/Prt_; + //alphat_.correctBoundaryConditions(); } diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H index d210aab70..689a47844 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -60,8 +60,8 @@ SourceFiles #ifndef compressiblePDRkEpsilon_H #define compressiblePDRkEpsilon_H - #include "kEpsilon.H" +#include "turbulentFluidThermoModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -78,7 +78,13 @@ namespace RASModels class PDRkEpsilon : - public kEpsilon + public Foam::RASModels::kEpsilon + < + eddyDiffusivity + < + compressible::turbulenceModel + > + > { // Private data @@ -97,8 +103,10 @@ public: //- Construct from components PDRkEpsilon ( + const geometricOneField& alpha, const volScalarField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const fluidThermo& thermophysicalModel, const word& turbulenceModelName = turbulenceModel::typeName, diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C index 8fe73daa9..ba0e121e7 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "XiEqModel.H" +#include "zeroGradientFvPatchFields.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H index 929c4df11..2574c4c14 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,7 +43,7 @@ SourceFiles #include "IOdictionary.H" #include "psiuReactionThermo.H" -#include "RASModel.H" +#include "turbulentFluidThermoModel.H" #include "runTimeSelectionTables.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H index 3bc4b53a9..ac61eb7f8 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,7 +40,7 @@ SourceFiles #include "IOdictionary.H" #include "psiuReactionThermo.H" -#include "RASModel.H" +#include "turbulentFluidThermoModel.H" #include "runTimeSelectionTables.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H index ad091f410..ae69d5bab 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -92,8 +92,9 @@ SourceFiles #include "IOdictionary.H" #include "psiuReactionThermo.H" -#include "RASModel.H" +#include "turbulentFluidThermoModel.H" #include "multivariateSurfaceInterpolationScheme.H" +#include "fvcDiv.H" #include "runTimeSelectionTables.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C index caf471a15..91ad18fdf 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,6 +24,11 @@ License \*---------------------------------------------------------------------------*/ #include "transport.H" +#include "surfaceInterpolate.H" +#include "fvmDdt.H" +#include "fvcLaplacian.H" +#include "fvmDiv.H" +#include "fvmSup.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/applications/solvers/combustion/XiFoam/Make/options b/applications/solvers/combustion/XiFoam/Make/options index 468cc1919..4860d14f4 100644 --- a/applications/solvers/combustion/XiFoam/Make/options +++ b/applications/solvers/combustion/XiFoam/Make/options @@ -7,7 +7,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude EXE_LIBS = \ @@ -16,9 +17,8 @@ EXE_LIBS = \ -lsampling \ -lmeshTools \ -lengine \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lfluidThermophysicalModels \ -lreactionThermophysicalModels \ -lspecie \ diff --git a/applications/solvers/combustion/XiFoam/XiFoam.C b/applications/solvers/combustion/XiFoam/XiFoam.C index 84fac0482..898e79f41 100644 --- a/applications/solvers/combustion/XiFoam/XiFoam.C +++ b/applications/solvers/combustion/XiFoam/XiFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,7 +51,7 @@ Description #include "fvCFD.H" #include "psiuReactionThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "laminarFlameSpeed.H" #include "ignition.H" #include "Switch.H" diff --git a/applications/solvers/combustion/chemFoam/Make/options b/applications/solvers/combustion/chemFoam/Make/options index 9facf7ac9..79647a861 100644 --- a/applications/solvers/combustion/chemFoam/Make/options +++ b/applications/solvers/combustion/chemFoam/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ @@ -12,8 +13,8 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lreactionThermophysicalModels \ -lfluidThermophysicalModels \ -lchemistryModel \ diff --git a/applications/solvers/combustion/chemFoam/chemFoam.C b/applications/solvers/combustion/chemFoam/chemFoam.C index 4183045a1..699a929bb 100644 --- a/applications/solvers/combustion/chemFoam/chemFoam.C +++ b/applications/solvers/combustion/chemFoam/chemFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ Description #include "fvCFD.H" #include "psiReactionThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "psiChemistryModel.H" #include "chemistrySolver.H" #include "OFstream.H" diff --git a/applications/solvers/combustion/coldEngineFoam/Make/options b/applications/solvers/combustion/coldEngineFoam/Make/options index d688fb1e2..c49f5de1b 100644 --- a/applications/solvers/combustion/coldEngineFoam/Make/options +++ b/applications/solvers/combustion/coldEngineFoam/Make/options @@ -6,7 +6,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ @@ -14,9 +15,8 @@ EXE_INC = \ EXE_LIBS = \ -lengine \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lfluidThermophysicalModels \ -lspecie \ -lfiniteVolume \ diff --git a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C index 43eb616e1..988cf128b 100644 --- a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C +++ b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,7 +33,7 @@ Description #include "engineTime.H" #include "engineMesh.H" #include "psiThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "OFstream.H" #include "fvIOoptionList.H" #include "pimpleControl.H" diff --git a/applications/solvers/combustion/engineFoam/Make/options b/applications/solvers/combustion/engineFoam/Make/options index fcbc3a420..0ede4569e 100644 --- a/applications/solvers/combustion/engineFoam/Make/options +++ b/applications/solvers/combustion/engineFoam/Make/options @@ -8,7 +8,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude EXE_LIBS = \ @@ -17,9 +18,8 @@ EXE_LIBS = \ -lsampling \ -lmeshTools \ -lengine \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lfluidThermophysicalModels \ -lreactionThermophysicalModels \ -lspecie \ diff --git a/applications/solvers/combustion/engineFoam/engineFoam.C b/applications/solvers/combustion/engineFoam/engineFoam.C index a35e22dc5..97c5cc56f 100644 --- a/applications/solvers/combustion/engineFoam/engineFoam.C +++ b/applications/solvers/combustion/engineFoam/engineFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -52,7 +52,7 @@ Description #include "engineTime.H" #include "engineMesh.H" #include "psiuReactionThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "laminarFlameSpeed.H" #include "ignition.H" #include "Switch.H" diff --git a/applications/solvers/combustion/fireFoam/Make/options b/applications/solvers/combustion/fireFoam/Make/options index cd5ad097a..cccf0a7da 100644 --- a/applications/solvers/combustion/fireFoam/Make/options +++ b/applications/solvers/combustion/fireFoam/Make/options @@ -3,7 +3,8 @@ EXE_INC = \ -I$(LIB_SRC)/fvOptions/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ -I${LIB_SRC}/sampling/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \ @@ -34,8 +35,8 @@ EXE_LIBS = \ -lfvOptions \ -lmeshTools \ -lsampling \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lspecie \ -lfluidThermophysicalModels \ -lsolidProperties \ diff --git a/applications/solvers/combustion/fireFoam/fireFoam.C b/applications/solvers/combustion/fireFoam/fireFoam.C index b8c48549a..b70a9d6cc 100644 --- a/applications/solvers/combustion/fireFoam/fireFoam.C +++ b/applications/solvers/combustion/fireFoam/fireFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "basicReactingCloud.H" #include "surfaceFilmModel.H" #include "pyrolysisModelCollection.H" diff --git a/applications/solvers/combustion/reactingFoam/LTSReactingFoam/LTSReactingFoam.C b/applications/solvers/combustion/reactingFoam/LTSReactingFoam/LTSReactingFoam.C index 0b3421086..9088b382a 100644 --- a/applications/solvers/combustion/reactingFoam/LTSReactingFoam/LTSReactingFoam.C +++ b/applications/solvers/combustion/reactingFoam/LTSReactingFoam/LTSReactingFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "psiCombustionModel.H" #include "multivariateScheme.H" #include "pimpleControl.H" diff --git a/applications/solvers/combustion/reactingFoam/LTSReactingFoam/Make/options b/applications/solvers/combustion/reactingFoam/LTSReactingFoam/Make/options index abac9d96a..102806126 100644 --- a/applications/solvers/combustion/reactingFoam/LTSReactingFoam/Make/options +++ b/applications/solvers/combustion/reactingFoam/LTSReactingFoam/Make/options @@ -4,7 +4,8 @@ EXE_INC = -ggdb3 \ -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ @@ -17,9 +18,8 @@ EXE_LIBS = \ -lfvOptions \ -lmeshTools \ -lsampling \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lreactionThermophysicalModels \ -lspecie \ -lfluidThermophysicalModels \ diff --git a/applications/solvers/combustion/reactingFoam/Make/options b/applications/solvers/combustion/reactingFoam/Make/options index 15cf68cb5..5a7c91bce 100644 --- a/applications/solvers/combustion/reactingFoam/Make/options +++ b/applications/solvers/combustion/reactingFoam/Make/options @@ -3,7 +3,8 @@ EXE_INC = \ -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ @@ -16,9 +17,8 @@ EXE_LIBS = \ -lfvOptions \ -lmeshTools \ -lsampling \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lreactionThermophysicalModels \ -lspecie \ -lfluidThermophysicalModels \ diff --git a/applications/solvers/combustion/reactingFoam/reactingFoam.C b/applications/solvers/combustion/reactingFoam/reactingFoam.C index 831df5c9a..755cf14ab 100644 --- a/applications/solvers/combustion/reactingFoam/reactingFoam.C +++ b/applications/solvers/combustion/reactingFoam/reactingFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,7 +30,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "psiCombustionModel.H" #include "multivariateScheme.H" #include "pimpleControl.H" diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/Make/options b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/Make/options index bf015097e..a9ea986c0 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/Make/options +++ b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/Make/options @@ -4,7 +4,8 @@ EXE_INC = \ -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ @@ -18,9 +19,8 @@ EXE_LIBS = \ -lfvOptions \ -lmeshTools \ -lsampling \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lreactionThermophysicalModels \ -lspecie \ -lfluidThermophysicalModels \ diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/rhoReactingBuoyantFoam.C b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/rhoReactingBuoyantFoam.C index fd4b6f58e..0adee03a9 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/rhoReactingBuoyantFoam.C +++ b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/rhoReactingBuoyantFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,7 @@ Description #include "fvCFD.H" #include "rhoCombustionModel.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "multivariateScheme.H" #include "pimpleControl.H" #include "fvIOoptionList.H" diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/Make/options b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/Make/options index bf015097e..a9ea986c0 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/Make/options +++ b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/Make/options @@ -4,7 +4,8 @@ EXE_INC = \ -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ @@ -18,9 +19,8 @@ EXE_LIBS = \ -lfvOptions \ -lmeshTools \ -lsampling \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lreactionThermophysicalModels \ -lspecie \ -lfluidThermophysicalModels \ diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/rhoReactingFoam.C b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/rhoReactingFoam.C index 192fb7405..bdbf5f594 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/rhoReactingFoam.C +++ b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/rhoReactingFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,7 @@ Description #include "fvCFD.H" #include "rhoCombustionModel.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "multivariateScheme.H" #include "pimpleControl.H" #include "fvIOoptionList.H" diff --git a/applications/solvers/compressible/rhoCentralFoam/Make/options b/applications/solvers/compressible/rhoCentralFoam/Make/options index 4ddaa7fb9..1b16a7b36 100644 --- a/applications/solvers/compressible/rhoCentralFoam/Make/options +++ b/applications/solvers/compressible/rhoCentralFoam/Make/options @@ -3,7 +3,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude @@ -12,7 +13,6 @@ EXE_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ -lrhoCentralFoam \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lmeshTools diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/Make/options b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/Make/options index 33707728f..f79e10048 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/Make/options +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/Make/options @@ -4,7 +4,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude @@ -13,8 +14,7 @@ EXE_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ -lrhoCentralFoam \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -ldynamicMesh \ -lmeshTools diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C index a42825342..d8f83da12 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,7 @@ Description #include "fvCFD.H" #include "psiThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "zeroGradientFvPatchFields.H" #include "fixedRhoFvPatchScalarField.H" #include "motionSolver.H" diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C index 3ae35694e..164f0d1a2 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,7 @@ Description #include "fvCFD.H" #include "psiThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "zeroGradientFvPatchFields.H" #include "fixedRhoFvPatchScalarField.H" diff --git a/applications/solvers/compressible/rhoPimpleFoam/Make/options b/applications/solvers/compressible/rhoPimpleFoam/Make/options index c25d77014..8f38ef182 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoPimpleFoam/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ @@ -10,9 +11,8 @@ EXE_INC = \ EXE_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lfiniteVolume \ -lmeshTools \ -lsampling \ diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/Make/options b/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/Make/options index 502938c53..669cd4a3d 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/Make/options @@ -1,7 +1,8 @@ EXE_INC = \ -I.. \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ @@ -11,9 +12,8 @@ EXE_INC = \ EXE_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lfiniteVolume \ -lmeshTools \ -lsampling \ diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/rhoLTSPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/rhoLTSPimpleFoam.C index 8f2943f84..8ff8c28da 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/rhoLTSPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/rhoLTSPimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ Description #include "fvCFD.H" #include "psiThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "fvIOoptionList.H" #include "fvcSmooth.H" #include "pimpleControl.H" diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/Make/options b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/Make/options index 2093b620b..f94f65e6a 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/Make/options +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/Make/options @@ -1,7 +1,8 @@ EXE_INC = \ -I.. \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ @@ -14,9 +15,8 @@ EXE_INC = \ EXE_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lfiniteVolume \ -lmeshTools \ -lsampling \ diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/rhoPimpleDyMFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/rhoPimpleDyMFoam.C index fcfc2aa79..f3676b66d 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/rhoPimpleDyMFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/rhoPimpleDyMFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,7 +39,7 @@ Description #include "fvCFD.H" #include "dynamicFvMesh.H" #include "psiThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "bound.H" #include "pimpleControl.H" #include "fvIOoptionList.H" diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C index 6c6c4e99a..ae43c9504 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ Description #include "fvCFD.H" #include "psiThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "bound.H" #include "pimpleControl.H" #include "fvIOoptionList.H" diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/Make/options b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/Make/options index 502938c53..669cd4a3d 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/Make/options +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/Make/options @@ -1,7 +1,8 @@ EXE_INC = \ -I.. \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ @@ -11,9 +12,8 @@ EXE_INC = \ EXE_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lfiniteVolume \ -lmeshTools \ -lsampling \ diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/rhoPimplecFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/rhoPimplecFoam.C index 308a90e51..fd3e102dc 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/rhoPimplecFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/rhoPimplecFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ Description #include "fvCFD.H" #include "psiThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "bound.H" #include "pimpleControl.H" #include "fvIOoptionList.H" diff --git a/applications/solvers/compressible/rhoSimpleFoam/Make/options b/applications/solvers/compressible/rhoSimpleFoam/Make/options index 4606400cb..dc8643260 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoSimpleFoam/Make/options @@ -1,7 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ @@ -11,8 +11,8 @@ EXE_INC = \ EXE_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lfiniteVolume \ -lsampling \ -lmeshTools \ diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/Make/options b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/Make/options index 39d6f696e..bf3eda587 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/Make/options @@ -1,8 +1,8 @@ EXE_INC = \ -I.. \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ @@ -12,8 +12,8 @@ EXE_INC = \ EXE_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lfiniteVolume \ -lsampling \ -lmeshTools \ diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C index fd30404ae..d8598bae4 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,7 +33,7 @@ Description #include "fvCFD.H" #include "rhoThermo.H" -#include "RASModel.H" +#include "turbulentFluidThermoModel.H" #include "fvIOoptionList.H" #include "IOporosityModelList.H" #include "simpleControl.H" diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C b/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C index c0a6282a3..1d70a557c 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,7 @@ Description #include "fvCFD.H" #include "psiThermo.H" -#include "RASModel.H" +#include "turbulentFluidThermoModel.H" #include "simpleControl.H" #include "fvIOoptionList.H" diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/Make/options b/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/Make/options index cc82ba958..bf3eda587 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/Make/options +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/Make/options @@ -1,8 +1,8 @@ EXE_INC = \ -I.. \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ @@ -12,7 +12,8 @@ EXE_INC = \ EXE_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ - -lcompressibleRASModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lfiniteVolume \ -lsampling \ -lmeshTools \ diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/rhoSimplecFoam.C b/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/rhoSimplecFoam.C index a7c9b2070..bad31d378 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/rhoSimplecFoam.C +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/rhoSimplecFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,7 @@ Description #include "fvCFD.H" #include "psiThermo.H" -#include "RASModel.H" +#include "turbulentFluidThermoModel.H" #include "mixedFvPatchFields.H" #include "bound.H" #include "simpleControl.H" diff --git a/applications/solvers/compressible/sonicFoam/Make/options b/applications/solvers/compressible/sonicFoam/Make/options index b1663bb82..92ca5cd17 100644 --- a/applications/solvers/compressible/sonicFoam/Make/options +++ b/applications/solvers/compressible/sonicFoam/Make/options @@ -1,7 +1,8 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \ @@ -10,9 +11,8 @@ EXE_INC = \ EXE_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lmeshTools \ -lsampling \ -lfvOptions \ diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options index 761311a8b..1561dffa7 100644 --- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options +++ b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options @@ -3,7 +3,8 @@ EXE_INC = \ -I../../rhoPimpleFoam/rhoPimpleDyMFoam \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ @@ -15,9 +16,8 @@ EXE_INC = \ EXE_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lfiniteVolume \ -lmeshTools \ -lsampling \ diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C index 5a8e0b92e..a78ef861d 100644 --- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,7 +36,7 @@ Description #include "fvCFD.H" #include "dynamicFvMesh.H" #include "psiThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" diff --git a/applications/solvers/compressible/sonicFoam/sonicFoam.C b/applications/solvers/compressible/sonicFoam/sonicFoam.C index 875e7afa7..1042889db 100644 --- a/applications/solvers/compressible/sonicFoam/sonicFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ Description #include "fvCFD.H" #include "psiThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options index 1e23e4594..9a60cac43 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options @@ -1,21 +1,21 @@ EXE_INC = \ -I../buoyantBoussinesqSimpleFoam \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ + -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ + -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ - -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ + -lincompressibleTransportModels \ + -lradiationModels \ -lfiniteVolume \ -lfvOptions \ -lsampling \ - -lmeshTools \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleTransportModels \ - -lradiationModels + -lmeshTools diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C index 5827ddf2c..1e9fca7f8 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C @@ -47,7 +47,7 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" -#include "RASModel.H" +#include "turbulentTransportModel.H" #include "radiationModel.H" #include "fvIOoptionList.H" #include "pimpleControl.H" diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options index 6a6311e47..48d83838a 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options @@ -1,18 +1,18 @@ EXE_INC = \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ + -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel + -I$(LIB_SRC)/fvOptions/lnInclude EXE_LIBS = \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ + -lincompressibleTransportModels \ -lfiniteVolume \ -lsampling \ -lmeshTools \ - -lfvOptions \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleTransportModels + -lfvOptions diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C index bcf4729a4..e9a964c81 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C @@ -47,7 +47,7 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" -#include "RASModel.H" +#include "turbulentTransportModel.H" #include "fvIOoptionList.H" #include "simpleControl.H" #include "fixedFluxPressureFvPatchScalarField.H" diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options index e57cfc441..fc4620b28 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options @@ -5,7 +5,8 @@ EXE_INC = \ -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude EXE_LIBS = \ -lfiniteVolume \ @@ -15,7 +16,5 @@ EXE_LIBS = \ -lfluidThermophysicalModels \ -lradiationModels \ -lspecie \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels - + -lturbulenceModels \ + -lcompressibleTurbulenceModels diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C index 9d62893f1..379216854 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ Description #include "fvCFD.H" #include "rhoThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "radiationModel.H" #include "fvIOoptionList.H" #include "pimpleControl.H" diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options index 11decf6bb..383ee341f 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options @@ -5,9 +5,8 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude EXE_LIBS = \ -lfiniteVolume \ @@ -17,6 +16,6 @@ EXE_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ -lradiationModels \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lmeshTools diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C index 2e52da8f5..6c05e0cac 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,7 @@ Description #include "fvCFD.H" #include "rhoThermo.H" -#include "RASModel.H" +#include "turbulentFluidThermoModel.H" #include "radiationModel.H" #include "simpleControl.H" #include "fvIOoptionList.H" diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options index 359d2d452..75695454d 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options @@ -11,7 +11,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude @@ -21,9 +22,8 @@ EXE_LIBS = \ -lfluidThermophysicalModels \ -lsolidThermo \ -lspecie \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lmeshTools \ -lfiniteVolume \ -lradiationModels \ diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C index 6aae0cf5b..7ee8492cb 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,7 +36,7 @@ Description #include "fvCFD.H" #include "rhoThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "fixedGradientFvPatchFields.H" #include "regionProperties.H" #include "compressibleCourantNo.H" diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options index 93b544d0e..e3c4d178f 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options @@ -9,9 +9,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude @@ -21,9 +20,8 @@ EXE_LIBS = \ -lfluidThermophysicalModels \ -lsolidThermo \ -lspecie \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lradiationModels \ -lfvOptions \ -lregionModels \ diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C index 75720dd51..6c07dcbdf 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,7 @@ Description #include "fvCFD.H" #include "rhoThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "fixedGradientFvPatchFields.H" #include "regionProperties.H" #include "solidThermo.H" diff --git a/applications/solvers/heatTransfer/thermoFoam/Make/options b/applications/solvers/heatTransfer/thermoFoam/Make/options index d4d56df1b..fc4620b28 100644 --- a/applications/solvers/heatTransfer/thermoFoam/Make/options +++ b/applications/solvers/heatTransfer/thermoFoam/Make/options @@ -5,11 +5,8 @@ EXE_INC = \ -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude EXE_LIBS = \ -lfiniteVolume \ @@ -19,6 +16,5 @@ EXE_LIBS = \ -lfluidThermophysicalModels \ -lradiationModels \ -lspecie \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels + -lturbulenceModels \ + -lcompressibleTurbulenceModels diff --git a/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C b/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C index f765ca86e..a23ce288e 100644 --- a/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C +++ b/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,8 +31,8 @@ Description #include "fvCFD.H" #include "rhoThermo.H" -#include "turbulenceModel.H" -#include "RASModel.H" +#include "turbulentFluidThermoModel.H" +#include "turbulentFluidThermoModel.H" #include "LESModel.H" #include "radiationModel.H" #include "fvIOoptionList.H" diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options b/applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options index 1223bdd06..50a9de019 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options @@ -1,11 +1,13 @@ EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lincompressibleRASModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lfiniteVolume diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C index 62a083e36..460e72c5e 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C @@ -47,7 +47,7 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" -#include "RASModel.H" +#include "turbulentTransportModel.H" #include "simpleControl.H" template<class Type> diff --git a/applications/solvers/incompressible/boundaryFoam/Make/options b/applications/solvers/incompressible/boundaryFoam/Make/options index d993beac0..895199f10 100644 --- a/applications/solvers/incompressible/boundaryFoam/Make/options +++ b/applications/solvers/incompressible/boundaryFoam/Make/options @@ -1,14 +1,14 @@ EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ diff --git a/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C b/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C index 03ccffcce..39d214a6e 100644 --- a/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C +++ b/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C @@ -37,7 +37,7 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" -#include "RASModel.H" +#include "turbulentTransportModel.H" #include "wallFvPatch.H" #include "makeGraph.H" diff --git a/applications/solvers/incompressible/pimpleFoam/Make/options b/applications/solvers/incompressible/pimpleFoam/Make/options index a597aafbc..bc0201f37 100644 --- a/applications/solvers/incompressible/pimpleFoam/Make/options +++ b/applications/solvers/incompressible/pimpleFoam/Make/options @@ -1,5 +1,6 @@ EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ @@ -9,10 +10,9 @@ EXE_INC = \ EXE_LIBS = \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ -lfiniteVolume \ -lmeshTools \ -lfvOptions \ diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/Make/options b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/Make/options index 7cdb6a555..20feab872 100644 --- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/Make/options +++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/Make/options @@ -1,5 +1,6 @@ EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ @@ -8,10 +9,9 @@ EXE_INC = \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ -lfiniteVolume \ -lmeshTools \ -lfvOptions \ diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/SRFPimpleFoam.C b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/SRFPimpleFoam.C index f6beed973..f9c35f073 100644 --- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/SRFPimpleFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/SRFPimpleFoam.C @@ -34,7 +34,7 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "pimpleControl.H" #include "SRFModel.H" #include "fvIOoptionList.H" diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options index 263fd7375..90e43d56a 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ -I.. \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ @@ -11,10 +12,9 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ EXE_LIBS = \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ -lfiniteVolume \ -lfvOptions \ -lsampling \ diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C index 3feb2a97f..7c23e6583 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C @@ -35,7 +35,7 @@ Description #include "fvCFD.H" #include "dynamicFvMesh.H" #include "singlePhaseTransportModel.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C index 8361c5462..85861ae39 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C @@ -36,7 +36,7 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" #include "IOporosityModelList.H" diff --git a/applications/solvers/incompressible/pisoFoam/Make/options b/applications/solvers/incompressible/pisoFoam/Make/options index 259f95f7b..23368faba 100644 --- a/applications/solvers/incompressible/pisoFoam/Make/options +++ b/applications/solvers/incompressible/pisoFoam/Make/options @@ -1,13 +1,13 @@ EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools diff --git a/applications/solvers/incompressible/pisoFoam/pisoFoam.C b/applications/solvers/incompressible/pisoFoam/pisoFoam.C index 14237946a..b812418fd 100644 --- a/applications/solvers/incompressible/pisoFoam/pisoFoam.C +++ b/applications/solvers/incompressible/pisoFoam/pisoFoam.C @@ -33,7 +33,7 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/incompressible/simpleFoam/Make/options b/applications/solvers/incompressible/simpleFoam/Make/options index f9913bf0d..bc0201f37 100644 --- a/applications/solvers/incompressible/simpleFoam/Make/options +++ b/applications/solvers/incompressible/simpleFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ @@ -10,8 +10,8 @@ EXE_INC = \ EXE_LIBS = \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options index cae6c88fe..a888499d8 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options @@ -1,17 +1,18 @@ EXE_INC = \ -I.. \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ - -lincompressibleRASModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/SRFSimpleFoam.C b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/SRFSimpleFoam.C index 354757b66..00178524a 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/SRFSimpleFoam.C +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/SRFSimpleFoam.C @@ -32,7 +32,7 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" -#include "RASModel.H" +#include "turbulentTransportModel.H" #include "SRFModel.H" #include "simpleControl.H" #include "fvIOoptionList.H" diff --git a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/Make/options b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/Make/options index 6cee67f66..a888499d8 100644 --- a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/Make/options +++ b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/Make/options @@ -1,7 +1,7 @@ EXE_INC = \ -I.. \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ @@ -11,8 +11,8 @@ EXE_INC = \ EXE_LIBS = \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ diff --git a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/porousSimpleFoam.C b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/porousSimpleFoam.C index d10ba2d1e..a6c48d7c1 100644 --- a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/porousSimpleFoam.C +++ b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/porousSimpleFoam.C @@ -33,7 +33,7 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" -#include "RASModel.H" +#include "turbulentTransportModel.H" #include "simpleControl.H" #include "IOMRFZoneList.H" #include "IOporosityModelList.H" diff --git a/applications/solvers/incompressible/simpleFoam/simpleFoam.C b/applications/solvers/incompressible/simpleFoam/simpleFoam.C index 9541bcbd1..807c1e5a0 100644 --- a/applications/solvers/incompressible/simpleFoam/simpleFoam.C +++ b/applications/solvers/incompressible/simpleFoam/simpleFoam.C @@ -31,7 +31,7 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" -#include "RASModel.H" +#include "turbulentTransportModel.H" #include "simpleControl.H" #include "fvIOoptionList.H" diff --git a/applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/DPMTurbulenceModels.C b/applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/DPMTurbulenceModels.C index 1aeca7795..3ade3bbfd 100644 --- a/applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/DPMTurbulenceModels.C +++ b/applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/DPMTurbulenceModels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,7 +29,7 @@ License #include "makeTurbulenceModel.H" #include "laminar.H" -#include "RASModel.H" +#include "turbulentTransportModel.H" #include "LESModel.H" makeBaseTurbulenceModel diff --git a/applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/options b/applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/options index 4a0c3a565..843220db5 100644 --- a/applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/options +++ b/applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/options @@ -22,7 +22,7 @@ EXE_LIBS = \ -lmeshTools \ -llagrangian \ -llagrangianIntermediate \ - -llagrangianTurbulentSubModels \ + -llagrangianTurbulence \ -lthermophysicalFunctions \ -lspecie \ -lradiationModels \ diff --git a/applications/solvers/lagrangian/DPMFoam/Make/options b/applications/solvers/lagrangian/DPMFoam/Make/options index 83684e57c..5734ebb65 100644 --- a/applications/solvers/lagrangian/DPMFoam/Make/options +++ b/applications/solvers/lagrangian/DPMFoam/Make/options @@ -21,7 +21,7 @@ EXE_LIBS = \ -lmeshTools \ -llagrangian \ -llagrangianIntermediate \ - -llagrangianTurbulentSubModels \ + -llagrangianTurbulence \ -lthermophysicalFunctions \ -lspecie \ -lradiationModels \ diff --git a/applications/solvers/lagrangian/coalChemistryFoam/Make/options b/applications/solvers/lagrangian/coalChemistryFoam/Make/options index 8abe45c5c..5689c1bab 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/Make/options +++ b/applications/solvers/lagrangian/coalChemistryFoam/Make/options @@ -1,7 +1,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ -I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \ @@ -30,9 +31,8 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -llagrangian \ -llagrangianIntermediate \ -llagrangianTurbulence \ @@ -54,4 +54,3 @@ EXE_LIBS = \ -lcombustionModels \ -lfvOptions \ -lsampling - diff --git a/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C b/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C index 475e48a1c..fc28c3de4 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C +++ b/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,7 +36,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "basicThermoCloud.H" #include "coalCloud.H" #include "psiCombustionModel.H" diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options index 05b6391ed..bec7663b6 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options @@ -5,7 +5,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ @@ -21,8 +22,8 @@ EXE_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ -lradiationModels \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/Make/options b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/Make/options index e35babe8f..000a4abb2 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/Make/options +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/Make/options @@ -6,7 +6,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ @@ -25,8 +26,8 @@ EXE_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ -lradiationModels \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lfiniteVolume \ -lmeshTools \ diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.C b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.C index 8f7619cdd..b355148a9 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.C +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ Description #include "fvCFD.H" #include "dynamicFvMesh.H" #include "singlePhaseTransportModel.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "basicKinematicCollidingCloud.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C index 2bf123845..befcb57d0 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "basicKinematicCollidingCloud.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options index b6f5cf105..96880c05c 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options @@ -3,7 +3,8 @@ EXE_INC = \ -I$(LIB_SRC)/fvOptions/lnInclude \ -I${LIB_SRC}/sampling/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ @@ -30,8 +31,8 @@ EXE_LIBS = \ -lfvOptions \ -lsampling \ -lmeshTools \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lspecie \ -lfluidThermophysicalModels \ -lsolidProperties \ diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C b/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C index 27f272100..08bc14d85 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "basicReactingCloud.H" #include "surfaceFilmModel.H" #include "psiCombustionModel.H" diff --git a/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/LTSReactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/LTSReactingParcelFoam.C index 7481ae79c..e81f37593 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/LTSReactingParcelFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/LTSReactingParcelFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,7 +33,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "basicReactingMultiphaseCloud.H" #include "rhoCombustionModel.H" #include "radiationModel.H" diff --git a/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/Make/options index 1eb9a3dba..f0d8062ec 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/Make/options @@ -2,7 +2,8 @@ EXE_INC = \ -I.. \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ -I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \ @@ -29,9 +30,8 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -llagrangian \ -llagrangianIntermediate \ -llagrangianTurbulence \ diff --git a/applications/solvers/lagrangian/reactingParcelFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFoam/Make/options index 997aeae66..cc79d690f 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFoam/Make/options @@ -1,7 +1,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ -I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \ @@ -29,9 +30,8 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -llagrangian \ -llagrangianIntermediate \ -llagrangianTurbulence \ diff --git a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C index 1425a3e5f..30e44df94 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "basicReactingMultiphaseCloud.H" #include "rhoCombustionModel.H" #include "radiationModel.H" diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/options index 997aeae66..cc79d690f 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/options @@ -1,7 +1,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ -I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \ @@ -29,9 +30,8 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -llagrangian \ -llagrangianIntermediate \ -llagrangianTurbulence \ diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/simpleReactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/simpleReactingParcelFoam.C index 6620d2af5..22667ba18 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/simpleReactingParcelFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/simpleReactingParcelFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "basicReactingMultiphaseCloud.H" #include "rhoCombustionModel.H" #include "radiationModel.H" diff --git a/applications/solvers/lagrangian/sprayFoam/Make/options b/applications/solvers/lagrangian/sprayFoam/Make/options index 5c63b0d2f..404a0d373 100644 --- a/applications/solvers/lagrangian/sprayFoam/Make/options +++ b/applications/solvers/lagrangian/sprayFoam/Make/options @@ -3,7 +3,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ -I${LIB_SRC}/sampling/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ -I$(LIB_SRC)/lagrangian/spray/lnInclude \ @@ -30,9 +31,8 @@ EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ -lsampling \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -llagrangian \ -llagrangianIntermediate \ -llagrangianTurbulence \ diff --git a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/Make/options b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/Make/options index a8a0bfc56..487508d30 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/Make/options +++ b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/Make/options @@ -4,7 +4,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ -I${LIB_SRC}/sampling/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ -I$(LIB_SRC)/lagrangian/spray/lnInclude \ @@ -32,9 +33,8 @@ EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ -lsampling \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -llagrangian \ -llagrangianIntermediate \ -llagrangianTurbulence \ diff --git a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/sprayEngineFoam.C b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/sprayEngineFoam.C index b91a3ad79..11caf270a 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/sprayEngineFoam.C +++ b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/sprayEngineFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,7 +33,7 @@ Description #include "fvCFD.H" #include "engineTime.H" #include "engineMesh.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "basicSprayCloud.H" #include "psiCombustionModel.H" #include "radiationModel.H" diff --git a/applications/solvers/lagrangian/sprayFoam/sprayFoam.C b/applications/solvers/lagrangian/sprayFoam/sprayFoam.C index 1c93d3ab1..9da22ec75 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayFoam.C +++ b/applications/solvers/lagrangian/sprayFoam/sprayFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "basicSprayCloud.H" #include "psiCombustionModel.H" #include "radiationModel.H" diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options index 3e975674d..026161c0d 100644 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options @@ -5,7 +5,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ @@ -19,9 +20,8 @@ EXE_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ -lradiationModels \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lfiniteVolume \ -lmeshTools \ -lregionModels \ diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C index 352678f85..6545c4d72 100644 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ Description #include "fvCFD.H" #include "psiThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "basicKinematicCloud.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/cavitatingFoam/Make/options b/applications/solvers/multiphase/cavitatingFoam/Make/options index 5efeeb355..1bcdc8e83 100644 --- a/applications/solvers/multiphase/cavitatingFoam/Make/options +++ b/applications/solvers/multiphase/cavitatingFoam/Make/options @@ -4,13 +4,12 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude EXE_LIBS = \ - -lincompressibleTransportModels \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ - -lfiniteVolume \ - -lbarotropicCompressibilityModel + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ + -lbarotropicCompressibilityModel \ + -lfiniteVolume diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options index 34590e930..5ec5c9a72 100644 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options @@ -5,19 +5,18 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude EXE_LIBS = \ - -lincompressibleTransportModels \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ - -lfiniteVolume \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lbarotropicCompressibilityModel \ + -lfiniteVolume \ -ldynamicMesh \ - -lmeshTools \ - -ldynamicFvMesh + -ldynamicFvMesh \ + -lmeshTools diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/cavitatingDyMFoam.C b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/cavitatingDyMFoam.C index 284ca97bd..9910f1a4b 100644 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/cavitatingDyMFoam.C +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/cavitatingDyMFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,7 +36,7 @@ Description #include "dynamicFvMesh.H" #include "barotropicCompressibilityModel.H" #include "incompressibleTwoPhaseMixture.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "pimpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C b/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C index 2b04d58fb..78b929615 100644 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ Description #include "fvCFD.H" #include "barotropicCompressibilityModel.H" #include "incompressibleTwoPhaseMixture.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "pimpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/compressibleInterFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/Make/options index 54e9f74e4..a36fe0541 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/Make/options @@ -4,7 +4,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ @@ -14,7 +15,6 @@ EXE_LIBS = \ -ltwoPhaseMixture \ -ltwoPhaseProperties \ -linterfaceProperties \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lfiniteVolume diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options index 123645b4c..91f2d03a2 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options @@ -5,7 +5,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ @@ -18,9 +19,8 @@ EXE_LIBS = \ -ltwoPhaseMixture \ -ltwoPhaseProperties \ -linterfaceProperties \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -ldynamicMesh \ -lmeshTools \ -ldynamicFvMesh \ diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C index 064441633..cf35e60be 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,7 +44,7 @@ Description #include "interfaceProperties.H" #include "twoPhaseMixture.H" #include "twoPhaseMixtureThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "pimpleControl.H" #include "fixedFluxPressureFvPatchScalarField.H" diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C index 030b997f4..0559985b5 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,7 +42,7 @@ Description #include "interfaceProperties.H" #include "twoPhaseMixture.H" #include "twoPhaseMixtureThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "pimpleControl.H" #include "fixedFluxPressureFvPatchScalarField.H" diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Make/options b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Make/options index af7020f40..900ababa1 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Make/options +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Make/options @@ -5,7 +5,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ @@ -13,7 +14,6 @@ EXE_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ -linterfaceProperties \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lfiniteVolume diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C index 5648f2d3b..24ba56e3e 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ Description #include "fvCFD.H" #include "multiphaseMixtureThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "pimpleControl.H" #include "fixedFluxPressureFvPatchScalarField.H" diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C b/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C index 1e870c42a..575d8d793 100644 --- a/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C +++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,7 +41,7 @@ Description #include "CMULES.H" #include "subCycle.H" #include "immiscibleIncompressibleTwoPhaseMixture.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "fvcSmooth.H" #include "pimpleControl.H" #include "fvIOoptionList.H" diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options b/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options index 14861f2b8..f0762e15d 100644 --- a/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options @@ -4,7 +4,8 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ @@ -13,9 +14,8 @@ EXE_INC = \ EXE_LIBS = \ -limmiscibleIncompressibleTwoPhaseMixture \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lfiniteVolume \ -lmeshTools \ -lfvOptions \ diff --git a/applications/solvers/multiphase/interFoam/Make/options b/applications/solvers/multiphase/interFoam/Make/options index 207a796b1..df659a93d 100644 --- a/applications/solvers/multiphase/interFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/Make/options @@ -3,7 +3,8 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \ @@ -12,9 +13,8 @@ EXE_INC = \ EXE_LIBS = \ -limmiscibleIncompressibleTwoPhaseMixture \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lfiniteVolume \ -lfvOptions \ -lmeshTools \ diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options b/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options index b9638e612..2e8c289ff 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options @@ -4,7 +4,8 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ @@ -15,9 +16,8 @@ EXE_INC = \ EXE_LIBS = \ -limmiscibleIncompressibleTwoPhaseMixture \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lfiniteVolume \ -ldynamicMesh \ -ldynamicFvMesh \ diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C b/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C index 58d74a625..ba40cc3e1 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ Description #include "CMULES.H" #include "subCycle.H" #include "immiscibleIncompressibleTwoPhaseMixture.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" #include "fixedFluxPressureFvPatchScalarField.H" diff --git a/applications/solvers/multiphase/interFoam/interFoam.C b/applications/solvers/multiphase/interFoam/interFoam.C index 6b6168bf0..deb001c4f 100644 --- a/applications/solvers/multiphase/interFoam/interFoam.C +++ b/applications/solvers/multiphase/interFoam/interFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,7 +41,7 @@ Description #include "CMULES.H" #include "subCycle.H" #include "immiscibleIncompressibleTwoPhaseMixture.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" #include "fixedFluxPressureFvPatchScalarField.H" diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options index 43456c904..7198616b3 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options @@ -6,7 +6,8 @@ EXE_INC = \ -IthreePhaseInterfaceProperties \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/meshTools/lnInclude \ @@ -17,9 +18,8 @@ EXE_LIBS = \ -ltwoPhaseMixture \ -ltwoPhaseProperties \ -lincompressibleTransportModels \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lfiniteVolume \ -lmeshTools \ -lfvOptions \ diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C b/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C index 09cb7f1c7..a39adb3c1 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ Description #include "CMULES.H" #include "subCycle.H" #include "immiscibleIncompressibleThreePhaseMixture.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" #include "fixedFluxPressureFvPatchScalarField.H" diff --git a/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options b/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options index fffa41da9..7a3dd1e71 100644 --- a/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options @@ -5,7 +5,8 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \ @@ -14,9 +15,8 @@ EXE_INC = \ EXE_LIBS = \ -limmiscibleIncompressibleTwoPhaseMixture \ -lincompressibleTransportModels \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lfiniteVolume \ -lmeshTools \ -lfvOptions \ diff --git a/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C b/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C index c17847bd3..ee2b6e4d5 100644 --- a/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C +++ b/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,7 +42,7 @@ Description #include "CMULES.H" #include "subCycle.H" #include "immiscibleIncompressibleTwoPhaseMixture.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "IOporosityModelList.H" #include "pimpleControl.H" #include "fvIOoptionList.H" diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Make/options b/applications/solvers/multiphase/interPhaseChangeFoam/Make/options index 4721c8896..254f3ad8b 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/Make/options +++ b/applications/solvers/multiphase/interPhaseChangeFoam/Make/options @@ -3,7 +3,8 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -IphaseChangeTwoPhaseMixtures/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ @@ -16,9 +17,8 @@ EXE_LIBS = \ -linterfaceProperties \ -ltwoPhaseProperties \ -lincompressibleTransportModels \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lfiniteVolume \ -lmeshTools \ -lfvOptions \ diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/Make/options b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/Make/options index 3bf8a5dfb..0512ee194 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/Make/options +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/Make/options @@ -4,7 +4,8 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I../phaseChangeTwoPhaseMixtures/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ @@ -19,9 +20,8 @@ EXE_LIBS = \ -linterfaceProperties \ -ltwoPhaseProperties \ -lincompressibleTransportModels \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lfiniteVolume \ -ldynamicMesh \ -ldynamicFvMesh \ diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C index e336e4a0c..4afaca6ca 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -47,7 +47,7 @@ Description #include "subCycle.H" #include "interfaceProperties.H" #include "phaseChangeTwoPhaseMixture.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" #include "fixedFluxPressureFvPatchScalarField.H" diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C index 32f94bf30..7cd7ad43b 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,7 +45,7 @@ Description #include "subCycle.H" #include "interfaceProperties.H" #include "phaseChangeTwoPhaseMixture.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" #include "fixedFluxPressureFvPatchScalarField.H" diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/Make/options b/applications/solvers/multiphase/multiphaseEulerFoam/Make/options index ab8d97099..86b52d338 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/Make/options +++ b/applications/solvers/multiphase/multiphaseEulerFoam/Make/options @@ -7,8 +7,8 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/incompressible/LES/LESModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude @@ -17,6 +17,6 @@ EXE_LIBS = \ -linterfaceProperties \ -lincompressibleTransportModels \ -lcompressibleMultiphaseEulerianInterfacialModels \ - -lincompressibleLESModels \ - -lincompressibleRASModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lfiniteVolume diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H b/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H index 7584d84f2..1dd551f8f 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H @@ -10,7 +10,7 @@ forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) const volScalarField& alpha = phase; volVectorField& U = phase.U(); - volScalarField nuEff(sgsModel->nut() + iter().nu()); + volScalarField nuEff(turbulence->nut() + iter().nu()); UEqns.set ( diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H b/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H index 79fa72d75..8de6d4902 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H @@ -89,8 +89,8 @@ scalar pRefValue = 0.0; setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue); - - autoPtr<incompressible::LESModel> sgsModel + // Construct incompressible turbulence model + autoPtr<incompressible::turbulenceModel> turbulence ( - incompressible::LESModel::New(U, phi, fluid) + incompressible::turbulenceModel::New(U, phi, fluid) ); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C index d0285dc35..237a62a7c 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,7 +36,7 @@ Description #include "dragModel.H" #include "heatTransferModel.H" #include "singlePhaseTransportModel.H" -#include "LESModel.H" +#include "turbulentTransportModel.H" #include "pimpleControl.H" #include "IOMRFZoneList.H" #include "fixedFluxPressureFvPatchScalarField.H" @@ -78,7 +78,7 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { - sgsModel->correct(); + turbulence->correct(); fluid.solve(); rho = fluid.rho(); #include "zonePhaseVolumes.H" diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Make/options b/applications/solvers/multiphase/multiphaseInterFoam/Make/options index 27f633d62..2eb366fd9 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/Make/options +++ b/applications/solvers/multiphase/multiphaseInterFoam/Make/options @@ -4,7 +4,8 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ @@ -14,9 +15,8 @@ EXE_LIBS = \ -lmultiphaseInterFoam \ -linterfaceProperties \ -lincompressibleTransportModels \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lfiniteVolume \ -lfvOptions \ -lmeshTools \ diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/options b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/options index 836534822..e05b53a96 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/options +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/options @@ -6,7 +6,8 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ @@ -18,9 +19,8 @@ EXE_LIBS = \ -lmultiphaseInterFoam \ -linterfaceProperties \ -lincompressibleTransportModels \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lfiniteVolume \ -ldynamicMesh \ -ldynamicFvMesh \ diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C index acfa7eb3e..7e31d9e42 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ Description #include "fvCFD.H" #include "dynamicFvMesh.H" #include "multiphaseMixture.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" #include "fixedFluxPressureFvPatchScalarField.H" diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C index fdd93eae5..78bed884e 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ Description #include "fvCFD.H" #include "multiphaseMixture.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" #include "fixedFluxPressureFvPatchScalarField.H" diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options b/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options index a597aafbc..72a106ba1 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options @@ -1,5 +1,6 @@ EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ @@ -10,9 +11,8 @@ EXE_INC = \ EXE_LIBS = \ -lincompressibleTransportModels \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lfiniteVolume \ -lmeshTools \ -lfvOptions \ diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/Make/options b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/Make/options index 6772c7f35..df44bd78a 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/Make/options +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/Make/options @@ -1,7 +1,8 @@ EXE_INC = \ -I.. \ -I../../interFoam/interDyMFoam \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ @@ -14,9 +15,8 @@ EXE_INC = \ EXE_LIBS = \ -lincompressibleTransportModels \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lfiniteVolume \ -ldynamicMesh \ -ldynamicFvMesh \ diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C index d44f3d2f0..cf0c1af3e 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C @@ -40,7 +40,7 @@ Description #include "fvCFD.H" #include "dynamicFvMesh.H" #include "singlePhaseTransportModel.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" #include "fixedFluxPressureFvPatchScalarField.H" diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C index 9cfe6f99e..4f4239890 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C @@ -36,7 +36,7 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" #include "fixedFluxPressureFvPatchScalarField.H" diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options b/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options index 53ea250a1..32f8d8e62 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options @@ -4,13 +4,12 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -ltwoPhaseMixture \ - -lincompressibleTransportModels \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lfiniteVolume diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C index 7593aeab1..4d1cdd3d9 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ Description #include "MULES.H" #include "subCycle.H" #include "incompressibleTwoPhaseMixture.H" -#include "turbulenceModel.H" +#include "turbulentTransportModel.H" #include "pimpleControl.H" #include "fixedFluxPressureFvPatchScalarField.H" diff --git a/applications/test/PisoFoam/Make/files b/applications/test/PisoFoam/Make/files deleted file mode 100644 index 340f8016c..000000000 --- a/applications/test/PisoFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -PisoFoam.C - -EXE = $(FOAM_USER_APPBIN)/PisoFoam diff --git a/applications/test/PisoFoam/Make/options b/applications/test/PisoFoam/Make/options deleted file mode 100644 index d14a833f1..000000000 --- a/applications/test/PisoFoam/Make/options +++ /dev/null @@ -1,14 +0,0 @@ -EXE_INC = \ - -I$(FOAM_SOLVERS)/incompressible/pisoFoam \ - -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -EXE_LIBS = \ - -lturbulenceModels \ - -lincompressibleTurbulenceModels \ - -lincompressibleTransportModels \ - -lfiniteVolume \ - -lmeshTools diff --git a/applications/test/PisoFoam/PisoFoam.C b/applications/test/PisoFoam/PisoFoam.C deleted file mode 100644 index e6fa77087..000000000 --- a/applications/test/PisoFoam/PisoFoam.C +++ /dev/null @@ -1,149 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Application - pisoFoam - -Description - Transient solver for incompressible flow. - - Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "singlePhaseTransportModel.H" -#include "turbulenceModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "setRootCase.H" - - #include "createTime.H" - #include "createMesh.H" - #include "createFields.H" - #include "initContinuityErrs.H" - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.loop()) - { - Info<< "Time = " << runTime.timeName() << nl << endl; - - #include "readPISOControls.H" - #include "CourantNo.H" - - // Pressure-velocity PISO corrector - { - // Momentum predictor - - fvVectorMatrix UEqn - ( - fvm::ddt(U) - + fvm::div(phi, U) - + turbulence->divDevReff(U) - ); - - UEqn.relax(); - - if (momentumPredictor) - { - solve(UEqn == -fvc::grad(p)); - } - - // --- PISO loop - - for (int corr=0; corr<nCorr; corr++) - { - volScalarField rAU(1.0/UEqn.A()); - - volVectorField HbyA("HbyA", U); - HbyA = rAU*UEqn.H(); - surfaceScalarField phiHbyA - ( - "phiHbyA", - (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtCorr(rAU, U, phi) - ); - - adjustPhi(phiHbyA, U, p); - - // Non-orthogonal pressure corrector loop - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - // Pressure corrector - - fvScalarMatrix pEqn - ( - fvm::laplacian(rAU, p) == fvc::div(phiHbyA) - ); - - pEqn.setReference(pRefCell, pRefValue); - - if - ( - corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver("pFinal")); - } - else - { - pEqn.solve(); - } - - if (nonOrth == nNonOrthCorr) - { - phi = phiHbyA - pEqn.flux(); - } - } - - #include "continuityErrs.H" - - U = HbyA - rAU*fvc::grad(p); - U.correctBoundaryConditions(); - } - } - - laminarTransport.correct(); - turbulence->correct(); - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/test/PisoFoam/turbulenceModel.H b/applications/test/PisoFoam/turbulenceModel.H deleted file mode 100644 index 77a4ab413..000000000 --- a/applications/test/PisoFoam/turbulenceModel.H +++ /dev/null @@ -1,9 +0,0 @@ -#include "IncompressibleTurbulenceModel.H" - -namespace Foam -{ - namespace incompressible - { - typedef IncompressibleTurbulenceModel<transportModel> turbulenceModel; - } -} diff --git a/applications/test/RhoPimpleFoam/EEqn.H b/applications/test/RhoPimpleFoam/EEqn.H deleted file mode 100644 index 9972bdfff..000000000 --- a/applications/test/RhoPimpleFoam/EEqn.H +++ /dev/null @@ -1,33 +0,0 @@ -{ - volScalarField& he = thermo.he(); - - fvScalarMatrix EEqn - ( - fvm::ddt(rho, he) + fvm::div(phi, he) - + fvc::ddt(rho, K) + fvc::div(phi, K) - + ( - he.name() == "e" - ? fvc::div - ( - fvc::absolute(phi/fvc::interpolate(rho), U), - p, - "div(phiv,p)" - ) - : -dpdt - ) - //- fvm::laplacian(turbulence->alphaEff(), he) - - fvm::laplacian(turbulence->muEff(), he) - == - fvOptions(rho, he) - ); - - EEqn.relax(); - - fvOptions.constrain(EEqn); - - EEqn.solve(); - - fvOptions.correct(he); - - thermo.correct(); -} diff --git a/applications/test/RhoPimpleFoam/Make/files b/applications/test/RhoPimpleFoam/Make/files deleted file mode 100644 index 087a67d21..000000000 --- a/applications/test/RhoPimpleFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -rhoPimpleFoam.C - -EXE = $(FOAM_USER_APPBIN)/RhoPimpleFoam diff --git a/applications/test/RhoPimpleFoam/Make/options b/applications/test/RhoPimpleFoam/Make/options deleted file mode 100644 index f8879e9ab..000000000 --- a/applications/test/RhoPimpleFoam/Make/options +++ /dev/null @@ -1,21 +0,0 @@ -EXE_INC = \ - -I$(FOAM_SOLVERS)/compressible/rhoPimpleFoam \ - -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/finiteVolume/cfdTools \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/fvOptions/lnInclude - -EXE_LIBS = \ - -lfluidThermophysicalModels \ - -lspecie \ - -lturbulenceModels \ - -lcompressibleTurbulenceModels \ - -lincompressibleTransportModels \ - -lfiniteVolume \ - -lmeshTools \ - -lsampling \ - -lfvOptions diff --git a/applications/test/RhoPimpleFoam/rhoPimpleFoam.C b/applications/test/RhoPimpleFoam/rhoPimpleFoam.C deleted file mode 100644 index a73e90e27..000000000 --- a/applications/test/RhoPimpleFoam/rhoPimpleFoam.C +++ /dev/null @@ -1,107 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Application - rhoPimpleFoam - -Description - Transient solver for laminar or turbulent flow of compressible fluids - for HVAC and similar applications. - - Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and - pseudo-transient simulations. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "psiThermo.H" -#include "turbulenceModel.H" -#include "bound.H" -#include "pimpleControl.H" -#include "fvIOoptionList.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "setRootCase.H" - #include "createTime.H" - #include "createMesh.H" - - pimpleControl pimple(mesh); - - #include "createFields.H" - #include "createFvOptions.H" - #include "initContinuityErrs.H" - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { - #include "readTimeControls.H" - #include "compressibleCourantNo.H" - #include "setDeltaT.H" - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - if (pimple.nCorrPIMPLE() <= 1) - { - #include "rhoEqn.H" - } - - // --- Pressure-velocity PIMPLE corrector loop - while (pimple.loop()) - { - #include "UEqn.H" - #include "EEqn.H" - - // --- Pressure corrector loop - while (pimple.correct()) - { - #include "pEqn.H" - } - - if (pimple.turbCorr()) - { - turbulence->correct(); - } - } - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/test/RhoPimpleFoam/turbulenceModel.H b/applications/test/RhoPimpleFoam/turbulenceModel.H deleted file mode 100644 index 23547aa0c..000000000 --- a/applications/test/RhoPimpleFoam/turbulenceModel.H +++ /dev/null @@ -1,9 +0,0 @@ -#include "CompressibleTurbulenceModel.H" - -namespace Foam -{ - namespace compressible - { - typedef CompressibleTurbulenceModel<fluidThermo> turbulenceModel; - } -} diff --git a/applications/utilities/mesh/advanced/PDRMesh/Make/options b/applications/utilities/mesh/advanced/PDRMesh/Make/options index 4ce2e001e..9544389ab 100644 --- a/applications/utilities/mesh/advanced/PDRMesh/Make/options +++ b/applications/utilities/mesh/advanced/PDRMesh/Make/options @@ -4,7 +4,9 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ + -lfluidThermophysicalModels \ -lmeshTools \ -ldynamicMesh \ - -lfiniteVolume \ - -lcompressibleRASModels + -lfiniteVolume diff --git a/applications/utilities/miscellaneous/foamDebugSwitches/Make/options b/applications/utilities/miscellaneous/foamDebugSwitches/Make/options index 43f0c24cb..23e78b6bf 100644 --- a/applications/utilities/miscellaneous/foamDebugSwitches/Make/options +++ b/applications/utilities/miscellaneous/foamDebugSwitches/Make/options @@ -6,9 +6,7 @@ EXE_LIBS = \ -lblockMesh \ -lchemistryModel \ -lcoalCombustion \ - -lcompressibleLESModels \ - -lcompressibleRASModels \ - -lcompressibleTurbulenceModel \ + -lcompressibleTurbulenceModels \ -lconversion \ -ldecompositionMethods \ -ldistributed \ @@ -25,27 +23,21 @@ EXE_LIBS = \ -lforces \ -lfvMotionSolvers \ -lgenericPatchFields \ - -lincompressibleLESModels \ - -lincompressibleRASModels \ -lincompressibleTransportModels \ - -lincompressibleTurbulenceModel \ + -lincompressibleTurbulenceModels \ -linterfaceProperties \ -lIOFunctionObjects \ -ljobControl \ -llagrangian \ -llagrangianIntermediate \ -llaminarFlameSpeedModels \ - -lLESdeltas \ - -lLESfilters \ -lliquidMixtureProperties \ -lliquidProperties \ -lmeshTools \ -lmolecularMeasurements \ -lmolecule \ -/* -lmultiphaseInterFoam */ \ -lODE \ -lOpenFOAM \ -/* -lphaseModel */ \ -lpotential \ -lradiationModels \ -lrandomProcesses \ @@ -63,5 +55,6 @@ EXE_LIBS = \ -lthermophysicalFunctions \ -ltopoChangerFvMesh \ -ltriSurface \ + -lturbulenceModels \ -ltwoPhaseProperties \ -lutilityFunctionObjects diff --git a/applications/utilities/miscellaneous/foamHelp/Make/options b/applications/utilities/miscellaneous/foamHelp/Make/options index 41ca9e9b5..8191b8b00 100644 --- a/applications/utilities/miscellaneous/foamHelp/Make/options +++ b/applications/utilities/miscellaneous/foamHelp/Make/options @@ -5,11 +5,8 @@ EXE_INC = \ EXE_LIBS = \ -lhelpTypes \ -lfiniteVolume \ - -lincompressibleTurbulenceModel \ - -lcompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lcompressibleRASModels \ - -lincompressibleLESModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ + -lcompressibleTurbulenceModels \ -lradiationModels \ -lfluidThermophysicalModels diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/Make/options b/applications/utilities/miscellaneous/foamHelp/helpTypes/Make/options index 01b25c79a..b3d092f10 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/Make/options +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/Make/options @@ -3,11 +3,8 @@ EXE_INC = \ LIB_LIBS = \ -lfiniteVolume \ - -lincompressibleTurbulenceModel \ - -lcompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lcompressibleRASModels \ - -lincompressibleLESModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ + -lcompressibleTurbulenceModels \ -lradiationModels \ -lfluidThermophysicalModels diff --git a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options index 012600720..220589ea7 100644 --- a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options +++ b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options @@ -1,7 +1,8 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \ @@ -9,13 +10,12 @@ EXE_INC = \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ + -lcompressibleTurbulenceModels \ -lincompressibleTransportModels \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ -lfluidThermophysicalModels \ -lspecie \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ -lfiniteVolume \ -lfvOptions \ -lmeshTools \ diff --git a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C index 246a36fcc..99d7de9b9 100644 --- a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C +++ b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -46,13 +46,8 @@ Description #include "fvIOoptionList.H" #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" - -#include "incompressible/RAS/RASModel/RASModel.H" -#include "incompressible/LES/LESModel/LESModel.H" - -#include "fluidThermo.H" -#include "compressible/RAS/RASModel/RASModel.H" -#include "compressible/LES/LESModel/LESModel.H" +#include "turbulentTransportModel.H" +#include "turbulentFluidThermoModel.H" using namespace Foam; diff --git a/applications/utilities/postProcessing/stressField/stressComponents/Make/options b/applications/utilities/postProcessing/stressField/stressComponents/Make/options index d1016e9d4..c5c3ac8e9 100644 --- a/applications/utilities/postProcessing/stressField/stressComponents/Make/options +++ b/applications/utilities/postProcessing/stressField/stressComponents/Make/options @@ -1,10 +1,8 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ - -I$(LIB_SRC)/transportModels + -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ + -lincompressibleTransportModels \ -lfiniteVolume \ - -lgenericPatchFields \ - -lincompressibleRASModels \ - -lincompressibleTransportModels + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/turbulence/R/Make/options b/applications/utilities/postProcessing/turbulence/R/Make/options index 27b70cae0..fefdc6b78 100644 --- a/applications/utilities/postProcessing/turbulence/R/Make/options +++ b/applications/utilities/postProcessing/turbulence/R/Make/options @@ -1,18 +1,19 @@ EXE_INC = \ - -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions \ - -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ + -lcompressibleTurbulenceModels \ -lincompressibleTransportModels \ - -lincompressibleRASModels \ -lfluidThermophysicalModels \ -lspecie \ - -lcompressibleRASModels \ -lfiniteVolume \ -lgenericPatchFields \ -lmeshTools \ diff --git a/applications/utilities/postProcessing/turbulence/R/R.C b/applications/utilities/postProcessing/turbulence/R/R.C index 708cda721..f487a13e5 100644 --- a/applications/utilities/postProcessing/turbulence/R/R.C +++ b/applications/utilities/postProcessing/turbulence/R/R.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,11 +30,9 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "turbulentTransportModel.H" +#include "turbulentFluidThermoModel.H" #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" - -#include "fluidThermo.H" -#include "compressible/turbulenceModel/turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options index 886256586..980dabb8d 100644 --- a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options +++ b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options @@ -1,11 +1,13 @@ EXE_INC = \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ + -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lincompressibleRASModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ - -lfiniteVolume \ - -lgenericPatchFields + -lgenericPatchFields \ + -lfiniteVolume diff --git a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C index 1982b4f24..ce074ccc5 100644 --- a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C +++ b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,8 +35,8 @@ Source files: \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "RASModel.H" +#include "singlePhaseTransportModel.H" +#include "turbulentTransportModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -133,4 +133,3 @@ int main(int argc, char *argv[]) // ************************************************************************* // - diff --git a/applications/utilities/postProcessing/velocityField/Pe/Make/options b/applications/utilities/postProcessing/velocityField/Pe/Make/options index 1d984aa9b..09f921715 100644 --- a/applications/utilities/postProcessing/velocityField/Pe/Make/options +++ b/applications/utilities/postProcessing/velocityField/Pe/Make/options @@ -1,21 +1,21 @@ EXE_INC = \ -I$(LIB_SRC)/postProcessing/postCalc \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ $(FOAM_LIBBIN)/postCalc.o \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ + -lcompressibleTurbulenceModels \ -lincompressibleTransportModels \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ -lfluidThermophysicalModels \ -lspecie \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ -lfiniteVolume \ -lgenericPatchFields \ -lmeshTools diff --git a/applications/utilities/postProcessing/velocityField/Pe/Pe.C b/applications/utilities/postProcessing/velocityField/Pe/Pe.C index 544a11692..e4d0833ba 100644 --- a/applications/utilities/postProcessing/velocityField/Pe/Pe.C +++ b/applications/utilities/postProcessing/velocityField/Pe/Pe.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,12 +36,9 @@ Description #include "calc.H" #include "fvc.H" +#include "turbulentTransportModel.H" +#include "turbulentFluidThermoModel.H" #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/RAS/RASModel/RASModel.H" -#include "incompressible/LES/LESModel/LESModel.H" -#include "fluidThermo.H" -#include "compressible/RAS/RASModel/RASModel.H" -#include "compressible/LES/LESModel/LESModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options b/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options index cd09f8d5b..c1b5ad47e 100644 --- a/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options +++ b/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ @@ -8,10 +8,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ - -lLESdeltas \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lreactionThermophysicalModels \ -lfiniteVolume \ -lgenericPatchFields \ diff --git a/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C b/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C index c45c48b35..8c80f0cf2 100644 --- a/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C +++ b/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "solidThermo.H" #include "wallFvPatch.H" diff --git a/applications/utilities/postProcessing/wall/wallShearStress/Make/options b/applications/utilities/postProcessing/wall/wallShearStress/Make/options index 240bf953b..3235acdec 100644 --- a/applications/utilities/postProcessing/wall/wallShearStress/Make/options +++ b/applications/utilities/postProcessing/wall/wallShearStress/Make/options @@ -1,14 +1,18 @@ EXE_INC = \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ + -lcompressibleTurbulenceModels \ -lincompressibleTransportModels \ - -lincompressibleRASModels \ -lfluidThermophysicalModels \ -lspecie \ - -lcompressibleRASModels \ -lfiniteVolume \ -lgenericPatchFields diff --git a/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C b/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C index 360f03b39..3cf944ea4 100644 --- a/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C +++ b/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,12 +34,9 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" - +#include "turbulentTransportModel.H" +#include "turbulentFluidThermoModel.H" #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/RAS/RASModel/RASModel.H" - -#include "fluidThermo.H" -#include "compressible/RAS/RASModel/RASModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/postProcessing/wall/yPlusLES/Make/options b/applications/utilities/postProcessing/wall/yPlusLES/Make/options index d7446846b..a3e31c220 100644 --- a/applications/utilities/postProcessing/wall/yPlusLES/Make/options +++ b/applications/utilities/postProcessing/wall/yPlusLES/Make/options @@ -1,13 +1,14 @@ EXE_INC = \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/incompressible/LES/LESModel \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/finiteVolume/lnInclude + -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ - -lincompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lfiniteVolume \ -lgenericPatchFields diff --git a/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C b/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C index e8d5f431a..731c6ea6b 100644 --- a/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C +++ b/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C @@ -31,8 +31,10 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "LESModel.H" +#include "singlePhaseTransportModel.H" +#include "turbulentTransportModel.H" +#include "nutWallFunctionFvPatchScalarField.H" + #include "nearWallDist.H" #include "wallFvPatch.H" @@ -50,7 +52,7 @@ int main(int argc, char *argv[]) { runTime.setTime(timeDirs[timeI], timeI); Info<< "Time = " << runTime.timeName() << endl; - fvMesh::readUpdateState state = mesh.readUpdate(); + mesh.readUpdate(); volScalarField yPlus ( diff --git a/applications/utilities/postProcessing/wall/yPlusRAS/Make/options b/applications/utilities/postProcessing/wall/yPlusRAS/Make/options index 27b70cae0..cacf4eb31 100644 --- a/applications/utilities/postProcessing/wall/yPlusRAS/Make/options +++ b/applications/utilities/postProcessing/wall/yPlusRAS/Make/options @@ -1,18 +1,20 @@ EXE_INC = \ - -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions \ - -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions \ + -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ + -lcompressibleTurbulenceModels \ -lincompressibleTransportModels \ - -lincompressibleRASModels \ -lfluidThermophysicalModels \ -lspecie \ - -lcompressibleRASModels \ -lfiniteVolume \ -lgenericPatchFields \ -lmeshTools \ diff --git a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C index c66f88373..dde81571e 100644 --- a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C +++ b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C @@ -34,14 +34,10 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" - -#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/RAS/RASModel/RASModel.H" -#include "nutWallFunction/nutWallFunctionFvPatchScalarField.H" - -#include "fluidThermo.H" -#include "compressible/RAS/RASModel/RASModel.H" -#include "mutWallFunction/mutWallFunctionFvPatchScalarField.H" +#include "singlePhaseTransportModel.H" +#include "turbulentTransportModel.H" +#include "turbulentFluidThermoModel.H" +#include "nutWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -53,8 +49,7 @@ void calcIncompressibleYPlus volScalarField& yPlus ) { - typedef incompressible::nutWallFunctionFvPatchScalarField - wallFunctionPatchField; + typedef nutWallFunctionFvPatchScalarField wallFunctionPatchField; #include "createPhi.H" @@ -105,8 +100,7 @@ void calcCompressibleYPlus volScalarField& yPlus ) { - typedef compressible::mutWallFunctionFvPatchScalarField - wallFunctionPatchField; + typedef nutWallFunctionFvPatchScalarField wallFunctionPatchField; IOobject rhoHeader ( @@ -145,31 +139,31 @@ void calcCompressibleYPlus ) ); - const volScalarField::GeometricBoundaryField mutPatches = - RASModel->mut()().boundaryField(); + const volScalarField::GeometricBoundaryField nutPatches = + RASModel->nut()().boundaryField(); - bool foundMutPatch = false; - forAll(mutPatches, patchi) + bool foundNutPatch = false; + forAll(nutPatches, patchi) { - if (isA<wallFunctionPatchField>(mutPatches[patchi])) + if (isA<wallFunctionPatchField>(nutPatches[patchi])) { - foundMutPatch = true; + foundNutPatch = true; - const wallFunctionPatchField& mutPw = + const wallFunctionPatchField& nutPw = dynamic_cast<const wallFunctionPatchField&> - (mutPatches[patchi]); + (nutPatches[patchi]); - yPlus.boundaryField()[patchi] = mutPw.yPlus(); + yPlus.boundaryField()[patchi] = nutPw.yPlus(); const scalarField& Yp = yPlus.boundaryField()[patchi]; Info<< "Patch " << patchi - << " named " << mutPw.patch().name() + << " named " << nutPw.patch().name() << " y+ : min: " << gMin(Yp) << " max: " << gMax(Yp) << " average: " << gAverage(Yp) << nl << endl; } } - if (!foundMutPatch) + if (!foundNutPatch) { Info<< " no " << wallFunctionPatchField::typeName << " patches" << endl; @@ -200,7 +194,7 @@ int main(int argc, char *argv[]) { runTime.setTime(timeDirs[timeI], timeI); Info<< "Time = " << runTime.timeName() << endl; - fvMesh::readUpdateState state = mesh.readUpdate(); + mesh.readUpdate(); volScalarField yPlus ( diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/Make/options b/applications/utilities/preProcessing/applyBoundaryLayer/Make/options index e4ea36c3c..9778b15c0 100644 --- a/applications/utilities/preProcessing/applyBoundaryLayer/Make/options +++ b/applications/utilities/preProcessing/applyBoundaryLayer/Make/options @@ -1,15 +1,15 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ - -lfiniteVolume \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lgenericPatchFields \ + -lfiniteVolume \ -lmeshTools diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C index 18fa6a61e..4f2a30fb5 100644 --- a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C +++ b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" -#include "RASModel.H" +#include "turbulentTransportModel.H" #include "wallDist.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/Make/files b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/Make/files deleted file mode 100644 index 41d3c8b6a..000000000 --- a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -applyWallFunctionBoundaryConditions.C - -EXE = $(FOAM_APPBIN)/applyWallFunctionBoundaryConditions diff --git a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/Make/options b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/Make/options deleted file mode 100644 index 60692ce67..000000000 --- a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/Make/options +++ /dev/null @@ -1,13 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude - -EXE_LIBS = \ - -lincompressibleRASModels \ - -lfluidThermophysicalModels \ - -lspecie \ - -lcompressibleRASModels \ - -lfiniteVolume \ - -lgenericPatchFields diff --git a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C deleted file mode 100644 index 95222a4a7..000000000 --- a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C +++ /dev/null @@ -1,363 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Application - applyWallFunctionBounaryConditions - -Description - Updates OpenFOAM RAS cases to use the new (v1.6) wall function framework. - - Attempts to determine whether case is compressible or incompressible, or - can be supplied with -compressible command line argument. - -\*---------------------------------------------------------------------------*/ - -#include "argList.H" -#include "fvMesh.H" -#include "Time.H" -#include "volFields.H" -#include "surfaceFields.H" - -#include "wallPolyPatch.H" - -#include "incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H" -#include "incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H" -#include "incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H" -#include "incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H" - -#include "compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H" -#include "compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H" -#include "compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.H" -#include "compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H" - -using namespace Foam; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -bool caseIsCompressible(const fvMesh& mesh) -{ - // Attempt flux field - IOobject phiHeader - ( - "phi", - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ); - - if (phiHeader.headerOk()) - { - surfaceScalarField phi(phiHeader, mesh); - if (phi.dimensions() == dimDensity*dimVelocity*dimArea) - { - return true; - } - } - - // Attempt density field - IOobject rhoHeader - ( - "rho", - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ); - - if (rhoHeader.headerOk()) - { - volScalarField rho(rhoHeader, mesh); - if (rho.dimensions() == dimDensity) - { - return true; - } - } - - // Attempt pressure field - IOobject pHeader - ( - "p", - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ); - - if (pHeader.headerOk()) - { - volScalarField p(pHeader, mesh); - if (p.dimensions() == dimMass/sqr(dimTime)/dimLength) - { - return true; - } - } - - // If none of the above are true, assume that the case is incompressible - return false; -} - - -void createVolScalarField -( - const fvMesh& mesh, - const word& fieldName, - const dimensionSet& dims -) -{ - IOobject fieldHeader - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ); - - if (!fieldHeader.headerOk()) - { - Info<< "Creating field " << fieldName << nl << endl; - - volScalarField field - ( - IOobject - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimensionedScalar("zero", dims, 0.0) - ); - - field.write(); - } -} - - -void replaceBoundaryType -( - const fvMesh& mesh, - const word& fieldName, - const word& boundaryType, - const string& boundaryValue -) -{ - IOobject header - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ); - - if (!header.headerOk()) - { - return; - } - - Info<< "Updating boundary types for field " << header.name() << endl; - - const word oldTypeName = IOdictionary::typeName; - const_cast<word&>(IOdictionary::typeName) = word::null; - - IOdictionary dict(header); - - const_cast<word&>(IOdictionary::typeName) = oldTypeName; - const_cast<word&>(dict.type()) = dict.headerClassName(); - - // Make a backup of the old file - if (mvBak(dict.objectPath(), "old")) - { - Info<< " Backup original file to " - << (dict.objectPath() + ".old") << endl; - } - - // Loop through boundary patches and update - const polyBoundaryMesh& bMesh = mesh.boundaryMesh(); - dictionary& boundaryDict = dict.subDict("boundaryField"); - forAll(bMesh, patchI) - { - if (isA<wallPolyPatch>(bMesh[patchI])) - { - word patchName = bMesh[patchI].name(); - dictionary& oldPatch = boundaryDict.subDict(patchName); - - dictionary newPatch(dictionary::null); - newPatch.add("type", boundaryType); - newPatch.add("value", ("uniform " + boundaryValue).c_str()); - - oldPatch = newPatch; - } - } - - Info<< " writing updated " << dict.name() << nl << endl; - dict.regIOobject::write(); -} - - -void updateCompressibleCase(const fvMesh& mesh) -{ - Info<< "Case treated as compressible" << nl << endl; - createVolScalarField - ( - mesh, - "mut", - dimArea/dimTime*dimDensity - ); - replaceBoundaryType - ( - mesh, - "mut", - compressible::mutkWallFunctionFvPatchScalarField::typeName, - "0" - ); - replaceBoundaryType - ( - mesh, - "epsilon", - compressible::epsilonWallFunctionFvPatchScalarField::typeName, - "0" - ); - replaceBoundaryType - ( - mesh, - "omega", - compressible::omegaWallFunctionFvPatchScalarField::typeName, - "0" - ); - replaceBoundaryType - ( - mesh, - "k", - compressible::kqRWallFunctionFvPatchField<scalar>::typeName, - "0" - ); - replaceBoundaryType - ( - mesh, - "q", - compressible::kqRWallFunctionFvPatchField<scalar>::typeName, - "0" - ); - replaceBoundaryType - ( - mesh, - "R", - compressible::kqRWallFunctionFvPatchField<symmTensor>:: - typeName, - "(0 0 0 0 0 0)" - ); -} - - -void updateIncompressibleCase(const fvMesh& mesh) -{ - Info<< "Case treated as incompressible" << nl << endl; - createVolScalarField(mesh, "nut", dimArea/dimTime); - - replaceBoundaryType - ( - mesh, - "nut", - incompressible::nutkWallFunctionFvPatchScalarField::typeName, - "0" - ); - replaceBoundaryType - ( - mesh, - "epsilon", - incompressible::epsilonWallFunctionFvPatchScalarField:: - typeName, - "0" - ); - replaceBoundaryType - ( - mesh, - "omega", - incompressible::omegaWallFunctionFvPatchScalarField:: - typeName, - "0" - ); - replaceBoundaryType - ( - mesh, - "k", - incompressible::kqRWallFunctionFvPatchField<scalar>::typeName, - "0" - ); - replaceBoundaryType - ( - mesh, - "q", - incompressible::kqRWallFunctionFvPatchField<scalar>::typeName, - "0" - ); - replaceBoundaryType - ( - mesh, - "R", - incompressible::kqRWallFunctionFvPatchField<symmTensor>::typeName, - "(0 0 0 0 0 0)" - ); -} - - -int main(int argc, char *argv[]) -{ - #include "addTimeOptions.H" - argList::addBoolOption - ( - "compressible", - "force use of compressible wall functions. Default is auto-detect." - ); - - #include "setRootCase.H" - #include "createTime.H" - #include "createMesh.H" - - const bool compressible = args.optionFound("compressible"); - - Info<< "Updating turbulence fields to operate using new run time " - << "selectable" << nl << "wall functions" - << nl << endl; - - if (compressible || caseIsCompressible(mesh)) - { - updateCompressibleCase(mesh); - } - else - { - updateIncompressibleCase(mesh); - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/Make/options b/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/Make/options index a5b0bb577..c719bbebe 100644 --- a/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/Make/options +++ b/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/Make/options @@ -3,4 +3,5 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lcompressibleTurbulenceModel + -lturbulenceModels \ + -lcompressibleTurbulenceModels diff --git a/applications/utilities/preProcessing/faceAgglomerate/Make/options b/applications/utilities/preProcessing/faceAgglomerate/Make/options index c2b07c702..3facebbe1 100644 --- a/applications/utilities/preProcessing/faceAgglomerate/Make/options +++ b/applications/utilities/preProcessing/faceAgglomerate/Make/options @@ -4,7 +4,6 @@ EXE_INC = \ -I$(LIB_SRC)/fvAgglomerationMethods/pairPatchAgglomeration/lnInclude EXE_LIBS = \ - -lOpenFOAM \ -lfiniteVolume \ -lpairPatchAgglomeration \ -ltriSurface \ diff --git a/applications/utilities/preProcessing/viewFactorsGen/Make/options b/applications/utilities/preProcessing/viewFactorsGen/Make/options index b0dbd4000..89eb06d82 100644 --- a/applications/utilities/preProcessing/viewFactorsGen/Make/options +++ b/applications/utilities/preProcessing/viewFactorsGen/Make/options @@ -8,7 +8,6 @@ EXE_INC = \ EXE_LIBS = \ -lmeshTools \ -lfiniteVolume \ - -lOpenFOAM \ -lmeshTools \ -ltriSurface \ -ldistributed \ diff --git a/src/Allwmake b/src/Allwmake index 925b3f211..c0ea041c3 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -61,7 +61,6 @@ wmake $targetType randomProcesses transportModels/Allwmake $targetType $* thermophysicalModels/Allwmake $targetType $* -turbulenceModels/Allwmake $targetType $* TurbulenceModels/Allwmake $targetType $* wmake $targetType combustionModels regionModels/Allwmake $targetType $* diff --git a/src/OpenFOAM/global/constants/physicoChemical/physicoChemicalConstants.H b/src/OpenFOAM/global/constants/physicoChemical/physicoChemicalConstants.H index 40cee9b5f..93c7e16ac 100644 --- a/src/OpenFOAM/global/constants/physicoChemical/physicoChemicalConstants.H +++ b/src/OpenFOAM/global/constants/physicoChemical/physicoChemicalConstants.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.C b/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.C index 97ecb28ec..92b7aa226 100644 --- a/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.C +++ b/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,6 +31,7 @@ template<class TransportModel> Foam::CompressibleTurbulenceModel<TransportModel>:: CompressibleTurbulenceModel ( + const word& type, const geometricOneField& alpha, const volScalarField& rho, const volVectorField& U, diff --git a/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.H b/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.H index 38ba5f90f..0a9cdfe58 100644 --- a/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.H +++ b/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -72,6 +72,7 @@ public: //- Construct CompressibleTurbulenceModel ( + const word& type, const geometricOneField& alpha, const volScalarField& rho, const volVectorField& U, diff --git a/src/TurbulenceModels/compressible/Make/files b/src/TurbulenceModels/compressible/Make/files index c4107f105..2f6e9f1dd 100644 --- a/src/TurbulenceModels/compressible/Make/files +++ b/src/TurbulenceModels/compressible/Make/files @@ -1,4 +1,19 @@ compressibleTurbulenceModel.C -compressibleTurbulenceModels.C +turbulentFluidThermoModels/turbulentFluidThermoModels.C + +BCs = turbulentFluidThermoModels/derivedFvPatchFields +$(BCs)/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C +$(BCs)/temperatureCoupledBase/temperatureCoupledBase.C +$(BCs)/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C +$(BCs)/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C +$(BCs)/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C +$(BCs)/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C +$(BCs)/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C +$(BCs)/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C +$(BCs)/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C +$(BCs)/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C + +turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C +turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C LIB = $(FOAM_LIBBIN)/libcompressibleTurbulenceModels diff --git a/src/TurbulenceModels/compressible/Make/options b/src/TurbulenceModels/compressible/Make/options index 55388cb59..1d4b638c6 100644 --- a/src/TurbulenceModels/compressible/Make/options +++ b/src/TurbulenceModels/compressible/Make/options @@ -4,11 +4,15 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/solidSpecie/lnInclude LIB_LIBS = \ -lfiniteVolume \ -lmeshTools \ -lfluidThermophysicalModels \ + -lsolidThermo \ + -lsolidSpecie \ -lturbulenceModels \ -lspecie diff --git a/src/TurbulenceModels/compressible/SpecificCompressibleTurbulenceModel/SpecificCompressibleTurbulenceModel.C b/src/TurbulenceModels/compressible/SpecificCompressibleTurbulenceModel/SpecificCompressibleTurbulenceModel.C new file mode 100644 index 000000000..b7430341b --- /dev/null +++ b/src/TurbulenceModels/compressible/SpecificCompressibleTurbulenceModel/SpecificCompressibleTurbulenceModel.C @@ -0,0 +1,99 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "SpecificCompressibleTurbulenceModel.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class BasicCompressibleTurbulenceModel> +Foam::SpecificCompressibleTurbulenceModel +< + BasicCompressibleTurbulenceModel +>::SpecificCompressibleTurbulenceModel +( + const word& type, + const geometricOneField& alpha, + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, + const surfaceScalarField& phi, + const transportModel& transport, + const word& propertiesName +) +: + BasicCompressibleTurbulenceModel + ( + type, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ) +{} + + +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +template<class BasicCompressibleTurbulenceModel> +Foam::autoPtr +< + Foam::SpecificCompressibleTurbulenceModel + < + BasicCompressibleTurbulenceModel + > +> +Foam::SpecificCompressibleTurbulenceModel +< + BasicCompressibleTurbulenceModel +>::New +( + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& phi, + const transportModel& transport, + const word& propertiesName +) +{ + return autoPtr<SpecificCompressibleTurbulenceModel> + ( + static_cast<SpecificCompressibleTurbulenceModel*>( + BasicCompressibleTurbulenceModel::New + ( + geometricOneField(), + rho, + U, + phi, + phi, + transport, + propertiesName + ).ptr()) + ); +} + + +// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/DESModel/DESModel.H b/src/TurbulenceModels/compressible/SpecificCompressibleTurbulenceModel/SpecificCompressibleTurbulenceModel.H similarity index 56% rename from src/turbulenceModels/compressible/LES/DESModel/DESModel.H rename to src/TurbulenceModels/compressible/SpecificCompressibleTurbulenceModel/SpecificCompressibleTurbulenceModel.H index bf0532e03..d8cacd876 100644 --- a/src/turbulenceModels/compressible/LES/DESModel/DESModel.H +++ b/src/TurbulenceModels/compressible/SpecificCompressibleTurbulenceModel/SpecificCompressibleTurbulenceModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,93 +22,89 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::compressible::DESModel - -Group - grpCmpDESTurbulence + Foam::SpecificCompressibleTurbulenceModel Description - Extension of LES models to provide an interface for Detached Eddy - Simulation turbulence models - -SeeAlso - Foam::LESModel + Templated abstract base class for specific (RAS/LES) compressible + turbulence models SourceFiles - DESModel.C + SpecificCompressibleTurbulenceModel.C \*---------------------------------------------------------------------------*/ -#ifndef compressibleDESModel_H -#define compressibleDESModel_H - -// note: use full(er) path so that derived utilities can bring in -// incompressible and compressible variants +#ifndef SpecificCompressibleTurbulenceModel_H +#define SpecificCompressibleTurbulenceModel_H -#include "compressible/LES/LESModel/LESModel.H" +#include "CompressibleTurbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace compressible -{ /*---------------------------------------------------------------------------*\ - Class DESModel Declaration + Class SpecificCompressibleTurbulenceModel Declaration \*---------------------------------------------------------------------------*/ -class DESModel +template<class BasicCompressibleTurbulenceModel> +class SpecificCompressibleTurbulenceModel : - public LESModel + public BasicCompressibleTurbulenceModel { -private: - - // Private Member Functions - - //- Disallow default bitwise copy construct - DESModel(const DESModel&); - - //- Disallow default bitwise assignment - DESModel& operator=(const DESModel&); - - public: + typedef typename BasicCompressibleTurbulenceModel::transportModel + transportModel; + // Constructors //- Construct from components - DESModel + SpecificCompressibleTurbulenceModel ( const word& type, + const geometricOneField& alpha, const volScalarField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName + const transportModel& transport, + const word& propertiesName ); //- Destructor - virtual ~DESModel() + virtual ~SpecificCompressibleTurbulenceModel() {} - // Public Member Functions + // Selectors - //- Return the LES field indicator - virtual tmp<volScalarField> LESRegion() const = 0; + //- Return a reference to the selected RAS model + static autoPtr<SpecificCompressibleTurbulenceModel> New + ( + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& phi, + const transportModel& transport, + const word& propertiesName = turbulenceModel::propertiesName + ); }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace compressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository +# include "SpecificCompressibleTurbulenceModel.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/TurbulenceModels/compressible/compressibleTurbulenceModel.H b/src/TurbulenceModels/compressible/compressibleTurbulenceModel.H index 533d8992b..0019bd281 100644 --- a/src/TurbulenceModels/compressible/compressibleTurbulenceModel.H +++ b/src/TurbulenceModels/compressible/compressibleTurbulenceModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -98,6 +98,12 @@ public: // Member functions + //- Return the density field + const volScalarField& rho() const + { + return rho_; + } + //- Return the volumetric flux field virtual tmp<surfaceScalarField> phi() const; diff --git a/src/TurbulenceModels/compressible/eddyDiffusivity/eddyDiffusivity.C b/src/TurbulenceModels/compressible/eddyDiffusivity/eddyDiffusivity.C new file mode 100644 index 000000000..a6dbee759 --- /dev/null +++ b/src/TurbulenceModels/compressible/eddyDiffusivity/eddyDiffusivity.C @@ -0,0 +1,146 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "eddyDiffusivity.H" + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +void Foam::eddyDiffusivity<BasicTurbulenceModel>::correctAlphat() +{ + alphat_ = this->rho_*this->nut()/Prt_; + alphat_.correctBoundaryConditions(); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +Foam::eddyDiffusivity<BasicTurbulenceModel>::eddyDiffusivity +( + const word& type, + const geometricOneField& alpha, + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, + const surfaceScalarField& phi, + const transportModel& transport, + const word& propertiesName +) +: + BasicTurbulenceModel + ( + type, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ), + + // Prt_ + // ( + // dimensioned<scalar>::lookupOrAddToDict + // ( + // "Prt", + // this->coeffDict_, + // 1.0 + // ) + // ), + + Prt_("Prt", dimless, 1.0), + + alphat_ + ( + IOobject + ( + "alphat", + this->runTime_.timeName(), + this->mesh_, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + this->mesh_ + ) +{} + + +// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +Foam::autoPtr<Foam::eddyDiffusivity<BasicTurbulenceModel> > +Foam::eddyDiffusivity<BasicTurbulenceModel>::New +( + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& phi, + const transportModel& transport, + const word& propertiesName +) +{ + return autoPtr<eddyDiffusivity> + ( + static_cast<eddyDiffusivity*>( + BasicTurbulenceModel::New + ( + rho, + U, + phi, + transport, + propertiesName + ).ptr()) + ); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +bool Foam::eddyDiffusivity<BasicTurbulenceModel>::read() +{ + if (BasicTurbulenceModel::read()) + { + Prt_.readIfPresent(this->coeffDict()); + + return true; + } + else + { + return false; + } +} + + +template<class BasicTurbulenceModel> +void Foam::eddyDiffusivity<BasicTurbulenceModel>::correct() +{ + BasicTurbulenceModel::correct(); + correctAlphat(); +} + + +// ************************************************************************* // diff --git a/src/TurbulenceModels/compressible/eddyDiffusivity/eddyDiffusivity.H b/src/TurbulenceModels/compressible/eddyDiffusivity/eddyDiffusivity.H new file mode 100644 index 000000000..18d5c9828 --- /dev/null +++ b/src/TurbulenceModels/compressible/eddyDiffusivity/eddyDiffusivity.H @@ -0,0 +1,180 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::eddyDiffusivity + +Description + Templated abstract base class for single-phase compressible + turbulence models. + +SourceFiles + eddyDiffusivity.C + +\*---------------------------------------------------------------------------*/ + +#ifndef eddyDiffusivity_H +#define eddyDiffusivity_H + +#include "CompressibleTurbulenceModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class eddyDiffusivity Declaration +\*---------------------------------------------------------------------------*/ + +template<class BasicTurbulenceModel> +class eddyDiffusivity +: + public BasicTurbulenceModel +{ + +protected: + + // Protected data + + // Model coefficients + + dimensionedScalar Prt_; + + // Fields + + volScalarField alphat_; + + + // Protected Member Functions + + virtual void correctAlphat(); + + +public: + + typedef typename BasicTurbulenceModel::alphaField alphaField; + typedef typename BasicTurbulenceModel::rhoField rhoField; + typedef typename BasicTurbulenceModel::transportModel transportModel; + + + // Constructors + + //- Construct + eddyDiffusivity + ( + const word& type, + const geometricOneField& alpha, + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, + const surfaceScalarField& phi, + const transportModel& trasport, + const word& propertiesName + ); + + + // Selectors + + //- Return a reference to the selected turbulence model + static autoPtr<eddyDiffusivity> New + ( + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& phi, + const transportModel& trasportModel, + const word& propertiesName = turbulenceModel::propertiesName + ); + + + //- Destructor + virtual ~eddyDiffusivity() + {} + + + // Member Functions + + //- Re-read model coefficients if they have changed + virtual bool read(); + + //- Return the turbulent thermal diffusivity for enthalpy [kg/m/s] + virtual tmp<volScalarField> alphat() const + { + return alphat_; + } + + //- Return the turbulent thermal diffusivity for enthalpy for a patch + // [kg/m/s] + virtual tmp<scalarField> alphat(const label patchi) const + { + return alphat()().boundaryField()[patchi]; + } + + //- Return the effective turbulent thermal diffusivity for temperature + // [J/m/s/K] + virtual tmp<volScalarField> kappaEff() const + { + return this->transport_.kappaEff(alphat()); + } + + //- Return the effective turbulent thermal diffusivity for temperature + // [J/m/s/K] + virtual tmp<scalarField> kappaEff(const label patchi) const + { + return this->transport_.kappaEff(alphat(patchi), patchi); + } + + //- Return the effective turbulent thermal diffusivity for enthalpy + // [kg/m/s] + virtual tmp<volScalarField> alphaEff() const + { + return this->transport_.alphaEff(alphat()); + } + + //- Return the effective turbulent thermal diffusivity for enthalpy + // for a patch [kg/m/s] + virtual tmp<scalarField> alphaEff(const label patchi) const + { + return this->transport_.alphaEff(alphat(patchi), patchi); + } + + //- Correct the turbulent thermal diffusivity for enthalpy + virtual void correct(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "eddyDiffusivity.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/TurbulenceModels/compressible/thermalDiffusivity/thermalDiffusivity.C b/src/TurbulenceModels/compressible/thermalDiffusivity/thermalDiffusivity.C new file mode 100644 index 000000000..5b25fe8d8 --- /dev/null +++ b/src/TurbulenceModels/compressible/thermalDiffusivity/thermalDiffusivity.C @@ -0,0 +1,124 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "thermalDiffusivity.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class TransportModel> +Foam::thermalDiffusivity<TransportModel>::thermalDiffusivity +( + const word& type, + const geometricOneField& alpha, + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, + const surfaceScalarField& phi, + const transportModel& transport, + const word& propertiesName +) +: + CompressibleTurbulenceModel<TransportModel> + ( + type, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ) +{} + + +// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // + +template<class TransportModel> +Foam::autoPtr<Foam::thermalDiffusivity<TransportModel> > +Foam::thermalDiffusivity<TransportModel>::New +( + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& phi, + const transportModel& transport, + const word& propertiesName +) +{ + return autoPtr<thermalDiffusivity> + ( + static_cast<thermalDiffusivity*>( + CompressibleTurbulenceModel<transportModel>::New + ( + rho, + U, + phi, + transport, + propertiesName + ).ptr()) + ); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +Foam::tmp<Foam::volScalarField> +Foam::thermalDiffusivity<BasicTurbulenceModel>::alphat() const +{ + return tmp<volScalarField> + ( + new volScalarField + ( + IOobject + ( + IOobject::groupName("alphat", this->U_.group()), + this->runTime_.timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + this->mesh_, + dimensionedScalar("alphat", dimDensity*dimViscosity, 0.0) + ) + ); +} + + +template<class BasicTurbulenceModel> +Foam::tmp<Foam::scalarField> +Foam::thermalDiffusivity<BasicTurbulenceModel>::alphat +( + const label patchi +) const +{ + return tmp<scalarField> + ( + new scalarField(this->mesh_.boundary()[patchi].size(), 0.0) + ); +} + + +// ************************************************************************* // diff --git a/src/TurbulenceModels/compressible/thermalDiffusivity/thermalDiffusivity.H b/src/TurbulenceModels/compressible/thermalDiffusivity/thermalDiffusivity.H new file mode 100644 index 000000000..b62cfa2e9 --- /dev/null +++ b/src/TurbulenceModels/compressible/thermalDiffusivity/thermalDiffusivity.H @@ -0,0 +1,176 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::thermalDiffusivity + +Description + Templated abstract base class for single-phase compressible + turbulence models. + +SourceFiles + thermalDiffusivity.C + +\*---------------------------------------------------------------------------*/ + +#ifndef thermalDiffusivity_H +#define thermalDiffusivity_H + +#include "CompressibleTurbulenceModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class thermalDiffusivity Declaration +\*---------------------------------------------------------------------------*/ + +template<class TransportModel> +class thermalDiffusivity +: + public CompressibleTurbulenceModel<TransportModel> +{ + +public: + + typedef geometricOneField alphaField; + typedef volScalarField rhoField; + typedef TransportModel transportModel; + + + // Constructors + + //- Construct + thermalDiffusivity + ( + const word& type, + const geometricOneField& alpha, + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, + const surfaceScalarField& phi, + const transportModel& trasport, + const word& propertiesName + ); + + + // Selectors + + //- Return a reference to the selected turbulence model + static autoPtr<thermalDiffusivity> New + ( + const volScalarField& rho, + const volVectorField& U, + const surfaceScalarField& phi, + const transportModel& trasportModel, + const word& propertiesName = turbulenceModel::propertiesName + ); + + + //- Destructor + virtual ~thermalDiffusivity() + {} + + + // Member Functions + + //- Return the thermal diffusivity for temperature [J/m/s/K] + virtual tmp<volScalarField> kappa() const + { + return this->transport_.kappa(); + } + + //- Return the laminar thermal diffusivity for temperature on patch + // [J/m/s/K] + virtual tmp<scalarField> kappa(const label patchi) const + { + return this->transport_.kappa(patchi); + } + + //- Return the laminar thermal diffusivity for enthalpy [kg/m/s] + virtual tmp<volScalarField> alpha() const + { + return this->transport_.alpha(); + } + + //- Return the laminar thermal diffusivity for enthalpy on patch + // [kg/m/s] + virtual tmp<scalarField> alpha(const label patchi) const + { + return this->transport_.alpha(patchi); + } + + //- Return the turbulent thermal diffusivity for enthalpy [kg/m/s] + virtual tmp<volScalarField> alphat() const; + + //- Return the turbulent thermal diffusivity for enthalpy for a patch + // [kg/m/s] + virtual tmp<scalarField> alphat(const label patchi) const; + + //- Return the effective turbulent thermal diffusivity for temperature + // [J/m/s/K] + virtual tmp<volScalarField> kappaEff() const + { + return kappa(); + } + + //- Return the effective turbulent thermal diffusivity for temperature + // [J/m/s/K] + virtual tmp<scalarField> kappaEff(const label patchi) const + { + return kappa(patchi); + } + + //- Return the effective turbulent thermal diffusivity for enthalpy + // [kg/m/s] + virtual tmp<volScalarField> alphaEff() const + { + return alpha(); + } + + //- Return the effective turbulent thermal diffusivity for enthalpy + // for a patch [kg/m/s] + virtual tmp<scalarField> alphaEff(const label patchi) const + { + return alpha(patchi); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "thermalDiffusivity.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModelDoc.H b/src/TurbulenceModels/compressible/turbulenceModelDoc.H similarity index 94% rename from src/turbulenceModels/compressible/turbulenceModel/turbulenceModelDoc.H rename to src/TurbulenceModels/compressible/turbulenceModelDoc.H index 17bc21095..5722cee54 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModelDoc.H +++ b/src/TurbulenceModels/compressible/turbulenceModelDoc.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,5 +27,5 @@ License @{ This group contains compressible turbulence models. @} - + \*---------------------------------------------------------------------------*/ diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C similarity index 87% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C index 654054456..02e87c7a7 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "convectiveHeatTransferFvPatchScalarField.H" -#include "compressible/turbulenceModel/turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "fvPatchFieldMapper.H" #include "addToRunTimeSelectionTable.H" @@ -110,16 +110,26 @@ void convectiveHeatTransferFvPatchScalarField::updateCoeffs() const label patchi = patch().index(); - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); + const turbulenceModel& turbModel = db().lookupObject<turbulenceModel> + ( + IOobject::groupName + ( + turbulenceModel::propertiesName, + dimensionedInternalField().group() + ) + ); + const scalarField alphaEffw(turbModel.alphaEff(patchi)); - const scalarField& muw = turbModel.mu().boundaryField()[patchi]; + + const tmp<scalarField> tmuw = turbModel.mu(patchi); + const scalarField& muw = tmuw(); + const scalarField& rhow = turbModel.rho().boundaryField()[patchi]; const vectorField& Uc = turbModel.U(); const vectorField& Uw = turbModel.U().boundaryField()[patchi]; - const scalarField& Tw = turbModel.thermo().T().boundaryField()[patchi]; - const scalarField& pw = turbModel.thermo().p().boundaryField()[patchi]; - const scalarField Cpw(turbModel.thermo().Cp(pw, Tw, patchi)); + const scalarField& Tw = turbModel.transport().T().boundaryField()[patchi]; + const scalarField& pw = turbModel.transport().p().boundaryField()[patchi]; + const scalarField Cpw(turbModel.transport().Cp(pw, Tw, patchi)); const scalarField kappaw(Cpw*alphaEffw); const scalarField Pr(muw*Cpw/kappaw); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H similarity index 98% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H index cbbd7869b..f1af5d918 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C similarity index 95% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C index c4d54b83b..36b6ce879 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,11 +24,11 @@ License \*---------------------------------------------------------------------------*/ #include "externalCoupledTemperatureMixedFvPatchScalarField.H" +#include "turbulentFluidThermoModel.H" #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "OFstream.H" -#include "turbulenceModel.H" // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // @@ -127,7 +127,16 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::transferData scalarField qDot(this->patch().size(), 0.0); typedef compressible::turbulenceModel cmpTurbModelType; - static word turbName("turbulenceModel"); + + static word turbName + ( + IOobject::groupName + ( + turbulenceModel::propertiesName, + dimensionedInternalField().group() + ) + ); + static word thermoName("thermophysicalProperties"); if (db().foundObject<cmpTurbModelType>(turbName)) @@ -135,7 +144,7 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::transferData const cmpTurbModelType& turbModel = db().lookupObject<cmpTurbModelType>(turbName); - const basicThermo& thermo = turbModel.thermo(); + const basicThermo& thermo = turbModel.transport(); const fvPatchScalarField& hep = thermo.he().boundaryField()[patchI]; diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H similarity index 99% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H index 3d17d955a..47fb91531 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C similarity index 99% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C index e6470981e..27306f29c 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H similarity index 99% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H index ad4bc5fd8..0799e9dd7 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C similarity index 95% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C index b128e562e..ff6c5e9f2 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,7 +27,7 @@ License #include "volFields.H" #include "fluidThermo.H" #include "solidThermo.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" // * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * // @@ -111,10 +111,15 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa { typedef compressible::turbulenceModel turbulenceModel; - if (mesh.foundObject<turbulenceModel>("turbulenceModel")) + word turbName(turbulenceModel::propertiesName); + + if + ( + mesh.foundObject<turbulenceModel>(turbName) + ) { const turbulenceModel& turbModel = - mesh.lookupObject<turbulenceModel>("turbulenceModel"); + mesh.lookupObject<turbulenceModel>(turbName); return turbModel.kappaEff(patchI); } diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.H similarity index 98% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.H rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.H index f90c8d90f..7385c39df 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.H +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C similarity index 98% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C index 490bec5c7..caef41809 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,7 @@ License #include "volFields.H" #include "surfaceFields.H" #include "mappedPatchBase.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "mapDistribute.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -356,7 +356,7 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs() const compressible::turbulenceModel& turbModel = db().template lookupObject<compressible::turbulenceModel> ( - "turbulenceModel" + turbulenceModel::propertiesName ); // local properties @@ -383,7 +383,7 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs() // nrb properties scalarField nbrTp = - turbModel.thermo().T().boundaryField()[nbrPatchi]; + turbModel.transport().T().boundaryField()[nbrPatchi]; mapDist.distribute(nbrTp); // solid properties diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H similarity index 99% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H index bed019f4b..4df0d4382 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C similarity index 97% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C index ca3f23299..8eab80132 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.H similarity index 96% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.H rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.H index db7dcf0c9..8a3187abc 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.H +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C similarity index 91% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C index e3d00dea6..646fbed66 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,8 +29,7 @@ License #include "volFields.H" #include "surfaceFields.H" #include "IOobjectList.H" -#include "turbulenceModel.H" - +#include "turbulentFluidThermoModel.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField:: @@ -154,16 +153,22 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::updateCoeffs() const label patchI = patch().index(); - const compressible::turbulenceModel& turbulence = - db().lookupObject<compressible::turbulenceModel> - ( - "turbulenceModel" + const LESModel<eddyDiffusivity<compressible::turbulenceModel> >& turbModel = + db().lookupObject + < + LESModel<eddyDiffusivity<compressible::turbulenceModel> > + > ( + IOobject::groupName + ( + turbulenceModel::propertiesName, + dimensionedInternalField().group() + ) ); const fvsPatchField<scalar>& phip = patch().lookupPatchField<surfaceScalarField, scalar>(phiName_); - const scalarField alphap(turbulence.alphaEff(patchI)); + const scalarField alphap(turbModel.alphaEff(patchI)); refValue() = massFluxFraction_; refGrad() = 0.0; diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H similarity index 98% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H index 79a1da68e..a6313f71a 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C similarity index 99% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C index 9f0f1a336..4ebd0c180 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H similarity index 98% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H index 740183e35..fc816b3d6 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C similarity index 99% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C index dff61c398..d304e598e 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H similarity index 99% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H index ac17f3c33..862abc185 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C similarity index 99% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C index 19f8a971a..e610afc80 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.H similarity index 99% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.H rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.H index bbfe48c63..8c332402e 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.H +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C similarity index 92% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C index 16b69874f..98a5a05f5 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "alphatJayatillekeWallFunctionFvPatchScalarField.H" -#include "compressible/turbulenceModel/turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" @@ -199,16 +199,27 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs() const label patchi = patch().index(); - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); + // Retrieve turbulence properties from model + + const turbulenceModel& turbModel = db().lookupObject<turbulenceModel> + ( + IOobject::groupName + ( + turbulenceModel::propertiesName, + dimensionedInternalField().group() + ) + ); const scalar Cmu25 = pow025(Cmu_); const scalarField& y = turbModel.y()[patchi]; - const scalarField& muw = turbModel.mu().boundaryField()[patchi]; + const tmp<scalarField> tmuw = turbModel.mu(patchi); + const scalarField& muw = tmuw(); + + const tmp<scalarField> talphaw = turbModel.alpha(patchi); + const scalarField& alphaw = talphaw(); - const scalarField& alphaw = turbModel.alpha().boundaryField()[patchi]; scalarField& alphatw = *this; const tmp<volScalarField> tk = turbModel.k(); @@ -220,12 +231,12 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs() const scalarField& rhow = turbModel.rho().boundaryField()[patchi]; const fvPatchScalarField& hew = - turbModel.thermo().he().boundaryField()[patchi]; + turbModel.transport().he().boundaryField()[patchi]; // Heat flux [W/m2] - lagging alphatw const scalarField qDot ( - turbModel.thermo().alphaEff(alphatw, patchi)*hew.snGrad() + turbModel.transport().alphaEff(alphatw, patchi)*hew.snGrad() ); // Populate boundary values diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H similarity index 98% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H index 5a43d7773..2626bafc3 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C similarity index 82% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C index dcf694ad1..90d223600 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,7 +44,8 @@ alphatWallFunctionFvPatchScalarField::alphatWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - mutName_("mut"), + rhoName_("rho"), + nutName_("nut"), Prt_(0.85) {} @@ -58,7 +59,8 @@ alphatWallFunctionFvPatchScalarField::alphatWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(ptf, p, iF, mapper), - mutName_(ptf.mutName_), + rhoName_(ptf.rhoName_), + nutName_(ptf.nutName_), Prt_(ptf.Prt_) {} @@ -71,7 +73,8 @@ alphatWallFunctionFvPatchScalarField::alphatWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - mutName_(dict.lookupOrDefault<word>("mut", "mut")), + rhoName_(dict.lookupOrDefault<word>("rho", "rho")), + nutName_(dict.lookupOrDefault<word>("nut", "nut")), Prt_(dict.lookupOrDefault<scalar>("Prt", 0.85)) {} @@ -82,7 +85,8 @@ alphatWallFunctionFvPatchScalarField::alphatWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(awfpsf), - mutName_(awfpsf.mutName_), + rhoName_(awfpsf.rhoName_), + nutName_(awfpsf.nutName_), Prt_(awfpsf.Prt_) {} @@ -94,7 +98,8 @@ alphatWallFunctionFvPatchScalarField::alphatWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(awfpsf, iF), - mutName_(awfpsf.mutName_), + rhoName_(awfpsf.rhoName_), + nutName_(awfpsf.nutName_), Prt_(awfpsf.Prt_) {} @@ -108,10 +113,13 @@ void alphatWallFunctionFvPatchScalarField::updateCoeffs() return; } - const scalarField& mutw = - patch().lookupPatchField<volScalarField, scalar>(mutName_); + const scalarField& rhow = + patch().lookupPatchField<volScalarField, scalar>(rhoName_); - operator==(mutw/Prt_); + const scalarField& nutw = + patch().lookupPatchField<volScalarField, scalar>(nutName_); + + operator==(rhow*nutw/Prt_); fixedValueFvPatchScalarField::updateCoeffs(); } @@ -120,7 +128,8 @@ void alphatWallFunctionFvPatchScalarField::updateCoeffs() void alphatWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField<scalar>::write(os); - writeEntryIfDifferent<word>(os, "mut", "mut", mutName_); + writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_); + writeEntryIfDifferent<word>(os, "nut", "nut", nutName_); os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl; writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H similarity index 94% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H index 0500caec6..f44ee6b8c 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -50,7 +50,7 @@ Description \table Property | Description | Required | Default value - mut | turbulence viscosity field name | no | mut + nut | turbulence viscosity field name | no | nut Prt | turbulent Prandtl number | no | 0.85 \endtable @@ -59,7 +59,7 @@ Description myPatch { type alphatWallFunction; - mut mut; + nut nut; Prt 0.85; value uniform 0; // optional value entry } @@ -95,8 +95,11 @@ class alphatWallFunctionFvPatchScalarField { // Private data - //- Name of turbulent viscosity field (default = mut) - word mutName_; + //- Name of density field (default = rho) + word rhoName_; + + //- Name of turbulent viscosity field (default = nut) + word nutName_; //- Turbulent Prandtl number (default = 0.85) scalar Prt_; diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C similarity index 94% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C index 2efdccde5..bc5f23ced 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,7 @@ License #include "wallHeatTransferFvPatchScalarField.H" #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -151,7 +151,11 @@ void Foam::wallHeatTransferFvPatchScalarField::updateCoeffs() const compressible::turbulenceModel& turbModel = db().lookupObject<compressible::turbulenceModel> ( - "turbulenceModel" + IOobject::groupName + ( + turbulenceModel::propertiesName, + dimensionedInternalField().group() + ) ); const label patchi = patch().index(); diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H similarity index 98% rename from src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H index a33ce4e47..1524f6c0b 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/makeTurbulenceModel.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/makeTurbulenceModel.H new file mode 100644 index 000000000..ae0b0cb59 --- /dev/null +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/makeTurbulenceModel.H @@ -0,0 +1,128 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#define makeBaseTurbulenceModel(Alpha, Rho, baseModel, BaseModel, Transport) \ + \ + namespace Foam \ + { \ + typedef TurbulenceModel \ + < \ + Alpha, \ + Rho, \ + baseModel, \ + Transport \ + > Transport##baseModel; \ + \ + defineTemplateRunTimeSelectionTable \ + ( \ + Transport##baseModel, \ + dictionary \ + ); \ + \ + typedef BaseModel<Transport> Transport##BaseModel; \ + \ + \ + typedef laminar<Transport##BaseModel> Laminar##Transport##BaseModel; \ + \ + defineNamedTemplateTypeNameAndDebug(Laminar##Transport##BaseModel, 0); \ + \ + addToRunTimeSelectionTable \ + ( \ + Transport##baseModel, \ + Laminar##Transport##BaseModel, \ + dictionary \ + ); \ + \ + \ + typedef RASModel<eddyDiffusivity<Transport##BaseModel> > \ + RAS##Transport##BaseModel; \ + \ + defineNamedTemplateTypeNameAndDebug(RAS##Transport##BaseModel, 0); \ + \ + defineTemplateRunTimeSelectionTable \ + (RAS##Transport##BaseModel, dictionary); \ + \ + addToRunTimeSelectionTable \ + ( \ + Transport##baseModel, \ + RAS##Transport##BaseModel, \ + dictionary \ + ); \ + \ + \ + typedef LESModel<eddyDiffusivity<Transport##BaseModel> > \ + LES##Transport##BaseModel; \ + \ + defineNamedTemplateTypeNameAndDebug(LES##Transport##BaseModel, 0); \ + \ + defineTemplateRunTimeSelectionTable \ + (LES##Transport##BaseModel, dictionary); \ + \ + addToRunTimeSelectionTable \ + ( \ + Transport##baseModel, \ + LES##Transport##BaseModel, \ + dictionary \ + ); \ + } + + +#define makeTemplatedTurbulenceModel(BaseModel, SType, Type) \ + namespace Foam \ + { \ + namespace SType##Models \ + { \ + typedef Type<eddyDiffusivity<BaseModel> > Type##SType##BaseModel; \ + \ + defineNamedTemplateTypeNameAndDebug(Type##SType##BaseModel, 0); \ + \ + addToRunTimeSelectionTable \ + ( \ + SType##BaseModel, \ + Type##SType##BaseModel, \ + dictionary \ + ); \ + } \ + } + + +#define makeTurbulenceModel(BaseModel, SType, Type) \ + namespace Foam \ + { \ + namespace SType##Models \ + { \ + defineTypeNameAndDebug(Type, 0); \ + \ + addToRunTimeSelectionTable \ + ( \ + SType##BaseModel, \ + Type, \ + dictionary \ + ); \ + } \ + } + + +// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModel.H similarity index 57% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.H rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModel.H index a62cd0806..7725dee97 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.H +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -21,29 +21,54 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +Typedef + Foam::compressible::turbulenceModel + +Typedef + Foam::compressible::RASModel + +Typedef + Foam::compressible::LESModel + +Description + Typedefs for turbulence, RAS and LES models for compressible flow + based on the standard laminar transport package. + +SourceFiles + turbulentFluidThermoModels.C + \*---------------------------------------------------------------------------*/ -#ifndef kqRWallFunctionFvPatchFields_H -#define kqRWallFunctionFvPatchFields_H +#ifndef turbulentFluidThermoModel_H +#define turbulentFluidThermoModel_H -#include "kqRWallFunctionFvPatchField.H" -#include "fieldTypes.H" +#include "SpecificCompressibleTurbulenceModel.H" +#include "thermalDiffusivity.H" +#include "eddyDiffusivity.H" +#include "RASModel.H" +#include "LESModel.H" +#include "fluidThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace compressible -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + namespace compressible + { + typedef thermalDiffusivity<fluidThermo> turbulenceModel; -makePatchTypeFieldTypedefs(kqRWallFunction); + typedef SpecificCompressibleTurbulenceModel + < + RASModel<eddyDiffusivity<turbulenceModel> > + > RASModel; -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + typedef SpecificCompressibleTurbulenceModel + < + LESModel<eddyDiffusivity<turbulenceModel> > + > LESModel; + } +} -} // End namespace compressible -} // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/TurbulenceModels/compressible/compressibleTurbulenceModels.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModels.C similarity index 78% rename from src/TurbulenceModels/compressible/compressibleTurbulenceModels.C rename to src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModels.C index 054dee888..ad86b169a 100644 --- a/src/TurbulenceModels/compressible/compressibleTurbulenceModels.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,11 +23,13 @@ License \*---------------------------------------------------------------------------*/ -#include "CompressibleTurbulenceModel.H" #include "fluidThermo.H" #include "addToRunTimeSelectionTable.H" #include "makeTurbulenceModel.H" +#include "thermalDiffusivity.H" +#include "eddyDiffusivity.H" + #include "laminar.H" #include "RASModel.H" #include "LESModel.H" @@ -37,17 +39,20 @@ makeBaseTurbulenceModel geometricOneField, volScalarField, compressibleTurbulenceModel, - CompressibleTurbulenceModel, + thermalDiffusivity, fluidThermo ); #define makeRASModel(Type) \ makeTemplatedTurbulenceModel \ - (fluidThermoCompressibleTurbulenceModel, RAS, Type) + (fluidThermothermalDiffusivity, RAS, Type) #define makeLESModel(Type) \ makeTemplatedTurbulenceModel \ - (fluidThermoCompressibleTurbulenceModel, LES, Type) + (fluidThermothermalDiffusivity, LES, Type) + +#include "SpalartAllmaras.H" +makeRASModel(SpalartAllmaras); #include "kEpsilon.H" makeRASModel(kEpsilon); @@ -55,6 +60,9 @@ makeRASModel(kEpsilon); #include "buoyantKEpsilon.H" makeRASModel(buoyantKEpsilon); +#include "LaunderSharmaKE.H" +makeRASModel(LaunderSharmaKE); + #include "kOmegaSST.H" makeRASModel(kOmegaSST); @@ -64,5 +72,14 @@ makeLESModel(Smagorinsky); #include "kEqn.H" makeLESModel(kEqn); +#include "SpalartAllmarasDES.H" +makeLESModel(SpalartAllmarasDES); + +#include "SpalartAllmarasDDES.H" +makeLESModel(SpalartAllmarasDDES); + +#include "SpalartAllmarasIDDES.H" +makeLESModel(SpalartAllmarasIDDES); + // ************************************************************************* // diff --git a/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.C b/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.C index ce93b0d59..447af12ff 100644 --- a/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.C +++ b/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,12 +31,13 @@ template<class TransportModel> Foam::IncompressibleTurbulenceModel<TransportModel>:: IncompressibleTurbulenceModel ( + const word& type, const geometricOneField& alpha, const geometricOneField& rho, const volVectorField& U, const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, - const TransportModel& transportModel, + const TransportModel& transport, const word& propertiesName ) : @@ -53,7 +54,7 @@ IncompressibleTurbulenceModel U, alphaRhoPhi, phi, - transportModel, + transport, propertiesName ) {} @@ -67,7 +68,7 @@ Foam::IncompressibleTurbulenceModel<TransportModel>::New ( const volVectorField& U, const surfaceScalarField& phi, - const TransportModel& transportModel, + const TransportModel& transport, const word& propertiesName ) { @@ -87,7 +88,7 @@ Foam::IncompressibleTurbulenceModel<TransportModel>::New U, phi, phi, - transportModel, + transport, propertiesName ).ptr()) ); @@ -148,4 +149,23 @@ divDevRhoReff } +template<class TransportModel> +Foam::tmp<Foam::fvVectorMatrix> +Foam::IncompressibleTurbulenceModel<TransportModel>:: +divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + notImplemented + ( + "IncompressibleTurbulenceModel<TransportModel>::" + "divDevRhoReff(const volScalarField& rho, volVectorField& U)" + ); + + return divDevReff(U); +} + + // ************************************************************************* // diff --git a/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.H b/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.H index c0d4af42a..eb9d8bfb0 100644 --- a/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.H +++ b/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,6 +38,7 @@ SourceFiles #include "TurbulenceModel.H" #include "incompressibleTurbulenceModel.H" +#include "fvMatrix.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -72,12 +73,13 @@ public: //- Construct IncompressibleTurbulenceModel ( + const word& type, const geometricOneField& alpha, const geometricOneField& rho, const volVectorField& U, const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, - const TransportModel& trasportModel, + const TransportModel& transport, const word& propertiesName ); @@ -112,6 +114,13 @@ public: //- Return the source term for the momentum equation virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; + + //- Return the source term for the momentum equation + virtual tmp<fvVectorMatrix> divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; }; diff --git a/src/TurbulenceModels/incompressible/Make/files b/src/TurbulenceModels/incompressible/Make/files index 4b3ca65c1..4d4d5729b 100644 --- a/src/TurbulenceModels/incompressible/Make/files +++ b/src/TurbulenceModels/incompressible/Make/files @@ -1,4 +1,21 @@ incompressibleTurbulenceModel.C -incompressibleTurbulenceModels.C + +turbulentTransportModels/turbulentTransportModels.C +turbulentTransportModels/RAS/kOmega/kOmega.C +turbulentTransportModels/RAS/RNGkEpsilon/RNGkEpsilon.C +turbulentTransportModels/RAS/v2f/v2f.C +turbulentTransportModels/RAS/qZeta/qZeta.C +turbulentTransportModels/RAS/kkLOmega/kkLOmega.C +turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C +turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C +turbulentTransportModels/RAS/LienCubicKELowRe/LienCubicKELowRe.C +turbulentTransportModels/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C +turbulentTransportModels/RAS/nonlinearKEShih/nonlinearKEShih.C + +BCs = turbulentTransportModels/RAS/derivedFvPatchFields +$(BCs)/wallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C +$(BCs)/wallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C + +turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C LIB = $(FOAM_LIBBIN)/libincompressibleTurbulenceModels diff --git a/src/TurbulenceModels/incompressible/Make/options b/src/TurbulenceModels/incompressible/Make/options index 617607373..acb769c06 100644 --- a/src/TurbulenceModels/incompressible/Make/options +++ b/src/TurbulenceModels/incompressible/Make/options @@ -2,7 +2,7 @@ EXE_INC = \ -I../turbulenceModels/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/transportModels/incompressible/lnInclude + -I$(LIB_SRC)/transportModels LIB_LIBS = \ -lincompressibleTransportModels \ diff --git a/src/TurbulenceModels/incompressible/SpecificIncompressibleTurbulenceModel/SpecificIncompressibleTurbulenceModel.C b/src/TurbulenceModels/incompressible/SpecificIncompressibleTurbulenceModel/SpecificIncompressibleTurbulenceModel.C new file mode 100644 index 000000000..f6ba580c0 --- /dev/null +++ b/src/TurbulenceModels/incompressible/SpecificIncompressibleTurbulenceModel/SpecificIncompressibleTurbulenceModel.C @@ -0,0 +1,98 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "SpecificIncompressibleTurbulenceModel.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class BasicIncompressibleTurbulenceModel> +Foam::SpecificIncompressibleTurbulenceModel +< + BasicIncompressibleTurbulenceModel +>::SpecificIncompressibleTurbulenceModel +( + const word& type, + const geometricOneField& alpha, + const geometricOneField& rho, + const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, + const surfaceScalarField& phi, + const transportModel& transport, + const word& propertiesName +) +: + BasicIncompressibleTurbulenceModel + ( + type, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ) +{} + + +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +template<class BasicIncompressibleTurbulenceModel> +Foam::autoPtr +< + Foam::SpecificIncompressibleTurbulenceModel + < + BasicIncompressibleTurbulenceModel + > +> +Foam::SpecificIncompressibleTurbulenceModel +< + BasicIncompressibleTurbulenceModel +>::New +( + const volVectorField& U, + const surfaceScalarField& phi, + const transportModel& transport, + const word& propertiesName +) +{ + return autoPtr<SpecificIncompressibleTurbulenceModel> + ( + static_cast<SpecificIncompressibleTurbulenceModel*>( + BasicIncompressibleTurbulenceModel::New + ( + geometricOneField(), + geometricOneField(), + U, + phi, + phi, + transport, + propertiesName + ).ptr()) + ); +} + + +// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/DESModel/DESModel.H b/src/TurbulenceModels/incompressible/SpecificIncompressibleTurbulenceModel/SpecificIncompressibleTurbulenceModel.H similarity index 56% rename from src/turbulenceModels/incompressible/LES/DESModel/DESModel.H rename to src/TurbulenceModels/incompressible/SpecificIncompressibleTurbulenceModel/SpecificIncompressibleTurbulenceModel.H index 6aec3ee06..e7cc38118 100644 --- a/src/turbulenceModels/incompressible/LES/DESModel/DESModel.H +++ b/src/TurbulenceModels/incompressible/SpecificIncompressibleTurbulenceModel/SpecificIncompressibleTurbulenceModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,92 +22,88 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::incompressible::DESModel - -Group - grpIcoDESTurbulence + Foam::SpecificIncompressibleTurbulenceModel Description - Extension of LES models to provide an interface for Detached Eddy - Simulation turbulence models - -SeeAlso - Foam::LESModel + Templated abstract base class for specific (RAS/LES) incompressible + turbulence models SourceFiles - DESModel.C + SpecificIncompressibleTurbulenceModel.C \*---------------------------------------------------------------------------*/ -#ifndef incompressibleDESModel_H -#define incompressibleDESModel_H - -// note: use full(er) path so that derived utilities can bring in -// incompressible and compressible variants +#ifndef SpecificIncompressibleTurbulenceModel_H +#define SpecificIncompressibleTurbulenceModel_H -#include "incompressible/LES/LESModel/LESModel.H" +#include "IncompressibleTurbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace incompressible -{ /*---------------------------------------------------------------------------*\ - Class DESModel Declaration + Class SpecificIncompressibleTurbulenceModel Declaration \*---------------------------------------------------------------------------*/ -class DESModel +template<class BasicIncompressibleTurbulenceModel> +class SpecificIncompressibleTurbulenceModel : - public LESModel + public BasicIncompressibleTurbulenceModel { -private: - - // Private Member Functions - - //- Disallow default bitwise copy construct - DESModel(const DESModel&); - - //- Disallow default bitwise assignment - DESModel& operator=(const DESModel&); - - public: + typedef typename BasicIncompressibleTurbulenceModel::transportModel + transportModel; + // Constructors //- Construct from components - DESModel + SpecificIncompressibleTurbulenceModel ( const word& type, + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName + const word& propertiesName ); //- Destructor - virtual ~DESModel() + virtual ~SpecificIncompressibleTurbulenceModel() {} - // Public Member Functions + // Selectors - //- Return the LES field indicator - virtual tmp<volScalarField> LESRegion() const = 0; + //- Return a reference to the selected RAS model + static autoPtr<SpecificIncompressibleTurbulenceModel> New + ( + const volVectorField& U, + const surfaceScalarField& phi, + const transportModel& transport, + const word& propertiesName = turbulenceModel::propertiesName + ); }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository +# include "SpecificIncompressibleTurbulenceModel.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModelDoc.H b/src/TurbulenceModels/incompressible/turbulenceModelDoc.H similarity index 94% rename from src/turbulenceModels/incompressible/turbulenceModel/turbulenceModelDoc.H rename to src/TurbulenceModels/incompressible/turbulenceModelDoc.H index f9751dc54..2e5547351 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModelDoc.H +++ b/src/TurbulenceModels/incompressible/turbulenceModelDoc.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,5 +27,5 @@ License @{ This group contains incompressible turbulence models. @} - + \*---------------------------------------------------------------------------*/ diff --git a/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C similarity index 72% rename from src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C index c23bc4b0b..aa7e9457d 100644 --- a/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C @@ -24,10 +24,10 @@ License \*---------------------------------------------------------------------------*/ #include "LamBremhorstKE.H" +#include "wallDist.H" +#include "bound.H" #include "addToRunTimeSelectionTable.H" -#include "backwardsCompatibilityWallFunctions.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -42,18 +42,40 @@ namespace RASModels defineTypeNameAndDebug(LamBremhorstKE, 0); addToRunTimeSelectionTable(RASModel, LamBremhorstKE, dictionary); +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +void LamBremhorstKE::correctNut() +{ + nut_ = Cmu_*fMu_*sqr(k_)/epsilon_; + nut_.correctBoundaryConditions(); +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // LamBremhorstKE::LamBremhorstKE ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName, - const word& modelName + const word& propertiesName, + const word& type ) : - RASModel(modelName, U, phi, transport, turbulenceModelName), + eddyViscosity<incompressible::RASModel> + ( + type, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ), Cmu_ ( @@ -96,7 +118,7 @@ LamBremhorstKE::LamBremhorstKE ( IOobject ( - "k", + IOobject::groupName("k", U.group()), runTime_.timeName(), mesh_, IOobject::MUST_READ, @@ -109,7 +131,7 @@ LamBremhorstKE::LamBremhorstKE ( IOobject ( - "epsilon", + IOobject::groupName("epsilon", U.group()), runTime_.timeName(), mesh_, IOobject::MUST_READ, @@ -126,103 +148,24 @@ LamBremhorstKE::LamBremhorstKE ( sqr(scalar(1) - exp(-0.0165*(sqrt(k_)*y_/nu()))) *(scalar(1) + 20.5/(Rt_ + SMALL)) - ), - - nut_ - ( - IOobject - ( - "nut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateLowReNut("nut", mesh_) ) { bound(k_, kMin_); // already bounded: bound(epsilon_, epsilonMin_); - nut_ = Cmu_*fMu_*sqr(k_)/epsilon_; - nut_.correctBoundaryConditions(); - - printCoeffs(); + if (type == typeName) + { + correctNut(); + printCoeffs(type); + } } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp<volSymmTensorField> LamBremhorstKE::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - nut_*twoSymm(fvc::grad(U_)), - k_.boundaryField().types() - ) - ); -} - - -tmp<volSymmTensorField> LamBremhorstKE::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -nuEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> LamBremhorstKE::divDevReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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()) + if (eddyViscosity<incompressible::RASModel>::read()) { Cmu_.readIfPresent(coeffDict()); C1_.readIfPresent(coeffDict()); @@ -240,7 +183,7 @@ bool LamBremhorstKE::read() void LamBremhorstKE::correct() { - RASModel::correct(); + eddyViscosity<incompressible::RASModel>::correct(); if (!turbulence_) { @@ -293,9 +236,7 @@ void LamBremhorstKE::correct() solve(kEqn); bound(k_, kMin_); - - // Re-calculate viscosity - nut_ == Cmu_*fMu_*sqr(k_)/epsilon_; + correctNut(); } diff --git a/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.H similarity index 81% rename from src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.H index 30e590cad..4041e0452 100644 --- a/src/turbulenceModels/incompressible/RAS/LamBremhorstKE/LamBremhorstKE.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.H @@ -39,8 +39,8 @@ SourceFiles #ifndef LamBremhorstKE_H #define LamBremhorstKE_H -#include "RASModel.H" -#include "wallDist.H" +#include "turbulentTransportModel.H" +#include "eddyViscosity.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -57,7 +57,7 @@ namespace RASModels class LamBremhorstKE : - public RASModel + public eddyViscosity<incompressible::RASModel> { protected: @@ -80,7 +80,11 @@ protected: volScalarField Rt_; volScalarField fMu_; - volScalarField nut_; + + + // Protected Member Functions + + virtual void correctNut(); public: @@ -94,11 +98,14 @@ public: //- Construct from components LamBremhorstKE ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName + const word& propertiesName = turbulenceModel::propertiesName, + const word& type = typeName ); @@ -109,11 +116,8 @@ public: // Member Functions - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const - { - return nut_; - } + //- Read RASProperties dictionary + virtual bool read(); //- Return the effective diffusivity for k tmp<volScalarField> DkEff() const @@ -145,27 +149,8 @@ public: return epsilon_; } - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); }; diff --git a/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C similarity index 67% rename from src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.C rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C index 4065ab267..30f7de7b5 100644 --- a/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C @@ -24,10 +24,9 @@ License \*---------------------------------------------------------------------------*/ #include "LienCubicKE.H" +#include "bound.H" #include "addToRunTimeSelectionTable.H" -#include "backwardsCompatibilityWallFunctions.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -42,18 +41,82 @@ namespace RASModels defineTypeNameAndDebug(LienCubicKE, 0); addToRunTimeSelectionTable(RASModel, LienCubicKE, dictionary); +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +void LienCubicKE::correctNut() +{ + nut_ = + Cmu_*sqr(k_)/epsilon_ + // C5 term, implicit + + max + ( + C5viscosity_, + dimensionedScalar("0", C5viscosity_.dimensions(), 0.0) + ); + + nut_.correctBoundaryConditions(); +} + + +void LienCubicKE::correctNonlinearStress(const volTensorField& gradU) +{ + nonlinearStress_ = symm + ( + // quadratic terms + pow3(k_)/sqr(epsilon_) + *( + Ctau1_/fEta_ + *( + (gradU & gradU) + + (gradU & gradU)().T() + ) + + Ctau2_/fEta_*(gradU & gradU.T()) + + Ctau3_/fEta_*(gradU.T() & gradU) + ) + // cubic term C4 + - 20.0*pow4(k_)/pow3(epsilon_) + *pow3(Cmu_) + *( + ((gradU & gradU) & gradU.T()) + + ((gradU & gradU.T()) & gradU.T()) + - ((gradU.T() & gradU) & gradU) + - ((gradU.T() & gradU.T()) & gradU) + ) + // cubic term C5, explicit part + + min + ( + C5viscosity_, + dimensionedScalar("0", C5viscosity_.dimensions(), 0.0) + )*gradU + ); +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // LienCubicKE::LienCubicKE ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName, - const word& modelName + const word& propertiesName, + const word& type ) : - RASModel(modelName, U, phi, transport, turbulenceModelName), + nonlinearEddyViscosity<incompressible::RASModel> + ( + type, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ), C1_ ( @@ -150,25 +213,25 @@ LienCubicKE::LienCubicKE ( IOobject ( - "k", + IOobject::groupName("k", U.group()), runTime_.timeName(), mesh_, - IOobject::NO_READ, + IOobject::MUST_READ, IOobject::AUTO_WRITE ), - autoCreateK("k", mesh_) + mesh_ ), epsilon_ ( IOobject ( - "epsilon", + IOobject::groupName("epsilon", U.group()), runTime_.timeName(), mesh_, - IOobject::NO_READ, + IOobject::MUST_READ, IOobject::AUTO_WRITE ), - autoCreateEpsilon("epsilon", mesh_) + mesh_ ), eta_ @@ -182,142 +245,34 @@ LienCubicKE::LienCubicKE *sqrt(2.0*magSqr(0.5*(fvc::grad(U) - T(fvc::grad(U))))) ), Cmu_(2.0/(3.0*(A1_ + eta_ + alphaKsi_*ksi_))), - fEta_(A2_ + pow(eta_, 3.0)), + fEta_(A2_ + pow3(eta_)), C5viscosity_ ( - - 2.0*pow3(Cmu_)*pow4(k_)/pow3(epsilon_) + -2.0*pow3(Cmu_)*pow4(k_)/pow3(epsilon_) *( magSqr(fvc::grad(U) + T(fvc::grad(U))) - magSqr(fvc::grad(U) - T(fvc::grad(U))) ) - ), - - nut_ - ( - IOobject - ( - "nut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateNut("nut", mesh_) - ), - - nonlinearStress_ - ( - "nonlinearStress", - // quadratic terms - symm - ( - pow(k_, 3.0)/sqr(epsilon_) - *( - Ctau1_/fEta_ - *( - (fvc::grad(U) & fvc::grad(U)) - + (fvc::grad(U) & fvc::grad(U))().T() - ) - + Ctau2_/fEta_*(fvc::grad(U) & T(fvc::grad(U))) - + Ctau3_/fEta_*(T(fvc::grad(U)) & fvc::grad(U)) - ) - // cubic term C4 - - 20.0*pow(k_, 4.0)/pow(epsilon_, 3.0) - *pow(Cmu_, 3.0) - *( - ((fvc::grad(U) & fvc::grad(U)) & T(fvc::grad(U))) - + ((fvc::grad(U) & T(fvc::grad(U))) & T(fvc::grad(U))) - - ((T(fvc::grad(U)) & fvc::grad(U)) & fvc::grad(U)) - - ((T(fvc::grad(U)) & T(fvc::grad(U))) & fvc::grad(U)) - ) - ) ) { bound(k_, kMin_); // already bounded: bound(epsilon_, epsilonMin_); - nut_ = Cmu_*sqr(k_)/epsilon_ + C5viscosity_; - nut_.correctBoundaryConditions(); - - printCoeffs(); + if (type == typeName) + { + correctNut(); + correctNonlinearStress(fvc::grad(U)); + printCoeffs(type); + } } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp<volSymmTensorField> LienCubicKE::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - nut_*twoSymm(fvc::grad(U_)) + nonlinearStress_, - k_.boundaryField().types() - ) - ); -} - - -tmp<volSymmTensorField> LienCubicKE::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -nuEff()*dev(twoSymm(fvc::grad(U_))) + nonlinearStress_ - ) - ); -} - - -tmp<fvVectorMatrix> LienCubicKE::divDevReff(volVectorField& U) const -{ - return - ( - fvc::div(nonlinearStress_) - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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()) + if (nonlinearEddyViscosity<incompressible::RASModel>::read()) { C1_.readIfPresent(coeffDict()); C2_.readIfPresent(coeffDict()); @@ -341,7 +296,7 @@ bool LienCubicKE::read() void LienCubicKE::correct() { - RASModel::correct(); + nonlinearEddyViscosity<incompressible::RASModel>::correct(); if (!turbulence_) { @@ -404,38 +359,14 @@ void LienCubicKE::correct() eta_ = k_/epsilon_*sqrt(2.0*magSqr(0.5*(gradU + gradU.T()))); ksi_ = k_/epsilon_*sqrt(2.0*magSqr(0.5*(gradU - gradU.T()))); Cmu_ = 2.0/(3.0*(A1_ + eta_ + alphaKsi_*ksi_)); - fEta_ = A2_ + pow(eta_, 3.0); + fEta_ = A2_ + pow3(eta_); C5viscosity_ = - - 2.0*pow(Cmu_, 3.0)*pow(k_, 4.0)/pow(epsilon_, 3.0) + -2.0*pow3(Cmu_)*pow4(k_)/pow3(epsilon_) *(magSqr(gradU + gradU.T()) - magSqr(gradU - gradU.T())); - nut_ = Cmu_*sqr(k_)/epsilon_ + C5viscosity_; - nut_.correctBoundaryConditions(); - - nonlinearStress_ = symm - ( - // quadratic terms - pow(k_, 3.0)/sqr(epsilon_)* - ( - Ctau1_/fEta_* - ( - (gradU & gradU) - + (gradU & gradU)().T() - ) - + Ctau2_/fEta_*(gradU & gradU.T()) - + Ctau3_/fEta_*(gradU.T() & gradU) - ) - // cubic term C4 - - 20.0*pow(k_, 4.0)/pow(epsilon_, 3.0) - *pow(Cmu_, 3.0) - *( - ((gradU & gradU) & gradU.T()) - + ((gradU & gradU.T()) & gradU.T()) - - ((gradU.T() & gradU) & gradU) - - ((gradU.T() & gradU.T()) & gradU) - ) - ); + correctNut(); + correctNonlinearStress(gradU); } diff --git a/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.H similarity index 81% rename from src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.H index 9367a766e..411244cc7 100644 --- a/src/turbulenceModels/incompressible/RAS/LienCubicKE/LienCubicKE.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.H @@ -38,7 +38,8 @@ SourceFiles #ifndef LienCubicKE_H #define LienCubicKE_H -#include "RASModel.H" +#include "turbulentTransportModel.H" +#include "nonlinearEddyViscosity.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -55,7 +56,7 @@ namespace RASModels class LienCubicKE : - public RASModel + public nonlinearEddyViscosity<incompressible::RASModel> { protected: @@ -87,9 +88,11 @@ protected: volScalarField fEta_; volScalarField C5viscosity_; - volScalarField nut_; - volSymmTensorField nonlinearStress_; + // Protected Member Functions + + virtual void correctNut(); + virtual void correctNonlinearStress(const volTensorField& gradU); public: @@ -102,11 +105,14 @@ public: //- Construct from components LienCubicKE ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName + const word& propertiesName = turbulenceModel::propertiesName, + const word& type = typeName ); @@ -117,11 +123,8 @@ public: // Member Functions - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const - { - return nut_; - } + //- Read RASProperties dictionary + virtual bool read(); //- Return the effective diffusivity for k tmp<volScalarField> DkEff() const @@ -153,27 +156,8 @@ public: return epsilon_; } - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); }; diff --git a/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKELowRe/LienCubicKELowRe.C similarity index 69% rename from src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.C rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKELowRe/LienCubicKELowRe.C index 12a05b4fe..cef1ad5bf 100644 --- a/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKELowRe/LienCubicKELowRe.C @@ -24,11 +24,11 @@ License \*---------------------------------------------------------------------------*/ #include "LienCubicKELowRe.H" +#include "wallDist.H" #include "wallFvPatch.H" +#include "bound.H" #include "addToRunTimeSelectionTable.H" -#include "backwardsCompatibilityWallFunctions.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -43,18 +43,90 @@ namespace RASModels defineTypeNameAndDebug(LienCubicKELowRe, 0); addToRunTimeSelectionTable(RASModel, LienCubicKELowRe, dictionary); +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +tmp<volScalarField> LienCubicKELowRe::fMu() +{ + return + (scalar(1) - exp(-Am_*yStar_)) + /(scalar(1) - exp(-Aepsilon_*yStar_) + SMALL); +} + + +void LienCubicKELowRe::correctNut() +{ + nut_ = + Cmu_*fMu()*sqr(k_)/epsilon_ + // C5 term, implicit + + max + ( + C5viscosity_, + dimensionedScalar("0", C5viscosity_.dimensions(), 0.0) + ); + + nut_.correctBoundaryConditions(); +} + + +void LienCubicKELowRe::correctNonlinearStress(const volTensorField& gradU) +{ + nonlinearStress_ = symm + ( + // quadratic terms + pow3(k_)/sqr(epsilon_) + *( + Ctau1_/fEta_ + *( + (gradU & gradU) + + (gradU & gradU)().T() + ) + + Ctau2_/fEta_*(gradU & gradU.T()) + + Ctau3_/fEta_*(gradU.T() & gradU) + ) + // cubic term C4 + - 20.0*pow4(k_)/pow3(epsilon_) + *pow3(Cmu_) + *( + ((gradU & gradU) & gradU.T()) + + ((gradU & gradU.T()) & gradU.T()) + - ((gradU.T() & gradU) & gradU) + - ((gradU.T() & gradU.T()) & gradU) + ) + // cubic term C5, explicit part + + min + ( + C5viscosity_, + dimensionedScalar("0", C5viscosity_.dimensions(), 0.0) + )*gradU + ); +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // LienCubicKELowRe::LienCubicKELowRe ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName, - const word& modelName + const word& propertiesName, + const word& type ) : - RASModel(modelName, U, phi, transport, turbulenceModelName), + nonlinearEddyViscosity<incompressible::RASModel> + ( + type, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ), C1_ ( @@ -196,7 +268,7 @@ LienCubicKELowRe::LienCubicKELowRe ( IOobject ( - "k", + IOobject::groupName("k", U.group()), runTime_.timeName(), mesh_, IOobject::MUST_READ, @@ -209,7 +281,7 @@ LienCubicKELowRe::LienCubicKELowRe ( IOobject ( - "epsilon", + IOobject::groupName("epsilon", U.group()), runTime_.timeName(), mesh_, IOobject::MUST_READ, @@ -235,156 +307,32 @@ LienCubicKELowRe::LienCubicKELowRe C5viscosity_ ( - -2.0*pow3(Cmu_)*pow4(k_)/pow3(epsilon_) + -2.0*pow3(Cmu_)*pow4(k_)/pow3(epsilon_) *( - magSqr(fvc::grad(U) + T(fvc::grad(U))) - - magSqr(fvc::grad(U) - T(fvc::grad(U))) + magSqr(fvc::grad(U) + T(fvc::grad(U))) + - magSqr(fvc::grad(U) - T(fvc::grad(U))) ) ), - yStar_(sqrt(k_)*y_/nu() + SMALL), - - nut_ - ( - IOobject - ( - "nut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateLowReNut("nut", mesh_) - ), - - nonlinearStress_ - ( - "nonlinearStress", - symm - ( - // quadratic terms - pow3(k_)/sqr(epsilon_) - *( - Ctau1_/fEta_ - *( - (fvc::grad(U) & fvc::grad(U)) - + (fvc::grad(U) & fvc::grad(U))().T() - ) - + Ctau2_/fEta_*(fvc::grad(U) & T(fvc::grad(U))) - + Ctau3_/fEta_*(T(fvc::grad(U)) & fvc::grad(U)) - ) - // cubic term C4 - - 20.0*pow4(k_)/pow3(epsilon_) - *pow3(Cmu_) - *( - ((fvc::grad(U) & fvc::grad(U)) & T(fvc::grad(U))) - + ((fvc::grad(U) & T(fvc::grad(U))) & T(fvc::grad(U))) - - ((T(fvc::grad(U)) & fvc::grad(U)) & fvc::grad(U)) - - ((T(fvc::grad(U)) & T(fvc::grad(U))) & fvc::grad(U)) - ) - // cubic term C5, explicit part - + min - ( - C5viscosity_, - dimensionedScalar("0", C5viscosity_.dimensions(), 0.0) - )*fvc::grad(U) - ) - ) + yStar_(sqrt(k_)*y_/nu() + SMALL) { bound(k_, kMin_); // already bounded: bound(epsilon_, epsilonMin_); - nut_ = Cmu_ - * (scalar(1) - exp(-Am_*yStar_)) - / (scalar(1) - exp(-Aepsilon_*yStar_) + SMALL) - * sqr(k_)/epsilon_ - // cubic term C5, implicit part - + max - ( - C5viscosity_, - dimensionedScalar("0", C5viscosity_.dimensions(), 0.0) - ); - - nut_.correctBoundaryConditions(); - - printCoeffs(); + if (type == typeName) + { + correctNut(); + correctNonlinearStress(fvc::grad(U)); + printCoeffs(type); + } } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp<volSymmTensorField> LienCubicKELowRe::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - nut_*twoSymm(fvc::grad(U_)) + nonlinearStress_, - k_.boundaryField().types() - ) - ); -} - - -tmp<volSymmTensorField> LienCubicKELowRe::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -nuEff()*dev(twoSymm(fvc::grad(U_))) + nonlinearStress_ - ) - ); -} - - -tmp<fvVectorMatrix> LienCubicKELowRe::divDevReff(volVectorField& U) const -{ - return - ( - fvc::div(nonlinearStress_) - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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()) + if (nonlinearEddyViscosity<incompressible::RASModel>::read()) { C1_.readIfPresent(coeffDict()); C2_.readIfPresent(coeffDict()); @@ -413,7 +361,7 @@ bool LienCubicKELowRe::read() void LienCubicKELowRe::correct() { - RASModel::correct(); + nonlinearEddyViscosity<incompressible::RASModel>::correct(); if (!turbulence_) { @@ -429,11 +377,6 @@ void LienCubicKELowRe::correct() yStar_ = sqrt(k_)*y_/nu() + SMALL; tmp<volScalarField> Rt = sqr(k_)/(nu()*epsilon_); - const volScalarField fMu - ( - (scalar(1) - exp(-Am_*yStar_)) - /(scalar(1) - exp(-Aepsilon_*yStar_) + SMALL) - ); const volScalarField f2 ( scalar(1) - 0.3*exp(-sqr(Rt)) @@ -442,7 +385,7 @@ void LienCubicKELowRe::correct() volScalarField G ( GName(), - Cmu_*fMu*sqr(k_)/epsilon_*S2 - (nonlinearStress_ && gradU) + Cmu_*fMu()*sqr(k_)/epsilon_*S2 - (nonlinearStress_ && gradU) ); // Dissipation equation @@ -491,50 +434,14 @@ void LienCubicKELowRe::correct() eta_ = k_/epsilon_*sqrt(2.0*magSqr(0.5*(gradU + gradU.T()))); ksi_ = k_/epsilon_*sqrt(2.0*magSqr(0.5*(gradU - gradU.T()))); Cmu_ = 2.0/(3.0*(A1_ + eta_ + alphaKsi_*ksi_)); - fEta_ = A2_ + pow(eta_, 3.0); + fEta_ = A2_ + pow3(eta_); C5viscosity_ = - - 2.0*pow(Cmu_, 3.0)*pow(k_, 4.0)/pow(epsilon_, 3.0) + -2.0*pow3(Cmu_)*pow4(k_)/pow3(epsilon_) *(magSqr(gradU + gradU.T()) - magSqr(gradU - gradU.T())); - nut_ = - Cmu_*fMu*sqr(k_)/epsilon_ - // C5 term, implicit - + max - ( - C5viscosity_, - dimensionedScalar("0", C5viscosity_.dimensions(), 0.0) - ); - - nonlinearStress_ = symm - ( - // quadratic terms - pow(k_, 3.0)/sqr(epsilon_) - *( - Ctau1_/fEta_ - *( - (gradU & gradU) - + (gradU & gradU)().T() - ) - + Ctau2_/fEta_*(gradU & gradU.T()) - + Ctau3_/fEta_*(gradU.T() & gradU) - ) - // cubic term C4 - - 20.0*pow(k_, 4.0)/pow(epsilon_, 3.0) - *pow(Cmu_, 3.0) - *( - ((gradU & gradU) & gradU.T()) - + ((gradU & gradU.T()) & gradU.T()) - - ((gradU.T() & gradU) & gradU) - - ((gradU.T() & gradU.T()) & gradU) - ) - // cubic term C5, explicit part - + min - ( - C5viscosity_, - dimensionedScalar("0", C5viscosity_.dimensions(), 0.0) - )*gradU - ); + correctNut(); + correctNonlinearStress(gradU); } diff --git a/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKELowRe/LienCubicKELowRe.H similarity index 84% rename from src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKELowRe/LienCubicKELowRe.H index a7dcac84c..40faf6762 100644 --- a/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowRe.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKELowRe/LienCubicKELowRe.H @@ -53,8 +53,8 @@ SourceFiles #ifndef LienCubicKELowRe_H #define LienCubicKELowRe_H -#include "RASModel.H" -#include "wallDist.H" +#include "turbulentTransportModel.H" +#include "nonlinearEddyViscosity.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -71,7 +71,7 @@ namespace RASModels class LienCubicKELowRe : - public RASModel + public nonlinearEddyViscosity<incompressible::RASModel> { protected: @@ -117,9 +117,13 @@ protected: volScalarField yStar_; - volScalarField nut_; - volSymmTensorField nonlinearStress_; + // Protected Member Functions + + tmp<volScalarField> fMu(); + + virtual void correctNut(); + virtual void correctNonlinearStress(const volTensorField& gradU); public: @@ -132,11 +136,14 @@ public: //- Construct from components LienCubicKELowRe ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName + const word& propertiesName = turbulenceModel::propertiesName, + const word& type = typeName ); @@ -147,11 +154,8 @@ public: // Member Functions - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const - { - return nut_; - } + //- Read RASProperties dictionary + virtual bool read(); //- Return the effective diffusivity for k tmp<volScalarField> DkEff() const @@ -183,27 +187,8 @@ public: return epsilon_; } - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); }; diff --git a/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H similarity index 100% rename from src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H diff --git a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C similarity index 72% rename from src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C index 5b4c77477..65880a8a8 100644 --- a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C @@ -24,11 +24,11 @@ License \*---------------------------------------------------------------------------*/ #include "LienLeschzinerLowRe.H" +#include "wallDist.H" #include "wallFvPatch.H" +#include "bound.H" #include "addToRunTimeSelectionTable.H" -#include "backwardsCompatibilityWallFunctions.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -43,18 +43,48 @@ namespace RASModels defineTypeNameAndDebug(LienLeschzinerLowRe, 0); addToRunTimeSelectionTable(RASModel, LienLeschzinerLowRe, dictionary); +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +tmp<volScalarField> LienLeschzinerLowRe::fMu() +{ + return + (scalar(1) - exp(-Am_*yStar_)) + /(scalar(1) - exp(-Aepsilon_*yStar_) + SMALL); +} + + +void LienLeschzinerLowRe::correctNut() +{ + nut_ = Cmu_*fMu()*sqr(k_)/epsilon_; + nut_.correctBoundaryConditions(); +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // LienLeschzinerLowRe::LienLeschzinerLowRe ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName, - const word& modelName + const word& propertiesName, + const word& type ) : - RASModel(modelName, U, phi, transport, turbulenceModelName), + eddyViscosity<incompressible::RASModel> + ( + type, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ), C1_ ( @@ -142,7 +172,7 @@ LienLeschzinerLowRe::LienLeschzinerLowRe ( IOobject ( - "k", + IOobject::groupName("k", U.group()), runTime_.timeName(), mesh_, IOobject::MUST_READ, @@ -155,7 +185,7 @@ LienLeschzinerLowRe::LienLeschzinerLowRe ( IOobject ( - "epsilon", + IOobject::groupName("epsilon", U.group()), runTime_.timeName(), mesh_, IOobject::MUST_READ, @@ -166,107 +196,24 @@ LienLeschzinerLowRe::LienLeschzinerLowRe y_(wallDist::New(mesh_).y()), - yStar_(sqrt(k_)*y_/nu() + SMALL), - - nut_ - ( - IOobject - ( - "nut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateLowReNut("nut", mesh_) - ) + yStar_(sqrt(k_)*y_/nu() + SMALL) { bound(k_, kMin_); bound(epsilon_, epsilonMin_); - nut_ = Cmu_*(scalar(1) - exp(-Am_*yStar_)) - /(scalar(1) - exp(-Aepsilon_*yStar_) + SMALL)*sqr(k_) - /(epsilon_); - nut_.correctBoundaryConditions(); - - printCoeffs(); + if (type == typeName) + { + correctNut(); + printCoeffs(type); + } } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp<volSymmTensorField> LienLeschzinerLowRe::R() const -{ - tmp<volTensorField> gradU = fvc::grad(U_); - - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - nut_*twoSymm(gradU), - k_.boundaryField().types() - ) - ); -} - - -tmp<volSymmTensorField> LienLeschzinerLowRe::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -nuEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> LienLeschzinerLowRe::divDevReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*T(fvc::grad(U))) - ); -} - - -tmp<fvVectorMatrix> 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()) + if (eddyViscosity<incompressible::RASModel>::read()) { C1_.readIfPresent(coeffDict()); C2_.readIfPresent(coeffDict()); @@ -289,7 +236,7 @@ bool LienLeschzinerLowRe::read() void LienLeschzinerLowRe::correct() { - RASModel::correct(); + eddyViscosity<incompressible::RASModel>::correct(); if (!turbulence_) { @@ -306,15 +253,9 @@ void LienLeschzinerLowRe::correct() yStar_ = sqrt(k_)*y_/nu() + SMALL; tmp<volScalarField> Rt = sqr(k_)/(nu()*epsilon_); - volScalarField fMu - ( - (scalar(1) - exp(-Am_*yStar_)) - /(scalar(1) - exp(-Aepsilon_*yStar_) + SMALL) - ); - const volScalarField f2(scalar(1) - 0.3*exp(-sqr(Rt))); - volScalarField G(GName(), Cmu_*fMu*sqr(k_)/epsilon_*S2); + volScalarField G(GName(), Cmu_*fMu()*sqr(k_)/epsilon_*S2); // Dissipation equation @@ -357,9 +298,7 @@ void LienLeschzinerLowRe::correct() solve(kEqn); bound(k_, kMin_); - - // Re-calculate viscosity - nut_ = Cmu_*fMu*sqr(k_)/epsilon_; + correctNut(); } diff --git a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H similarity index 82% rename from src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H index c9d664ce0..206abb09b 100644 --- a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.H @@ -39,8 +39,8 @@ SourceFiles #ifndef LienLeschzinerLowRe_H #define LienLeschzinerLowRe_H -#include "RASModel.H" -#include "wallDist.H" +#include "turbulentTransportModel.H" +#include "eddyViscosity.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -57,7 +57,7 @@ namespace RASModels class LienLeschzinerLowRe : - public RASModel + public eddyViscosity<incompressible::RASModel> { protected: @@ -90,7 +90,12 @@ protected: volScalarField yStar_; - volScalarField nut_; + + // Protected Member Functions + + tmp<volScalarField> fMu(); + + virtual void correctNut(); public: @@ -102,11 +107,14 @@ public: //- Construct from components LienLeschzinerLowRe ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName + const word& propertiesName = turbulenceModel::propertiesName, + const word& type = typeName ); @@ -117,11 +125,8 @@ public: // Member Functions - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const - { - return nut_; - } + //- Read RASProperties dictionary + virtual bool read(); //- Return the effective diffusivity for k tmp<volScalarField> DkEff() const @@ -153,27 +158,8 @@ public: return epsilon_; } - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); }; diff --git a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H similarity index 100% rename from src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H diff --git a/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/RNGkEpsilon/RNGkEpsilon.C similarity index 71% rename from src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/RNGkEpsilon/RNGkEpsilon.C index 12cbbfcd8..1dd886498 100644 --- a/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/RNGkEpsilon/RNGkEpsilon.C @@ -24,10 +24,9 @@ License \*---------------------------------------------------------------------------*/ #include "RNGkEpsilon.H" +#include "bound.H" #include "addToRunTimeSelectionTable.H" -#include "backwardsCompatibilityWallFunctions.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -42,18 +41,40 @@ namespace RASModels defineTypeNameAndDebug(RNGkEpsilon, 0); addToRunTimeSelectionTable(RASModel, RNGkEpsilon, dictionary); +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +void RNGkEpsilon::correctNut() +{ + nut_ = Cmu_*sqr(k_)/epsilon_; + nut_.correctBoundaryConditions(); +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // RNGkEpsilon::RNGkEpsilon ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName, - const word& modelName + const word& propertiesName, + const word& type ) : - RASModel(modelName, U, phi, transport, turbulenceModelName), + eddyViscosity<incompressible::RASModel> + ( + type, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ), Cmu_ ( @@ -123,122 +144,43 @@ RNGkEpsilon::RNGkEpsilon ( IOobject ( - "k", + IOobject::groupName("k", U.group()), runTime_.timeName(), mesh_, - IOobject::NO_READ, + IOobject::MUST_READ, IOobject::AUTO_WRITE ), - autoCreateK("k", mesh_) + mesh_ ), epsilon_ ( IOobject ( - "epsilon", + IOobject::groupName("epsilon", U.group()), runTime_.timeName(), mesh_, - IOobject::NO_READ, + IOobject::MUST_READ, IOobject::AUTO_WRITE ), - autoCreateEpsilon("epsilon", mesh_) - ), - nut_ - ( - IOobject - ( - "nut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateNut("nut", mesh_) + mesh_ ) { bound(k_, kMin_); bound(epsilon_, epsilonMin_); - nut_ = Cmu_*sqr(k_)/epsilon_; - nut_.correctBoundaryConditions(); - - printCoeffs(); + if (type == typeName) + { + correctNut(); + printCoeffs(type); + } } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> RNGkEpsilon::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - nut_*twoSymm(fvc::grad(U_)), - k_.boundaryField().types() - ) - ); -} - - -tmp<volSymmTensorField> RNGkEpsilon::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -nuEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> RNGkEpsilon::divDevReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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()) + if (eddyViscosity<incompressible::RASModel>::read()) { Cmu_.readIfPresent(coeffDict()); C1_.readIfPresent(coeffDict()); @@ -259,7 +201,7 @@ bool RNGkEpsilon::read() void RNGkEpsilon::correct() { - RASModel::correct(); + eddyViscosity<incompressible::RASModel>::correct(); if (!turbulence_) { @@ -286,7 +228,6 @@ void RNGkEpsilon::correct() - fvm::laplacian(DepsilonEff(), epsilon_) == (C1_ - R)*G*epsilon_/k_ - //- fvm::SuSp(R*G/k_, epsilon_) - fvm::Sp(C2_*epsilon_/k_, epsilon_) ); @@ -313,10 +254,7 @@ void RNGkEpsilon::correct() solve(kEqn); bound(k_, kMin_); - - // Re-calculate viscosity - nut_ = Cmu_*sqr(k_)/epsilon_; - nut_.correctBoundaryConditions(); + correctNut(); } diff --git a/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/RNGkEpsilon/RNGkEpsilon.H similarity index 83% rename from src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/RNGkEpsilon/RNGkEpsilon.H index caaa4f2d8..1d32e4aaa 100644 --- a/src/turbulenceModels/incompressible/RAS/RNGkEpsilon/RNGkEpsilon.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/RNGkEpsilon/RNGkEpsilon.H @@ -60,7 +60,8 @@ SourceFiles #ifndef RNGkEpsilon_H #define RNGkEpsilon_H -#include "RASModel.H" +#include "turbulentTransportModel.H" +#include "eddyViscosity.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -77,7 +78,7 @@ namespace RASModels class RNGkEpsilon : - public RASModel + public eddyViscosity<incompressible::RASModel> { protected: @@ -99,7 +100,11 @@ protected: volScalarField k_; volScalarField epsilon_; - volScalarField nut_; + + + // Protected Member Functions + + virtual void correctNut(); public: @@ -112,11 +117,14 @@ public: //- Construct from components RNGkEpsilon ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName + const word& propertiesName = turbulenceModel::propertiesName, + const word& type = typeName ); @@ -127,11 +135,8 @@ public: // Member Functions - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const - { - return nut_; - } + //- Read RASProperties dictionary + virtual bool read(); //- Return the effective diffusivity for k tmp<volScalarField> DkEff() const @@ -163,27 +168,8 @@ public: return epsilon_; } - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); }; diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/derivedFvPatchFields/wallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C similarity index 92% rename from src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/derivedFvPatchFields/wallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C index c24937c52..fa2652446 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/derivedFvPatchFields/wallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,11 +24,10 @@ License \*---------------------------------------------------------------------------*/ #include "fWallFunctionFvPatchScalarField.H" -#include "RASModel.H" +#include "v2f.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "wallFvPatch.H" -#include "v2f.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -174,13 +173,19 @@ void fWallFunctionFvPatchScalarField::updateCoeffs() return; } - const label patchI = patch().index(); + const label patchi = patch().index(); - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>("turbulenceModel"); + const turbulenceModel& turbulence = db().lookupObject<turbulenceModel> + ( + IOobject::groupName + ( + turbulenceModel::propertiesName, + dimensionedInternalField().group() + ) + ); const v2f& v2fModel = refCast<const v2f>(turbulence); - const scalarField& y = v2fModel.y()[patchI]; + const scalarField& y = v2fModel.y()[patchi]; const tmp<volScalarField> tk = v2fModel.k(); const volScalarField& k = tk(); @@ -191,8 +196,8 @@ void fWallFunctionFvPatchScalarField::updateCoeffs() const tmp<volScalarField> tv2 = v2fModel.v2(); const volScalarField& v2 = tv2(); - const tmp<volScalarField> tnu = v2fModel.nu(); - const scalarField& nuw = tnu().boundaryField()[patchI]; + const tmp<scalarField> tnuw = turbulence.nu(patchi); + const scalarField& nuw = tnuw(); const scalar Cmu25 = pow025(Cmu_); diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/derivedFvPatchFields/wallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.H similarity index 97% rename from src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/derivedFvPatchFields/wallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.H index b5d92d942..d99d16102 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/derivedFvPatchFields/wallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,10 +22,10 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::incompressible::RASModels::fWallFunctionFvPatchScalarField + Foam::RASModels::fWallFunctionFvPatchScalarField Group - grpIcoWallFunctions + grpWallFunctions Description This boundary condition provides a turbulence damping function, f, wall diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/derivedFvPatchFields/wallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C similarity index 92% rename from src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/derivedFvPatchFields/wallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C index 19ae103d7..c2df8e4a9 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/derivedFvPatchFields/wallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "v2WallFunctionFvPatchScalarField.H" -#include "RASModel.H" +#include "turbulenceModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" @@ -173,17 +173,23 @@ void v2WallFunctionFvPatchScalarField::updateCoeffs() return; } - const label patchI = patch().index(); + const label patchi = patch().index(); - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbulence.y()[patchI]; + const turbulenceModel& turbulence = db().lookupObject<turbulenceModel> + ( + IOobject::groupName + ( + turbulenceModel::propertiesName, + dimensionedInternalField().group() + ) + ); + const scalarField& y = turbulence.y()[patchi]; const tmp<volScalarField> tk = turbulence.k(); const volScalarField& k = tk(); - const tmp<volScalarField> tnu = turbulence.nu(); - const scalarField& nuw = tnu().boundaryField()[patchI]; + const tmp<scalarField> tnuw = turbulence.nu(patchi); + const scalarField& nuw = tnuw(); const scalar Cmu25 = pow025(Cmu_); diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/derivedFvPatchFields/wallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.H similarity index 97% rename from src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/derivedFvPatchFields/wallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.H index a0a8cde8e..e4e8fdafa 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/derivedFvPatchFields/wallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,10 +22,10 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::incompressible::RASModels::v2WallFunctionFvPatchScalarField + Foam::RASModels::v2WallFunctionFvPatchScalarField Group - grpIcoWallFunctions + grpWallFunctions Description This boundary condition provides a turbulence stress normal to streamlines diff --git a/src/turbulenceModels/incompressible/RAS/include/nonLinearWallFunctionsI.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/include/nonLinearWallFunctionsI.H similarity index 98% rename from src/turbulenceModels/incompressible/RAS/include/nonLinearWallFunctionsI.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/include/nonLinearWallFunctionsI.H index 90b21921b..46bf81176 100644 --- a/src/turbulenceModels/incompressible/RAS/include/nonLinearWallFunctionsI.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/include/nonLinearWallFunctionsI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/include/wallDissipationI.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/include/wallDissipationI.H similarity index 95% rename from src/turbulenceModels/incompressible/RAS/include/wallDissipationI.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/include/wallDissipationI.H index 3e60bffec..a51933362 100644 --- a/src/turbulenceModels/incompressible/RAS/include/wallDissipationI.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/include/wallDissipationI.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/incompressible/RAS/include/wallNonlinearViscosityI.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/include/wallNonlinearViscosityI.H similarity index 97% rename from src/turbulenceModels/incompressible/RAS/include/wallNonlinearViscosityI.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/include/wallNonlinearViscosityI.H index 6b1080d2a..b6936b49c 100644 --- a/src/turbulenceModels/incompressible/RAS/include/wallNonlinearViscosityI.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/include/wallNonlinearViscosityI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kOmega/Changes b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kOmega/Changes new file mode 100644 index 000000000..51cb377b0 --- /dev/null +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kOmega/Changes @@ -0,0 +1,144 @@ +turbulenceModelName -> propertiesName +modelName -> type + +* Header +*** Includes + - Remove + #include "RASModel.H" + + Add + #include "turbulentTransportModel.H" + #include "eddyViscosity.H" +*** Base class + - Change + RASModel -> eddyViscosity<RASModel> +*** Protected data + - Remove + volScalarField nut_; +*** Constructor + + Add + const geometricOneField& alpha, + const geometricOneField& rho, + . + const surfaceScalarField& alphaRhoPhi, + +*** Private member functions + + Add + // Protected Member Functions + + virtual void correctNut(); + +*** Member functions + - Remove + //- Return the turbulence viscosity + virtual tmp<volScalarField> nut() const + { + return nut_; + } + + //- Return the Reynolds stress tensor + virtual tmp<volSymmTensorField> R() const; + + //- Return the effective stress tensor including the laminar stress + virtual tmp<volSymmTensorField> devReff() const; + + //- Return the source term for the momentum equation + virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + + //- Return the source term for the momentum equation + virtual tmp<fvVectorMatrix> divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + + + Move to top + //- Read RASProperties dictionary + virtual bool read(); + +* Source +*** Includes + + Add + #include "bound.H" + - Remove + #include "backwardsCompatibilityWallFunctions.H" +*** Constructor + + Add arguments + const geometricOneField& alpha, + const geometricOneField& rho, + . + const surfaceScalarField& alphaRhoPhi, + + Replace + RASModel(modelName, U, phi, transport, turbulenceModelName), + with + eddyViscosity<RASModel> + ( + type, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ), + + Replace + autoCreate.*mesh_) -> mesh_ + NO_READ -> MUST_READ + - Remove + nut_ + ( + IOobject + ( + "nut", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + autoCreateNut("nut", mesh_) + ) + + Replace + nut_ = k_/omega_; + nut_.correctBoundaryConditions(); + + printCoeffs(); + + with + + if (type == typeName) + { + correctNut(); + printCoeffs(type); + } +*** Member functions + + Move read to top + + Add after read +void kOmega::correctNut() +{ + .... + nut_.correctBoundaryConditions(); +} + - Remove + //- Return the Reynolds stress tensor + virtual tmp<volSymmTensorField> R() const; + + //- Return the effective stress tensor including the laminar stress + virtual tmp<volSymmTensorField> devReff() const; + + //- Return the source term for the momentum equation + virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + + //- Return the source term for the momentum equation + virtual tmp<fvVectorMatrix> divDevRhoReff + ( + const volScalarField& rho, + volVectorField& U + ) const; + +*** correct() + - Replace + // Re-calculate viscosity + nut_ = Cmu_*sqr(k_)/epsilon_; + nut_.correctBoundaryConditions(); + with + correctNut(); diff --git a/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kOmega/kOmega.C similarity index 68% rename from src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kOmega/kOmega.C index 8394f986e..12a95d07f 100644 --- a/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kOmega/kOmega.C @@ -24,10 +24,9 @@ License \*---------------------------------------------------------------------------*/ #include "kOmega.H" +#include "bound.H" #include "addToRunTimeSelectionTable.H" -#include "backwardsCompatibilityWallFunctions.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -42,18 +41,40 @@ namespace RASModels defineTypeNameAndDebug(kOmega, 0); addToRunTimeSelectionTable(RASModel, kOmega, dictionary); +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +void kOmega::correctNut() +{ + nut_ = k_/omega_; + nut_.correctBoundaryConditions(); +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // kOmega::kOmega ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName, - const word& modelName + const word& propertiesName, + const word& type ) : - RASModel(modelName, U, phi, transport, turbulenceModelName), + eddyViscosity<incompressible::RASModel> + ( + type, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ), Cmu_ ( @@ -105,121 +126,43 @@ kOmega::kOmega ( IOobject ( - "k", + IOobject::groupName("k", U.group()), runTime_.timeName(), mesh_, - IOobject::NO_READ, + IOobject::MUST_READ, IOobject::AUTO_WRITE ), - autoCreateK("k", mesh_) + mesh_ ), omega_ ( IOobject ( - "omega", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateOmega("omega", mesh_) - ), - nut_ - ( - IOobject - ( - "nut", + IOobject::groupName("omega", U.group()), runTime_.timeName(), mesh_, - IOobject::NO_READ, + IOobject::MUST_READ, IOobject::AUTO_WRITE ), - autoCreateNut("nut", mesh_) + mesh_ ) { bound(k_, kMin_); bound(omega_, omegaMin_); - nut_ = k_/omega_; - nut_.correctBoundaryConditions(); - - printCoeffs(); + if (type == typeName) + { + correctNut(); + printCoeffs(type); + } } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp<volSymmTensorField> kOmega::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - nut_*twoSymm(fvc::grad(U_)), - k_.boundaryField().types() - ) - ); -} - - -tmp<volSymmTensorField> kOmega::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -nuEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> kOmega::divDevReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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()) + if (eddyViscosity<incompressible::RASModel>::read()) { Cmu_.readIfPresent(coeffDict()); beta_.readIfPresent(coeffDict()); @@ -237,7 +180,7 @@ bool kOmega::read() void kOmega::correct() { - RASModel::correct(); + eddyViscosity<incompressible::RASModel>::correct(); if (!turbulence_) { @@ -283,10 +226,7 @@ void kOmega::correct() solve(kEqn); bound(k_, kMin_); - - // Re-calculate viscosity - nut_ = k_/omega_; - nut_.correctBoundaryConditions(); + correctNut(); } diff --git a/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kOmega/kOmega.H similarity index 84% rename from src/turbulenceModels/incompressible/RAS/kOmega/kOmega.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kOmega/kOmega.H index f2c091305..a0b6b732c 100644 --- a/src/turbulenceModels/incompressible/RAS/kOmega/kOmega.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kOmega/kOmega.H @@ -62,7 +62,8 @@ SourceFiles #ifndef kOmega_H #define kOmega_H -#include "RASModel.H" +#include "turbulentTransportModel.H" +#include "eddyViscosity.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -79,7 +80,7 @@ namespace RASModels class kOmega : - public RASModel + public eddyViscosity<incompressible::RASModel> { protected: @@ -99,7 +100,11 @@ protected: volScalarField k_; volScalarField omega_; - volScalarField nut_; + + + // Protected Member Functions + + virtual void correctNut(); public: @@ -107,16 +112,20 @@ public: //- Runtime type information TypeName("kOmega"); + // Constructors //- Construct from components kOmega ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName + const word& propertiesName = turbulenceModel::propertiesName, + const word& type = typeName ); @@ -127,11 +136,8 @@ public: // Member Functions - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const - { - return nut_; - } + //- Read RASProperties dictionary + virtual bool read(); //- Return the effective diffusivity for k tmp<volScalarField> DkEff() const @@ -182,27 +188,8 @@ public: ); } - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); }; diff --git a/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C similarity index 87% rename from src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.C rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C index b7e8231ca..a32ce3b4a 100644 --- a/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C @@ -24,10 +24,10 @@ License \*---------------------------------------------------------------------------*/ #include "kkLOmega.H" +#include "bound.H" +#include "wallDist.H" #include "addToRunTimeSelectionTable.H" -#include "backwardsCompatibilityWallFunctions.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -42,7 +42,7 @@ namespace RASModels defineTypeNameAndDebug(kkLOmega, 0); addToRunTimeSelectionTable(RASModel, kkLOmega, dictionary); -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // tmp<volScalarField> kkLOmega::fv(const volScalarField& Ret) const { @@ -200,18 +200,40 @@ tmp<volScalarField> kkLOmega::gammaNAT } +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +void kkLOmega::correctNut() +{ + nut_ = kt_/omega_; + nut_.correctBoundaryConditions(); +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // kkLOmega::kkLOmega ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName, - const word& modelName + const word& propertiesName, + const word& type ) : - RASModel(modelName, U, phi, transport, turbulenceModelName), + eddyViscosity<incompressible::RASModel> + ( + type, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ), A0_ ( @@ -460,49 +482,37 @@ kkLOmega::kkLOmega ( IOobject ( - "kt", + IOobject::groupName("kt", U.group()), runTime_.timeName(), mesh_, - IOobject::NO_READ, + IOobject::MUST_READ, IOobject::AUTO_WRITE ), - autoCreateK("kt", mesh_) + mesh_ ), omega_ ( IOobject ( - "omega", + IOobject::groupName("omega", U.group()), runTime_.timeName(), mesh_, - IOobject::NO_READ, + IOobject::MUST_READ, IOobject::AUTO_WRITE ), - autoCreateOmega("omega", mesh_) + mesh_ ), kl_ ( IOobject ( - "kl", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateK("kl", mesh_) - ), - nut_ - ( - IOobject - ( - "nut", + IOobject::groupName("kl", U.group()), runTime_.timeName(), mesh_, - IOobject::NO_READ, + IOobject::MUST_READ, IOobject::AUTO_WRITE ), - autoCreateNut("nut", mesh_) + mesh_ ), y_(wallDist::New(mesh_).y()) { @@ -510,85 +520,22 @@ kkLOmega::kkLOmega bound(kl_, kMin_); bound(omega_, omegaMin_); - nut_ = kt_/(omega_ + omegaMin_); - nut_.correctBoundaryConditions(); + if (type == typeName) + { + // This is only an approximate nut, so only good for initialization + // not restart + // correctNut(); - printCoeffs(); + printCoeffs(type); + } } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp<volSymmTensorField> kkLOmega::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*(kt_) - nut_*twoSymm(fvc::grad(U_)), - kt_.boundaryField().types() - ) - ); -} - - -tmp<volSymmTensorField> kkLOmega::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -nuEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> kkLOmega::divDevReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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()) + if (eddyViscosity<incompressible::RASModel>::read()) { A0_.readIfPresent(coeffDict()); As_.readIfPresent(coeffDict()); @@ -630,7 +577,7 @@ bool kkLOmega::read() void kkLOmega::correct() { - RASModel::correct(); + eddyViscosity<incompressible::RASModel>::correct(); if (!turbulence_) { @@ -641,7 +588,6 @@ void kkLOmega::correct() const volScalarField kT(kt_ + kl_); const volScalarField lambdaT(sqrt(kT)/(omega_ + omegaMin_)); - const volScalarField lambdaEff(min(Clambda_*y_, lambdaT)); const volScalarField fw @@ -650,9 +596,7 @@ void kkLOmega::correct() ); const volTensorField gradU(fvc::grad(U_)); - const volScalarField omega(sqrt(2.0)*mag(skew(gradU))); - const volScalarField S2(2.0*magSqr(symm(gradU))); const volScalarField ktS(fSS(omega)*fw*kt_); @@ -663,6 +607,7 @@ void kkLOmega::correct() *fINT() *Cmu(sqrt(S2))*sqrt(ktS)*lambdaEff ); + const volScalarField Pkt(nuts*S2); const volScalarField ktL(kt_ - ktS); @@ -674,7 +619,7 @@ void kkLOmega::correct() C11_*fTaul(lambdaEff, ktL)*omega*sqr(lambdaEff) * sqrt(ktL)*lambdaEff/nu() + C12_*BetaTS(ReOmega)*ReOmega*sqr(y_)*omega - , + , 0.5*(kl_ + ktL)/sqrt(S2) ) ); @@ -748,6 +693,7 @@ void kkLOmega::correct() omega_.boundaryField().updateCoeffs(); + // Turbulence specific dissipation rate equation tmp<fvScalarMatrix> omegaEqn ( diff --git a/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.H similarity index 89% rename from src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.H index 65a14ce35..0b45136b8 100644 --- a/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.H @@ -80,8 +80,8 @@ SourceFiles #ifndef kkLOmega_H #define kkLOmega_H -#include "RASModel.H" -#include "wallDist.H" +#include "turbulentTransportModel.H" +#include "eddyViscosity.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -98,7 +98,7 @@ namespace RASModels class kkLOmega : - public RASModel + public eddyViscosity<incompressible::RASModel> { // Private memmber functions @@ -180,7 +180,6 @@ protected: volScalarField kt_; volScalarField omega_; volScalarField kl_; - volScalarField nut_; //- Wall distance // Note: different to wall distance in parent RASModel @@ -188,21 +187,30 @@ protected: const volScalarField& y_; + // Protected Member Functions + + virtual void correctNut(); + + public: //- Runtime type information TypeName("kkLOmega"); + // Constructors //- Construct from components kkLOmega ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName + const word& propertiesName = turbulenceModel::propertiesName, + const word& type = typeName ); @@ -213,11 +221,8 @@ public: // Member Functions - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const - { - return nut_; - } + //- Read RASProperties dictionary + virtual bool read(); //- Return the effective diffusivity for k tmp<volScalarField> DkEff(const volScalarField& alphaT) const @@ -274,27 +279,8 @@ public: ); } - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); }; diff --git a/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/nonlinearKEShih/nonlinearKEShih.C similarity index 73% rename from src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.C rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/nonlinearKEShih/nonlinearKEShih.C index 5883278c6..20c71af7b 100644 --- a/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/nonlinearKEShih/nonlinearKEShih.C @@ -23,10 +23,11 @@ License \*---------------------------------------------------------------------------*/ -#include "NonlinearKEShih.H" -#include "addToRunTimeSelectionTable.H" +#include "nonlinearKEShih.H" +#include "bound.H" #include "wallFvPatch.H" #include "nutkWallFunctionFvPatchScalarField.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -39,21 +40,61 @@ namespace RASModels // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(NonlinearKEShih, 0); -addToRunTimeSelectionTable(RASModel, NonlinearKEShih, dictionary); +defineTypeNameAndDebug(nonlinearKEShih, 0); +addToRunTimeSelectionTable(RASModel, nonlinearKEShih, dictionary); + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +void nonlinearKEShih::correctNut() +{ + nut_ = Cmu_*sqr(k_)/epsilon_; + #include "wallNonlinearViscosityI.H" +} + + +void nonlinearKEShih::correctNonlinearStress(const volTensorField& gradU) +{ + nonlinearStress_ = symm + ( + pow(k_, 3.0)/sqr(epsilon_) + *( + Ctau1_/fEta_ + *( + (gradU & gradU) + + (gradU & gradU)().T() + ) + + Ctau2_/fEta_*(gradU & T(gradU)) + + Ctau3_/fEta_*(T(gradU) & gradU) + ) + ); +} + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -NonlinearKEShih::NonlinearKEShih +nonlinearKEShih::nonlinearKEShih ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName, - const word& modelName + const word& propertiesName, + const word& type ) : - RASModel(modelName, U, phi, transport, turbulenceModelName), + nonlinearEddyViscosity<incompressible::RASModel> + ( + type, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ), C1_ ( @@ -169,7 +210,7 @@ NonlinearKEShih::NonlinearKEShih ( IOobject ( - "k", + IOobject::groupName("k", U.group()), runTime_.timeName(), mesh_, IOobject::MUST_READ, @@ -182,7 +223,7 @@ NonlinearKEShih::NonlinearKEShih ( IOobject ( - "epsilon", + IOobject::groupName("epsilon", U.group()), runTime_.timeName(), mesh_, IOobject::MUST_READ, @@ -202,111 +243,25 @@ NonlinearKEShih::NonlinearKEShih *sqrt(2.0*magSqr(0.5*(fvc::grad(U) - T(fvc::grad(U))))) ), Cmu_(2.0/(3.0*(A1_ + eta_ + alphaKsi_*ksi_))), - fEta_(A2_ + pow(eta_, 3.0)), - - nut_("nut", Cmu_*sqr(k_)/epsilon_), - - nonlinearStress_ - ( - "nonlinearStress", - symm - ( - pow3(k_)/sqr(epsilon_) - *( - Ctau1_/fEta_ - *( - (fvc::grad(U) & fvc::grad(U)) - + (fvc::grad(U) & fvc::grad(U))().T() - ) - + Ctau2_/fEta_*(fvc::grad(U) & T(fvc::grad(U))) - + Ctau3_/fEta_*(T(fvc::grad(U)) & fvc::grad(U)) - ) - ) - ) + fEta_(A2_ + pow(eta_, 3.0)) { bound(k_, kMin_); // already bounded: bound(epsilon_, epsilonMin_); - #include "wallNonlinearViscosityI.H" - - printCoeffs(); + if (type == typeName) + { + correctNut(); + correctNonlinearStress(fvc::grad(U)); + printCoeffs(type); + } } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp<volSymmTensorField> NonlinearKEShih::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - nut_*twoSymm(fvc::grad(U_)) + nonlinearStress_, - k_.boundaryField().types() - ) - ); -} - - -tmp<volSymmTensorField> NonlinearKEShih::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -nuEff()*dev(twoSymm(fvc::grad(U_))) + nonlinearStress_ - ) - ); -} - - -tmp<fvVectorMatrix> NonlinearKEShih::divDevReff(volVectorField& U) const +bool nonlinearKEShih::read() { - return - ( - fvc::div(nonlinearStress_) - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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()) + if (nonlinearEddyViscosity<incompressible::RASModel>::read()) { C1_.readIfPresent(coeffDict()); C2_.readIfPresent(coeffDict()); @@ -331,9 +286,9 @@ bool NonlinearKEShih::read() } -void NonlinearKEShih::correct() +void nonlinearKEShih::correct() { - RASModel::correct(); + nonlinearEddyViscosity<incompressible::RASModel>::correct(); if (!turbulence_) { @@ -397,23 +352,8 @@ void NonlinearKEShih::correct() Cmu_ = 2.0/(3.0*(A1_ + eta_ + alphaKsi_*ksi_)); fEta_ = A2_ + pow(eta_, 3.0); - nut_ = Cmu_*sqr(k_)/epsilon_; - - #include "wallNonlinearViscosityI.H" - - nonlinearStress_ = symm - ( - pow(k_, 3.0)/sqr(epsilon_) - *( - Ctau1_/fEta_ - *( - (gradU & gradU) - + (gradU & gradU)().T() - ) - + Ctau2_/fEta_*(gradU & T(gradU)) - + Ctau3_/fEta_*(T(gradU) & gradU) - ) - ); + correctNut(); + correctNonlinearStress(gradU); } diff --git a/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/nonlinearKEShih/nonlinearKEShih.H similarity index 76% rename from src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/nonlinearKEShih/nonlinearKEShih.H index 10d51669b..9037328e6 100644 --- a/src/turbulenceModels/incompressible/RAS/NonlinearKEShih/NonlinearKEShih.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/nonlinearKEShih/nonlinearKEShih.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::incompressible::RASModels::NonlinearKEShih + Foam::incompressible::RASModels::nonlinearKEShih Group grpIcoRASTurbulence @@ -32,14 +32,15 @@ Description incompressible flows SourceFiles - NonlinearKEShih.C + nonlinearKEShih.C \*---------------------------------------------------------------------------*/ -#ifndef NonlinearKEShih_H -#define NonlinearKEShih_H +#ifndef nonlinearKEShih_H +#define nonlinearKEShih_H -#include "RASModel.H" +#include "turbulentTransportModel.H" +#include "nonlinearEddyViscosity.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -51,12 +52,12 @@ namespace RASModels { /*---------------------------------------------------------------------------*\ - Class NonlinearKEShih Declaration + Class nonlinearKEShih Declaration \*---------------------------------------------------------------------------*/ -class NonlinearKEShih +class nonlinearKEShih : - public RASModel + public nonlinearEddyViscosity<incompressible::RASModel> { protected: @@ -90,41 +91,44 @@ protected: volScalarField Cmu_; volScalarField fEta_; - volScalarField nut_; - volSymmTensorField nonlinearStress_; + // Protected Member Functions + + virtual void correctNut(); + virtual void correctNonlinearStress(const volTensorField& gradU); public: //- Runtime type information - TypeName("NonlinearKEShih"); + TypeName("nonlinearKEShih"); + // Constructors //- Construct from components - NonlinearKEShih + nonlinearKEShih ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName + const word& propertiesName = turbulenceModel::propertiesName, + const word& type = typeName ); //- Destructor - virtual ~NonlinearKEShih() + virtual ~nonlinearKEShih() {} // Member Functions - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const - { - return nut_; - } + //- Read RASProperties dictionary + virtual bool read(); //- Return the effective diffusivity for k tmp<volScalarField> DkEff() const @@ -156,27 +160,8 @@ public: return epsilon_; } - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); }; diff --git a/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/qZeta/qZeta.C similarity index 72% rename from src/turbulenceModels/incompressible/RAS/qZeta/qZeta.C rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/qZeta/qZeta.C index c6b20e54f..7d62a6259 100644 --- a/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/qZeta/qZeta.C @@ -24,10 +24,9 @@ License \*---------------------------------------------------------------------------*/ #include "qZeta.H" +#include "bound.H" #include "addToRunTimeSelectionTable.H" -#include "backwardsCompatibilityWallFunctions.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -68,18 +67,38 @@ tmp<volScalarField> qZeta::f2() const } +void qZeta::correctNut() +{ + nut_ = Cmu_*fMu()*sqr(k_)/epsilon_; + nut_.correctBoundaryConditions(); +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // qZeta::qZeta ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName, - const word& modelName + const word& propertiesName, + const word& type ) : - RASModel(modelName, U, phi, transport, turbulenceModelName), + eddyViscosity<incompressible::RASModel> + ( + type, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ), Cmu_ ( @@ -127,14 +146,14 @@ qZeta::qZeta ) ), - qMin_("qMin", dimVelocity, SMALL), - zetaMin_("zetaMin", dimVelocity/dimTime, SMALL), + qMin_("qMin", sqrt(kMin_)), + zetaMin_("zetaMin", epsilonMin_/(2*qMin_)), k_ ( IOobject ( - "k", + IOobject::groupName("k", U.group()), runTime_.timeName(), mesh_, IOobject::MUST_READ, @@ -147,7 +166,7 @@ qZeta::qZeta ( IOobject ( - "epsilon", + IOobject::groupName("epsilon", U.group()), runTime_.timeName(), mesh_, IOobject::MUST_READ, @@ -160,13 +179,13 @@ qZeta::qZeta ( IOobject ( - "q", + IOobject::groupName("q", U.group()), runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::AUTO_WRITE ), - sqrt(k_), + sqrt(bound(k_, kMin_)), k_.boundaryField().types() ), @@ -174,113 +193,31 @@ qZeta::qZeta ( IOobject ( - "zeta", + IOobject::groupName("zeta", U.group()), runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::AUTO_WRITE ), - epsilon_/(2.0*bound(q_, qMin_)), + bound(epsilon_, epsilonMin_)/(2.0*q_), epsilon_.boundaryField().types() - ), - - nut_ - ( - IOobject - ( - "nut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateNut("nut", mesh_) ) { - bound(k_, kMin_); - bound(epsilon_, epsilonMin_); - // already bounded: bound(q_, qMin_); bound(zeta_, zetaMin_); - nut_ = Cmu_*fMu()*sqr(k_)/epsilon_; - nut_.correctBoundaryConditions(); - - printCoeffs(); + if (type == typeName) + { + correctNut(); + printCoeffs(type); + } } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp<volSymmTensorField> qZeta::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - nut_*twoSymm(fvc::grad(U_)), - k_.boundaryField().types() - ) - ); -} - - -tmp<volSymmTensorField> qZeta::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -nuEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> qZeta::divDevReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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()) + if (eddyViscosity<incompressible::RASModel>::read()) { Cmu_.readIfPresent(coeffDict()); C1_.readIfPresent(coeffDict()); @@ -302,7 +239,7 @@ bool qZeta::read() void qZeta::correct() { - RASModel::correct(); + eddyViscosity<incompressible::RASModel>::correct(); if (!turbulence_) { @@ -356,10 +293,7 @@ void qZeta::correct() epsilon_ = 2*q_*zeta_; epsilon_.correctBoundaryConditions(); - - // Re-calculate viscosity - nut_ = Cmu_*fMu()*sqr(k_)/epsilon_; - nut_.correctBoundaryConditions(); + correctNut(); } diff --git a/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/qZeta/qZeta.H similarity index 75% rename from src/turbulenceModels/incompressible/RAS/qZeta/qZeta.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/qZeta/qZeta.H index dc9e1f6b5..9393e0237 100644 --- a/src/turbulenceModels/incompressible/RAS/qZeta/qZeta.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/qZeta/qZeta.H @@ -52,7 +52,8 @@ SourceFiles #ifndef qZeta_H #define qZeta_H -#include "RASModel.H" +#include "turbulentTransportModel.H" +#include "eddyViscosity.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -69,7 +70,7 @@ namespace RASModels class qZeta : - public RASModel + public eddyViscosity<incompressible::RASModel> { protected: @@ -98,13 +99,12 @@ protected: volScalarField q_; volScalarField zeta_; - volScalarField nut_; - // Protected Member Functions tmp<volScalarField> fMu() const; tmp<volScalarField> f2() const; + virtual void correctNut(); public: @@ -117,11 +117,14 @@ public: //- Construct from components qZeta ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName + const word& propertiesName = turbulenceModel::propertiesName, + const word& type = typeName ); @@ -132,37 +135,31 @@ public: // Member Functions - // Access - - //- Return the lower allowable limit for q (default: SMALL) - const dimensionedScalar& qMin() const - { - return qMin_; - } - - //- Return the lower allowable limit for zeta (default: SMALL) - const dimensionedScalar& zetaMin() const - { - return zetaMin_; - } + //- Read RASProperties dictionary + virtual bool read(); - //- Allow qMin to be changed - dimensionedScalar& qMin() - { - return qMin_; - } + //- Return the lower allowable limit for q (default: SMALL) + const dimensionedScalar& qMin() const + { + return qMin_; + } - //- Allow zetaMin to be changed - dimensionedScalar& zetaMin() - { - return zetaMin_; - } + //- Return the lower allowable limit for zeta (default: SMALL) + const dimensionedScalar& zetaMin() const + { + return zetaMin_; + } + //- Allow qMin to be changed + dimensionedScalar& qMin() + { + return qMin_; + } - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const + //- Allow zetaMin to be changed + dimensionedScalar& zetaMin() { - return nut_; + return zetaMin_; } //- Return the effective diffusivity for q @@ -195,9 +192,6 @@ public: return epsilon_; } - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - virtual const volScalarField& q() const { return q_; @@ -208,24 +202,8 @@ public: return zeta_; } - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); }; diff --git a/src/turbulenceModels/incompressible/RAS/v2f/v2f.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/v2f/v2f.C similarity index 74% rename from src/turbulenceModels/incompressible/RAS/v2f/v2f.C rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/v2f/v2f.C index 8b5ad858d..5ad491497 100644 --- a/src/turbulenceModels/incompressible/RAS/v2f/v2f.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/v2f/v2f.C @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "v2f.H" +#include "bound.H" #include "fixedValueFvPatchField.H" #include "zeroGradientFvPatchField.H" #include "addToRunTimeSelectionTable.H" @@ -44,37 +45,6 @@ addToRunTimeSelectionTable(RASModel, v2f, dictionary); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -wordList v2f::RBoundaryTypes() const -{ - const volScalarField::GeometricBoundaryField& bf(k_.boundaryField()); - - wordList bTypes - ( - bf.size(), - zeroGradientFvPatchField<symmTensor>::typeName - ); - - forAll(bf, patchI) - { - if (bf[patchI].fixesValue()) - { - bTypes[patchI] = fixedValueFvPatchField<symmTensor>::typeName; - } - } - - return bTypes; -} - - -tmp<volScalarField> v2f::davidsonCorrectNut -( - const tmp<volScalarField>& value -) const -{ - return min(CmuKEps_*sqr(k_)/epsilon_, value); -} - - tmp<volScalarField> v2f::Ts() const { return max(k_/epsilon_, 6.0*sqrt(nu()/epsilon_)); @@ -87,18 +57,38 @@ tmp<volScalarField> v2f::Ls() const } +void v2f::correctNut() +{ + nut_ = min(CmuKEps_*sqr(k_)/epsilon_, Cmu_*v2_*Ts()); + nut_.correctBoundaryConditions(); +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // v2f::v2f ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName, - const word& modelName + const word& propertiesName, + const word& type ) : - RASModel(modelName, U, phi, transport, turbulenceModelName), + eddyViscosity<incompressible::RASModel> + ( + type, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ), Cmu_ ( @@ -186,7 +176,7 @@ v2f::v2f ( IOobject ( - "k", + IOobject::groupName("k", U.group()), runTime_.timeName(), mesh_, IOobject::MUST_READ, @@ -198,7 +188,7 @@ v2f::v2f ( IOobject ( - "epsilon", + IOobject::groupName("epsilon", U.group()), runTime_.timeName(), mesh_, IOobject::MUST_READ, @@ -210,7 +200,7 @@ v2f::v2f ( IOobject ( - "v2", + IOobject::groupName("v2", U.group()), runTime_.timeName(), mesh_, IOobject::MUST_READ, @@ -222,19 +212,7 @@ v2f::v2f ( IOobject ( - "f", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - nut_ - ( - IOobject - ( - "nut", + IOobject::groupName("f", U.group()), runTime_.timeName(), mesh_, IOobject::MUST_READ, @@ -250,85 +228,19 @@ v2f::v2f bound(v2_, v2Min_); bound(f_, fMin_); - nut_ = davidsonCorrectNut(Cmu_*v2_*Ts()); - nut_.correctBoundaryConditions(); - - printCoeffs(); + if (type == typeName) + { + correctNut(); + printCoeffs(type); + } } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp<volSymmTensorField> v2f::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - nut_*twoSymm(fvc::grad(U_)), - RBoundaryTypes() - ) - ); -} - - -tmp<volSymmTensorField> v2f::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -nuEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> v2f::divDevReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> v2f::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 v2f::read() { - if (RASModel::read()) + if (eddyViscosity<incompressible::RASModel>::read()) { Cmu_.readIfPresent(coeffDict()); CmuKEps_.readIfPresent(coeffDict()); @@ -351,7 +263,7 @@ bool v2f::read() void v2f::correct() { - RASModel::correct(); + eddyViscosity<incompressible::RASModel>::correct(); if (!turbulence_) { @@ -373,7 +285,6 @@ void v2f::correct() 1.0/T*((C1_ - N)*v2_ - 2.0/3.0*k_*(C1_ - 1.0)) ); - tmp<volScalarField> Ceps1 = 1.4*(1.0 + 0.05*min(sqrt(k_/v2_), scalar(100.0))); @@ -444,10 +355,7 @@ void v2f::correct() solve(v2Eqn); bound(v2_, v2Min_); - - // Re-calculate viscosity - nut_ = davidsonCorrectNut(Cmu_*v2_*T); - nut_.correctBoundaryConditions(); + correctNut(); } diff --git a/src/turbulenceModels/incompressible/RAS/v2f/v2f.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/v2f/v2f.H similarity index 77% rename from src/turbulenceModels/incompressible/RAS/v2f/v2f.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/v2f/v2f.H index 04b0fcde0..4d1fdc33f 100644 --- a/src/turbulenceModels/incompressible/RAS/v2f/v2f.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/v2f/v2f.H @@ -31,9 +31,11 @@ Description Lien and Kalitzin's v2-f turbulence model for incompressible flows, with a limit imposed on the turbulent viscosity given by Davidson et al. - The model solves for turbulence k and epsilon, with additional equations - for the turbulence stress normal to streamlines, v2, and elliptic damping - function, f. The variant implemented employs N=6, such that f=0 on walls. + The model solves for turbulence kinetic energy k and turbulence dissipation + rate epsilon, with additional equations for the turbulence stress normal to + streamlines, v2, and elliptic damping function, f. + + The variant implemented employs N=6, such that f=0 on walls. Wall boundary conditions are: @@ -49,15 +51,17 @@ Description v2 = 2/3 k f = zero-gradient - References: - - Lien F-S, Kalitzin G, 2001. Computations of transonic flow with the v2-f - turbulence model. Int. J. Heat Fluid Flow 22, pp 53-61 - - Davidson L, Nielsen P, Sveningsson A, 2003. Modifications of the v2-f - model for computing the flow in a 3D wall jet. Turbulence, Heat and Mass - Transfer 4, pp 577-584 + \verbatim + Lien F-S, Kalitzin G, + "Computations of transonic flow with the v2-f turbulence model", + Int. J. Heat Fluid Flow 22, 2001, pp 53-61 + + Davidson L, Nielsen P, Sveningsson A, + "Modifications of the v2-f model for computing the flow in a + 3D wall jet", + Turbulence, Heat and Mass Transfer 4, 2003, pp 577-584 + \endverbatim The default model coefficients are given as: \verbatim @@ -81,7 +85,7 @@ Note k variants (nutk...) for this case will not behave correctly. SeeAlso - Foam::kEpsilon + Foam::incompressible::RASModels::kEpsilon Foam::kLowReWallFunctionFvPatchScalarField Foam::epsilonLowReWallFunctionFvPatchScalarField Foam::v2WallFunctionFvPatchScalarField @@ -95,7 +99,8 @@ SourceFiles #ifndef v2f_H #define v2f_H -#include "RASModel.H" +#include "turbulentTransportModel.H" +#include "eddyViscosity.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -112,7 +117,7 @@ namespace RASModels class v2f : - public RASModel + public eddyViscosity<incompressible::RASModel> { protected: @@ -146,9 +151,6 @@ protected: //- Damping function volScalarField f_; - //- Turbulence viscosity - volScalarField nut_; - // Bounding values @@ -158,14 +160,7 @@ protected: // Protected Member Functions - //- Return boundary type names for the R field - wordList RBoundaryTypes() const; - - //- Apply Davidson correction to nut - tmp<volScalarField> davidsonCorrectNut - ( - const tmp<volScalarField>& value - ) const; + virtual void correctNut(); //- Return time scale, Ts tmp<volScalarField> Ts() const; @@ -184,11 +179,14 @@ public: //- Construct from components v2f ( + const geometricOneField& alpha, + const geometricOneField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName + const word& propertiesName = turbulenceModel::propertiesName, + const word& type = typeName ); @@ -199,11 +197,8 @@ public: // Member Functions - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const - { - return nut_; - } + //- Read RASProperties dictionary + virtual bool read(); //- Return the effective diffusivity for k tmp<volScalarField> DkEff() const @@ -247,27 +242,8 @@ public: return f_; } - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); }; diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C similarity index 93% rename from src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C rename to src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C index f311165eb..46051f0a6 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "alphatJayatillekeWallFunctionFvPatchScalarField.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" +#include "turbulenceModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "wallFvPatch.H" @@ -202,14 +202,22 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs() const label patchi = patch().index(); // Retrieve turbulence properties from model - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); + + const turbulenceModel& turbulence = db().lookupObject<turbulenceModel> + ( + IOobject::groupName + ( + turbulenceModel::propertiesName, + dimensionedInternalField().group() + ) + ); + const scalar Cmu25 = pow(Cmu_, 0.25); - const scalarField& y = turbModel.y()[patchi]; - const tmp<volScalarField> tnu = turbModel.nu(); + const scalarField& y = turbulence.y()[patchi]; + const tmp<volScalarField> tnu = turbulence.nu(); const volScalarField& nu = tnu(); const scalarField& nuw = nu.boundaryField()[patchi]; - const tmp<volScalarField> tk = turbModel.k(); + const tmp<volScalarField> tk = turbulence.k(); const volScalarField& k = tk(); const IOdictionary& transportProperties = diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H similarity index 98% rename from src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H index f4064c4ef..b4a9005ff 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchFieldFwd.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModel.H similarity index 58% rename from src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchFieldFwd.H rename to src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModel.H index 946f45d07..72818e7f3 100644 --- a/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchFieldFwd.H +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModel.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) 2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -21,27 +21,52 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. -\*---------------------------------------------------------------------------*/ +Typedef + Foam::incompressible::turbulenceModel -#ifndef porousBafflePressureFvPatchFieldsFwd_H -#define porousBafflePressureFvPatchFieldsFwd_H +Typedef + Foam::incompressible::RASModel -#include "fieldTypes.H" +Typedef + Foam::incompressible::LESModel -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +Description + Typedefs for turbulence, RAS and LES models for incompressible flow + based on the standard laminar transport package. -namespace Foam -{ +SourceFiles + turbulentTransportModels.C -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +\*---------------------------------------------------------------------------*/ -template<class Type> class porousBafflePressureFvPatchField; +#ifndef turbulentTransportModel_H +#define turbulentTransportModel_H -makePatchTypeFieldTypedefs(porousBafflePressure); +#include "SpecificIncompressibleTurbulenceModel.H" +#include "RASModel.H" +#include "LESModel.H" +#include "incompressible/transportModel/transportModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace Foam +namespace Foam +{ + namespace incompressible + { + typedef IncompressibleTurbulenceModel<transportModel> turbulenceModel; + + typedef SpecificIncompressibleTurbulenceModel + < + RASModel<turbulenceModel> + > RASModel; + + typedef SpecificIncompressibleTurbulenceModel + < + LESModel<turbulenceModel> + > LESModel; + } +} + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/TurbulenceModels/incompressible/incompressibleTurbulenceModels.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModels.C similarity index 82% rename from src/TurbulenceModels/incompressible/incompressibleTurbulenceModels.C rename to src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModels.C index 361c6f4b7..c97c42fdb 100644 --- a/src/TurbulenceModels/incompressible/incompressibleTurbulenceModels.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "IncompressibleTurbulenceModel.H" -#include "transportModel.H" +#include "incompressible/transportModel/transportModel.H" #include "addToRunTimeSelectionTable.H" #include "makeTurbulenceModel.H" @@ -49,9 +49,15 @@ makeBaseTurbulenceModel makeTemplatedTurbulenceModel \ (transportModelIncompressibleTurbulenceModel, LES, Type) +#include "SpalartAllmaras.H" +makeRASModel(SpalartAllmaras); + #include "kEpsilon.H" makeRASModel(kEpsilon); +#include "LaunderSharmaKE.H" +makeRASModel(LaunderSharmaKE); + #include "kOmegaSST.H" makeRASModel(kOmegaSST); @@ -61,5 +67,14 @@ makeLESModel(Smagorinsky); #include "kEqn.H" makeLESModel(kEqn); +#include "SpalartAllmarasDES.H" +makeLESModel(SpalartAllmarasDES); + +#include "SpalartAllmarasDDES.H" +makeLESModel(SpalartAllmarasDDES); + +#include "SpalartAllmarasIDDES.H" +makeLESModel(SpalartAllmarasIDDES); + // ************************************************************************* // diff --git a/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C b/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C index 35af8e742..a09689d06 100644 --- a/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C +++ b/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,6 +31,7 @@ template<class TransportModel> Foam::PhaseCompressibleTurbulenceModel<TransportModel>:: PhaseCompressibleTurbulenceModel ( + const word& type, const volScalarField& alpha, const volScalarField& rho, const volVectorField& U, diff --git a/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.H b/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.H index d39949c9d..7ebabf307 100644 --- a/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.H +++ b/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -72,6 +72,7 @@ public: //- Construct PhaseCompressibleTurbulenceModel ( + const word& type, const alphaField& alpha, const volScalarField& rho, const volVectorField& U, diff --git a/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C b/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C index 163318083..25539ac16 100644 --- a/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C +++ b/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,6 +31,7 @@ template<class TransportModel> Foam::PhaseIncompressibleTurbulenceModel<TransportModel>:: PhaseIncompressibleTurbulenceModel ( + const word& type, const volScalarField& alpha, const geometricOneField& rho, const volVectorField& U, diff --git a/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.H b/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.H index 836deaaa4..fb4ee56c3 100644 --- a/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.H +++ b/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -72,6 +72,7 @@ public: //- Construct PhaseIncompressibleTurbulenceModel ( + const word& type, const alphaField& alpha, const geometricOneField& rho, const volVectorField& U, diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C b/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C index 11ab976a8..c3586574b 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -54,6 +54,7 @@ Foam::LESModel<BasicTurbulenceModel>::LESModel : BasicTurbulenceModel ( + type, alpha, rho, U, @@ -84,7 +85,7 @@ Foam::LESModel<BasicTurbulenceModel>::LESModel LESdelta::New ( IOobject::groupName("delta", U.group()), - U.mesh(), + *this, LESDict_ ) ) diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.C similarity index 60% rename from src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C rename to src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.C index e7c459b88..301638dd5 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.C @@ -30,20 +30,24 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam +{ +namespace LESModels { defineTypeNameAndDebug(IDDESDelta, 0); addToRunTimeSelectionTable(LESdelta, IDDESDelta, dictionary); } +} // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::IDDESDelta::calcDelta() +void Foam::LESModels::IDDESDelta::calcDelta() { - const volScalarField& hmax = hmax_(); + const volScalarField& hmax = hmax_; + const fvMesh& mesh = turbulenceModel_.mesh(); - // Wall-reflection vectors - const volVectorField& n = wallDist::New(mesh()).n(); + // Wall-normal vectors + const volVectorField& n = wallDist::New(mesh).n(); tmp<volScalarField> tfaceToFacenMax ( @@ -52,46 +56,50 @@ void Foam::IDDESDelta::calcDelta() IOobject ( "faceToFaceMax", - mesh().time().timeName(), - mesh(), + mesh.time().timeName(), + mesh, IOobject::NO_READ, IOobject::NO_WRITE ), - mesh(), - dimensionedScalar("zrero", dimLength, 0.0) + mesh, + dimensionedScalar("zero", dimLength, 0.0) ) ); scalarField& faceToFacenMax = tfaceToFacenMax().internalField(); - const cellList& cells = mesh().cells(); - const vectorField& faceCentres = mesh().faceCentres(); + const cellList& cells = mesh.cells(); + const vectorField& faceCentres = mesh.faceCentres(); - forAll(cells, cellI) + forAll(cells, celli) { - scalar deltaMaxTmp = 0.0; - const labelList& cFaces = cells[cellI]; - const vector nCell = n[cellI]; - forAll(cFaces, cFaceI) + scalar maxDelta = 0.0; + const labelList& cFaces = cells[celli]; + const vector nci = n[celli]; + + forAll(cFaces, cFacei) { - label faceI = cFaces[cFaceI]; - const point& faceCentreI = faceCentres[faceI]; - forAll(cFaces, cFaceJ) + label facei = cFaces[cFacei]; + const point& fci = faceCentres[facei]; + + forAll(cFaces, cFacej) { - label faceJ = cFaces[cFaceJ]; - const point& faceCentreJ = faceCentres[faceJ]; - scalar tmp = (faceCentreJ - faceCentreI) & nCell; - if (tmp > deltaMaxTmp) + label facej = cFaces[cFacej]; + const point& fcj = faceCentres[facej]; + scalar ndfc = nci & (fcj - fci); + + if (ndfc > maxDelta) { - deltaMaxTmp = tmp; + maxDelta = ndfc; } } } - faceToFacenMax[cellI] = deltaMaxTmp; + + faceToFacenMax[celli] = maxDelta; } - label nD = mesh().nGeometricD(); + label nD = mesh.nGeometricD(); if (nD == 2) { @@ -106,15 +114,14 @@ void Foam::IDDESDelta::calcDelta() } delta_.internalField() = - deltaCoeff_ - *min + min ( max ( max ( - cw_*wallDist::New(mesh()).y(), - cw_*hmax + Cw_*wallDist::New(mesh).y(), + Cw_*hmax ), tfaceToFacenMax ), @@ -125,38 +132,47 @@ void Foam::IDDESDelta::calcDelta() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::IDDESDelta::IDDESDelta +Foam::LESModels::IDDESDelta::IDDESDelta ( const word& name, - const fvMesh& mesh, - const dictionary& dd + const turbulenceModel& turbulence, + const dictionary& dict ) : - LESdelta(name, mesh), - hmax_(LESdelta::New("hmax", mesh, dd.parent())), - deltaCoeff_(readScalar(dd.subDict(type()+"Coeffs").lookup("deltaCoeff"))), - cw_(0.15) + LESdelta(name, turbulence), + hmax_ + ( + IOobject::groupName("hmax", turbulence.U().group()), + turbulence, + dict + ), + Cw_ + ( + dict.subDict(type() + "Coeffs").lookupOrDefault<scalar>("Cw", 0.15) + ) { - dd.subDict(type() + "Coeffs").readIfPresent("cw", cw_); calcDelta(); } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::IDDESDelta::read(const dictionary& dd) +void Foam::LESModels::IDDESDelta::read(const dictionary& dict) { - dd.subDict(type() + "Coeffs").lookup("deltaCoeff") >> deltaCoeff_; + const dictionary& coeffsDict(dict.subDict(type() + "Coeffs")); + + coeffsDict.readIfPresent<scalar>("Cw", Cw_); + calcDelta(); } -void Foam::IDDESDelta::correct() +void Foam::LESModels::IDDESDelta::correct() { - if (mesh_.changing()) + if (turbulenceModel_.mesh().changing()) { + hmax_.correct(); calcDelta(); - hmax_().correct(); } } diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.H b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.H similarity index 88% rename from src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.H rename to src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.H index 0274a192f..4f1bf55b1 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.H +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,12 +37,14 @@ SourceFiles #ifndef IDDESDeltaDelta_H #define IDDESDeltaDelta_H -#include "incompressibleLESdelta.H" +#include "maxDeltaxyz.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { +namespace LESModels +{ /*---------------------------------------------------------------------------*\ Class IDDESDelta Declaration @@ -54,9 +56,9 @@ class IDDESDelta { // Private data - autoPtr<Foam::LESdelta> hmax_; - scalar deltaCoeff_; - scalar cw_; + maxDeltaxyz hmax_; + + scalar Cw_; // Private Member Functions @@ -81,7 +83,7 @@ public: IDDESDelta ( const word& name, - const fvMesh& mesh, + const turbulenceModel& turbulence, const dictionary& ); @@ -97,6 +99,12 @@ public: //- Read the LESdelta dictionary void read(const dictionary&); + //- Return the hmax delta field + const volScalarField& hmax() const + { + return hmax_; + } + // Correct values void correct(); }; @@ -104,6 +112,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace LESModels } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C index 5a8ff1c3f..a685bd5e5 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,20 +36,24 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::LESdelta::LESdelta(const word& name, const fvMesh& mesh) +Foam::LESdelta::LESdelta +( + const word& name, + const turbulenceModel& turbulence +) : - mesh_(mesh), + turbulenceModel_(turbulence), delta_ ( IOobject ( name, - mesh.time().timeName(), - mesh, + turbulence.mesh().time().timeName(), + turbulence.mesh(), IOobject::NO_READ, IOobject::NO_WRITE ), - mesh, + turbulence.mesh(), dimensionedScalar(name, dimLength, SMALL), calculatedFvPatchScalarField::typeName ) @@ -61,7 +65,7 @@ Foam::LESdelta::LESdelta(const word& name, const fvMesh& mesh) Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New ( const word& name, - const fvMesh& mesh, + const turbulenceModel& turbulence, const dictionary& dict ) { @@ -76,7 +80,7 @@ Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New { FatalErrorIn ( - "LESdelta::New(const fvMesh&, const dictionary&)" + "LESdelta::New(const word& name, const turbulenceModel& turbulence)" ) << "Unknown LESdelta type " << deltaType << nl << nl << "Valid LESdelta types are :" << endl @@ -84,14 +88,14 @@ Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New << exit(FatalError); } - return autoPtr<LESdelta>(cstrIter()(name, mesh, dict)); + return autoPtr<LESdelta>(cstrIter()(name, turbulence, dict)); } Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New ( const word& name, - const fvMesh& mesh, + const turbulenceModel& turbulence, const dictionary& dict, const dictionaryConstructorTable& additionalConstructors ) @@ -106,7 +110,7 @@ Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New if (cstrIter != additionalConstructors.end()) { - return autoPtr<LESdelta>(cstrIter()(name, mesh, dict)); + return autoPtr<LESdelta>(cstrIter()(name, turbulence, dict)); } else { @@ -117,7 +121,9 @@ Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New { FatalErrorIn ( - "LESdelta::New(const fvMesh&, const dictionary&)" + "LESdelta::New(const word& name, " + "const turbulenceModel& turbulence, " + "const dictionaryConstructorTable&)" ) << "Unknown LESdelta type " << deltaType << nl << nl << "Valid LESdelta types are :" << endl @@ -129,7 +135,7 @@ Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New } else { - return autoPtr<LESdelta>(cstrIter()(name, mesh, dict)); + return autoPtr<LESdelta>(cstrIter()(name, turbulence, dict)); } } } diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.H b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.H index c84ae74c3..35aea4620 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.H +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,9 +35,8 @@ SourceFiles #ifndef LESdelta_H #define LESdelta_H +#include "turbulenceModel.H" #include "volFields.H" -#include "typeInfo.H" -#include "autoPtr.H" #include "runTimeSelectionTables.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,8 +44,6 @@ SourceFiles namespace Foam { -class fvMesh; - /*---------------------------------------------------------------------------*\ Class LESdelta Declaration \*---------------------------------------------------------------------------*/ @@ -58,7 +55,7 @@ protected: // Protected data - const fvMesh& mesh_; + const turbulenceModel& turbulenceModel_; volScalarField delta_; @@ -87,17 +84,21 @@ public: dictionary, ( const word& name, - const fvMesh& mesh, - const dictionary& LESdeltaDict + const turbulenceModel& turbulence, + const dictionary& dict ), - (name, mesh, LESdeltaDict) + (name, turbulence, dict) ); // Constructors - //- Construct from name and mesh - LESdelta(const word& name, const fvMesh&); + //- Construct from name, turbulenceModel and dictionary + LESdelta + ( + const word& name, + const turbulenceModel& turbulence + ); // Selectors @@ -106,16 +107,16 @@ public: static autoPtr<LESdelta> New ( const word& name, - const fvMesh&, - const dictionary& + const turbulenceModel& turbulence, + const dictionary& dict ); //- Return a reference to the selected LES delta static autoPtr<LESdelta> New ( const word& name, - const fvMesh&, - const dictionary&, + const turbulenceModel& turbulence, + const dictionary& dict, const dictionaryConstructorTable& ); @@ -127,10 +128,10 @@ public: // Member Functions - //- Return mesh reference - const fvMesh& mesh() const + //- Return turbulenceModel reference + const turbulenceModel& turbulence() const { - return mesh_; + return turbulenceModel_; } //- Read the LESdelta dictionary diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.C index 9d90e7c69..d2b9f762b 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.C @@ -30,35 +30,46 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam +{ +namespace LESModels { defineTypeNameAndDebug(PrandtlDelta, 0); addToRunTimeSelectionTable(LESdelta, PrandtlDelta, dictionary); } +} // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::PrandtlDelta::calcDelta() +void Foam::LESModels::PrandtlDelta::calcDelta() { delta_ = min ( static_cast<const volScalarField&>(geometricDelta_()), - (kappa_/Cdelta_)*wallDist::New(mesh_).y() + (kappa_/Cdelta_)*wallDist::New(turbulenceModel_.mesh()).y() ); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::PrandtlDelta::PrandtlDelta +Foam::LESModels::PrandtlDelta::PrandtlDelta ( const word& name, - const fvMesh& mesh, + const turbulenceModel& turbulence, const dictionary& dict ) : - LESdelta(name, mesh), - geometricDelta_(LESdelta::New(name, mesh, dict.subDict(type() + "Coeffs"))), + LESdelta(name, turbulence), + geometricDelta_ + ( + LESdelta::New + ( + name, + turbulence, + dict.subDict(type() + "Coeffs") + ) + ), kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), Cdelta_ ( @@ -71,7 +82,7 @@ Foam::PrandtlDelta::PrandtlDelta // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::PrandtlDelta::read(const dictionary& dict) +void Foam::LESModels::PrandtlDelta::read(const dictionary& dict) { const dictionary& coeffDict(dict.subDict(type() + "Coeffs")); @@ -82,11 +93,11 @@ void Foam::PrandtlDelta::read(const dictionary& dict) } -void Foam::PrandtlDelta::correct() +void Foam::LESModels::PrandtlDelta::correct() { geometricDelta_().correct(); - if (mesh_.changing()) + if (turbulenceModel_.mesh().changing()) { calcDelta(); } diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.H b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.H index d8840ff1a..3cb8b7742 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.H +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,6 +41,8 @@ SourceFiles namespace Foam { +namespace LESModels +{ /*---------------------------------------------------------------------------*\ Class PrandtlDelta Declaration @@ -75,11 +77,11 @@ public: // Constructors - //- Construct from name, mesh and IOdictionary + //- Construct from name, turbulenceModel and dictionary PrandtlDelta ( const word& name, - const fvMesh& mesh, + const turbulenceModel& turbulence, const dictionary& ); @@ -101,6 +103,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace LESModels } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C index cdacbc669..4767c400c 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,21 +29,26 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam +{ +namespace LESModels { defineTypeNameAndDebug(cubeRootVolDelta, 0); addToRunTimeSelectionTable(LESdelta, cubeRootVolDelta, dictionary); } +} // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::cubeRootVolDelta::calcDelta() +void Foam::LESModels::cubeRootVolDelta::calcDelta() { - label nD = mesh().nGeometricD(); + const fvMesh& mesh = turbulenceModel_.mesh(); + + label nD = mesh.nGeometricD(); if (nD == 3) { - delta_.internalField() = deltaCoeff_*pow(mesh().V(), 1.0/3.0); + delta_.internalField() = deltaCoeff_*pow(mesh.V(), 1.0/3.0); } else if (nD == 2) { @@ -51,19 +56,19 @@ void Foam::cubeRootVolDelta::calcDelta() << "Case is 2D, LES is not strictly applicable\n" << endl; - const Vector<label>& directions = mesh().geometricD(); + const Vector<label>& directions = mesh.geometricD(); scalar thickness = 0.0; for (direction dir=0; dir<directions.nComponents; dir++) { if (directions[dir] == -1) { - thickness = mesh().bounds().span()[dir]; + thickness = mesh.bounds().span()[dir]; break; } } - delta_.internalField() = deltaCoeff_*sqrt(mesh().V()/thickness); + delta_.internalField() = deltaCoeff_*sqrt(mesh.V()/thickness); } else { @@ -76,14 +81,14 @@ void Foam::cubeRootVolDelta::calcDelta() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::cubeRootVolDelta::cubeRootVolDelta +Foam::LESModels::cubeRootVolDelta::cubeRootVolDelta ( const word& name, - const fvMesh& mesh, + const turbulenceModel& turbulence, const dictionary& dict ) : - LESdelta(name, mesh), + LESdelta(name, turbulence), deltaCoeff_ ( dict.subDict(type() + "Coeffs").lookupOrDefault<scalar>("deltaCoeff", 1) @@ -95,7 +100,7 @@ Foam::cubeRootVolDelta::cubeRootVolDelta // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::cubeRootVolDelta::read(const dictionary& dict) +void Foam::LESModels::cubeRootVolDelta::read(const dictionary& dict) { dict.subDict(type() + "Coeffs").readIfPresent<scalar> ( @@ -107,9 +112,9 @@ void Foam::cubeRootVolDelta::read(const dictionary& dict) } -void Foam::cubeRootVolDelta::correct() +void Foam::LESModels::cubeRootVolDelta::correct() { - if (mesh_.changing()) + if (turbulenceModel_.mesh().changing()) { calcDelta(); } diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H index f6abbe7e1..d0238d8df 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,6 +41,8 @@ SourceFiles namespace Foam { +namespace LESModels +{ /*---------------------------------------------------------------------------*\ Class cubeRootVolDelta Declaration @@ -73,11 +75,11 @@ public: // Constructors - //- Construct from name, mesh and IOdictionary + //- Construct from name, turbulenceModel and dictionary cubeRootVolDelta ( const word& name, - const fvMesh& mesh, + const turbulenceModel& turbulence, const dictionary& ); @@ -99,6 +101,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace LESModels } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C index 9e4e57471..6c277bf7e 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,17 +29,22 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam +{ +namespace LESModels { defineTypeNameAndDebug(maxDeltaxyz, 0); addToRunTimeSelectionTable(LESdelta, maxDeltaxyz, dictionary); } +} // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::maxDeltaxyz::calcDelta() +void Foam::LESModels::maxDeltaxyz::calcDelta() { - label nD = mesh().nGeometricD(); + const fvMesh& mesh = turbulenceModel_.mesh(); + + label nD = mesh.nGeometricD(); tmp<volScalarField> hmax ( @@ -48,28 +53,28 @@ void Foam::maxDeltaxyz::calcDelta() IOobject ( "hmax", - mesh().time().timeName(), - mesh(), + mesh.time().timeName(), + mesh, IOobject::NO_READ, IOobject::NO_WRITE ), - mesh(), + mesh, dimensionedScalar("zrero", dimLength, 0.0) ) ); - const cellList& cells = mesh().cells(); + const cellList& cells = mesh.cells(); forAll(cells,cellI) { scalar deltaMaxTmp = 0.0; - const labelList& cFaces = mesh().cells()[cellI]; - const point& centrevector = mesh().cellCentres()[cellI]; + const labelList& cFaces = mesh.cells()[cellI]; + const point& centrevector = mesh.cellCentres()[cellI]; forAll(cFaces, cFaceI) { label faceI = cFaces[cFaceI]; - const point& facevector = mesh().faceCentres()[faceI]; + const point& facevector = mesh.faceCentres()[faceI]; scalar tmp = mag(facevector - centrevector); if (tmp > deltaMaxTmp) { @@ -102,14 +107,14 @@ void Foam::maxDeltaxyz::calcDelta() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::maxDeltaxyz::maxDeltaxyz +Foam::LESModels::maxDeltaxyz::maxDeltaxyz ( const word& name, - const fvMesh& mesh, + const turbulenceModel& turbulence, const dictionary& dict ) : - LESdelta(name, mesh), + LESdelta(name, turbulence), deltaCoeff_ ( dict.subDict(type() + "Coeffs").lookupOrDefault<scalar>("deltaCoeff", 1) @@ -121,21 +126,19 @@ Foam::maxDeltaxyz::maxDeltaxyz // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::maxDeltaxyz::read(const dictionary& dict) +void Foam::LESModels::maxDeltaxyz::read(const dictionary& dict) { - dict.subDict(type() + "Coeffs").readIfPresent<scalar> - ( - "deltaCoeff", - deltaCoeff_ - ); + const dictionary& coeffsDict(dict.subDict(type() + "Coeffs")); + + coeffsDict.readIfPresent<scalar>("deltaCoeff", deltaCoeff_); calcDelta(); } -void Foam::maxDeltaxyz::correct() +void Foam::LESModels::maxDeltaxyz::correct() { - if (mesh_.changing()) + if (turbulenceModel_.mesh().changing()) { calcDelta(); } diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.H b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.H index 05df8af55..8fd626654 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.H +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,6 +44,8 @@ SourceFiles namespace Foam { +namespace LESModels +{ /*---------------------------------------------------------------------------*\ Class maxDeltaxyz Declaration @@ -77,11 +79,11 @@ public: // Constructors - //- Construct from name, mesh and IOdictionary + //- Construct from name, turbulenceModel and dictionary maxDeltaxyz ( const word& name, - const fvMesh& mesh, + const turbulenceModel& turbulence, const dictionary& ); @@ -103,6 +105,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace LESModels } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C index 07a5ad6fe..843f1076a 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,26 +30,18 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam +{ +namespace LESModels { defineTypeNameAndDebug(smoothDelta, 0); addToRunTimeSelectionTable(LESdelta, smoothDelta, dictionary); } +} // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -// Fill changedFaces (with face labels) and changedFacesInfo (with delta) -// This is the initial set of faces from which to start the waves. -// Since there might be lots of places with delta jumps we can follow various -// strategies for this initial 'seed'. -// - start from single cell/face and let FaceCellWave pick up all others -// from there. might be quite a few waves before everything settles. -// - start from all faces. Lots of initial transfers. -// We do something inbetween: -// - start from all faces where there is a jump. Since we cannot easily -// determine this across coupled patches (cyclic, processor) introduce -// all faces of these and let FaceCellWave sort it out. -void Foam::smoothDelta::setChangedFaces +void Foam::LESModels::smoothDelta::setChangedFaces ( const polyMesh& mesh, const volScalarField& delta, @@ -102,18 +94,20 @@ void Foam::smoothDelta::setChangedFaces } -void Foam::smoothDelta::calcDelta() +void Foam::LESModels::smoothDelta::calcDelta() { + const fvMesh& mesh = turbulenceModel_.mesh(); + const volScalarField& geometricDelta = geometricDelta_(); // Fill changed faces with info - DynamicList<label> changedFaces(mesh_.nFaces()/100 + 100); + DynamicList<label> changedFaces(mesh.nFaces()/100 + 100); DynamicList<deltaData> changedFacesInfo(changedFaces.size()); - setChangedFaces(mesh_, geometricDelta, changedFaces, changedFacesInfo); + setChangedFaces(mesh, geometricDelta, changedFaces, changedFacesInfo); // Set initial field on cells. - List<deltaData> cellDeltaData(mesh_.nCells()); + List<deltaData> cellDeltaData(mesh.nCells()); forAll(geometricDelta, cellI) { @@ -121,18 +115,18 @@ void Foam::smoothDelta::calcDelta() } // Set initial field on faces. - List<deltaData> faceDeltaData(mesh_.nFaces()); + List<deltaData> faceDeltaData(mesh.nFaces()); // Propagate information over whole domain. FaceCellWave<deltaData, scalar> deltaCalc ( - mesh_, + mesh, changedFaces, changedFacesInfo, faceDeltaData, cellDeltaData, - mesh_.globalData().nTotalCells()+1, // max iterations + mesh.globalData().nTotalCells()+1, // max iterations maxDeltaRatio_ ); @@ -145,17 +139,22 @@ void Foam::smoothDelta::calcDelta() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::smoothDelta::smoothDelta +Foam::LESModels::smoothDelta::smoothDelta ( const word& name, - const fvMesh& mesh, + const turbulenceModel& turbulence, const dictionary& dict ) : - LESdelta(name, mesh), + LESdelta(name, turbulence), geometricDelta_ ( - LESdelta::New("geometricDelta", mesh, dict.subDict(type() + "Coeffs")) + LESdelta::New + ( + "geometricDelta", + turbulence, + dict.subDict(type() + "Coeffs") + ) ), maxDeltaRatio_ ( @@ -168,7 +167,7 @@ Foam::smoothDelta::smoothDelta // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::smoothDelta::read(const dictionary& dict) +void Foam::LESModels::smoothDelta::read(const dictionary& dict) { const dictionary& coeffsDict(dict.subDict(type() + "Coeffs")); @@ -178,11 +177,11 @@ void Foam::smoothDelta::read(const dictionary& dict) } -void Foam::smoothDelta::correct() +void Foam::LESModels::smoothDelta::correct() { geometricDelta_().correct(); - if (mesh_.changing()) + if (turbulenceModel_.mesh().changing()) { calcDelta(); } diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H index e80d09484..bae48b7a8 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,6 +43,8 @@ SourceFiles namespace Foam { +namespace LESModels +{ /*---------------------------------------------------------------------------*\ Class smoothDelta Declaration @@ -225,7 +227,19 @@ private: // Calculate the delta values void calcDelta(); - + //- Fill changedFaces (with face labels) and changedFacesInfo + // (with delta). + // This is the initial set of faces from which to start the waves. + // Since there might be lots of places with delta jumps we can follow + // various strategies for this initial 'seed'. + // - start from single cell/face and let FaceCellWave pick up all + // others from there. might be quite a few waves before everything + // settles. + // - start from all faces. Lots of initial transfers. + // We do something in between: + // - start from all faces where there is a jump. Since we cannot easily + // determine this across coupled patches (cyclic, processor) + // introduce all faces of these and let FaceCellWave sort it out. void setChangedFaces ( const polyMesh& mesh, @@ -243,11 +257,11 @@ public: // Constructors - //- Construct from name, mesh and IOdictionary + //- Construct from name, turbulenceModel and dictionary smoothDelta ( const word& name, - const fvMesh& mesh, + const turbulenceModel& turbulence, const dictionary& ); @@ -267,14 +281,19 @@ public: }; +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace LESModels + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + //- Data associated with deltaData type are contiguous template<> -inline bool contiguous<smoothDelta::deltaData>() +inline bool contiguous<LESModels::smoothDelta::deltaData>() { return true; } - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDeltaDeltaDataI.H b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDeltaDeltaDataI.H index 16fbd8b51..eef7c42d8 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDeltaDeltaDataI.H +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDeltaDeltaDataI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,16 +23,10 @@ License \*---------------------------------------------------------------------------*/ -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -// Update this with w2 if applicable template<class TrackingData> -inline bool smoothDelta::deltaData::update +inline bool Foam::LESModels::smoothDelta::deltaData::update ( const smoothDelta::deltaData& w2, const scalar scale, @@ -67,15 +61,13 @@ inline bool smoothDelta::deltaData::update // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Null constructor -inline smoothDelta::deltaData::deltaData() +inline Foam::LESModels::smoothDelta::deltaData::deltaData() : delta_(-GREAT) {} -// Construct from components -inline smoothDelta::deltaData::deltaData(const scalar delta) +inline Foam::LESModels::smoothDelta::deltaData::deltaData(const scalar delta) : delta_(delta) {} @@ -84,15 +76,17 @@ inline smoothDelta::deltaData::deltaData(const scalar delta) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class TrackingData> -inline bool smoothDelta::deltaData::valid(TrackingData& td) const +inline bool Foam::LESModels::smoothDelta::deltaData::valid +( + TrackingData& td +) const { return delta_ > -SMALL; } -// Checks for cyclic faces template<class TrackingData> -inline bool smoothDelta::deltaData::sameGeometry +inline bool Foam::LESModels::smoothDelta::deltaData::sameGeometry ( const polyMesh&, const deltaData&, @@ -105,7 +99,7 @@ inline bool smoothDelta::deltaData::sameGeometry template<class TrackingData> -inline void smoothDelta::deltaData::leaveDomain +inline void Foam::LESModels::smoothDelta::deltaData::leaveDomain ( const polyMesh&, const polyPatch&, @@ -117,7 +111,7 @@ inline void smoothDelta::deltaData::leaveDomain template<class TrackingData> -inline void smoothDelta::deltaData::transform +inline void Foam::LESModels::smoothDelta::deltaData::transform ( const polyMesh&, const tensor&, @@ -126,9 +120,8 @@ inline void smoothDelta::deltaData::transform {} -// Update absolute geometric quantities. template<class TrackingData> -inline void smoothDelta::deltaData::enterDomain +inline void Foam::LESModels::smoothDelta::deltaData::enterDomain ( const polyMesh&, const polyPatch&, @@ -139,9 +132,8 @@ inline void smoothDelta::deltaData::enterDomain {} -// Update this (cellI) with face information. template<class TrackingData> -inline bool smoothDelta::deltaData::updateCell +inline bool Foam::LESModels::smoothDelta::deltaData::updateCell ( const polyMesh&, const label, @@ -156,9 +148,8 @@ inline bool smoothDelta::deltaData::updateCell } -// Update this (face) with cell information. template<class TrackingData> -inline bool smoothDelta::deltaData::updateFace +inline bool Foam::LESModels::smoothDelta::deltaData::updateFace ( const polyMesh&, const label, @@ -173,9 +164,8 @@ inline bool smoothDelta::deltaData::updateFace } -// Update this (face) with coupled face information. template<class TrackingData> -inline bool smoothDelta::deltaData::updateFace +inline bool Foam::LESModels::smoothDelta::deltaData::updateFace ( const polyMesh&, const label, @@ -190,7 +180,7 @@ inline bool smoothDelta::deltaData::updateFace template<class TrackingData> -inline bool smoothDelta::deltaData::equal +inline bool Foam::LESModels::smoothDelta::deltaData::equal ( const deltaData& rhs, TrackingData& td @@ -202,7 +192,7 @@ inline bool smoothDelta::deltaData::equal // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -inline bool smoothDelta::deltaData::operator== +inline bool Foam::LESModels::smoothDelta::deltaData::operator== ( const deltaData& rhs ) const @@ -211,7 +201,7 @@ inline bool smoothDelta::deltaData::operator== } -inline bool smoothDelta::deltaData::operator!= +inline bool Foam::LESModels::smoothDelta::deltaData::operator!= ( const deltaData& rhs ) const @@ -220,8 +210,4 @@ inline bool smoothDelta::deltaData::operator!= } -// ************************************************************************* // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/vanDriestDelta/vanDriestDelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/vanDriestDelta/vanDriestDelta.C similarity index 61% rename from src/turbulenceModels/incompressible/LES/vanDriestDelta/vanDriestDelta.C rename to src/TurbulenceModels/turbulenceModels/LES/LESdeltas/vanDriestDelta/vanDriestDelta.C index 35cf23f68..b0338981e 100644 --- a/src/turbulenceModels/incompressible/LES/vanDriestDelta/vanDriestDelta.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/vanDriestDelta/vanDriestDelta.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,50 +24,46 @@ License \*---------------------------------------------------------------------------*/ #include "vanDriestDelta.H" -#include "LESModel.H" #include "wallFvPatch.H" #include "wallDistData.H" #include "wallPointYPlus.H" #include "addToRunTimeSelectionTable.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { -namespace incompressible -{ namespace LESModels { - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(vanDriestDelta, 0); -addToRunTimeSelectionTable(LESdelta, vanDriestDelta, dictionary); + defineTypeNameAndDebug(vanDriestDelta, 0); + addToRunTimeSelectionTable(LESdelta, vanDriestDelta, dictionary); +} +} // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void vanDriestDelta::calcDelta() +void Foam::LESModels::vanDriestDelta::calcDelta() { - const LESModel& lesModel = mesh_.lookupObject<LESModel>("LESProperties"); + const fvMesh& mesh = turbulenceModel_.mesh(); - const volVectorField& U = lesModel.U(); - const tmp<volScalarField> tnu = lesModel.nu(); + const volVectorField& U = turbulenceModel_.U(); + const tmp<volScalarField> tnu = turbulenceModel_.nu(); const volScalarField& nu = tnu(); - tmp<volScalarField> nuSgs = lesModel.nuSgs(); + tmp<volScalarField> nuSgs = turbulenceModel_.nut(); volScalarField ystar ( IOobject ( "ystar", - mesh_.time().constant(), - mesh_ + mesh.time().constant(), + mesh ), - mesh_, + mesh, dimensionedScalar("ystar", dimLength, GREAT) ); - const fvPatchList& patches = mesh_.boundary(); + const fvPatchList& patches = mesh.boundary(); forAll(patches, patchi) { if (isA<wallFvPatch>(patches[patchi])) @@ -83,7 +79,7 @@ void vanDriestDelta::calcDelta() scalar cutOff = wallPointYPlus::yPlusCutOff; wallPointYPlus::yPlusCutOff = 500; - wallDistData<wallPointYPlus> y(mesh_, ystar); + wallDistData<wallPointYPlus> y(mesh, ystar); wallPointYPlus::yPlusCutOff = cutOff; delta_ = min @@ -96,30 +92,39 @@ void vanDriestDelta::calcDelta() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -vanDriestDelta::vanDriestDelta +Foam::LESModels::vanDriestDelta::vanDriestDelta ( const word& name, - const fvMesh& mesh, - const dictionary& dd + const turbulenceModel& turbulence, + const dictionary& dict ) : - LESdelta(name, mesh), + LESdelta(name, turbulence), geometricDelta_ ( - LESdelta::New("geometricDelta", mesh, dd.subDict(type() + "Coeffs")) + LESdelta::New + ( + IOobject::groupName("geometricDelta", turbulence.U().group()), + turbulence, + dict.subDict(type() + "Coeffs") + ) ), - kappa_(dd.lookupOrDefault<scalar>("kappa", 0.41)), + kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), Aplus_ ( - dd.subDict(type() + "Coeffs").lookupOrDefault<scalar>("Aplus", 26.0) + dict.subDict(type() + "Coeffs").lookupOrDefault<scalar>("Aplus", 26.0) ), Cdelta_ ( - dd.subDict(type() + "Coeffs").lookupOrDefault<scalar>("Cdelta", 0.158) + dict.subDict(type() + "Coeffs").lookupOrDefault<scalar>("Cdelta", 0.158) ), calcInterval_ ( - dd.subDict(type() + "Coeffs").lookupOrDefault<label>("calcInterval", 1) + dict.subDict(type() + "Coeffs").lookupOrDefault<label> + ( + "calcInterval", + 1 + ) ) { delta_ = geometricDelta_(); @@ -128,22 +133,23 @@ vanDriestDelta::vanDriestDelta // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void vanDriestDelta::read(const dictionary& d) +void Foam::LESModels::vanDriestDelta::read(const dictionary& dict) { - const dictionary& dd(d.subDict(type() + "Coeffs")); + const dictionary& coeffsDict(dict.subDict(type() + "Coeffs")); + + geometricDelta_().read(coeffsDict); + dict.readIfPresent<scalar>("kappa", kappa_); + coeffsDict.readIfPresent<scalar>("Aplus", Aplus_); + coeffsDict.readIfPresent<scalar>("Cdelta", Cdelta_); + coeffsDict.readIfPresent<label>("calcInterval", calcInterval_); - geometricDelta_().read(dd); - d.readIfPresent<scalar>("kappa", kappa_); - dd.readIfPresent<scalar>("Aplus", Aplus_); - dd.readIfPresent<scalar>("Cdelta", Cdelta_); - dd.readIfPresent<label>("calcInterval", calcInterval_); calcDelta(); } -void vanDriestDelta::correct() +void Foam::LESModels::vanDriestDelta::correct() { - if (mesh().time().timeIndex() % calcInterval_ == 0) + if (turbulenceModel_.mesh().time().timeIndex() % calcInterval_ == 0) { geometricDelta_().correct(); calcDelta(); @@ -151,10 +157,4 @@ void vanDriestDelta::correct() } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/vanDriestDelta/vanDriestDelta.H b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/vanDriestDelta/vanDriestDelta.H similarity index 87% rename from src/turbulenceModels/incompressible/LES/vanDriestDelta/vanDriestDelta.H rename to src/TurbulenceModels/turbulenceModels/LES/LESdeltas/vanDriestDelta/vanDriestDelta.H index 217f86e9d..81feca579 100644 --- a/src/turbulenceModels/incompressible/LES/vanDriestDelta/vanDriestDelta.H +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/vanDriestDelta/vanDriestDelta.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::incompressible::LESModels::vanDriestDelta + Foam::vanDriestDelta Description Simple cube-root of cell volume delta used in incompressible LES models. @@ -35,14 +35,12 @@ SourceFiles #ifndef vanDriestDelta_H #define vanDriestDelta_H -#include "incompressibleLESdelta.H" +#include "LESdelta.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace incompressible -{ namespace LESModels { @@ -56,7 +54,7 @@ class vanDriestDelta { // Private data - autoPtr<Foam::LESdelta> geometricDelta_; + autoPtr<LESdelta> geometricDelta_; scalar kappa_; scalar Aplus_; scalar Cdelta_; @@ -81,8 +79,13 @@ public: // Constructors - //- Construct from name, mesh and IOdictionary - vanDriestDelta(const word& name, const fvMesh& mesh, const dictionary&); + //- Construct from name, turbulenceModel and dictionary + vanDriestDelta + ( + const word& name, + const turbulenceModel& turbulence, + const dictionary& + ); //- Destructor @@ -103,7 +106,6 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace LESModels -} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.C b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.C similarity index 55% rename from src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.C rename to src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.C index a344ee920..186970ca6 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.C +++ b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.C @@ -24,70 +24,73 @@ License \*---------------------------------------------------------------------------*/ #include "SpalartAllmarasDDES.H" -#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace incompressible -{ namespace LESModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(SpalartAllmarasDDES, 0); -addToRunTimeSelectionTable(LESModel, SpalartAllmarasDDES, dictionary); - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // -tmp<volScalarField> SpalartAllmarasDDES::rd +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasDDES<BasicTurbulenceModel>::rd ( - const volScalarField& visc, - const volScalarField& S + const volScalarField& magGradU ) const { - return min + tmp<volScalarField> tr ( - visc - /( - max - ( - S, - dimensionedScalar("SMALL", S.dimensions(), SMALL) - )*sqr(kappa_*y_) - + dimensionedScalar - ( - "ROOTVSMALL", - dimensionSet(0, 2 , -1, 0, 0), - ROOTVSMALL - ) - ), - scalar(10) + min + ( + this->nuEff() + /( + max + ( + magGradU, + dimensionedScalar("SMALL", magGradU.dimensions(), SMALL) + ) + *sqr(this->kappa_*this->y_) + ), + scalar(10) + ) ); -} + tr().boundaryField() == 0.0; - -tmp<volScalarField> SpalartAllmarasDDES::fd(const volScalarField& S) const -{ - return 1 - tanh(pow3(8*rd(nuEff(), S))); + return tr; } -tmp<volScalarField> SpalartAllmarasDDES::S(const volTensorField& gradU) const +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasDDES<BasicTurbulenceModel>::fd +( + const volScalarField& magGradU +) const { - return sqrt(2.0)*mag(symm(gradU)); + return 1 - tanh(pow3(8*rd(magGradU))); } -tmp<volScalarField> SpalartAllmarasDDES::dTilda(const volScalarField& S) const +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasDDES<BasicTurbulenceModel>::dTilda +( + const volScalarField& chi, + const volScalarField& fv1, + const volTensorField& gradU +) const { return max ( - y_ - - fd(S) - *max(y_ - CDES_*delta(), dimensionedScalar("zero", dimLength, 0)), + this->y_ + - fd(mag(gradU)) + *max + ( + this->y_ - this->CDES_*this->delta(), + dimensionedScalar("zero", dimLength, 0) + ), dimensionedScalar("small", dimLength, SMALL) ); } @@ -95,23 +98,35 @@ tmp<volScalarField> SpalartAllmarasDDES::dTilda(const volScalarField& S) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -SpalartAllmarasDDES::SpalartAllmarasDDES +template<class BasicTurbulenceModel> +SpalartAllmarasDDES<BasicTurbulenceModel>::SpalartAllmarasDDES ( + const alphaField& alpha, + const rhoField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName, - const word& modelName + const word& propertiesName, + const word& type ) : - SpalartAllmaras(U, phi, transport, turbulenceModelName, modelName) + SpalartAllmarasDES<BasicTurbulenceModel> + ( + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ) {} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace LESModels -} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.H b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.H similarity index 64% rename from src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.H rename to src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.H index 5421384e2..addcb635a 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.H +++ b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.H @@ -22,18 +22,23 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::incompressible::LESModels::SpalartAllmarasDDES + Foam::LESModels::SpalartAllmarasDDES Group - grpIcoDESTurbulence + grpDESTurbulence Description - SpalartAllmaras DDES LES turbulence model for incompressible flows + SpalartAllmaras DDES turbulence model for incompressible and compressible + flows Reference: - P.R. Spalart, S. Deck, S., M.L.Shur, K.D. Squires, M.Kh Strelets, and - A. Travin. `A new version of detached-eddy simulation, resistant to - ambiguous grid densities'. Theor. Comp. Fluid Dyn., 20:181-195, 2006. + \verbatim + Spalart, P. R., Deck, S., Shur, M. L., Squires, K. D., Strelets, M. K., + & Travin, A. (2006). + A new version of detached-eddy simulation, resistant to ambiguous grid + densities. + Theoretical and computational fluid dynamics, 20(3), 181-195. + \endverbatim SourceFiles SpalartAllmarasDDES.C @@ -43,14 +48,12 @@ SourceFiles #ifndef SpalartAllmarasDDES_H #define SpalartAllmarasDDES_H -#include "SpalartAllmaras.H" +#include "SpalartAllmarasDES.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace incompressible -{ namespace LESModels { @@ -58,19 +61,16 @@ namespace LESModels Class SpalartAllmarasDDES Declaration \*---------------------------------------------------------------------------*/ +template<class BasicTurbulenceModel> class SpalartAllmarasDDES : - public SpalartAllmaras + public SpalartAllmarasDES<BasicTurbulenceModel> { // Private Member Functions - tmp<volScalarField> fd(const volScalarField& S) const; + tmp<volScalarField> fd(const volScalarField& magGradU) const; - tmp<volScalarField> rd - ( - const volScalarField& visc, - const volScalarField& S - ) const; + tmp<volScalarField> rd(const volScalarField& magGradU) const; // Disallow default bitwise copy construct and assignment SpalartAllmarasDDES(const SpalartAllmarasDDES&); @@ -82,13 +82,21 @@ protected: // Protected Member Functions //- Length scale - virtual tmp<volScalarField> dTilda(const volScalarField& S) const; - - virtual tmp<volScalarField> S(const volTensorField& gradU) const; + virtual tmp<volScalarField> dTilda + ( + const volScalarField& chi, + const volScalarField& fv1, + const volTensorField& gradU + ) const; public: + typedef typename BasicTurbulenceModel::alphaField alphaField; + typedef typename BasicTurbulenceModel::rhoField rhoField; + typedef typename BasicTurbulenceModel::transportModel transportModel; + + //- Runtime type information TypeName("SpalartAllmarasDDES"); @@ -98,11 +106,14 @@ public: //- Construct from components SpalartAllmarasDDES ( + const alphaField& alpha, + const rhoField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName + const word& propertiesName = turbulenceModel::propertiesName, + const word& type = typeName ); @@ -115,11 +126,16 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace LESModels -} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository +# include "SpalartAllmarasDDES.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.C b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.C new file mode 100644 index 000000000..f0a8c60ac --- /dev/null +++ b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.C @@ -0,0 +1,454 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "SpalartAllmarasDES.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace LESModels +{ + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::chi() const +{ + return nuTilda_/this->nu(); +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::fv1 +( + const volScalarField& chi +) const +{ + const volScalarField chi3("chi3", pow3(chi)); + return chi3/(chi3 + pow3(Cv1_)); +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::fv2 +( + const volScalarField& chi, + const volScalarField& fv1 +) const +{ + return 1.0 - chi/(1.0 + chi*fv1); +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::S +( + const volTensorField& gradU +) const +{ + return sqrt(2.0)*mag(symm(gradU)); +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::Omega +( + const volTensorField& gradU +) const +{ + return sqrt(2.0)*mag(skew(gradU)); +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::Stilda +( + const volScalarField& chi, + const volScalarField& fv1, + const volScalarField& Omega, + const volScalarField& dTilda +) const +{ + return + ( + max + ( + Omega + + fv2(chi, fv1)*nuTilda_/sqr(kappa_*dTilda), + Cs_*Omega + ) + ); +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::r +( + const volScalarField& nur, + const volScalarField& Omega, + const volScalarField& dTilda +) const +{ + tmp<volScalarField> tr + ( + min + ( + nur + /( + max + ( + Omega, + dimensionedScalar("SMALL", Omega.dimensions(), SMALL) + ) + *sqr(kappa_*dTilda) + ), + scalar(10) + ) + ); + tr().boundaryField() == 0.0; + + return tr; +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::fw +( + const volScalarField& Omega, + const volScalarField& dTilda +) const +{ + const volScalarField r(this->r(nuTilda_, Omega, dTilda)); + const volScalarField g(r + Cw2_*(pow6(r) - r)); + + return g*pow((1 + pow6(Cw3_))/(pow6(g) + pow6(Cw3_)), 1.0/6.0); +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::dTilda +( + const volScalarField& chi, + const volScalarField& fv1, + const volTensorField& gradU +) const +{ + tmp<volScalarField> tdTilda(CDES_*this->delta()); + min(tdTilda().dimensionedInternalField(), tdTilda(), y_); + return tdTilda; +} + + +template<class BasicTurbulenceModel> +void SpalartAllmarasDES<BasicTurbulenceModel>::correctNut +( + const volScalarField& fv1 +) +{ + this->nut_ = nuTilda_*fv1; + this->nut_.correctBoundaryConditions(); +} + + +template<class BasicTurbulenceModel> +void SpalartAllmarasDES<BasicTurbulenceModel>::correctNut() +{ + correctNut(fv1(this->chi())); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +SpalartAllmarasDES<BasicTurbulenceModel>::SpalartAllmarasDES +( + const alphaField& alpha, + const rhoField& rho, + const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, + const surfaceScalarField& phi, + const transportModel& transport, + const word& propertiesName, + const word& type +) +: + LESeddyViscosity<BasicTurbulenceModel> + ( + type, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ), + + sigmaNut_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "sigmaNut", + this->coeffDict_, + 0.66666 + ) + ), + kappa_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "kappa", + this->coeffDict_, + 0.41 + ) + ), + Cb1_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "Cb1", + this->coeffDict_, + 0.1355 + ) + ), + Cb2_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "Cb2", + this->coeffDict_, + 0.622 + ) + ), + Cw1_(Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_), + Cw2_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "Cw2", + this->coeffDict_, + 0.3 + ) + ), + Cw3_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "Cw3", + this->coeffDict_, + 2.0 + ) + ), + Cv1_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "Cv1", + this->coeffDict_, + 7.1 + ) + ), + Cs_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "Cs", + this->coeffDict_, + 0.3 + ) + ), + CDES_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "CDES", + this->coeffDict_, + 0.65 + ) + ), + ck_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "ck", + this->coeffDict_, + 0.07 + ) + ), + + nuTilda_ + ( + IOobject + ( + "nuTilda", + this->runTime_.timeName(), + this->mesh_, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + this->mesh_ + ), + + y_(wallDist::New(this->mesh_).y()) +{ + if (type == typeName) + { + correctNut(); + this->printCoeffs(type); + } +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +bool SpalartAllmarasDES<BasicTurbulenceModel>::read() +{ + if (LESeddyViscosity<BasicTurbulenceModel>::read()) + { + sigmaNut_.readIfPresent(this->coeffDict()); + kappa_.readIfPresent(*this); + + Cb1_.readIfPresent(this->coeffDict()); + Cb2_.readIfPresent(this->coeffDict()); + Cw1_ = Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_; + Cw2_.readIfPresent(this->coeffDict()); + Cw3_.readIfPresent(this->coeffDict()); + Cv1_.readIfPresent(this->coeffDict()); + Cs_.readIfPresent(this->coeffDict()); + + CDES_.readIfPresent(this->coeffDict()); + ck_.readIfPresent(this->coeffDict()); + + return true; + } + else + { + return false; + } +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>:: +DnuTildaEff() const +{ + return tmp<volScalarField> + ( + new volScalarField("DnuTildaEff", (nuTilda_ + this->nu())/sigmaNut_) + ); +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::k() const +{ + const volScalarField chi(this->chi()); + const volScalarField fv1(this->fv1(chi)); + return sqr(this->nut()/ck_/dTilda(chi, fv1, fvc::grad(this->U_))); +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::LESRegion() const +{ + const volScalarField chi(this->chi()); + const volScalarField fv1(this->fv1(chi)); + + tmp<volScalarField> tLESRegion + ( + new volScalarField + ( + IOobject + ( + "DES::LESRegion", + this->mesh_.time().timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + neg(dTilda(chi, fv1, fvc::grad(this->U_)) - y_) + ) + ); + + return tLESRegion; +} + + +template<class BasicTurbulenceModel> +void SpalartAllmarasDES<BasicTurbulenceModel>::correct() +{ + if (!this->turbulence_) + { + return; + } + + // Local references + const alphaField& alpha = this->alpha_; + const rhoField& rho = this->rho_; + const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; + const volVectorField& U = this->U_; + + LESeddyViscosity<BasicTurbulenceModel>::correct(); + + const volScalarField chi(this->chi()); + const volScalarField fv1(this->fv1(chi)); + + tmp<volTensorField> tgradU = fvc::grad(U); + const volScalarField Omega(this->Omega(tgradU())); + const volScalarField dTilda(this->dTilda(chi, fv1, tgradU())); + const volScalarField Stilda(this->Stilda(chi, fv1, Omega, dTilda)); + + tmp<fvScalarMatrix> nuTildaEqn + ( + fvm::ddt(alpha, rho, nuTilda_) + + fvm::div(alphaRhoPhi, nuTilda_) + - fvm::laplacian(alpha*rho*DnuTildaEff(), nuTilda_) + - Cb2_/sigmaNut_*alpha*rho*magSqr(fvc::grad(nuTilda_)) + == + Cb1_*alpha*rho*Stilda*nuTilda_ + - fvm::Sp + ( + Cw1_*alpha*rho*fw(Stilda, dTilda)*nuTilda_/sqr(dTilda), + nuTilda_ + ) + ); + + nuTildaEqn().relax(); + solve(nuTildaEqn); + bound(nuTilda_, dimensionedScalar("zero", nuTilda_.dimensions(), 0.0)); + nuTilda_.correctBoundaryConditions(); + + correctNut(fv1); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace LESModels +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.H similarity index 54% rename from src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H rename to src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.H index f5753ebfc..4c512487a 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H +++ b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.H @@ -22,209 +22,203 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::incompressible::LESModels::SpalartAllmaras + Foam::LESModels::SpalartAllmarasDES Group - grpIcoDESTurbulence + grpDESTurbulence Description - SpalartAllmaras DES (SA + LES) turbulence model for incompressible flows + SpalartAllmarasDES DES turbulence model for incompressible and + compressible flows - Extended according to + Reference: \verbatim - "An Unstructured Grid Generation and Adaptive Solution Technique - for High Reynolds Number Compressible Flows" - G.A. Ashford, - Ph.D. thesis, University of Michigan, 1996. + Spalart, P. R., Jou, W. H., Strelets, M., & Allmaras, S. R. (1997). + Comments on the feasibility of LES for wings, and on a hybrid + RANS/LES approach. + Advances in DNS/LES, 1, 4-8. \endverbatim - by using the optional flag \c ashfordCorrection SourceFiles - SpalartAllmaras.C + SpalartAllmarasDES.C \*---------------------------------------------------------------------------*/ -#ifndef SpalartAllmaras_H -#define SpalartAllmaras_H +#ifndef SpalartAllmarasDES_H +#define SpalartAllmarasDES_H -#include "DESModel.H" -#include "volFields.H" -#include "wallDist.H" +#include "LESeddyViscosity.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace incompressible -{ namespace LESModels { /*---------------------------------------------------------------------------*\ - Class SpalartAllmaras Declaration + Class SpalartAllmarasDES Declaration \*---------------------------------------------------------------------------*/ -class SpalartAllmaras +template<class BasicTurbulenceModel> +class SpalartAllmarasDES : - public DESModel + public LESeddyViscosity<BasicTurbulenceModel> { // Private Member Functions - //- Update sub-grid scale fields - void updateSubGridScaleFields(); - // Disallow default bitwise copy construct and assignment - SpalartAllmaras(const SpalartAllmaras&); - SpalartAllmaras& operator=(const SpalartAllmaras&); + SpalartAllmarasDES(const SpalartAllmarasDES&); + SpalartAllmarasDES& operator=(const SpalartAllmarasDES&); protected: // Protected data - dimensionedScalar sigmaNut_; - dimensionedScalar kappa_; - - // Model constants + dimensionedScalar sigmaNut_; + dimensionedScalar kappa_; + dimensionedScalar Cb1_; dimensionedScalar Cb2_; - dimensionedScalar Cv1_; - dimensionedScalar Cv2_; - dimensionedScalar CDES_; - dimensionedScalar ck_; dimensionedScalar Cw1_; dimensionedScalar Cw2_; dimensionedScalar Cw3_; - - - //- Optional flag to activate the Ashford correction - Switch ashfordCorrection_; - + dimensionedScalar Cv1_; + dimensionedScalar Cs_; + dimensionedScalar CDES_; + dimensionedScalar ck_; // Fields + volScalarField nuTilda_; + //- Wall distance // Note: different to wall distance in parent RASModel // which is for near-wall cells only const volScalarField& y_; - volScalarField nuTilda_; - volScalarField nuSgs_; - // Protected Member Functions - virtual tmp<volScalarField> fv1() const; - virtual tmp<volScalarField> fv2() const; - virtual tmp<volScalarField> fv3() const; - virtual tmp<volScalarField> S(const volTensorField& gradU) const; + tmp<volScalarField> chi() const; - virtual tmp<volScalarField> STilda + tmp<volScalarField> fv1(const volScalarField& chi) const; + + tmp<volScalarField> fv2 ( - const volScalarField& S, + const volScalarField& chi, + const volScalarField& fv1 + ) const; + + tmp<volScalarField> S(const volTensorField& gradU) const; + + tmp<volScalarField> Omega(const volTensorField& gradU) const; + + tmp<volScalarField> Stilda + ( + const volScalarField& chi, + const volScalarField& fv1, + const volScalarField& Omega, const volScalarField& dTilda ) const; - virtual tmp<volScalarField> r + tmp<volScalarField> r ( - const volScalarField& visc, - const volScalarField& S, + const volScalarField& nur, + const volScalarField& Omega, const volScalarField& dTilda ) const; - virtual tmp<volScalarField> fw + tmp<volScalarField> fw ( - const volScalarField& S, + const volScalarField& Omega, const volScalarField& dTilda ) const; //- Length scale - virtual tmp<volScalarField> dTilda(const volScalarField& S) const; + virtual tmp<volScalarField> dTilda + ( + const volScalarField& chi, + const volScalarField& fv1, + const volTensorField& gradU + ) const; + + void correctNut(const volScalarField& fv1); + virtual void correctNut(); public: + typedef typename BasicTurbulenceModel::alphaField alphaField; + typedef typename BasicTurbulenceModel::rhoField rhoField; + typedef typename BasicTurbulenceModel::transportModel transportModel; + + //- Runtime type information - TypeName("SpalartAllmaras"); + TypeName("SpalartAllmarasDES"); // Constructors //- Construct from components - SpalartAllmaras + SpalartAllmarasDES ( + const alphaField& alpha, + const rhoField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName + const word& propertiesName = turbulenceModel::propertiesName, + const word& type = typeName ); //- Destructor - virtual ~SpalartAllmaras() + virtual ~SpalartAllmarasDES() {} // Member Functions + //- Read LESProperties dictionary + virtual bool read(); + + //- Return the effective diffusivity for nuTilda + tmp<volScalarField> DnuTildaEff() const; + //- Return SGS kinetic energy virtual tmp<volScalarField> k() const; - //- Return sub-grid disipation rate - virtual tmp<volScalarField> epsilon() const; - tmp<volScalarField> nuTilda() const { return nuTilda_; } - //- Return SGS viscosity - virtual tmp<volScalarField> nuSgs() const - { - return nuSgs_; - } - - //- Return the sub-grid stress tensor. - virtual tmp<volSymmTensorField> B() const; - - //- Return the effective sub-grid turbulence stress tensor - // including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - - //- Correct nuTilda and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); - //- Return the LES field indicator virtual tmp<volScalarField> LESRegion() const; + + //- Correct nuTilda and related properties + virtual void correct(); }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace LESModels -} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository +# include "SpalartAllmarasDES.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C similarity index 54% rename from src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C rename to src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C index eade16f38..f96cdc6a1 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C +++ b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C @@ -24,73 +24,63 @@ License \*---------------------------------------------------------------------------*/ #include "SpalartAllmarasIDDES.H" -#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace incompressible -{ namespace LESModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(SpalartAllmarasIDDES, 0); -addToRunTimeSelectionTable(LESModel, SpalartAllmarasIDDES, dictionary); - // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // -tmp<volScalarField> SpalartAllmarasIDDES::alpha() const +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasIDDES<BasicTurbulenceModel>::alpha() const { return max ( - 0.25 - y_/static_cast<const volScalarField&>(hmax_()), + 0.25 - this->y_/static_cast<const volScalarField&>(IDDESDelta_.hmax()), scalar(-5) ); } -tmp<volScalarField> SpalartAllmarasIDDES::ft +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasIDDES<BasicTurbulenceModel>::ft ( - const volScalarField& S + const volScalarField& magGradU ) const { - return tanh(pow3(sqr(ct_)*rd(nuSgs_, S))); + return tanh(pow3(sqr(ct_)*rd(this->nut_, magGradU))); } -tmp<volScalarField> SpalartAllmarasIDDES::fl +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasIDDES<BasicTurbulenceModel>::fl ( - const volScalarField& S + const volScalarField& magGradU ) const { - return tanh(pow(sqr(cl_)*rd(nu(), S), 10)); + return tanh(pow(sqr(cl_)*rd(this->nu(), magGradU), 10)); } -tmp<volScalarField> SpalartAllmarasIDDES::rd +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasIDDES<BasicTurbulenceModel>::rd ( - const volScalarField& visc, - const volScalarField& S + const volScalarField& nur, + const volScalarField& magGradU ) const { return min ( - visc + nur /( max ( - S, - dimensionedScalar("SMALL", S.dimensions(), SMALL) - )*sqr(kappa_*y_) - + dimensionedScalar - ( - "ROOTVSMALL", - dimensionSet(0, 2 , -1, 0, 0), - ROOTVSMALL - ) + magGradU, + dimensionedScalar("SMALL", magGradU.dimensions(), SMALL) + )*sqr(this->kappa_*this->y_) ), scalar(10) ); @@ -99,23 +89,34 @@ tmp<volScalarField> SpalartAllmarasIDDES::rd // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -tmp<volScalarField> SpalartAllmarasIDDES::fd(const volScalarField& S) const +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasIDDES<BasicTurbulenceModel>::fd +( + const volScalarField& magGradU +) const { - return 1 - tanh(pow3(8*rd(nuEff(), S))); + return 1 - tanh(pow3(8*rd(this->nuEff(), magGradU))); } -tmp<volScalarField> SpalartAllmarasIDDES::dTilda(const volScalarField& S) const +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmarasIDDES<BasicTurbulenceModel>::dTilda +( + const volScalarField& chi, + const volScalarField& fv1, + const volTensorField& gradU +) const { const volScalarField alpha(this->alpha()); const volScalarField expTerm(exp(sqr(alpha))); + const volScalarField magGradU(mag(gradU)); tmp<volScalarField> fHill = 2*(pos(alpha)*pow(expTerm, -11.09) + neg(alpha)*pow(expTerm, -9.0)); tmp<volScalarField> fStep = min(2*pow(expTerm, -9.0), scalar(1)); - const volScalarField fHyb(max(1 - fd(S), fStep)); - tmp<volScalarField> fAmp = 1 - max(ft(S), fl(S)); + const volScalarField fHyb(max(1 - fd(magGradU), fStep)); + tmp<volScalarField> fAmp = 1 - max(ft(magGradU), fl(magGradU)); tmp<volScalarField> fRestore = max(fHill - 1, scalar(0))*fAmp; // IGNORING ft2 terms @@ -126,7 +127,11 @@ tmp<volScalarField> SpalartAllmarasIDDES::dTilda(const volScalarField& S) const min ( scalar(100), - (1 - Cb1_/(Cw1_*sqr(kappa_)*fwStar_)*fv2())/max(SMALL, fv1()) + ( + 1 + - this->Cb1_*this->fv2(chi, fv1) + /(this->Cw1_*sqr(this->kappa_)*fwStar_) + )/max(SMALL, fv1) ) ) ); @@ -134,48 +139,43 @@ tmp<volScalarField> SpalartAllmarasIDDES::dTilda(const volScalarField& S) const return max ( dimensionedScalar("SMALL", dimLength, SMALL), - fHyb*(1 + fRestore*Psi)*y_ - + (1 - fHyb)*CDES_*Psi*delta() + fHyb*(1 + fRestore*Psi)*this->y_ + + (1 - fHyb)*this->CDES_*Psi*this->delta() ); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -SpalartAllmarasIDDES::SpalartAllmarasIDDES +template<class BasicTurbulenceModel> +SpalartAllmarasIDDES<BasicTurbulenceModel>::SpalartAllmarasIDDES ( + const alphaField& alpha, + const rhoField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName, - const word& modelName + const word& propertiesName, + const word& type ) : - SpalartAllmaras(U, phi, transport, turbulenceModelName, modelName), - hmax_ + SpalartAllmarasDES<BasicTurbulenceModel> ( - LESdelta::New - ( - "hmax", - mesh_, - *this - ) - ), - IDDESDelta_ - ( - LESdelta::New - ( - "IDDESDelta", - mesh_, - this->subDict(typeName + "Coeffs") - ) + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName ), fwStar_ ( dimensioned<scalar>::lookupOrAddToDict ( "fwStar", - coeffDict_, + this->coeffDict_, 0.424 ) ), @@ -184,7 +184,7 @@ SpalartAllmarasIDDES::SpalartAllmarasIDDES dimensioned<scalar>::lookupOrAddToDict ( "cl", - coeffDict_, + this->coeffDict_, 3.55 ) ), @@ -193,20 +193,24 @@ SpalartAllmarasIDDES::SpalartAllmarasIDDES dimensioned<scalar>::lookupOrAddToDict ( "ct", - coeffDict_, + this->coeffDict_, 1.63 ) - ) + ), + IDDESDelta_(refCast<IDDESDelta>(this->delta_())) {} -bool SpalartAllmarasIDDES::read() +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +bool SpalartAllmarasIDDES<BasicTurbulenceModel>::read() { - if (SpalartAllmaras::read()) + if (SpalartAllmarasDES<BasicTurbulenceModel>::read()) { - fwStar_.readIfPresent(coeffDict()); - cl_.readIfPresent(coeffDict()); - ct_.readIfPresent(coeffDict()); + fwStar_.readIfPresent(this->coeffDict()); + cl_.readIfPresent(this->coeffDict()); + ct_.readIfPresent(this->coeffDict()); return true; } @@ -220,7 +224,6 @@ bool SpalartAllmarasIDDES::read() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace LESModels -} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H similarity index 63% rename from src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H rename to src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H index 036d31913..2bfaf6089 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H +++ b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H @@ -22,13 +22,22 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::incompressible::LESModels::SpalartAllmarasIDDES + Foam::LESModels::SpalartAllmarasIDDES Group - grpIcoDESTurbulence + grpDESTurbulence Description - SpalartAllmarasIDDES LES turbulence model for incompressible flows + SpalartAllmaras IDDES turbulence model for incompressible and compressible + flows + + Reference: + \verbatim + Shur, M. L., Spalart, P. R., Strelets, M. K., & Travin, A. K. (2008). + A hybrid RANS-LES approach with delayed-DES and wall-modelled LES + capabilities. + International Journal of Heat and Fluid Flow, 29(6), 1638-1649. + \endverbatim SourceFiles SpalartAllmarasIDDES.C @@ -38,14 +47,13 @@ SourceFiles #ifndef SpalartAllmarasIDDES_H #define SpalartAllmarasIDDES_H -#include "SpalartAllmaras.H" +#include "SpalartAllmarasDES.H" +#include "IDDESDelta.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace incompressible -{ namespace LESModels { @@ -53,35 +61,38 @@ namespace LESModels Class SpalartAllmarasIDDES Declaration \*---------------------------------------------------------------------------*/ +template<class BasicTurbulenceModel> class SpalartAllmarasIDDES : - public SpalartAllmaras + public SpalartAllmarasDES<BasicTurbulenceModel> { // Private data // Model constants - autoPtr<Foam::LESdelta> hmax_; - autoPtr<Foam::LESdelta> IDDESDelta_; dimensionedScalar fwStar_; dimensionedScalar cl_; dimensionedScalar ct_; + // Fields + + const IDDESDelta& IDDESDelta_; + // Private Member Functions tmp<volScalarField> alpha() const; - tmp<volScalarField> ft(const volScalarField& S) const; - tmp<volScalarField> fl(const volScalarField& S) const; + tmp<volScalarField> ft(const volScalarField& magGradU) const; + tmp<volScalarField> fl(const volScalarField& magGradU) const; tmp<volScalarField> rd ( - const volScalarField& visc, - const volScalarField& S + const volScalarField& nur, + const volScalarField& magGradU ) const; //- Delay function - tmp<volScalarField> fd(const volScalarField& S) const; + tmp<volScalarField> fd(const volScalarField& magGradU) const; // Disallow default bitwise copy construct and assignment SpalartAllmarasIDDES(const SpalartAllmarasIDDES&); @@ -93,11 +104,21 @@ protected: // Protected Member Functions //- Length scale - virtual tmp<volScalarField> dTilda(const volScalarField& S) const; + virtual tmp<volScalarField> dTilda + ( + const volScalarField& chi, + const volScalarField& fv1, + const volTensorField& gradU + ) const; public: + typedef typename BasicTurbulenceModel::alphaField alphaField; + typedef typename BasicTurbulenceModel::rhoField rhoField; + typedef typename BasicTurbulenceModel::transportModel transportModel; + + //- Runtime type information TypeName("SpalartAllmarasIDDES"); @@ -107,11 +128,14 @@ public: //- Construct from components SpalartAllmarasIDDES ( + const alphaField& alpha, + const rhoField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName + const word& propertiesName = turbulenceModel::propertiesName, + const word& type = typeName ); @@ -122,12 +146,6 @@ public: // Member Functions - //- Access function to filter width - virtual const volScalarField& delta() const - { - return IDDESDelta_(); - } - //- Read LESProperties dictionary virtual bool read(); }; @@ -136,11 +154,16 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace LESModels -} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository +# include "SpalartAllmarasIDDES.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/TurbulenceModels/turbulenceModels/LES/eddyViscosity/LESeddyViscosity.C b/src/TurbulenceModels/turbulenceModels/LES/eddyViscosity/LESeddyViscosity.C index b3d1c98f1..2a58c71e3 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/eddyViscosity/LESeddyViscosity.C +++ b/src/TurbulenceModels/turbulenceModels/LES/eddyViscosity/LESeddyViscosity.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -92,6 +92,8 @@ bool LESeddyViscosity<BasicTurbulenceModel>::read() template<class BasicTurbulenceModel> tmp<volScalarField> LESeddyViscosity<BasicTurbulenceModel>::epsilon() const { + tmp<volScalarField> tk(this->k()); + return tmp<volScalarField> ( new volScalarField @@ -104,7 +106,7 @@ tmp<volScalarField> LESeddyViscosity<BasicTurbulenceModel>::epsilon() const IOobject::NO_READ, IOobject::NO_WRITE ), - Ce_*this->k()*sqrt(this->k())/this->delta() + Ce_*tk()*sqrt(tk())/this->delta() ) ); } diff --git a/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.H b/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.H index 6a2a307da..b525666a7 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.H +++ b/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -65,7 +65,6 @@ SourceFiles #ifndef kEqn_H #define kEqn_H -#include "LESModel.H" #include "LESeddyViscosity.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -95,9 +94,14 @@ protected: // Protected data - volScalarField k_; + // Fields - dimensionedScalar Ck_; + volScalarField k_; + + + // Model constants + + dimensionedScalar Ck_; // Protected Member Functions diff --git a/src/TurbulenceModels/turbulenceModels/Make/files b/src/TurbulenceModels/turbulenceModels/Make/files index 47c070ccb..0dffeeaa3 100644 --- a/src/TurbulenceModels/turbulenceModels/Make/files +++ b/src/TurbulenceModels/turbulenceModels/Make/files @@ -5,8 +5,10 @@ LESdelta = LES/LESdeltas $(LESdelta)/LESdelta/LESdelta.C $(LESdelta)/cubeRootVolDelta/cubeRootVolDelta.C $(LESdelta)/PrandtlDelta/PrandtlDelta.C +$(LESdelta)/vanDriestDelta/vanDriestDelta.C $(LESdelta)/smoothDelta/smoothDelta.C $(LESdelta)/maxDeltaxyz/maxDeltaxyz.C +$(LESdelta)/IDDESDelta/IDDESDelta.C LESfilters = LES/LESfilters @@ -19,7 +21,7 @@ $(LESfilters)/anisotropicFilter/anisotropicFilter.C derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C -/* Wall functions */ +/* Wall function BCs */ wallFunctions = RAS/derivedFvPatchFields/wallFunctions nutWallFunctions = $(wallFunctions)/nutWallFunctions @@ -54,10 +56,14 @@ fWallFunctions = $(wallFunctions)/fWallFunctions $(fWallFunctions)/fWallFunction/fWallFunctionFvPatchScalarField.C */ -/* Patch fields */ +/* Inlet turbulence BCs */ RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C -RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C + +/* Atmospheric boundary layer BCs */ +RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C +RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.C +RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C LIB = $(FOAM_LIBBIN)/libturbulenceModels diff --git a/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C b/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C new file mode 100644 index 000000000..61addc591 --- /dev/null +++ b/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C @@ -0,0 +1,310 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "LaunderSharmaKE.H" +#include "bound.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace RASModels +{ + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +tmp<volScalarField> LaunderSharmaKE<BasicTurbulenceModel>::fMu() const +{ + return exp(-3.4/sqr(scalar(1) + sqr(k_)/(this->nu()*epsilon_)/50.0)); +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> LaunderSharmaKE<BasicTurbulenceModel>::f2() const +{ + return + scalar(1) + - 0.3*exp(-min(sqr(sqr(k_)/(this->nu()*epsilon_)), scalar(50.0))); +} + + +template<class BasicTurbulenceModel> +void LaunderSharmaKE<BasicTurbulenceModel>::correctNut() +{ + this->nut_ = Cmu_*fMu()*sqr(k_)/epsilon_; + this->nut_.correctBoundaryConditions(); +} + + +template<class BasicTurbulenceModel> +tmp<fvScalarMatrix> LaunderSharmaKE<BasicTurbulenceModel>::kSource() const +{ + return tmp<fvScalarMatrix> + ( + new fvScalarMatrix + ( + k_, + dimVolume*this->rho_.dimensions()*k_.dimensions() + /dimTime + ) + ); +} + + +template<class BasicTurbulenceModel> +tmp<fvScalarMatrix> LaunderSharmaKE<BasicTurbulenceModel>::epsilonSource() const +{ + return tmp<fvScalarMatrix> + ( + new fvScalarMatrix + ( + epsilon_, + dimVolume*this->rho_.dimensions()*epsilon_.dimensions() + /dimTime + ) + ); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +LaunderSharmaKE<BasicTurbulenceModel>::LaunderSharmaKE +( + const alphaField& alpha, + const rhoField& rho, + const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, + const surfaceScalarField& phi, + const transportModel& transport, + const word& propertiesName, + const word& type +) +: + eddyViscosity<RASModel<BasicTurbulenceModel> > + ( + type, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ), + + Cmu_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "Cmu", + this->coeffDict_, + 0.09 + ) + ), + C1_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "C1", + this->coeffDict_, + 1.44 + ) + ), + C2_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "C2", + this->coeffDict_, + 1.92 + ) + ), + C3_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "C3", + this->coeffDict_, + -0.33 + ) + ), + sigmak_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "sigmak", + this->coeffDict_, + 1.0 + ) + ), + sigmaEps_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "sigmaEps", + this->coeffDict_, + 1.3 + ) + ), + + k_ + ( + IOobject + ( + "k", + this->runTime_.timeName(), + this->mesh_, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + this->mesh_ + ), + + epsilon_ + ( + IOobject + ( + "epsilon", + this->runTime_.timeName(), + this->mesh_, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + this->mesh_ + ) +{ + bound(k_, this->kMin_); + bound(epsilon_, this->epsilonMin_); + + if (type == typeName) + { + correctNut(); + this->printCoeffs(type); + } +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +bool LaunderSharmaKE<BasicTurbulenceModel>::read() +{ + if (eddyViscosity<RASModel<BasicTurbulenceModel> >::read()) + { + Cmu_.readIfPresent(this->coeffDict()); + C1_.readIfPresent(this->coeffDict()); + C2_.readIfPresent(this->coeffDict()); + C3_.readIfPresent(this->coeffDict()); + sigmak_.readIfPresent(this->coeffDict()); + sigmaEps_.readIfPresent(this->coeffDict()); + + return true; + } + else + { + return false; + } +} + + +template<class BasicTurbulenceModel> +void LaunderSharmaKE<BasicTurbulenceModel>::correct() +{ + if (!this->turbulence_) + { + return; + } + + // Local references + const alphaField& alpha = this->alpha_; + const rhoField& rho = this->rho_; + const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; + const volVectorField& U = this->U_; + volScalarField& nut = this->nut_; + + eddyViscosity<RASModel<BasicTurbulenceModel> >::correct(); + + volScalarField divU(fvc::div(fvc::absolute(this->phi(), U))); + + // Calculate parameters and coefficients for Launder-Sharma low-Reynolds + // number model + + volScalarField E(2.0*this->nu()*nut*fvc::magSqrGradGrad(U)); + volScalarField D(2.0*this->nu()*magSqr(fvc::grad(sqrt(k_)))); + + tmp<volTensorField> tgradU = fvc::grad(U); + volScalarField G(this->GName(), nut*(tgradU() && dev(twoSymm(tgradU())))); + tgradU.clear(); + + + // Dissipation equation + tmp<fvScalarMatrix> epsEqn + ( + fvm::ddt(alpha, rho, epsilon_) + + fvm::div(alphaRhoPhi, epsilon_) + - fvm::Sp(fvc::ddt(alpha, rho) + fvc::div(alphaRhoPhi), epsilon_) + - fvm::laplacian(alpha*rho*DepsilonEff(), epsilon_) + == + C1_*alpha*rho*G*epsilon_/k_ + - fvm::SuSp(((2.0/3.0)*C1_ + C3_)*alpha*rho*divU, epsilon_) + - fvm::Sp(C2_*f2()*alpha*rho*epsilon_/k_, epsilon_) + + alpha*rho*E + + epsilonSource() + ); + + epsEqn().relax(); + solve(epsEqn); + bound(epsilon_, this->epsilonMin_); + + + // Turbulent kinetic energy equation + tmp<fvScalarMatrix> kEqn + ( + fvm::ddt(alpha, rho, k_) + + fvm::div(alphaRhoPhi, k_) + - fvm::Sp(fvc::ddt(alpha, rho) + fvc::div(alphaRhoPhi), k_) + - fvm::laplacian(alpha*rho*DkEff(), k_) + == + alpha*rho*G - fvm::SuSp(2.0/3.0*alpha*rho*divU, k_) + - fvm::Sp(alpha*rho*(epsilon_ + D)/k_, k_) + + kSource() + ); + + kEqn().relax(); + solve(kEqn); + bound(k_, this->kMin_); + + correctNut(); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace RASModels +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H b/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.H similarity index 65% rename from src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H rename to src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.H index dd6fee6f1..8b67ea50f 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H +++ b/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,27 +22,27 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::compressible::RASModels::LaunderSharmaKE + Foam::RASModels::LaunderSharmaKE Group - grpCmpRASTurbulence + grpRASTurbulence Description Launder and Sharma low-Reynolds k-epsilon turbulence model for - compressible and combusting flows including rapid distortion theory (RDT) - based compression term. + incompressible and compressible and combusting flows including + rapid distortion theory (RDT) based compression term. References: \verbatim - "Application of the Energy-Dissipation Model of Turbulence - to the Calculation of Flow Near a Spinning Disc", - Launder, B. E. and Sharma, B. I., - Letters in Heat and Mass Transfer, Vol. 1, No. 2, 1974, pp 131-138. + Launder, B. E., & Sharma, B. I. (1974). + Application of the energy-dissipation model of turbulence to the + calculation of flow near a spinning disc. + Letters in heat and mass transfer, 1(2), 131-137. For the RDT-based compression term: - "k-epsilon equations for compressible reciprocating engine flows" - El Tahry, S. H., - AIAA Journal of Energy 7, 1983, pp 345-353. + El Tahry, S. H. (1983). + k-epsilon equation for compressible reciprocating engine flows. + Journal of Energy, 7(4), 345-353. \endverbatim The default model coefficients correspond to the following: @@ -64,17 +64,16 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef compressibleLaunderSharmaKE_H -#define compressibleLaunderSharmaKE_H +#ifndef LaunderSharmaKE_H +#define LaunderSharmaKE_H #include "RASModel.H" +#include "eddyViscosity.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace compressible -{ namespace RASModels { @@ -82,10 +81,17 @@ namespace RASModels Class LaunderSharmaKE Declaration \*---------------------------------------------------------------------------*/ +template<class BasicTurbulenceModel> class LaunderSharmaKE : - public RASModel + public eddyViscosity<RASModel<BasicTurbulenceModel> > { + // Private Member Functions + + // Disallow default bitwise copy construct and assignment + LaunderSharmaKE(const LaunderSharmaKE&); + LaunderSharmaKE& operator=(const LaunderSharmaKE&); + protected: @@ -99,15 +105,12 @@ protected: dimensionedScalar C3_; dimensionedScalar sigmak_; dimensionedScalar sigmaEps_; - dimensionedScalar Prt_; // Fields volScalarField k_; volScalarField epsilon_; - volScalarField mut_; - volScalarField alphat_; // Private Member Functions @@ -115,23 +118,35 @@ protected: tmp<volScalarField> fMu() const; tmp<volScalarField> f2() const; + virtual void correctNut(); + virtual tmp<fvScalarMatrix> kSource() const; + virtual tmp<fvScalarMatrix> epsilonSource() const; + public: + typedef typename BasicTurbulenceModel::alphaField alphaField; + typedef typename BasicTurbulenceModel::rhoField rhoField; + typedef typename BasicTurbulenceModel::transportModel transportModel; + + //- Runtime type information TypeName("LaunderSharmaKE"); + // Constructors //- Construct from components LaunderSharmaKE ( - const volScalarField& rho, + const alphaField& alpha, + const rhoField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName + const transportModel& transport, + const word& propertiesName = turbulenceModel::propertiesName, + const word& type = typeName ); @@ -142,12 +157,19 @@ public: // Member Functions + //- Re-read model coefficients if they have changed + virtual bool read(); + //- Return the effective diffusivity for k tmp<volScalarField> DkEff() const { return tmp<volScalarField> ( - new volScalarField("DkEff", mut_/sigmak_ + mu()) + new volScalarField + ( + "DkEff", + (this->nut_/sigmak_ + this->nu()) + ) ); } @@ -156,22 +178,14 @@ public: { return tmp<volScalarField> ( - new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu()) + new volScalarField + ( + "DepsilonEff", + (this->nut_/sigmaEps_ + this->nu()) + ) ); } - //- Return the turbulence viscosity - virtual tmp<volScalarField> mut() const - { - return mut_; - } - - //- Return the turbulence thermal diffusivity - virtual tmp<volScalarField> alphat() const - { - return alphat_; - } - //- Return the turbulence kinetic energy virtual tmp<volScalarField> k() const { @@ -184,31 +198,24 @@ public: return epsilon_; } - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devRhoReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace RASModels -} // End namespace compressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository +# include "LaunderSharmaKE.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C b/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C index ada33eb5f..9dfd900c6 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -54,6 +54,7 @@ Foam::RASModel<BasicTurbulenceModel>::RASModel : BasicTurbulenceModel ( + type, alpha, rho, U, diff --git a/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.H b/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.H index 51acd7687..7ecd22b2b 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.H +++ b/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -21,12 +21,6 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. -Namespace - Foam::RASModels - -Description - Namespace for RAS turbulence models. - Class Foam::RASModel diff --git a/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C new file mode 100644 index 000000000..c07e67715 --- /dev/null +++ b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C @@ -0,0 +1,389 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "SpalartAllmaras.H" +#include "bound.H" +#include "wallDist.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace RASModels +{ + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::chi() const +{ + return nuTilda_/this->nu(); +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::fv1 +( + const volScalarField& chi +) const +{ + const volScalarField chi3(pow3(chi)); + return chi3/(chi3 + pow3(Cv1_)); +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::fv2 +( + const volScalarField& chi, + const volScalarField& fv1 +) const +{ + return 1.0 - chi/(1.0 + chi*fv1); +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::Stilda +( + const volScalarField& chi, + const volScalarField& fv1 +) const +{ + volScalarField Omega(::sqrt(2.0)*mag(skew(fvc::grad(this->U_)))); + + return + ( + max + ( + Omega + + fv2(chi, fv1)*nuTilda_/sqr(kappa_*y_), + Cs_*Omega + ) + ); +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::fw +( + const volScalarField& Stilda +) const +{ + volScalarField r + ( + min + ( + nuTilda_ + /( + max + ( + Stilda, + dimensionedScalar("SMALL", Stilda.dimensions(), SMALL) + ) + *sqr(kappa_*y_) + ), + scalar(10.0) + ) + ); + r.boundaryField() == 0.0; + + const volScalarField g(r + Cw2_*(pow6(r) - r)); + + return g*pow((1.0 + pow6(Cw3_))/(pow6(g) + pow6(Cw3_)), 1.0/6.0); +} + + +template<class BasicTurbulenceModel> +void SpalartAllmaras<BasicTurbulenceModel>::correctNut +( + const volScalarField& fv1 +) +{ + this->nut_ = nuTilda_*fv1; + this->nut_.correctBoundaryConditions(); +} + + +template<class BasicTurbulenceModel> +void SpalartAllmaras<BasicTurbulenceModel>::correctNut() +{ + correctNut(fv1(this->chi())); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +SpalartAllmaras<BasicTurbulenceModel>::SpalartAllmaras +( + const alphaField& alpha, + const rhoField& rho, + const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, + const surfaceScalarField& phi, + const transportModel& transport, + const word& propertiesName, + const word& type +) +: + eddyViscosity<RASModel<BasicTurbulenceModel> > + ( + type, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ), + + sigmaNut_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "sigmaNut", + this->coeffDict_, + 0.66666 + ) + ), + kappa_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "kappa", + this->coeffDict_, + 0.41 + ) + ), + + Cb1_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "Cb1", + this->coeffDict_, + 0.1355 + ) + ), + Cb2_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "Cb2", + this->coeffDict_, + 0.622 + ) + ), + Cw1_(Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_), + Cw2_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "Cw2", + this->coeffDict_, + 0.3 + ) + ), + Cw3_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "Cw3", + this->coeffDict_, + 2.0 + ) + ), + Cv1_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "Cv1", + this->coeffDict_, + 7.1 + ) + ), + Cs_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "Cs", + this->coeffDict_, + 0.3 + ) + ), + + nuTilda_ + ( + IOobject + ( + "nuTilda", + this->runTime_.timeName(), + this->mesh_, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + this->mesh_ + ), + + y_(wallDist::New(this->mesh_).y()) +{ + if (type == typeName) + { + correctNut(); + this->printCoeffs(type); + } +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +bool SpalartAllmaras<BasicTurbulenceModel>::read() +{ + if (eddyViscosity<RASModel<BasicTurbulenceModel> >::read()) + { + sigmaNut_.readIfPresent(this->coeffDict()); + kappa_.readIfPresent(this->coeffDict()); + + Cb1_.readIfPresent(this->coeffDict()); + Cb2_.readIfPresent(this->coeffDict()); + Cw1_ = Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_; + Cw2_.readIfPresent(this->coeffDict()); + Cw3_.readIfPresent(this->coeffDict()); + Cv1_.readIfPresent(this->coeffDict()); + Cs_.readIfPresent(this->coeffDict()); + + return true; + } + else + { + return false; + } +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::DnuTildaEff() const +{ + return tmp<volScalarField> + ( + new volScalarField("DnuTildaEff", (nuTilda_ + this->nu())/sigmaNut_) + ); +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::k() const +{ + return tmp<volScalarField> + ( + new volScalarField + ( + IOobject + ( + "k", + this->runTime_.timeName(), + this->mesh_ + ), + this->mesh_, + dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 0) + ) + ); +} + + +template<class BasicTurbulenceModel> +tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::epsilon() const +{ + WarningIn("tmp<volScalarField> SpalartAllmaras::epsilon() const") + << "Turbulence kinetic energy dissipation rate not defined for " + << "Spalart-Allmaras model. Returning zero field" + << endl; + + return tmp<volScalarField> + ( + new volScalarField + ( + IOobject + ( + "epsilon", + this->runTime_.timeName(), + this->mesh_ + ), + this->mesh_, + dimensionedScalar("0", dimensionSet(0, 2, -3, 0, 0), 0) + ) + ); +} + + +template<class BasicTurbulenceModel> +void SpalartAllmaras<BasicTurbulenceModel>::correct() +{ + if (!this->turbulence_) + { + return; + } + + // Local references + const alphaField& alpha = this->alpha_; + const rhoField& rho = this->rho_; + const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; + + eddyViscosity<RASModel<BasicTurbulenceModel> >::correct(); + + const volScalarField chi(this->chi()); + const volScalarField fv1(this->fv1(chi)); + + const volScalarField Stilda(this->Stilda(chi, fv1)); + + tmp<fvScalarMatrix> nuTildaEqn + ( + fvm::ddt(alpha, rho, nuTilda_) + + fvm::div(alphaRhoPhi, nuTilda_) + - fvm::laplacian(alpha*rho*DnuTildaEff(), nuTilda_) + - Cb2_/sigmaNut_*alpha*rho*magSqr(fvc::grad(nuTilda_)) + == + Cb1_*alpha*rho*Stilda*nuTilda_ + - fvm::Sp(Cw1_*alpha*rho*fw(Stilda)*nuTilda_/sqr(y_), nuTilda_) + ); + + nuTildaEqn().relax(); + solve(nuTildaEqn); + bound(nuTilda_, dimensionedScalar("0", nuTilda_.dimensions(), 0.0)); + nuTilda_.correctBoundaryConditions(); + + correctNut(fv1); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace RASModels +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.H similarity index 68% rename from src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H rename to src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.H index 554ad12d3..b09a325d7 100644 --- a/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.H +++ b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.H @@ -22,31 +22,31 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::incompressible::RASModels::SpalartAllmaras + Foam::RASModels::SpalartAllmaras Group - grpIcoRASTurbulence + grpCmpRASTurbulence Description - Spalart-Allmaras 1-eqn mixing-length model for incompressible external - flows. + Spalart-Allmaras one-eqn mixing-length model for incompressible and + compressible external flows. - References: + Reference: \verbatim - "A One-Equation Turbulence Model for Aerodynamic Flows" - P.R. Spalart, - S.R. Allmaras, - La Recherche Aerospatiale, No. 1, 1994, pp. 5-21. + Spalart, P.R., & Allmaras, S.R. (1994). + A one-equation turbulence model for aerodynamic flows. + La Recherche Aerospatiale, 1, 5-21. \endverbatim - Extended according to - \verbatim - "An Unstructured Grid Generation and Adaptive Solution Technique - for High Reynolds Number Compressible Flows" - G.A. Ashford, - Ph.D. thesis, University of Michigan, 1996. - \endverbatim - using the optional flag \c ashfordCorrection + The model is implemented without the trip-term and hence the ft2 term is + not needed. + + It is necessary to limit the Stilda generation term as the model generates + unphysical results if this term becomes negative which occurs for complex + flow. Several approaches have been proposed to limit Stilda but it is not + clear which is the most appropriate. Here the limiter proposed by Spalart + is implemented in which Stilda is clipped at Cs*Omega with the default value + of Cs = 0.3. The default model coefficients correspond to the following: \verbatim @@ -57,7 +57,7 @@ Description Cw2 0.3; Cw3 2.0; Cv1 7.1; - Cv2 5.0; + Cs 0.3; sigmaNut 0.66666; kappa 0.41; } @@ -72,25 +72,30 @@ SourceFiles #define SpalartAllmaras_H #include "RASModel.H" -#include "wallDist.H" +#include "eddyViscosity.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace incompressible -{ namespace RASModels { /*---------------------------------------------------------------------------*\ - Class SpalartAllmaras Declaration + Class SpalartAllmaras Declaration \*---------------------------------------------------------------------------*/ +template<class BasicTurbulenceModel> class SpalartAllmaras : - public RASModel + public eddyViscosity<RASModel<BasicTurbulenceModel> > { + // Private Member Functions + + // Disallow default bitwise copy construct and assignment + SpalartAllmaras(const SpalartAllmaras&); + SpalartAllmaras& operator=(const SpalartAllmaras&); + protected: @@ -107,17 +112,12 @@ protected: dimensionedScalar Cw2_; dimensionedScalar Cw3_; dimensionedScalar Cv1_; - dimensionedScalar Cv2_; - - - //- Optional flag to activate the Ashford correction - Switch ashfordCorrection_; + dimensionedScalar Cs_; // Fields volScalarField nuTilda_; - volScalarField nut_; //- Wall distance // Note: different to wall distance in parent RASModel @@ -137,7 +137,7 @@ protected: const volScalarField& fv1 ) const; - tmp<volScalarField> fv3 + tmp<volScalarField> Stilda ( const volScalarField& chi, const volScalarField& fv1 @@ -145,9 +145,17 @@ protected: tmp<volScalarField> fw(const volScalarField& Stilda) const; + void correctNut(const volScalarField& fv1); + virtual void correctNut(); + public: + typedef typename BasicTurbulenceModel::alphaField alphaField; + typedef typename BasicTurbulenceModel::rhoField rhoField; + typedef typename BasicTurbulenceModel::transportModel transportModel; + + //- Runtime type information TypeName("SpalartAllmaras"); @@ -157,11 +165,14 @@ public: //- Construct from components SpalartAllmaras ( + const alphaField& alpha, + const rhoField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName + const word& propertiesName = turbulenceModel::propertiesName, + const word& type = typeName ); @@ -172,11 +183,8 @@ public: // Member Functions - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const - { - return nut_; - } + //- Read RASProperties dictionary + virtual bool read(); //- Return the effective diffusivity for nuTilda tmp<volScalarField> DnuTildaEff() const; @@ -187,38 +195,24 @@ public: //- Return the turbulence kinetic energy dissipation rate virtual tmp<volScalarField> epsilon() const; - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace RASModels -} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository +# include "SpalartAllmaras.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C similarity index 97% rename from src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C rename to src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C index 1c6ff3fcf..0ec408504 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,8 +29,6 @@ License namespace Foam { -namespace incompressible -{ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -176,7 +174,6 @@ void atmBoundaryLayer::write(Ostream& os) const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.H b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.H similarity index 96% rename from src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.H rename to src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.H index 50641ee0e..21e6e7bb2 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.H +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,10 +22,10 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::incompressible::atmBoundaryLayer + FoamFoam::atmBoundaryLayer Group - grpIcoRASBoundaryConditions grpInletBoundaryConditions + grpRASBoundaryConditions grpInletBoundaryConditions Description This class provides functions to evaluate the velocity and turbulence @@ -122,8 +122,6 @@ SourceFiles namespace Foam { -namespace incompressible -{ /*---------------------------------------------------------------------------*\ Class atmBoundaryLayer Declaration @@ -234,7 +232,6 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C index d621d8884..9b04284c0 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,95 +44,48 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - z_(vector::zero), - kappa_(0.41), - Uref_(0), - Href_(0), - z0_(0), - zGround_(0), - Ustar_(0) + atmBoundaryLayer() {} atmBoundaryLayerInletEpsilonFvPatchScalarField:: atmBoundaryLayerInletEpsilonFvPatchScalarField ( - const atmBoundaryLayerInletEpsilonFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper + const dictionary& dict ) : - fixedValueFvPatchScalarField(ptf, p, iF, mapper), - z_(ptf.z_), - kappa_(ptf.kappa_), - Uref_(ptf.Uref_), - Href_(ptf.Href_), - z0_(ptf.z0_, mapper), - zGround_(ptf.zGround_, mapper), - Ustar_(ptf.Ustar_, mapper) -{} + fixedValueFvPatchScalarField(p, iF), + atmBoundaryLayer(patch().Cf(), dict) +{ + scalarField::operator=(epsilon(patch().Cf())); +} atmBoundaryLayerInletEpsilonFvPatchScalarField:: atmBoundaryLayerInletEpsilonFvPatchScalarField ( + const atmBoundaryLayerInletEpsilonFvPatchScalarField& psf, const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict + const fvPatchFieldMapper& mapper ) : - fixedValueFvPatchScalarField(p, iF), - z_(dict.lookup("z")), - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - Uref_(readScalar(dict.lookup("Uref"))), - Href_(readScalar(dict.lookup("Href"))), - z0_("z0", dict, p.size()), - zGround_("zGround", dict, p.size()), - Ustar_(p.size()) -{ - if (mag(z_) < SMALL) - { - FatalErrorIn - ( - "atmBoundaryLayerInletEpsilonFvPatchScalarField" - "(" - "const fvPatch&, " - "const DimensionedField<scalar, volMesh>&, " - "const dictionary&" - ")" - ) - << "magnitude of z vector must be greater than zero" - << abort(FatalError); - } - - forAll (Ustar_, i) - { - Ustar_[i] = kappa_*Uref_/(log((Href_ + z0_[i])/max(z0_[i] , 0.001))); - } - - z_ /= mag(z_); - - const vectorField& c = patch().Cf(); - scalarField::operator=(pow3(Ustar_)/(kappa_*((c & z_) - zGround_ + z0_))); -} + fixedValueFvPatchScalarField(psf, p, iF, mapper), + atmBoundaryLayer(psf, mapper) +{} atmBoundaryLayerInletEpsilonFvPatchScalarField:: atmBoundaryLayerInletEpsilonFvPatchScalarField ( - const atmBoundaryLayerInletEpsilonFvPatchScalarField& blpsf, + const atmBoundaryLayerInletEpsilonFvPatchScalarField& psf, const DimensionedField<scalar, volMesh>& iF ) : - fixedValueFvPatchScalarField(blpsf, iF), - z_(blpsf.z_), - kappa_(blpsf.kappa_), - Uref_(blpsf.Uref_), - Href_(blpsf.Href_), - z0_(blpsf.z0_), - zGround_(blpsf.zGround_), - Ustar_(blpsf.Ustar_) + fixedValueFvPatchScalarField(psf, iF), + atmBoundaryLayer(psf) {} @@ -144,42 +97,29 @@ void atmBoundaryLayerInletEpsilonFvPatchScalarField::autoMap ) { fixedValueFvPatchScalarField::autoMap(m); - z0_.autoMap(m); - zGround_.autoMap(m); - Ustar_.autoMap(m); + atmBoundaryLayer::autoMap(m); } void atmBoundaryLayerInletEpsilonFvPatchScalarField::rmap ( - const fvPatchScalarField& ptf, + const fvPatchScalarField& psf, const labelList& addr ) { - fixedValueFvPatchScalarField::rmap(ptf, addr); + fixedValueFvPatchScalarField::rmap(psf, addr); - const atmBoundaryLayerInletEpsilonFvPatchScalarField& blptf = - refCast<const atmBoundaryLayerInletEpsilonFvPatchScalarField>(ptf); + const atmBoundaryLayerInletEpsilonFvPatchScalarField& blpsf = + refCast<const atmBoundaryLayerInletEpsilonFvPatchScalarField>(psf); - z0_.rmap(blptf.z0_, addr); - zGround_.rmap(blptf.zGround_, addr); - Ustar_.rmap(blptf.Ustar_, addr); + atmBoundaryLayer::rmap(blpsf, addr); } void atmBoundaryLayerInletEpsilonFvPatchScalarField::write(Ostream& os) const { fvPatchScalarField::write(os); - os.writeKeyword("z") - << z_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") - << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("Uref") - << Uref_ << token::END_STATEMENT << nl; - os.writeKeyword("Href") - << Href_ << token::END_STATEMENT << nl; - z0_.writeEntry("z0", os); - zGround_.writeEntry("zGround", os); + atmBoundaryLayer::write(os); writeEntry("value", os); } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H index f18ce28db..bc020fed3 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,73 +22,34 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::atmBoundaryLayerInletEpsilonFvPatchScalarField + FoamFoam::atmBoundaryLayerInletEpsilonFvPatchScalarField Group grpRASBoundaryConditions grpInletBoundaryConditions Description This boundary condition specifies an inlet value for the turbulence - dissipation, \f$\epsilon\f$ (\c epsilon), appropriate for atmospheric - boundary layers (ABL), and designed to be used in conjunction with the - \c ABLInletVelocity inlet velocity boundary condition. - - \f[ - \epsilon = \frac{(U^*)^3}{K(z - z_g + z_0)} - \f] - - where - \vartable - U^* | frictional velocity - K | Karman's constant - z | vertical co-ordinate [m] - z_0 | surface roughness length [m] - z_g | minimum vlaue in z direction [m] - \endvartable - - and: - - \f[ - U^* = K \frac{U_{ref}}{ln\left(\frac{Z_{ref} + z_0}{z_0}\right)} - \f] - - where: - \vartable - U_{ref} | reference velocity at \f$Z_{ref}\f$ [m/s] - Z_{ref} | reference height [m] - \endvartable - - \heading Patch usage - - \table - Property | Description | Required | Default value - z | vertical co-ordinate [m] | yes | - kappa | Karman's constanat | no | 0.41 - Uref | reference velocity [m/s] | yes | - Href | reference height [m] | yes | - z0 | surface roughness length [m] | yes | - zGround | minimum z co-ordinate [m] | yes | - \endtable + dissipation, \f$\epsilon\f$, appropriate for atmospheric boundary layers. + + See FoamFoam::atmBoundaryLayer for details. Example of the boundary condition specification: \verbatim - myPatch + ground { type atmBoundaryLayerInletEpsilon; - z 1.0; - kappa 0.41; - Uref 1.0; - Href 0.0; - z0 uniform 0.0; + z (0 0 1); + Uref 10.0; + Zref 20.0; + z0 uniform 0.1; zGround uniform 0.0; } \endverbatim - Reference: - D.M. Hargreaves and N.G. Wright, "On the use of the k-epsilon model - in commercial CFD software to model the neutral atmospheric boundary - layer", Journal of Wind Engineering and Industrial Aerodynamics - 95(2007), pp 355-369. +SeeAlso + FoamFoam::atmBoundaryLayer, + FoamFoam::atmBoundaryLayerInletVelocityFvPatchVectorField, + FoamFoam::atmBoundaryLayerInletKFvPatchScalarField SourceFiles atmBoundaryLayerInletEpsilonFvPatchScalarField.C @@ -100,6 +61,7 @@ SourceFiles #include "fvPatchFields.H" #include "fixedValueFvPatchFields.H" +#include "atmBoundaryLayer.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -112,31 +74,9 @@ namespace Foam class atmBoundaryLayerInletEpsilonFvPatchScalarField : - public fixedValueFvPatchScalarField + public fixedValueFvPatchScalarField, + public atmBoundaryLayer { - // Private data - - //- Direction of the z-coordinate - vector z_; - - //- Von Karman constant - const scalar kappa_; - - //- Reference velocity - const scalar Uref_; - - //- Reference height - const scalar Href_; - - //- Surface roughness length - scalarField z0_; - - //- Minimum co-ordinate value in z direction - scalarField zGround_; - - //- Frictional velocity - scalarField Ustar_; - public: @@ -202,21 +142,6 @@ public: // Member functions - // Access - - //- Return max value - const scalarField& Ustar() const - { - return Ustar_; - } - - //- Return z direction - const vector& z() const - { - return z_; - } - - // Mapping functions //- Map (and resize as needed) from self given a mapping object diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.C similarity index 96% rename from src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.C rename to src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.C index 3980ad27e..de2404ab1 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,8 +33,6 @@ License namespace Foam { -namespace incompressible -{ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -136,7 +134,6 @@ makePatchTypeField // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace incompressible } // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.H similarity index 91% rename from src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.H rename to src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.H index 7463fce17..cc95eca33 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.H +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.H @@ -22,16 +22,16 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::incompressible::atmBoundaryLayerInletKFvPatchScalarField + Foam::atmBoundaryLayerInletKFvPatchScalarField Group - grpIcoRASBoundaryConditions grpInletBoundaryConditions + grpRASBoundaryConditions grpInletBoundaryConditions Description This boundary condition specifies an inlet value for the turbulence kinetic energy, \f$k\f$, appropriate for atmospheric boundary layers. - See Foam::incompressible::atmBoundaryLayer for details. + See Foam::atmBoundaryLayer for details. Example of the boundary condition specification: \verbatim @@ -47,9 +47,9 @@ Description \endverbatim SeeAlso - Foam::incompressible::atmBoundaryLayer, - Foam::incompressible::atmBoundaryLayerInletVelocityFvPatchVectorField, - Foam::incompressible::atmBoundaryLayerInletEpsilonFvPatchScalarField + Foam::atmBoundaryLayer, + Foam::atmBoundaryLayerInletVelocityFvPatchVectorField, + Foam::atmBoundaryLayerInletEpsilonFvPatchScalarField SourceFiles atmBoundaryLayerInletKFvPatchScalarField.C @@ -67,8 +67,6 @@ SourceFiles namespace Foam { -namespace incompressible -{ /*---------------------------------------------------------------------------*\ Class atmBoundaryLayerInletKFvPatchScalarField Declaration @@ -167,7 +165,6 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C index 0966e5060..652b6e07b 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,117 +44,48 @@ atmBoundaryLayerInletVelocityFvPatchVectorField ) : fixedValueFvPatchVectorField(p, iF), - Ustar_(0), - n_(pTraits<vector>::zero), - z_(pTraits<vector>::zero), - z0_(0), - kappa_(0.41), - Uref_(0), - Href_(0), - zGround_(0) + atmBoundaryLayer() {} atmBoundaryLayerInletVelocityFvPatchVectorField:: atmBoundaryLayerInletVelocityFvPatchVectorField ( - const atmBoundaryLayerInletVelocityFvPatchVectorField& ptf, const fvPatch& p, const DimensionedField<vector, volMesh>& iF, - const fvPatchFieldMapper& mapper + const dictionary& dict ) : - fixedValueFvPatchVectorField(ptf, p, iF, mapper), - Ustar_(ptf.Ustar_, mapper), - n_(ptf.n_), - z_(ptf.z_), - z0_(ptf.z0_, mapper), - kappa_(ptf.kappa_), - Uref_(ptf.Uref_), - Href_(ptf.Href_), - zGround_(ptf.zGround_, mapper) -{} + fixedValueFvPatchVectorField(p, iF), + atmBoundaryLayer(patch().Cf(), dict) +{ + vectorField::operator=(U(patch().Cf())); +} atmBoundaryLayerInletVelocityFvPatchVectorField:: atmBoundaryLayerInletVelocityFvPatchVectorField ( + const atmBoundaryLayerInletVelocityFvPatchVectorField& pvf, const fvPatch& p, const DimensionedField<vector, volMesh>& iF, - const dictionary& dict + const fvPatchFieldMapper& mapper ) : - fixedValueFvPatchVectorField(p, iF), - Ustar_(p.size()), - n_(dict.lookup("n")), - z_(dict.lookup("z")), - z0_("z0", dict, p.size()), - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - Uref_(readScalar(dict.lookup("Uref"))), - Href_(readScalar(dict.lookup("Href"))), - zGround_("zGround", dict, p.size()) -{ - if (mag(n_) < SMALL || mag(z_) < SMALL) - { - FatalErrorIn - ( - "atmBoundaryLayerInletVelocityFvPatchVectorField" - "(" - "const fvPatch&, " - "const DimensionedField<vector, volMesh>&, " - "onst dictionary&" - ")" - ) - << "magnitude of n or z must be greater than zero" - << abort(FatalError); - } - - n_ /= mag(n_); - z_ /= mag(z_); - - forAll (Ustar_, i) - { - Ustar_[i] = kappa_*Uref_/(log((Href_ + z0_[i])/max(z0_[i] , 0.001))); - } - - const vectorField& c = patch().Cf(); - const scalarField coord(c & z_); - scalarField Un(coord.size()); - - forAll(coord, i) - { - if ((coord[i] - zGround_[i]) < Href_) - { - Un[i] = - (Ustar_[i]/kappa_) - * log((coord[i] - zGround_[i] + z0_[i])/max(z0_[i], 0.001)); - } - else - { - Un[i] = Uref_; - } - } - - vectorField::operator=(n_*Un); -} + fixedValueFvPatchVectorField(pvf, p, iF, mapper), + atmBoundaryLayer(pvf, mapper) +{} atmBoundaryLayerInletVelocityFvPatchVectorField:: atmBoundaryLayerInletVelocityFvPatchVectorField ( - const atmBoundaryLayerInletVelocityFvPatchVectorField& blpvf, + const atmBoundaryLayerInletVelocityFvPatchVectorField& pvf, const DimensionedField<vector, volMesh>& iF ) : - fixedValueFvPatchVectorField(blpvf, iF), - Ustar_(blpvf.Ustar_), - n_(blpvf.n_), - z_(blpvf.z_), - z0_(blpvf.z0_), - kappa_(blpvf.kappa_), - Uref_(blpvf.Uref_), - Href_(blpvf.Href_), - zGround_(blpvf.zGround_) + fixedValueFvPatchVectorField(pvf, iF), + atmBoundaryLayer(pvf) {} @@ -166,44 +97,29 @@ void atmBoundaryLayerInletVelocityFvPatchVectorField::autoMap ) { fixedValueFvPatchVectorField::autoMap(m); - z0_.autoMap(m); - zGround_.autoMap(m); - Ustar_.autoMap(m); + atmBoundaryLayer::autoMap(m); } void atmBoundaryLayerInletVelocityFvPatchVectorField::rmap ( - const fvPatchVectorField& ptf, + const fvPatchVectorField& pvf, const labelList& addr ) { - fixedValueFvPatchVectorField::rmap(ptf, addr); + fixedValueFvPatchVectorField::rmap(pvf, addr); - const atmBoundaryLayerInletVelocityFvPatchVectorField& blptf = - refCast<const atmBoundaryLayerInletVelocityFvPatchVectorField>(ptf); + const atmBoundaryLayerInletVelocityFvPatchVectorField& blpvf = + refCast<const atmBoundaryLayerInletVelocityFvPatchVectorField>(pvf); - z0_.rmap(blptf.z0_, addr); - zGround_.rmap(blptf.zGround_, addr); - Ustar_.rmap(blptf.Ustar_, addr); + atmBoundaryLayer::rmap(blpvf, addr); } void atmBoundaryLayerInletVelocityFvPatchVectorField::write(Ostream& os) const { fvPatchVectorField::write(os); - z0_.writeEntry("z0", os) ; - os.writeKeyword("n") - << n_ << token::END_STATEMENT << nl; - os.writeKeyword("z") - << z_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") - << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("Uref") - << Uref_ << token::END_STATEMENT << nl; - os.writeKeyword("Href") - << Href_ << token::END_STATEMENT << nl; - zGround_.writeEntry("zGround", os) ; + atmBoundaryLayer::write(os); writeEntry("value", os); } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H index b2f7245cc..ea93312fa 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,81 +22,35 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::atmBoundaryLayerInletVelocityFvPatchVectorField + FoamFoam::atmBoundaryLayerInletVelocityFvPatchVectorField Group grpRASBoundaryConditions grpInletBoundaryConditions Description This boundary condition specifies a velocity inlet profile appropriate - for atmospheric boundary layers (ABL). The profile is derived from the - friction velocity, flow direction and the direction of the parabolic - co-ordinate \c z. - - \f[ - U = \frac{U^*}{K} ln\left(\frac{z - z_g + z_0}{z_0}\right) - \f] - - where - \vartable - U^* | frictional velocity - K | Karman's constant - z | vertical co-ordinate [m] - z_0 | surface roughness length [m] - z_g | minimum vlaue in z direction [m] - \endvartable - - and: - - \f[ - U^* = K \frac{U_{ref}}{ln\left(\frac{Z_{ref} + z_0}{z_0}\right)} - \f] - - where: - \vartable - U_{ref} | reference velocity at \f$Z_{ref}\f$ [m/s] - Z_{ref} | reference height [m] - \endvartable - - Reference: - D.M. Hargreaves and N.G. Wright, "On the use of the k-epsilon model - in commercial CFD software to model the neutral atmospheric boundary - layer", Journal of Wind Engineering and Industrial Aerodynamics - 95(2007), pp 355-369. - - \heading Patch usage - - \table - Property | Description | Required | Default value - n | flow direction | yes | - z | vertical co-ordinate [m] | yes | - kappa | Karman's constanat | no | 0.41 - Uref | reference velocity [m/s] | yes | - Href | reference height [m] | yes | - z0 | surface roughness length [m] | yes | - zGround | minimum z co-ordinate [m] | yes | - \endtable + for atmospheric boundary layers (ABL). + + See FoamFoam::atmBoundaryLayer for details. Example of the boundary condition specification: \verbatim - myPatch + ground { type atmBoundaryLayerInletVelocity; - n (0 1 0); - z 1.0; - kappa 0.41; - Uref 1.0; - Href 0.0; - z0 uniform 0.0; + n (1 0 0); + z (0 0 1); + Uref 10.0; + Zref 20.0; + z0 uniform 0.1; zGround uniform 0.0; } \endverbatim -Note - D.M. Hargreaves and N.G. Wright recommend Gamma epsilon in the - k-epsilon model should be changed from 1.3 to 1.11 for consistency. - The roughness height (Er) is given by Er = 20 z0 following the same - reference. +SeeAlso + FoamFoam::atmBoundaryLayer, + FoamFoam::atmBoundaryLayerInletKFvPatchScalarField, + FoamFoam::atmBoundaryLayerInletEpsilonFvPatchScalarField SourceFiles atmBoundaryLayerInletVelocityFvPatchVectorField.C @@ -108,6 +62,7 @@ SourceFiles #include "fvPatchFields.H" #include "fixedValueFvPatchFields.H" +#include "atmBoundaryLayer.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -120,34 +75,9 @@ namespace Foam class atmBoundaryLayerInletVelocityFvPatchVectorField : - public fixedValueFvPatchVectorField + public fixedValueFvPatchVectorField, + public atmBoundaryLayer { - // Private data - - //- Frictional velocity - scalarField Ustar_; - - //- Flow direction - vector n_; - - //- Direction of the z-coordinate - vector z_; - - //- Surface roughness lenght - scalarField z0_; - - //- Von Karman constant - const scalar kappa_; - - //- Reference velocity - const scalar Uref_; - - //- Reference hight - const scalar Href_; - - //- Minimum corrdinate value in z direction - scalarField zGround_; - public: @@ -213,27 +143,6 @@ public: // Member functions - // Access - - //- Return Ustar - const scalarField& Ustar() const - { - return Ustar_; - } - - //- Return flow direction - const vector& n() const - { - return n_; - } - - //- Return z direction - const vector& z() const - { - return z_; - } - - // Mapping functions //- Map (and resize as needed) from self given a mapping object diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C index 1b8ed898f..ce40a41ae 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "v2WallFunctionFvPatchScalarField.H" +#include "turbulenceModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" @@ -52,6 +53,14 @@ void v2WallFunctionFvPatchScalarField::checkType() } +void v2WallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const +{ + os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; + os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; + os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; +} + + scalar v2WallFunctionFvPatchScalarField::yPlusLam ( const scalar kappa, diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C b/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C index af1c1d003..f37b906a2 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,6 +33,46 @@ namespace Foam namespace RASModels { +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +void kEpsilon<BasicTurbulenceModel>::correctNut() +{ + this->nut_ = Cmu_*sqr(k_)/epsilon_; + this->nut_.correctBoundaryConditions(); +} + + +template<class BasicTurbulenceModel> +tmp<fvScalarMatrix> kEpsilon<BasicTurbulenceModel>::kSource() const +{ + return tmp<fvScalarMatrix> + ( + new fvScalarMatrix + ( + k_, + dimVolume*this->rho_.dimensions()*k_.dimensions() + /dimTime + ) + ); +} + + +template<class BasicTurbulenceModel> +tmp<fvScalarMatrix> kEpsilon<BasicTurbulenceModel>::epsilonSource() const +{ + return tmp<fvScalarMatrix> + ( + new fvScalarMatrix + ( + epsilon_, + dimVolume*this->rho_.dimensions()*epsilon_.dimensions() + /dimTime + ) + ); +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class BasicTurbulenceModel> @@ -174,44 +214,6 @@ bool kEpsilon<BasicTurbulenceModel>::read() } -template<class BasicTurbulenceModel> -void kEpsilon<BasicTurbulenceModel>::correctNut() -{ - this->nut_ = Cmu_*sqr(k_)/epsilon_; - this->nut_.correctBoundaryConditions(); -} - - -template<class BasicTurbulenceModel> -tmp<fvScalarMatrix> kEpsilon<BasicTurbulenceModel>::kSource() const -{ - return tmp<fvScalarMatrix> - ( - new fvScalarMatrix - ( - k_, - dimVolume*this->rho_.dimensions()*k_.dimensions() - /dimTime - ) - ); -} - - -template<class BasicTurbulenceModel> -tmp<fvScalarMatrix> kEpsilon<BasicTurbulenceModel>::epsilonSource() const -{ - return tmp<fvScalarMatrix> - ( - new fvScalarMatrix - ( - epsilon_, - dimVolume*this->rho_.dimensions()*epsilon_.dimensions() - /dimTime - ) - ); -} - - template<class BasicTurbulenceModel> void kEpsilon<BasicTurbulenceModel>::correct() { diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.H b/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.H index b0f1a3152..a5ea71e0e 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.H +++ b/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,24 +28,24 @@ Group grpRASTurbulence Description - Standard k-epsilon turbulence model for compressible flows - including rapid distortion theory (RDT) based compression term. + Standard k-epsilon turbulence model for incompressible and compressible + flows including rapid distortion theory (RDT) based compression term. Reference: \verbatim Standard model: - Launder, B.E., and Spalding, D.B., - "Mathematical Models of Turbulence", - Academic Press, 1972. - - Launder, B.E., and Spalding, D.B., - "Computational Methods for Turbulent Flows", - Comp. Meth in Appl Mech & Eng'g, Vol 3, 1974, pp 269-289. - - Compressible form including RDT-based compression term: - "k-epsilon equations for compressible reciprocating engine flows" - El Tahry, S. H., - AIAA Journal of Energy 7, 1983, pp 345-353. + Launder, B. E., & Spalding, D. B. (1972). + Lectures in mathematical models of turbulence. + + Launder, B. E., & Spalding, D. B. (1974). + The numerical computation of turbulent flows. + Computer methods in applied mechanics and engineering, + 3(2), 269-289. + + For the RDT-based compression term: + El Tahry, S. H. (1983). + k-epsilon equation for compressible reciprocating engine flows. + Journal of Energy, 7(4), 345-353. \endverbatim The default model coefficients correspond to the following: diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSST.H b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSST.H index 153518ff1..dcaf5882a 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSST.H +++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSST.H @@ -32,19 +32,21 @@ Description Turbulence model described in: \verbatim - Menter, F., Esch, T. - "Elements of Industrial Heat Transfer Prediction" - 16th Brazilian Congress of Mechanical Engineering (COBEM), - Nov. 2001 + Menter, F. R. & Esch, T. (2001). + Elements of Industrial Heat Transfer Prediction. + 16th Brazilian Congress of Mechanical Engineering (COBEM). + + Menter, F. R., Kuntz, M., and Langtry, R. (2003). + Ten Years of Industrial Experience with the SST Turbulence Model. + Turbulence, Heat and Mass Transfer 4, ed: K. Hanjalic, Y. Nagano, + & M. Tummers, Begell House, Inc., 625 - 632. \endverbatim with the addition of the optional F3 term for rough walls from \verbatim - Hellsten, A. + Hellsten, A. (1998). "Some Improvements in Menter’s k-omega-SST turbulence model" - 29th AIAA Fluid Dynamics Conference, - AIAA-98-2554, - June 1998. + 29th AIAA Fluid Dynamics Conference, AIAA-98-2554. \endverbatim Note that this implementation is written in terms of alpha diffusion diff --git a/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.C b/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.C new file mode 100644 index 000000000..345e69d2a --- /dev/null +++ b/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.C @@ -0,0 +1,221 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "ReynoldsStress.H" +#include "fvc.H" +#include "fvm.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +Foam::ReynoldsStress<BasicTurbulenceModel>::ReynoldsStress +( + const word& modelName, + const alphaField& alpha, + const rhoField& rho, + const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, + const surfaceScalarField& phi, + const transportModel& transport, + const word& propertiesName +) +: + BasicTurbulenceModel + ( + modelName, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ), + + couplingFactor_ + ( + dimensioned<scalar>::lookupOrAddToDict + ( + "couplingFactor", + this->coeffDict_, + 0.0 + ) + ), + + R_ + ( + IOobject + ( + IOobject::groupName("R", U.group()), + this->runTime_.timeName(), + this->mesh_, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + this->mesh_ + ), + + nut_ + ( + IOobject + ( + IOobject::groupName("nut", U.group()), + this->runTime_.timeName(), + this->mesh_, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + this->mesh_ + ) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +bool Foam::ReynoldsStress<BasicTurbulenceModel>::read() +{ + return BasicTurbulenceModel::read(); +} + + +template<class BasicTurbulenceModel> +Foam::tmp<Foam::volSymmTensorField> +Foam::ReynoldsStress<BasicTurbulenceModel>::R() const +{ + return R_; +} + + +template<class BasicTurbulenceModel> +Foam::tmp<Foam::volScalarField> +Foam::ReynoldsStress<BasicTurbulenceModel>::k() const +{ + tmp<Foam::volScalarField> tk(tr(R_)); + tk().rename("k"); + return tk; +} + + +template<class BasicTurbulenceModel> +Foam::tmp<Foam::volSymmTensorField> +Foam::ReynoldsStress<BasicTurbulenceModel>::devRhoReff() const +{ + return tmp<volSymmTensorField> + ( + new volSymmTensorField + ( + IOobject + ( + IOobject::groupName("devRhoReff", this->U_.group()), + this->runTime_.timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + this->alpha_*this->rho_*R_ + - (this->alpha_*this->rho_*this->nu()) + *dev(twoSymm(fvc::grad(this->U_))) + ) + ); +} + + +template<class BasicTurbulenceModel> +Foam::tmp<Foam::fvVectorMatrix> +Foam::ReynoldsStress<BasicTurbulenceModel>::divDevRhoReff +( + volVectorField& U +) const +{ + if (couplingFactor_.value() > 0.0) + { + return + ( + fvc::div + ( + this->alpha_*this->rho_*R_ + + couplingFactor_ + *this->alpha_*this->rho_*this->nut()*fvc::grad(U), + "div(devRhoReff)" + ) + + fvc::laplacian + ( + (1.0 - couplingFactor_)*this->alpha_*this->rho_*this->nut(), + U, + "laplacian(nuEff,U)" + ) + - fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U) + - fvc::div(this->alpha_*this->rho_*nu()*dev2(T(fvc::grad(U)))) + ); + } + else + { + return + ( + fvc::div(this->alpha_*this->rho_*R_) + + fvc::laplacian + ( + this->alpha_*this->rho_*this->nut(), + U, + "laplacian(nuEff,U)" + ) + - fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U) + - fvc::div(this->alpha_*this->rho_*nu()*dev2(T(fvc::grad(U)))) + ); + } + + return + ( + - fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U) + - fvc::div((this->alpha_*this->rho_*this->nuEff())*dev2(T(fvc::grad(U)))) + ); +} + + +template<class BasicTurbulenceModel> +Foam::tmp<Foam::fvVectorMatrix> +Foam::ReynoldsStress<BasicTurbulenceModel>::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + return + ( + - fvm::laplacian(this->alpha_*rho*this->nuEff(), U) + - fvc::div((this->alpha_*rho*this->nuEff())*dev2(T(fvc::grad(U)))) + ); +} + + +template<class BasicTurbulenceModel> +void Foam::ReynoldsStress<BasicTurbulenceModel>::correct() +{ + BasicTurbulenceModel::correct(); +} + + +// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H b/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.H similarity index 52% rename from src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H rename to src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.H index ea8d4b266..9c27cc4c8 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H +++ b/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,97 +22,112 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::incompressible::laminar + Foam::ReynoldsStress + +Group + grpTurbulence Description - Turbulence model for laminar incompressible flow. + Reynolds-stress turbulence model base class SourceFiles - laminar.C + ReynoldsStress.C \*---------------------------------------------------------------------------*/ -#ifndef laminar_H -#define laminar_H - -#include "turbulenceModel.H" +#ifndef ReynoldsStress_H +#define ReynoldsStress_H // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace incompressible -{ /*---------------------------------------------------------------------------*\ - Class laminar Declaration + Class ReynoldsStress Declaration \*---------------------------------------------------------------------------*/ -class laminar +template<class BasicTurbulenceModel> +class ReynoldsStress : - public turbulenceModel + public BasicTurbulenceModel { -public: +protected: - //- Runtime type information - TypeName("laminar"); + // Protected data - // Constructors + // Model coefficients + + dimensionedScalar couplingFactor_; + + // Fields + + volSymmTensorField R_; + volScalarField nut_; - //- Construct from components - laminar - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName - ); + // Protected Member Functions - // Selectors + virtual void correctNut() = 0; - //- Return a reference to the selected turbulence model - static autoPtr<laminar> New + +public: + + typedef typename BasicTurbulenceModel::alphaField alphaField; + typedef typename BasicTurbulenceModel::rhoField rhoField; + typedef typename BasicTurbulenceModel::transportModel transportModel; + + + // Constructors + + //- Construct from components + ReynoldsStress ( + const word& modelName, + const alphaField& alpha, + const rhoField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName + const word& propertiesName ); //- Destructor - virtual ~laminar() + virtual ~ReynoldsStress() {} // Member Functions - //- Const access to the coefficients dictionary - virtual const dictionary& coeffDict() const; + //- Re-read model coefficients if they have changed + virtual bool read() = 0; - //- Return the turbulence viscosity, i.e. 0 for laminar flow - virtual tmp<volScalarField> nut() const; + //- Return the turbulence viscosity + virtual tmp<volScalarField> nut() const + { + return nut_; + } - //- Return the effective viscosity, i.e. the laminar viscosity - virtual tmp<volScalarField> nuEff() const; + //- Return the turbulence viscosity on patch + virtual tmp<scalarField> nut(const label patchi) const + { + return nut_.boundaryField()[patchi]; + } - //- Return the turbulence kinetic energy, i.e. 0 for laminar flow + //- Return the turbulence kinetic energy virtual tmp<volScalarField> k() const; - //- Return the turbulence kinetic energy dissipation rate, - // i.e. 0 for laminar flow - virtual tmp<volScalarField> epsilon() const; - - //- Return the Reynolds stress tensor, i.e. 0 for laminar flow + //- Return the Reynolds stress tensor virtual tmp<volSymmTensorField> R() const; - //- Return the effective stress tensor, i.e. the laminar stress - virtual tmp<volSymmTensorField> devReff() const; + //- Return the effective stress tensor + virtual tmp<volSymmTensorField> devRhoReff() const; //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; //- Return the source term for the momentum equation virtual tmp<fvVectorMatrix> divDevRhoReff @@ -121,21 +136,23 @@ public: volVectorField& U ) const; - //- Correct the laminar viscosity - virtual void correct(); - - //- Read turbulenceProperties dictionary - virtual bool read(); + //- Solve the turbulence equations and correct the turbulence viscosity + virtual void correct() = 0; }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository +# include "ReynoldsStress.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/TurbulenceModels/turbulenceModels/eddyViscosity/eddyViscosity.C b/src/TurbulenceModels/turbulenceModels/eddyViscosity/eddyViscosity.C index 1b98457bf..5ad9a350a 100644 --- a/src/TurbulenceModels/turbulenceModels/eddyViscosity/eddyViscosity.C +++ b/src/TurbulenceModels/turbulenceModels/eddyViscosity/eddyViscosity.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,7 @@ License template<class BasicTurbulenceModel> Foam::eddyViscosity<BasicTurbulenceModel>::eddyViscosity ( - const word& modelName, + const word& type, const alphaField& alpha, const rhoField& rho, const volVectorField& U, @@ -42,9 +42,9 @@ Foam::eddyViscosity<BasicTurbulenceModel>::eddyViscosity const word& propertiesName ) : - BasicTurbulenceModel + linearViscousStress<BasicTurbulenceModel> ( - modelName, + type, alpha, rho, U, @@ -71,6 +71,13 @@ Foam::eddyViscosity<BasicTurbulenceModel>::eddyViscosity // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template<class BasicTurbulenceModel> +bool Foam::eddyViscosity<BasicTurbulenceModel>::read() +{ + return BasicTurbulenceModel::read(); +} + + template<class BasicTurbulenceModel> Foam::tmp<Foam::volSymmTensorField> Foam::eddyViscosity<BasicTurbulenceModel>::R() const @@ -96,51 +103,6 @@ Foam::eddyViscosity<BasicTurbulenceModel>::R() const } -template<class BasicTurbulenceModel> -Foam::tmp<Foam::volSymmTensorField> -Foam::eddyViscosity<BasicTurbulenceModel>::devRhoReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - IOobject::groupName("devRhoReff", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - (-(this->alpha_*this->rho_*this->nuEff())) - *dev(twoSymm(fvc::grad(this->U_))) - ) - ); -} - - -template<class BasicTurbulenceModel> -Foam::tmp<Foam::fvVectorMatrix> -Foam::eddyViscosity<BasicTurbulenceModel>::divDevRhoReff -( - volVectorField& U -) const -{ - return - ( - - fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U) - - fvc::div((this->alpha_*this->rho_*this->nuEff())*dev2(T(fvc::grad(U)))) - ); -} - - -template<class BasicTurbulenceModel> -bool Foam::eddyViscosity<BasicTurbulenceModel>::read() -{ - return BasicTurbulenceModel::read(); -} - - template<class BasicTurbulenceModel> void Foam::eddyViscosity<BasicTurbulenceModel>::correct() { diff --git a/src/TurbulenceModels/turbulenceModels/eddyViscosity/eddyViscosity.H b/src/TurbulenceModels/turbulenceModels/eddyViscosity/eddyViscosity.H index d8070248e..ec92c7ba1 100644 --- a/src/TurbulenceModels/turbulenceModels/eddyViscosity/eddyViscosity.H +++ b/src/TurbulenceModels/turbulenceModels/eddyViscosity/eddyViscosity.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ Class Foam::eddyViscosity Group - grpRASTurbulence + grpTurbulence Description Eddy viscosity turbulence model base class @@ -38,6 +38,8 @@ SourceFiles #ifndef eddyViscosity_H #define eddyViscosity_H +#include "linearViscousStress.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -50,7 +52,7 @@ namespace Foam template<class BasicTurbulenceModel> class eddyViscosity : - public BasicTurbulenceModel + public linearViscousStress<BasicTurbulenceModel> { protected: @@ -118,12 +120,6 @@ public: //- Return the Reynolds stress tensor virtual tmp<volSymmTensorField> R() const; - //- Return the effective stress tensor - virtual tmp<volSymmTensorField> devRhoReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct() = 0; }; diff --git a/src/TurbulenceModels/turbulenceModels/laminar/laminar.C b/src/TurbulenceModels/turbulenceModels/laminar/laminar.C index eac733d49..b9528cd4a 100644 --- a/src/TurbulenceModels/turbulenceModels/laminar/laminar.C +++ b/src/TurbulenceModels/turbulenceModels/laminar/laminar.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,8 +44,9 @@ Foam::laminar<BasicTurbulenceModel>::laminar const word& propertiesName ) : - BasicTurbulenceModel + linearViscousStress<BasicTurbulenceModel> ( + typeName, alpha, rho, U, @@ -98,6 +99,13 @@ Foam::laminar<BasicTurbulenceModel>::coeffDict() const } +template<class BasicTurbulenceModel> +bool Foam::laminar<BasicTurbulenceModel>::read() +{ + return true; +} + + template<class BasicTurbulenceModel> Foam::tmp<Foam::volScalarField> Foam::laminar<BasicTurbulenceModel>::nut() const @@ -235,43 +243,6 @@ Foam::laminar<BasicTurbulenceModel>::R() const } -template<class BasicTurbulenceModel> -Foam::tmp<Foam::volSymmTensorField> -Foam::laminar<BasicTurbulenceModel>::devRhoReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - IOobject::groupName("devRhoReff", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -(this->alpha_*this->rho_*nuEff())*dev(twoSymm(fvc::grad(this->U_))) - ) - ); -} - - -template<class BasicTurbulenceModel> -Foam::tmp<Foam::fvVectorMatrix> -Foam::laminar<BasicTurbulenceModel>::divDevRhoReff -( - volVectorField& U -) const -{ - return - ( - - fvm::laplacian(this->alpha_*this->rho_*nuEff(), U) - - fvc::div(this->alpha_*this->rho_*nuEff()*dev2(T(fvc::grad(U)))) - ); -} - - template<class BasicTurbulenceModel> void Foam::laminar<BasicTurbulenceModel>::correct() { @@ -279,11 +250,4 @@ void Foam::laminar<BasicTurbulenceModel>::correct() } -template<class BasicTurbulenceModel> -bool Foam::laminar<BasicTurbulenceModel>::read() -{ - return true; -} - - // ************************************************************************* // diff --git a/src/TurbulenceModels/turbulenceModels/laminar/laminar.H b/src/TurbulenceModels/turbulenceModels/laminar/laminar.H index 260d4eb0a..07988089d 100644 --- a/src/TurbulenceModels/turbulenceModels/laminar/laminar.H +++ b/src/TurbulenceModels/turbulenceModels/laminar/laminar.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ SourceFiles #ifndef laminar_H #define laminar_H -#include "TurbulenceModel.H" +#include "linearViscousStress.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,7 +49,7 @@ namespace Foam template<class BasicTurbulenceModel> class laminar : - public BasicTurbulenceModel + public linearViscousStress<BasicTurbulenceModel> { public: @@ -103,6 +103,9 @@ public: //- Const access to the coefficients dictionary virtual const dictionary& coeffDict() const; + //- Read turbulenceProperties dictionary + virtual bool read(); + //- Return the turbulence viscosity, i.e. 0 for laminar flow virtual tmp<volScalarField> nut() const; @@ -125,17 +128,8 @@ public: //- Return the Reynolds stress tensor, i.e. 0 for laminar flow virtual tmp<volSymmTensorField> R() const; - //- Return the effective stress tensor, i.e. the laminar stress - virtual tmp<volSymmTensorField> devRhoReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; - //- Correct the laminar viscosity virtual void correct(); - - //- Read turbulenceProperties dictionary - virtual bool read(); }; diff --git a/src/TurbulenceModels/turbulenceModels/linearViscousStress/linearViscousStress.C b/src/TurbulenceModels/turbulenceModels/linearViscousStress/linearViscousStress.C new file mode 100644 index 000000000..1ac59915c --- /dev/null +++ b/src/TurbulenceModels/turbulenceModels/linearViscousStress/linearViscousStress.C @@ -0,0 +1,129 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "linearViscousStress.H" +#include "fvc.H" +#include "fvm.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +Foam::linearViscousStress<BasicTurbulenceModel>::linearViscousStress +( + const word& modelName, + const alphaField& alpha, + const rhoField& rho, + const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, + const surfaceScalarField& phi, + const transportModel& transport, + const word& propertiesName +) +: + BasicTurbulenceModel + ( + modelName, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +bool Foam::linearViscousStress<BasicTurbulenceModel>::read() +{ + return BasicTurbulenceModel::read(); +} + + +template<class BasicTurbulenceModel> +Foam::tmp<Foam::volSymmTensorField> +Foam::linearViscousStress<BasicTurbulenceModel>::devRhoReff() const +{ + return tmp<volSymmTensorField> + ( + new volSymmTensorField + ( + IOobject + ( + IOobject::groupName("devRhoReff", this->U_.group()), + this->runTime_.timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + (-(this->alpha_*this->rho_*this->nuEff())) + *dev(twoSymm(fvc::grad(this->U_))) + ) + ); +} + + +template<class BasicTurbulenceModel> +Foam::tmp<Foam::fvVectorMatrix> +Foam::linearViscousStress<BasicTurbulenceModel>::divDevRhoReff +( + volVectorField& U +) const +{ + return + ( + - fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U) + - fvc::div((this->alpha_*this->rho_*this->nuEff())*dev2(T(fvc::grad(U)))) + ); +} + + +template<class BasicTurbulenceModel> +Foam::tmp<Foam::fvVectorMatrix> +Foam::linearViscousStress<BasicTurbulenceModel>::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + return + ( + - fvm::laplacian(this->alpha_*rho*this->nuEff(), U) + - fvc::div((this->alpha_*rho*this->nuEff())*dev2(T(fvc::grad(U)))) + ); +} + + +template<class BasicTurbulenceModel> +void Foam::linearViscousStress<BasicTurbulenceModel>::correct() +{ + BasicTurbulenceModel::correct(); +} + + +// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.H b/src/TurbulenceModels/turbulenceModels/linearViscousStress/linearViscousStress.H similarity index 53% rename from src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.H rename to src/TurbulenceModels/turbulenceModels/linearViscousStress/linearViscousStress.H index f715bd0f1..0a8f0e856 100644 --- a/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.H +++ b/src/TurbulenceModels/turbulenceModels/linearViscousStress/linearViscousStress.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,121 +22,100 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::incompressible::LESModels::Smagorinsky2 + Foam::linearViscousStress Group - grpIcoLESTurbulence + grpTurbulence Description - The Isochoric Smagorinsky Model for incompressible flows - - Algebraic eddy viscosity SGS model founded on the assumption that - local equilibrium prevails, hence - \verbatim - B = 2/3*k*I - 2*nuSgs*dev(D) - 2*cD2*delta*(D.dev(D)); - Beff = 2/3*k*I - 2*nuEff*dev(D) - 2*cD2*delta*(D.dev(D)); - - where - - D = symm(grad(U)); - k = cI*delta^2*||D||^2 - nuSgs = ck*sqrt(k)*delta - nuEff = nuSgs + nu - \endverbatim + Linear viscous stress turbulence model base class SourceFiles - Smagorinsky2.C + linearViscousStress.C \*---------------------------------------------------------------------------*/ -#ifndef Smagorinsky2_H -#define Smagorinsky2_H - -#include "Smagorinsky.H" +#ifndef linearViscousStress_H +#define linearViscousStress_H // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace incompressible -{ -namespace LESModels -{ /*---------------------------------------------------------------------------*\ - Class Smagorinsky2 Declaration + Class linearViscousStress Declaration \*---------------------------------------------------------------------------*/ -class Smagorinsky2 +template<class BasicTurbulenceModel> +class linearViscousStress : - public Smagorinsky + public BasicTurbulenceModel { - // Private data - - dimensionedScalar cD2_; - - - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - Smagorinsky2(const Smagorinsky2&); - Smagorinsky2& operator=(const Smagorinsky2&); - public: - //- Runtime type information - TypeName("Smagorinsky2"); + typedef typename BasicTurbulenceModel::alphaField alphaField; + typedef typename BasicTurbulenceModel::rhoField rhoField; + typedef typename BasicTurbulenceModel::transportModel transportModel; // Constructors //- Construct from components - Smagorinsky2 + linearViscousStress ( + const word& modelName, + const alphaField& alpha, + const rhoField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName + const word& propertiesName ); //- Destructor - virtual ~Smagorinsky2() + virtual ~linearViscousStress() {} // Member Functions - //- Return B. - virtual tmp<volSymmTensorField> B() const; + //- Re-read model coefficients if they have changed + virtual bool read() = 0; + + //- Return the effective stress tensor + virtual tmp<volSymmTensorField> devRhoReff() const; - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + //- Return the source term for the momentum equation + virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress + //- Return the source term for the momentum equation virtual tmp<fvVectorMatrix> divDevRhoReff ( const volScalarField& rho, volVectorField& U ) const; - //- Read LESProperties dictionary - virtual bool read(); + //- Solve the turbulence equations and correct the turbulence viscosity + virtual void correct() = 0; }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace LESModels -} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository +# include "linearViscousStress.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.C b/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.C new file mode 100644 index 000000000..c24ac4d6c --- /dev/null +++ b/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.C @@ -0,0 +1,135 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "nonlinearEddyViscosity.H" +#include "fvc.H" +#include "fvm.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +Foam::nonlinearEddyViscosity<BasicTurbulenceModel>::nonlinearEddyViscosity +( + const word& modelName, + const alphaField& alpha, + const rhoField& rho, + const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, + const surfaceScalarField& phi, + const transportModel& transport, + const word& propertiesName +) +: + eddyViscosity<BasicTurbulenceModel> + ( + modelName, + alpha, + rho, + U, + alphaRhoPhi, + phi, + transport, + propertiesName + ), + + nonlinearStress_ + ( + IOobject + ( + IOobject::groupName("nonlinearStress", U.group()), + this->runTime_.timeName(), + this->mesh_ + ), + this->mesh_, + dimensionedSymmTensor + ( + "nonlinearStress", + sqr(dimVelocity), + symmTensor::zero + ) + ) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class BasicTurbulenceModel> +Foam::tmp<Foam::volSymmTensorField> +Foam::nonlinearEddyViscosity<BasicTurbulenceModel>::R() const +{ + tmp<volSymmTensorField> tR + ( + eddyViscosity<BasicTurbulenceModel>::R() + ); + tR() += nonlinearStress_; + return tR; +} + + +template<class BasicTurbulenceModel> +Foam::tmp<Foam::volSymmTensorField> +Foam::nonlinearEddyViscosity<BasicTurbulenceModel>::devRhoReff() const +{ + tmp<volSymmTensorField> tdevRhoReff + ( + eddyViscosity<BasicTurbulenceModel>::devRhoReff() + ); + tdevRhoReff() += this->rho_*nonlinearStress_; + return tdevRhoReff; +} + + +template<class BasicTurbulenceModel> +Foam::tmp<Foam::fvVectorMatrix> +Foam::nonlinearEddyViscosity<BasicTurbulenceModel>::divDevRhoReff +( + volVectorField& U +) const +{ + return + ( + fvc::div(this->rho_*nonlinearStress_) + + eddyViscosity<BasicTurbulenceModel>::divDevRhoReff(U) + ); +} + + +template<class BasicTurbulenceModel> +Foam::tmp<Foam::fvVectorMatrix> +Foam::nonlinearEddyViscosity<BasicTurbulenceModel>::divDevRhoReff +( + const volScalarField& rho, + volVectorField& U +) const +{ + return + ( + fvc::div(rho*nonlinearStress_) + + eddyViscosity<BasicTurbulenceModel>::divDevRhoReff(rho, U) + ); +} + + +// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H b/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.H similarity index 56% rename from src/turbulenceModels/incompressible/RAS/laminar/laminar.H rename to src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.H index 790593418..da8a24a05 100644 --- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H +++ b/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,91 +22,91 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::incompressible::RASModels::laminar + Foam::nonlinearEddyViscosity Group - grpIcoRASTurbulence + grpTurbulence Description - Dummy turbulence model for laminar incompressible flow. + Eddy viscosity turbulence model with non-linear correction base class SourceFiles - laminar.C + nonlinearEddyViscosity.C \*---------------------------------------------------------------------------*/ -#ifndef rasLaminar_H -#define rasLaminar_H +#ifndef nonlinearEddyViscosity_H +#define nonlinearEddyViscosity_H -#include "RASModel.H" +#include "eddyViscosity.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace incompressible -{ -namespace RASModels -{ /*---------------------------------------------------------------------------*\ - Class laminar Declaration + Class nonlinearEddyViscosity Declaration \*---------------------------------------------------------------------------*/ -class laminar +template<class BasicTurbulenceModel> +class nonlinearEddyViscosity : - public RASModel + public eddyViscosity<BasicTurbulenceModel> { +protected: + + // Protected data + + // Fields + + volSymmTensorField nonlinearStress_; + + + // Protected Member Functions + + virtual void correctNonlinearStress(const volTensorField& gradU) = 0; + + public: - //- Runtime type information - TypeName("laminar"); + typedef typename BasicTurbulenceModel::alphaField alphaField; + typedef typename BasicTurbulenceModel::rhoField rhoField; + typedef typename BasicTurbulenceModel::transportModel transportModel; + // Constructors //- Construct from components - laminar + nonlinearEddyViscosity ( + const word& modelName, + const alphaField& alpha, + const rhoField& rho, const volVectorField& U, + const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName + const word& propertiesName ); //- Destructor - virtual ~laminar() + virtual ~nonlinearEddyViscosity() {} // Member Functions - //- Return the turbulence viscosity, i.e. 0 for laminar flow - virtual tmp<volScalarField> nut() const; - - //- Return the effective viscosity, i.e. the laminar viscosity - virtual tmp<volScalarField> nuEff() const - { - return tmp<volScalarField>(new volScalarField("nuEff", nu())); - } - - //- Return the turbulence kinetic energy, i.e. 0 for laminar flow - virtual tmp<volScalarField> k() const; - - //- Return the turbulence kinetic energy dissipation rate, - // i.e. 0 for laminar flow - virtual tmp<volScalarField> epsilon() const; - - //- Return the Reynolds stress tensor, i.e. 0 for laminar flow + //- Return the Reynolds stress tensor virtual tmp<volSymmTensorField> R() const; - //- Return the effective stress tensor, i.e. the laminar stress - virtual tmp<volSymmTensorField> devReff() const; + //- Return the effective stress tensor + virtual tmp<volSymmTensorField> devRhoReff() const; //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; + virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; //- Return the source term for the momentum equation virtual tmp<fvVectorMatrix> divDevRhoReff @@ -114,23 +114,21 @@ public: const volScalarField& rho, volVectorField& U ) const; - - //- Correct the laminar viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace RASModels -} // End namespace incompressible } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository +# include "nonlinearEddyViscosity.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/TurbulenceModels/turbulenceModels/turbulenceModel.H b/src/TurbulenceModels/turbulenceModels/turbulenceModel.H index bc09825f9..e2177bb72 100644 --- a/src/TurbulenceModels/turbulenceModels/turbulenceModel.H +++ b/src/TurbulenceModels/turbulenceModels/turbulenceModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,6 +24,9 @@ License Class Foam::turbulenceModel +Group + grpTurbulence + Description Abstract base class for turbulence models (RAS, LES and laminar). diff --git a/src/TurbulenceModels/turbulenceModels/turbulenceModelDoc.H b/src/TurbulenceModels/turbulenceModels/turbulenceModelDoc.H index 739af7388..91eab7254 100644 --- a/src/TurbulenceModels/turbulenceModels/turbulenceModelDoc.H +++ b/src/TurbulenceModels/turbulenceModels/turbulenceModelDoc.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,9 +23,9 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -\defgroup grpIcoTurbulence Incompressible turbulence +\defgroup grpTurbulence Turbulence @{ - This group contains incompressible turbulence models. + This group contains turbulence models. @} \*---------------------------------------------------------------------------*/ diff --git a/src/combustionModels/FSD/FSD.C b/src/combustionModels/FSD/FSD.C index 307d2410c..85b0f21b8 100644 --- a/src/combustionModels/FSD/FSD.C +++ b/src/combustionModels/FSD/FSD.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,6 +26,8 @@ License #include "FSD.H" #include "addToRunTimeSelectionTable.H" #include "LESModel.H" +#include "fvcGrad.H" +#include "fvcDiv.H" namespace Foam { diff --git a/src/combustionModels/Make/options b/src/combustionModels/Make/options index 29d5e7e6a..daf8e6d2e 100644 --- a/src/combustionModels/Make/options +++ b/src/combustionModels/Make/options @@ -3,14 +3,12 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ - -I$(LIB_SRC)/turbulenceModels/ \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES/LESfilters/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ -lfiniteVolume \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lchemistryModel diff --git a/src/combustionModels/PaSR/PaSR.H b/src/combustionModels/PaSR/PaSR.H index 6d5a1ffd9..7ca8a5107 100644 --- a/src/combustionModels/PaSR/PaSR.H +++ b/src/combustionModels/PaSR/PaSR.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,7 +38,7 @@ SourceFiles #ifndef PaSR_H #define PaSR_H -#include "laminar.H" +#include "../laminar/laminar.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/combustionModel/combustionModel.H b/src/combustionModels/combustionModel/combustionModel.H index 3f887c8de..f46072820 100644 --- a/src/combustionModels/combustionModel/combustionModel.H +++ b/src/combustionModels/combustionModel/combustionModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,7 +36,7 @@ SourceFiles #define combustionModel_H #include "IOdictionary.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/fvOptions/Make/options b/src/fvOptions/Make/options index d4edb5931..124084c05 100644 --- a/src/fvOptions/Make/options +++ b/src/fvOptions/Make/options @@ -6,13 +6,12 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ - -I$(LIB_SRC)/turbulenceModels - + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude LIB_LIBS = \ -lfiniteVolume \ -lsampling \ -lmeshTools \ - /*-lsolidThermo*/ \ - -lcompressibleTurbulenceModel + -lturbulenceModels \ + -lcompressibleTurbulenceModels diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.C b/src/fvOptions/sources/interRegion/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.C index cf96fa043..a9fc1e279 100644 --- a/src/fvOptions/sources/interRegion/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.C +++ b/src/fvOptions/sources/interRegion/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "variableHeatTransfer.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -103,7 +103,10 @@ void Foam::fv::variableHeatTransfer::calculateHtc() mesh_.time().lookupObject<fvMesh>(nbrRegionName()); const compressible::turbulenceModel& nbrTurb = - nbrMesh.lookupObject<compressible::turbulenceModel>("turbulenceModel"); + nbrMesh.lookupObject<compressible::turbulenceModel> + ( + turbulenceModel::propertiesName + ); const fluidThermo& nbrThermo = nbrMesh.lookupObject<fluidThermo>("thermophysicalProperties"); diff --git a/src/lagrangian/Allwmake b/src/lagrangian/Allwmake index 1f00dde89..66d1baaba 100755 --- a/src/lagrangian/Allwmake +++ b/src/lagrangian/Allwmake @@ -11,7 +11,6 @@ wmake $targetType basic wmake $targetType solidParticle wmake $targetType intermediate wmake $targetType turbulence -wmake $targetType Turbulence wmake $targetType spray wmake $targetType dsmc wmake $targetType coalCombustion diff --git a/src/lagrangian/Turbulence/Make/options b/src/lagrangian/Turbulence/Make/options index 3aed62832..d3d76c7b6 100644 --- a/src/lagrangian/Turbulence/Make/options +++ b/src/lagrangian/Turbulence/Make/options @@ -14,6 +14,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ diff --git a/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchFields.H b/src/lagrangian/Turbulence/parcels/include/makeThermoParcelTurbulenceForces.H similarity index 77% rename from src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchFields.H rename to src/lagrangian/Turbulence/parcels/include/makeThermoParcelTurbulenceForces.H index c5dcfccda..66e977a0a 100644 --- a/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchFields.H +++ b/src/lagrangian/Turbulence/parcels/include/makeThermoParcelTurbulenceForces.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) 2014-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,25 +23,19 @@ License \*---------------------------------------------------------------------------*/ -#ifndef porousBafflePressureFvPatchFields_H -#define porousBafflePressureFvPatchFields_H - -#include "porousBafflePressureFvPatchField.H" -#include "fieldTypes.H" +#ifndef makeThermoParcelTurbulenceForces_h +#define makeThermoParcelTurbulenceForces_h // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ +#include "BrownianMotionForce.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#define makeThermoParcelTurbulenceForces(CloudType) \ + \ + makeParticleForceModelType(BrownianMotionForce, CloudType); -makePatchTypeFieldTypedefs(porousBafflePressure); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/Turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C b/src/lagrangian/Turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C index 43b1b3669..80aa02213 100644 --- a/src/lagrangian/Turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C +++ b/src/lagrangian/Turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ License #include "DispersionRASModel.H" #include "demandDrivenData.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // diff --git a/src/lagrangian/Turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C b/src/lagrangian/Turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C new file mode 100644 index 000000000..e479250d9 --- /dev/null +++ b/src/lagrangian/Turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C @@ -0,0 +1,214 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "BrownianMotionForce.H" +#include "mathematicalConstants.H" +#include "demandDrivenData.H" +#include "incompressible/turbulenceModel/turbulenceModel.H" +#include "compressible/turbulenceModel/turbulenceModel.H" + +using namespace Foam::constant; + +// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // + +template<class CloudType> +Foam::scalar Foam::BrownianMotionForce<CloudType>::erfInv(const scalar y) const +{ + const scalar a = 0.147; + scalar k = 2.0/(mathematical::pi*a) + 0.5*log(1.0 - y*y); + scalar h = log(1.0 - y*y)/a; + scalar x = sqrt(-k + sqrt(k*k - h)); + + if (y < 0.0) + { + return -x; + } + else + { + return x; + } +} + + +template<class CloudType> +Foam::tmp<Foam::volScalarField> +Foam::BrownianMotionForce<CloudType>::kModel() const +{ + const objectRegistry& obr = this->owner().mesh(); + const word turbName = "turbulenceModel"; + + if (obr.foundObject<compressible::turbulenceModel>(turbName)) + { + const compressible::turbulenceModel& model = + obr.lookupObject<compressible::turbulenceModel>(turbName); + return model.k(); + } + else if (obr.foundObject<incompressible::turbulenceModel>(turbName)) + { + const incompressible::turbulenceModel& model = + obr.lookupObject<incompressible::turbulenceModel>(turbName); + return model.k(); + } + else + { + FatalErrorIn + ( + "Foam::tmp<Foam::volScalarField>" + "Foam::BrownianMotionForce<CloudType>::kModel() const" + ) + << "Turbulence model not found in mesh database" << nl + << "Database objects include: " << obr.sortedToc() + << abort(FatalError); + + return tmp<volScalarField>(NULL); + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::BrownianMotionForce<CloudType>::BrownianMotionForce +( + CloudType& owner, + const fvMesh& mesh, + const dictionary& dict +) +: + ParticleForce<CloudType>(owner, mesh, dict, typeName, true), + rndGen_(owner.rndGen()), + lambda_(readScalar(this->coeffs().lookup("lambda"))), + turbulence_(readBool(this->coeffs().lookup("turbulence"))), + kPtr_(NULL), + ownK_(false) +{} + + +template<class CloudType> +Foam::BrownianMotionForce<CloudType>::BrownianMotionForce +( + const BrownianMotionForce& bmf +) +: + ParticleForce<CloudType>(bmf), + rndGen_(bmf.rndGen_), + lambda_(bmf.lambda_), + turbulence_(bmf.turbulence_), + kPtr_(NULL), + ownK_(false) +{} + + +// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::BrownianMotionForce<CloudType>::~BrownianMotionForce() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class CloudType> +void Foam::BrownianMotionForce<CloudType>::cacheFields(const bool store) +{ + if (turbulence_) + { + if (store) + { + tmp<volScalarField> tk = kModel(); + if (tk.isTmp()) + { + kPtr_ = tk.ptr(); + ownK_ = true; + } + else + { + kPtr_ = tk.operator->(); + ownK_ = false; + } + } + else + { + if (ownK_ && kPtr_) + { + deleteDemandDrivenData(kPtr_); + ownK_ = false; + } + } + } +} + + +template<class CloudType> +Foam::forceSuSp Foam::BrownianMotionForce<CloudType>::calcCoupled +( + const typename CloudType::parcelType& p, + const scalar dt, + const scalar mass, + const scalar Re, + const scalar muc +) const +{ + forceSuSp value(vector::zero, 0.0); + + const scalar dp = p.d(); + const scalar Tc = p.Tc(); + + const scalar eta = rndGen_.sample01<scalar>(); + const scalar alpha = 2.0*lambda_/dp; + const scalar cc = 1.0 + alpha*(1.257 + 0.4*exp(-1.1/alpha)); + + const scalar sigma = physicoChemical::sigma.value(); + + scalar f = 0.0; + if (turbulence_) + { + const label cellI = p.cell(); + const volScalarField& k = *kPtr_; + const scalar kc = k[cellI]; + const scalar Dp = sigma*Tc*cc/(3*mathematical::pi*muc*dp); + f = eta/mass*sqrt(2.0*sqr(kc)*sqr(Tc)/(Dp*dt)); + } + else + { + const scalar rhoRatio = p.rho()/p.rhoc(); + const scalar s0 = + 216*muc*sigma*Tc/(sqr(mathematical::pi)*pow5(dp)*(rhoRatio)*cc); + f = eta*sqrt(mathematical::pi*s0/dt); + } + + const scalar sqrt2 = sqrt(2.0); + for (label i = 0; i < 3; i++) + { + const scalar x = rndGen_.sample01<scalar>(); + const scalar eta = sqrt2*erfInv(2*x - 1.0); + value.Su()[i] = mass*f*eta; + } + + return value; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/Turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.H b/src/lagrangian/Turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.H new file mode 100644 index 000000000..c9434117d --- /dev/null +++ b/src/lagrangian/Turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.H @@ -0,0 +1,160 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::BrownianMotionForce + +Description + Calculates particle Brownian motion force + +SourceFiles + BrownianMotionForceI.H + BrownianMotionForce.C + +\*---------------------------------------------------------------------------*/ + +#ifndef BrownianMotionForce_H +#define BrownianMotionForce_H + +#include "ParticleForce.H" +#include "cachedRandom.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class BrownianMotionForce Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class BrownianMotionForce +: + public ParticleForce<CloudType> +{ + // Private data + + //- Reference to the cloud random number generator + cachedRandom& rndGen_; + + //- Molecular free path length [m] + const scalar lambda_; + + //- Turbulence flag + bool turbulence_; + + //- Pointer to the turbulence kinetic energy field + const volScalarField* kPtr_; + + //- Flag that indicates ownership of turbulence k field + bool ownK_; + + + // Private Member Functions + + //- Inverse erf for Gaussian distribution + scalar erfInv(const scalar y) const; + + //- Return the k field from the turbulence model + tmp<volScalarField> kModel() const; + + +public: + + //- Runtime type information + TypeName("BrownianMotion"); + + + // Constructors + + //- Construct from mesh + BrownianMotionForce + ( + CloudType& owner, + const fvMesh& mesh, + const dictionary& dict + ); + + //- Construct copy + BrownianMotionForce(const BrownianMotionForce& bmf); + + //- Construct and return a clone + virtual autoPtr<ParticleForce<CloudType> > clone() const + { + return autoPtr<ParticleForce<CloudType> > + ( + new BrownianMotionForce<CloudType>(*this) + ); + } + + + //- Destructor + virtual ~BrownianMotionForce(); + + + // Member Functions + + // Access + + //- Return const access to the molecular free path length [m] + inline scalar lambda() const; + + //- Return const access to the turbulence flag + inline bool turbulence() const; + + + // Evaluation + + //- Cache fields + virtual void cacheFields(const bool store); + + //- Calculate the non-coupled force + virtual forceSuSp calcCoupled + ( + const typename CloudType::parcelType& p, + const scalar dt, + const scalar mass, + const scalar Re, + const scalar muc + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "BrownianMotionForceI.H" + +#ifdef NoRepository + #include "BrownianMotionForce.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModelDoc.H b/src/lagrangian/Turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForceI.H similarity index 74% rename from src/turbulenceModels/compressible/RAS/RASModel/RASModelDoc.H rename to src/lagrangian/Turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForceI.H index 53757f814..0c93d981b 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModelDoc.H +++ b/src/lagrangian/Turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForceI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -21,12 +21,22 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. +\*---------------------------------------------------------------------------*/ + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -\defgroup grpCmpRASTurbulence Compressible RAS turbulence -@{ - \ingroup grpCmpTurbulence - This group contains compressible RAS models. -@} - -\*---------------------------------------------------------------------------*/ +template<class CloudType> +inline Foam::scalar Foam::BrownianMotionForce<CloudType>::lambda() const +{ + return lambda_; +} + + +template<class CloudType> +inline bool Foam::BrownianMotionForce<CloudType>::turbulence() const +{ + return turbulence_; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/Make/options b/src/lagrangian/coalCombustion/Make/options index 0f4bce678..a67fc6200 100644 --- a/src/lagrangian/coalCombustion/Make/options +++ b/src/lagrangian/coalCombustion/Make/options @@ -13,7 +13,9 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ @@ -35,10 +37,9 @@ LIB_LIBS = \ -lreactionThermophysicalModels \ -lSLGThermo \ -lradiationModels \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ - -lLESdeltas \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ + -lcompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lregionModels \ -lsurfaceFilmModels \ diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.C index b959d7f75..98a31411a 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -162,7 +162,7 @@ Foam::scalar Foam::COxidationHurtMitchell<CloudType>::calculate // Far field partial pressure O2 [Pa] // Note: Should really use the surface partial pressure - const scalar ppO2 = max(0.0, rhoc*YO2/WO2_*specie::RR*Tc); + const scalar ppO2 = max(0.0, rhoc*YO2/WO2_*RR*Tc); // Activation energy [kcal/mol] const scalar E = -5.94 + 0.355*charPrc; diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.C index 817f57e50..174734fa2 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -176,10 +176,10 @@ Foam::scalar Foam::COxidationIntrinsicRate<CloudType>::calculate const scalar rhoO2 = rhoc*YO2; // Partial pressure O2 [Pa] - const scalar ppO2 = rhoO2/WO2_*specie::RR*Tc; + const scalar ppO2 = rhoO2/WO2_*RR*Tc; // Intrinsic reactivity [1/s] - const scalar ki = Ai_*exp(-Ei_/specie::RR/T); + const scalar ki = Ai_*exp(-Ei_/RR/T); // Thiele modulus [] const scalar phi = @@ -195,7 +195,7 @@ Foam::scalar Foam::COxidationIntrinsicRate<CloudType>::calculate const scalar Ap = constant::mathematical::pi*sqr(d); // Change in C mass [kg] - scalar dmC = Ap*rhoc*specie::RR*Tc*YO2/WO2_*D0*R/(D0 + R)*dt; + scalar dmC = Ap*rhoc*RR*Tc*YO2/WO2_*D0*R/(D0 + R)*dt; // Limit mass transfer by availability of C dmC = min(mass*Ychar, dmC); diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C index 552a6caab..e99b06152 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -137,13 +137,13 @@ Foam::scalar Foam::COxidationKineticDiffusionLimitedRate<CloudType>::calculate const scalar D0 = C1_/d*pow(0.5*(T + Tc), 0.75); // Kinetic rate - const scalar Rk = C2_*exp(-E_/(specie::RR*Tc)); + const scalar Rk = C2_*exp(-E_/(RR*Tc)); // Particle surface area const scalar Ap = constant::mathematical::pi*sqr(d); // Change in C mass [kg] - scalar dmC = Ap*rhoc*specie::RR*Tc*YO2/WO2_*D0*Rk/(D0 + Rk)*dt; + scalar dmC = Ap*rhoc*RR*Tc*YO2/WO2_*D0*Rk/(D0 + Rk)*dt; // Limit mass transfer by availability of C dmC = min(mass*fComb, dmC); diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C index 24bdf4927..151ad7037 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -160,10 +160,10 @@ Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate const scalar D = D0_*(rho0_/rhoc)*pow(Tc/T0_, Dn_); // Far field partial pressure O2 [Pa] - const scalar ppO2 = rhoO2/WO2_*specie::RR*Tc; + const scalar ppO2 = rhoO2/WO2_*RR*Tc; // Total molar concentration of the carrier phase [kmol/m^3] - const scalar C = pc/(specie::RR*Tc); + const scalar C = pc/(RR*Tc); if (debug) { @@ -191,7 +191,7 @@ Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate { qCsOld = qCs; const scalar PO2Surface = ppO2*exp(-(qCs + N)*d/(2*C*D)); - qCs = A_*exp(-E_/(specie::RR*T))*pow(PO2Surface, n_); + qCs = A_*exp(-E_/(RR*T))*pow(PO2Surface, n_); qCs = (100.0*qCs + iter*qCsOld)/(100.0 + iter); qCs = min(qCs, qCsLim); diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C index 847964c3e..5ffc645e8 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -557,7 +557,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation { // Molar average molecular weight of carrier mix const scalar Wc = - max(SMALL, this->rhoc_*specie::RR*this->Tc_/this->pc_); + max(SMALL, this->rhoc_*RR*this->Tc_/this->pc_); // Note: hardcoded gaseous diffusivities for now // TODO: add to carrier thermo diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C index d8f37f8a9..6d8dc12b2 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -118,7 +118,7 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange if (td.cloud().heatTransfer().BirdCorrection()) { // Average molecular weight of carrier mix - assumes perfect gas - const scalar Wc = this->rhoc_*specie::RR*this->Tc_/this->pc_; + const scalar Wc = this->rhoc_*RR*this->Tc_/this->pc_; forAll(dMassPC, i) { @@ -341,10 +341,10 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues Xinf /= sum(Xinf); // Molar fraction of far field species at particle surface - const scalar Xsff = 1.0 - min(sum(Cs)*specie::RR*this->T_/pc_, 1.0); + const scalar Xsff = 1.0 - min(sum(Cs)*RR*this->T_/pc_, 1.0); // Surface carrier total molar concentration - const scalar CsTot = pc_/(specie::RR*this->T_); + const scalar CsTot = pc_/(RR*this->T_); // Surface carrier composition (molar fraction) scalarField Xs(Xinf.size()); @@ -388,7 +388,7 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues Cps = max(Cps, ROOTVSMALL); - rhos *= pc_/(specie::RR*T); + rhos *= pc_/(RR*T); rhos = max(rhos, ROOTVSMALL); mus /= sumYiSqrtW; @@ -621,4 +621,3 @@ void Foam::ReactingParcel<ParcelType>::calc #include "ReactingParcelIO.C" // ************************************************************************* // - diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C index b387a99ea..221c687a6 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -219,10 +219,10 @@ void Foam::LiquidEvaporation<CloudType>::calculate const scalar kc = Sh*Dab/(d + ROOTVSMALL); // vapour concentration at surface [kmol/m3] at film temperature - const scalar Cs = pSat/(specie::RR*Ts); + const scalar Cs = pSat/(RR*Ts); // vapour concentration in bulk gas [kmol/m3] at film temperature - const scalar Cinf = Xc[gid]*pc/(specie::RR*Ts); + const scalar Cinf = Xc[gid]*pc/(RR*Ts); // molar flux of vapour [kmol/m2/s] const scalar Ni = max(kc*(Cs - Cinf), 0.0); diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C index adde0740a..c655faa36 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -193,7 +193,7 @@ void Foam::LiquidEvaporationBoil<CloudType>::calculate scalar ps = liquids_.pv(pc, Ts, X); // vapour density at droplet surface [kg/m3] - scalar rhos = ps*liquids_.W(X)/(specie::RR*Ts); + scalar rhos = ps*liquids_.W(X)/(RR*Ts); // construct carrier phase species volume fractions for cell, cellI const scalarField XcMix(calcXc(cellI)); diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C index d3a8ca8ae..935b35718 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -131,7 +131,7 @@ void Foam::SingleKineticRateDevolatilisation<CloudType>::calculate const scalar E = volatileData_[i].E(); // Kinetic rate - const scalar kappa = A1*exp(-E/(specie::RR*T)); + const scalar kappa = A1*exp(-E/(RR*T)); // Mass transferred from particle to carrier gas phase dMassDV[id] = min(dt*kappa*massVolatile, massVolatile); diff --git a/src/lagrangian/spray/Make/options b/src/lagrangian/spray/Make/options index 0238727cc..76e4aeb7d 100644 --- a/src/lagrangian/spray/Make/options +++ b/src/lagrangian/spray/Make/options @@ -14,7 +14,9 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ @@ -37,10 +39,9 @@ LIB_LIBS = \ -lreactionThermophysicalModels \ -lSLGThermo \ -lradiationModels \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ - -lLESdeltas \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ + -lcompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lregionModels \ -lsurfaceFilmModels \ diff --git a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.C b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.C index 0b1419c5a..f9702b6d1 100644 --- a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.C +++ b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -164,8 +164,8 @@ void Foam::SprayParcel<ParcelType>::calcAtomization td.cloud().atomization(); // Average molecular weight of carrier mix - assumes perfect gas - scalar Wc = this->rhoc_*specie::RR*this->Tc()/this->pc(); - scalar R = specie::RR/Wc; + scalar Wc = this->rhoc_*RR*this->Tc()/this->pc(); + scalar R = RR/Wc; scalar Tav = atomization.Taverage(this->T(), this->Tc()); // Calculate average gas density based on average temperature @@ -235,8 +235,8 @@ void Foam::SprayParcel<ParcelType>::calcBreakup } // Average molecular weight of carrier mix - assumes perfect gas - scalar Wc = this->rhoc()*specie::RR*this->Tc()/this->pc(); - scalar R = specie::RR/Wc; + scalar Wc = this->rhoc()*RR*this->Tc()/this->pc(); + scalar R = RR/Wc; scalar Tav = td.cloud().atomization().Taverage(this->T(), this->Tc()); // Calculate average gas density based on average temperature diff --git a/src/lagrangian/turbulence/Make/options b/src/lagrangian/turbulence/Make/options index 7b96cb008..811fe0951 100644 --- a/src/lagrangian/turbulence/Make/options +++ b/src/lagrangian/turbulence/Make/options @@ -12,8 +12,10 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ @@ -35,16 +37,11 @@ LIB_LIBS = \ -lreactionThermophysicalModels \ -lSLGThermo \ -lradiationModels \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ - -lLESdeltas \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ + -lcompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lregionModels \ -lsurfaceFilmModels \ -ldynamicFvMesh \ -lsampling - diff --git a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C index b01d3b49c..cb314e5af 100644 --- a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C +++ b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,8 +25,8 @@ License #include "DispersionRASModel.H" #include "demandDrivenData.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "compressible/turbulenceModel/turbulenceModel.H" +#include "turbulentTransportModel.H" +#include "turbulentFluidThermoModel.H" // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // @@ -35,7 +35,7 @@ Foam::tmp<Foam::volScalarField> Foam::DispersionRASModel<CloudType>::kModel() const { const objectRegistry& obr = this->owner().mesh(); - const word turbName = "turbulenceModel"; + const word turbName = turbulenceModel::propertiesName; if (obr.foundObject<compressible::turbulenceModel>(turbName)) { @@ -70,7 +70,7 @@ Foam::tmp<Foam::volScalarField> Foam::DispersionRASModel<CloudType>::epsilonModel() const { const objectRegistry& obr = this->owner().mesh(); - const word turbName = "turbulenceModel"; + const word turbName = turbulenceModel::propertiesName; if (obr.foundObject<compressible::turbulenceModel>(turbName)) { diff --git a/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C b/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C index 58ffe6b46..026413461 100644 --- a/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C +++ b/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,8 +26,8 @@ License #include "BrownianMotionForce.H" #include "mathematicalConstants.H" #include "demandDrivenData.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "compressible/turbulenceModel/turbulenceModel.H" +#include "turbulentTransportModel.H" +#include "turbulentFluidThermoModel.H" using namespace Foam::constant; @@ -57,7 +57,7 @@ Foam::tmp<Foam::volScalarField> Foam::BrownianMotionForce<CloudType>::kModel() const { const objectRegistry& obr = this->owner().mesh(); - const word turbName = "turbulenceModel"; + const word turbName = turbulenceModel::propertiesName; if (obr.foundObject<compressible::turbulenceModel>(turbName)) { diff --git a/src/meshTools/sets/topoSets/topoSet.C b/src/meshTools/sets/topoSets/topoSet.C index 79e3796ba..4618b228d 100644 --- a/src/meshTools/sets/topoSets/topoSet.C +++ b/src/meshTools/sets/topoSets/topoSet.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -129,7 +129,7 @@ Foam::autoPtr<Foam::topoSet> Foam::topoSet::New } -Foam::fileName Foam::topoSet::topoSet::localPath +Foam::fileName Foam::topoSet::localPath ( const polyMesh& mesh, const word& name @@ -143,7 +143,7 @@ Foam::fileName Foam::topoSet::topoSet::localPath // Update stored cell numbers using map. // Do in two passes to prevent allocation if nothing changed. -void Foam::topoSet::topoSet::updateLabels(const labelList& map) +void Foam::topoSet::updateLabels(const labelList& map) { // Iterate over map to see if anything changed bool changed = false; @@ -191,7 +191,7 @@ void Foam::topoSet::topoSet::updateLabels(const labelList& map) } -void Foam::topoSet::topoSet::check(const label maxLabel) +void Foam::topoSet::check(const label maxLabel) { forAllConstIter(topoSet, *this, iter) { diff --git a/src/postProcessing/functionObjects/forces/Make/options b/src/postProcessing/functionObjects/forces/Make/options index 5952c6b6c..3dd0b1248 100644 --- a/src/postProcessing/functionObjects/forces/Make/options +++ b/src/postProcessing/functionObjects/forces/Make/options @@ -3,18 +3,18 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/fileFormats/lnInclude \ -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude LIB_LIBS = \ + -lturbulenceModels \ + -lincompressibleTurbulenceModels \ + -lcompressibleTurbulenceModels \ -lincompressibleTransportModels \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ -lfluidThermophysicalModels \ -lspecie \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ -lfiniteVolume \ -lmeshTools \ -lfileFormats diff --git a/src/postProcessing/functionObjects/forces/forces/forces.C b/src/postProcessing/functionObjects/forces/forces/forces.C index 539e14b30..fa8cfdcfc 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-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,10 +30,8 @@ License #include "wordReList.H" #include "fvcGrad.H" #include "porosityModel.H" -#include "fluidThermo.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "compressible/turbulenceModel/turbulenceModel.H" -#include "incompressible/transportModel/transportModel.H" +#include "turbulentTransportModel.H" +#include "turbulentFluidThermoModel.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -209,17 +207,17 @@ Foam::tmp<Foam::volSymmTensorField> Foam::forces::devRhoReff() const typedef compressible::turbulenceModel cmpTurbModel; typedef incompressible::turbulenceModel icoTurbModel; - if (obr_.foundObject<cmpTurbModel>(cmpTurbModel::typeName)) + if (obr_.foundObject<cmpTurbModel>(cmpTurbModel::propertiesName)) { const cmpTurbModel& turb = - obr_.lookupObject<cmpTurbModel>(cmpTurbModel::typeName); + obr_.lookupObject<cmpTurbModel>(cmpTurbModel::propertiesName); return turb.devRhoReff(); } - else if (obr_.foundObject<icoTurbModel>(icoTurbModel::typeName)) + else if (obr_.foundObject<icoTurbModel>(icoTurbModel::propertiesName)) { const incompressible::turbulenceModel& turb = - obr_.lookupObject<icoTurbModel>(icoTurbModel::typeName); + obr_.lookupObject<icoTurbModel>(icoTurbModel::propertiesName); return rho()*turb.devReff(); } diff --git a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C b/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C index c642e5e69..23063d154 100644 --- a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C +++ b/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -153,10 +153,10 @@ void Foam::DESModelRegions::execute() label DESpresent = false; - if (mesh.foundObject<icoModel>("turbulenceModel")) + if (mesh.foundObject<icoModel>(turbulenceModel::propertiesName)) { const icoModel& model = - mesh.lookupObject<icoModel>("turbulenceModel"); + mesh.lookupObject<icoModel>(turbulenceModel::propertiesName); if (isA<icoDESModel>(model)) { @@ -166,10 +166,10 @@ void Foam::DESModelRegions::execute() DESpresent = true; } } - else if (mesh.foundObject<cmpModel>("turbulenceModel")) + else if (mesh.foundObject<cmpModel>(turbulenceModel::propertiesName)) { const cmpModel& model = - mesh.lookupObject<cmpModel>("turbulenceModel"); + mesh.lookupObject<cmpModel>(turbulenceModel::propertiesName); if (isA<cmpDESModel>(model)) { diff --git a/src/postProcessing/functionObjects/utilities/Make/files b/src/postProcessing/functionObjects/utilities/Make/files index 0b5490616..3f2c2ebad 100644 --- a/src/postProcessing/functionObjects/utilities/Make/files +++ b/src/postProcessing/functionObjects/utilities/Make/files @@ -5,43 +5,48 @@ CourantNo/CourantNoFunctionObject.C Lambda2/Lambda2.C Lambda2/Lambda2FunctionObject.C - +/* Peclet/Peclet.C Peclet/PecletFunctionObject.C - +*/ Q/Q.C Q/QFunctionObject.C blendingFactor/blendingFactor.C blendingFactor/blendingFactorFunctionObject.C - +/* DESModelRegions/DESModelRegions.C DESModelRegions/DESModelRegionsFunctionObject.C - +*/ dsmcFields/dsmcFields.C dsmcFields/dsmcFieldsFunctionObject.C pressureTools/pressureTools.C pressureTools/pressureToolsFunctionObject.C +/* scalarTransport/scalarTransport.C scalarTransport/scalarTransportFunctionObject.C +*/ timeActivatedFileUpdate/timeActivatedFileUpdate.C timeActivatedFileUpdate/timeActivatedFileUpdateFunctionObject.C +/* turbulenceFields/turbulenceFields.C turbulenceFields/turbulenceFieldsFunctionObject.C +*/ vorticity/vorticity.C vorticity/vorticityFunctionObject.C - +/* wallShearStress/wallShearStress.C wallShearStress/wallShearStressFunctionObject.C - +*/ +/* yPlusLES/yPlusLES.C yPlusLES/yPlusLESFunctionObject.C - +*/ yPlusRAS/yPlusRAS.C yPlusRAS/yPlusRASFunctionObject.C diff --git a/src/postProcessing/functionObjects/utilities/Make/options b/src/postProcessing/functionObjects/utilities/Make/options index a561f6ca1..d7868cbb8 100644 --- a/src/postProcessing/functionObjects/utilities/Make/options +++ b/src/postProcessing/functionObjects/utilities/Make/options @@ -5,12 +5,8 @@ EXE_INC = \ -I$(LIB_SRC)/lagrangian/dsmc/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions \ - -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude LIB_LIBS = \ -lfiniteVolume \ @@ -20,8 +16,5 @@ LIB_LIBS = \ -llagrangian \ -ldsmc \ -lincompressibleTransportModels \ - -lcompressibleRASModels \ - -lincompressibleRASModels \ - -lcompressibleLESModels \ - -lincompressibleLESModels \ + -lturbulenceModels \ -lfluidThermophysicalModels diff --git a/src/postProcessing/functionObjects/utilities/Peclet/Peclet.C b/src/postProcessing/functionObjects/utilities/Peclet/Peclet.C index 6d288fcfc..a0683b4a1 100644 --- a/src/postProcessing/functionObjects/utilities/Peclet/Peclet.C +++ b/src/postProcessing/functionObjects/utilities/Peclet/Peclet.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -128,20 +128,29 @@ void Foam::Peclet::execute() const fvMesh& mesh = refCast<const fvMesh>(obr_); tmp<volScalarField> nuEff; - if (mesh.foundObject<cmpTurbModel>("turbulenceModel")) + if (mesh.foundObject<cmpTurbModel>(turbulenceModel::propertiesName)) { const cmpTurbModel& model = - mesh.lookupObject<cmpTurbModel>("turbulenceModel"); + mesh.lookupObject<cmpTurbModel> + ( + turbulenceModel::propertiesName + ); const volScalarField& rho = mesh.lookupObject<volScalarField>(rhoName_); nuEff = model.muEff()/rho; } - else if (mesh.foundObject<icoTurbModel>("turbulenceModel")) + else if + ( + mesh.foundObject<icoTurbModel>(turbulenceModel::propertiesName) + ) { const icoTurbModel& model = - mesh.lookupObject<icoTurbModel>("turbulenceModel"); + mesh.lookupObject<icoTurbModel> + ( + turbulenceModel::propertiesName + ); nuEff = model.nuEff(); } diff --git a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C index 442838860..d65dc92fb 100644 --- a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C +++ b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -97,15 +97,21 @@ Foam::tmp<Foam::volScalarField> Foam::scalarTransport::DT ) ); } - else if (mesh_.foundObject<icoModel>("turbulenceModel")) + else if (mesh_.foundObject<icoModel>(turbulenceModel::propertiesName)) { - const icoModel& model = mesh_.lookupObject<icoModel>("turbulenceModel"); + const icoModel& model = mesh_.lookupObject<icoModel> + ( + turbulenceModel::propertiesName + ); return model.nuEff(); } - else if (mesh_.foundObject<cmpModel>("turbulenceModel")) + else if (mesh_.foundObject<cmpModel>(turbulenceModel::propertiesName)) { - const cmpModel& model = mesh_.lookupObject<cmpModel>("turbulenceModel"); + const cmpModel& model = mesh_.lookupObject<cmpModel> + ( + turbulenceModel::propertiesName + ); return model.muEff(); } diff --git a/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFields.C b/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFields.C index 3d89600cf..3fbbb8fb0 100644 --- a/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFields.C +++ b/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,7 +58,7 @@ namespace Foam const NamedEnum<turbulenceFields::incompressibleField, 4> turbulenceFields::incompressibleFieldNames_; - const word turbulenceFields::modelName = "turbulenceModel"; + const word turbulenceFields::modelName = turbulenceModel::propertiesName; } diff --git a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C index 00647d149..393d890d2 100644 --- a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C +++ b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -242,17 +242,17 @@ void Foam::wallShearStress::execute() tmp<volSymmTensorField> Reff; - if (mesh.foundObject<cmpModel>("turbulenceModel")) + if (mesh.foundObject<cmpModel>(turbulenceModel::propertiesName)) { const cmpModel& model = - mesh.lookupObject<cmpModel>("turbulenceModel"); + mesh.lookupObject<cmpModel>(turbulenceModel::propertiesName); Reff = model.devRhoReff(); } - else if (mesh.foundObject<icoModel>("turbulenceModel")) + else if (mesh.foundObject<icoModel>(turbulenceModel::propertiesName)) { const icoModel& model = - mesh.lookupObject<icoModel>("turbulenceModel"); + mesh.lookupObject<icoModel>(turbulenceModel::propertiesName); Reff = model.devReff(); } diff --git a/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.C b/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.C index 68125069a..12c8349a3 100644 --- a/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.C +++ b/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,12 +25,8 @@ License #include "yPlusRAS.H" #include "volFields.H" - -#include "incompressible/RAS/RASModel/RASModel.H" -#include "nutWallFunction/nutWallFunctionFvPatchScalarField.H" -#include "compressible/RAS/RASModel/RASModel.H" -#include "mutWallFunction/mutWallFunctionFvPatchScalarField.H" -#include "wallDist.H" +#include "turbulenceModel.H" +#include "nutWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -55,17 +51,16 @@ void Foam::yPlusRAS::writeFileHeader(const label i) } -void Foam::yPlusRAS::calcIncompressibleYPlus +void Foam::yPlusRAS::calcYPlus ( const fvMesh& mesh, volScalarField& yPlus ) { - typedef incompressible::nutWallFunctionFvPatchScalarField - wallFunctionPatchField; - - const incompressible::RASModel& model = - mesh.lookupObject<incompressible::RASModel>("RASProperties"); + const turbulenceModel& model = mesh.lookupObject<turbulenceModel> + ( + turbulenceModel::propertiesName + ); const volScalarField nut(model.nut()); const volScalarField::GeometricBoundaryField& nutPatches = @@ -74,12 +69,15 @@ void Foam::yPlusRAS::calcIncompressibleYPlus bool foundPatch = false; forAll(nutPatches, patchi) { - if (isA<wallFunctionPatchField>(nutPatches[patchi])) + if (isA<nutWallFunctionFvPatchScalarField>(nutPatches[patchi])) { foundPatch = true; - const wallFunctionPatchField& nutPw = - dynamic_cast<const wallFunctionPatchField&>(nutPatches[patchi]); + const nutWallFunctionFvPatchScalarField& nutPw = + dynamic_cast + < + const nutWallFunctionFvPatchScalarField& + >(nutPatches[patchi]); yPlus.boundaryField()[patchi] = nutPw.yPlus(); const scalarField& Yp = yPlus.boundaryField()[patchi]; @@ -106,65 +104,8 @@ void Foam::yPlusRAS::calcIncompressibleYPlus if (log_ && !foundPatch) { - Info<< " no " << wallFunctionPatchField::typeName << " patches" - << endl; - } -} - - -void Foam::yPlusRAS::calcCompressibleYPlus -( - const fvMesh& mesh, - volScalarField& yPlus -) -{ - typedef compressible::mutWallFunctionFvPatchScalarField - wallFunctionPatchField; - - const compressible::RASModel& model = - mesh.lookupObject<compressible::RASModel>("RASProperties"); - - const volScalarField mut(model.mut()); - const volScalarField::GeometricBoundaryField& mutPatches = - mut.boundaryField(); - - bool foundPatch = false; - forAll(mutPatches, patchi) - { - if (isA<wallFunctionPatchField>(mutPatches[patchi])) - { - foundPatch = true; - - const wallFunctionPatchField& mutPw = - dynamic_cast<const wallFunctionPatchField&>(mutPatches[patchi]); - - yPlus.boundaryField()[patchi] = mutPw.yPlus(); - const scalarField& Yp = yPlus.boundaryField()[patchi]; - - scalar minYp = gMin(Yp); - scalar maxYp = gMax(Yp); - scalar avgYp = gAverage(Yp); - - if (Pstream::master()) - { - Info(log_)<< " patch " << mutPw.patch().name() - << " y+ : min = " << minYp << ", max = " << maxYp - << ", average = " << avgYp << nl; - - file() << obr_.time().value() - << token::TAB << mutPw.patch().name() - << token::TAB << minYp - << token::TAB << maxYp - << token::TAB << avgYp - << endl; - } - } - } - - if (log_ && !foundPatch) - { - Info<< " no " << wallFunctionPatchField::typeName << " patches" - << endl; + Info<< " no " << nutWallFunctionFvPatchScalarField::typeName + << " patches" << endl; } } @@ -253,9 +194,6 @@ void Foam::yPlusRAS::execute() { functionObjectFile::write(); - const surfaceScalarField& phi = - obr_.lookupObject<surfaceScalarField>(phiName_); - const fvMesh& mesh = refCast<const fvMesh>(obr_); volScalarField& yPlusRAS = @@ -266,14 +204,7 @@ void Foam::yPlusRAS::execute() Info(log_)<< type() << " " << name_ << " output:" << nl; - if (phi.dimensions() == dimMass/dimTime) - { - calcCompressibleYPlus(mesh, yPlusRAS); - } - else - { - calcIncompressibleYPlus(mesh, yPlusRAS); - } + calcYPlus(mesh, yPlusRAS); } } diff --git a/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.H b/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.H index 8a73cd47d..7c3cdd696 100644 --- a/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.H +++ b/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -87,11 +87,8 @@ class yPlusRAS //- File header information virtual void writeFileHeader(const label i); - //- Calculate incompressible form of y+ - void calcIncompressibleYPlus(const fvMesh& mesh, volScalarField& yPlus); - - //- Calculate compressible form of y+ - void calcCompressibleYPlus(const fvMesh& mesh, volScalarField& yPlus); + //- Calculate y+ + void calcYPlus(const fvMesh& mesh, volScalarField& yPlus); //- Disallow default bitwise copy construct yPlusRAS(const yPlusRAS&); diff --git a/src/regionCoupled/Make/options b/src/regionCoupled/Make/options index ea55cd87d..e877774c1 100644 --- a/src/regionCoupled/Make/options +++ b/src/regionCoupled/Make/options @@ -1,11 +1,13 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude LIB_LIBS = \ -lfluidThermophysicalModels \ -lfiniteVolume \ -lmeshTools \ - -lcompressibleTurbulenceModel + -lturbulenceModels \ + -lcompressibleTurbulenceModels diff --git a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C index 9f0fe9a60..fd01b6497 100644 --- a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C +++ b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,7 @@ License #include "addToRunTimeSelectionTable.H" #include "energyRegionCoupledFvPatchScalarField.H" #include "Time.H" -#include "turbulenceModel.H" +#include "turbulentFluidThermoModel.H" // * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * // @@ -63,7 +63,7 @@ void Foam::energyRegionCoupledFvPatchScalarField::setMethod() const ( this->db().foundObject<compressible::turbulenceModel> ( - "turbulenceModel" + turbulenceModel::propertiesName ) ) { @@ -109,7 +109,7 @@ kappa() const const compressible::turbulenceModel& turbModel = this->db().lookupObject<compressible::turbulenceModel> ( - "turbulenceModel" + turbulenceModel::propertiesName ); return turbModel.kappaEff(patch().index()); diff --git a/src/regionModels/pyrolysisModels/Make/options b/src/regionModels/pyrolysisModels/Make/options index 7f59d7524..75d130d34 100644 --- a/src/regionModels/pyrolysisModels/Make/options +++ b/src/regionModels/pyrolysisModels/Make/options @@ -8,11 +8,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/solidChemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude LIB_LIBS = \ @@ -23,10 +20,8 @@ LIB_LIBS = \ -lfluidThermophysicalModels \ -lsolidChemistryModel \ -lsolidThermo \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ - -lLESdeltas \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lregionModels \ -lradiationModels \ -lreactionThermophysicalModels diff --git a/src/regionModels/regionCoupling/Make/options b/src/regionModels/regionCoupling/Make/options index a346c249b..ce9120095 100644 --- a/src/regionModels/regionCoupling/Make/options +++ b/src/regionModels/regionCoupling/Make/options @@ -16,11 +16,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/pyrolysisModels/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ @@ -34,5 +31,5 @@ LIB_LIBS = \ -lSLGThermo \ -lfiniteVolume \ -lmeshTools \ - -lcompressibleRASModels \ - -lcompressibleLESModels + -lturbulenceModels \ + -lcompressibleTurbulenceModels diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/Make/files b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/Make/files index 6f150005f..01e50d24a 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/Make/files +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/Make/files @@ -1,5 +1,4 @@ alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C -mutkFilmWallFunction/mutkFilmWallFunctionFvPatchScalarField.C - +nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C LIB = $(FOAM_LIBBIN)/libsurfaceFilmDerivedFvPatchFields diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/Make/options b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/Make/options index e894e6d69..ca490a074 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/Make/options +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/Make/options @@ -9,10 +9,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude @@ -27,8 +25,7 @@ LIB_LIBS = \ -lsolidMixtureProperties \ -lreactionThermophysicalModels \ -lSLGThermo \ - -lcompressibleTurbulenceModel \ - -lcompressibleRASModels \ - -lcompressibleLESModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lregionModels \ -lsurfaceFilmModels diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C index fb2d12349..e6eb83bc9 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "alphatFilmWallFunctionFvPatchScalarField.H" -#include "RASModel.H" +#include "turbulentFluidThermoModel.H" #include "surfaceFilmModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" @@ -150,27 +150,36 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs() return; } - const label patchI = patch().index(); + const label patchi = patch().index(); // Retrieve phase change mass from surface film model const modelType& filmModel = db().time().lookupObject<modelType>("surfaceFilmProperties"); - const label filmPatchI = filmModel.regionPatchID(patchI); + const label filmPatchI = filmModel.regionPatchID(patchi); tmp<volScalarField> mDotFilm(filmModel.primaryMassTrans()); scalarField mDotFilmp = mDotFilm().boundaryField()[filmPatchI]; filmModel.toPrimary(filmPatchI, mDotFilmp); // Retrieve RAS turbulence model - const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - - const scalarField& y = rasModel.y()[patchI]; - const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; - const tmp<volScalarField> tk = rasModel.k(); + const turbulenceModel& turbModel = db().lookupObject<turbulenceModel> + ( + IOobject::groupName + ( + turbulenceModel::propertiesName, + dimensionedInternalField().group() + ) + ); + + const scalarField& y = turbModel.y()[patchi]; + const scalarField& rhow = turbModel.rho().boundaryField()[patchi]; + const tmp<volScalarField> tk = turbModel.k(); const volScalarField& k = tk(); - const scalarField& muw = rasModel.mu().boundaryField()[patchI]; - const scalarField& alphaw = rasModel.alpha().boundaryField()[patchI]; + const tmp<scalarField> tmuw = turbModel.mu(patchi); + const scalarField& muw = tmuw(); + const tmp<scalarField> talpha = turbModel.alpha(patchi); + const scalarField& alphaw = talpha(); const scalar Cmu25 = pow(Cmu_, 0.25); diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutkFilmWallFunction/mutkFilmWallFunctionFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C similarity index 62% rename from src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutkFilmWallFunction/mutkFilmWallFunctionFvPatchScalarField.C rename to src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C index ee912e618..2b6727b91 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutkFilmWallFunction/mutkFilmWallFunctionFvPatchScalarField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,10 +23,10 @@ License \*---------------------------------------------------------------------------*/ -#include "mutkFilmWallFunctionFvPatchScalarField.H" +#include "nutkFilmWallFunctionFvPatchScalarField.H" #include "fvPatchFieldMapper.H" #include "volFields.H" -#include "RASModel.H" +#include "turbulentFluidThermoModel.H" #include "addToRunTimeSelectionTable.H" #include "surfaceFilmModel.H" #include "mappedWallPolyPatch.H" @@ -43,7 +43,7 @@ namespace RASModels // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -tmp<scalarField> mutkFilmWallFunctionFvPatchScalarField::calcUTau +tmp<scalarField> nutkFilmWallFunctionFvPatchScalarField::calcUTau ( const scalarField& magGradU ) const @@ -62,13 +62,13 @@ tmp<scalarField> mutkFilmWallFunctionFvPatchScalarField::calcUTau return tuTau; } - const label patchI = patch().index(); + const label patchi = patch().index(); // Retrieve phase change mass from surface film model const modelType& filmModel = db().time().lookupObject<modelType>("surfaceFilmProperties"); - const label filmPatchI = filmModel.regionPatchID(patchI); + const label filmPatchI = filmModel.regionPatchID(patchi); tmp<volScalarField> mDotFilm(filmModel.primaryMassTrans()); scalarField mDotFilmp = mDotFilm().boundaryField()[filmPatchI]; @@ -76,12 +76,20 @@ tmp<scalarField> mutkFilmWallFunctionFvPatchScalarField::calcUTau // Retrieve RAS turbulence model - const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const scalarField& y = rasModel.y()[patchI]; - const fvPatchScalarField& rhow = rasModel.rho().boundaryField()[patchI]; - const fvPatchScalarField& muw = rasModel.mu().boundaryField()[patchI]; - const tmp<volScalarField> tk = rasModel.k(); + const turbulenceModel& turbModel = db().lookupObject<turbulenceModel> + ( + IOobject::groupName + ( + turbulenceModel::propertiesName, + dimensionedInternalField().group() + ) + ); + + const scalarField& y = turbModel.y()[patchi]; + const tmp<volScalarField> tk = turbModel.k(); const volScalarField& k = tk(); + const tmp<scalarField> tnuw = turbModel.nu(patchi); + const scalarField& nuw = tnuw(); const scalar Cmu25 = pow(Cmu_, 0.25); @@ -91,7 +99,7 @@ tmp<scalarField> mutkFilmWallFunctionFvPatchScalarField::calcUTau scalar ut = Cmu25*sqrt(k[faceCellI]); - scalar yPlus = y[faceI]*ut/(muw[faceI]/rhow[faceI]); + scalar yPlus = y[faceI]*ut/nuw[faceI]; scalar mStar = mDotFilmp[faceI]/(y[faceI]*ut); @@ -115,83 +123,91 @@ tmp<scalarField> mutkFilmWallFunctionFvPatchScalarField::calcUTau } -tmp<scalarField> mutkFilmWallFunctionFvPatchScalarField::calcMut() const +tmp<scalarField> nutkFilmWallFunctionFvPatchScalarField::calcNut() const { - const label patchI = patch().index(); + const label patchi = patch().index(); - const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; + const turbulenceModel& turbModel = db().lookupObject<turbulenceModel> + ( + IOobject::groupName + ( + turbulenceModel::propertiesName, + dimensionedInternalField().group() + ) + ); + + const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; const scalarField magGradU(mag(Uw.snGrad())); - const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; - const scalarField& muw = rasModel.mu().boundaryField()[patchI]; + const tmp<scalarField> tnuw = turbModel.nu(patchi); + const scalarField& nuw = tnuw(); return max ( scalar(0), - rhow*sqr(calcUTau(magGradU))/(magGradU + ROOTVSMALL) - muw + sqr(calcUTau(magGradU))/(magGradU + ROOTVSMALL) - nuw ); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -mutkFilmWallFunctionFvPatchScalarField::mutkFilmWallFunctionFvPatchScalarField +nutkFilmWallFunctionFvPatchScalarField::nutkFilmWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF ) : - mutkWallFunctionFvPatchScalarField(p, iF), + nutkWallFunctionFvPatchScalarField(p, iF), B_(5.5), yPlusCrit_(11.05) {} -mutkFilmWallFunctionFvPatchScalarField::mutkFilmWallFunctionFvPatchScalarField +nutkFilmWallFunctionFvPatchScalarField::nutkFilmWallFunctionFvPatchScalarField ( - const mutkFilmWallFunctionFvPatchScalarField& ptf, + const nutkFilmWallFunctionFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, const fvPatchFieldMapper& mapper ) : - mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper), + nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper), B_(5.5), yPlusCrit_(11.05) {} -mutkFilmWallFunctionFvPatchScalarField::mutkFilmWallFunctionFvPatchScalarField +nutkFilmWallFunctionFvPatchScalarField::nutkFilmWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, const dictionary& dict ) : - mutkWallFunctionFvPatchScalarField(p, iF, dict), + nutkWallFunctionFvPatchScalarField(p, iF, dict), B_(dict.lookupOrDefault("B", 5.5)), yPlusCrit_(dict.lookupOrDefault("yPlusCrit", 11.05)) {} -mutkFilmWallFunctionFvPatchScalarField::mutkFilmWallFunctionFvPatchScalarField +nutkFilmWallFunctionFvPatchScalarField::nutkFilmWallFunctionFvPatchScalarField ( - const mutkFilmWallFunctionFvPatchScalarField& wfpsf + const nutkFilmWallFunctionFvPatchScalarField& wfpsf ) : - mutkWallFunctionFvPatchScalarField(wfpsf), + nutkWallFunctionFvPatchScalarField(wfpsf), B_(wfpsf.B_), yPlusCrit_(wfpsf.yPlusCrit_) {} -mutkFilmWallFunctionFvPatchScalarField::mutkFilmWallFunctionFvPatchScalarField +nutkFilmWallFunctionFvPatchScalarField::nutkFilmWallFunctionFvPatchScalarField ( - const mutkFilmWallFunctionFvPatchScalarField& wfpsf, + const nutkFilmWallFunctionFvPatchScalarField& wfpsf, const DimensionedField<scalar, volMesh>& iF ) : - mutkWallFunctionFvPatchScalarField(wfpsf, iF), + nutkWallFunctionFvPatchScalarField(wfpsf, iF), B_(wfpsf.B_), yPlusCrit_(wfpsf.yPlusCrit_) {} @@ -199,21 +215,29 @@ mutkFilmWallFunctionFvPatchScalarField::mutkFilmWallFunctionFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp<scalarField> mutkFilmWallFunctionFvPatchScalarField::yPlus() const +tmp<scalarField> nutkFilmWallFunctionFvPatchScalarField::yPlus() const { - const label patchI = patch().index(); + const label patchi = patch().index(); + + const turbulenceModel& turbModel = db().lookupObject<turbulenceModel> + ( + IOobject::groupName + ( + turbulenceModel::propertiesName, + dimensionedInternalField().group() + ) + ); - const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); - const scalarField& y = rasModel.y()[patchI]; - const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; - const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; - const scalarField& muw = rasModel.mu().boundaryField()[patchI]; + const scalarField& y = turbModel.y()[patchi]; + const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; + const tmp<scalarField> tnuw = turbModel.nu(patchi); + const scalarField& nuw = tnuw(); - return y*calcUTau(mag(Uw.snGrad()))/(muw/rhow); + return y*calcUTau(mag(Uw.snGrad()))/nuw; } -void mutkFilmWallFunctionFvPatchScalarField::write(Ostream& os) const +void nutkFilmWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField<scalar>::write(os); writeLocalEntries(os); @@ -225,7 +249,7 @@ void mutkFilmWallFunctionFvPatchScalarField::write(Ostream& os) const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makePatchTypeField(fvPatchScalarField, mutkFilmWallFunctionFvPatchScalarField); +makePatchTypeField(fvPatchScalarField, nutkFilmWallFunctionFvPatchScalarField); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutkFilmWallFunction/mutkFilmWallFunctionFvPatchScalarField.H b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.H similarity index 76% rename from src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutkFilmWallFunction/mutkFilmWallFunctionFvPatchScalarField.H rename to src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.H index 7e7a2a99f..9eb4c5e19 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutkFilmWallFunction/mutkFilmWallFunctionFvPatchScalarField.H +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::compressible::RASModels::mutkFilmWallFunctionFvPatchScalarField + Foam::compressible::RASModels::nutkFilmWallFunctionFvPatchScalarField Group grpSurfaceFilmBoundaryConditions grpCmpWallFunctions @@ -38,23 +38,23 @@ Description \verbatim myPatch { - type mutkFilmWallFunction; + type nutkFilmWallFunction; value uniform 0; } \endverbatim SeeAlso - Foam::mutkWallFunctionFvPatchScalarField + Foam::nutkWallFunctionFvPatchScalarField SourceFiles - mutkFilmWallFunctionFvPatchScalarField.C + nutkFilmWallFunctionFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef compressibleMutSpalartAllmarasWallFunctionFvPatchScalarField_H -#define compressibleMutSpalartAllmarasWallFunctionFvPatchScalarField_H +#ifndef compressibleNutSpalartAllmarasWallFunctionFvPatchScalarField_H +#define compressibleNutSpalartAllmarasWallFunctionFvPatchScalarField_H -#include "mutkWallFunctionFvPatchScalarField.H" +#include "nutkWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -66,12 +66,12 @@ namespace RASModels { /*---------------------------------------------------------------------------*\ - Class mutkFilmWallFunctionFvPatchScalarField Declaration + Class nutkFilmWallFunctionFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class mutkFilmWallFunctionFvPatchScalarField +class nutkFilmWallFunctionFvPatchScalarField : - public mutkWallFunctionFvPatchScalarField + public nutkWallFunctionFvPatchScalarField { protected: @@ -87,7 +87,7 @@ protected: // Protected member functions //- Calculate the turbulence viscosity - virtual tmp<scalarField> calcMut() const; + virtual tmp<scalarField> calcNut() const; //- Calculate the friction velocity virtual tmp<scalarField> calcUTau(const scalarField& magGradU) const; @@ -96,20 +96,20 @@ protected: public: //- Runtime type information - TypeName("mutkFilmWallFunction"); + TypeName("nutkFilmWallFunction"); // Constructors //- Construct from patch and internal field - mutkFilmWallFunctionFvPatchScalarField + nutkFilmWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField<scalar, volMesh>& ); //- Construct from patch, internal field and dictionary - mutkFilmWallFunctionFvPatchScalarField + nutkFilmWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField<scalar, volMesh>&, @@ -117,20 +117,20 @@ public: ); //- Construct by mapping given - // mutkFilmWallFunctionFvPatchScalarField + // nutkFilmWallFunctionFvPatchScalarField // onto a new patch - mutkFilmWallFunctionFvPatchScalarField + nutkFilmWallFunctionFvPatchScalarField ( - const mutkFilmWallFunctionFvPatchScalarField&, + const nutkFilmWallFunctionFvPatchScalarField&, const fvPatch&, const DimensionedField<scalar, volMesh>&, const fvPatchFieldMapper& ); //- Construct as copy - mutkFilmWallFunctionFvPatchScalarField + nutkFilmWallFunctionFvPatchScalarField ( - const mutkFilmWallFunctionFvPatchScalarField& + const nutkFilmWallFunctionFvPatchScalarField& ); //- Construct and return a clone @@ -138,14 +138,14 @@ public: { return tmp<fvPatchScalarField> ( - new mutkFilmWallFunctionFvPatchScalarField(*this) + new nutkFilmWallFunctionFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - mutkFilmWallFunctionFvPatchScalarField + nutkFilmWallFunctionFvPatchScalarField ( - const mutkFilmWallFunctionFvPatchScalarField&, + const nutkFilmWallFunctionFvPatchScalarField&, const DimensionedField<scalar, volMesh>& ); @@ -157,7 +157,7 @@ public: { return tmp<fvPatchScalarField> ( - new mutkFilmWallFunctionFvPatchScalarField(*this, iF) + new nutkFilmWallFunctionFvPatchScalarField(*this, iF) ); } diff --git a/src/regionModels/thermalBaffleModels/Make/options b/src/regionModels/thermalBaffleModels/Make/options index 7e6997476..bc36cf7dc 100644 --- a/src/regionModels/thermalBaffleModels/Make/options +++ b/src/regionModels/thermalBaffleModels/Make/options @@ -7,16 +7,16 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/mesh/extrudeModel/lnInclude LIB_LIBS = \ -lregionModels \ -lsolidThermo \ - -lcompressibleTurbulenceModel \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ -lfiniteVolume \ -lmeshTools \ - -lOpenFOAM \ -lradiationModels \ -ldynamicMesh diff --git a/src/thermophysicalModels/properties/liquidMixtureProperties/liquidMixtureProperties/liquidMixtureProperties.C b/src/thermophysicalModels/properties/liquidMixtureProperties/liquidMixtureProperties/liquidMixtureProperties.C index 5fec22dc9..2c3403ed2 100644 --- a/src/thermophysicalModels/properties/liquidMixtureProperties/liquidMixtureProperties/liquidMixtureProperties.C +++ b/src/thermophysicalModels/properties/liquidMixtureProperties/liquidMixtureProperties/liquidMixtureProperties.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/properties/solidProperties/solidProperties/solidPropertiesI.H b/src/thermophysicalModels/properties/solidProperties/solidProperties/solidPropertiesI.H index dda7e9428..3910a4f37 100644 --- a/src/thermophysicalModels/properties/solidProperties/solidProperties/solidPropertiesI.H +++ b/src/thermophysicalModels/properties/solidProperties/solidProperties/solidPropertiesI.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.C b/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.C index baf20aeba..a36766ade 100644 --- a/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.C +++ b/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H index e84b5a226..fa1505700 100644 --- a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H +++ b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGasI.H b/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGasI.H index a97eb1b4f..e03bbb797 100644 --- a/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGasI.H +++ b/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGasI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/specie/specie/specie.H b/src/thermophysicalModels/specie/specie/specie.H index ffe602dc4..ea76fb242 100644 --- a/src/thermophysicalModels/specie/specie/specie.H +++ b/src/thermophysicalModels/specie/specie/specie.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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/specie/thermo/hExponential/hExponentialThermoI.H b/src/thermophysicalModels/specie/thermo/hExponential/hExponentialThermoI.H index 33e3b31c8..b46543a40 100644 --- a/src/thermophysicalModels/specie/thermo/hExponential/hExponentialThermoI.H +++ b/src/thermophysicalModels/specie/thermo/hExponential/hExponentialThermoI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C index bda645c0f..511e871bf 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H b/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H index f639ffce9..c92082dae 100644 --- a/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H +++ b/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/specie/thermo/thermo/thermo.H b/src/thermophysicalModels/specie/thermo/thermo/thermo.H index 3136307fe..b8e73cf2c 100644 --- a/src/thermophysicalModels/specie/thermo/thermo/thermo.H +++ b/src/thermophysicalModels/specie/thermo/thermo/thermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/specie/thermo/thermo/thermoI.H b/src/thermophysicalModels/specie/thermo/thermo/thermoI.H index 070683638..d897968d1 100644 --- a/src/thermophysicalModels/specie/thermo/thermo/thermoI.H +++ b/src/thermophysicalModels/specie/thermo/thermo/thermoI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/turbulenceModels/Allwmake b/src/turbulenceModels/Allwmake deleted file mode 100755 index 3a95797ba..000000000 --- a/src/turbulenceModels/Allwmake +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Parse arguments for library compilation -targetType=libso -. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -set -x - -LES/Allwmake $targetType $* -incompressible/Allwmake $targetType $* -compressible/Allwmake $targetType $* -wmake $targetType derivedFvPatchFields - -# ----------------------------------------------------------------- end-of-file diff --git a/src/turbulenceModels/LES/Allwmake b/src/turbulenceModels/LES/Allwmake deleted file mode 100755 index a209819d1..000000000 --- a/src/turbulenceModels/LES/Allwmake +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Parse arguments for library compilation -targetType=libso -. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -set -x - -wmakeLnInclude ../incompressible/LES - -wmake $targetType LESfilters -wmake $targetType LESdeltas - -# ----------------------------------------------------------------- end-of-file diff --git a/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C b/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C deleted file mode 100644 index 5a8ff1c3f..000000000 --- a/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C +++ /dev/null @@ -1,138 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "LESdelta.H" -#include "calculatedFvPatchFields.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(LESdelta, 0); - defineRunTimeSelectionTable(LESdelta, dictionary); -} - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::LESdelta::LESdelta(const word& name, const fvMesh& mesh) -: - mesh_(mesh), - delta_ - ( - IOobject - ( - name, - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimensionedScalar(name, dimLength, SMALL), - calculatedFvPatchScalarField::typeName - ) -{} - - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New -( - const word& name, - const fvMesh& mesh, - const dictionary& dict -) -{ - const word deltaType(dict.lookup("delta")); - - Info<< "Selecting LES delta type " << deltaType << endl; - - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(deltaType); - - if (cstrIter == dictionaryConstructorTablePtr_->end()) - { - FatalErrorIn - ( - "LESdelta::New(const fvMesh&, const dictionary&)" - ) << "Unknown LESdelta type " - << deltaType << nl << nl - << "Valid LESdelta types are :" << endl - << dictionaryConstructorTablePtr_->sortedToc() - << exit(FatalError); - } - - return autoPtr<LESdelta>(cstrIter()(name, mesh, dict)); -} - - -Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New -( - const word& name, - const fvMesh& mesh, - const dictionary& dict, - const dictionaryConstructorTable& additionalConstructors -) -{ - const word deltaType(dict.lookup("delta")); - - Info<< "Selecting LES delta type " << deltaType << endl; - - // First on additional ones - dictionaryConstructorTable::const_iterator cstrIter = - additionalConstructors.find(deltaType); - - if (cstrIter != additionalConstructors.end()) - { - return autoPtr<LESdelta>(cstrIter()(name, mesh, dict)); - } - else - { - dictionaryConstructorTable::const_iterator cstrIter = - dictionaryConstructorTablePtr_->find(deltaType); - - if (cstrIter == dictionaryConstructorTablePtr_->end()) - { - FatalErrorIn - ( - "LESdelta::New(const fvMesh&, const dictionary&)" - ) << "Unknown LESdelta type " - << deltaType << nl << nl - << "Valid LESdelta types are :" << endl - << additionalConstructors.sortedToc() - << " and " - << dictionaryConstructorTablePtr_->sortedToc() - << exit(FatalError); - return autoPtr<LESdelta>(); - } - else - { - return autoPtr<LESdelta>(cstrIter()(name, mesh, dict)); - } - } -} - - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.H b/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.H deleted file mode 100644 index c84ae74c3..000000000 --- a/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.H +++ /dev/null @@ -1,160 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::LESdelta - -Description - Abstract base class for LES deltas - -SourceFiles - LESdelta.C - -\*---------------------------------------------------------------------------*/ - -#ifndef LESdelta_H -#define LESdelta_H - -#include "volFields.H" -#include "typeInfo.H" -#include "autoPtr.H" -#include "runTimeSelectionTables.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -class fvMesh; - -/*---------------------------------------------------------------------------*\ - Class LESdelta Declaration -\*---------------------------------------------------------------------------*/ - -class LESdelta -{ - -protected: - - // Protected data - - const fvMesh& mesh_; - - volScalarField delta_; - - -private: - - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - LESdelta(const LESdelta&); - void operator=(const LESdelta&); - - -public: - - //- Runtime type information - TypeName("LESdelta"); - - - // Declare run-time constructor selection table - - declareRunTimeSelectionTable - ( - autoPtr, - LESdelta, - dictionary, - ( - const word& name, - const fvMesh& mesh, - const dictionary& LESdeltaDict - ), - (name, mesh, LESdeltaDict) - ); - - - // Constructors - - //- Construct from name and mesh - LESdelta(const word& name, const fvMesh&); - - - // Selectors - - //- Return a reference to the selected LES delta - static autoPtr<LESdelta> New - ( - const word& name, - const fvMesh&, - const dictionary& - ); - - //- Return a reference to the selected LES delta - static autoPtr<LESdelta> New - ( - const word& name, - const fvMesh&, - const dictionary&, - const dictionaryConstructorTable& - ); - - - //- Destructor - virtual ~LESdelta() - {} - - - // Member Functions - - //- Return mesh reference - const fvMesh& mesh() const - { - return mesh_; - } - - //- Read the LESdelta dictionary - virtual void read(const dictionary&) = 0; - - // Correct values - virtual void correct() = 0; - - - // Member Operators - - virtual operator const volScalarField&() const - { - return delta_; - } -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESdeltas/Make/files b/src/turbulenceModels/LES/LESdeltas/Make/files deleted file mode 100644 index b150cc499..000000000 --- a/src/turbulenceModels/LES/LESdeltas/Make/files +++ /dev/null @@ -1,7 +0,0 @@ -LESdelta/LESdelta.C -cubeRootVolDelta/cubeRootVolDelta.C -PrandtlDelta/PrandtlDelta.C -smoothDelta/smoothDelta.C -maxDeltaxyz/maxDeltaxyz.C - -LIB = $(FOAM_LIBBIN)/libLESdeltas diff --git a/src/turbulenceModels/LES/LESdeltas/Make/options b/src/turbulenceModels/LES/LESdeltas/Make/options deleted file mode 100644 index 6ef95061d..000000000 --- a/src/turbulenceModels/LES/LESdeltas/Make/options +++ /dev/null @@ -1,9 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/LESmodels/isoLESmodels/lnInclude \ - -I$(LIB_SRC)/transportModels/incompressible/lnInclude - -LIB_LIBS = \ - -lfiniteVolume \ - -lmeshTools diff --git a/src/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.C b/src/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.C deleted file mode 100644 index a66e32fe5..000000000 --- a/src/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.C +++ /dev/null @@ -1,102 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "PrandtlDelta.H" -#include "wallDist.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(PrandtlDelta, 0); -addToRunTimeSelectionTable(LESdelta, PrandtlDelta, dictionary); - - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void PrandtlDelta::calcDelta() -{ - delta_ = min - ( - static_cast<const volScalarField&>(geometricDelta_()), - (kappa_/Cdelta_)*wallDist::New(mesh_).y() - ); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -PrandtlDelta::PrandtlDelta -( - const word& name, - const fvMesh& mesh, - const dictionary& dd -) -: - LESdelta(name, mesh), - geometricDelta_(LESdelta::New(name, mesh, dd.subDict(type() + "Coeffs"))), - kappa_(dd.lookupOrDefault<scalar>("kappa", 0.41)), - Cdelta_ - ( - dd.subDict(type() + "Coeffs").lookupOrDefault<scalar>("Cdelta", 0.158) - ) -{ - calcDelta(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void PrandtlDelta::read(const dictionary& d) -{ - const dictionary& dd(d.subDict(type() + "Coeffs")); - - geometricDelta_().read(dd); - d.readIfPresent<scalar>("kappa", kappa_); - dd.readIfPresent<scalar>("Cdelta", Cdelta_); - calcDelta(); -} - - -void PrandtlDelta::correct() -{ - geometricDelta_().correct(); - - if (mesh_.changing()) - { - calcDelta(); - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.H b/src/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.H deleted file mode 100644 index d8840ff1a..000000000 --- a/src/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.H +++ /dev/null @@ -1,110 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::PrandtlDelta - -Description - Simple cube-root of cell volume delta used in LES models. - -SourceFiles - PrandtlDelta.C - -\*---------------------------------------------------------------------------*/ - -#ifndef PrandtlDelta_H -#define PrandtlDelta_H - -#include "LESdelta.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class PrandtlDelta Declaration -\*---------------------------------------------------------------------------*/ - -class PrandtlDelta -: - public LESdelta -{ - // Private data - - autoPtr<LESdelta> geometricDelta_; - scalar kappa_; - scalar Cdelta_; - - - // Private Member Functions - - //- Disallow default bitwise copy construct and assignment - PrandtlDelta(const PrandtlDelta&); - void operator=(const PrandtlDelta&); - - // Calculate the delta values - void calcDelta(); - - -public: - - //- Runtime type information - TypeName("Prandtl"); - - - // Constructors - - //- Construct from name, mesh and IOdictionary - PrandtlDelta - ( - const word& name, - const fvMesh& mesh, - const dictionary& - ); - - - //- Destructor - virtual ~PrandtlDelta() - {} - - - // Member Functions - - //- Read the LESdelta dictionary - virtual void read(const dictionary&); - - // Correct values - virtual void correct(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C b/src/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C deleted file mode 100644 index 0e5e2820d..000000000 --- a/src/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C +++ /dev/null @@ -1,117 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "cubeRootVolDelta.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(cubeRootVolDelta, 0); -addToRunTimeSelectionTable(LESdelta, cubeRootVolDelta, dictionary); - - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void cubeRootVolDelta::calcDelta() -{ - label nD = mesh().nGeometricD(); - - if (nD == 3) - { - delta_.internalField() = deltaCoeff_*pow(mesh().V(), 1.0/3.0); - } - else if (nD == 2) - { - WarningIn("cubeRootVolDelta::calcDelta()") - << "Case is 2D, LES is not strictly applicable\n" - << endl; - - const Vector<label>& directions = mesh().geometricD(); - - scalar thickness = 0.0; - for (direction dir=0; dir<directions.nComponents; dir++) - { - if (directions[dir] == -1) - { - thickness = mesh().bounds().span()[dir]; - break; - } - } - - delta_.internalField() = deltaCoeff_*sqrt(mesh().V()/thickness); - } - else - { - FatalErrorIn("cubeRootVolDelta::calcDelta()") - << "Case is not 3D or 2D, LES is not applicable" - << exit(FatalError); - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -cubeRootVolDelta::cubeRootVolDelta -( - const word& name, - const fvMesh& mesh, - const dictionary& dd -) -: - LESdelta(name, mesh), - deltaCoeff_(readScalar(dd.subDict(type() + "Coeffs").lookup("deltaCoeff"))) -{ - calcDelta(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void cubeRootVolDelta::read(const dictionary& dd) -{ - dd.subDict(type() + "Coeffs").lookup("deltaCoeff") >> deltaCoeff_; - calcDelta(); -} - - -void cubeRootVolDelta::correct() -{ - if (mesh_.changing()) - { - calcDelta(); - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H b/src/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H deleted file mode 100644 index f6abbe7e1..000000000 --- a/src/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H +++ /dev/null @@ -1,108 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::cubeRootVolDelta - -Description - Simple cube-root of cell volume delta used in LES models. - -SourceFiles - cubeRootVolDelta.C - -\*---------------------------------------------------------------------------*/ - -#ifndef cubeRootVolDelta_H -#define cubeRootVolDelta_H - -#include "LESdelta.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class cubeRootVolDelta Declaration -\*---------------------------------------------------------------------------*/ - -class cubeRootVolDelta -: - public LESdelta -{ - // Private data - - scalar deltaCoeff_; - - - // Private Member Functions - - //- Disallow default bitwise copy construct and assignment - cubeRootVolDelta(const cubeRootVolDelta&); - void operator=(const cubeRootVolDelta&); - - // Calculate the delta values - void calcDelta(); - - -public: - - //- Runtime type information - TypeName("cubeRootVol"); - - - // Constructors - - //- Construct from name, mesh and IOdictionary - cubeRootVolDelta - ( - const word& name, - const fvMesh& mesh, - const dictionary& - ); - - - //- Destructor - virtual ~cubeRootVolDelta() - {} - - - // Member Functions - - //- Read the LESdelta dictionary - virtual void read(const dictionary&); - - // Correct values - virtual void correct(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C b/src/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C deleted file mode 100644 index e4bf785fb..000000000 --- a/src/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C +++ /dev/null @@ -1,149 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "maxDeltaxyz.H" -#include "addToRunTimeSelectionTable.H" -#include "surfaceFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(maxDeltaxyz, 0); -addToRunTimeSelectionTable(LESdelta, maxDeltaxyz, dictionary); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void maxDeltaxyz::calcDelta() -{ - label nD = mesh().nGeometricD(); - - tmp<volScalarField> hmax - ( - new volScalarField - ( - IOobject - ( - "hmax", - mesh().time().timeName(), - mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh(), - dimensionedScalar("zrero", dimLength, 0.0) - ) - ); - - const cellList& cells = mesh().cells(); - const vectorField& cellC = mesh().cellCentres(); - const vectorField& faceC = mesh().faceCentres(); - const vectorField faceN(mesh().faceAreas()/mag(mesh().faceAreas())); - - forAll(cells, cellI) - { - scalar deltaMaxTmp = 0.0; - const labelList& cFaces = cells[cellI]; - const point& cc = cellC[cellI]; - - forAll(cFaces, cFaceI) - { - label faceI = cFaces[cFaceI]; - const point& fc = faceC[faceI]; - const vector& n = faceN[faceI]; - - scalar tmp = magSqr(n*(n & (fc - cc))); - if (tmp > deltaMaxTmp) - { - deltaMaxTmp = tmp; - } - } - - hmax()[cellI] = deltaCoeff_*sqrt(deltaMaxTmp); - } - - if (nD == 3) - { - delta_.internalField() = hmax(); - } - else if (nD == 2) - { - WarningIn("maxDeltaxyz::calcDelta()") - << "Case is 2D, LES is not strictly applicable\n" - << endl; - - delta_.internalField() = hmax(); - } - else - { - FatalErrorIn("maxDeltaxyz::calcDelta()") - << "Case is not 3D or 2D, LES is not applicable" - << exit(FatalError); - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -maxDeltaxyz::maxDeltaxyz -( - const word& name, - const fvMesh& mesh, - const dictionary& dd -) -: - LESdelta(name, mesh), - deltaCoeff_(readScalar(dd.subDict(type() + "Coeffs").lookup("deltaCoeff"))) -{ - calcDelta(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void maxDeltaxyz::read(const dictionary& dd) -{ - dd.subDict(type() + "Coeffs").lookup("deltaCoeff") >> deltaCoeff_; - calcDelta(); -} - - -void maxDeltaxyz::correct() -{ - if (mesh_.changing()) - { - calcDelta(); - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.H b/src/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.H deleted file mode 100644 index 05df8af55..000000000 --- a/src/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.H +++ /dev/null @@ -1,113 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::maxDeltaxyz - -Description - Delta calculated by taking the maximum distance between the cell centre - and any face centre. For a regular hex cell, the computed delta will - equate to half of the cell width; accordingly, the deltaCoeff model - coefficient should be set to 2 for this case. - -SourceFiles - maxDeltaxyz.C - -\*---------------------------------------------------------------------------*/ - -#ifndef maxDeltaxyzDelta_H -#define maxDeltaxyzDelta_H - -#include "LESdelta.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class maxDeltaxyz Declaration -\*---------------------------------------------------------------------------*/ - -class maxDeltaxyz -: - public LESdelta -{ - // Private data - - //- Model coefficient - scalar deltaCoeff_; - - - // Private Member Functions - - //- Disallow default bitwise copy construct and assignment - maxDeltaxyz(const maxDeltaxyz&); - void operator=(const maxDeltaxyz&); - - // Calculate the delta values - void calcDelta(); - - -public: - - //- Runtime type information - TypeName("maxDeltaxyz"); - - - // Constructors - - //- Construct from name, mesh and IOdictionary - maxDeltaxyz - ( - const word& name, - const fvMesh& mesh, - const dictionary& - ); - - - //- Destructor - virtual ~maxDeltaxyz() - {} - - - // Member Functions - - //- Read the LESdelta dictionary - virtual void read(const dictionary&); - - // Correct values - virtual void correct(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C b/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C deleted file mode 100644 index 1b28e85a0..000000000 --- a/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C +++ /dev/null @@ -1,197 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "smoothDelta.H" -#include "addToRunTimeSelectionTable.H" -#include "FaceCellWave.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(smoothDelta, 0); -addToRunTimeSelectionTable(LESdelta, smoothDelta, dictionary); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -// Fill changedFaces (with face labels) and changedFacesInfo (with delta) -// This is the initial set of faces from which to start the waves. -// Since there might be lots of places with delta jumps we can follow various -// strategies for this initial 'seed'. -// - start from single cell/face and let FaceCellWave pick up all others -// from there. might be quite a few waves before everything settles. -// - start from all faces. Lots of initial transfers. -// We do something inbetween: -// - start from all faces where there is a jump. Since we cannot easily -// determine this across coupled patches (cyclic, processor) introduce -// all faces of these and let FaceCellWave sort it out. -void smoothDelta::setChangedFaces -( - const polyMesh& mesh, - const volScalarField& delta, - DynamicList<label>& changedFaces, - DynamicList<deltaData>& changedFacesInfo -) -{ - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) - { - scalar ownDelta = delta[mesh.faceOwner()[faceI]]; - - scalar neiDelta = delta[mesh.faceNeighbour()[faceI]]; - - // Check if owner delta much larger than neighbour delta or vice versa - - if (ownDelta > maxDeltaRatio_ * neiDelta) - { - changedFaces.append(faceI); - changedFacesInfo.append(deltaData(ownDelta)); - } - else if (neiDelta > maxDeltaRatio_ * ownDelta) - { - changedFaces.append(faceI); - changedFacesInfo.append(deltaData(neiDelta)); - } - } - - // Insert all faces of coupled patches no matter what. Let FaceCellWave - // sort it out. - forAll(mesh.boundaryMesh(), patchI) - { - const polyPatch& patch = mesh.boundaryMesh()[patchI]; - - if (patch.coupled()) - { - forAll(patch, patchFaceI) - { - label meshFaceI = patch.start() + patchFaceI; - - scalar ownDelta = delta[mesh.faceOwner()[meshFaceI]]; - - changedFaces.append(meshFaceI); - changedFacesInfo.append(deltaData(ownDelta)); - } - } - } - - changedFaces.shrink(); - changedFacesInfo.shrink(); -} - - -void smoothDelta::calcDelta() -{ - const volScalarField& geometricDelta = geometricDelta_(); - - // Fill changed faces with info - DynamicList<label> changedFaces(mesh_.nFaces()/100 + 100); - DynamicList<deltaData> changedFacesInfo(changedFaces.size()); - - setChangedFaces(mesh_, geometricDelta, changedFaces, changedFacesInfo); - - // Set initial field on cells. - List<deltaData> cellDeltaData(mesh_.nCells()); - - forAll(geometricDelta, cellI) - { - cellDeltaData[cellI] = geometricDelta[cellI]; - } - - // Set initial field on faces. - List<deltaData> faceDeltaData(mesh_.nFaces()); - - - // Propagate information over whole domain. - FaceCellWave<deltaData, scalar> deltaCalc - ( - mesh_, - changedFaces, - changedFacesInfo, - faceDeltaData, - cellDeltaData, - mesh_.globalData().nTotalCells()+1, // max iterations - maxDeltaRatio_ - ); - - forAll(delta_, cellI) - { - delta_[cellI] = cellDeltaData[cellI].delta(); - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -smoothDelta::smoothDelta -( - const word& name, - const fvMesh& mesh, - const dictionary& dd -) -: - LESdelta(name, mesh), - geometricDelta_ - ( - LESdelta::New("geometricDelta", mesh, dd.subDict(type() + "Coeffs")) - ), - maxDeltaRatio_ - ( - readScalar(dd.subDict(type() + "Coeffs").lookup("maxDeltaRatio")) - ) -{ - calcDelta(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void smoothDelta::read(const dictionary& d) -{ - const dictionary& dd(d.subDict(type() + "Coeffs")); - - geometricDelta_().read(dd); - dd.lookup("maxDeltaRatio") >> maxDeltaRatio_; - calcDelta(); -} - - -void smoothDelta::correct() -{ - geometricDelta_().correct(); - - if (mesh_.changing()) - { - calcDelta(); - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H b/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H deleted file mode 100644 index e80d09484..000000000 --- a/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H +++ /dev/null @@ -1,290 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::smoothDelta - -Description - Smoothed delta which takes a given simple geometric delta and applies - smoothing to it such that the ratio of deltas between two cells is no - larger than a specified amount, typically 1.15. - -SourceFiles - smoothDelta.C - -\*---------------------------------------------------------------------------*/ - -#ifndef smoothDelta_H -#define smoothDelta_H - -#include "LESdelta.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class smoothDelta Declaration -\*---------------------------------------------------------------------------*/ - -class smoothDelta -: - public LESdelta -{ -public: - - //- Public member class used by mesh-wave to propagate the delta-ratio - class deltaData - { - scalar delta_; - - // Private Member Functions - - //- Update. Gets information from neighbouring face/cell and - // uses this to update itself (if necessary) and return true. - template<class TrackingData> - inline bool update - ( - const deltaData& w2, - const scalar scale, - const scalar tol, - TrackingData& td - ); - - - public: - - // Constructors - - //- Construct null - inline deltaData(); - - //- Construct from delta value - inline deltaData(const scalar delta); - - - // Member Functions - - // Access - - scalar delta() const - { - return delta_; - } - - - // Needed by FaceCellWave - - //- Check whether origin has been changed at all or - // still contains original (invalid) value. - template<class TrackingData> - inline bool valid(TrackingData& td) const; - - //- Check for identical geometrical data. - // Used for cyclics checking. - template<class TrackingData> - inline bool sameGeometry - ( - const polyMesh&, - const deltaData&, - const scalar, - TrackingData& td - ) const; - - //- Convert any absolute coordinates into relative to - // (patch)face centre - template<class TrackingData> - inline void leaveDomain - ( - const polyMesh&, - const polyPatch&, - const label patchFaceI, - const point& faceCentre, - TrackingData& td - ); - - //- Reverse of leaveDomain - template<class TrackingData> - inline void enterDomain - ( - const polyMesh&, - const polyPatch&, - const label patchFaceI, - const point& faceCentre, - TrackingData& td - ); - - //- Apply rotation matrix to any coordinates - template<class TrackingData> - inline void transform - ( - const polyMesh&, - const tensor&, - TrackingData& td - ); - - //- Influence of neighbouring face. - template<class TrackingData> - inline bool updateCell - ( - const polyMesh&, - const label thisCellI, - const label neighbourFaceI, - const deltaData& neighbourInfo, - const scalar tol, - TrackingData& td - ); - - //- Influence of neighbouring cell. - template<class TrackingData> - inline bool updateFace - ( - const polyMesh&, - const label thisFaceI, - const label neighbourCellI, - const deltaData& neighbourInfo, - const scalar tol, - TrackingData& td - ); - - //- Influence of different value on same face. - template<class TrackingData> - inline bool updateFace - ( - const polyMesh&, - const label thisFaceI, - const deltaData& neighbourInfo, - const scalar tol, - TrackingData& td - ); - - //- Same (like operator==) - template<class TrackingData> - inline bool equal(const deltaData&, TrackingData& td) const; - - // Member Operators - - // Needed for List IO - inline bool operator==(const deltaData&) const; - - inline bool operator!=(const deltaData&) const; - - // IOstream Operators - - friend Ostream& operator<< - ( - Ostream& os, - const deltaData& wDist - ) - { - return os << wDist.delta_; - } - - friend Istream& operator>>(Istream& is, deltaData& wDist) - { - return is >> wDist.delta_; - } - }; - - -private: - - // Private data - - autoPtr<LESdelta> geometricDelta_; - scalar maxDeltaRatio_; - - - // Private Member Functions - - //- Disallow default bitwise copy construct and assignment - smoothDelta(const smoothDelta&); - void operator=(const smoothDelta&); - - // Calculate the delta values - void calcDelta(); - - - void setChangedFaces - ( - const polyMesh& mesh, - const volScalarField& delta, - DynamicList<label>& changedFaces, - DynamicList<deltaData>& changedFacesInfo - ); - - -public: - - //- Runtime type information - TypeName("smooth"); - - - // Constructors - - //- Construct from name, mesh and IOdictionary - smoothDelta - ( - const word& name, - const fvMesh& mesh, - const dictionary& - ); - - - //- Destructor - virtual ~smoothDelta() - {} - - - // Member Functions - - //- Read the LESdelta dictionary - virtual void read(const dictionary&); - - // Correct values - virtual void correct(); -}; - - -//- Data associated with deltaData type are contiguous -template<> -inline bool contiguous<smoothDelta::deltaData>() -{ - return true; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "smoothDeltaDeltaDataI.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDeltaDeltaDataI.H b/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDeltaDeltaDataI.H deleted file mode 100644 index 16fbd8b51..000000000 --- a/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDeltaDeltaDataI.H +++ /dev/null @@ -1,227 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -// Update this with w2 if applicable -template<class TrackingData> -inline bool smoothDelta::deltaData::update -( - const smoothDelta::deltaData& w2, - const scalar scale, - const scalar tol, - TrackingData& td -) -{ - if (!valid(td) || (delta_ < VSMALL)) - { - // My delta not set. Take over neighbour. - delta_ = w2.delta()/scale; - - // Something changed. Let caller know. - return true; - } - else if (w2.delta() > (1 + tol)*scale*delta_) - { - // Neighbour is too big for me. Up my delta. - delta_ = w2.delta()/scale; - - // Something changed. Let caller know. - return true; - } - else - { - // Neighbour is not too big for me or change is too small - // Nothing changed. - return false; - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -// Null constructor -inline smoothDelta::deltaData::deltaData() -: - delta_(-GREAT) -{} - - -// Construct from components -inline smoothDelta::deltaData::deltaData(const scalar delta) -: - delta_(delta) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template<class TrackingData> -inline bool smoothDelta::deltaData::valid(TrackingData& td) const -{ - return delta_ > -SMALL; -} - - -// Checks for cyclic faces -template<class TrackingData> -inline bool smoothDelta::deltaData::sameGeometry -( - const polyMesh&, - const deltaData&, - const scalar, - TrackingData& td -) const -{ - return true; -} - - -template<class TrackingData> -inline void smoothDelta::deltaData::leaveDomain -( - const polyMesh&, - const polyPatch&, - const label, - const point&, - TrackingData& td -) -{} - - -template<class TrackingData> -inline void smoothDelta::deltaData::transform -( - const polyMesh&, - const tensor&, - TrackingData& td -) -{} - - -// Update absolute geometric quantities. -template<class TrackingData> -inline void smoothDelta::deltaData::enterDomain -( - const polyMesh&, - const polyPatch&, - const label, - const point&, - TrackingData& td -) -{} - - -// Update this (cellI) with face information. -template<class TrackingData> -inline bool smoothDelta::deltaData::updateCell -( - const polyMesh&, - const label, - const label, - const deltaData& neighbourWallInfo, - const scalar tol, - TrackingData& td -) -{ - // Take over info from face if more than deltaRatio larger. - return update(neighbourWallInfo, td, tol, td); -} - - -// Update this (face) with cell information. -template<class TrackingData> -inline bool smoothDelta::deltaData::updateFace -( - const polyMesh&, - const label, - const label, - const deltaData& neighbourWallInfo, - const scalar tol, - TrackingData& td -) -{ - // Take over information from cell without any scaling (scale = 1.0) - return update(neighbourWallInfo, 1.0, tol, td); -} - - -// Update this (face) with coupled face information. -template<class TrackingData> -inline bool smoothDelta::deltaData::updateFace -( - const polyMesh&, - const label, - const deltaData& neighbourWallInfo, - const scalar tol, - TrackingData& td -) -{ - // Take over information from coupled face without any scaling (scale = 1.0) - return update(neighbourWallInfo, 1.0, tol, td); -} - - -template<class TrackingData> -inline bool smoothDelta::deltaData::equal -( - const deltaData& rhs, - TrackingData& td -) const -{ - return operator==(rhs); -} - - -// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // - -inline bool smoothDelta::deltaData::operator== -( - const deltaData& rhs -) const -{ - return delta_ == rhs.delta(); -} - - -inline bool smoothDelta::deltaData::operator!= -( - const deltaData& rhs -) const -{ - return !(*this == rhs); -} - - -// ************************************************************************* // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C b/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C deleted file mode 100644 index 041453510..000000000 --- a/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C +++ /dev/null @@ -1,67 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "error.H" -#include "LESfilter.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(LESfilter, 0); - defineRunTimeSelectionTable(LESfilter, dictionary); -} - - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -Foam::autoPtr<Foam::LESfilter> Foam::LESfilter::New -( - const fvMesh& mesh, - const dictionary& dict -) -{ - const word filterType(dict.lookup("filter")); - - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(filterType); - - if (cstrIter == dictionaryConstructorTablePtr_->end()) - { - FatalErrorIn - ( - "LESfilter::New(const fvMesh&, const dictionary&)" - ) << "Unknown LESfilter type " - << filterType << nl << nl - << "Valid LESfilter types are :" << endl - << dictionaryConstructorTablePtr_->sortedToc() - << exit(FatalError); - } - - return autoPtr<LESfilter>(cstrIter()(mesh, dict)); -} - - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.H b/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.H deleted file mode 100644 index 410ada068..000000000 --- a/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.H +++ /dev/null @@ -1,158 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::LESfilter - -Description - Abstract class for LES filters - -SourceFiles - LESfilter.C - newFilter.C - -\*---------------------------------------------------------------------------*/ - -#ifndef LESfilter_H -#define LESfilter_H - -#include "volFields.H" -#include "typeInfo.H" -#include "autoPtr.H" -#include "runTimeSelectionTables.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -class fvMesh; - -/*---------------------------------------------------------------------------*\ - Class LESfilter Declaration -\*---------------------------------------------------------------------------*/ - -class LESfilter -{ - // Private data - - const fvMesh& mesh_; - - - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - LESfilter(const LESfilter&); - void operator=(const LESfilter&); - - -public: - - //- Runtime type information - TypeName("LESfilter"); - - - // Declare run-time constructor selection table - - declareRunTimeSelectionTable - ( - autoPtr, - LESfilter, - dictionary, - ( - const fvMesh& mesh, - const dictionary& LESfilterDict - ), - (mesh, LESfilterDict) - ); - - - // Constructors - - //- Construct from components - LESfilter(const fvMesh& mesh) - : - mesh_(mesh) - {} - - - // Selectors - - //- Return a reference to the selected LES filter - static autoPtr<LESfilter> New - ( - const fvMesh&, - const dictionary& - ); - - - //- Destructor - virtual ~LESfilter() - {} - - - // Member Functions - - //- Return mesh reference - const fvMesh& mesh() const - { - return mesh_; - } - - //- Read the LESfilter dictionary - virtual void read(const dictionary&) = 0; - - - // Member Operators - - virtual tmp<volScalarField> operator() - ( - const tmp<volScalarField>& - ) const = 0; - - virtual tmp<volVectorField> operator() - ( - const tmp<volVectorField>& - ) const = 0; - - virtual tmp<volSymmTensorField> operator() - ( - const tmp<volSymmTensorField>& - ) const = 0; - - virtual tmp<volTensorField> operator() - ( - const tmp<volTensorField>& - ) const = 0; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESfilters/Make/files b/src/turbulenceModels/LES/LESfilters/Make/files deleted file mode 100644 index 864b819f3..000000000 --- a/src/turbulenceModels/LES/LESfilters/Make/files +++ /dev/null @@ -1,6 +0,0 @@ -LESfilter/LESfilter.C -simpleFilter/simpleFilter.C -laplaceFilter/laplaceFilter.C -anisotropicFilter/anisotropicFilter.C - -LIB = $(FOAM_LIBBIN)/libLESfilters diff --git a/src/turbulenceModels/LES/LESfilters/Make/options b/src/turbulenceModels/LES/LESfilters/Make/options deleted file mode 100644 index 6d158a432..000000000 --- a/src/turbulenceModels/LES/LESfilters/Make/options +++ /dev/null @@ -1,4 +0,0 @@ -EXE_INC = -I$(LIB_SRC)/finiteVolume/lnInclude - -LIB_LIBS = \ - -lfiniteVolume diff --git a/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C b/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C deleted file mode 100644 index 08ce6197c..000000000 --- a/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C +++ /dev/null @@ -1,239 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "anisotropicFilter.H" -#include "addToRunTimeSelectionTable.H" -#include "zeroGradientFvPatchFields.H" -#include "wallFvPatch.H" -#include "fvc.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(anisotropicFilter, 0); - addToRunTimeSelectionTable(LESfilter, anisotropicFilter, dictionary); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::anisotropicFilter::anisotropicFilter -( - const fvMesh& mesh, - scalar widthCoeff -) -: - LESfilter(mesh), - widthCoeff_(widthCoeff), - coeff_ - ( - IOobject - ( - "anisotropicFilterCoeff", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedVector("zero", dimLength*dimLength, vector::zero), - calculatedFvPatchVectorField::typeName - ) -{ - for (direction d=0; d<vector::nComponents; d++) - { - coeff_.internalField().replace - ( - d, - (1/widthCoeff_)* - sqr - ( - 2.0*mesh.V() - /fvc::surfaceSum(mag(mesh.Sf().component(d)))().internalField() - ) - ); - } -} - - -Foam::anisotropicFilter::anisotropicFilter -( - const fvMesh& mesh, - const dictionary& bd -) -: - LESfilter(mesh), - widthCoeff_(readScalar(bd.subDict(type() + "Coeffs").lookup("widthCoeff"))), - coeff_ - ( - IOobject - ( - "anisotropicFilterCoeff", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedVector("zero", dimLength*dimLength, vector::zero), - calculatedFvPatchScalarField::typeName - ) -{ - for (direction d=0; d<vector::nComponents; d++) - { - coeff_.internalField().replace - ( - d, - (1/widthCoeff_)* - sqr - ( - 2.0*mesh.V() - /fvc::surfaceSum(mag(mesh.Sf().component(d)))().internalField() - ) - ); - } -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::anisotropicFilter::read(const dictionary& bd) -{ - bd.subDict(type() + "Coeffs").lookup("widthCoeff") >> widthCoeff_; -} - - -// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // - -Foam::tmp<Foam::volScalarField> Foam::anisotropicFilter::operator() -( - const tmp<volScalarField>& unFilteredField -) const -{ - tmp<volScalarField> tmpFilteredField = - unFilteredField - + ( - coeff_ - & fvc::surfaceIntegrate - ( - mesh().Sf() - *fvc::snGrad(unFilteredField()) - ) - ); - - unFilteredField.clear(); - - return tmpFilteredField; -} - - -Foam::tmp<Foam::volVectorField> Foam::anisotropicFilter::operator() -( - const tmp<volVectorField>& unFilteredField -) const -{ - tmp<volVectorField> tmpFilteredField = - unFilteredField - + ( - coeff_ - & fvc::surfaceIntegrate - ( - mesh().Sf() - *fvc::snGrad(unFilteredField()) - ) - ); - - unFilteredField.clear(); - - return tmpFilteredField; -} - - -Foam::tmp<Foam::volSymmTensorField> Foam::anisotropicFilter::operator() -( - const tmp<volSymmTensorField>& unFilteredField -) const -{ - tmp<volSymmTensorField> tmpFilteredField - ( - new volSymmTensorField - ( - IOobject - ( - "anisotropicFilteredSymmTensorField", - mesh().time().timeName(), - mesh() - ), - mesh(), - unFilteredField().dimensions() - ) - ); - - for (direction d=0; d<symmTensor::nComponents; d++) - { - tmpFilteredField().replace - ( - d, anisotropicFilter::operator()(unFilteredField().component(d)) - ); - } - - unFilteredField.clear(); - - return tmpFilteredField; -} - - -Foam::tmp<Foam::volTensorField> Foam::anisotropicFilter::operator() -( - const tmp<volTensorField>& unFilteredField -) const -{ - tmp<volTensorField> tmpFilteredField - ( - new volTensorField - ( - IOobject - ( - "anisotropicFilteredTensorField", - mesh().time().timeName(), - mesh() - ), - mesh(), - unFilteredField().dimensions() - ) - ); - - for (direction d=0; d<tensor::nComponents; d++) - { - tmpFilteredField().replace - ( - d, anisotropicFilter::operator()(unFilteredField().component(d)) - ); - } - - unFilteredField.clear(); - - return tmpFilteredField; -} - - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.H b/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.H deleted file mode 100644 index aac332e3a..000000000 --- a/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.H +++ /dev/null @@ -1,131 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::anisotropicFilter - -Description - anisotropic filter - - \verbatim - Kernel as filter as Test filter with ratio 2 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Box filter: g = delta2/24 -> g = delta2/6 - Spherical box filter: g = delta2/64 -> g = delta2/16 - Gaussian filter: g = delta2/24 -> g = delta2/6 - \endverbatim - -SourceFiles - anisotropicFilter.C - -\*---------------------------------------------------------------------------*/ - -#ifndef anisotropicFilter_H -#define anisotropicFilter_H - -#include "LESfilter.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class anisotropicFilter Declaration -\*---------------------------------------------------------------------------*/ - -class anisotropicFilter -: - public LESfilter -{ - // Private data - - scalar widthCoeff_; - volVectorField coeff_; - - - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - anisotropicFilter(const anisotropicFilter&); - void operator=(const anisotropicFilter&); - - -public: - - //- Runtime type information - TypeName("anisotropic"); - - // Constructors - - //- Construct from components - anisotropicFilter(const fvMesh& mesh, scalar widthCoeff); - - //- Construct from IOdictionary - anisotropicFilter(const fvMesh& mesh, const dictionary&); - - - //- Destructor - virtual ~anisotropicFilter() - {} - - - // Member Functions - - //- Read the LESfilter dictionary - virtual void read(const dictionary&); - - - // Member Operators - - virtual tmp<volScalarField> operator() - ( - const tmp<volScalarField>& - ) const; - - virtual tmp<volVectorField> operator() - ( - const tmp<volVectorField>& - ) const; - - virtual tmp<volSymmTensorField> operator() - ( - const tmp<volSymmTensorField>& - ) const; - - virtual tmp<volTensorField> operator() - ( - const tmp<volTensorField>& - ) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C b/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C deleted file mode 100644 index 24db120ff..000000000 --- a/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C +++ /dev/null @@ -1,151 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "laplaceFilter.H" -#include "addToRunTimeSelectionTable.H" -#include "calculatedFvPatchFields.H" -#include "fvm.H" -#include "fvc.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(laplaceFilter, 0); - addToRunTimeSelectionTable(LESfilter, laplaceFilter, dictionary); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::laplaceFilter::laplaceFilter(const fvMesh& mesh, scalar widthCoeff) -: - LESfilter(mesh), - widthCoeff_(widthCoeff), - coeff_ - ( - IOobject - ( - "laplaceFilterCoeff", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedScalar("zero", dimLength*dimLength, 0), - calculatedFvPatchScalarField::typeName - ) -{ - coeff_.dimensionedInternalField() = pow(mesh.V(), 2.0/3.0)/widthCoeff_; -} - - -Foam::laplaceFilter::laplaceFilter(const fvMesh& mesh, const dictionary& bd) -: - LESfilter(mesh), - widthCoeff_(readScalar(bd.subDict(type() + "Coeffs").lookup("widthCoeff"))), - coeff_ - ( - IOobject - ( - "laplaceFilterCoeff", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedScalar("zero", dimLength*dimLength, 0), - calculatedFvPatchScalarField::typeName - ) -{ - coeff_.dimensionedInternalField() = pow(mesh.V(), 2.0/3.0)/widthCoeff_; -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::laplaceFilter::read(const dictionary& bd) -{ - bd.subDict(type() + "Coeffs").lookup("widthCoeff") >> widthCoeff_; -} - - -// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // - -Foam::tmp<Foam::volScalarField> Foam::laplaceFilter::operator() -( - const tmp<volScalarField>& unFilteredField -) const -{ - tmp<volScalarField> filteredField = - unFilteredField() + fvc::laplacian(coeff_, unFilteredField()); - - unFilteredField.clear(); - - return filteredField; -} - - -Foam::tmp<Foam::volVectorField> Foam::laplaceFilter::operator() -( - const tmp<volVectorField>& unFilteredField -) const -{ - tmp<volVectorField> filteredField = - unFilteredField() + fvc::laplacian(coeff_, unFilteredField()); - - unFilteredField.clear(); - - return filteredField; -} - - -Foam::tmp<Foam::volSymmTensorField> Foam::laplaceFilter::operator() -( - const tmp<volSymmTensorField>& unFilteredField -) const -{ - tmp<volSymmTensorField> filteredField = - unFilteredField() + fvc::laplacian(coeff_, unFilteredField()); - - unFilteredField.clear(); - - return filteredField; -} - - -Foam::tmp<Foam::volTensorField> Foam::laplaceFilter::operator() -( - const tmp<volTensorField>& unFilteredField -) const -{ - tmp<volTensorField> filteredField = - unFilteredField() + fvc::laplacian(coeff_, unFilteredField()); - - unFilteredField.clear(); - - return filteredField; -} - - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H b/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H deleted file mode 100644 index bb7ad27ee..000000000 --- a/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H +++ /dev/null @@ -1,132 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::laplaceFilter - -Description - Laplace filter for LES - - \verbatim - Kernel as filter as Test filter with ratio 2 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Box filter: g = delta2/24 -> g = delta2/6 - Spherical box filter: g = delta2/64 -> g = delta2/16 - Gaussian filter: g = delta2/24 -> g = delta2/6 - \endverbatim - -SourceFiles - laplaceFilter.C - -\*---------------------------------------------------------------------------*/ - -#ifndef laplaceFilter_H -#define laplaceFilter_H - -#include "LESfilter.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class laplaceFilter Declaration -\*---------------------------------------------------------------------------*/ - -class laplaceFilter -: - public LESfilter -{ - // Private data - - scalar widthCoeff_; - volScalarField coeff_; - - - // Private Member Functions - - //- Disallow default bitwise copy construct and assignment - laplaceFilter(const laplaceFilter&); - void operator=(const laplaceFilter&); - - -public: - - //- Runtime type information - TypeName("laplace"); - - - // Constructors - - //- Construct from components - laplaceFilter(const fvMesh& mesh, scalar widthCoeff); - - //- Construct from IOdictionary - laplaceFilter(const fvMesh& mesh, const dictionary&); - - - //- Destructor - virtual ~laplaceFilter() - {} - - - // Member Functions - - //- Read the LESfilter dictionary - virtual void read(const dictionary&); - - - // Member Operators - - virtual tmp<volScalarField> operator() - ( - const tmp<volScalarField>& - ) const; - - virtual tmp<volVectorField> operator() - ( - const tmp<volVectorField>& - ) const; - - virtual tmp<volSymmTensorField> operator() - ( - const tmp<volSymmTensorField>& - ) const; - - virtual tmp<volTensorField> operator() - ( - const tmp<volTensorField>& - ) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.C b/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.C deleted file mode 100644 index d3140fddc..000000000 --- a/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.C +++ /dev/null @@ -1,128 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "simpleFilter.H" -#include "addToRunTimeSelectionTable.H" -#include "fvc.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(simpleFilter, 0); - addToRunTimeSelectionTable(LESfilter, simpleFilter, dictionary); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::simpleFilter::simpleFilter -( - const fvMesh& mesh -) -: - LESfilter(mesh) -{} - - -Foam::simpleFilter::simpleFilter(const fvMesh& mesh, const dictionary&) -: - LESfilter(mesh) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::simpleFilter::read(const dictionary&) -{} - - -// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // - -Foam::tmp<Foam::volScalarField> Foam::simpleFilter::operator() -( - const tmp<volScalarField>& unFilteredField -) const -{ - tmp<volScalarField> filteredField = fvc::surfaceSum - ( - mesh().magSf()*fvc::interpolate(unFilteredField) - )/fvc::surfaceSum(mesh().magSf()); - - unFilteredField.clear(); - - return filteredField; -} - - -Foam::tmp<Foam::volVectorField> Foam::simpleFilter::operator() -( - const tmp<volVectorField>& unFilteredField -) const -{ - tmp<volVectorField> filteredField = fvc::surfaceSum - ( - mesh().magSf()*fvc::interpolate(unFilteredField) - )/fvc::surfaceSum(mesh().magSf()); - - unFilteredField.clear(); - - return filteredField; -} - - -Foam::tmp<Foam::volSymmTensorField> Foam::simpleFilter::operator() -( - const tmp<volSymmTensorField>& unFilteredField -) const -{ - tmp<volSymmTensorField> filteredField = fvc::surfaceSum - ( - mesh().magSf()*fvc::interpolate(unFilteredField) - )/fvc::surfaceSum(mesh().magSf()); - - unFilteredField.clear(); - - return filteredField; -} - - -Foam::tmp<Foam::volTensorField> Foam::simpleFilter::operator() -( - const tmp<volTensorField>& unFilteredField -) const -{ - tmp<volTensorField> filteredField = fvc::surfaceSum - ( - mesh().magSf()*fvc::interpolate(unFilteredField) - )/fvc::surfaceSum(mesh().magSf()); - - unFilteredField.clear(); - - return filteredField; -} - - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H b/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H deleted file mode 100644 index f14af21b2..000000000 --- a/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H +++ /dev/null @@ -1,121 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::simpleFilter - -Description - Simple top-hat filter used in dynamic LES models. - - Implemented as a surface integral of the face interpolate of the field. - -SourceFiles - simpleFilter.C - -\*---------------------------------------------------------------------------*/ - -#ifndef simpleFilter_H -#define simpleFilter_H - -#include "LESfilter.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class simpleFilter Declaration -\*---------------------------------------------------------------------------*/ - -class simpleFilter -: - public LESfilter - -{ - // Private Member Functions - - //- Disallow default bitwise copy construct and assignment - simpleFilter(const simpleFilter&); - void operator=(const simpleFilter&); - - -public: - - //- Runtime type information - TypeName("simple"); - - - // Constructors - - //- Construct from components - simpleFilter(const fvMesh& mesh); - - //- Construct from IOdictionary - simpleFilter(const fvMesh& mesh, const dictionary&); - - - //- Destructor - virtual ~simpleFilter() - {} - - - // Member Functions - - //- Read the LESfilter dictionary - virtual void read(const dictionary&); - - - // Member Operators - - virtual tmp<volScalarField> operator() - ( - const tmp<volScalarField>& - ) const; - - virtual tmp<volVectorField> operator() - ( - const tmp<volVectorField>& - ) const; - - virtual tmp<volSymmTensorField> operator() - ( - const tmp<volSymmTensorField>& - ) const; - - virtual tmp<volTensorField> operator() - ( - const tmp<volTensorField>& - ) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/Allwmake b/src/turbulenceModels/compressible/Allwmake deleted file mode 100755 index ec2033465..000000000 --- a/src/turbulenceModels/compressible/Allwmake +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Parse arguments for library compilation -targetType=libso -. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -set -x - -wmake $targetType turbulenceModel -wmake $targetType RAS -wmake $targetType LES - -# ----------------------------------------------------------------- end-of-file diff --git a/src/turbulenceModels/compressible/LES/DESModel/DESModel.C b/src/turbulenceModels/compressible/LES/DESModel/DESModel.C deleted file mode 100644 index 74873f49e..000000000 --- a/src/turbulenceModels/compressible/LES/DESModel/DESModel.C +++ /dev/null @@ -1,57 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "DESModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * * // - -DESModel::DESModel -( - const word& type, - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName -) -: - LESModel(type, rho, U, phi, thermoPhysicalModel, turbulenceModelName) - -{} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/DESModel/DESModelDoc.H b/src/turbulenceModels/compressible/LES/DESModel/DESModelDoc.H deleted file mode 100644 index e9deb3208..000000000 --- a/src/turbulenceModels/compressible/LES/DESModel/DESModelDoc.H +++ /dev/null @@ -1,32 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -\defgroup grpCmpDESTurbulence Compressible DES turbulence -@{ - \ingroup grpCmpTurbulence - This group contains compressible DES models. -@} - -\*---------------------------------------------------------------------------*/ diff --git a/src/turbulenceModels/compressible/LES/DeardorffDiffStress/DeardorffDiffStress.C b/src/turbulenceModels/compressible/LES/DeardorffDiffStress/DeardorffDiffStress.C deleted file mode 100644 index 6d724be63..000000000 --- a/src/turbulenceModels/compressible/LES/DeardorffDiffStress/DeardorffDiffStress.C +++ /dev/null @@ -1,166 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "DeardorffDiffStress.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(DeardorffDiffStress, 0); -addToRunTimeSelectionTable(LESModel, DeardorffDiffStress, dictionary); - - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void DeardorffDiffStress::updateSubGridScaleFields(const volScalarField& K) -{ - muSgs_ = ck_*rho()*sqrt(K)*delta(); - muSgs_.correctBoundaryConditions(); - - alphaSgs_ = muSgs_/Prt_; - alphaSgs_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -DeardorffDiffStress::DeardorffDiffStress -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, rho, U, phi, thermoPhysicalModel, turbulenceModelName), - GenSGSStress(rho, U, phi, thermoPhysicalModel), - - ck_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "ck", - coeffDict_, - 0.094 - ) - ), - cm_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "cm", - coeffDict_, - 4.13 - ) - ) -{ - updateSubGridScaleFields(0.5*tr(B_)); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void DeardorffDiffStress::correct(const tmp<volTensorField>& tgradU) -{ - const volTensorField& gradU = tgradU(); - - GenSGSStress::correct(gradU); - - volSymmTensorField D(symm(gradU)); - - volSymmTensorField P(-rho()*twoSymm(B_ & gradU)); - - volScalarField K(0.5*tr(B_)); - - tmp<fvSymmTensorMatrix> BEqn - ( - fvm::ddt(rho(), B_) - + fvm::div(phi(), B_) - - fvm::laplacian(DBEff(), B_) - + fvm::Sp(cm_*rho()*sqrt(K)/delta(), B_) - == - P - + 0.8*rho()*K*D - - (2*ce_ - 0.667*cm_)*I*rho()*epsilon() - ); - - BEqn().relax(); - BEqn().solve(); - - // Bounding the component kinetic energies - - forAll(B_, celli) - { - B_[celli].component(symmTensor::XX) = - max(B_[celli].component(symmTensor::XX), 1.0e-10); - B_[celli].component(symmTensor::YY) = - max(B_[celli].component(symmTensor::YY), 1.0e-10); - B_[celli].component(symmTensor::ZZ) = - max(B_[celli].component(symmTensor::ZZ), 1.0e-10); - } - - K = 0.5*tr(B_); - bound(K, kMin_); - - updateSubGridScaleFields(K); -} - - -bool DeardorffDiffStress::read() -{ - if (GenSGSStress::read()) - { - ck_.readIfPresent(coeffDict()); - cm_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/DeardorffDiffStress/DeardorffDiffStress.H b/src/turbulenceModels/compressible/LES/DeardorffDiffStress/DeardorffDiffStress.H deleted file mode 100644 index f84c00f5d..000000000 --- a/src/turbulenceModels/compressible/LES/DeardorffDiffStress/DeardorffDiffStress.H +++ /dev/null @@ -1,150 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::LESModels::DeardorffDiffStress - -Group - grpCmpLESTurbulence - -Description - Differential SGS Stress Equation Model for compressible flows - - The DSEM uses a model version of the full balance equation for the SGS - stress tensor to simulate the behaviour of B. - Thus, - \verbatim - d/dt(rho*B) + div(rho*U*B) - div(muSgs*grad(B)) - = - P - - c1*rho*epsilon/k*B - - 0.667*(1 - c1)*rho*epsilon*I - - c2*(P - 0.333*trP*I) - - where - - k = 0.5*trB, - epsilon = ce*k^3/2/delta, - epsilon/k = ce*k^1/2/delta - P = -rho*(B'L + L'B) - muSgs = ck*rho*sqrt(k)*delta - muEff = muSgs + mu - \endverbatim - -SourceFiles - DeardorffDiffStress.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleDeardorffDiffStress_H -#define compressibleDeardorffDiffStress_H - -#include "GenSGSStress.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class DeardorffDiffStress Declaration -\*---------------------------------------------------------------------------*/ - -class DeardorffDiffStress -: - public GenSGSStress -{ - // Private data - - dimensionedScalar ck_; - dimensionedScalar cm_; - - - // Private Member Functions - - //- Update sub-grid scale fields - void updateSubGridScaleFields(const volScalarField& K); - - // Disallow default bitwise copy construct and assignment - DeardorffDiffStress(const DeardorffDiffStress&); - DeardorffDiffStress& operator=(const DeardorffDiffStress&); - - -public: - - //- Runtime type information - TypeName("DeardorffDiffStress"); - - // Constructors - - //- Constructor from components - DeardorffDiffStress - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~DeardorffDiffStress() - {} - - - // Member Functions - - //- Return the effective diffusivity for B - tmp<volScalarField> DBEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DBEff", muSgs_ + mu()) - ); - } - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.C b/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.C deleted file mode 100644 index d6ceef848..000000000 --- a/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.C +++ /dev/null @@ -1,157 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "GenEddyVisc.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameWithName(GenEddyVisc, "GenEddyVisc"); - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -GenEddyVisc::GenEddyVisc -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, rho, U, phi, thermoPhysicalModel, turbulenceModelName), - - ce_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "ce", - coeffDict_, - 1.048 - ) - ), - - Prt_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Prt", - coeffDict_, - 1.0 - ) - ), - - muSgs_ - ( - IOobject - ( - "muSgs", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - alphaSgs_ - ( - IOobject - ( - "alphaSgs", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ) -{ -// printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> GenEddyVisc::B() const -{ - return ((2.0/3.0)*I)*k() - (muSgs_/rho())*dev(twoSymm(fvc::grad(U()))); -} - - -tmp<volSymmTensorField> GenEddyVisc::devRhoBeff() const -{ - return -muEff()*dev(twoSymm(fvc::grad(U()))); -} - - -tmp<fvVectorMatrix> GenEddyVisc::divDevRhoBeff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U)))) - ); -} - - -void GenEddyVisc::correct(const tmp<volTensorField>& gradU) -{ - LESModel::correct(gradU); -} - - -bool GenEddyVisc::read() -{ - if (LESModel::read()) - { - ce_.readIfPresent(coeffDict()); - Prt_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H b/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H deleted file mode 100644 index d4af6e5e2..000000000 --- a/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H +++ /dev/null @@ -1,172 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::LESModels::GenEddyVisc - -Group - grpCmpLESTurbulence - -Description - General base class for all compressible models that can be implemented as - an eddy viscosity, i.e. algebraic and one-equation models. - - Contains fields for k (SGS turbulent kinetic energy), gamma - (modelled viscosity) and epsilon (SGS dissipation). - -SourceFiles - GenEddyVisc.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleGenEddyVisc_H -#define compressibleGenEddyVisc_H - -#include "LESModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class GenEddyVisc Declaration -\*---------------------------------------------------------------------------*/ - -class GenEddyVisc -: - virtual public LESModel -{ - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - GenEddyVisc(const GenEddyVisc&); - GenEddyVisc& operator=(const GenEddyVisc&); - - -protected: - - // Model coefficients - - dimensionedScalar ce_; - dimensionedScalar Prt_; - - - // Fields - - volScalarField muSgs_; - volScalarField alphaSgs_; - - -public: - - //- Partial Runtime type information - static const word typeName; - - // Constructors - - //- Construct from components - GenEddyVisc - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~GenEddyVisc() - {} - - - // Member Functions - - //- Return sub-grid disipation rate - virtual tmp<volScalarField> epsilon() const - { - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ce_*k()*sqrt(k())/delta() - ) - ); - } - - //- Return viscosity - virtual tmp<volScalarField> muSgs() const - { - return muSgs_; - } - - //- Return thermal diffusivity - virtual tmp<volScalarField> alphaSgs() const - { - return alphaSgs_; - } - - //- Return the sub-grid stress tensor. - virtual tmp<volSymmTensorField> B() const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devRhoBeff() const; - - //- Returns div(rho*dev(B)). - // This is the additional term due to the filtering of the NSE. - virtual tmp<fvVectorMatrix> divDevRhoBeff(volVectorField& U) const; - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.C b/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.C deleted file mode 100644 index f643e2c4b..000000000 --- a/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.C +++ /dev/null @@ -1,178 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "GenSGSStress.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameWithName(GenSGSStress, "GenSGSStress"); - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -GenSGSStress::GenSGSStress -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, rho, U, phi, thermoPhysicalModel, turbulenceModelName), - - ce_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "ce", - coeffDict_, - 1.048 - ) - ), - - Prt_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Prt", - coeffDict_, - 1.0 - ) - ), - - B_ - ( - IOobject - ( - "B", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - muSgs_ - ( - IOobject - ( - "muSgs", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - alphaSgs_ - ( - IOobject - ( - "alphaSgs", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> GenSGSStress::devRhoBeff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - rho()*B_ - mu()*dev(twoSymm(fvc::grad(U()))) - ) - ); -} - - -tmp<fvVectorMatrix> GenSGSStress::divDevRhoBeff(volVectorField& U) const -{ - return - ( - fvc::div(rho()*B_ + 0.05*muSgs_*fvc::grad(U)) - + fvc::laplacian(0.95*muSgs_, U, "laplacian(muEff,U)") - - fvm::laplacian(muEff(), U) - - fvc::div(mu()*dev2(T(fvc::grad(U)))) - ); -} - - -void GenSGSStress::correct(const tmp<volTensorField>& gradU) -{ - LESModel::correct(gradU); -} - - -bool GenSGSStress::read() -{ - if (LESModel::read()) - { - ce_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.H b/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.H deleted file mode 100644 index 44eef6da8..000000000 --- a/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.H +++ /dev/null @@ -1,198 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::LESModels::GenSGSStress - -Group - grpCmpLESTurbulence - -Description - General base class for all compressible models that directly - solve for the SGS stress tensor B. - - Contains tensor fields B (the SGS stress tensor) as well as scalar - fields for k (SGS turbulent energy) gamma (SGS viscosity) and epsilon - (SGS dissipation). - -SourceFiles - GenSGSStress.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleGenSGSStress_H -#define compressibleGenSGSStress_H - -#include "LESModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class GenSGSStress Declaration -\*---------------------------------------------------------------------------*/ - -class GenSGSStress -: - virtual public LESModel -{ - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - GenSGSStress(const GenSGSStress&); - GenSGSStress& operator=(const GenSGSStress&); - - -protected: - - // Model coefficients - - dimensionedScalar ce_; - dimensionedScalar Prt_; - - // Fields - - volSymmTensorField B_; - volScalarField muSgs_; - volScalarField alphaSgs_; - - -public: - - //- Partial Runtime type information - static const word typeName; - - // Constructors - - //- Constructor from components - GenSGSStress - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~GenSGSStress() - {} - - - // Member Functions - - //- Return the SGS turbulent kinetic energy - virtual tmp<volScalarField> k() const - { - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - 0.5*tr(B_) - ) - ); - } - - //- Return the SGS turbulent dissipation - virtual tmp<volScalarField> epsilon() const - { - const volScalarField K(k()); - - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ce_*K*sqrt(K)/delta() - ) - ); - } - - //- Return the SGS viscosity - virtual tmp<volScalarField> muSgs() const - { - return muSgs_; - } - - //- Return the SGS thermal diffusivity - virtual tmp<volScalarField> alphaSgs() const - { - return alphaSgs_; - } - - //- Return the sub-grid stress tensor - virtual tmp<volSymmTensorField> B() const - { - return B_; - } - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devRhoBeff() const; - - //- Returns divergence of B : i.e. the additional term in the - // filtered NSE - virtual tmp<fvVectorMatrix> divDevRhoBeff(volVectorField& U) const; - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C deleted file mode 100644 index 0a338e290..000000000 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C +++ /dev/null @@ -1,209 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "LESModel.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(LESModel, 0); -defineRunTimeSelectionTable(LESModel, dictionary); -addToRunTimeSelectionTable(turbulenceModel, LESModel, turbulenceModel); - -// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // - -void LESModel::printCoeffs() -{ - if (printCoeffs_) - { - Info<< type() << "Coeffs" << coeffDict_ << endl; - } -} - - -// * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * * // - -LESModel::LESModel -( - const word& type, - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName -) -: - turbulenceModel(rho, U, phi, thermoPhysicalModel, turbulenceModelName), - - IOdictionary - ( - IOobject - ( - "LESProperties", - U.time().constant(), - U.db(), - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) - ), - - printCoeffs_(lookupOrDefault<Switch>("printCoeffs", false)), - coeffDict_(subOrEmptyDict(type + "Coeffs")), - - kMin_("kMin", sqr(dimVelocity), SMALL), - - delta_(LESdelta::New("delta", U.mesh(), *this)) -{ - kMin_.readIfPresent(*this); - - // Force the construction of the mesh deltaCoeffs which may be needed - // for the construction of the derived models and BCs - mesh_.deltaCoeffs(); -} - - -// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // - -autoPtr<LESModel> LESModel::New -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName -) -{ - // get model name, but do not register the dictionary - // otherwise it is registered in the database twice - const word modelType - ( - IOdictionary - ( - IOobject - ( - "LESProperties", - U.time().constant(), - U.db(), - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) - ).lookup("LESModel") - ); - - Info<< "Selecting LES turbulence model " << modelType << endl; - - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); - - if (cstrIter == dictionaryConstructorTablePtr_->end()) - { - FatalErrorIn - ( - "LESModel::New" - "(" - "const volScalarField&, " - "const volVectorField&, " - "const surfaceScalarField&, " - "const fluidThermo&, " - "const word&" - ")" - ) << "Unknown LESModel type " - << modelType << nl << nl - << "Valid LESModel types:" << endl - << dictionaryConstructorTablePtr_->sortedToc() - << exit(FatalError); - } - - return autoPtr<LESModel> - ( - cstrIter()(rho, U, phi, thermoPhysicalModel, turbulenceModelName) - ); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void LESModel::correct(const tmp<volTensorField>&) -{ - turbulenceModel::correct(); - delta_().correct(); -} - - -void LESModel::correct() -{ - correct(fvc::grad(U_)); -} - - -bool LESModel::read() -{ - // Bit of trickery : we are both IOdictionary ('RASProperties') and - // an regIOobject (from the turbulenceModel). Problem is to distinguish - // between the two - we only want to reread the IOdictionary. - - bool ok = IOdictionary::readData - ( - IOdictionary::readStream - ( - IOdictionary::type() - ) - ); - IOdictionary::close(); - - if (ok) - { - if (const dictionary* dictPtr = subDictPtr(type() + "Coeffs")) - { - coeffDict_ <<= *dictPtr; - } - - kMin_.readIfPresent(*this); - - delta_().read(*this); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H deleted file mode 100644 index 5b4cc39fc..000000000 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H +++ /dev/null @@ -1,304 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Namespace - Foam::compressible::LESModels - -Group - grpCmpLESTurbulence - -Description - Namespace for compressible LES models. - -Class - Foam::compressible::LESModel - -Description - Base class for all compressible flow LES SGS models. - - This class defines the basic interface for a compressible flow SGS - model, and encapsulates data of value to all possible models. - In particular this includes references to all the dependent fields - (rho, U, phi), the physical viscosity mu, and the LESProperties - dictionary, which contains the model selection and model coefficients. - -SourceFiles - LESModel.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleLESModel_H -#define compressibleLESModel_H - -#include "compressible/turbulenceModel/turbulenceModel.H" -#include "compressible/LES/compressibleLESdelta/compressibleLESdelta.H" -#include "fvm.H" -#include "fvc.H" -#include "fvMatrices.H" -#include "fluidThermo.H" -#include "bound.H" -#include "autoPtr.H" -#include "runTimeSelectionTables.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class LESModel Declaration -\*---------------------------------------------------------------------------*/ - -class LESModel -: - public turbulenceModel, - public IOdictionary -{ - -protected: - - // Protected data - - Switch printCoeffs_; - dictionary coeffDict_; - - dimensionedScalar kMin_; - - autoPtr<Foam::LESdelta> delta_; - - - // Protected Member Functions - - //- Print model coefficients - virtual void printCoeffs(); - - -private: - - // Private Member Functions - - //- Disallow default bitwise copy construct - LESModel(const LESModel&); - - //- Disallow default bitwise assignment - LESModel& operator=(const LESModel&); - - -public: - - //- Runtime type information - TypeName("LESModel"); - - - // Declare run-time constructor selection table - - declareRunTimeSelectionTable - ( - autoPtr, - LESModel, - dictionary, - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName - ), - (rho, U, phi, thermoPhysicalModel, turbulenceModelName) - ); - - - // Constructors - - //- Construct from components - LESModel - ( - const word& type, - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName - ); - - - // Selectors - - //- Return a reference to the selected LES model - static autoPtr<LESModel> New - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName - ); - - - //- Destructor - virtual ~LESModel() - {} - - - // Member Functions - - // Access - - //- Const access to the coefficients dictionary, - // which provides info. about choice of models, - // and all related data (particularly model coefficients). - virtual const dictionary& coeffDict() const - { - return coeffDict_; - } - - //- Return the lower allowable limit for k (default: SMALL) - const dimensionedScalar& kMin() const - { - return kMin_; - } - - //- Allow kMin to be changed - dimensionedScalar& kMin() - { - return kMin_; - } - - //- Access function to filter width - inline const volScalarField& delta() const - { - return delta_(); - } - - - //- Return the SGS turbulent viscosity - virtual tmp<volScalarField> muSgs() const = 0; - - //- Return the effective viscosity - virtual tmp<volScalarField> muEff() const - { - return tmp<volScalarField> - ( - new volScalarField("muEff", muSgs() + mu()) - ); - } - - //- Return the SGS turbulent thermal diffusivity - virtual tmp<volScalarField> alphaSgs() const = 0; - - //- Return the effective turbulent temperature diffusivity - virtual tmp<volScalarField> kappaEff() const - { - return thermo().kappaEff(alphaSgs()); - } - - //- Return the effective turbulent temperature diffusivity for a patch - virtual tmp<scalarField> kappaEff(const label patchI) const - { - return - thermo().kappaEff(alphaSgs()().boundaryField()[patchI], patchI); - } - - //- Return the effective thermal diffusivity - virtual tmp<volScalarField> alphaEff() const - { - return thermo().alphaEff(alphaSgs()); - } - - //- Return the effective turbulence thermal diffusivity for a patch - virtual tmp<scalarField> alphaEff(const label patchI) const - { - return - thermo().alphaEff(alphaSgs()().boundaryField()[patchI], patchI); - } - - //- Return the sub-grid stress tensor. - virtual tmp<volSymmTensorField> B() const = 0; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devRhoBeff() const = 0; - - //- Returns div(rho*dev(B)). - // This is the additional term due to the filtering of the NSE. - virtual tmp<fvVectorMatrix> divDevRhoBeff(volVectorField& U) const = 0; - - - // RAS compatibility functions for the turbulenceModel base class - - //- Return the turbulence viscosity - virtual tmp<volScalarField> mut() const - { - return muSgs(); - } - - //- Return the turbulence thermal diffusivity - virtual tmp<volScalarField> alphat() const - { - return alphaSgs(); - } - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const - { - return B(); - } - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devRhoReff() const - { - return devRhoBeff(); - } - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const - { - return divDevRhoBeff(U); - } - - - //- Correct Eddy-Viscosity and related properties. - // This calls correct(const tmp<volTensorField>& gradU) by supplying - // gradU calculated locally. - virtual void correct(); - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModelDoc.H b/src/turbulenceModels/compressible/LES/LESModel/LESModelDoc.H deleted file mode 100644 index ac8c52e36..000000000 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModelDoc.H +++ /dev/null @@ -1,32 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -\defgroup grpCmpLESTurbulence Compressible LES turbulence -@{ - \ingroup grpCmpTurbulence - This group contains compressible LES models. -@} - -\*---------------------------------------------------------------------------*/ diff --git a/src/turbulenceModels/compressible/LES/Make/files b/src/turbulenceModels/compressible/LES/Make/files deleted file mode 100644 index 58e748577..000000000 --- a/src/turbulenceModels/compressible/LES/Make/files +++ /dev/null @@ -1,16 +0,0 @@ -LESModel/LESModel.C -DESModel/DESModel.C -GenEddyVisc/GenEddyVisc.C -GenSGSStress/GenSGSStress.C - -Smagorinsky/Smagorinsky.C -oneEqEddy/oneEqEddy.C -lowReOneEqEddy/lowReOneEqEddy.C -homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C -DeardorffDiffStress/DeardorffDiffStress.C -SpalartAllmaras/SpalartAllmaras.C - -compressibleLESdelta/compressibleLESdelta.C -vanDriestDelta/vanDriestDelta.C - -LIB = $(FOAM_LIBBIN)/libcompressibleLESModels diff --git a/src/turbulenceModels/compressible/LES/Make/options b/src/turbulenceModels/compressible/LES/Make/options deleted file mode 100644 index 5f392cebf..000000000 --- a/src/turbulenceModels/compressible/LES/Make/options +++ /dev/null @@ -1,14 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES/LESfilters/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -LIB_LIBS = \ - -lcompressibleTurbulenceModel \ - -lLESdeltas \ - -lLESfilters \ - -lfiniteVolume \ - -lmeshTools diff --git a/src/turbulenceModels/compressible/LES/Smagorinsky/Smagorinsky.C b/src/turbulenceModels/compressible/LES/Smagorinsky/Smagorinsky.C deleted file mode 100644 index 89719bb7e..000000000 --- a/src/turbulenceModels/compressible/LES/Smagorinsky/Smagorinsky.C +++ /dev/null @@ -1,125 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "Smagorinsky.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(Smagorinsky, 0); -addToRunTimeSelectionTable(LESModel, Smagorinsky, dictionary); - - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void Smagorinsky::updateSubGridScaleFields(const volTensorField& gradU) -{ - volSymmTensorField D(symm(gradU)); - - volScalarField a(ce_/delta()); - volScalarField b((2.0/3.0)*tr(D)); - volScalarField c(2*ck_*delta()*(dev(D) && D)); - - volScalarField k(sqr((-b + sqrt(sqr(b) + 4*a*c))/(2*a))); - - muSgs_ = ck_*rho()*delta()*sqrt(k); - muSgs_.correctBoundaryConditions(); - - alphaSgs_ = muSgs_/Prt_; - alphaSgs_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Smagorinsky::Smagorinsky -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, rho, U, phi, thermoPhysicalModel, turbulenceModelName), - GenEddyVisc(rho, U, phi, thermoPhysicalModel), - - ck_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "ck", - coeffDict_, - 0.02 - ) - ) -{ - updateSubGridScaleFields(fvc::grad(U)); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Smagorinsky::correct(const tmp<volTensorField>& gradU) -{ - GenEddyVisc::correct(gradU); - updateSubGridScaleFields(gradU()); -} - - -bool Smagorinsky::read() -{ - if (GenEddyVisc::read()) - { - ck_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/Smagorinsky/Smagorinsky.H b/src/turbulenceModels/compressible/LES/Smagorinsky/Smagorinsky.H deleted file mode 100644 index 56821ae60..000000000 --- a/src/turbulenceModels/compressible/LES/Smagorinsky/Smagorinsky.H +++ /dev/null @@ -1,153 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::LESModels::Smagorinsky - -Group - grpCmpLESTurbulence - -Description - The choric Smagorinsky Model for compressible flows. - - Algebraic eddy viscosity SGS model founded on the assumption that - local equilibrium prevails. - Thus, - \verbatim - - B = 2/3*k*I - 2*nuSgs*dev(D) - - where - - D = symm(grad(U)); - k from rho*D:B + ce*rho*k^3/2/delta = 0 - muSgs = ck*rho*sqrt(k)*delta - \endverbatim - -SourceFiles - Smagorinsky.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleSmagorinsky_H -#define compressibleSmagorinsky_H - -#include "GenEddyVisc.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class Smagorinsky Declaration -\*---------------------------------------------------------------------------*/ - -class Smagorinsky -: - public GenEddyVisc -{ - // Private data - - dimensionedScalar ck_; - - - // Private Member Functions - - //- Update sub-grid scale fields - void updateSubGridScaleFields(const volTensorField& gradU); - - // Disallow default bitwise copy construct and assignment - Smagorinsky(const Smagorinsky&); - Smagorinsky& operator=(const Smagorinsky&); - - -public: - - //- Runtime type information - TypeName("Smagorinsky"); - - // Constructors - - //- Construct from components - Smagorinsky - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~Smagorinsky() - {} - - - // Member Functions - - //- Return SGS kinetic energy - // calculated from the given velocity gradient - tmp<volScalarField> k(const tmp<volTensorField>& gradU) const - { - volSymmTensorField D(symm(gradU)); - - volScalarField a(ce_/delta()); - volScalarField b((2.0/3.0)*tr(D)); - volScalarField c(2*ck_*delta()*(dev(D) && D)); - - return sqr((-b + sqrt(sqr(b) + 4*a*c))/(2*a)); - } - - //- Return SGS kinetic energy - virtual tmp<volScalarField> k() const - { - return k(fvc::grad(U())); - } - - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.C deleted file mode 100644 index ab6718a0c..000000000 --- a/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.C +++ /dev/null @@ -1,445 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "SpalartAllmaras.H" -#include "addToRunTimeSelectionTable.H" -#include "wallDist.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(SpalartAllmaras, 0); -addToRunTimeSelectionTable(LESModel, SpalartAllmaras, dictionary); - - -// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // - -void SpalartAllmaras::updateSubGridScaleFields() -{ - muSgs_.internalField() = rho()*fv1()*nuTilda_.internalField(); - muSgs_.correctBoundaryConditions(); - - alphaSgs_ = muSgs_/Prt_; - alphaSgs_.correctBoundaryConditions(); -} - - -tmp<volScalarField> SpalartAllmaras::fv1() const -{ - volScalarField chi3(pow3(rho()*nuTilda_/mu())); - return chi3/(chi3 + pow3(Cv1_)); -} - - -tmp<volScalarField> SpalartAllmaras::fv2() const -{ - if (ashfordCorrection_) - { - return 1.0/pow3(scalar(1) + rho()*nuTilda_/(mu()*Cv2_)); - } - else - { - const volScalarField chi("chi", rho()*nuTilda_/mu()); - return 1.0 - chi/(1.0 + chi*fv1()); - } -} - - -tmp<volScalarField> SpalartAllmaras::fv3() const -{ - if (ashfordCorrection_) - { - volScalarField chi(rho()*nuTilda_/mu()); - volScalarField chiByCv2((1/Cv2_)*chi); - - return - (scalar(1) + chi*fv1()) - *(1/Cv2_) - *(3*(scalar(1) + chiByCv2) + sqr(chiByCv2)) - /pow3(scalar(1) + chiByCv2); - } - else - { - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "fv3", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("fv3", dimless, 1), - zeroGradientFvPatchScalarField::typeName - ) - ); - } -} - - -tmp<volScalarField> SpalartAllmaras::fw -( - const volScalarField& Stilda, - const volScalarField& dTilda -) const -{ - volScalarField r - ( - min - ( - nuTilda_ - /( - max - ( - Stilda, - dimensionedScalar("SMALL", Stilda.dimensions(), SMALL) - ) - *sqr(kappa_*dTilda) - ), - scalar(10.0) - ) - ); - r.boundaryField() == 0.0; - - volScalarField g(r + Cw2_*(pow6(r) - r)); - - return g*pow((1.0 + pow6(Cw3_))/(pow6(g) + pow6(Cw3_)), 1.0/6.0); -} - - -tmp<volScalarField> SpalartAllmaras::dTilda() const -{ - tmp<volScalarField> tdTilda(CDES_*delta()); - min(tdTilda().dimensionedInternalField(), tdTilda(), y_); - return tdTilda; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -SpalartAllmaras::SpalartAllmaras -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName, - const word& modelName -) -: - DESModel(modelName, rho, U, phi, thermoPhysicalModel, turbulenceModelName), - - sigmaNut_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaNut", - coeffDict_, - 0.66666 - ) - ), - Prt_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Prt", - coeffDict_, - 1.0 - ) - ), - - Cb1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cb1", - coeffDict_, - 0.1355 - ) - ), - Cb2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cb2", - coeffDict_, - 0.622 - ) - ), - Cv1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cv1", - coeffDict_, - 7.1 - ) - ), - Cv2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cv2", - coeffDict_, - 5.0 - ) - ), - CDES_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "CDES", - coeffDict_, - 0.65 - ) - ), - ck_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "ck", - coeffDict_, - 0.07 - ) - ), - kappa_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "kappa", - *this, - 0.41 - ) - ), - Cw1_(Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_), - Cw2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cw2", - coeffDict_, - 0.3 - ) - ), - Cw3_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cw3", - coeffDict_, - 2.0 - ) - ), - - ashfordCorrection_(coeffDict_.lookupOrDefault("ashfordCorrection", true)), - - y_(wallDist::New(mesh_).y()), - - nuTilda_ - ( - IOobject - ( - "nuTilda", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - muSgs_ - ( - IOobject - ( - "muSgs", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - alphaSgs_ - ( - IOobject - ( - "alphaSgs", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ) -{ - updateSubGridScaleFields(); - - printCoeffs(); - - if (ashfordCorrection_) - { - Info<< " Employing Ashford correction" << endl; - } -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> SpalartAllmaras::B() const -{ - return ((2.0/3.0)*I)*k() - (muSgs_/rho())*dev(twoSymm(fvc::grad(U()))); -} - - -tmp<volSymmTensorField> SpalartAllmaras::devRhoBeff() const -{ - return -muEff()*dev(twoSymm(fvc::grad(U()))); -} - - -tmp<volScalarField> SpalartAllmaras::epsilon() const -{ - return 2*muEff()/rho()*magSqr(symm(fvc::grad(U()))); -} - - -tmp<fvVectorMatrix> SpalartAllmaras::divDevRhoBeff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U)))) - ); -} - - -void SpalartAllmaras::correct(const tmp<volTensorField>& tgradU) -{ - const volTensorField& gradU = tgradU(); - LESModel::correct(gradU); - - const volScalarField dTilda(this->dTilda()); - volScalarField Stilda - ( - fv3()*::sqrt(2.0)*mag(skew(gradU)) + fv2()*nuTilda_/sqr(kappa_*dTilda) - ); - - tmp<fvScalarMatrix> nuTildaEqn - ( - fvm::ddt(rho(), nuTilda_) - + fvm::div(phi(), nuTilda_) - - fvm::laplacian - ( - (nuTilda_*rho() + mu())/sigmaNut_, - nuTilda_, - "laplacian(DnuTildaEff,nuTilda)" - ) - - rho()*Cb2_/sigmaNut_*magSqr(fvc::grad(nuTilda_)) - == - rho()*Cb1_*Stilda*nuTilda_ - - fvm::Sp(rho()*Cw1_*fw(Stilda, dTilda)*nuTilda_/sqr(dTilda), nuTilda_) - ); - - nuTildaEqn().relax(); - nuTildaEqn().solve(); - - bound(nuTilda_, dimensionedScalar("zero", nuTilda_.dimensions(), 0.0)); - nuTilda_.correctBoundaryConditions(); - - updateSubGridScaleFields(); -} - - -bool SpalartAllmaras::read() -{ - if (LESModel::read()) - { - sigmaNut_.readIfPresent(coeffDict()); - Prt_.readIfPresent(coeffDict()); - - Cb1_.readIfPresent(coeffDict()); - Cb2_.readIfPresent(coeffDict()); - Cv1_.readIfPresent(coeffDict()); - Cv2_.readIfPresent(coeffDict()); - CDES_.readIfPresent(coeffDict()); - ck_.readIfPresent(coeffDict()); - kappa_.readIfPresent(*this); - Cw1_ = Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_; - Cw2_.readIfPresent(coeffDict()); - Cw3_.readIfPresent(coeffDict()); - - ashfordCorrection_.readIfPresent("ashfordCorrection", coeffDict()); - - return true; - } - else - { - return false; - } -} - - -tmp<volScalarField> SpalartAllmaras::LESRegion() const -{ - tmp<volScalarField> tLESRegion - ( - new volScalarField - ( - IOobject - ( - "DES::LESRegion", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - neg(dTilda() - y_) - ) - ); - - return tLESRegion; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.H deleted file mode 100644 index 133cd6d17..000000000 --- a/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.H +++ /dev/null @@ -1,214 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::LESModels::SpalartAllmaras - -Group - grpCmpDESTurbulence - -Description - SpalartAllmaras for compressible flows - - Extended according to - \verbatim - "An Unstructured Grid Generation and Adaptive Solution Technique - for High Reynolds Number Compressible Flows" - G.A. Ashford, - Ph.D. thesis, University of Michigan, 1996. - \endverbatim - by using the optional flag \c ashfordCorrection - -SourceFiles - SpalartAllmaras.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleSpalartAllmaras_H -#define compressibleSpalartAllmaras_H - -#include "DESModel.H" -#include "volFields.H" -#include "wallDist.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class SpalartAllmaras Declaration -\*---------------------------------------------------------------------------*/ - -class SpalartAllmaras -: - public DESModel -{ - // Private data - - // Model coefficients - - dimensionedScalar sigmaNut_; - dimensionedScalar Prt_; - - dimensionedScalar Cb1_; - dimensionedScalar Cb2_; - dimensionedScalar Cv1_; - dimensionedScalar Cv2_; - dimensionedScalar CDES_; - dimensionedScalar ck_; - dimensionedScalar kappa_; - dimensionedScalar Cw1_; - dimensionedScalar Cw2_; - dimensionedScalar Cw3_; - - - //- Optional flag to activate the Ashford correction - Switch ashfordCorrection_; - - - // Fields - - //- Wall distance - // Note: different to wall distance in parent RASModel - // which is for near-wall cells only - const volScalarField& y_; - - volScalarField nuTilda_; - volScalarField muSgs_; - volScalarField alphaSgs_; - - - // Private Member Functions - - //- Update sub-grid scale fields - void updateSubGridScaleFields(); - - tmp<volScalarField> fv1() const; - tmp<volScalarField> fv2() const; - tmp<volScalarField> fv3() const; - - tmp<volScalarField> fw - ( - const volScalarField& Stilda, - const volScalarField& dTilda - ) const; - - //- Length scale - tmp<volScalarField> dTilda() const; - - // Disallow default bitwise copy construct and assignment - SpalartAllmaras(const SpalartAllmaras&); - SpalartAllmaras& operator=(const SpalartAllmaras&); - - -public: - - //- Runtime type information - TypeName("SpalartAllmaras"); - - - // Constructors - - //- Constructor from components - SpalartAllmaras - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~SpalartAllmaras() - {} - - - // Member Functions - - tmp<volScalarField> nuTilda() const - { - return nuTilda_; - } - - //- Return SGS kinetic energy - virtual tmp<volScalarField> k() const - { - return sqr(muSgs()/rho()/ck_/dTilda()); - } - - //- Return sub-grid disipation rate - virtual tmp<volScalarField> epsilon() const; - - //- Return SGS viscosity - virtual tmp<volScalarField> muSgs() const - { - return muSgs_; - } - - //- Return SGS thermal diffusivity - virtual tmp<volScalarField> alphaSgs() const - { - return alphaSgs_; - } - - //- Return the sub-grid stress tensor. - virtual tmp<volSymmTensorField> B() const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devRhoBeff() const; - - //- Returns div(rho*dev(B)). - // This is the additional term due to the filtering of the NSE. - virtual tmp<fvVectorMatrix> divDevRhoBeff(volVectorField& U) const; - - //- Correct nuTilda and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); - - //- Return the LES field indicator - virtual tmp<volScalarField> LESRegion() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/compressibleLESdelta/compressibleLESdelta.C b/src/turbulenceModels/compressible/LES/compressibleLESdelta/compressibleLESdelta.C deleted file mode 100644 index 4b8fbbc44..000000000 --- a/src/turbulenceModels/compressible/LES/compressibleLESdelta/compressibleLESdelta.C +++ /dev/null @@ -1,66 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "compressibleLESdelta.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineRunTimeSelectionTable(LESdelta, dictionary); - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -LESdelta::LESdelta(const word& name, const fvMesh& mesh) -: - foamLESdelta(name, mesh) -{} - - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -Foam::autoPtr<foamLESdelta> LESdelta::New -( - const word& name, - const fvMesh& mesh, - const dictionary& dict -) -{ - return foamLESdelta::New(name, mesh, dict, *dictionaryConstructorTablePtr_); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/compressibleLESdelta/compressibleLESdelta.H b/src/turbulenceModels/compressible/LES/compressibleLESdelta/compressibleLESdelta.H deleted file mode 100644 index 56d1437cc..000000000 --- a/src/turbulenceModels/compressible/LES/compressibleLESdelta/compressibleLESdelta.H +++ /dev/null @@ -1,109 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::LESdelta - -Description - Abstract base class for compressible LES deltas - -SourceFiles - compressibleLESdelta.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleLESdelta_H -#define compressibleLESdelta_H - -#include "LESdelta.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// To avoid macro problems typedef scoped class -typedef Foam::LESdelta foamLESdelta; - -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class LESdelta Declaration -\*---------------------------------------------------------------------------*/ - -class LESdelta -: - public foamLESdelta -{ - -public: - - // Declare run-time constructor selection table - - declareRunTimeSelectionTable - ( - autoPtr, - foamLESdelta, - dictionary, - ( - const word& name, - const fvMesh& mesh, - const dictionary& LESdeltaDict - ), - (name, mesh, LESdeltaDict) - ); - - // Constructors - - //- Construct from name and mesh - LESdelta(const word& name, const fvMesh& mesh); - - - // Selectors - - //- Return a reference to the selected LES delta - static autoPtr<foamLESdelta> New - ( - const word& name, - const fvMesh& mesh, - const dictionary& dict - ); - - - //- Destructor - virtual ~LESdelta() - {} -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C b/src/turbulenceModels/compressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C deleted file mode 100644 index 7b146b89a..000000000 --- a/src/turbulenceModels/compressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C +++ /dev/null @@ -1,191 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "homogeneousDynOneEqEddy.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(homogeneousDynOneEqEddy, 0); -addToRunTimeSelectionTable(LESModel, homogeneousDynOneEqEddy, dictionary); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void homogeneousDynOneEqEddy::updateSubGridScaleFields -( - const volSymmTensorField& D -) -{ - muSgs_ = ck_(D)*rho()*sqrt(k_)*delta(); - muSgs_.correctBoundaryConditions(); - - alphaSgs_ = muSgs_/Prt_; - alphaSgs_.correctBoundaryConditions(); -} - - -dimensionedScalar homogeneousDynOneEqEddy::ck_ -( - const volSymmTensorField& D -) const -{ - volScalarField KK(0.5*(filter_(magSqr(U())) - magSqr(filter_(U())))); - - volSymmTensorField LL(dev(filter_(sqr(U())) - (sqr(filter_(U()))))); - - volSymmTensorField MM - ( - delta()*(filter_(sqrt(k_)*D) - 2*sqrt(KK + filter_(k_))*filter_(D)) - ); - - return average(LL && MM)/average(magSqr(MM)); -} - - -dimensionedScalar homogeneousDynOneEqEddy::ce_ -( - const volSymmTensorField& D -) const -{ - volScalarField KK(0.5*(filter_(magSqr(U())) - magSqr(filter_(U())))); - - volScalarField mm - ( - pow(KK + filter_(k_), 1.5)/(2*delta()) - filter_(pow(k_, 1.5))/delta() - ); - - volScalarField ee - ( - 2*delta()*ck_(D) - *( - filter_(sqrt(k_)*magSqr(D)) - - 2*sqrt(KK + filter_(k_))*magSqr(filter_(D)) - ) - ); - - return average(ee*mm)/average(mm*mm); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -homogeneousDynOneEqEddy::homogeneousDynOneEqEddy -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, rho, U, phi, thermoPhysicalModel, turbulenceModelName), - GenEddyVisc(rho, U, phi, thermoPhysicalModel), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - filterPtr_(LESfilter::New(U.mesh(), coeffDict())), - filter_(filterPtr_()) -{ - updateSubGridScaleFields(dev(symm(fvc::grad(U)))); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void homogeneousDynOneEqEddy::correct(const tmp<volTensorField>& tgradU) -{ - const volTensorField& gradU = tgradU(); - - GenEddyVisc::correct(gradU); - - volSymmTensorField D(dev(symm(gradU))); - volScalarField divU(fvc::div(phi()/fvc::interpolate(rho()))); - volScalarField G(GName(), 2*muSgs_*(gradU && D)); - - tmp<fvScalarMatrix> kEqn - ( - fvm::ddt(rho(), k_) - + fvm::div(phi(), k_) - - fvm::laplacian(DkEff(), k_) - == - G - - fvm::SuSp(2.0/3.0*rho()*divU, k_) - - fvm::Sp(ce_(D)*rho()*sqrt(k_)/delta(), k_) - ); - - kEqn().relax(); - kEqn().solve(); - - bound(k_, kMin_); - - updateSubGridScaleFields(D); -} - - -bool homogeneousDynOneEqEddy::read() -{ - if (GenEddyVisc::read()) - { - filter_.read(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.H b/src/turbulenceModels/compressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.H deleted file mode 100644 index fca371f0d..000000000 --- a/src/turbulenceModels/compressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.H +++ /dev/null @@ -1,161 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::LESModels::homogeneousDynOneEqEddy - -Group - grpCmpLESTurbulence - -Description - One Equation Eddy Viscosity Model for compressible flows. - - Eddy viscosity SGS model using a modeled balance equation to simulate - the behaviour of k. - Thus - \verbatim - d/dt(k) + div(U*k) - div(nuSgs*grad(k)) - = - -rho*B*L - ce*rho*k^3/2/delta - - and - - B = 2/3*k*I - 2*nuSgs*dev(D) - - where - - D = symm(grad(U)); - nuSgs = ck*sqrt(k)*delta - \endverbatim - -SourceFiles - homogeneousDynOneEqEddy.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleHomogeneousDynOneEqEddy_H -#define compressibleHomogeneousDynOneEqEddy_H - -#include "GenEddyVisc.H" -#include "LESfilter.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class homogeneousDynOneEqEddy Declaration -\*---------------------------------------------------------------------------*/ - -class homogeneousDynOneEqEddy -: - public GenEddyVisc -{ - // Private data - - volScalarField k_; - - autoPtr<LESfilter> filterPtr_; - LESfilter& filter_; - - - // Private Member Functions - - //- Update sub-grid scale fields - void updateSubGridScaleFields(const volSymmTensorField& D); - - //- Calculate ck, ce by filtering the velocity field U. - dimensionedScalar ck_(const volSymmTensorField& D) const; - dimensionedScalar ce_(const volSymmTensorField& D) const; - - // Disallow default bitwise copy construct and assignment - homogeneousDynOneEqEddy(const homogeneousDynOneEqEddy&); - homogeneousDynOneEqEddy& operator=(const homogeneousDynOneEqEddy&); - - -public: - - //- Runtime type information - TypeName("homogeneousDynOneEqEddy"); - - - // Constructors - - //- Constructor from components - homogeneousDynOneEqEddy - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~homogeneousDynOneEqEddy() - {} - - - // Member Functions - - //- Return SGS kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Return the effective diffusivity for k - tmp<volScalarField> DkEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DkEff", muSgs_ + mu()) - ); - } - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/lowReOneEqEddy/lowReOneEqEddy.C b/src/turbulenceModels/compressible/LES/lowReOneEqEddy/lowReOneEqEddy.C deleted file mode 100644 index 704daaa48..000000000 --- a/src/turbulenceModels/compressible/LES/lowReOneEqEddy/lowReOneEqEddy.C +++ /dev/null @@ -1,165 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "lowReOneEqEddy.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -defineTypeNameAndDebug(lowReOneEqEddy, 0); -addToRunTimeSelectionTable(LESModel, lowReOneEqEddy, dictionary); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void lowReOneEqEddy::updateSubGridScaleFields() -{ - // High Re eddy viscosity - muSgs_ = ck_*rho()*sqrt(k_)*delta(); - - // low Re no corrected eddy viscosity - muSgs_ -= (mu()/beta_)*(scalar(1) - exp(-beta_*muSgs_/mu())); - muSgs_.correctBoundaryConditions(); - - alphaSgs_ = muSgs_/Prt_; - alphaSgs_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -lowReOneEqEddy::lowReOneEqEddy -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, rho, U, phi, thermoPhysicalModel, turbulenceModelName), - GenEddyVisc(rho, U, phi, thermoPhysicalModel), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - ck_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "ck", - coeffDict_, - 0.07 - ) - ), - beta_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "beta", - coeffDict_, - 0.01 - ) - ) -{ - updateSubGridScaleFields(); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void lowReOneEqEddy::correct(const tmp<volTensorField>& tgradU) -{ - const volTensorField& gradU = tgradU(); - - GenEddyVisc::correct(gradU); - - volScalarField divU(fvc::div(phi()/fvc::interpolate(rho()))); - volScalarField G(GName(), 2*muSgs_*(gradU && dev(symm(gradU)))); - - tmp<fvScalarMatrix> kEqn - ( - fvm::ddt(rho(), k_) - + fvm::div(phi(), k_) - - fvm::laplacian(DkEff(), k_) - == - G - - fvm::SuSp(2.0/3.0*rho()*divU, k_) - - fvm::Sp(ce_*rho()*sqrt(k_)/delta(), k_) - ); - - kEqn().relax(); - kEqn().solve(); - - bound(k_, kMin_); - - updateSubGridScaleFields(); -} - - -bool lowReOneEqEddy::read() -{ - if (GenEddyVisc::read()) - { - ck_.readIfPresent(coeffDict()); - beta_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/lowReOneEqEddy/lowReOneEqEddy.H b/src/turbulenceModels/compressible/LES/lowReOneEqEddy/lowReOneEqEddy.H deleted file mode 100644 index e3e836d3a..000000000 --- a/src/turbulenceModels/compressible/LES/lowReOneEqEddy/lowReOneEqEddy.H +++ /dev/null @@ -1,152 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::LESModels::lowReOneEqEddy - -Group - grpCmpLESTurbulence - -Description - One Equation Eddy Viscosity Model for compressible flow - - \verbatim - d/dt(rho*k) + div(rho*U*k) - div(muEff*grad(k)) - = - -rho*B*L - ce*rho*k^3/2/delta - - and - - B = 2/3*k*I - 2*nuSgs*dev(D) - - where - - nuSgsHiRe = ck*sqrt(k)*delta - nuSgs = (nu/beta)*(1 - exp(-beta*nuSgsHiRe/nu)); - \endverbatim - -SourceFiles - lowReOneEqEddy.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleLowReOneEqEddy_H -#define compressibleLowReOneEqEddy_H - -#include "GenEddyVisc.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class lowReOneEqEddy Declaration -\*---------------------------------------------------------------------------*/ - -class lowReOneEqEddy -: - public GenEddyVisc -{ - // Private data - - volScalarField k_; - - dimensionedScalar ck_; - dimensionedScalar beta_; - - // Private Member Functions - - //- Update sub-grid scale fields - void updateSubGridScaleFields(); - - // Disallow default bitwise copy construct and assignment - lowReOneEqEddy(const lowReOneEqEddy&); - lowReOneEqEddy& operator=(const lowReOneEqEddy&); - - -public: - - //- Runtime type information - TypeName("lowReOneEqEddy"); - - - // Constructors - - //- Constructor from components - lowReOneEqEddy - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~lowReOneEqEddy() - {} - - - // Member Functions - - //- Return SGS kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Return the effective diffusivity for k - tmp<volScalarField> DkEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DkEff", muSgs_ + mu()) - ); - } - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/oneEqEddy/oneEqEddy.C b/src/turbulenceModels/compressible/LES/oneEqEddy/oneEqEddy.C deleted file mode 100644 index 537e98ecf..000000000 --- a/src/turbulenceModels/compressible/LES/oneEqEddy/oneEqEddy.C +++ /dev/null @@ -1,151 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "oneEqEddy.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(oneEqEddy, 0); -addToRunTimeSelectionTable(LESModel, oneEqEddy, dictionary); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void oneEqEddy::updateSubGridScaleFields() -{ - muSgs_ = ck_*rho()*sqrt(k_)*delta(); - muSgs_.correctBoundaryConditions(); - - alphaSgs_ = muSgs_/Prt_; - alphaSgs_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -oneEqEddy::oneEqEddy -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, rho, U, phi, thermoPhysicalModel, turbulenceModelName), - GenEddyVisc(rho, U, phi, thermoPhysicalModel), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - ck_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "ck", - coeffDict_, - 0.094 - ) - ) -{ - updateSubGridScaleFields(); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void oneEqEddy::correct(const tmp<volTensorField>& tgradU) -{ - const volTensorField& gradU = tgradU(); - - GenEddyVisc::correct(gradU); - - volScalarField divU(fvc::div(phi()/fvc::interpolate(rho()))); - volScalarField G(GName(), 2*muSgs_*(gradU && dev(symm(gradU)))); - - tmp<fvScalarMatrix> kEqn - ( - fvm::ddt(rho(), k_) - + fvm::div(phi(), k_) - - fvm::laplacian(DkEff(), k_) - == - G - - fvm::SuSp(2.0/3.0*rho()*divU, k_) - - fvm::Sp(ce_*rho()*sqrt(k_)/delta(), k_) - ); - - kEqn().relax(); - kEqn().solve(); - - bound(k_, kMin_); - - updateSubGridScaleFields(); -} - - -bool oneEqEddy::read() -{ - if (GenEddyVisc::read()) - { - ck_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/oneEqEddy/oneEqEddy.H b/src/turbulenceModels/compressible/LES/oneEqEddy/oneEqEddy.H deleted file mode 100644 index 7e0896935..000000000 --- a/src/turbulenceModels/compressible/LES/oneEqEddy/oneEqEddy.H +++ /dev/null @@ -1,156 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::LESModels::oneEqEddy - -Group - grpCmpLESTurbulence - -Description - One Equation Eddy Viscosity Model for compressible flows - - Eddy viscosity SGS model using a modeled balance equation to simulate the - behaviour of k, hence, - \verbatim - d/dt(rho*k) + div(rho*U*k) - div(muEff*grad(k)) - = - -rho*D:B - ce*rho*k^(3/2)/delta - - and - - B = 2/3*k*I - 2*nuSgs*dev(D) - - where - - D = symm(grad(U)); - nuSgs = ck*sqrt(k)*delta - muSgs = rho*nuSgs - muEff = muSgs + mu - \endverbatim - -SourceFiles - oneEqEddy.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleOneEqEddy_H -#define compressibleOneEqEddy_H - -#include "GenEddyVisc.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class oneEqEddy Declaration -\*---------------------------------------------------------------------------*/ - -class oneEqEddy -: - public GenEddyVisc -{ - // Private data - - volScalarField k_; - - dimensionedScalar ck_; - - - // Private Member Functions - - //- Update sub-grid scale fields - void updateSubGridScaleFields(); - - // Disallow default bitwise copy construct and assignment - oneEqEddy(const oneEqEddy&); - oneEqEddy& operator=(const oneEqEddy&); - - -public: - - //- Runtime type information - TypeName("oneEqEddy"); - - - // Constructors - - //- Constructor from components - oneEqEddy - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~oneEqEddy() - {} - - - // Member Functions - - //- Return SGS kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Return the effective diffusivity for k - tmp<volScalarField> DkEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DkEff", muSgs_ + mu()) - ); - } - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/vanDriestDelta/vanDriestDelta.C b/src/turbulenceModels/compressible/LES/vanDriestDelta/vanDriestDelta.C deleted file mode 100644 index 8c9137846..000000000 --- a/src/turbulenceModels/compressible/LES/vanDriestDelta/vanDriestDelta.C +++ /dev/null @@ -1,161 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "vanDriestDelta.H" -#include "LESModel.H" -#include "wallFvPatch.H" -#include "wallDistData.H" -#include "wallPointYPlus.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(vanDriestDelta, 0); -addToRunTimeSelectionTable(LESdelta, vanDriestDelta, dictionary); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void vanDriestDelta::calcDelta() -{ - const LESModel& lesModel = mesh_.lookupObject<LESModel>("LESProperties"); - - const volVectorField& U = lesModel.U(); - const volScalarField& rho = lesModel.rho(); - const volScalarField& mu = lesModel.mu(); - tmp<volScalarField> muSgs = lesModel.muSgs(); - - volScalarField ystar - ( - IOobject - ( - "ystar", - mesh_.time().constant(), - mesh_ - ), - mesh_, - dimensionedScalar("ystar", dimLength, GREAT) - ); - - const fvPatchList& patches = mesh_.boundary(); - forAll(patches, patchi) - { - if (isA<wallFvPatch>(patches[patchi])) - { - const fvPatchVectorField& Uw = U.boundaryField()[patchi]; - const scalarField& rhow = rho.boundaryField()[patchi]; - const scalarField& muw = mu.boundaryField()[patchi]; - const scalarField& muSgsw = muSgs().boundaryField()[patchi]; - - ystar.boundaryField()[patchi] = - muw/(rhow*sqrt((muw + muSgsw)*mag(Uw.snGrad())/rhow + VSMALL)); - } - } - - scalar cutOff = wallPointYPlus::yPlusCutOff; - wallPointYPlus::yPlusCutOff = 500; - wallDistData<wallPointYPlus> y(mesh_, ystar); - wallPointYPlus::yPlusCutOff = cutOff; - - delta_ = min - ( - static_cast<const volScalarField&>(geometricDelta_()), - (kappa_/Cdelta_)*((scalar(1) + SMALL) - exp(-y/ystar/Aplus_))*y - ); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -vanDriestDelta::vanDriestDelta -( - const word& name, - const fvMesh& mesh, - const dictionary& dd -) -: - LESdelta(name, mesh), - geometricDelta_ - ( - LESdelta::New("geometricDelta", mesh, dd.subDict(type() + "Coeffs")) - ), - kappa_(dd.lookupOrDefault<scalar>("kappa", 0.41)), - Aplus_ - ( - dd.subDict(type() + "Coeffs").lookupOrDefault<scalar>("Aplus", 26.0) - ), - Cdelta_ - ( - dd.subDict(type() + "Coeffs").lookupOrDefault<scalar>("Cdelta", 0.158) - ), - calcInterval_ - ( - dd.subDict(type() + "Coeffs").lookupOrDefault<label>("calcInterval", 1) - ) -{ - delta_ = geometricDelta_(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void vanDriestDelta::read(const dictionary& d) -{ - const dictionary& dd(d.subDict(type() + "Coeffs")); - - geometricDelta_().read(dd); - d.readIfPresent<scalar>("kappa", kappa_); - dd.readIfPresent<scalar>("Aplus", Aplus_); - dd.readIfPresent<scalar>("Cdelta", Cdelta_); - dd.readIfPresent<label>("calcInterval", calcInterval_); - calcDelta(); -} - - -void vanDriestDelta::correct() -{ - if (mesh().time().timeIndex() % calcInterval_ == 0) - { - geometricDelta_().correct(); - calcDelta(); - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/vanDriestDelta/vanDriestDelta.H b/src/turbulenceModels/compressible/LES/vanDriestDelta/vanDriestDelta.H deleted file mode 100644 index 88e26c755..000000000 --- a/src/turbulenceModels/compressible/LES/vanDriestDelta/vanDriestDelta.H +++ /dev/null @@ -1,113 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::LESModels::vanDriestDelta - -Description - Simple cube-root of cell volume delta used in compressible LES models. - -SourceFiles - vanDriestDelta.C - -\*---------------------------------------------------------------------------*/ - -#ifndef vanDriestDelta_H -#define vanDriestDelta_H - -#include "compressibleLESdelta.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class vanDriestDelta Declaration -\*---------------------------------------------------------------------------*/ - -class vanDriestDelta -: - public LESdelta -{ - // Private data - - autoPtr<Foam::LESdelta> geometricDelta_; - scalar kappa_; - scalar Aplus_; - scalar Cdelta_; - label calcInterval_; - - - // Private Member Functions - - //- Disallow default bitwise copy construct and assignment - vanDriestDelta(const vanDriestDelta&); - void operator=(const vanDriestDelta&); - - // Calculate the delta values - void calcDelta(); - - -public: - - //- Runtime type information - TypeName("vanDriest"); - - - // Constructors - - //- Construct from name, mesh and IOdictionary - vanDriestDelta(const word& name, const fvMesh& mesh, const dictionary&); - - - //- Destructor - virtual ~vanDriestDelta() - {} - - - // Member Functions - - //- Read the LESdelta dictionary - virtual void read(const dictionary&); - - // Correct values - virtual void correct(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/LRR/LRR.C b/src/turbulenceModels/compressible/RAS/LRR/LRR.C deleted file mode 100644 index e17052df0..000000000 --- a/src/turbulenceModels/compressible/RAS/LRR/LRR.C +++ /dev/null @@ -1,483 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "LRR.H" -#include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" - -#include "backwardsCompatibilityWallFunctions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(LRR, 0); -addToRunTimeSelectionTable(RASModel, LRR, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -LRR::LRR -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName, - const word& modelName -) -: - RASModel(modelName, rho, U, phi, thermophysicalModel, turbulenceModelName), - - Cmu_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cmu", - coeffDict_, - 0.09 - ) - ), - Clrr1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Clrr1", - coeffDict_, - 1.8 - ) - ), - Clrr2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Clrr2", - coeffDict_, - 0.6 - ) - ), - C1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C1", - coeffDict_, - 1.44 - ) - ), - C2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C2", - coeffDict_, - 1.92 - ) - ), - Cs_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cs", - coeffDict_, - 0.25 - ) - ), - Ceps_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Ceps", - coeffDict_, - 0.15 - ) - ), - couplingFactor_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "couplingFactor", - coeffDict_, - 0.0 - ) - ), - sigmaR_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaR", - coeffDict_, - 0.81967 - ) - ), - sigmaEps_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaEps", - coeffDict_, - 1.3 - ) - ), - Prt_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Prt", - coeffDict_, - 1.0 - ) - ), - - R_ - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - autoCreateR("R", mesh_) - ), - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateK("k", mesh_) - ), - epsilon_ - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateEpsilon("epsilon", mesh_) - ), - mut_ - ( - IOobject - ( - "mut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateMut("mut", mesh_) - ), - alphat_ - ( - IOobject - ( - "alphat", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateAlphat("alphat", mesh_) - ) -{ - if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0) - { - FatalErrorIn - ( - "LRR::LRR" - "( const volScalarField&, const volVectorField&" - ", const surfaceScalarField&, fluidThermo&, const word&" - ", const word&)" - ) << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" << nl - << exit(FatalError); - } - - bound(k_, kMin_); - bound(epsilon_, epsilonMin_); - - mut_ = Cmu_*rho_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> LRR::devRhoReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - rho_*R_ - mu()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> LRR::divDevRhoReff(volVectorField& U) const -{ - if (couplingFactor_.value() > 0.0) - { - return - ( - fvc::div(rho_*R_ + couplingFactor_*mut_*fvc::grad(U)) - + fvc::laplacian((1.0 - couplingFactor_)*mut_, U) - - fvm::laplacian(muEff(), U) - - fvc::div(mu()*dev2(T(fvc::grad(U)))) - ); - } - else - { - return - ( - fvc::div(rho_*R_) - + fvc::laplacian(mut_, U) - - fvm::laplacian(muEff(), U) - - fvc::div(mu()*dev2(T(fvc::grad(U)))) - ); - } -} - - -bool LRR::read() -{ - if (RASModel::read()) - { - Cmu_.readIfPresent(coeffDict()); - Clrr1_.readIfPresent(coeffDict()); - Clrr2_.readIfPresent(coeffDict()); - C1_.readIfPresent(coeffDict()); - C2_.readIfPresent(coeffDict()); - Cs_.readIfPresent(coeffDict()); - Ceps_.readIfPresent(coeffDict()); - sigmaR_.readIfPresent(coeffDict()); - sigmaEps_.readIfPresent(coeffDict()); - Prt_.readIfPresent(coeffDict()); - couplingFactor_.readIfPresent(coeffDict()); - - if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0) - { - FatalErrorIn("LRR::read()") - << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" << nl - << exit(FatalError); - } - - return true; - } - else - { - return false; - } -} - - -void LRR::correct() -{ - if (!turbulence_) - { - // Re-calculate viscosity - mut_ = rho_*Cmu_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - return; - } - - RASModel::correct(); - - volSymmTensorField P(-twoSymm(R_ & fvc::grad(U_))); - volScalarField G(GName(), 0.5*mag(tr(P))); - - // Update epsilon and G at the wall - epsilon_.boundaryField().updateCoeffs(); - - // Dissipation equation - tmp<fvScalarMatrix> epsEqn - ( - fvm::ddt(rho_, epsilon_) - + fvm::div(phi_, epsilon_) - //- fvm::laplacian(Ceps*rho_*(k_/epsilon_)*R_, epsilon_) - - fvm::laplacian(DepsilonEff(), epsilon_) - == - C1_*rho_*G*epsilon_/k_ - - fvm::Sp(C2_*rho_*epsilon_/k_, epsilon_) - ); - - epsEqn().relax(); - - epsEqn().boundaryManipulate(epsilon_.boundaryField()); - - solve(epsEqn); - bound(epsilon_, epsilonMin_); - - - // Reynolds stress equation - - const fvPatchList& patches = mesh_.boundary(); - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA<wallFvPatch>(curPatch)) - { - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - P[faceCelli] *= min - ( - G[faceCelli]/(0.5*mag(tr(P[faceCelli])) + SMALL), - 100.0 - ); - } - } - } - - - tmp<fvSymmTensorMatrix> REqn - ( - fvm::ddt(rho_, R_) - + fvm::div(phi_, R_) - //- fvm::laplacian(Cs*rho_*(k_/epsilon_)*R_, R_) - - fvm::laplacian(DREff(), R_) - + fvm::Sp(Clrr1_*rho_*epsilon_/k_, R_) - == - rho_*P - - (2.0/3.0*(1 - Clrr1_)*I)*rho_*epsilon_ - - Clrr2_*rho_*dev(P) - ); - - REqn().relax(); - solve(REqn); - - R_.max - ( - dimensionedSymmTensor - ( - "zero", - R_.dimensions(), - symmTensor - ( - kMin_.value(), -GREAT, -GREAT, - kMin_.value(), -GREAT, - kMin_.value() - ) - ) - ); - - k_ = 0.5*tr(R_); - bound(k_, kMin_); - - - // Re-calculate viscosity - mut_ = rho_*Cmu_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - - // Correct wall shear stresses - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA<wallFvPatch>(curPatch)) - { - symmTensorField& Rw = R_.boundaryField()[patchi]; - - const scalarField& rhow = rho_.boundaryField()[patchi]; - const scalarField& mutw = mut_.boundaryField()[patchi]; - - const vectorField snGradU(U_.boundaryField()[patchi].snGrad()); - - const vectorField& faceAreas - = mesh_.Sf().boundaryField()[patchi]; - - const scalarField& magFaceAreas - = mesh_.magSf().boundaryField()[patchi]; - - forAll(curPatch, facei) - { - // Calculate near-wall velocity gradient - tensor gradUw - = (faceAreas[facei]/magFaceAreas[facei])*snGradU[facei]; - - // Calculate near-wall shear-stress tensor - tensor tauw = -(mutw[facei]/rhow[facei])*2*dev(symm(gradUw)); - - // Reset the shear components of the stress tensor - Rw[facei].xy() = tauw.xy(); - Rw[facei].xz() = tauw.xz(); - Rw[facei].yz() = tauw.yz(); - } - } - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/LRR/LRR.H b/src/turbulenceModels/compressible/RAS/LRR/LRR.H deleted file mode 100644 index a80bf4171..000000000 --- a/src/turbulenceModels/compressible/RAS/LRR/LRR.H +++ /dev/null @@ -1,210 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::RASModels::LRR - -Group - grpCmpRASTurbulence - -Description - Launder, Reece and Rodi Reynolds-stress turbulence model for - compressible flows. - - The default model coefficients correspond to the following: - \verbatim - LRRCoeffs - { - Cmu 0.09; - Clrr1 1.8; - Clrr2 0.6; - C1 1.44; - C2 1.92; - Cs 0.25; - Ceps 0.15; - Prt 1.0; // only for compressible - sigmaEps 1.3; - sigmaR 0.81967; // only for compressible - couplingFactor 0.0; // only for incompressible - } - \endverbatim - -SourceFiles - LRR.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleLRR_H -#define compressibleLRR_H - -#include "RASModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class LRR Declaration -\*---------------------------------------------------------------------------*/ - -class LRR -: - public RASModel -{ - -protected: - - // Protected data - - // Model coefficients - - dimensionedScalar Cmu_; - - dimensionedScalar Clrr1_; - dimensionedScalar Clrr2_; - - dimensionedScalar C1_; - dimensionedScalar C2_; - dimensionedScalar Cs_; - dimensionedScalar Ceps_; - - dimensionedScalar couplingFactor_; - - dimensionedScalar sigmaR_; - dimensionedScalar sigmaEps_; - dimensionedScalar Prt_; - - - // Fields - - volSymmTensorField R_; - volScalarField k_; - volScalarField epsilon_; - volScalarField mut_; - volScalarField alphat_; - - -public: - - //- Runtime type information - TypeName("LRR"); - - // Constructors - - //- Construct from components - LRR - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~LRR() - {} - - - // Member Functions - - //- Return the effective diffusivity for R - tmp<volScalarField> DREff() const - { - return tmp<volScalarField> - ( - new volScalarField("DREff", mut_/sigmaR_ + mu()) - ); - } - - //- Return the effective diffusivity for epsilon - tmp<volScalarField> DepsilonEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu()) - ); - } - - //- Return the turbulence viscosity - virtual tmp<volScalarField> mut() const - { - return mut_; - } - - //- Return the turbulence thermal diffusivity - virtual tmp<volScalarField> alphat() const - { - return alphat_; - } - - //- Return the turbulence kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp<volScalarField> epsilon() const - { - return epsilon_; - } - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const - { - return R_; - } - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devRhoReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C deleted file mode 100644 index 60a1a53a1..000000000 --- a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ /dev/null @@ -1,524 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "LaunderGibsonRSTM.H" -#include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" - -#include "backwardsCompatibilityWallFunctions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(LaunderGibsonRSTM, 0); -addToRunTimeSelectionTable(RASModel, LaunderGibsonRSTM, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -LaunderGibsonRSTM::LaunderGibsonRSTM -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName, - const word& modelName -) -: - RASModel(modelName, rho, U, phi, thermophysicalModel, turbulenceModelName), - - Cmu_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cmu", - coeffDict_, - 0.09 - ) - ), - kappa_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "kappa", - coeffDict_, - 0.41 - ) - ), - Clg1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Clg1", - coeffDict_, - 1.8 - ) - ), - Clg2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Clg2", - coeffDict_, - 0.6 - ) - ), - C1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C1", - coeffDict_, - 1.44 - ) - ), - C2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C2", - coeffDict_, - 1.92 - ) - ), - Cs_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cs", - coeffDict_, - 0.25 - ) - ), - Ceps_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Ceps", - coeffDict_, - 0.15 - ) - ), - C1Ref_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C1Ref", - coeffDict_, - 0.5 - ) - ), - C2Ref_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C2Ref", - coeffDict_, - 0.3 - ) - ), - couplingFactor_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "couplingFactor", - coeffDict_, - 0.0 - ) - ), - sigmaR_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaR", - coeffDict_, - 0.81967 - ) - ), - sigmaEps_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaEps", - coeffDict_, - 1.3 - ) - ), - Prt_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Prt", - coeffDict_, - 1.0 - ) - ), - - n_(wallDist::New(mesh_).n()), - y_(wallDist::New(mesh_).y()), - - R_ - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - autoCreateR("R", mesh_) - ), - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateK("k", mesh_) - ), - epsilon_ - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateEpsilon("epsilon", mesh_) - ), - mut_ - ( - IOobject - ( - "mut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateMut("mut", mesh_) - ), - alphat_ - ( - IOobject - ( - "alphat", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateAlphat("alphat", mesh_) - ) -{ - if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0) - { - FatalErrorIn - ( - "LaunderGibsonRSTM::LaunderGibsonRSTM" - "(const volScalarField&, const volVectorField&" - ", const surfaceScalarField&, fluidThermo&)" - ) << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" << nl - << exit(FatalError); - } - - bound(k_, kMin_); - bound(epsilon_, epsilonMin_); - - mut_ = Cmu_*rho_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> LaunderGibsonRSTM::devRhoReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - rho_*R_ - mu()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> LaunderGibsonRSTM::divDevRhoReff(volVectorField& U) const -{ - if (couplingFactor_.value() > 0.0) - { - return - ( - fvc::div(rho_*R_ + couplingFactor_*mut_*fvc::grad(U)) - + fvc::laplacian((1.0 - couplingFactor_)*mut_, U) - - fvm::laplacian(muEff(), U) - - fvc::div(mu()*dev2(T(fvc::grad(U)))) - ); - } - else - { - return - ( - fvc::div(rho_*R_) - + fvc::laplacian(mut_, U) - - fvm::laplacian(muEff(), U) - - fvc::div(mu()*dev2(T(fvc::grad(U)))) - ); - } -} - - -bool LaunderGibsonRSTM::read() -{ - if (RASModel::read()) - { - Cmu_.readIfPresent(coeffDict()); - kappa_.readIfPresent(coeffDict()); - Clg1_.readIfPresent(coeffDict()); - Clg2_.readIfPresent(coeffDict()); - C1_.readIfPresent(coeffDict()); - C2_.readIfPresent(coeffDict()); - Cs_.readIfPresent(coeffDict()); - Ceps_.readIfPresent(coeffDict()); - C1Ref_.readIfPresent(coeffDict()); - C2Ref_.readIfPresent(coeffDict()); - sigmaR_.readIfPresent(coeffDict()); - sigmaEps_.readIfPresent(coeffDict()); - Prt_.readIfPresent(coeffDict()); - - couplingFactor_.readIfPresent(coeffDict()); - - if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0) - { - FatalErrorIn("LaunderGibsonRSTM::read()") - << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" << nl - << exit(FatalError); - } - - return true; - } - else - { - return false; - } -} - - -void LaunderGibsonRSTM::correct() -{ - if (!turbulence_) - { - // Re-calculate viscosity - mut_ = rho_*Cmu_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - return; - } - - RASModel::correct(); - - volSymmTensorField P(-twoSymm(R_ & fvc::grad(U_))); - volScalarField G(GName(), 0.5*mag(tr(P))); - - // Update epsilon and G at the wall - epsilon_.boundaryField().updateCoeffs(); - - // Dissipation equation - tmp<fvScalarMatrix> epsEqn - ( - fvm::ddt(rho_, epsilon_) - + fvm::div(phi_, epsilon_) - //- fvm::laplacian(Ceps*rho_*(k_/epsilon_)*R_, epsilon_) - - fvm::laplacian(DepsilonEff(), epsilon_) - == - C1_*rho_*G*epsilon_/k_ - - fvm::Sp(C2_*rho_*epsilon_/k_, epsilon_) - ); - - epsEqn().relax(); - - epsEqn().boundaryManipulate(epsilon_.boundaryField()); - - solve(epsEqn); - bound(epsilon_, epsilonMin_); - - - // Reynolds stress equation - - const fvPatchList& patches = mesh_.boundary(); - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA<wallFvPatch>(curPatch)) - { - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - P[faceCelli] *= min - ( - G[faceCelli]/(0.5*mag(tr(P[faceCelli])) + SMALL), - 100.0 - ); - } - } - } - - volSymmTensorField reflect(C1Ref_*epsilon_/k_*R_ - C2Ref_*Clg2_*dev(P)); - - tmp<fvSymmTensorMatrix> REqn - ( - fvm::ddt(rho_, R_) - + fvm::div(phi_, R_) - //- fvm::laplacian(Cs*rho_*(k_/epsilon_)*R_, R_) - - fvm::laplacian(DREff(), R_) - + fvm::Sp(Clg1_*rho_*epsilon_/k_, R_) - == - rho_*P - + (2.0/3.0*(Clg1_ - 1)*I)*rho_*epsilon_ - - Clg2_*rho_*dev(P) - - // wall reflection terms - + symm - ( - I*((n_ & reflect) & n_) - - 1.5*(n_*(reflect & n_) - + (n_ & reflect)*n_) - )*pow(Cmu_, 0.75)*rho_*pow(k_, 1.5)/(kappa_*y_*epsilon_) - ); - - REqn().relax(); - solve(REqn); - - R_.max - ( - dimensionedSymmTensor - ( - "zero", - R_.dimensions(), - symmTensor - ( - kMin_.value(), -GREAT, -GREAT, - kMin_.value(), -GREAT, - kMin_.value() - ) - ) - ); - - k_ == 0.5*tr(R_); - bound(k_, kMin_); - - - // Re-calculate turbulent viscosity - mut_ = Cmu_*rho_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - // Correct wall shear stresses - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA<wallFvPatch>(curPatch)) - { - symmTensorField& Rw = R_.boundaryField()[patchi]; - - const scalarField& mutw = mut_.boundaryField()[patchi]; - const scalarField& rhow = rho_.boundaryField()[patchi]; - - const vectorField snGradU(U_.boundaryField()[patchi].snGrad()); - - const vectorField& faceAreas - = mesh_.Sf().boundaryField()[patchi]; - - const scalarField& magFaceAreas - = mesh_.magSf().boundaryField()[patchi]; - - forAll(curPatch, facei) - { - // Calculate near-wall velocity gradient - tensor gradUw - = (faceAreas[facei]/magFaceAreas[facei])*snGradU[facei]; - - // Calculate near-wall shear-stress tensor - tensor tauw = -(mutw[facei]/rhow[facei])*2*dev(symm(gradUw)); - - // Reset the shear components of the stress tensor - Rw[facei].xy() = tauw.xy(); - Rw[facei].xz() = tauw.xz(); - Rw[facei].yz() = tauw.yz(); - } - } - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H deleted file mode 100644 index b3aa0ddb5..000000000 --- a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H +++ /dev/null @@ -1,220 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::RASModels::LaunderGibsonRSTM - -Group - grpCmpRASTurbulence - -Description - Launder-Gibson Reynolds stress turbulence model for compressible flows. - - The default model coefficients correspond to the following: - \verbatim - LaunderGibsonRSTMCoeffs - { - Cmu 0.09; - kappa 0.41; - Clg1 1.8; - Clg2 0.6; - C1 1.44; - C2 1.92; - C1Ref 0.5; - C2Ref 0.3; - Cs 0.25; - Ceps 0.15; - sigmah 1.0; // only for compressible - sigmaEps 1.3; - sigmaR 0.81967; - couplingFactor 0.0; - } - \endverbatim - -SourceFiles - LaunderGibsonRSTM.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleLaunderGibsonRSTM_H -#define compressibleLaunderGibsonRSTM_H - -#include "RASModel.H" -#include "wallDist.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class LaunderGibsonRSTM Declaration -\*---------------------------------------------------------------------------*/ - -class LaunderGibsonRSTM -: - public RASModel -{ - -protected: - - // Protected data - - // Model coefficients - - dimensionedScalar Cmu_; - dimensionedScalar kappa_; - - dimensionedScalar Clg1_; - dimensionedScalar Clg2_; - - dimensionedScalar C1_; - dimensionedScalar C2_; - dimensionedScalar Cs_; - dimensionedScalar Ceps_; - - dimensionedScalar C1Ref_; - dimensionedScalar C2Ref_; - - dimensionedScalar couplingFactor_; - - dimensionedScalar sigmaR_; - dimensionedScalar sigmaEps_; - dimensionedScalar Prt_; - - - // Fields - - const volVectorField& n_; - const volScalarField& y_; - - volSymmTensorField R_; - volScalarField k_; - volScalarField epsilon_; - volScalarField mut_; - volScalarField alphat_; - - -public: - - //- Runtime type information - TypeName("LaunderGibsonRSTM"); - - // Constructors - - //- Construct from components - LaunderGibsonRSTM - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~LaunderGibsonRSTM() - {} - - - // Member Functions - - //- Return the effective diffusivity for R - tmp<volScalarField> DREff() const - { - return tmp<volScalarField> - ( - new volScalarField("DREff", mut_/sigmaR_ + mu()) - ); - } - - //- Return the effective diffusivity for epsilon - tmp<volScalarField> DepsilonEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu()) - ); - } - - //- Return the turbulence viscosity - virtual tmp<volScalarField> mut() const - { - return mut_; - } - - //- Return the turbulence thermal diffusivity - virtual tmp<volScalarField> alphat() const - { - return alphat_; - } - - //- Return the turbulence kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp<volScalarField> epsilon() const - { - return epsilon_; - } - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const - { - return R_; - } - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devRhoReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C b/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C deleted file mode 100644 index 6a7d0a1ab..000000000 --- a/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C +++ /dev/null @@ -1,363 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "LaunderSharmaKE.H" -#include "addToRunTimeSelectionTable.H" - -#include "backwardsCompatibilityWallFunctions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(LaunderSharmaKE, 0); -addToRunTimeSelectionTable(RASModel, LaunderSharmaKE, dictionary); - -// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // - -tmp<volScalarField> LaunderSharmaKE::fMu() const -{ - return exp(-3.4/sqr(scalar(1) + rho_*sqr(k_)/(mu()*epsilon_)/50.0)); -} - - -tmp<volScalarField> LaunderSharmaKE::f2() const -{ - return - scalar(1) - - 0.3*exp(-min(sqr(rho_*sqr(k_)/(mu()*epsilon_)), scalar(50.0))); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -LaunderSharmaKE::LaunderSharmaKE -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName, - const word& modelName -) -: - RASModel(modelName, rho, U, phi, thermophysicalModel, turbulenceModelName), - - Cmu_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cmu", - coeffDict_, - 0.09 - ) - ), - C1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C1", - coeffDict_, - 1.44 - ) - ), - C2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C2", - coeffDict_, - 1.92 - ) - ), - C3_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C3", - coeffDict_, - -0.33 - ) - ), - sigmak_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmak", - coeffDict_, - 1.0 - ) - ), - sigmaEps_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaEps", - coeffDict_, - 1.3 - ) - ), - Prt_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Prt", - coeffDict_, - 1.0 - ) - ), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - epsilon_ - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - mut_ - ( - IOobject - ( - "mut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateLowReMut("mut", mesh_) - ), - - alphat_ - ( - IOobject - ( - "alphat", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateAlphat("alphat", mesh_) - ) -{ - bound(k_, kMin_); - bound(epsilon_, epsilonMin_); - - mut_ = rho_*Cmu_*fMu()*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> LaunderSharmaKE::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - (mut_/rho_)*dev(twoSymm(fvc::grad(U_))), - k_.boundaryField().types() - ) - ); -} - - -tmp<volSymmTensorField> LaunderSharmaKE::devRhoReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -muEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> LaunderSharmaKE::divDevRhoReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U)))) - ); -} - - -bool LaunderSharmaKE::read() -{ - if (RASModel::read()) - { - Cmu_.readIfPresent(coeffDict()); - C1_.readIfPresent(coeffDict()); - C2_.readIfPresent(coeffDict()); - C3_.readIfPresent(coeffDict()); - sigmak_.readIfPresent(coeffDict()); - sigmaEps_.readIfPresent(coeffDict()); - Prt_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -void LaunderSharmaKE::correct() -{ - if (!turbulence_) - { - // Re-calculate viscosity - mut_ == rho_*Cmu_*fMu()*sqr(k_)/epsilon_; - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - return; - } - - RASModel::correct(); - - // Calculate parameters and coefficients for Launder-Sharma low-Reynolds - // number model - - volScalarField E(2.0*mu()*mut_*fvc::magSqrGradGrad(U_)/rho_); - volScalarField D(2.0*mu()*magSqr(fvc::grad(sqrt(k_)))/rho_); - - volScalarField divU(fvc::div(phi_/fvc::interpolate(rho_))); - - if (mesh_.moving()) - { - divU += fvc::div(mesh_.phi()); - } - - tmp<volTensorField> tgradU = fvc::grad(U_); - volScalarField G(GName(), mut_*(tgradU() && dev(twoSymm(tgradU())))); - tgradU.clear(); - - - // Dissipation equation - - tmp<fvScalarMatrix> epsEqn - ( - fvm::ddt(rho_, epsilon_) - + fvm::div(phi_, epsilon_) - - fvm::laplacian(DepsilonEff(), epsilon_) - == - C1_*G*epsilon_/k_ - - fvm::SuSp(((2.0/3.0)*C1_ + C3_)*rho_*divU, epsilon_) - - fvm::Sp(C2_*f2()*rho_*epsilon_/k_, epsilon_) - + E - ); - - epsEqn().relax(); - solve(epsEqn); - bound(epsilon_, epsilonMin_); - - - // Turbulent kinetic energy equation - - tmp<fvScalarMatrix> kEqn - ( - fvm::ddt(rho_, k_) - + fvm::div(phi_, k_) - - fvm::laplacian(DkEff(), k_) - == - G - fvm::SuSp(2.0/3.0*rho_*divU, k_) - - fvm::Sp(rho_*(epsilon_ + D)/k_, k_) - ); - - kEqn().relax(); - solve(kEqn); - bound(k_, kMin_); - - - // Re-calculate viscosity - mut_ == Cmu_*fMu()*rho_*sqr(k_)/epsilon_; - - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/Make/files b/src/turbulenceModels/compressible/RAS/Make/files deleted file mode 100644 index e107b6793..000000000 --- a/src/turbulenceModels/compressible/RAS/Make/files +++ /dev/null @@ -1,55 +0,0 @@ -/* RAS turbulence models */ -RASModel/RASModel.C -laminar/laminar.C -kEpsilon/kEpsilon.C -RNGkEpsilon/RNGkEpsilon.C -LaunderSharmaKE/LaunderSharmaKE.C -LRR/LRR.C -LaunderGibsonRSTM/LaunderGibsonRSTM.C -realizableKE/realizableKE.C -SpalartAllmaras/SpalartAllmaras.C -kOmegaSST/kOmegaSST.C -v2f/v2f.C - -/* Wall functions */ -wallFunctions = derivedFvPatchFields/wallFunctions - -alphatWallFunctions = $(wallFunctions)/alphatWallFunctions -$(alphatWallFunctions)/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C -$(alphatWallFunctions)/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C - -mutWallFunctions = $(wallFunctions)/mutWallFunctions -$(mutWallFunctions)/mutWallFunction/mutWallFunctionFvPatchScalarField.C - -$(mutWallFunctions)/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C -$(mutWallFunctions)/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C - -$(mutWallFunctions)/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C -$(mutWallFunctions)/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C -$(mutWallFunctions)/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C -$(mutWallFunctions)/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.C - -epsilonWallFunctions = $(wallFunctions)/epsilonWallFunctions -$(epsilonWallFunctions)/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C -$(epsilonWallFunctions)/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.C - -fWallFunctions = $(wallFunctions)/fWallFunctions -$(fWallFunctions)/fWallFunction/fWallFunctionFvPatchScalarField.C - -omegaWallFunctions = $(wallFunctions)/omegaWallFunctions -$(omegaWallFunctions)/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C - -kqRWallFunctions = $(wallFunctions)/kqRWallFunctions -$(kqRWallFunctions)/kqRWallFunction/kqRWallFunctionFvPatchFields.C -$(kqRWallFunctions)/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C - -v2WallFunctions = $(wallFunctions)/v2WallFunctions -$(v2WallFunctions)/v2WallFunction/v2WallFunctionFvPatchScalarField.C - -/* Patch fields */ -derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C -derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C -derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C -backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C - -LIB = $(FOAM_LIBBIN)/libcompressibleRASModels diff --git a/src/turbulenceModels/compressible/RAS/Make/options b/src/turbulenceModels/compressible/RAS/Make/options deleted file mode 100644 index 8b8e57cd1..000000000 --- a/src/turbulenceModels/compressible/RAS/Make/options +++ /dev/null @@ -1,13 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -LIB_LIBS = \ - -lcompressibleTurbulenceModel \ - -lfiniteVolume \ - -lfluidThermophysicalModels \ - -lspecie \ - -lmeshTools diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C deleted file mode 100644 index 7e09a4b1a..000000000 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C +++ /dev/null @@ -1,210 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "RASModel.H" -#include "wallFvPatch.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(RASModel, 0); -defineRunTimeSelectionTable(RASModel, dictionary); -addToRunTimeSelectionTable(turbulenceModel, RASModel, turbulenceModel); - -// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // - -void RASModel::printCoeffs() -{ - if (printCoeffs_) - { - Info<< type() << "Coeffs" << coeffDict_ << endl; - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -RASModel::RASModel -( - const word& type, - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName -) -: - turbulenceModel(rho, U, phi, thermophysicalModel, turbulenceModelName), - - IOdictionary - ( - IOobject - ( - "RASProperties", - U.time().constant(), - U.db(), - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) - ), - - turbulence_(lookup("turbulence")), - printCoeffs_(lookupOrDefault<Switch>("printCoeffs", false)), - coeffDict_(subOrEmptyDict(type + "Coeffs")), - - kMin_("kMin", sqr(dimVelocity), SMALL), - epsilonMin_("epsilonMin", kMin_.dimensions()/dimTime, SMALL), - omegaMin_("omegaMin", dimless/dimTime, SMALL) -{ - kMin_.readIfPresent(*this); - epsilonMin_.readIfPresent(*this); - omegaMin_.readIfPresent(*this); - - // Force the construction of the mesh deltaCoeffs which may be needed - // for the construction of the derived models and BCs - mesh_.deltaCoeffs(); -} - - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -autoPtr<RASModel> RASModel::New -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName -) -{ - // get model name, but do not register the dictionary - // otherwise it is registered in the database twice - const word modelType - ( - IOdictionary - ( - IOobject - ( - "RASProperties", - U.time().constant(), - U.db(), - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) - ).lookup("RASModel") - ); - - Info<< "Selecting RAS turbulence model " << modelType << endl; - - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); - - if (cstrIter == dictionaryConstructorTablePtr_->end()) - { - FatalErrorIn - ( - "RASModel::New" - "(" - "const volScalarField&, " - "const volVectorField&, " - "const surfaceScalarField&, " - "fluidThermo&, " - "const word&" - ")" - ) << "Unknown RASModel type " - << modelType << nl << nl - << "Valid RASModel types:" << endl - << dictionaryConstructorTablePtr_->sortedToc() - << exit(FatalError); - } - - return autoPtr<RASModel> - ( - cstrIter()(rho, U, phi, thermophysicalModel, turbulenceModelName) - ); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void RASModel::correct() -{ - turbulenceModel::correct(); -} - - -bool RASModel::read() -{ - //if (regIOobject::read()) - - // Bit of trickery : we are both IOdictionary ('RASProperties') and - // an regIOobject from the turbulenceModel level. Problem is to distinguish - // between the two - we only want to reread the IOdictionary. - - bool ok = IOdictionary::readData - ( - IOdictionary::readStream - ( - IOdictionary::type() - ) - ); - IOdictionary::close(); - - if (ok) - { - lookup("turbulence") >> turbulence_; - - if (const dictionary* dictPtr = subDictPtr(type() + "Coeffs")) - { - coeffDict_ <<= *dictPtr; - } - - kMin_.readIfPresent(*this); - epsilonMin_.readIfPresent(*this); - omegaMin_.readIfPresent(*this); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H deleted file mode 100644 index 6780860b8..000000000 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H +++ /dev/null @@ -1,268 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Namespace - Foam::compressible::RASModels - -Description - Namespace for compressible RAS turbulence models. - -Class - Foam::compressible::RASModel - -Description - Abstract base class for turbulence models for compressible and combusting - flows. - -SourceFiles - RASModel.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleRASModel_H -#define compressibleRASModel_H - -#include "compressible/turbulenceModel/turbulenceModel.H" -#include "volFields.H" -#include "surfaceFields.H" -#include "fvm.H" -#include "fvc.H" -#include "fvMatrices.H" -#include "fluidThermo.H" -#include "IOdictionary.H" -#include "Switch.H" -#include "bound.H" -#include "autoPtr.H" -#include "runTimeSelectionTables.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class RASModel Declaration -\*---------------------------------------------------------------------------*/ - -class RASModel -: - public turbulenceModel, - public IOdictionary -{ - -protected: - - // Protected data - - //- Turbulence on/off flag - Switch turbulence_; - - //- Flag to print the model coeffs at run-time - Switch printCoeffs_; - - //- Model coefficients dictionary - dictionary coeffDict_; - - //- Lower limit of k - dimensionedScalar kMin_; - - //- Lower limit of epsilon - dimensionedScalar epsilonMin_; - - //- Lower limit for omega - dimensionedScalar omegaMin_; - - - // Protected Member Functions - - //- Print model coefficients - virtual void printCoeffs(); - - -private: - - // Private Member Functions - - //- Disallow default bitwise copy construct - RASModel(const RASModel&); - - //- Disallow default bitwise assignment - void operator=(const RASModel&); - - -public: - - //- Runtime type information - TypeName("RASModel"); - - - // Declare run-time constructor selection table - - declareRunTimeSelectionTable - ( - autoPtr, - RASModel, - dictionary, - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName - ), - (rho, U, phi, thermoPhysicalModel, turbulenceModelName) - ); - - - // Constructors - - //- Construct from components - RASModel - ( - const word& type, - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName - ); - - - // Selectors - - //- Return a reference to the selected RAS model - static autoPtr<RASModel> New - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName - ); - - - //- Destructor - virtual ~RASModel() - {} - - - // Member Functions - - // Access - - //- Return the lower allowable limit for k (default: SMALL) - const dimensionedScalar& kMin() const - { - return kMin_; - } - - //- Return the lower allowable limit for epsilon (default: SMALL) - const dimensionedScalar& epsilonMin() const - { - return epsilonMin_; - } - - //- Return the lower allowable limit for omega (default: SMALL) - const dimensionedScalar& omegaMin() const - { - return omegaMin_; - } - - //- Allow kMin to be changed - dimensionedScalar& kMin() - { - return kMin_; - } - - //- Allow epsilonMin to be changed - dimensionedScalar& epsilonMin() - { - return epsilonMin_; - } - - //- Allow omegaMin to be changed - dimensionedScalar& omegaMin() - { - return omegaMin_; - } - - //- Const access to the coefficients dictionary - virtual const dictionary& coeffDict() const - { - return coeffDict_; - } - - - //- Return the effective viscosity - virtual tmp<volScalarField> muEff() const - { - return tmp<volScalarField> - ( - new volScalarField("muEff", mut() + mu()) - ); - } - - //- Return the effective turbulent temperature diffusivity - virtual tmp<volScalarField> kappaEff() const - { - return thermo().kappaEff(alphat()); - } - - //- Return the effective turbulent temperature diffusivity for a patch - virtual tmp<scalarField> kappaEff(const label patchI) const - { - return thermo().kappaEff(alphat(patchI), patchI); - } - - //- Return the effective turbulent thermal diffusivity - virtual tmp<volScalarField> alphaEff() const - { - return thermo().alphaEff(alphat()); - } - - //- Return the effective turbulent thermal diffusivity for a patch - virtual tmp<scalarField> alphaEff(const label patchI) const - { - return thermo().alphaEff(alphat(patchI), patchI); - } - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.C b/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.C deleted file mode 100644 index 58ad1f571..000000000 --- a/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.C +++ /dev/null @@ -1,372 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "RNGkEpsilon.H" -#include "addToRunTimeSelectionTable.H" - -#include "backwardsCompatibilityWallFunctions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(RNGkEpsilon, 0); -addToRunTimeSelectionTable(RASModel, RNGkEpsilon, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -RNGkEpsilon::RNGkEpsilon -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName, - const word& modelName -) -: - RASModel(modelName, rho, U, phi, thermophysicalModel, turbulenceModelName), - - Cmu_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cmu", - coeffDict_, - 0.0845 - ) - ), - C1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C1", - coeffDict_, - 1.42 - ) - ), - C2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C2", - coeffDict_, - 1.68 - ) - ), - C3_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C3", - coeffDict_, - -0.33 - ) - ), - sigmak_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmak", - coeffDict_, - 0.71942 - ) - ), - sigmaEps_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaEps", - coeffDict_, - 0.71942 - ) - ), - Prt_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Prt", - coeffDict_, - 1.0 - ) - ), - eta0_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "eta0", - coeffDict_, - 4.38 - ) - ), - beta_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "beta", - coeffDict_, - 0.012 - ) - ), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateK("k", mesh_) - ), - epsilon_ - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateEpsilon("epsilon", mesh_) - ), - mut_ - ( - IOobject - ( - "mut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateMut("mut", mesh_) - ), - alphat_ - ( - IOobject - ( - "alphat", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateAlphat("alphat", mesh_) - ) -{ - bound(k_, kMin_); - bound(epsilon_, epsilonMin_); - - mut_ = Cmu_*rho_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> RNGkEpsilon::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - (mut_/rho_)*dev(twoSymm(fvc::grad(U_))), - k_.boundaryField().types() - ) - ); -} - - -tmp<volSymmTensorField> RNGkEpsilon::devRhoReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -muEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> RNGkEpsilon::divDevRhoReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U)))) - ); -} - - -bool RNGkEpsilon::read() -{ - if (RASModel::read()) - { - Cmu_.readIfPresent(coeffDict()); - C1_.readIfPresent(coeffDict()); - C2_.readIfPresent(coeffDict()); - C3_.readIfPresent(coeffDict()); - Prt_.readIfPresent(coeffDict()); - sigmaEps_.readIfPresent(coeffDict()); - Prt_.readIfPresent(coeffDict()); - eta0_.readIfPresent(coeffDict()); - beta_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -void RNGkEpsilon::correct() -{ - if (!turbulence_) - { - // Re-calculate viscosity - mut_ = rho_*Cmu_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - return; - } - - RASModel::correct(); - - volScalarField divU(fvc::div(phi_/fvc::interpolate(rho_))); - - if (mesh_.moving()) - { - divU += fvc::div(mesh_.phi()); - } - - tmp<volTensorField> tgradU = fvc::grad(U_); - volScalarField S2((tgradU() && dev(twoSymm(tgradU())))); - tgradU.clear(); - - volScalarField G(GName(), mut_*S2); - - volScalarField eta(sqrt(mag(S2))*k_/epsilon_); - volScalarField eta3(eta*sqr(eta)); - - volScalarField R - ( - ((eta*(-eta/eta0_ + scalar(1)))/(beta_*eta3 + scalar(1))) - ); - - // Update epsilon and G at the wall - epsilon_.boundaryField().updateCoeffs(); - - // Dissipation equation - tmp<fvScalarMatrix> epsEqn - ( - fvm::ddt(rho_, epsilon_) - + fvm::div(phi_, epsilon_) - - fvm::laplacian(DepsilonEff(), epsilon_) - == - (C1_ - R)*G*epsilon_/k_ - - fvm::SuSp(((2.0/3.0)*C1_ + C3_)*rho_*divU, epsilon_) - - fvm::Sp(C2_*rho_*epsilon_/k_, epsilon_) - ); - - epsEqn().relax(); - - epsEqn().boundaryManipulate(epsilon_.boundaryField()); - - solve(epsEqn); - bound(epsilon_, epsilonMin_); - - - // Turbulent kinetic energy equation - - tmp<fvScalarMatrix> kEqn - ( - fvm::ddt(rho_, k_) - + fvm::div(phi_, k_) - - fvm::laplacian(DkEff(), k_) - == - G - fvm::SuSp(2.0/3.0*rho_*divU, k_) - - fvm::Sp(rho_*epsilon_/k_, k_) - ); - - kEqn().relax(); - solve(kEqn); - bound(k_, kMin_); - - - // Re-calculate viscosity - mut_ = rho_*Cmu_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.H b/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.H deleted file mode 100644 index ba8061365..000000000 --- a/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.H +++ /dev/null @@ -1,210 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::RASModels::RNGkEpsilon - -Group - grpCmpRASTurbulence - -Description - Renormalisation group k-epsilon turbulence model for compressible flows - including rapid distortion theory (RDT) based compression term. - - References: - \verbatim - "Development of Turbulence Models for Shear Flow by a - Double Expansion Technique", - Yakhot, V., Orszag, S.A., Thangam, S., Gatski, T.B. and Speziale, C.G.", - Physics of Fluids A, Vol. 4, No. 7, 1992, pp 1510-1520. - - For the RDT-based compression term: - "k-epsilon equations for compressible reciprocating engine flows" - El Tahry, S. H., - AIAA Journal of Energy 7, 1983, pp 345-353. - \endverbatim - - The default model coefficients correspond to the following: - \verbatim - RNGkEpsilonCoeffs - { - Cmu 0.0845; - C1 1.42; - C2 1.68; - C3 -0.33; // only for compressible - Prt 1.0; // only for compressible - sigmak 0.71942; - sigmaEps 0.71942; - eta0 4.38; - beta 0.012; - } - \endverbatim - -SourceFiles - RNGkEpsilon.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleRNGkEpsilon_H -#define compressibleRNGkEpsilon_H - -#include "RASModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class RNGkEpsilon Declaration -\*---------------------------------------------------------------------------*/ - -class RNGkEpsilon -: - public RASModel -{ - -protected: - - // Protected data - - // Model coefficients - - dimensionedScalar Cmu_; - dimensionedScalar C1_; - dimensionedScalar C2_; - dimensionedScalar C3_; - dimensionedScalar sigmak_; - dimensionedScalar sigmaEps_; - dimensionedScalar Prt_; - dimensionedScalar eta0_; - dimensionedScalar beta_; - - // Fields - - volScalarField k_; - volScalarField epsilon_; - volScalarField mut_; - volScalarField alphat_; - - -public: - - //- Runtime type information - TypeName("RNGkEpsilon"); - - // Constructors - - //- Construct from components - RNGkEpsilon - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~RNGkEpsilon() - {} - - - // Member Functions - - //- Return the effective diffusivity for k - tmp<volScalarField> DkEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DkEff", mut_/sigmak_ + mu()) - ); - } - - //- Return the effective diffusivity for epsilon - tmp<volScalarField> DepsilonEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu()) - ); - } - - //- Return the turbulence viscosity - virtual tmp<volScalarField> mut() const - { - return mut_; - } - - //- Return the turbulence thermal diffusivity - virtual tmp<volScalarField> alphat() const - { - return alphat_; - } - - //- Return the turbulence kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp<volScalarField> epsilon() const - { - return epsilon_; - } - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devRhoReff() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.C deleted file mode 100644 index bd54bd80f..000000000 --- a/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.C +++ /dev/null @@ -1,479 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "SpalartAllmaras.H" -#include "addToRunTimeSelectionTable.H" - -#include "backwardsCompatibilityWallFunctions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(SpalartAllmaras, 0); -addToRunTimeSelectionTable(RASModel, SpalartAllmaras, dictionary); - -// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // - -tmp<volScalarField> SpalartAllmaras::chi() const -{ - return rho_*nuTilda_/mu(); -} - - -tmp<volScalarField> SpalartAllmaras::fv1(const volScalarField& chi) const -{ - const volScalarField chi3(pow3(chi)); - return chi3/(chi3 + pow3(Cv1_)); -} - - -tmp<volScalarField> SpalartAllmaras::fv2 -( - const volScalarField& chi, - const volScalarField& fv1 -) const -{ - if (ashfordCorrection_) - { - return 1.0/pow3(scalar(1) + chi/Cv2_); - } - else - { - return 1.0 - chi/(1.0 + chi*fv1); - } -} - - -tmp<volScalarField> SpalartAllmaras::fv3 -( - const volScalarField& chi, - const volScalarField& fv1 -) const -{ - if (ashfordCorrection_) - { - const volScalarField chiByCv2((1/Cv2_)*chi); - - return - (scalar(1) + chi*fv1) - *(1/Cv2_) - *(3*(scalar(1) + chiByCv2) + sqr(chiByCv2)) - /pow3(scalar(1) + chiByCv2); - } - else - { - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "fv3", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("fv3", dimless, 1), - zeroGradientFvPatchScalarField::typeName - ) - ); - } -} - - -tmp<volScalarField> SpalartAllmaras::fw(const volScalarField& Stilda) const -{ - volScalarField r - ( - min - ( - nuTilda_ - /( - max - ( - Stilda, - dimensionedScalar("SMALL", Stilda.dimensions(), SMALL) - ) - *sqr(kappa_*y_) - ), - scalar(10.0) - ) - ); - r.boundaryField() == 0.0; - - const volScalarField g(r + Cw2_*(pow6(r) - r)); - - return g*pow((1.0 + pow6(Cw3_))/(pow6(g) + pow6(Cw3_)), 1.0/6.0); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -SpalartAllmaras::SpalartAllmaras -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName, - const word& modelName -) -: - RASModel(modelName, rho, U, phi, thermophysicalModel, turbulenceModelName), - - sigmaNut_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaNut", - coeffDict_, - 0.66666 - ) - ), - kappa_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "kappa", - coeffDict_, - 0.41 - ) - ), - Prt_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Prt", - coeffDict_, - 1.0 - ) - ), - - Cb1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cb1", - coeffDict_, - 0.1355 - ) - ), - Cb2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cb2", - coeffDict_, - 0.622 - ) - ), - Cw1_(Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_), - Cw2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cw2", - coeffDict_, - 0.3 - ) - ), - Cw3_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cw3", - coeffDict_, - 2.0 - ) - ), - Cv1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cv1", - coeffDict_, - 7.1 - ) - ), - Cv2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cv2", - coeffDict_, - 5.0 - ) - ), - - nuTilda_ - ( - IOobject - ( - "nuTilda", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - mut_ - ( - IOobject - ( - "mut", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - alphat_ - ( - IOobject - ( - "alphat", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateAlphat("alphat", mesh_) - ), - - y_(wallDist::New(mesh_).y()) -{ - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - printCoeffs(); - - if (ashfordCorrection_) - { - Info<< " Employing Ashford correction" << endl; - } -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volScalarField> SpalartAllmaras::k() const -{ - WarningIn("tmp<volScalarField> SpalartAllmaras::k() const") - << "Turbulence kinetic energy not defined for Spalart-Allmaras model. " - << "Returning zero field" << endl; - - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_ - ), - mesh_, - dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 0) - ) - ); -} - - -tmp<volScalarField> SpalartAllmaras::epsilon() const -{ - WarningIn("tmp<volScalarField> SpalartAllmaras::epsilon() const") - << "Turbulence kinetic energy dissipation rate not defined for " - << "Spalart-Allmaras model. Returning zero field" - << endl; - - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_ - ), - mesh_, - dimensionedScalar("0", dimensionSet(0, 2, -3, 0, 0), 0) - ) - ); -} - - -tmp<volSymmTensorField> SpalartAllmaras::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k() - (mut_/rho_)*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<volSymmTensorField> SpalartAllmaras::devRhoReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -muEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> SpalartAllmaras::divDevRhoReff(volVectorField& U) const -{ - const volScalarField muEff_(muEff()); - - return - ( - - fvm::laplacian(muEff_, U) - - fvc::div(muEff_*dev2(T(fvc::grad(U)))) - ); -} - - -bool SpalartAllmaras::read() -{ - if (RASModel::read()) - { - sigmaNut_.readIfPresent(coeffDict()); - kappa_.readIfPresent(coeffDict()); - Prt_.readIfPresent(coeffDict()); - - Cb1_.readIfPresent(coeffDict()); - Cb2_.readIfPresent(coeffDict()); - Cw1_ = Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_; - Cw2_.readIfPresent(coeffDict()); - Cw3_.readIfPresent(coeffDict()); - Cv1_.readIfPresent(coeffDict()); - Cv2_.readIfPresent(coeffDict()); - - ashfordCorrection_.readIfPresent("ashfordCorrection", coeffDict()); - - return true; - } - else - { - return false; - } -} - - -void SpalartAllmaras::correct() -{ - if (!turbulence_) - { - // Re-calculate viscosity - mut_ = rho_*nuTilda_*fv1(chi()); - mut_.correctBoundaryConditions(); - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - return; - } - - RASModel::correct(); - - const volScalarField chi(this->chi()); - const volScalarField fv1(this->fv1(chi)); - - const volScalarField Stilda - ( - fv3(chi, fv1)*::sqrt(2.0)*mag(skew(fvc::grad(U_))) - + fv2(chi, fv1)*nuTilda_/sqr(kappa_*y_) - ); - - tmp<fvScalarMatrix> nuTildaEqn - ( - fvm::ddt(rho_, nuTilda_) - + fvm::div(phi_, nuTilda_) - - fvm::laplacian(DnuTildaEff(), nuTilda_) - - Cb2_/sigmaNut_*rho_*magSqr(fvc::grad(nuTilda_)) - == - Cb1_*rho_*Stilda*nuTilda_ - - fvm::Sp(Cw1_*fw(Stilda)*nuTilda_*rho_/sqr(y_), nuTilda_) - ); - - nuTildaEqn().relax(); - solve(nuTildaEqn); - bound(nuTilda_, dimensionedScalar("0", nuTilda_.dimensions(), 0.0)); - nuTilda_.correctBoundaryConditions(); - - // Re-calculate viscosity - mut_.internalField() = fv1*nuTilda_.internalField()*rho_.internalField(); - mut_.correctBoundaryConditions(); - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H deleted file mode 100644 index 0d366d71b..000000000 --- a/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H +++ /dev/null @@ -1,233 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::RASModels::SpalartAllmaras - -Group - grpCmpRASTurbulence - -Description - Spalart-Allmaras one-eqn mixing-length model for compressible - external flows. - - Reference: - \verbatim - "A One-Equation Turbulence Model for Aerodynamic Flows" - P.R. Spalart, - S.R. Allmaras, - La Recherche Aerospatiale, No. 1, 1994, pp. 5-21. - \endverbatim - - Extended according to: - \verbatim - "An Unstructured Grid Generation and Adaptive Solution Technique - for High Reynolds Number Compressible Flows" - G.A. Ashford, - Ph.D. thesis, University of Michigan, 1996. - \endverbatim - by using the optional flag \c ashfordCorrection - - The default model coefficients correspond to the following: - \verbatim - SpalartAllmarasCoeffs - { - Cb1 0.1355; - Cb2 0.622; - Cw2 0.3; - Cw3 2.0; - Cv1 7.1; - Cv2 5.0; - sigmaNut 0.66666; - Prt 1.0; // only for compressible - kappa 0.41; - } - \endverbatim - -SourceFiles - SpalartAllmaras.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleSpalartAllmaras_H -#define compressibleSpalartAllmaras_H - -#include "RASModel.H" -#include "wallDist.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class SpalartAllmaras Declaration -\*---------------------------------------------------------------------------*/ - -class SpalartAllmaras -: - public RASModel -{ - -protected: - - // Protected data - - // Model coefficients - - dimensionedScalar sigmaNut_; - dimensionedScalar kappa_; - dimensionedScalar Prt_; - - dimensionedScalar Cb1_; - dimensionedScalar Cb2_; - dimensionedScalar Cw1_; - dimensionedScalar Cw2_; - dimensionedScalar Cw3_; - dimensionedScalar Cv1_; - dimensionedScalar Cv2_; - - - //- Optional flag to activate the Ashford correction - Switch ashfordCorrection_; - - - // Fields - - volScalarField nuTilda_; - volScalarField mut_; - volScalarField alphat_; - - //- Wall distance - // Note: different to wall distance in parent RASModel - // which is for near-wall cells only - const volScalarField& y_; - - - // Protected Member Functions - - tmp<volScalarField> chi() const; - tmp<volScalarField> fv1(const volScalarField& chi) const; - tmp<volScalarField> fv2 - ( - const volScalarField& chi, - const volScalarField& fv1 - ) const; - tmp<volScalarField> fv3 - ( - const volScalarField& chi, - const volScalarField& fv1 - ) const; - tmp<volScalarField> fw(const volScalarField& Stilda) const; - - -public: - - //- Runtime type information - TypeName("SpalartAllmaras"); - - - // Constructors - - //- Construct from components - SpalartAllmaras - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~SpalartAllmaras() - {} - - - // Member Functions - - //- Return the effective diffusivity for nuTilda - tmp<volScalarField> DnuTildaEff() const - { - return tmp<volScalarField> - ( - new volScalarField - ( - "DnuTildaEff", - (rho_*nuTilda_ + mu())/sigmaNut_ - ) - ); - } - - //- Return the turbulence viscosity - virtual tmp<volScalarField> mut() const - { - return mut_; - } - - //- Return the turbulence thermal diffusivity - virtual tmp<volScalarField> alphat() const - { - return alphat_; - } - - //- Return the turbulence kinetic energy - virtual tmp<volScalarField> k() const; - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp<volScalarField> epsilon() const; - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devRhoReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C deleted file mode 100644 index 7846bec82..000000000 --- a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C +++ /dev/null @@ -1,357 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "backwardsCompatibilityWallFunctions.H" - -#include "volFields.H" -#include "calculatedFvPatchField.H" -#include "alphatWallFunctionFvPatchScalarField.H" -#include "mutkWallFunctionFvPatchScalarField.H" -#include "mutLowReWallFunctionFvPatchScalarField.H" -#include "epsilonWallFunctionFvPatchScalarField.H" -#include "kqRWallFunctionFvPatchField.H" -#include "omegaWallFunctionFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -tmp<volScalarField> autoCreateAlphat -( - const word& fieldName, - const fvMesh& mesh -) -{ - IOobject alphatHeader - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE, - false - ); - - if (alphatHeader.headerOk()) - { - return tmp<volScalarField>(new volScalarField(alphatHeader, mesh)); - } - else - { - Info<< "--> Creating " << fieldName - << " to employ run-time selectable wall functions" << endl; - - const fvBoundaryMesh& bm = mesh.boundary(); - - wordList alphatBoundaryTypes(bm.size()); - - forAll(bm, patchI) - { - if (isA<wallFvPatch>(bm[patchI])) - { - alphatBoundaryTypes[patchI] = - alphatWallFunctionFvPatchScalarField::typeName; - } - else - { - alphatBoundaryTypes[patchI] = - calculatedFvPatchField<scalar>::typeName; - } - } - - tmp<volScalarField> alphat - ( - new volScalarField - ( - IOobject - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - dimensionedScalar("zero", dimDensity*dimArea/dimTime, 0.0), - alphatBoundaryTypes - ) - ); - - Info<< " Writing new " << fieldName << endl; - alphat().write(); - - return alphat; - } -} - - -tmp<volScalarField> autoCreateMut -( - const word& fieldName, - const fvMesh& mesh -) -{ - IOobject mutHeader - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE, - false - ); - - if (mutHeader.headerOk()) - { - return tmp<volScalarField>(new volScalarField(mutHeader, mesh)); - } - else - { - Info<< "--> Creating " << fieldName - << " to employ run-time selectable wall functions" << endl; - - const fvBoundaryMesh& bm = mesh.boundary(); - - wordList mutBoundaryTypes(bm.size()); - - forAll(bm, patchI) - { - if (isA<wallFvPatch>(bm[patchI])) - { - mutBoundaryTypes[patchI] = - mutkWallFunctionFvPatchScalarField::typeName; - } - else - { - mutBoundaryTypes[patchI] = - calculatedFvPatchField<scalar>::typeName; - } - } - - tmp<volScalarField> mut - ( - new volScalarField - ( - IOobject - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - dimensionedScalar("zero", dimDensity*dimArea/dimTime, 0.0), - mutBoundaryTypes - ) - ); - - Info<< " Writing new " << fieldName << endl; - mut().write(); - - return mut; - } -} - - -tmp<volScalarField> autoCreateLowReMut -( - const word& fieldName, - const fvMesh& mesh -) -{ - IOobject mutHeader - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE, - false - ); - - if (mutHeader.headerOk()) - { - return tmp<volScalarField>(new volScalarField(mutHeader, mesh)); - } - else - { - Info<< "--> Creating " << fieldName - << " to employ run-time selectable wall functions" << endl; - - const fvBoundaryMesh& bm = mesh.boundary(); - - wordList mutBoundaryTypes(bm.size()); - - forAll(bm, patchI) - { - if (isA<wallFvPatch>(bm[patchI])) - { - mutBoundaryTypes[patchI] = - mutLowReWallFunctionFvPatchScalarField::typeName; - } - else - { - mutBoundaryTypes[patchI] = - calculatedFvPatchField<scalar>::typeName; - } - } - - tmp<volScalarField> mut - ( - new volScalarField - ( - IOobject - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - dimensionedScalar("zero", dimDensity*dimArea/dimTime, 0.0), - mutBoundaryTypes - ) - ); - - Info<< " Writing new " << fieldName << endl; - mut().write(); - - return mut; - } -} - - -tmp<volScalarField> autoCreateEpsilon -( - const word& fieldName, - const fvMesh& mesh -) -{ - return - autoCreateWallFunctionField - < - scalar, - epsilonWallFunctionFvPatchScalarField - > - ( - fieldName, - mesh - ); -} - - -tmp<volScalarField> autoCreateOmega -( - const word& fieldName, - const fvMesh& mesh -) -{ - return - autoCreateWallFunctionField - < - scalar, - omegaWallFunctionFvPatchScalarField - > - ( - fieldName, - mesh - ); -} - - -tmp<volScalarField> autoCreateK -( - const word& fieldName, - const fvMesh& mesh -) -{ - return - autoCreateWallFunctionField - < - scalar, - kqRWallFunctionFvPatchField<scalar> - > - ( - fieldName, - mesh - ); -} - - -tmp<volScalarField> autoCreateQ -( - const word& fieldName, - const fvMesh& mesh -) -{ - return - autoCreateWallFunctionField - < - scalar, - kqRWallFunctionFvPatchField<scalar> - > - ( - fieldName, - mesh - ); -} - - -tmp<volSymmTensorField> autoCreateR -( - const word& fieldName, - const fvMesh& mesh -) -{ - return - autoCreateWallFunctionField - < - symmTensor, - kqRWallFunctionFvPatchField<symmTensor> - > - ( - fieldName, - mesh - ); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // - diff --git a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.H b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.H deleted file mode 100644 index c2b34c4a6..000000000 --- a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.H +++ /dev/null @@ -1,129 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible - -Description - Auto creation of fields to provide backwards compatibility with - runtime selectable wall functions - -SourceFiles - backwardsCompatibilityWallFunctions.C - backwardsCompatibilityWallFunctionsTemplates.C - -\*---------------------------------------------------------------------------*/ - -#ifndef backwardsCompatibilityWallFunctions_H -#define backwardsCompatibilityWallFunctions_H - -#include "fvMesh.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - //- mut - tmp<volScalarField> autoCreateMut - ( - const word& fieldName, - const fvMesh& mesh - ); - - //- mut for Low-Reynolds number models - tmp<volScalarField> autoCreateLowReMut - ( - const word& fieldName, - const fvMesh& mesh - ); - - //- alphat - tmp<volScalarField> autoCreateAlphat - ( - const word& fieldName, - const fvMesh& mesh - ); - - //- epsilon - tmp<volScalarField> autoCreateEpsilon - ( - const word& fieldName, - const fvMesh& mesh - ); - - //- omega - tmp<volScalarField> autoCreateOmega - ( - const word& fieldName, - const fvMesh& mesh - ); - - //- k - tmp<volScalarField> autoCreateK - ( - const word& fieldName, - const fvMesh& mesh - ); - - //- Q - tmp<volScalarField> autoCreateQ - ( - const word& fieldName, - const fvMesh& mesh - ); - - //- R - tmp<volSymmTensorField> autoCreateR - ( - const word& fieldName, - const fvMesh& mesh - ); - - //- Helper function to create the new field - template<class Type, class PatchType> - tmp<GeometricField<Type, fvPatchField, volMesh> > - autoCreateWallFunctionField - ( - const word& fieldName, - const fvMesh& mesh - ); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository -# include "backwardsCompatibilityWallFunctionsTemplates.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C deleted file mode 100644 index d91f1bcd7..000000000 --- a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C +++ /dev/null @@ -1,169 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "backwardsCompatibilityWallFunctions.H" -#include "Time.H" -#include "OSspecific.H" - -#include "wallFvPatch.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -template<class Type, class PatchType> -tmp<GeometricField<Type, fvPatchField, volMesh> > -autoCreateWallFunctionField -( - const word& fieldName, - const fvMesh& mesh -) -{ - IOobject mutHeader - ( - "mut", - mesh.time().timeName(), - mesh, - IOobject::MUST_READ - ); - - typedef GeometricField<Type, fvPatchField, volMesh> fieldType; - - if (mutHeader.headerOk()) - { - return tmp<fieldType> - ( - new fieldType - ( - IOobject - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE, - false - ), - mesh - ) - ); - } - else - { - Info<< "--> Upgrading " << fieldName - << " to employ run-time selectable wall functions" << endl; - - // Read existing field - IOobject ioObj - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE, - false - ); - - tmp<fieldType> fieldOrig - ( - new fieldType - ( - ioObj, - mesh - ) - ); - - // rename file - Info<< " Backup original " << fieldName << " to " - << fieldName << ".old" << endl; - mvBak(ioObj.objectPath(), "old"); - - - PtrList<fvPatchField<Type> > newPatchFields(mesh.boundary().size()); - - forAll(newPatchFields, patchI) - { - if (isA<wallFvPatch>(mesh.boundary()[patchI])) - { - newPatchFields.set - ( - patchI, - new PatchType - ( - mesh.boundary()[patchI], - fieldOrig().dimensionedInternalField() - ) - ); - newPatchFields[patchI] == fieldOrig().boundaryField()[patchI]; - } - else - { - newPatchFields.set - ( - patchI, - fieldOrig().boundaryField()[patchI].clone() - ); - } - } - - tmp<fieldType> fieldNew - ( - new fieldType - ( - IOobject - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - fieldOrig().dimensions(), - fieldOrig().internalField(), - newPatchFields - ) - ); - - Info<< " Writing updated " << fieldName << endl; - fieldNew().write(); - - return fieldNew; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/doc/compressibleRASBoundaryConditionsDoc.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/doc/compressibleRASBoundaryConditionsDoc.H deleted file mode 100644 index d0ef1e1af..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/doc/compressibleRASBoundaryConditionsDoc.H +++ /dev/null @@ -1,39 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it under - the terms of the GNU General Public License as published by the Free - Software Foundation, either version 3 of the License, or (at your option) - any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - details. - - You should have received a copy of the GNU General Public License along with - OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -\defgroup grpCmpRASBoundaryConditions RAS compressible boundary conditions -@{ - \ingroup grpCmpRASTurbulence - This group contains compressible RAS turbulence model boundary conditions -@} - -\defgroup grpCmpWallFunctions RAS compressible wall functions -@{ - \ingroup grpCmpRASBoundaryConditions - This group contains compressible RAS turbulence model wall functions -@} - - -\*---------------------------------------------------------------------------*/ diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C deleted file mode 100644 index 0d6694fa3..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C +++ /dev/null @@ -1,179 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "turbulentMixingLengthDissipationRateInletFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "surfaceFields.H" -#include "volFields.H" -#include "compressible/turbulenceModel/turbulenceModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -turbulentMixingLengthDissipationRateInletFvPatchScalarField:: -turbulentMixingLengthDissipationRateInletFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - inletOutletFvPatchScalarField(p, iF), - mixingLength_(0.0), - kName_("k") -{ - this->refValue() = 0.0; - this->refGrad() = 0.0; - this->valueFraction() = 0.0; -} - - -turbulentMixingLengthDissipationRateInletFvPatchScalarField:: -turbulentMixingLengthDissipationRateInletFvPatchScalarField -( - const turbulentMixingLengthDissipationRateInletFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - inletOutletFvPatchScalarField(ptf, p, iF, mapper), - mixingLength_(ptf.mixingLength_), - kName_(ptf.kName_) -{} - - -turbulentMixingLengthDissipationRateInletFvPatchScalarField:: -turbulentMixingLengthDissipationRateInletFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - inletOutletFvPatchScalarField(p, iF), - mixingLength_(readScalar(dict.lookup("mixingLength"))), - kName_(dict.lookupOrDefault<word>("k", "k")) -{ - this->phiName_ = dict.lookupOrDefault<word>("phi", "phi"); - fvPatchScalarField::operator=(scalarField("value", dict, p.size())); - - this->refValue() = 0.0; - this->refGrad() = 0.0; - this->valueFraction() = 0.0; -} - - -turbulentMixingLengthDissipationRateInletFvPatchScalarField:: -turbulentMixingLengthDissipationRateInletFvPatchScalarField -( - const turbulentMixingLengthDissipationRateInletFvPatchScalarField& ptf -) -: - inletOutletFvPatchScalarField(ptf), - mixingLength_(ptf.mixingLength_), - kName_(ptf.kName_) -{} - - -turbulentMixingLengthDissipationRateInletFvPatchScalarField:: -turbulentMixingLengthDissipationRateInletFvPatchScalarField -( - const turbulentMixingLengthDissipationRateInletFvPatchScalarField& ptf, - const DimensionedField<scalar, volMesh>& iF -) -: - inletOutletFvPatchScalarField(ptf, iF), - mixingLength_(ptf.mixingLength_), - kName_(ptf.kName_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - // Lookup Cmu corresponding to the turbulence model selected - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>("turbulenceModel"); - - const scalar Cmu = - turbulence.coeffDict().lookupOrDefault<scalar>("Cmu", 0.09); - - const scalar Cmu75 = pow(Cmu, 0.75); - - const fvPatchScalarField& kp = - patch().lookupPatchField<volScalarField, scalar>(kName_); - - const fvsPatchScalarField& phip = - patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_); - - this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_; - this->valueFraction() = 1.0 - pos(phip); - - inletOutletFvPatchScalarField::updateCoeffs(); -} - - -void turbulentMixingLengthDissipationRateInletFvPatchScalarField::write -( - Ostream& os -) const -{ - fvPatchScalarField::write(os); - os.writeKeyword("mixingLength") - << mixingLength_ << token::END_STATEMENT << nl; - os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl; - os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl; - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - turbulentMixingLengthDissipationRateInletFvPatchScalarField -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H deleted file mode 100644 index 63aa24b8e..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H +++ /dev/null @@ -1,203 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible:: - turbulentMixingLengthDissipationRateInletFvPatchScalarField - -Group - grpCmpRASBoundaryConditions grpInletBoundaryConditions - -Description - This boundary condition provides a turbulence dissipation, \f$\epsilon\f$ - (epsilon) inlet condition based on a specified mixing length. The patch - values are calculated using: - - \f[ - \epsilon_p = \frac{C_{\mu}^{0.75} k^{1.5}}{L} - \f] - - where - - \vartable - \epsilon_p | patch epsilon values - C_{\mu} | Model coefficient, set to 0.09 - k | turbulence kinetic energy - L | length scale - \endvartable - - \heading Patch usage - - \table - Property | Description | Required | Default value - mixingLength | Length scale [m] | yes | - phi | flux field name | no | phi - k | turbulence kinetic energy field name | no | k - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type compressible::turbulentMixingLengthDissipationRateInlet; - mixingLength 0.005; - value uniform 200; // placeholder - } - \endverbatim - -Note - In the event of reverse flow, a zero-gradient condition is applied - -SeeAlso - Foam::inletOutletFvPatchField - -SourceFiles - turbulentMixingLengthDissipationRateInletFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleturbulentMixingLengthDissipationRateInletFvPatchField_H -#define compressibleturbulentMixingLengthDissipationRateInletFvPatchField_H - -#include "inletOutletFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class turbulentMixingLengthDissipationRateInletFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class turbulentMixingLengthDissipationRateInletFvPatchScalarField -: - public inletOutletFvPatchScalarField -{ - // Private data - - //- turbulent length scale - scalar mixingLength_; - - //- Name of the turbulent kinetic energy field - word kName_; - - -public: - - //- Runtime type information - TypeName("compressible::turbulentMixingLengthDissipationRateInlet"); - - - // Constructors - - //- Construct from patch and internal field - turbulentMixingLengthDissipationRateInletFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - turbulentMixingLengthDissipationRateInletFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // turbulentMixingLengthDissipationRateInletFvPatchScalarField - // onto a new patch - turbulentMixingLengthDissipationRateInletFvPatchScalarField - ( - const turbulentMixingLengthDissipationRateInletFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - turbulentMixingLengthDissipationRateInletFvPatchScalarField - ( - const turbulentMixingLengthDissipationRateInletFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new turbulentMixingLengthDissipationRateInletFvPatchScalarField - ( - *this - ) - ); - } - - //- Construct as copy setting internal field reference - turbulentMixingLengthDissipationRateInletFvPatchScalarField - ( - const turbulentMixingLengthDissipationRateInletFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new turbulentMixingLengthDissipationRateInletFvPatchScalarField - ( - *this, - iF - ) - ); - } - - - // Member functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C deleted file mode 100644 index 70017d525..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ /dev/null @@ -1,180 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "turbulentMixingLengthFrequencyInletFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "surfaceFields.H" -#include "volFields.H" -#include "RASModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -turbulentMixingLengthFrequencyInletFvPatchScalarField:: -turbulentMixingLengthFrequencyInletFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - inletOutletFvPatchScalarField(p, iF), - mixingLength_(0.0), - kName_("k") -{ - this->refValue() = 0.0; - this->refGrad() = 0.0; - this->valueFraction() = 0.0; -} - - -turbulentMixingLengthFrequencyInletFvPatchScalarField:: -turbulentMixingLengthFrequencyInletFvPatchScalarField -( - const turbulentMixingLengthFrequencyInletFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - inletOutletFvPatchScalarField(ptf, p, iF, mapper), - mixingLength_(ptf.mixingLength_), - kName_(ptf.kName_) -{} - - -turbulentMixingLengthFrequencyInletFvPatchScalarField:: -turbulentMixingLengthFrequencyInletFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - inletOutletFvPatchScalarField(p, iF), - mixingLength_(readScalar(dict.lookup("mixingLength"))), - kName_(dict.lookupOrDefault<word>("k", "k")) -{ - this->phiName_ = dict.lookupOrDefault<word>("phi", "phi"); - - fvPatchScalarField::operator=(scalarField("value", dict, p.size())); - - this->refValue() = 0.0; - this->refGrad() = 0.0; - this->valueFraction() = 0.0; -} - - -turbulentMixingLengthFrequencyInletFvPatchScalarField:: -turbulentMixingLengthFrequencyInletFvPatchScalarField -( - const turbulentMixingLengthFrequencyInletFvPatchScalarField& ptf -) -: - inletOutletFvPatchScalarField(ptf), - mixingLength_(ptf.mixingLength_), - kName_(ptf.kName_) -{} - - -turbulentMixingLengthFrequencyInletFvPatchScalarField:: -turbulentMixingLengthFrequencyInletFvPatchScalarField -( - const turbulentMixingLengthFrequencyInletFvPatchScalarField& ptf, - const DimensionedField<scalar, volMesh>& iF -) -: - inletOutletFvPatchScalarField(ptf, iF), - mixingLength_(ptf.mixingLength_), - kName_(ptf.kName_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - // Lookup Cmu corresponding to the turbulence model selected - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>("turbulenceModel"); - - const scalar Cmu = - turbulence.coeffDict().lookupOrDefault<scalar>("Cmu", 0.09); - - const scalar Cmu25 = pow(Cmu, 0.25); - - const fvPatchScalarField& kp = - patch().lookupPatchField<volScalarField, scalar>(kName_); - - const fvsPatchScalarField& phip = - patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_); - - this->refValue() = sqrt(kp)/(Cmu25*mixingLength_); - this->valueFraction() = 1.0 - pos(phip); - - inletOutletFvPatchScalarField::updateCoeffs(); -} - - -void turbulentMixingLengthFrequencyInletFvPatchScalarField::write -( - Ostream& os -) const -{ - fvPatchScalarField::write(os); - os.writeKeyword("mixingLength") - << mixingLength_ << token::END_STATEMENT << nl; - os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl; - os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl; - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - turbulentMixingLengthFrequencyInletFvPatchScalarField -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H deleted file mode 100644 index cafd2d9d1..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H +++ /dev/null @@ -1,202 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::turbulentMixingLengthFrequencyInletFvPatchScalarField - -Group - grpCmpRASBoundaryConditions grpInletBoundaryConditions - -Description - This boundary condition provides a turbulence specific dissipation, - \f$\omega\f$ (omega) inlet condition based on a specified mixing length. - The patch values are calculated using: - - \f[ - \omega_p = \frac{k^{0.5}}{C_{\mu}^{0.25} L} - \f] - - where - - \vartable - \omega_p | patch omega values - C_{\mu} | Model coefficient, set to 0.09 - k | turbulence kinetic energy - L | length scale - \endvartable - - \heading Patch usage - - \table - Property | Description | Required | Default value - mixingLength | Length scale [m] | yes | - phi | flux field name | no | phi - k | turbulence kinetic energy field name | no | k - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type compressible::turbulentMixingLengthFrequencyInlet; - mixingLength 0.005; - value uniform 200; // placeholder - } - \endverbatim - -Note - In the event of reverse flow, a zero-gradient condition is applied - -SeeAlso - Foam::inletOutletFvPatchField - -SourceFiles - turbulentMixingLengthFrequencyInletFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H -#define compressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H - -#include "inletOutletFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class turbulentMixingLengthFrequencyInletFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class turbulentMixingLengthFrequencyInletFvPatchScalarField -: - public inletOutletFvPatchScalarField -{ - // Private data - - //- Turbulent length scale - scalar mixingLength_; - - //- Name of the turbulent kinetic energy field - word kName_; - - -public: - - //- Runtime type information - TypeName("compressible::turbulentMixingLengthFrequencyInlet"); - - - // Constructors - - //- Construct from patch and internal field - turbulentMixingLengthFrequencyInletFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - turbulentMixingLengthFrequencyInletFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // turbulentMixingLengthFrequencyInletFvPatchScalarField - // onto a new patch - turbulentMixingLengthFrequencyInletFvPatchScalarField - ( - const turbulentMixingLengthFrequencyInletFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - turbulentMixingLengthFrequencyInletFvPatchScalarField - ( - const turbulentMixingLengthFrequencyInletFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new turbulentMixingLengthFrequencyInletFvPatchScalarField - ( - *this - ) - ); - } - - //- Construct as copy setting internal field reference - turbulentMixingLengthFrequencyInletFvPatchScalarField - ( - const turbulentMixingLengthFrequencyInletFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new turbulentMixingLengthFrequencyInletFvPatchScalarField - ( - *this, - iF - ) - ); - } - - - // Member functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.C deleted file mode 100644 index 347993c1f..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,196 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "epsilonLowReWallFunctionFvPatchScalarField.H" -#include "compressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -scalar epsilonLowReWallFunctionFvPatchScalarField::yPlusLam -( - const scalar kappa, - const scalar E -) -{ - scalar ypl = 11.0; - - for (int i=0; i<10; i++) - { - ypl = log(max(E*ypl, 1))/kappa; - } - - return ypl; -} - - -void epsilonLowReWallFunctionFvPatchScalarField::calculate -( - const turbulenceModel& turbulence, - const List<scalar>& cornerWeights, - const fvPatch& patch, - scalarField& G, - scalarField& epsilon -) -{ - const label patchI = patch.index(); - - const scalarField& y = turbulence.y()[patchI]; - - const scalar Cmu25 = pow025(Cmu_); - const scalar Cmu75 = pow(Cmu_, 0.75); - - const tmp<volScalarField> tk = turbulence.k(); - const volScalarField& k = tk(); - - const tmp<volScalarField> tmu = turbulence.mu(); - const scalarField& muw = tmu().boundaryField()[patchI]; - - const tmp<volScalarField> tmut = turbulence.mut(); - const volScalarField& mut = tmut(); - const scalarField& mutw = mut.boundaryField()[patchI]; - - const scalarField& rhow = turbulence.rho().boundaryField()[patchI]; - - const fvPatchVectorField& Uw = turbulence.U().boundaryField()[patchI]; - - const scalarField magGradUw(mag(Uw.snGrad())); - - // Set epsilon and G - forAll(mutw, faceI) - { - label cellI = patch.faceCells()[faceI]; - - scalar yPlus = Cmu25*sqrt(k[cellI])*y[faceI]/(muw[faceI]/rhow[faceI]); - - scalar w = cornerWeights[faceI]; - - if (yPlus > yPlusLam_) - { - epsilon[cellI] = w*Cmu75*pow(k[cellI], 1.5)/(kappa_*y[faceI]); - } - else - { - epsilon[cellI] = - w*2.0*k[cellI]*muw[faceI]/rhow[faceI]/sqr(y[faceI]); - } - - G[cellI] = - w - *(mutw[faceI] + muw[faceI]) - *magGradUw[faceI] - *Cmu25*sqrt(k[cellI]) - /(kappa_*y[faceI]); - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -epsilonLowReWallFunctionFvPatchScalarField:: -epsilonLowReWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - epsilonWallFunctionFvPatchScalarField(p, iF), - yPlusLam_(yPlusLam(kappa_, E_)) -{} - - -epsilonLowReWallFunctionFvPatchScalarField:: -epsilonLowReWallFunctionFvPatchScalarField -( - const epsilonLowReWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - epsilonWallFunctionFvPatchScalarField(ptf, p, iF, mapper), - yPlusLam_(ptf.yPlusLam_) -{} - - -epsilonLowReWallFunctionFvPatchScalarField:: -epsilonLowReWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - epsilonWallFunctionFvPatchScalarField(p, iF, dict), - yPlusLam_(yPlusLam(kappa_, E_)) -{} - - -epsilonLowReWallFunctionFvPatchScalarField:: -epsilonLowReWallFunctionFvPatchScalarField -( - const epsilonLowReWallFunctionFvPatchScalarField& ewfpsf -) -: - epsilonWallFunctionFvPatchScalarField(ewfpsf), - yPlusLam_(ewfpsf.yPlusLam_) -{} - - -epsilonLowReWallFunctionFvPatchScalarField:: -epsilonLowReWallFunctionFvPatchScalarField -( - const epsilonLowReWallFunctionFvPatchScalarField& ewfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - epsilonWallFunctionFvPatchScalarField(ewfpsf, iF), - yPlusLam_(ewfpsf.yPlusLam_) -{} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - epsilonLowReWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.H deleted file mode 100644 index bac27237c..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,190 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::epsilonLowReWallFunctionFvPatchScalarField - -Group - grpCmpWallFunctions - -Description - This boundary condition provides a turbulence dissipation wall function - condition for low- and high-Reynolds number turbulent flow cases. - - The condition can be applied to wall boundaries, whereby it inserts near - wall epsilon values directly into the epsilon equation to act as a - constraint. - - The model operates in two modes, based on the computed laminar-to-turbulent - switch-over y+ value derived from kappa and E. - - \heading Patch usage - - \table - Property | Description | Required | Default value - Cmu | model coefficient | no | 0.09 - kappa | Von Karman constant | no | 0.41 - E | model coefficient | no | 9.8 - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type epsilonLowReWallFunction; - } - \endverbatim - -SeeAlso - Foam::epsilonWallFunctionFvPatchScalarField - -SourceFiles - epsilonLowReWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef epsilonLowReWallFunctionFvPatchScalarField_H -#define epsilonLowReWallFunctionFvPatchScalarField_H - -#include "epsilonWallFunctionFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class epsilonLowReWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class epsilonLowReWallFunctionFvPatchScalarField -: - public epsilonWallFunctionFvPatchScalarField -{ - -protected: - - // Protected data - - //- Y+ at the edge of the laminar sublayer - scalar yPlusLam_; - - - // Protected Member Functions - - //- Calculate the Y+ at the edge of the laminar sublayer - scalar yPlusLam(const scalar kappa, const scalar E); - - //- Calculate the epsilon and G - virtual void calculate - ( - const turbulenceModel& turbulence, - const List<scalar>& cornerWeights, - const fvPatch& patch, - scalarField& G, - scalarField& epsilon - ); - - -public: - - //- Runtime type information - TypeName("compressible::epsilonLowReWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - epsilonLowReWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - epsilonLowReWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // epsilonLowReWallFunctionFvPatchScalarField - // onto a new patch - epsilonLowReWallFunctionFvPatchScalarField - ( - const epsilonLowReWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - epsilonLowReWallFunctionFvPatchScalarField - ( - const epsilonLowReWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new epsilonLowReWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - epsilonLowReWallFunctionFvPatchScalarField - ( - const epsilonLowReWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new epsilonLowReWallFunctionFvPatchScalarField(*this, iF) - ); - } -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C deleted file mode 100644 index 1bf17b6fa..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,586 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "epsilonWallFunctionFvPatchScalarField.H" -#include "compressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "fvMatrix.H" -#include "volFields.H" -#include "wallFvPatch.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -scalar epsilonWallFunctionFvPatchScalarField::tolerance_ = 1e-5; - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void epsilonWallFunctionFvPatchScalarField::checkType() -{ - if (!isA<wallFvPatch>(patch())) - { - FatalErrorIn("epsilonWallFunctionFvPatchScalarField::checkType()") - << "Invalid wall function specification" << nl - << " Patch type for patch " << patch().name() - << " must be wall" << nl - << " Current patch type is " << patch().type() << nl << endl - << abort(FatalError); - } -} - - -void epsilonWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const -{ - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; -} - - -void epsilonWallFunctionFvPatchScalarField::setMaster() -{ - if (master_ != -1) - { - return; - } - - const volScalarField& epsilon = - static_cast<const volScalarField&>(this->dimensionedInternalField()); - - const volScalarField::GeometricBoundaryField& bf = epsilon.boundaryField(); - - label master = -1; - forAll(bf, patchI) - { - if (isA<epsilonWallFunctionFvPatchScalarField>(bf[patchI])) - { - epsilonWallFunctionFvPatchScalarField& epf = epsilonPatch(patchI); - - if (master == -1) - { - master = patchI; - } - - epf.master() = master; - } - } -} - - -void epsilonWallFunctionFvPatchScalarField::createAveragingWeights() -{ - const volScalarField& epsilon = - static_cast<const volScalarField&>(this->dimensionedInternalField()); - - const volScalarField::GeometricBoundaryField& bf = epsilon.boundaryField(); - - const fvMesh& mesh = epsilon.mesh(); - - if (initialised_ && !mesh.changing()) - { - return; - } - - volScalarField weights - ( - IOobject - ( - "weights", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false // do not register - ), - mesh, - dimensionedScalar("zero", dimless, 0.0) - ); - - DynamicList<label> epsilonPatches(bf.size()); - forAll(bf, patchI) - { - if (isA<epsilonWallFunctionFvPatchScalarField>(bf[patchI])) - { - epsilonPatches.append(patchI); - - const labelUList& faceCells = bf[patchI].patch().faceCells(); - forAll(faceCells, i) - { - label cellI = faceCells[i]; - weights[cellI]++; - } - } - } - - cornerWeights_.setSize(bf.size()); - forAll(epsilonPatches, i) - { - label patchI = epsilonPatches[i]; - const fvPatchScalarField& wf = weights.boundaryField()[patchI]; - cornerWeights_[patchI] = 1.0/wf.patchInternalField(); - } - - G_.setSize(dimensionedInternalField().size(), 0.0); - epsilon_.setSize(dimensionedInternalField().size(), 0.0); - - initialised_ = true; -} - - -epsilonWallFunctionFvPatchScalarField& -epsilonWallFunctionFvPatchScalarField::epsilonPatch(const label patchI) -{ - const volScalarField& epsilon = - static_cast<const volScalarField&>(this->dimensionedInternalField()); - - const volScalarField::GeometricBoundaryField& bf = epsilon.boundaryField(); - - const epsilonWallFunctionFvPatchScalarField& epf = - refCast<const epsilonWallFunctionFvPatchScalarField>(bf[patchI]); - - return const_cast<epsilonWallFunctionFvPatchScalarField&>(epf); -} - - -void epsilonWallFunctionFvPatchScalarField::calculateTurbulenceFields -( - const turbulenceModel& turbulence, - scalarField& G0, - scalarField& epsilon0 -) -{ - // accumulate all of the G and epsilon contributions - forAll(cornerWeights_, patchI) - { - if (!cornerWeights_[patchI].empty()) - { - epsilonWallFunctionFvPatchScalarField& epf = epsilonPatch(patchI); - - const List<scalar>& w = cornerWeights_[patchI]; - - epf.calculate(turbulence, w, epf.patch(), G0, epsilon0); - } - } - - // apply zero-gradient condition for epsilon - forAll(cornerWeights_, patchI) - { - if (!cornerWeights_[patchI].empty()) - { - epsilonWallFunctionFvPatchScalarField& epf = epsilonPatch(patchI); - - epf == scalarField(epsilon0, epf.patch().faceCells()); - } - } -} - - -void epsilonWallFunctionFvPatchScalarField::calculate -( - const turbulenceModel& turbulence, - const List<scalar>& cornerWeights, - const fvPatch& patch, - scalarField& G, - scalarField& epsilon -) -{ - const label patchI = patch.index(); - - const scalarField& y = turbulence.y()[patchI]; - - const scalar Cmu25 = pow025(Cmu_); - const scalar Cmu75 = pow(Cmu_, 0.75); - - const tmp<volScalarField> tk = turbulence.k(); - const volScalarField& k = tk(); - - const tmp<volScalarField> tmu = turbulence.mu(); - const scalarField& muw = tmu().boundaryField()[patchI]; - - const tmp<volScalarField> tmut = turbulence.mut(); - const volScalarField& mut = tmut(); - const scalarField& mutw = mut.boundaryField()[patchI]; - - const fvPatchVectorField& Uw = turbulence.U().boundaryField()[patchI]; - - const scalarField magGradUw(mag(Uw.snGrad())); - - // Set epsilon and G - forAll(mutw, faceI) - { - label cellI = patch.faceCells()[faceI]; - - scalar w = cornerWeights[faceI]; - - epsilon[cellI] += w*Cmu75*pow(k[cellI], 1.5)/(kappa_*y[faceI]); - - G[cellI] += - w - *(mutw[faceI] + muw[faceI]) - *magGradUw[faceI] - *Cmu25*sqrt(k[cellI]) - /(kappa_*y[faceI]); - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchField<scalar>(p, iF), - Cmu_(0.09), - kappa_(0.41), - E_(9.8), - G_(), - epsilon_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); -} - - -epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField -( - const epsilonWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchField<scalar>(ptf, p, iF, mapper), - Cmu_(ptf.Cmu_), - kappa_(ptf.kappa_), - E_(ptf.E_), - G_(), - epsilon_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); -} - - -epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - fixedValueFvPatchField<scalar>(p, iF, dict), - Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)), - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - E_(dict.lookupOrDefault<scalar>("E", 9.8)), - G_(), - epsilon_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); - - // apply zero-gradient condition on start-up - this->operator==(patchInternalField()); -} - - -epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField -( - const epsilonWallFunctionFvPatchScalarField& ewfpsf -) -: - fixedValueFvPatchField<scalar>(ewfpsf), - Cmu_(ewfpsf.Cmu_), - kappa_(ewfpsf.kappa_), - E_(ewfpsf.E_), - G_(), - epsilon_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); -} - - -epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField -( - const epsilonWallFunctionFvPatchScalarField& ewfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchField<scalar>(ewfpsf, iF), - Cmu_(ewfpsf.Cmu_), - kappa_(ewfpsf.kappa_), - E_(ewfpsf.E_), - G_(), - epsilon_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -scalarField& epsilonWallFunctionFvPatchScalarField::G(bool init) -{ - if (patch().index() == master_) - { - if (init) - { - G_ = 0.0; - } - - return G_; - } - - return epsilonPatch(master_).G(); -} - - -scalarField& epsilonWallFunctionFvPatchScalarField::epsilon(bool init) -{ - if (patch().index() == master_) - { - if (init) - { - epsilon_ = 0.0; - } - - return epsilon_; - } - - return epsilonPatch(master_).epsilon(init); -} - - -void epsilonWallFunctionFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>(turbulenceModel::typeName); - - setMaster(); - - if (patch().index() == master_) - { - createAveragingWeights(); - calculateTurbulenceFields(turbulence, G(true), epsilon(true)); - } - - const scalarField& G0 = this->G(); - const scalarField& epsilon0 = this->epsilon(); - - typedef DimensionedField<scalar, volMesh> FieldType; - - FieldType& G = - const_cast<FieldType&> - ( - db().lookupObject<FieldType>(turbulence.GName()) - ); - - FieldType& epsilon = const_cast<FieldType&>(dimensionedInternalField()); - - forAll(*this, faceI) - { - label cellI = patch().faceCells()[faceI]; - - G[cellI] = G0[cellI]; - epsilon[cellI] = epsilon0[cellI]; - } - - fvPatchField<scalar>::updateCoeffs(); -} - - -void epsilonWallFunctionFvPatchScalarField::updateCoeffs -( - const scalarField& weights -) -{ - if (updated()) - { - return; - } - - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>(turbulenceModel::typeName); - - setMaster(); - - if (patch().index() == master_) - { - createAveragingWeights(); - calculateTurbulenceFields(turbulence, G(true), epsilon(true)); - } - - const scalarField& G0 = this->G(); - const scalarField& epsilon0 = this->epsilon(); - - typedef DimensionedField<scalar, volMesh> FieldType; - - FieldType& G = - const_cast<FieldType&> - ( - db().lookupObject<FieldType>(turbulence.GName()) - ); - - FieldType& epsilon = const_cast<FieldType&>(dimensionedInternalField()); - - scalarField& epsilonf = *this; - - // only set the values if the weights are > tolerance - forAll(weights, faceI) - { - scalar w = weights[faceI]; - - if (w > tolerance_) - { - label cellI = patch().faceCells()[faceI]; - - G[cellI] = (1.0 - w)*G[cellI] + w*G0[cellI]; - epsilon[cellI] = (1.0 - w)*epsilon[cellI] + w*epsilon0[cellI]; - epsilonf[faceI] = epsilon[cellI]; - } - } - - fvPatchField<scalar>::updateCoeffs(); -} - - -void epsilonWallFunctionFvPatchScalarField::manipulateMatrix -( - fvMatrix<scalar>& matrix -) -{ - if (manipulatedMatrix()) - { - return; - } - - matrix.setValues(patch().faceCells(), patchInternalField()); - - fvPatchField<scalar>::manipulateMatrix(matrix); -} - - -void epsilonWallFunctionFvPatchScalarField::manipulateMatrix -( - fvMatrix<scalar>& matrix, - const Field<scalar>& weights -) -{ - if (manipulatedMatrix()) - { - return; - } - - // filter weights so that we only apply the constraint where the - // weight > SMALL - DynamicList<label> constraintCells(weights.size()); - DynamicList<scalar> constraintEpsilon(weights.size()); - const labelUList& faceCells = patch().faceCells(); - - const DimensionedField<scalar, volMesh>& epsilon = - dimensionedInternalField(); - - label nConstrainedCells = 0; - - - forAll(weights, faceI) - { - // only set the values if the weights are > tolerance - if (weights[faceI] > tolerance_) - { - nConstrainedCells++; - - label cellI = faceCells[faceI]; - - constraintCells.append(cellI); - constraintEpsilon.append(epsilon[cellI]); - } - } - - if (debug) - { - Pout<< "Patch: " << patch().name() - << ": number of constrained cells = " << nConstrainedCells - << " out of " << patch().size() - << endl; - } - - matrix.setValues - ( - constraintCells, - scalarField(constraintEpsilon.xfer()) - ); - - fvPatchField<scalar>::manipulateMatrix(matrix); -} - - -void epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fixedValueFvPatchField<scalar>::write(os); - writeLocalEntries(os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - epsilonWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H deleted file mode 100644 index b02431321..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,292 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::epsilonWallFunctionFvPatchScalarField - -Group - grpCmpWallFunctions - -Description - This boundary condition provides a turbulence dissipation wall function - condition for high Reynolds number, turbulent flow cases. - - The condition can be applied to wall boundaries, whereby it - - calculates \c epsilon and \c G - - inserts near wall epsilon values directly into the epsilon equation - to act as a constraint - - where - - \vartable - epsilon | turblence dissipation field - G | turblence generation field - \endvartable - - \heading Patch usage - - \table - Property | Description | Required | Default value - Cmu | model coefficient | no | 0.09 - kappa | Von Karman constant | no | 0.41 - E | model coefficient | no | 9.8 - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type compressible::epsilonWallFunction; - } - \endverbatim - -SeeAlso - Foam::fixedInternalValueFvPatchField - -SourceFiles - epsilonWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleEpsilonWallFunctionFvPatchScalarField_H -#define compressibleEpsilonWallFunctionFvPatchScalarField_H - -#include "fixedValueFvPatchField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -class turbulenceModel; - -/*---------------------------------------------------------------------------*\ - Class epsilonWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class epsilonWallFunctionFvPatchScalarField -: - public fixedValueFvPatchField<scalar> -{ -protected: - - // Protected data - - //- Tolerance used in weighted calculations - static scalar tolerance_; - - //- Cmu coefficient - scalar Cmu_; - - //- Von Karman constant - scalar kappa_; - - //- E coefficient - scalar E_; - - //- Local copy of turbulence G field - scalarField G_; - - //- Local copy of turbulence epsilon field - scalarField epsilon_; - - //- Initialised flag - bool initialised_; - - //- Master patch ID - label master_; - - //- List of averaging corner weights - List<List<scalar> > cornerWeights_; - - - // Protected Member Functions - - //- Check the type of the patch - virtual void checkType(); - - //- Write local wall function variables - virtual void writeLocalEntries(Ostream&) const; - - //- Set the master patch - master is responsible for updating all - // wall function patches - virtual void setMaster(); - - //- Create the averaging weights for cells which are bounded by - // multiple wall function faces - virtual void createAveragingWeights(); - - //- Helper function to return non-const access to an epsilon patch - virtual epsilonWallFunctionFvPatchScalarField& epsilonPatch - ( - const label patchI - ); - - //- Main driver to calculate the turbulence fields - virtual void calculateTurbulenceFields - ( - const turbulenceModel& turbulence, - scalarField& G0, - scalarField& epsilon0 - ); - - //- Calculate the epsilon and G - virtual void calculate - ( - const turbulenceModel& turbulence, - const List<scalar>& cornerWeights, - const fvPatch& patch, - scalarField& G, - scalarField& epsilon - ); - - //- Return non-const access to the master patch ID - virtual label& master() - { - return master_; - } - - -public: - - //- Runtime type information - TypeName("compressible::epsilonWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - epsilonWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - epsilonWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // epsilonWallFunctionFvPatchScalarField - // onto a new patch - epsilonWallFunctionFvPatchScalarField - ( - const epsilonWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - epsilonWallFunctionFvPatchScalarField - ( - const epsilonWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new epsilonWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - epsilonWallFunctionFvPatchScalarField - ( - const epsilonWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new epsilonWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - //- Destructor - virtual ~epsilonWallFunctionFvPatchScalarField() - {} - - - // Member functions - - // Access - - //- Return non-const access to the master's G field - scalarField& G(bool init = false); - - //- Return non-const access to the master's epsilon field - scalarField& epsilon(bool init = false); - - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(const scalarField& weights); - - //- Manipulate matrix - virtual void manipulateMatrix(fvMatrix<scalar>& matrix); - - //- Manipulate matrix with given weights - virtual void manipulateMatrix - ( - fvMatrix<scalar>& matrix, - const scalarField& weights - ); - - - // I-O - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C deleted file mode 100644 index 60ad82717..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,263 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "fWallFunctionFvPatchScalarField.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "wallFvPatch.H" -#include "v2f.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -void fWallFunctionFvPatchScalarField::checkType() -{ - if (!isA<wallFvPatch>(patch())) - { - FatalErrorIn("fWallFunctionFvPatchScalarField::checkType()") - << "Invalid wall function specification" << nl - << " Patch type for patch " << patch().name() - << " must be wall" << nl - << " Current patch type is " << patch().type() << nl << endl - << abort(FatalError); - } -} - - -void fWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const -{ - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; -} - - -scalar fWallFunctionFvPatchScalarField::yPlusLam -( - const scalar kappa, - const scalar E -) -{ - scalar ypl = 11.0; - - for (int i=0; i<10; i++) - { - ypl = log(max(E*ypl, 1))/kappa; - } - - return ypl; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchField<scalar>(p, iF), - Cmu_(0.09), - kappa_(0.41), - E_(9.8), - yPlusLam_(yPlusLam(kappa_, E_)) -{ - checkType(); -} - - -fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField -( - const fWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchField<scalar>(ptf, p, iF, mapper), - Cmu_(ptf.Cmu_), - kappa_(ptf.kappa_), - E_(ptf.E_), - yPlusLam_(ptf.yPlusLam_) -{ - checkType(); -} - - -fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - fixedValueFvPatchField<scalar>(p, iF, dict), - Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)), - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - E_(dict.lookupOrDefault<scalar>("E", 9.8)), - yPlusLam_(yPlusLam(kappa_, E_)) -{ - checkType(); -} - - -fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField -( - const fWallFunctionFvPatchScalarField& v2wfpsf -) -: - fixedValueFvPatchField<scalar>(v2wfpsf), - Cmu_(v2wfpsf.Cmu_), - kappa_(v2wfpsf.kappa_), - E_(v2wfpsf.E_), - yPlusLam_(v2wfpsf.yPlusLam_) -{ - checkType(); -} - - -fWallFunctionFvPatchScalarField::fWallFunctionFvPatchScalarField -( - const fWallFunctionFvPatchScalarField& v2wfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchField<scalar>(v2wfpsf, iF), - Cmu_(v2wfpsf.Cmu_), - kappa_(v2wfpsf.kappa_), - E_(v2wfpsf.E_), - yPlusLam_(v2wfpsf.yPlusLam_) -{ - checkType(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void fWallFunctionFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const label patchI = patch().index(); - - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const v2f& v2fModel = refCast<const v2f>(turbulence); - - const scalarField& y = v2fModel.y()[patchI]; - - const tmp<volScalarField> tk = v2fModel.k(); - const volScalarField& k = tk(); - - const tmp<volScalarField> tepsilon = v2fModel.epsilon(); - const volScalarField& epsilon = tepsilon(); - - const tmp<volScalarField> tv2 = v2fModel.v2(); - const volScalarField& v2 = tv2(); - - const tmp<volScalarField> tmu = v2fModel.mu(); - const scalarField& muw = tmu().boundaryField()[patchI]; - - const scalarField& rhow = v2fModel.rho().boundaryField()[patchI]; - - const scalar Cmu25 = pow025(Cmu_); - - scalarField& f = *this; - - // Set f wall values - forAll(f, faceI) - { - label faceCellI = patch().faceCells()[faceI]; - - scalar uTau = Cmu25*sqrt(k[faceCellI]); - - scalar yPlus = uTau*y[faceI]/(muw[faceI]/rhow[faceI]); - - if (yPlus > yPlusLam_) - { - scalar N = 6.0; - scalar v2c = v2[faceCellI]; - scalar epsc = epsilon[faceCellI]; - scalar kc = k[faceCellI]; - - f[faceI] = N*v2c*epsc/(sqr(kc) + ROOTVSMALL); - f[faceI] /= sqr(uTau) + ROOTVSMALL; - } - else - { - f[faceI] = 0.0; - } - } - - fixedValueFvPatchField<scalar>::updateCoeffs(); - - // TODO: perform averaging for cells sharing more than one boundary face -} - - -void fWallFunctionFvPatchScalarField::evaluate -( - const Pstream::commsTypes commsType -) -{ - fixedValueFvPatchField<scalar>::evaluate(commsType); -} - - -void fWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - writeLocalEntries(os); - fixedValueFvPatchField<scalar>::write(os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - fWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.H deleted file mode 100644 index 6163d05ad..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,209 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::RASModels::fWallFunctionFvPatchScalarField - -Group - grpCmpWallFunctions - -Description - This boundary condition provides a turbulence damping function, f, wall - function condition for low- and high Reynolds number, turbulent flow cases - - The model operates in two modes, based on the computed laminar-to-turbulent - switch-over y+ value derived from kappa and E. - - \heading Patch usage - - \table - Property | Description | Required | Default value - Cmu | model coefficient | no | 0.09 - kappa | Von Karman constant | no | 0.41 - E | model coefficient | no | 9.8 - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type fWallFunction; - } - \endverbatim - -SeeAlso - Foam::fixedValueFvPatchField - -SourceFiles - fWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef fWallFunctionFvPatchScalarField_H -#define fWallFunctionFvPatchScalarField_H - -#include "fixedValueFvPatchField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class fWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class fWallFunctionFvPatchScalarField -: - public fixedValueFvPatchField<scalar> -{ -protected: - - // Protected data - - //- Cmu coefficient - scalar Cmu_; - - //- Von Karman constant - scalar kappa_; - - //- E coefficient - scalar E_; - - //- Y+ at the edge of the laminar sublayer - scalar yPlusLam_; - - - // Protected Member Functions - - //- Check the type of the patch - virtual void checkType(); - - //- Write local wall function variables - virtual void writeLocalEntries(Ostream&) const; - - //- Calculate the Y+ at the edge of the laminar sublayer - scalar yPlusLam(const scalar kappa, const scalar E); - - -public: - - //- Runtime type information - TypeName("compressible::fWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - fWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - fWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given fWallFunctionFvPatchScalarField - // onto a new patch - fWallFunctionFvPatchScalarField - ( - const fWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - fWallFunctionFvPatchScalarField - ( - const fWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new fWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - fWallFunctionFvPatchScalarField - ( - const fWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new fWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - //- Evaluate the patchField - virtual void evaluate(const Pstream::commsTypes); - - - // I-O - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C deleted file mode 100644 index 72a987b68..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,255 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "kLowReWallFunctionFvPatchScalarField.H" -#include "compressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void kLowReWallFunctionFvPatchScalarField::checkType() -{ - if (!isA<wallFvPatch>(patch())) - { - FatalErrorIn("kLowReWallFunctionFvPatchScalarField::checkType()") - << "Invalid wall function specification" << nl - << " Patch type for patch " << patch().name() - << " must be wall" << nl - << " Current patch type is " << patch().type() << nl << endl - << abort(FatalError); - } -} - - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -scalar kLowReWallFunctionFvPatchScalarField::yPlusLam -( - const scalar kappa, - const scalar E -) -{ - scalar ypl = 11.0; - - for (int i=0; i<10; i++) - { - ypl = log(max(E*ypl, 1))/kappa; - } - - return ypl; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchField<scalar>(p, iF), - Cmu_(0.09), - kappa_(0.41), - E_(9.8), - Ceps2_(1.9), - yPlusLam_(yPlusLam(kappa_, E_)) -{ - checkType(); -} - - -kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField -( - const kLowReWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchField<scalar>(ptf, p, iF, mapper), - Cmu_(ptf.Cmu_), - kappa_(ptf.kappa_), - E_(ptf.E_), - Ceps2_(ptf.Ceps2_), - yPlusLam_(ptf.yPlusLam_) -{ - checkType(); -} - - -kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - fixedValueFvPatchField<scalar>(p, iF, dict), - Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)), - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - E_(dict.lookupOrDefault<scalar>("E", 9.8)), - Ceps2_(dict.lookupOrDefault<scalar>("Ceps2", 1.9)), - yPlusLam_(yPlusLam(kappa_, E_)) -{ - checkType(); -} - - -kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField -( - const kLowReWallFunctionFvPatchScalarField& kwfpsf -) -: - fixedValueFvPatchField<scalar>(kwfpsf), - Cmu_(kwfpsf.Cmu_), - kappa_(kwfpsf.kappa_), - E_(kwfpsf.E_), - Ceps2_(kwfpsf.Ceps2_), - yPlusLam_(kwfpsf.yPlusLam_) -{ - checkType(); -} - - -kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField -( - const kLowReWallFunctionFvPatchScalarField& kwfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchField<scalar>(kwfpsf, iF), - Cmu_(kwfpsf.Cmu_), - kappa_(kwfpsf.kappa_), - E_(kwfpsf.E_), - Ceps2_(kwfpsf.Ceps2_), - yPlusLam_(kwfpsf.yPlusLam_) -{ - checkType(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void kLowReWallFunctionFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const label patchI = patch().index(); - - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbulence.y()[patchI]; - - const tmp<volScalarField> tk = turbulence.k(); - const volScalarField& k = tk(); - - const tmp<volScalarField> tmu = turbulence.mu(); - const scalarField& muw = tmu().boundaryField()[patchI]; - - const scalarField& rhow = turbulence.rho().boundaryField()[patchI]; - - const scalar Cmu25 = pow025(Cmu_); - - scalarField& kw = *this; - - // Set k wall values - forAll(kw, faceI) - { - label faceCellI = patch().faceCells()[faceI]; - - scalar uTau = Cmu25*sqrt(k[faceCellI]); - - scalar yPlus = uTau*y[faceI]/(muw[faceI]/rhow[faceI]); - - if (yPlus > yPlusLam_) - { - scalar Ck = -0.416; - scalar Bk = 8.366; - kw[faceI] = Ck/kappa_*log(yPlus) + Bk; - } - else - { - scalar C = 11.0; - scalar Cf = (1.0/sqr(yPlus + C) + 2.0*yPlus/pow3(C) - 1.0/sqr(C)); - kw[faceI] = 2400.0/sqr(Ceps2_)*Cf; - } - - kw[faceI] *= sqr(uTau); - } - - fixedValueFvPatchField<scalar>::updateCoeffs(); - - // TODO: perform averaging for cells sharing more than one boundary face -} - - -void kLowReWallFunctionFvPatchScalarField::evaluate -( - const Pstream::commsTypes commsType -) -{ - fixedValueFvPatchField<scalar>::evaluate(commsType); -} - - -void kLowReWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fvPatchField<scalar>::write(os); - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; - os.writeKeyword("Ceps2") << Ceps2_ << token::END_STATEMENT << nl; - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - kLowReWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.H deleted file mode 100644 index 511bc19b6..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,207 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::kLowReWallFunctionFvPatchScalarField - -Group - grpCmpWallFunctions - -Description - This boundary condition provides a turbulence kinetic energy wall function - condition for low- and high-Reynolds number turbulent flow cases. - - The model operates in two modes, based on the computed laminar-to-turbulent - switch-over y+ value derived from kappa and E. - - \heading Patch usage - - \table - Property | Description | Required | Default value - Cmu | model coefficient | no | 0.09 - kappa | Von Karman constant | no | 0.41 - E | model coefficient | no | 9.8 - Ceps2 | model coefficient | no | 1.9 - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type kLowReWallFunction; - } - \endverbatim - -SeeAlso - Foam::fixedValueFvPatchField - -SourceFiles - kLowReWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef kLowReWallFunctionFvPatchScalarField_H -#define kLowReWallFunctionFvPatchScalarField_H - -#include "fixedValueFvPatchField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class kLowReWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class kLowReWallFunctionFvPatchScalarField -: - public fixedValueFvPatchField<scalar> -{ -protected: - - // Protected data - - //- Cmu coefficient - scalar Cmu_; - - //- Von Karman constant - scalar kappa_; - - //- E coefficient - scalar E_; - - //- Ceps2 coefficient - scalar Ceps2_; - - //- Y+ at the edge of the laminar sublayer - scalar yPlusLam_; - - - // Protected Member Functions - - //- Check the type of the patch - virtual void checkType(); - - //- Calculate the Y+ at the edge of the laminar sublayer - scalar yPlusLam(const scalar kappa, const scalar E); - - -public: - - //- Runtime type information - TypeName("compressible::kLowReWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - kLowReWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - kLowReWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given kLowReWallFunctionFvPatchScalarField - // onto a new patch - kLowReWallFunctionFvPatchScalarField - ( - const kLowReWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - kLowReWallFunctionFvPatchScalarField - ( - const kLowReWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new kLowReWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - kLowReWallFunctionFvPatchScalarField - ( - const kLowReWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new kLowReWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - //- Evaluate the patchField - virtual void evaluate(const Pstream::commsTypes); - - - // I-O - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C deleted file mode 100644 index 0d0fc6138..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C +++ /dev/null @@ -1,150 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "kqRWallFunctionFvPatchField.H" -#include "fvPatchFieldMapper.H" -#include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template<class Type> -void kqRWallFunctionFvPatchField<Type>::checkType() -{ - if (!isA<wallFvPatch>(this->patch())) - { - FatalErrorIn("kqRWallFunctionFvPatchField::checkType()") - << "Invalid wall function specification" << nl - << " Patch type for patch " << this->patch().name() - << " must be wall" << nl - << " Current patch type is " << this->patch().type() - << nl << endl - << abort(FatalError); - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template<class Type> -kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField -( - const fvPatch& p, - const DimensionedField<Type, volMesh>& iF -) -: - zeroGradientFvPatchField<Type>(p, iF) -{ - checkType(); -} - - -template<class Type> -kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField -( - const kqRWallFunctionFvPatchField& ptf, - const fvPatch& p, - const DimensionedField<Type, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - zeroGradientFvPatchField<Type>(ptf, p, iF, mapper) -{ - checkType(); -} - - -template<class Type> -kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField -( - const fvPatch& p, - const DimensionedField<Type, volMesh>& iF, - const dictionary& dict -) -: - zeroGradientFvPatchField<Type>(p, iF, dict) -{ - checkType(); -} - - -template<class Type> -kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField -( - const kqRWallFunctionFvPatchField& tkqrwfpf -) -: - zeroGradientFvPatchField<Type>(tkqrwfpf) -{ - checkType(); -} - - -template<class Type> -kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField -( - const kqRWallFunctionFvPatchField& tkqrwfpf, - const DimensionedField<Type, volMesh>& iF -) -: - zeroGradientFvPatchField<Type>(tkqrwfpf, iF) -{ - checkType(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template<class Type> -void kqRWallFunctionFvPatchField<Type>::evaluate -( - const Pstream::commsTypes commsType -) -{ - zeroGradientFvPatchField<Type>::evaluate(commsType); -} - - -template<class Type> -void kqRWallFunctionFvPatchField<Type>::write(Ostream& os) const -{ - zeroGradientFvPatchField<Type>::write(os); - this->writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H deleted file mode 100644 index e96076fbc..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H +++ /dev/null @@ -1,182 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::kqRWallFunctionFvPatchField - -Group - grpCmpWallFunctions - -Description - This boundary condition is applied to turbulence \c k, \c q, and \c R - when using wall functions, and simply enforces a zero-gradient condition. - - \heading Patch usage - - Example of the boundary condition specification: - \verbatim - myPatch - { - type compressible::kqRWallFunction; - } - \endverbatim - -SeeAlso - Foam::zeroGradientFvPatchField - -SourceFiles - kqRWallFunctionFvPatchField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressiblekqRWallFunctionFvPatchField_H -#define compressiblekqRWallFunctionFvPatchField_H - -#include "zeroGradientFvPatchField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class kqRWallFunctionFvPatchField Declaration -\*---------------------------------------------------------------------------*/ - -template<class Type> -class kqRWallFunctionFvPatchField -: - public zeroGradientFvPatchField<Type> -{ - - // Private Member Functions - - //- Check the type of the patch - void checkType(); - - -public: - - //- Runtime type information - TypeName("compressible::kqRWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - kqRWallFunctionFvPatchField - ( - const fvPatch&, - const DimensionedField<Type, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - kqRWallFunctionFvPatchField - ( - const fvPatch&, - const DimensionedField<Type, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // kqRWallFunctionFvPatchField - // onto a new patch - kqRWallFunctionFvPatchField - ( - const kqRWallFunctionFvPatchField&, - const fvPatch&, - const DimensionedField<Type, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - kqRWallFunctionFvPatchField - ( - const kqRWallFunctionFvPatchField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchField<Type> > clone() const - { - return tmp<fvPatchField<Type> > - ( - new kqRWallFunctionFvPatchField(*this) - ); - } - - //- Construct as copy setting internal field reference - kqRWallFunctionFvPatchField - ( - const kqRWallFunctionFvPatchField&, - const DimensionedField<Type, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchField<Type> > clone - ( - const DimensionedField<Type, volMesh>& iF - ) const - { - return tmp<fvPatchField<Type> > - ( - new kqRWallFunctionFvPatchField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Evaluate the patchField - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::Pstream::blocking - ); - - - // I-O - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository -# include "kqRWallFunctionFvPatchField.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.C deleted file mode 100644 index 249b99ba3..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.C +++ /dev/null @@ -1,47 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "kqRWallFunctionFvPatchFields.H" -#include "fvPatchFields.H" -#include "addToRunTimeSelectionTable.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -makePatchFields(kqRWallFunction); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.C deleted file mode 100644 index 269f9698a..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,133 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "mutLowReWallFunctionFvPatchScalarField.H" -#include "compressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -tmp<scalarField> mutLowReWallFunctionFvPatchScalarField::calcMut() const -{ - return tmp<scalarField>(new scalarField(patch().size(), 0.0)); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -mutLowReWallFunctionFvPatchScalarField::mutLowReWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - mutWallFunctionFvPatchScalarField(p, iF) -{} - - -mutLowReWallFunctionFvPatchScalarField::mutLowReWallFunctionFvPatchScalarField -( - const mutLowReWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) -{} - - -mutLowReWallFunctionFvPatchScalarField::mutLowReWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - mutWallFunctionFvPatchScalarField(p, iF, dict) -{} - - -mutLowReWallFunctionFvPatchScalarField::mutLowReWallFunctionFvPatchScalarField -( - const mutLowReWallFunctionFvPatchScalarField& mlrwfpsf -) -: - mutWallFunctionFvPatchScalarField(mlrwfpsf) -{} - - -mutLowReWallFunctionFvPatchScalarField::mutLowReWallFunctionFvPatchScalarField -( - const mutLowReWallFunctionFvPatchScalarField& mlrwfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - mutWallFunctionFvPatchScalarField(mlrwfpsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<scalarField> mutLowReWallFunctionFvPatchScalarField::yPlus() const -{ - const label patchi = patch().index(); - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbModel.y()[patchi]; - const scalarField nuw - ( - turbModel.mu().boundaryField()[patchi] - /turbModel.rho().boundaryField()[patchi] - ); - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; - - return y*sqrt(nuw*mag(Uw.snGrad()))/nuw; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - mutLowReWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.H deleted file mode 100644 index 75f751288..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutLowReWallFunction/mutLowReWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,168 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::mutLowReWallFunctionFvPatchScalarField - -Group - grpCmpWallFunctions - -Description - This boundary condition provides a turbulent viscosity condition for use - with low Reynolds number models. It sets \c nut to zero, and provides an - access function to calculate y+. - - \heading Patch usage - - Example of the boundary condition specification: - \verbatim - myPatch - { - type mutLowReWallFunction; - } - \endverbatim - -SeeAlso - Foam::compressible::mutWallFunctionFvPatchScalarField - -SourceFiles - mutLowReWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleMutLowReWallFunctionFvPatchScalarField_H -#define compressibleMutLowReWallFunctionFvPatchScalarField_H - -#include "mutWallFunctionFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class mutLowReWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class mutLowReWallFunctionFvPatchScalarField -: - public mutWallFunctionFvPatchScalarField -{ -protected: - - // Private Member Functions - - //- Calculate the turbulence viscosity - virtual tmp<scalarField> calcMut() const; - - -public: - - //- Runtime type information - TypeName("mutLowReWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - mutLowReWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - mutLowReWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // mutLowReWallFunctionFvPatchScalarField - // onto a new patch - mutLowReWallFunctionFvPatchScalarField - ( - const mutLowReWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - mutLowReWallFunctionFvPatchScalarField - ( - const mutLowReWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new mutLowReWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - mutLowReWallFunctionFvPatchScalarField - ( - const mutLowReWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new mutLowReWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Calculate and return the yPlus at the boundary - virtual tmp<scalarField> yPlus() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C deleted file mode 100644 index 5591904c9..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,315 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "mutURoughWallFunctionFvPatchScalarField.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "compressible/turbulenceModel/turbulenceModel.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -tmp<scalarField> mutURoughWallFunctionFvPatchScalarField::calcYPlus -( - const scalarField& magUp -) const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - - const scalarField& y = turbModel.y()[patchi]; - const scalarField& muw = turbModel.mu().boundaryField()[patchi]; - const fvPatchScalarField& rho = turbModel.rho().boundaryField()[patchi]; - - tmp<scalarField> tyPlus(new scalarField(patch().size(), 0.0)); - scalarField& yPlus = tyPlus(); - - if (roughnessHeight_ > 0.0) - { - // Rough Walls - const scalar c_1 = 1/(90 - 2.25) + roughnessConstant_; - static const scalar c_2 = 2.25/(90 - 2.25); - static const scalar c_3 = 2.0*atan(1.0)/log(90/2.25); - static const scalar c_4 = c_3*log(2.25); - - //if (KsPlusBasedOnYPlus_) - { - // If KsPlus is based on YPlus the extra term added to the law - // of the wall will depend on yPlus - forAll(yPlus, facei) - { - const scalar Re = rho[facei]*magUp[facei]*y[facei]/muw[facei]; - const scalar kappaRe = kappa_*Re; - - scalar yp = yPlusLam_; - const scalar ryPlusLam = 1.0/yp; - - int iter = 0; - scalar yPlusLast = 0.0; - scalar dKsPlusdYPlus = roughnessHeight_/y[facei]; - - // Enforce the roughnessHeight to be less than the distance to - // the first cell centre. - if (dKsPlusdYPlus > 1) - { - dKsPlusdYPlus = 1; - } - - // Additional tuning parameter (fudge factor) - nominally = 1 - dKsPlusdYPlus *= roughnessFactor_; - - do - { - yPlusLast = yp; - - // The non-dimensional roughness height - scalar KsPlus = yp*dKsPlusdYPlus; - - // The extra term in the law-of-the-wall - scalar G = 0.0; - - scalar yPlusGPrime = 0.0; - - if (KsPlus >= 90) - { - const scalar t_1 = 1 + roughnessConstant_*KsPlus; - G = log(t_1); - yPlusGPrime = roughnessConstant_*KsPlus/t_1; - } - else if (KsPlus > 2.25) - { - const scalar t_1 = c_1*KsPlus - c_2; - const scalar t_2 = c_3*log(KsPlus) - c_4; - const scalar sint_2 = sin(t_2); - const scalar logt_1 = log(t_1); - G = logt_1*sint_2; - yPlusGPrime = - (c_1*sint_2*KsPlus/t_1) + (c_3*logt_1*cos(t_2)); - } - - scalar denom = 1.0 + log(E_*yp) - G - yPlusGPrime; - if (mag(denom) > VSMALL) - { - yp = (kappaRe + yp*(1 - yPlusGPrime))/denom; - } - - } while - ( - mag(ryPlusLam*(yp - yPlusLast)) > 0.0001 - && ++iter < 10 - && yp > VSMALL - ); - - yPlus[facei] = max(0.0, yp); - } - } - } - else - { - // Smooth Walls - forAll(yPlus, facei) - { - const scalar Re = rho[facei]*magUp[facei]*y[facei]/muw[facei]; - const scalar kappaRe = kappa_*Re; - - scalar yp = yPlusLam_; - const scalar ryPlusLam = 1.0/yp; - - int iter = 0; - scalar yPlusLast = 0.0; - - do - { - yPlusLast = yp; - yp = (kappaRe + yp)/(1.0 + log(E_*yp)); - - } while - ( - mag(ryPlusLam*(yp - yPlusLast)) > 0.0001 - && ++iter < 10 - ); - - yPlus[facei] = max(0.0, yp); - } - } - - return tyPlus; -} - - -tmp<scalarField> mutURoughWallFunctionFvPatchScalarField::calcMut() const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - - const scalarField& y = turbModel.y()[patchi]; - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; - const scalarField& muw = turbModel.mu().boundaryField()[patchi]; - const fvPatchScalarField& rho = turbModel.rho().boundaryField()[patchi]; - - scalarField magUp(mag(Uw.patchInternalField() - Uw)); - - tmp<scalarField> tyPlus = calcYPlus(magUp); - scalarField& yPlus = tyPlus(); - - tmp<scalarField> tmutw(new scalarField(patch().size(), 0.0)); - scalarField& mutw = tmutw(); - - forAll(yPlus, facei) - { - if (yPlus[facei] > yPlusLam_) - { - const scalar Re = - rho[facei]*magUp[facei]*y[facei]/muw[facei] + ROOTVSMALL; - mutw[facei] = muw[facei]*(sqr(yPlus[facei])/Re - 1); - } - } - - return tmutw; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - mutWallFunctionFvPatchScalarField(p, iF), - roughnessHeight_(pTraits<scalar>::zero), - roughnessConstant_(pTraits<scalar>::zero), - roughnessFactor_(pTraits<scalar>::zero) -{} - - -mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField -( - const mutURoughWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper), - roughnessHeight_(ptf.roughnessHeight_), - roughnessConstant_(ptf.roughnessConstant_), - roughnessFactor_(ptf.roughnessFactor_) -{} - - -mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - mutWallFunctionFvPatchScalarField(p, iF, dict), - roughnessHeight_(readScalar(dict.lookup("roughnessHeight"))), - roughnessConstant_(readScalar(dict.lookup("roughnessConstant"))), - roughnessFactor_(readScalar(dict.lookup("roughnessFactor"))) -{} - - -mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField -( - const mutURoughWallFunctionFvPatchScalarField& rwfpsf -) -: - mutWallFunctionFvPatchScalarField(rwfpsf), - roughnessHeight_(rwfpsf.roughnessHeight_), - roughnessConstant_(rwfpsf.roughnessConstant_), - roughnessFactor_(rwfpsf.roughnessFactor_) -{} - - -mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField -( - const mutURoughWallFunctionFvPatchScalarField& rwfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - mutWallFunctionFvPatchScalarField(rwfpsf, iF), - roughnessHeight_(rwfpsf.roughnessHeight_), - roughnessConstant_(rwfpsf.roughnessConstant_), - roughnessFactor_(rwfpsf.roughnessFactor_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<scalarField> mutURoughWallFunctionFvPatchScalarField::yPlus() const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; - const scalarField magUp(mag(Uw.patchInternalField() - Uw)); - - return calcYPlus(magUp); -} - - -void mutURoughWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fixedValueFvPatchScalarField::write(os); - writeLocalEntries(os); - os.writeKeyword("roughnessHeight") - << roughnessHeight_ << token::END_STATEMENT << nl; - os.writeKeyword("roughnessConstant") - << roughnessConstant_ << token::END_STATEMENT << nl; - os.writeKeyword("roughnessFactor") - << roughnessFactor_ << token::END_STATEMENT << nl; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - mutURoughWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H deleted file mode 100644 index ea1aaa184..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,240 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::mutURoughWallFunctionFvPatchScalarField - -Group - grpCmpWallFunctions - -Description - This boundary condition provides a turbulent viscosity condition when - using wall functions for rough walls, based on velocity. - - \heading Patch usage - - \table - Property | Description | Required | Default value - roughnessHeight | roughness height | yes | - roughnessConstant | roughness constanr | yes | - roughnessFactor | scaling factor | yes | - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type mutURoughWallFunction; - roughnessHeight 1e-5; - roughnessConstant 0.5; - roughnessFactor 1; - } - \endverbatim - -SeeAlso - Foam::compressible::mutWallFunctionFvPatchScalarField - -SourceFiles - mutURoughWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleMutURoughWallFunctionFvPatchScalarField_H -#define compressibleMutURoughWallFunctionFvPatchScalarField_H - -#include "mutWallFunctionFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class mutURoughWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class mutURoughWallFunctionFvPatchScalarField -: - public mutWallFunctionFvPatchScalarField -{ -protected: - - // Protected data - - // Roughness parameters - - //- Height - scalar roughnessHeight_; - - //- Constant - scalar roughnessConstant_; - - //- Scale factor - scalar roughnessFactor_; - - - // Protected Member Functions - - //- Calculate yPLus - virtual tmp<scalarField> calcYPlus(const scalarField& magUp) const; - - //- Calculate the turbulence viscosity - virtual tmp<scalarField> calcMut() const; - - -public: - - //- Runtime type information - TypeName("mutURoughWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - mutURoughWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - mutURoughWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // mutURoughWallFunctionFvPatchScalarField - // onto a new patch - mutURoughWallFunctionFvPatchScalarField - ( - const mutURoughWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - mutURoughWallFunctionFvPatchScalarField - ( - const mutURoughWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new mutURoughWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - mutURoughWallFunctionFvPatchScalarField - ( - const mutURoughWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new mutURoughWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Access - - //- Return the roughness height scale - scalar roughnessHeight() const - { - return roughnessHeight_; - } - - //- Return reference to the roughness height to allow adjustment - scalar& roughnessHeight() - { - return roughnessHeight_; - } - - //- Return the roughness constant scale - scalar roughnessConstant() const - { - return roughnessConstant_; - } - - //- Return reference to the roughness constant to allow adjustment - scalar& roughnessConstant() - { - return roughnessConstant_; - } - - //- Return the roughness scale factor - scalar roughnessFactor() const - { - return roughnessFactor_; - } - - //- Return reference to the roughness scale factor to allow - // adjustment - scalar& roughnessFactor() - { - return roughnessFactor_; - } - - - // Evaluation functions - - //- Calculate and return the yPlus at the boundary - virtual tmp<scalarField> yPlus() const; - - - // I-O - - //- Write - virtual void write(Ostream& os) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C deleted file mode 100644 index 64bb1238e..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,223 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "mutUSpaldingWallFunctionFvPatchScalarField.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "compressible/turbulenceModel/turbulenceModel.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -tmp<scalarField> mutUSpaldingWallFunctionFvPatchScalarField::calcUTau -( - const scalarField& magGradU -) const -{ - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - - const scalarField& y = turbModel.y()[patch().index()]; - - const fvPatchVectorField& Uw = - turbModel.U().boundaryField()[patch().index()]; - - scalarField magUp(mag(Uw.patchInternalField() - Uw)); - - const fvPatchScalarField& rhow = - turbModel.rho().boundaryField()[patch().index()]; - - const fvPatchScalarField& muw = - turbModel.mu().boundaryField()[patch().index()]; - const scalarField& mutw = *this; - - tmp<scalarField> tuTau(new scalarField(patch().size(), 0.0)); - scalarField& uTau = tuTau(); - - forAll(mutw, faceI) - { - scalar ut = - sqrt((mutw[faceI] + muw[faceI])*magGradU[faceI]/rhow[faceI]); - - if (ut > ROOTVSMALL) - { - int iter = 0; - scalar err = GREAT; - - do - { - scalar kUu = min(kappa_*magUp[faceI]/ut, 50); - scalar fkUu = exp(kUu) - 1 - kUu*(1 + 0.5*kUu); - - scalar f = - - ut*y[faceI]/(muw[faceI]/rhow[faceI]) - + magUp[faceI]/ut - + 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu)); - - scalar df = - y[faceI]/(muw[faceI]/rhow[faceI]) - + magUp[faceI]/sqr(ut) - + 1/E_*kUu*fkUu/ut; - - scalar uTauNew = ut + f/df; - err = mag((ut - uTauNew)/ut); - ut = uTauNew; - - } while (ut > ROOTVSMALL && err > 0.01 && ++iter < 10); - - uTau[faceI] = max(0.0, ut); - } - } - - return tuTau; -} - - -tmp<scalarField> mutUSpaldingWallFunctionFvPatchScalarField::calcMut() const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; - const scalarField magGradU(mag(Uw.snGrad())); - const scalarField& rhow = turbModel.rho().boundaryField()[patchi]; - const scalarField& muw = turbModel.mu().boundaryField()[patchi]; - - return max - ( - scalar(0), - rhow*sqr(calcUTau(magGradU))/(magGradU + ROOTVSMALL) - muw - ); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -mutUSpaldingWallFunctionFvPatchScalarField:: -mutUSpaldingWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - mutWallFunctionFvPatchScalarField(p, iF) -{} - - -mutUSpaldingWallFunctionFvPatchScalarField:: -mutUSpaldingWallFunctionFvPatchScalarField -( - const mutUSpaldingWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) -{} - - -mutUSpaldingWallFunctionFvPatchScalarField:: -mutUSpaldingWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - mutWallFunctionFvPatchScalarField(p, iF, dict) -{} - - -mutUSpaldingWallFunctionFvPatchScalarField:: -mutUSpaldingWallFunctionFvPatchScalarField -( - const mutUSpaldingWallFunctionFvPatchScalarField& wfpsf -) -: - mutWallFunctionFvPatchScalarField(wfpsf) -{} - - -mutUSpaldingWallFunctionFvPatchScalarField:: -mutUSpaldingWallFunctionFvPatchScalarField -( - const mutUSpaldingWallFunctionFvPatchScalarField& wfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - mutWallFunctionFvPatchScalarField(wfpsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<scalarField> mutUSpaldingWallFunctionFvPatchScalarField::yPlus() const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - - const scalarField& y = turbModel.y()[patchi]; - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; - const scalarField& rhow = turbModel.rho().boundaryField()[patchi]; - const scalarField& muw = turbModel.mu().boundaryField()[patchi]; - - return y*calcUTau(mag(Uw.snGrad()))/(muw/rhow); -} - - -void mutUSpaldingWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fvPatchField<scalar>::write(os); - writeLocalEntries(os); - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - mutUSpaldingWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.H deleted file mode 100644 index a0322dbeb..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,190 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::mutUSpaldingWallFunctionFvPatchScalarField - -Group - grpCmpWallFunctions - -Description - This boundary condition provides a turbulent viscosity condition when - using wall functions for rough walls, based on velocity, using Spalding's - law to give a continuous nut profile to the wall (y+ = 0) - - \f[ - y^+ = u^+ + \frac{1}{E} \left[exp(\kappa u^+) - 1 - \kappa u^+\, - - 0.5 (\kappa u^+)^2 - \frac{1}{6} (\kappa u^+)^3\right] - \f] - - where - \vartable - y^+ | non-dimensional position - u^+ | non-dimensional velocity - \kappa | Von Karman constant - \endvartable - - - \heading Patch usage - - Example of the boundary condition specification: - \verbatim - myPatch - { - type mutUSpaldingWallFunction; - } - \endverbatim - -SeeAlso - Foam::compressible::mutWallFunctionFvPatchScalarField - -SourceFiles - mutUSpaldingWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleMutUSpaldingWallFunctionFvPatchScalarField_H -#define compressibleMutUSpaldingWallFunctionFvPatchScalarField_H - -#include "mutWallFunctionFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class mutUSpaldingWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class mutUSpaldingWallFunctionFvPatchScalarField -: - public mutWallFunctionFvPatchScalarField -{ -protected: - - // Protected Member Functions - - //- Calculate the turbulence viscosity - virtual tmp<scalarField> calcMut() const; - - //- Calculate the friction velocity - virtual tmp<scalarField> calcUTau(const scalarField& magGradU) const; - - -public: - - //- Runtime type information - TypeName("mutUSpaldingWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - mutUSpaldingWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - mutUSpaldingWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // mutUSpaldingWallFunctionFvPatchScalarField - // onto a new patch - mutUSpaldingWallFunctionFvPatchScalarField - ( - const mutUSpaldingWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - mutUSpaldingWallFunctionFvPatchScalarField - ( - const mutUSpaldingWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new mutUSpaldingWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - mutUSpaldingWallFunctionFvPatchScalarField - ( - const mutUSpaldingWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new mutUSpaldingWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Calculate and return the yPlus at the boundary - virtual tmp<scalarField> yPlus() const; - - - // I-O - - //- Write - virtual void write(Ostream& os) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C deleted file mode 100644 index 3148119dc..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,201 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "mutUWallFunctionFvPatchScalarField.H" -#include "compressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -tmp<scalarField> mutUWallFunctionFvPatchScalarField::calcYPlus -( - const scalarField& magUp -) const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - - const scalarField& y = turbModel.y()[patchi]; - const fvPatchScalarField& rhow = turbModel.rho().boundaryField()[patchi]; - const fvPatchScalarField& muw = turbModel.mu().boundaryField()[patchi]; - - tmp<scalarField> tyPlus(new scalarField(patch().size(), 0.0)); - scalarField& yPlus = tyPlus(); - - forAll(yPlus, faceI) - { - scalar kappaRe = kappa_*magUp[faceI]*y[faceI]/(muw[faceI]/rhow[faceI]); - - scalar yp = yPlusLam_; - scalar ryPlusLam = 1.0/yp; - - int iter = 0; - scalar yPlusLast = 0.0; - - do - { - yPlusLast = yp; - yp = (kappaRe + yp)/(1.0 + log(E_*yp)); - - } while (mag(ryPlusLam*(yp - yPlusLast)) > 0.01 && ++iter < 10); - - yPlus[faceI] = max(0.0, yp); - } - - return tyPlus; -} - - -tmp<scalarField> mutUWallFunctionFvPatchScalarField::calcMut() const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; - const scalarField magUp(mag(Uw.patchInternalField() - Uw)); - const fvPatchScalarField& muw = turbModel.mu().boundaryField()[patchi]; - - tmp<scalarField> tyPlus = calcYPlus(magUp); - scalarField& yPlus = tyPlus(); - - tmp<scalarField> tmutw(new scalarField(patch().size(), 0.0)); - scalarField& mutw = tmutw(); - - forAll(yPlus, faceI) - { - if (yPlus[faceI] > yPlusLam_) - { - mutw[faceI] = - muw[faceI]*(yPlus[faceI]*kappa_/log(E_*yPlus[faceI]) - 1.0); - } - } - - return tmutw; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - mutWallFunctionFvPatchScalarField(p, iF) -{} - - -mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField -( - const mutUWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) -{} - - -mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - mutWallFunctionFvPatchScalarField(p, iF, dict) -{} - - -mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField -( - const mutUWallFunctionFvPatchScalarField& sawfpsf -) -: - mutWallFunctionFvPatchScalarField(sawfpsf) -{} - - -mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField -( - const mutUWallFunctionFvPatchScalarField& sawfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - mutWallFunctionFvPatchScalarField(sawfpsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<scalarField> mutUWallFunctionFvPatchScalarField::yPlus() const -{ - const label patchi = patch().index(); - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; - const scalarField magUp(mag(Uw.patchInternalField() - Uw)); - - return calcYPlus(magUp); -} - - -void mutUWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fvPatchField<scalar>::write(os); - writeLocalEntries(os); - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - mutUWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.H deleted file mode 100644 index 1c6ed4f7d..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,176 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::mutUWallFunctionFvPatchScalarField - -Group - grpCmpWallFunctions - -Description - This boundary condition provides a turbulent viscosity condition when - using wall functions, based on velocity. - - \heading Patch usage - - Example of the boundary condition specification: - \verbatim - myPatch - { - type mutUWallFunction; - } - \endverbatim - -SeeAlso - Foam::compressible::mutWallFunctionFvPatchScalarField - -SourceFiles - mutUWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleMutUWallFunctionFvPatchScalarField_H -#define compressibleMutUWallFunctionFvPatchScalarField_H - -#include "mutWallFunctionFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class mutUWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class mutUWallFunctionFvPatchScalarField -: - public mutWallFunctionFvPatchScalarField -{ -protected: - - // Protected Member Functions - - //- Calculate yPLus - virtual tmp<scalarField> calcYPlus(const scalarField& magUp) const; - - //- Calculate the turbulence viscosity - virtual tmp<scalarField> calcMut() const; - - -public: - - //- Runtime type information - TypeName("mutUWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - mutUWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - mutUWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // mutUWallFunctionFvPatchScalarField - // onto a new patch - mutUWallFunctionFvPatchScalarField - ( - const mutUWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - mutUWallFunctionFvPatchScalarField - ( - const mutUWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new mutUWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - mutUWallFunctionFvPatchScalarField - ( - const mutUWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new mutUWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Calculate and return the yPlus at the boundary - virtual tmp<scalarField> yPlus() const; - - - // I-O - - //- Write - virtual void write(Ostream& os) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C deleted file mode 100644 index f4a6476be..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,187 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "mutWallFunctionFvPatchScalarField.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "wallFvPatch.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -defineTypeNameAndDebug(mutWallFunctionFvPatchScalarField, 0); - - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -void mutWallFunctionFvPatchScalarField::checkType() -{ - if (!isA<wallFvPatch>(patch())) - { - FatalErrorIn("mutWallFunctionFvPatchScalarField::checkType()") - << "Invalid wall function specification" << nl - << " Patch type for patch " << patch().name() - << " must be wall" << nl - << " Current patch type is " << patch().type() << nl << endl - << abort(FatalError); - } -} - - -void mutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const -{ - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchScalarField(p, iF), - Cmu_(0.09), - kappa_(0.41), - E_(9.8), - yPlusLam_(yPlusLam(kappa_, E_)) -{} - - -mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField -( - const mutWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchScalarField(ptf, p, iF, mapper), - Cmu_(ptf.Cmu_), - kappa_(ptf.kappa_), - E_(ptf.E_), - yPlusLam_(ptf.yPlusLam_) -{} - - -mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - fixedValueFvPatchScalarField(p, iF, dict), - Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)), - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - E_(dict.lookupOrDefault<scalar>("E", 9.8)), - yPlusLam_(yPlusLam(kappa_, E_)) -{} - - -mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField -( - const mutWallFunctionFvPatchScalarField& wfpsf -) -: - fixedValueFvPatchScalarField(wfpsf), - Cmu_(wfpsf.Cmu_), - kappa_(wfpsf.kappa_), - E_(wfpsf.E_), - yPlusLam_(wfpsf.yPlusLam_) -{} - - -mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField -( - const mutWallFunctionFvPatchScalarField& wfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchScalarField(wfpsf, iF), - Cmu_(wfpsf.Cmu_), - kappa_(wfpsf.kappa_), - E_(wfpsf.E_), - yPlusLam_(wfpsf.yPlusLam_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -scalar mutWallFunctionFvPatchScalarField::yPlusLam -( - const scalar kappa, - const scalar E -) -{ - scalar ypl = 11.0; - - for (int i=0; i<10; i++) - { - ypl = log(max(E*ypl, 1))/kappa; - } - - return ypl; -} - - -void mutWallFunctionFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - operator==(calcMut()); - - fixedValueFvPatchScalarField::updateCoeffs(); -} - - -void mutWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fvPatchField<scalar>::write(os); - writeLocalEntries(os); - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H deleted file mode 100644 index 29bc406aa..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,181 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::mutWallFunctionFvPatchScalarField - -Group - grpCmpWallFunctions - -Description - This boundary condition provides a turbulent viscosity condition when - using wall functions, based on turbulence kinetic energy. - - replicates OpenFOAM v1.5 (and earlier) behaviour - - \heading Patch usage - - Example of the boundary condition specification: - \verbatim - myPatch - { - type mutWallFunction; - } - \endverbatim - -SeeAlso - Foam::fixedValueFvPatchField - -SourceFiles - mutWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleMutWallFunctionFvPatchScalarField_H -#define compressibleMutWallFunctionFvPatchScalarField_H - -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class mutWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class mutWallFunctionFvPatchScalarField -: - public fixedValueFvPatchScalarField -{ -protected: - - // Protected data - - //- Cmu coefficient - scalar Cmu_; - - //- Von Karman constant - scalar kappa_; - - //- E coefficient - scalar E_; - - //- Y+ at the edge of the laminar sublayer - scalar yPlusLam_; - - - // Protected Member Functions - - //- Check the type of the patch - virtual void checkType(); - - //- Calculate the turbulence viscosity - virtual tmp<scalarField> calcMut() const = 0; - - //- Write local wall function variables - virtual void writeLocalEntries(Ostream&) const; - - -public: - - //- Runtime type information - TypeName("mutWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - mutWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - mutWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // mutWallFunctionFvPatchScalarField - // onto a new patch - mutWallFunctionFvPatchScalarField - ( - const mutWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - mutWallFunctionFvPatchScalarField - ( - const mutWallFunctionFvPatchScalarField& - ); - - //- Construct as copy setting internal field reference - mutWallFunctionFvPatchScalarField - ( - const mutWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - - // Member functions - - //- Calculate the Y+ at the edge of the laminar sublayer - static scalar yPlusLam(const scalar kappa, const scalar E); - - //- Calculate and return the yPlus at the boundary - virtual tmp<scalarField> yPlus() const = 0; - - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - - // I-O - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C deleted file mode 100644 index e634b89ac..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,241 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "mutkRoughWallFunctionFvPatchScalarField.H" -#include "compressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -scalar mutkRoughWallFunctionFvPatchScalarField::fnRough -( - const scalar KsPlus, - const scalar Cs -) const -{ - // Return fn based on non-dimensional roughness height - - if (KsPlus < 90.0) - { - return pow - ( - (KsPlus - 2.25)/87.75 + Cs*KsPlus, - sin(0.4258*(log(KsPlus) - 0.811)) - ); - } - else - { - return (1.0 + Cs*KsPlus); - } -} - - -tmp<scalarField> mutkRoughWallFunctionFvPatchScalarField::calcMut() const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - - const scalarField& y = turbModel.y()[patchi]; - const scalarField& rhow = turbModel.rho().boundaryField()[patchi]; - const tmp<volScalarField> tk = turbModel.k(); - const volScalarField& k = tk(); - const scalarField& muw = turbModel.mu().boundaryField()[patchi]; - - const scalar Cmu25 = pow025(Cmu_); - - tmp<scalarField> tmutw(new scalarField(*this)); - scalarField& mutw = tmutw(); - - forAll(mutw, faceI) - { - label faceCellI = patch().faceCells()[faceI]; - - scalar uStar = Cmu25*sqrt(k[faceCellI]); - scalar yPlus = uStar*y[faceI]/(muw[faceI]/rhow[faceI]); - scalar KsPlus = uStar*Ks_[faceI]/(muw[faceI]/rhow[faceI]); - - scalar Edash = E_; - if (KsPlus > 2.25) - { - Edash /= fnRough(KsPlus, Cs_[faceI]); - } - - scalar limitingMutw = max(mutw[faceI], muw[faceI]); - - // To avoid oscillations limit the change in the wall viscosity - // which is particularly important if it temporarily becomes zero - mutw[faceI] = - max - ( - min - ( - muw[faceI] - *(yPlus*kappa_/log(max(Edash*yPlus, 1+1e-4)) - 1), - 2*limitingMutw - ), 0.5*limitingMutw - ); - - if (debug) - { - Info<< "yPlus = " << yPlus - << ", KsPlus = " << KsPlus - << ", Edash = " << Edash - << ", mutw = " << mutw[faceI] - << endl; - } - } - - return tmutw; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - mutkWallFunctionFvPatchScalarField(p, iF), - Ks_(p.size(), 0.0), - Cs_(p.size(), 0.0) -{} - - -mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField -( - const mutkRoughWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper), - Ks_(ptf.Ks_, mapper), - Cs_(ptf.Cs_, mapper) -{} - - -mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - mutkWallFunctionFvPatchScalarField(p, iF, dict), - Ks_("Ks", dict, p.size()), - Cs_("Cs", dict, p.size()) -{} - - -mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField -( - const mutkRoughWallFunctionFvPatchScalarField& rwfpsf -) -: - mutkWallFunctionFvPatchScalarField(rwfpsf), - Ks_(rwfpsf.Ks_), - Cs_(rwfpsf.Cs_) -{} - - -mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField -( - const mutkRoughWallFunctionFvPatchScalarField& rwfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - mutkWallFunctionFvPatchScalarField(rwfpsf, iF), - Ks_(rwfpsf.Ks_), - Cs_(rwfpsf.Cs_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void mutkRoughWallFunctionFvPatchScalarField::autoMap -( - const fvPatchFieldMapper& m -) -{ - mutkWallFunctionFvPatchScalarField::autoMap(m); - Ks_.autoMap(m); - Cs_.autoMap(m); -} - - -void mutkRoughWallFunctionFvPatchScalarField::rmap -( - const fvPatchScalarField& ptf, - const labelList& addr -) -{ - mutkWallFunctionFvPatchScalarField::rmap(ptf, addr); - - const mutkRoughWallFunctionFvPatchScalarField& nrwfpsf = - refCast<const mutkRoughWallFunctionFvPatchScalarField>(ptf); - - Cs_.rmap(nrwfpsf.Cs_, addr); - Ks_.rmap(nrwfpsf.Ks_, addr); -} - - -void mutkRoughWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fvPatchField<scalar>::write(os); - writeLocalEntries(os); - Cs_.writeEntry("Cs", os); - Ks_.writeEntry("Ks", os); - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - mutkRoughWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.H deleted file mode 100644 index 6ff72c42d..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,206 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::mutkRoughWallFunctionFvPatchScalarField - -Group - grpCmpWallFunctions - -Description - This boundary condition provides a turbulent viscosity condition when - using wall functions for rough walls, based on turbulence kinetic energy. - The condition manipulates the E parameter to account for roughness - effects. - - Parameter ranges - - roughness height = sand-grain roughness (0 for smooth walls) - - roughness constant = 0.5-1.0 - - \heading Patch usage - - \table - Property | Description | Required | Default value - Ks | sand-grain roughness height | yes | - Cs | roughness constant | yes | - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type mutkRoughWallFunction; - Ks uniform 0; - Cs uniform 0.5; - } - \endverbatim - -SeeAlso - Foam::compressible::mutkRoughWallFunctionFvPatchScalarField - -SourceFiles - mutkRoughWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleMutkRoughWallFunctionFvPatchScalarField_H -#define compressibleMutkRoughWallFunctionFvPatchScalarField_H - -#include "mutkWallFunctionFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class mutkRoughWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class mutkRoughWallFunctionFvPatchScalarField -: - public mutkWallFunctionFvPatchScalarField -{ -protected: - - // Protected data - - //- Roughness height - scalarField Ks_; - - //- Roughness constant - scalarField Cs_; - - - // Private Member Functions - - //- Compute the roughness function - virtual scalar fnRough(const scalar KsPlus, const scalar Cs) const; - - //- Calculate the turbulence viscosity - virtual tmp<scalarField> calcMut() const; - - -public: - - //- Runtime type information - TypeName("mutkRoughWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - mutkRoughWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - mutkRoughWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // mutkRoughWallFunctionFvPatchScalarField - // onto a new patch - mutkRoughWallFunctionFvPatchScalarField - ( - const mutkRoughWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - mutkRoughWallFunctionFvPatchScalarField - ( - const mutkRoughWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new mutkRoughWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - mutkRoughWallFunctionFvPatchScalarField - ( - const mutkRoughWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new mutkRoughWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Mapping functions - - //- Map (and resize as needed) from self given a mapping object - virtual void autoMap(const fvPatchFieldMapper&); - - //- Reverse map the given fvPatchField onto this fvPatchField - virtual void rmap - ( - const fvPatchScalarField&, - const labelList& - ); - - - // I-O - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C deleted file mode 100644 index 72b010d55..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,163 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "mutkWallFunctionFvPatchScalarField.H" -#include "compressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "wallFvPatch.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -tmp<scalarField> mutkWallFunctionFvPatchScalarField::calcMut() const -{ - const label patchi = patch().index(); - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbModel.y()[patchi]; - const scalarField& rhow = turbModel.rho().boundaryField()[patchi]; - const tmp<volScalarField> tk = turbModel.k(); - const volScalarField& k = tk(); - const scalarField& muw = turbModel.mu().boundaryField()[patchi]; - - const scalar Cmu25 = pow025(Cmu_); - - tmp<scalarField> tmutw(new scalarField(patch().size(), 0.0)); - scalarField& mutw = tmutw(); - - forAll(mutw, faceI) - { - label faceCellI = patch().faceCells()[faceI]; - - scalar yPlus = - Cmu25*y[faceI]*sqrt(k[faceCellI])/(muw[faceI]/rhow[faceI]); - - if (yPlus > yPlusLam_) - { - mutw[faceI] = muw[faceI]*(yPlus*kappa_/log(E_*yPlus) - 1); - } - } - - return tmutw; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - mutWallFunctionFvPatchScalarField(p, iF) -{} - - -mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField -( - const mutkWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) -{} - - -mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - mutWallFunctionFvPatchScalarField(p, iF, dict) -{} - - -mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField -( - const mutkWallFunctionFvPatchScalarField& wfpsf -) -: - mutWallFunctionFvPatchScalarField(wfpsf) -{} - - -mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField -( - const mutkWallFunctionFvPatchScalarField& wfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - mutWallFunctionFvPatchScalarField(wfpsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<scalarField> mutkWallFunctionFvPatchScalarField::yPlus() const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbModel.y()[patchi]; - - const tmp<volScalarField> tk = turbModel.k(); - const volScalarField& k = tk(); - const scalarField kwc(k.boundaryField()[patchi].patchInternalField()); - const scalarField& muw = turbModel.mu().boundaryField()[patchi]; - const scalarField& rhow = turbModel.rho().boundaryField()[patchi]; - - return pow025(Cmu_)*y*sqrt(kwc)/(muw/rhow); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - mutkWallFunctionFvPatchScalarField -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.H deleted file mode 100644 index f81625627..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,168 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::mutkWallFunctionFvPatchScalarField - -Group - grpCmpWallFunctions - -Description - This boundary condition provides a turbulent viscosity condition when - using wall functions, based on turbulence kinetic energy. - - replicates OpenFOAM v1.5 (and earlier) behaviour - - \heading Patch usage - - Example of the boundary condition specification: - \verbatim - myPatch - { - type mutkWallFunction; - } - \endverbatim - -SeeAlso - Foam::compressible::mutWallFunctionFvPatchScalarField - -SourceFiles - mutkWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleMutkWallFunctionFvPatchScalarField_H -#define compressibleMutkWallFunctionFvPatchScalarField_H - -#include "mutWallFunctionFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class mutkWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class mutkWallFunctionFvPatchScalarField -: - public mutWallFunctionFvPatchScalarField -{ -protected: - - // Protected Member Functions - - //- Calculate the turbulence viscosity - virtual tmp<scalarField> calcMut() const; - - -public: - - //- Runtime type information - TypeName("mutkWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - mutkWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - mutkWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // mutkWallFunctionFvPatchScalarField - // onto a new patch - mutkWallFunctionFvPatchScalarField - ( - const mutkWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - mutkWallFunctionFvPatchScalarField - ( - const mutkWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new mutkWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - mutkWallFunctionFvPatchScalarField - ( - const mutkWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new mutkWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Calculate and return the yPlus at the boundary - virtual tmp<scalarField> yPlus() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C deleted file mode 100644 index 89d4782aa..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,603 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "omegaWallFunctionFvPatchScalarField.H" -#include "compressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "fvMatrix.H" -#include "volFields.H" -#include "wallFvPatch.H" -#include "mutWallFunctionFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -scalar omegaWallFunctionFvPatchScalarField::tolerance_ = 1e-5; - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -void omegaWallFunctionFvPatchScalarField::checkType() -{ - if (!isA<wallFvPatch>(patch())) - { - FatalErrorIn("omegaWallFunctionFvPatchScalarField::checkType()") - << "Invalid wall function specification" << nl - << " Patch type for patch " << patch().name() - << " must be wall" << nl - << " Current patch type is " << patch().type() << nl << endl - << abort(FatalError); - } -} - - -void omegaWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const -{ - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; - os.writeKeyword("beta1") << beta1_ << token::END_STATEMENT << nl; -} - - -void omegaWallFunctionFvPatchScalarField::setMaster() -{ - if (master_ != -1) - { - return; - } - - const volScalarField& omega = - static_cast<const volScalarField&>(this->dimensionedInternalField()); - - const volScalarField::GeometricBoundaryField& bf = omega.boundaryField(); - - label master = -1; - forAll(bf, patchI) - { - if (isA<omegaWallFunctionFvPatchScalarField>(bf[patchI])) - { - omegaWallFunctionFvPatchScalarField& opf = omegaPatch(patchI); - - if (master == -1) - { - master = patchI; - } - - opf.master() = master; - } - } -} - - -void omegaWallFunctionFvPatchScalarField::createAveragingWeights() -{ - const volScalarField& omega = - static_cast<const volScalarField&>(this->dimensionedInternalField()); - - const volScalarField::GeometricBoundaryField& bf = omega.boundaryField(); - - const fvMesh& mesh = omega.mesh(); - - if (initialised_ && !mesh.changing()) - { - return; - } - - volScalarField weights - ( - IOobject - ( - "weights", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false // do not register - ), - mesh, - dimensionedScalar("zero", dimless, 0.0) - ); - - DynamicList<label> omegaPatches(bf.size()); - forAll(bf, patchI) - { - if (isA<omegaWallFunctionFvPatchScalarField>(bf[patchI])) - { - omegaPatches.append(patchI); - - const labelUList& faceCells = bf[patchI].patch().faceCells(); - forAll(faceCells, i) - { - label cellI = faceCells[i]; - weights[cellI]++; - } - } - } - - cornerWeights_.setSize(bf.size()); - forAll(omegaPatches, i) - { - label patchI = omegaPatches[i]; - const fvPatchScalarField& wf = weights.boundaryField()[patchI]; - cornerWeights_[patchI] = 1.0/wf.patchInternalField(); - } - - G_.setSize(dimensionedInternalField().size(), 0.0); - omega_.setSize(dimensionedInternalField().size(), 0.0); - - initialised_ = true; -} - - -omegaWallFunctionFvPatchScalarField& -omegaWallFunctionFvPatchScalarField::omegaPatch(const label patchI) -{ - const volScalarField& omega = - static_cast<const volScalarField&>(this->dimensionedInternalField()); - - const volScalarField::GeometricBoundaryField& bf = omega.boundaryField(); - - const omegaWallFunctionFvPatchScalarField& opf = - refCast<const omegaWallFunctionFvPatchScalarField>(bf[patchI]); - - return const_cast<omegaWallFunctionFvPatchScalarField&>(opf); -} - - -void omegaWallFunctionFvPatchScalarField::calculateTurbulenceFields -( - const turbulenceModel& turbulence, - scalarField& G0, - scalarField& omega0 -) -{ - // accumulate all of the G and omega contributions - forAll(cornerWeights_, patchI) - { - if (!cornerWeights_[patchI].empty()) - { - omegaWallFunctionFvPatchScalarField& opf = omegaPatch(patchI); - - const List<scalar>& w = cornerWeights_[patchI]; - - opf.calculate(turbulence, w, opf.patch(), G0, omega0); - } - } - - // apply zero-gradient condition for omega - forAll(cornerWeights_, patchI) - { - if (!cornerWeights_[patchI].empty()) - { - omegaWallFunctionFvPatchScalarField& opf = omegaPatch(patchI); - - opf == scalarField(omega0, opf.patch().faceCells()); - } - } -} - - -void omegaWallFunctionFvPatchScalarField::calculate -( - const turbulenceModel& turbulence, - const List<scalar>& cornerWeights, - const fvPatch& patch, - scalarField& G, - scalarField& omega -) -{ - const label patchI = patch.index(); - - const scalarField& y = turbulence.y()[patchI]; - - const scalar Cmu25 = pow025(Cmu_); - - const tmp<volScalarField> tk = turbulence.k(); - const volScalarField& k = tk(); - - const scalarField& rhow = turbulence.rho().boundaryField()[patchI]; - - const tmp<volScalarField> tmu = turbulence.mu(); - const scalarField& muw = tmu().boundaryField()[patchI]; - - const tmp<volScalarField> tmut = turbulence.mut(); - const volScalarField& mut = tmut(); - const scalarField& mutw = mut.boundaryField()[patchI]; - - const fvPatchVectorField& Uw = turbulence.U().boundaryField()[patchI]; - - const scalarField magGradUw(mag(Uw.snGrad())); - - // Set omega and G - forAll(mutw, faceI) - { - label cellI = patch.faceCells()[faceI]; - - scalar w = cornerWeights[faceI]; - - scalar omegaVis = 6.0*muw[faceI]/(rhow[faceI]*beta1_*sqr(y[faceI])); - - scalar omegaLog = sqrt(k[cellI])/(Cmu25*kappa_*y[faceI]); - - omega[cellI] += w*sqrt(sqr(omegaVis) + sqr(omegaLog)); - - G[cellI] += - w - *(mutw[faceI] + muw[faceI]) - *magGradUw[faceI] - *Cmu25*sqrt(k[cellI]) - /(kappa_*y[faceI]); - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchField<scalar>(p, iF), - Cmu_(0.09), - kappa_(0.41), - E_(9.8), - beta1_(0.075), - yPlusLam_(mutWallFunctionFvPatchScalarField::yPlusLam(kappa_, E_)), - G_(), - omega_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); -} - - -omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField -( - const omegaWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchField<scalar>(ptf, p, iF, mapper), - Cmu_(ptf.Cmu_), - kappa_(ptf.kappa_), - E_(ptf.E_), - beta1_(ptf.beta1_), - yPlusLam_(ptf.yPlusLam_), - G_(), - omega_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); -} - - -omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - fixedValueFvPatchField<scalar>(p, iF, dict), - Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)), - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - E_(dict.lookupOrDefault<scalar>("E", 9.8)), - beta1_(dict.lookupOrDefault<scalar>("beta1", 0.075)), - yPlusLam_(mutWallFunctionFvPatchScalarField::yPlusLam(kappa_, E_)), - G_(), - omega_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); - - // apply zero-gradient condition on start-up - this->operator==(patchInternalField()); -} - - -omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField -( - const omegaWallFunctionFvPatchScalarField& owfpsf -) -: - fixedValueFvPatchField<scalar>(owfpsf), - Cmu_(owfpsf.Cmu_), - kappa_(owfpsf.kappa_), - E_(owfpsf.E_), - beta1_(owfpsf.beta1_), - yPlusLam_(owfpsf.yPlusLam_), - G_(), - omega_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); -} - - -omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField -( - const omegaWallFunctionFvPatchScalarField& owfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchField<scalar>(owfpsf, iF), - Cmu_(owfpsf.Cmu_), - kappa_(owfpsf.kappa_), - E_(owfpsf.E_), - beta1_(owfpsf.beta1_), - yPlusLam_(owfpsf.yPlusLam_), - G_(), - omega_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -scalarField& omegaWallFunctionFvPatchScalarField::G(bool init) -{ - if (patch().index() == master_) - { - if (init) - { - G_ = 0.0; - } - - return G_; - } - - return omegaPatch(master_).G(); -} - - -scalarField& omegaWallFunctionFvPatchScalarField::omega(bool init) -{ - if (patch().index() == master_) - { - if (init) - { - omega_ = 0.0; - } - - return omega_; - } - - return omegaPatch(master_).omega(init); -} - - -void omegaWallFunctionFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>(turbulenceModel::typeName); - - setMaster(); - - if (patch().index() == master_) - { - createAveragingWeights(); - calculateTurbulenceFields(turbulence, G(true), omega(true)); - } - - const scalarField& G0 = this->G(); - const scalarField& omega0 = this->omega(); - - typedef DimensionedField<scalar, volMesh> FieldType; - - FieldType& G = - const_cast<FieldType&> - ( - db().lookupObject<FieldType>(turbulence.GName()) - ); - - FieldType& omega = const_cast<FieldType&>(dimensionedInternalField()); - - forAll(*this, faceI) - { - label cellI = patch().faceCells()[faceI]; - - G[cellI] = G0[cellI]; - omega[cellI] = omega0[cellI]; - } - - fvPatchField<scalar>::updateCoeffs(); -} - - -void omegaWallFunctionFvPatchScalarField::updateCoeffs -( - const scalarField& weights -) -{ - if (updated()) - { - return; - } - - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>(turbulenceModel::typeName); - - setMaster(); - - if (patch().index() == master_) - { - createAveragingWeights(); - calculateTurbulenceFields(turbulence, G(true), omega(true)); - } - - const scalarField& G0 = this->G(); - const scalarField& omega0 = this->omega(); - - typedef DimensionedField<scalar, volMesh> FieldType; - - FieldType& G = - const_cast<FieldType&> - ( - db().lookupObject<FieldType>(turbulence.GName()) - ); - - FieldType& omega = const_cast<FieldType&>(dimensionedInternalField()); - - scalarField& omegaf = *this; - - // only set the values if the weights are > tolerance_ - forAll(weights, faceI) - { - scalar w = weights[faceI]; - - if (w > tolerance_) - { - label cellI = patch().faceCells()[faceI]; - - G[cellI] = (1.0 - w)*G[cellI] + w*G0[cellI]; - omega[cellI] = (1.0 - w)*omega[cellI] + w*omega0[cellI]; - omegaf[faceI] = omega[cellI]; - } - } - - fvPatchField<scalar>::updateCoeffs(); -} - - -void omegaWallFunctionFvPatchScalarField::manipulateMatrix -( - fvMatrix<scalar>& matrix -) -{ - if (manipulatedMatrix()) - { - return; - } - - matrix.setValues(patch().faceCells(), patchInternalField()); - - fvPatchField<scalar>::manipulateMatrix(matrix); -} - - -void omegaWallFunctionFvPatchScalarField::manipulateMatrix -( - fvMatrix<scalar>& matrix, - const Field<scalar>& weights -) -{ - if (manipulatedMatrix()) - { - return; - } - - // filter weights so that we only apply the constraint where the - // weight > SMALL - DynamicList<label> constraintCells(weights.size()); - DynamicList<scalar> constraintomega(weights.size()); - const labelUList& faceCells = patch().faceCells(); - - const DimensionedField<scalar, volMesh>& omega = - dimensionedInternalField(); - - label nConstrainedCells = 0; - - - forAll(weights, faceI) - { - // only set the values if the weights are > tolerance - if (weights[faceI] > tolerance_) - { - nConstrainedCells++; - - label cellI = faceCells[faceI]; - - constraintCells.append(cellI); - constraintomega.append(omega[cellI]); - } - } - - if (debug) - { - Pout<< "Patch: " << patch().name() - << ": number of constrained cells = " << nConstrainedCells - << " out of " << patch().size() - << endl; - } - - matrix.setValues - ( - constraintCells, - scalarField(constraintomega.xfer()) - ); - - fvPatchField<scalar>::manipulateMatrix(matrix); -} - - -void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fixedValueFvPatchField<scalar>::write(os); - writeLocalEntries(os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - omegaWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H deleted file mode 100644 index a17c65ef4..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,298 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::omegaWallFunctionFvPatchScalarField - -Group - grpCmpWallFunctions - -Description - This boundary condition provides a wall function constraint on turbulnce - specific dissipation, omega. The values are computed using: - - \f[ - \omega = sqrt(\omega_{vis}^2 + \omega_{log}^2) - \f] - - where - - \vartable - \omega_{vis} | omega in viscous region - \omega_{log} | omega in logarithmic region - \endvartable - - Model described by Eq.(15) of: - \verbatim - Menter, F., Esch, T. - "Elements of Industrial Heat Transfer Prediction" - 16th Brazilian Congress of Mechanical Engineering (COBEM), - Nov. 2001 - \endverbatim - - \heading Patch usage - - \table - Property | Description | Required | Default value - Cmu | model coefficient | no | 0.09 - kappa | Von Karman constant | no | 0.41 - E | model coefficient | no | 9.8 - beta1 | model coefficient | no | 0.075 - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type compressible::omegaWallFunction; - } - \endverbatim - -SourceFiles - omegaWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleOmegaWallFunctionFvPatchScalarField_H -#define compressibleOmegaWallFunctionFvPatchScalarField_H - -#include "fixedValueFvPatchField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -class turbulenceModel; - -/*---------------------------------------------------------------------------*\ - Class omegaWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class omegaWallFunctionFvPatchScalarField -: - public fixedValueFvPatchField<scalar> -{ -protected: - - // Protected data - - //- Tolerance used in weighted calculations - static scalar tolerance_; - - //- Cmu coefficient - scalar Cmu_; - - //- Von Karman constant - scalar kappa_; - - //- E coefficient - scalar E_; - - //- beta1 coefficient - scalar beta1_; - - //- Y+ at the edge of the laminar sublayer - scalar yPlusLam_; - - //- Local copy of turbulence G field - scalarField G_; - - //- Local copy of turbulence omega field - scalarField omega_; - - //- Initialised flag - bool initialised_; - - //- Master patch ID - label master_; - - //- List of averaging corner weights - List<List<scalar> > cornerWeights_; - - - // Protected Member Functions - - //- Check the type of the patch - virtual void checkType(); - - //- Write local wall function variables - virtual void writeLocalEntries(Ostream&) const; - - //- Set the master patch - master is responsible for updating all - // wall function patches - virtual void setMaster(); - - //- Create the averaging weights for cells which are bounded by - // multiple wall function faces - virtual void createAveragingWeights(); - - //- Helper function to return non-const access to an omega patch - virtual omegaWallFunctionFvPatchScalarField& omegaPatch - ( - const label patchI - ); - - //- Main driver to calculate the turbulence fields - virtual void calculateTurbulenceFields - ( - const turbulenceModel& turbulence, - scalarField& G0, - scalarField& omega0 - ); - - //- Calculate the omega and G - virtual void calculate - ( - const turbulenceModel& turbulence, - const List<scalar>& cornerWeights, - const fvPatch& patch, - scalarField& G, - scalarField& omega - ); - - //- Return non-const access to the master patch ID - virtual label& master() - { - return master_; - } - - -public: - - //- Runtime type information - TypeName("compressible::omegaWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - omegaWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - omegaWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // omegaWallFunctionFvPatchScalarField - // onto a new patch - omegaWallFunctionFvPatchScalarField - ( - const omegaWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - omegaWallFunctionFvPatchScalarField - ( - const omegaWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new omegaWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - omegaWallFunctionFvPatchScalarField - ( - const omegaWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new omegaWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Access - - //- Return non-const access to the master's G field - scalarField& G(bool init = false); - - //- Return non-const access to the master's omega field - scalarField& omega(bool init = false); - - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(const scalarField& weights); - - //- Manipulate matrix - virtual void manipulateMatrix(fvMatrix<scalar>& matrix); - - //- Manipulate matrix with given weights - virtual void manipulateMatrix - ( - fvMatrix<scalar>& matrix, - const scalarField& weights - ); - - - // I-O - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C deleted file mode 100644 index 6759772f1..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,254 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "v2WallFunctionFvPatchScalarField.H" -#include "RASModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -void v2WallFunctionFvPatchScalarField::checkType() -{ - if (!isA<wallFvPatch>(patch())) - { - FatalErrorIn("v2WallFunctionFvPatchScalarField::checkType()") - << "Invalid wall function specification" << nl - << " Patch type for patch " << patch().name() - << " must be wall" << nl - << " Current patch type is " << patch().type() << nl << endl - << abort(FatalError); - } -} - - -void v2WallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const -{ - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; -} - - -scalar v2WallFunctionFvPatchScalarField::yPlusLam -( - const scalar kappa, - const scalar E -) -{ - scalar ypl = 11.0; - - for (int i=0; i<10; i++) - { - ypl = log(max(E*ypl, 1))/kappa; - } - - return ypl; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchField<scalar>(p, iF), - Cmu_(0.09), - kappa_(0.41), - E_(9.8), - yPlusLam_(yPlusLam(kappa_, E_)) -{ - checkType(); -} - - -v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField -( - const v2WallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchField<scalar>(ptf, p, iF, mapper), - Cmu_(ptf.Cmu_), - kappa_(ptf.kappa_), - E_(ptf.E_), - yPlusLam_(ptf.yPlusLam_) -{ - checkType(); -} - - -v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - fixedValueFvPatchField<scalar>(p, iF, dict), - Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)), - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - E_(dict.lookupOrDefault<scalar>("E", 9.8)), - yPlusLam_(yPlusLam(kappa_, E_)) -{ - checkType(); -} - - -v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField -( - const v2WallFunctionFvPatchScalarField& v2wfpsf -) -: - fixedValueFvPatchField<scalar>(v2wfpsf), - Cmu_(v2wfpsf.Cmu_), - kappa_(v2wfpsf.kappa_), - E_(v2wfpsf.E_), - yPlusLam_(v2wfpsf.yPlusLam_) -{ - checkType(); -} - - -v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField -( - const v2WallFunctionFvPatchScalarField& v2wfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchField<scalar>(v2wfpsf, iF), - Cmu_(v2wfpsf.Cmu_), - kappa_(v2wfpsf.kappa_), - E_(v2wfpsf.E_), - yPlusLam_(v2wfpsf.yPlusLam_) -{ - checkType(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void v2WallFunctionFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const label patchI = patch().index(); - - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbulence.y()[patchI]; - - const tmp<volScalarField> tk = turbulence.k(); - const volScalarField& k = tk(); - - const tmp<volScalarField> tmu = turbulence.mu(); - const scalarField& muw = tmu().boundaryField()[patchI]; - - const scalarField& rhow = turbulence.rho().boundaryField()[patchI]; - - const scalar Cmu25 = pow025(Cmu_); - - scalarField& v2 = *this; - - // Set v2 wall values - forAll(v2, faceI) - { - label faceCellI = patch().faceCells()[faceI]; - - scalar uTau = Cmu25*sqrt(k[faceCellI]); - - scalar yPlus = uTau*y[faceI]/(muw[faceI]/rhow[faceI]); - - if (yPlus > yPlusLam_) - { - scalar Cv2 = 0.193; - scalar Bv2 = -0.94; - v2[faceI] = Cv2/kappa_*log(yPlus) + Bv2; - } - else - { - scalar Cv2 = 0.193; - v2[faceI] = Cv2*pow4(yPlus); - } - - v2[faceI] *= sqr(uTau); - } - - fixedValueFvPatchField<scalar>::updateCoeffs(); - - // TODO: perform averaging for cells sharing more than one boundary face -} - - -void v2WallFunctionFvPatchScalarField::evaluate -( - const Pstream::commsTypes commsType -) -{ - fixedValueFvPatchField<scalar>::evaluate(commsType); -} - - -void v2WallFunctionFvPatchScalarField::write(Ostream& os) const -{ - writeLocalEntries(os); - fixedValueFvPatchField<scalar>::write(os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - v2WallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.H deleted file mode 100644 index dc64df934..000000000 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,211 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::RASModels::v2WallFunctionFvPatchScalarField - -Group - grpCmpWallFunctions - -Description - This boundary condition provides a turbulence stress normal to streamlines - wall function condition for low- and high-Reynolds number, turbulent flow - cases. - - The model operates in two modes, based on the computed laminar-to-turbulent - switch-over y+ value derived from kappa and E. - - - \heading Patch usage - - \table - Property | Description | Required | Default value - Cmu | model coefficient | no | 0.09 - kappa | Von Karman constant | no | 0.41 - E | model coefficient | no | 9.8 - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type v2WallFunction; - } - \endverbatim - -SeeAlso - Foam::fixedValueFvPatchField - -SourceFiles - v2WallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef v2WallFunctionFvPatchScalarField_H -#define v2WallFunctionFvPatchScalarField_H - -#include "fixedValueFvPatchField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class v2WallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class v2WallFunctionFvPatchScalarField -: - public fixedValueFvPatchField<scalar> -{ -protected: - - // Protected data - - //- Cmu coefficient - scalar Cmu_; - - //- Von Karman constant - scalar kappa_; - - //- E coefficient - scalar E_; - - //- Y+ at the edge of the laminar sublayer - scalar yPlusLam_; - - - // Protected Member Functions - - //- Check the type of the patch - virtual void checkType(); - - //- Write local wall function variables - virtual void writeLocalEntries(Ostream&) const; - - //- Calculate the Y+ at the edge of the laminar sublayer - scalar yPlusLam(const scalar kappa, const scalar E); - - -public: - - //- Runtime type information - TypeName("compressible::v2WallFunction"); - - - // Constructors - - //- Construct from patch and internal field - v2WallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - v2WallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given v2WallFunctionFvPatchScalarField - // onto a new patch - v2WallFunctionFvPatchScalarField - ( - const v2WallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - v2WallFunctionFvPatchScalarField - ( - const v2WallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new v2WallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - v2WallFunctionFvPatchScalarField - ( - const v2WallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new v2WallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - //- Evaluate the patchField - virtual void evaluate(const Pstream::commsTypes); - - - // I-O - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.C b/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.C deleted file mode 100644 index a4089610c..000000000 --- a/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.C +++ /dev/null @@ -1,344 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "kEpsilon.H" -#include "addToRunTimeSelectionTable.H" - -#include "backwardsCompatibilityWallFunctions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(kEpsilon, 0); -addToRunTimeSelectionTable(RASModel, kEpsilon, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -kEpsilon::kEpsilon -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName, - const word& modelName -) -: - RASModel(modelName, rho, U, phi, thermophysicalModel, turbulenceModelName), - - Cmu_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cmu", - coeffDict_, - 0.09 - ) - ), - C1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C1", - coeffDict_, - 1.44 - ) - ), - C2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C2", - coeffDict_, - 1.92 - ) - ), - C3_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C3", - coeffDict_, - -0.33 - ) - ), - sigmak_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmak", - coeffDict_, - 1.0 - ) - ), - sigmaEps_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaEps", - coeffDict_, - 1.3 - ) - ), - Prt_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Prt", - coeffDict_, - 1.0 - ) - ), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateK("k", mesh_) - ), - epsilon_ - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateEpsilon("epsilon", mesh_) - ), - mut_ - ( - IOobject - ( - "mut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateMut("mut", mesh_) - ), - alphat_ - ( - IOobject - ( - "alphat", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateAlphat("alphat", mesh_) - ) -{ - bound(k_, kMin_); - bound(epsilon_, epsilonMin_); - - mut_ = Cmu_*rho_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> kEpsilon::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - (mut_/rho_)*dev(twoSymm(fvc::grad(U_))), - k_.boundaryField().types() - ) - ); -} - - -tmp<volSymmTensorField> kEpsilon::devRhoReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -muEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> kEpsilon::divDevRhoReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(muEff(), U) - - fvc::div(muEff()*dev2(T(fvc::grad(U)))) - ); -} - - -bool kEpsilon::read() -{ - if (RASModel::read()) - { - Cmu_.readIfPresent(coeffDict()); - C1_.readIfPresent(coeffDict()); - C2_.readIfPresent(coeffDict()); - C3_.readIfPresent(coeffDict()); - sigmak_.readIfPresent(coeffDict()); - sigmaEps_.readIfPresent(coeffDict()); - Prt_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -void kEpsilon::correct() -{ - if (!turbulence_) - { - // Re-calculate viscosity - mut_ = rho_*Cmu_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - return; - } - - RASModel::correct(); - - volScalarField divU(fvc::div(phi_/fvc::interpolate(rho_))); - - if (mesh_.moving()) - { - divU += fvc::div(mesh_.phi()); - } - - tmp<volTensorField> tgradU = fvc::grad(U_); - volScalarField G(GName(), mut_*(tgradU() && dev(twoSymm(tgradU())))); - tgradU.clear(); - - // Update epsilon and G at the wall - epsilon_.boundaryField().updateCoeffs(); - - // Dissipation equation - tmp<fvScalarMatrix> epsEqn - ( - fvm::ddt(rho_, epsilon_) - + fvm::div(phi_, epsilon_) - - fvm::laplacian(DepsilonEff(), epsilon_) - == - C1_*G*epsilon_/k_ - - fvm::SuSp(((2.0/3.0)*C1_ + C3_)*rho_*divU, epsilon_) - - fvm::Sp(C2_*rho_*epsilon_/k_, epsilon_) - ); - - epsEqn().relax(); - - epsEqn().boundaryManipulate(epsilon_.boundaryField()); - - solve(epsEqn); - bound(epsilon_, epsilonMin_); - - - // Turbulent kinetic energy equation - - tmp<fvScalarMatrix> kEqn - ( - fvm::ddt(rho_, k_) - + fvm::div(phi_, k_) - - fvm::laplacian(DkEff(), k_) - == - G - - fvm::SuSp((2.0/3.0)*rho_*divU, k_) - - fvm::Sp(rho_*epsilon_/k_, k_) - ); - - kEqn().relax(); - solve(kEqn); - bound(k_, kMin_); - - - // Re-calculate viscosity - mut_ = rho_*Cmu_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.H b/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.H deleted file mode 100644 index 70b5e85a9..000000000 --- a/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.H +++ /dev/null @@ -1,200 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::RASModels::kEpsilon - -Group - grpCmpRASTurbulence - -Description - Standard k-epsilon turbulence model for compressible flows - including rapid distortion theory (RDT) based compression term. - - Reference: - \verbatim - "k-epsilon equations for compressible reciprocating engine flows" - El Tahry, S. H., - AIAA Journal of Energy 7, 1983, pp 345-353. - \endverbatim - - The default model coefficients correspond to the following: - \verbatim - kEpsilonCoeffs - { - Cmu 0.09; - C1 1.44; - C2 1.92; - C3 -0.33; // only for compressible - sigmak 1.0; // only for compressible - sigmaEps 1.3; - Prt 1.0; // only for compressible - } - \endverbatim - -SourceFiles - kEpsilon.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressiblekEpsilon_H -#define compressiblekEpsilon_H - -#include "RASModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class kEpsilon Declaration -\*---------------------------------------------------------------------------*/ - -class kEpsilon -: - public RASModel -{ - -protected: - - // Protected data - - // Model coefficients - - dimensionedScalar Cmu_; - dimensionedScalar C1_; - dimensionedScalar C2_; - dimensionedScalar C3_; - dimensionedScalar sigmak_; - dimensionedScalar sigmaEps_; - dimensionedScalar Prt_; - - // Fields - - volScalarField k_; - volScalarField epsilon_; - volScalarField mut_; - volScalarField alphat_; - - -public: - - //- Runtime type information - TypeName("kEpsilon"); - - // Constructors - - //- Construct from components - kEpsilon - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~kEpsilon() - {} - - - // Member Functions - - //- Return the effective diffusivity for k - tmp<volScalarField> DkEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DkEff", mut_/sigmak_ + mu()) - ); - } - - //- Return the effective diffusivity for epsilon - tmp<volScalarField> DepsilonEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu()) - ); - } - - //- Return the turbulence viscosity - virtual tmp<volScalarField> mut() const - { - return mut_; - } - - //- Return the turbulence thermal diffusivity - virtual tmp<volScalarField> alphat() const - { - return alphat_; - } - - //- Return the turbulence kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp<volScalarField> epsilon() const - { - return epsilon_; - } - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devRhoReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C deleted file mode 100644 index 0f74e6539..000000000 --- a/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C +++ /dev/null @@ -1,511 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "kOmegaSST.H" -#include "addToRunTimeSelectionTable.H" - -#include "backwardsCompatibilityWallFunctions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(kOmegaSST, 0); -addToRunTimeSelectionTable(RASModel, kOmegaSST, dictionary); - -// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // - -tmp<volScalarField> kOmegaSST::F1(const volScalarField& CDkOmega) const -{ - tmp<volScalarField> CDkOmegaPlus = max - ( - CDkOmega, - dimensionedScalar("1.0e-10", dimless/sqr(dimTime), 1.0e-10) - ); - - tmp<volScalarField> arg1 = min - ( - min - ( - max - ( - (scalar(1)/betaStar_)*sqrt(k_)/(omega_*y_), - scalar(500)*(mu()/rho_)/(sqr(y_)*omega_) - ), - (4*alphaOmega2_)*k_/(CDkOmegaPlus*sqr(y_)) - ), - scalar(10) - ); - - return tanh(pow4(arg1)); -} - -tmp<volScalarField> kOmegaSST::F2() const -{ - tmp<volScalarField> arg2 = min - ( - max - ( - (scalar(2)/betaStar_)*sqrt(k_)/(omega_*y_), - scalar(500)*(mu()/rho_)/(sqr(y_)*omega_) - ), - scalar(100) - ); - - return tanh(sqr(arg2)); -} - - -tmp<volScalarField> kOmegaSST::F3() const -{ - tmp<volScalarField> arg3 = min - ( - 150*(mu()/rho_)/(omega_*sqr(y_)), - scalar(10) - ); - - return 1 - tanh(pow4(arg3)); -} - - -tmp<volScalarField> kOmegaSST::F23() const -{ - tmp<volScalarField> f23(F2()); - - if (F3_) - { - f23() *= F3(); - } - - return f23; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -kOmegaSST::kOmegaSST -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName, - const word& modelName -) -: - RASModel(modelName, rho, U, phi, thermophysicalModel, turbulenceModelName), - - alphaK1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "alphaK1", - coeffDict_, - 0.85 - ) - ), - alphaK2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "alphaK2", - coeffDict_, - 1.0 - ) - ), - alphaOmega1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "alphaOmega1", - coeffDict_, - 0.5 - ) - ), - alphaOmega2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "alphaOmega2", - coeffDict_, - 0.856 - ) - ), - Prt_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Prt", - coeffDict_, - 1.0 - ) - ), - gamma1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "gamma1", - coeffDict_, - 5.0/9.0 - ) - ), - gamma2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "gamma2", - coeffDict_, - 0.44 - ) - ), - beta1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "beta1", - coeffDict_, - 0.075 - ) - ), - beta2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "beta2", - coeffDict_, - 0.0828 - ) - ), - betaStar_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "betaStar", - coeffDict_, - 0.09 - ) - ), - a1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "a1", - coeffDict_, - 0.31 - ) - ), - b1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "b1", - coeffDict_, - 1.0 - ) - ), - c1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "c1", - coeffDict_, - 10.0 - ) - ), - F3_ - ( - Switch::lookupOrAddToDict - ( - "F3", - coeffDict_, - false - ) - ), - - y_(wallDist::New(mesh_).y()), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateK("k", mesh_) - ), - omega_ - ( - IOobject - ( - "omega", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateOmega("omega", mesh_) - ), - mut_ - ( - IOobject - ( - "mut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateMut("mut", mesh_) - ), - alphat_ - ( - IOobject - ( - "alphat", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateAlphat("alphat", mesh_) - ) -{ - bound(k_, kMin_); - bound(omega_, omegaMin_); - - mut_ = - ( - a1_*rho_*k_ - / max - ( - a1_*omega_, - b1_*F23()*sqrt(2.0)*mag(symm(fvc::grad(U_))) - ) - ); - mut_.correctBoundaryConditions(); - - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> kOmegaSST::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - (mut_/rho_)*dev(twoSymm(fvc::grad(U_))), - k_.boundaryField().types() - ) - ); -} - - -tmp<volSymmTensorField> kOmegaSST::devRhoReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -muEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> kOmegaSST::divDevRhoReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U)))) - ); -} - - -bool kOmegaSST::read() -{ - if (RASModel::read()) - { - alphaK1_.readIfPresent(coeffDict()); - alphaK2_.readIfPresent(coeffDict()); - alphaOmega1_.readIfPresent(coeffDict()); - alphaOmega2_.readIfPresent(coeffDict()); - Prt_.readIfPresent(coeffDict()); - gamma1_.readIfPresent(coeffDict()); - gamma2_.readIfPresent(coeffDict()); - beta1_.readIfPresent(coeffDict()); - beta2_.readIfPresent(coeffDict()); - betaStar_.readIfPresent(coeffDict()); - a1_.readIfPresent(coeffDict()); - b1_.readIfPresent(coeffDict()); - c1_.readIfPresent(coeffDict()); - F3_.readIfPresent("F3", coeffDict()); - - return true; - } - else - { - return false; - } -} - - -void kOmegaSST::correct() -{ - if (!turbulence_) - { - // Re-calculate viscosity - mut_ = - a1_*rho_*k_ - /max(a1_*omega_, F23()*sqrt(2.0)*mag(symm(fvc::grad(U_)))); - mut_.correctBoundaryConditions(); - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - return; - } - - RASModel::correct(); - - volScalarField divU(fvc::div(phi_/fvc::interpolate(rho_))); - - if (mesh_.moving()) - { - divU += fvc::div(mesh_.phi()); - } - - tmp<volTensorField> tgradU = fvc::grad(U_); - volScalarField S2(2*magSqr(symm(tgradU()))); - volScalarField GbyMu((tgradU() && dev(twoSymm(tgradU())))); - volScalarField G(GName(), mut_*GbyMu); - tgradU.clear(); - - // Update omega and G at the wall - omega_.boundaryField().updateCoeffs(); - - volScalarField CDkOmega - ( - (2*alphaOmega2_)*(fvc::grad(k_) & fvc::grad(omega_))/omega_ - ); - - volScalarField F1(this->F1(CDkOmega)); - volScalarField rhoGammaF1(rho_*gamma(F1)); - - // Turbulent frequency equation - tmp<fvScalarMatrix> omegaEqn - ( - fvm::ddt(rho_, omega_) - + fvm::div(phi_, omega_) - - fvm::laplacian(DomegaEff(F1), omega_) - == - rhoGammaF1 - *min - ( - GbyMu, - (c1_/a1_)*betaStar_*omega_*max(a1_*omega_, b1_*F23()*sqrt(S2)) - ) - - fvm::SuSp((2.0/3.0)*rhoGammaF1*divU, omega_) - - fvm::Sp(rho_*beta(F1)*omega_, omega_) - - fvm::SuSp - ( - rho_*(F1 - scalar(1))*CDkOmega/omega_, - omega_ - ) - ); - - omegaEqn().relax(); - - omegaEqn().boundaryManipulate(omega_.boundaryField()); - - solve(omegaEqn); - bound(omega_, omegaMin_); - - // Turbulent kinetic energy equation - tmp<fvScalarMatrix> kEqn - ( - fvm::ddt(rho_, k_) - + fvm::div(phi_, k_) - - fvm::laplacian(DkEff(F1), k_) - == - min(G, (c1_*betaStar_)*rho_*k_*omega_) - - fvm::SuSp(2.0/3.0*rho_*divU, k_) - - fvm::Sp(rho_*betaStar_*omega_, k_) - ); - - kEqn().relax(); - solve(kEqn); - bound(k_, kMin_); - - - // Re-calculate viscosity - mut_ = a1_*rho_*k_/max(a1_*omega_, b1_*F23()*sqrt(S2)); - mut_.correctBoundaryConditions(); - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.H b/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.H deleted file mode 100644 index f17484e97..000000000 --- a/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.H +++ /dev/null @@ -1,316 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::RASModels::kOmegaSST - -Group - grpCmpRASTurbulence - -Description - Implementation of the k-omega-SST turbulence model for compressible flows. - - Turbulence model described in - \verbatim - Menter, F., Esch, T., - "Elements of Industrial Heat Transfer Prediction", - 16th Brazilian Congress of Mechanical Engineering (COBEM), - Nov. 2001. - \endverbatim - - with updated coefficients from - \verbatim - Menter, F. R., Kuntz, M., and Langtry, R., - "Ten Years of Industrial Experience with the SST Turbulence Model", - Turbulence, Heat and Mass Transfer 4, 2003, - pp. 625 - 632. - \endverbatim - - but with the consistent production terms from the 2001 paper as form in the - 2003 paper is a typo, see - \verbatim - http://turbmodels.larc.nasa.gov/sst.html - \endverbatim - - and the addition of the optional F3 term for rough walls from - \verbatim - Hellsten, A. - "Some Improvements in Menter’s k-omega-SST turbulence model" - 29th AIAA Fluid Dynamics Conference, - AIAA-98-2554, - June 1998. - \endverbatim - - Note that this implementation is written in terms of alpha diffusion - coefficients rather than the more traditional sigma (alpha = 1/sigma) so - that the blending can be applied to all coefficuients in a consistent - manner. The paper suggests that sigma is blended but this would not be - consistent with the blending of the k-epsilon and k-omega models. - - Also note that the error in the last term of equation (2) relating to - sigma has been corrected. - - The default model coefficients correspond to the following: - \verbatim - kOmegaSSTCoeffs - { - alphaK1 0.85; - alphaK2 1.0; - alphaOmega1 0.5; - alphaOmega2 0.856; - beta1 0.075; - beta2 0.0828; - betaStar 0.09; - gamma1 5/9; - gamma2 0.44; - a1 0.31; - b1 1.0; - c1 10.0; - F3 no; - Prt 1.0; - } - \endverbatim - -SourceFiles - kOmegaSST.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressiblekOmegaSST_H -#define compressiblekOmegaSST_H - -#include "RASModel.H" -#include "wallDist.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class kOmegaSST Declaration -\*---------------------------------------------------------------------------*/ - -class kOmegaSST -: - public RASModel -{ - -protected: - - // Protected data - - // Model coefficients - - dimensionedScalar alphaK1_; - dimensionedScalar alphaK2_; - - dimensionedScalar alphaOmega1_; - dimensionedScalar alphaOmega2_; - - dimensionedScalar Prt_; - - dimensionedScalar gamma1_; - dimensionedScalar gamma2_; - - dimensionedScalar beta1_; - dimensionedScalar beta2_; - - dimensionedScalar betaStar_; - - dimensionedScalar a1_; - dimensionedScalar b1_; - dimensionedScalar c1_; - - Switch F3_; - - - // Fields - - //- Wall distance - // Note: different to wall distance in parent RASModel - // which is for near-wall cells only - const volScalarField& y_; - - volScalarField k_; - volScalarField omega_; - volScalarField mut_; - volScalarField alphat_; - - - // Private Member Functions - - tmp<volScalarField> F1(const volScalarField& CDkOmega) const; - tmp<volScalarField> F2() const; - tmp<volScalarField> F3() const; - tmp<volScalarField> F23() const; - - tmp<volScalarField> blend - ( - const volScalarField& F1, - const dimensionedScalar& psi1, - const dimensionedScalar& psi2 - ) const - { - return F1*(psi1 - psi2) + psi2; - } - - tmp<volScalarField> alphaK(const volScalarField& F1) const - { - return blend(F1, alphaK1_, alphaK2_); - } - - tmp<volScalarField> alphaOmega(const volScalarField& F1) const - { - return blend(F1, alphaOmega1_, alphaOmega2_); - } - - tmp<volScalarField> beta(const volScalarField& F1) const - { - return blend(F1, beta1_, beta2_); - } - - tmp<volScalarField> gamma(const volScalarField& F1) const - { - return blend(F1, gamma1_, gamma2_); - } - - -public: - - //- Runtime type information - TypeName("kOmegaSST"); - - - // Constructors - - //- Construct from components - kOmegaSST - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~kOmegaSST() - {} - - - // Member Functions - - //- Return the effective diffusivity for k - tmp<volScalarField> DkEff(const volScalarField& F1) const - { - return tmp<volScalarField> - ( - new volScalarField("DkEff", alphaK(F1)*mut_ + mu()) - ); - } - - //- Return the effective diffusivity for omega - tmp<volScalarField> DomegaEff(const volScalarField& F1) const - { - return tmp<volScalarField> - ( - new volScalarField("DomegaEff", alphaOmega(F1)*mut_ + mu()) - ); - } - - virtual tmp<volScalarField> mut() const - { - return mut_; - } - - //- Return the turbulence thermal diffusivity - virtual tmp<volScalarField> alphat() const - { - return alphat_; - } - - //- Return the turbulence kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - virtual tmp<volScalarField> omega() const - { - return omega_; - } - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp<volScalarField> epsilon() const - { - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "epsilon", - mesh_.time().timeName(), - mesh_ - ), - betaStar_*k_*omega_, - omega_.boundaryField().types() - ) - ); - } - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devRhoReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/laminar/laminar.C b/src/turbulenceModels/compressible/RAS/laminar/laminar.C deleted file mode 100644 index aa3200ee8..000000000 --- a/src/turbulenceModels/compressible/RAS/laminar/laminar.C +++ /dev/null @@ -1,218 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "laminar.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(laminar, 0); -addToRunTimeSelectionTable(RASModel, laminar, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -laminar::laminar -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName, - const word& modelName -) -: - RASModel(modelName, rho, U, phi, thermophysicalModel, turbulenceModelName) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volScalarField> laminar::mut() const -{ - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "mut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("mut", mu().dimensions(), 0.0) - ) - ); -} - - -tmp<volScalarField> laminar::alphat() const -{ - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "alphat", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("alphat", alpha().dimensions(), 0.0) - ) - ); -} - - -tmp<volScalarField> laminar::k() const -{ - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("k", sqr(U_.dimensions()), 0.0) - ) - ); -} - - -tmp<volScalarField> laminar::epsilon() const -{ - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar - ( - "epsilon", sqr(U_.dimensions())/dimTime, 0.0 - ) - ) - ); -} - - -tmp<volSymmTensorField> laminar::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedSymmTensor - ( - "R", sqr(U_.dimensions()), symmTensor::zero - ) - ) - ); -} - - -tmp<volSymmTensorField> laminar::devRhoReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -mu()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> laminar::divDevRhoReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(muEff(), U) - - fvc::div(muEff()*dev2(T(fvc::grad(U)))) - ); -} - - -bool laminar::read() -{ - return RASModel::read(); -} - - -void laminar::correct() -{} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/laminar/laminar.H b/src/turbulenceModels/compressible/RAS/laminar/laminar.H deleted file mode 100644 index 0b099d01a..000000000 --- a/src/turbulenceModels/compressible/RAS/laminar/laminar.H +++ /dev/null @@ -1,140 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::RASModels::laminar - -Group - grpCmpRASTurbulence - -Description - Dummy turbulence model for laminar compressible flow. - -SourceFiles - laminar.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleRasLaminar_H -#define compressibleRasLaminar_H - -#include "RASModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class laminar Declaration -\*---------------------------------------------------------------------------*/ - -class laminar -: - public RASModel -{ - -public: - - //- Runtime type information - TypeName("laminar"); - - // Constructors - - //- Construct from components - laminar - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~laminar() - {} - - - // Member Functions - - //- Return the turbulence viscosity, i.e. 0 for laminar flow - virtual tmp<volScalarField> mut() const; - - //- Return the effective viscosity, i.e. the laminar viscosity - virtual tmp<volScalarField> muEff() const - { - return tmp<volScalarField>(new volScalarField("muEff", mu())); - } - - //- Return the turbulence thermal diffusivity, i.e. 0 for laminar flow - virtual tmp<volScalarField> alphat() const; - - //- Return the effective turbulent thermal diffusivity, - // i.e. the laminar thermal diffusivity - virtual tmp<volScalarField> alphaEff() const - { - return tmp<volScalarField>(new volScalarField("alphaEff", alpha())); - } - - //- Return the turbulence kinetic energy, i.e. 0 for laminar flow - virtual tmp<volScalarField> k() const; - - //- Return the turbulence kinetic energy dissipation rate, - // i.e. 0 for laminar flow - virtual tmp<volScalarField> epsilon() const; - - //- Return the Reynolds stress tensor, i.e. 0 for laminar flow - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor, i.e. the laminar stress - virtual tmp<volSymmTensorField> devRhoReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; - - //- Correct the laminar viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.C b/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.C deleted file mode 100644 index c9b5c3674..000000000 --- a/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.C +++ /dev/null @@ -1,384 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "realizableKE.H" -#include "addToRunTimeSelectionTable.H" - -#include "backwardsCompatibilityWallFunctions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(realizableKE, 0); -addToRunTimeSelectionTable(RASModel, realizableKE, dictionary); - -// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // - -tmp<volScalarField> realizableKE::rCmu -( - const volTensorField& gradU, - const volScalarField& S2, - const volScalarField& magS -) -{ - tmp<volSymmTensorField> tS = dev(symm(gradU)); - const volSymmTensorField& S = tS(); - - volScalarField W - ( - (2*sqrt(2.0))*((S&S)&&S) - /( - magS*S2 - + dimensionedScalar("small", dimensionSet(0, 0, -3, 0, 0), SMALL) - ) - ); - - tS.clear(); - - volScalarField phis - ( - (1.0/3.0)*acos(min(max(sqrt(6.0)*W, -scalar(1)), scalar(1))) - ); - volScalarField As(sqrt(6.0)*cos(phis)); - volScalarField Us(sqrt(S2/2.0 + magSqr(skew(gradU)))); - - return 1.0/(A0_ + As*Us*k_/epsilon_); -} - - -tmp<volScalarField> realizableKE::rCmu -( - const volTensorField& gradU -) -{ - volScalarField S2(2*magSqr(dev(symm(gradU)))); - volScalarField magS(sqrt(S2)); - return rCmu(gradU, S2, magS); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -realizableKE::realizableKE -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName, - const word& modelName -) -: - RASModel(modelName, rho, U, phi, thermophysicalModel, turbulenceModelName), - - Cmu_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cmu", - coeffDict_, - 0.09 - ) - ), - A0_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "A0", - coeffDict_, - 4.0 - ) - ), - C2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C2", - coeffDict_, - 1.9 - ) - ), - sigmak_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmak", - coeffDict_, - 1.0 - ) - ), - sigmaEps_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaEps", - coeffDict_, - 1.2 - ) - ), - Prt_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Prt", - coeffDict_, - 1.0 - ) - ), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateK("k", mesh_) - ), - epsilon_ - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateEpsilon("epsilon", mesh_) - ), - mut_ - ( - IOobject - ( - "mut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateMut("mut", mesh_) - ), - alphat_ - ( - IOobject - ( - "alphat", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateAlphat("alphat", mesh_) - ) -{ - bound(k_, kMin_); - bound(epsilon_, epsilonMin_); - - mut_ = rCmu(fvc::grad(U_))*rho_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> realizableKE::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - (mut_/rho_)*dev(twoSymm(fvc::grad(U_))), - k_.boundaryField().types() - ) - ); -} - - -tmp<volSymmTensorField> realizableKE::devRhoReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -muEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> realizableKE::divDevRhoReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U)))) - ); -} - - -bool realizableKE::read() -{ - if (RASModel::read()) - { - Cmu_.readIfPresent(coeffDict()); - A0_.readIfPresent(coeffDict()); - C2_.readIfPresent(coeffDict()); - sigmak_.readIfPresent(coeffDict()); - sigmaEps_.readIfPresent(coeffDict()); - Prt_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -void realizableKE::correct() -{ - if (!turbulence_) - { - // Re-calculate viscosity - mut_ = rCmu(fvc::grad(U_))*rho_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - return; - } - - RASModel::correct(); - - volScalarField divU(fvc::div(phi_/fvc::interpolate(rho_))); - - if (mesh_.moving()) - { - divU += fvc::div(mesh_.phi()); - } - - volTensorField gradU(fvc::grad(U_)); - volScalarField S2(2*magSqr(dev(symm(gradU)))); - volScalarField magS(sqrt(S2)); - - volScalarField eta(magS*k_/epsilon_); - volScalarField C1(max(eta/(scalar(5) + eta), scalar(0.43))); - - volScalarField G(GName(), mut_*(gradU && dev(twoSymm(gradU)))); - - // Update epsilon and G at the wall - epsilon_.boundaryField().updateCoeffs(); - - // Dissipation equation - tmp<fvScalarMatrix> epsEqn - ( - fvm::ddt(rho_, epsilon_) - + fvm::div(phi_, epsilon_) - - fvm::laplacian(DepsilonEff(), epsilon_) - == - C1*rho_*magS*epsilon_ - - fvm::Sp - ( - C2_*rho_*epsilon_/(k_ + sqrt((mu()/rho_)*epsilon_)), - epsilon_ - ) - ); - - epsEqn().relax(); - - epsEqn().boundaryManipulate(epsilon_.boundaryField()); - - solve(epsEqn); - bound(epsilon_, epsilonMin_); - - - // Turbulent kinetic energy equation - - tmp<fvScalarMatrix> kEqn - ( - fvm::ddt(rho_, k_) - + fvm::div(phi_, k_) - - fvm::laplacian(DkEff(), k_) - == - G - fvm::SuSp(2.0/3.0*rho_*divU, k_) - - fvm::Sp(rho_*epsilon_/k_, k_) - ); - - kEqn().relax(); - solve(kEqn); - bound(k_, kMin_); - - // Re-calculate viscosity - mut_ = rCmu(gradU, S2, magS)*rho_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.H b/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.H deleted file mode 100644 index c417fa5c4..000000000 --- a/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.H +++ /dev/null @@ -1,214 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::RASModels::realizableKE - -Group - grpCmpRASTurbulence - -Description - Realizable k-epsilon turbulence model for compressible flows. - - Model described in the paper: - \verbatim - "A New k-epsilon Eddy Viscosity Model for High Reynolds Number - Turbulent Flows" - - Tsan-Hsing Shih, William W. Liou, Aamir Shabbir, Zhigang Tang and - Jiang Zhu - - Computers and Fluids Vol. 24, No. 3, pp. 227-238, 1995 - \endverbatim - - The default model coefficients correspond to the following: - \verbatim - realizableKECoeffs - { - Cmu 0.09; - A0 4.0; - C2 1.9; - sigmak 1.0; - sigmaEps 1.2; - Prt 1.0; // only for compressible - } - \endverbatim - -SourceFiles - realizableKE.C - -\*---------------------------------------------------------------------------*/ - -#ifndef realizableKE_H -#define realizableKE_H - -#include "RASModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class realizableKE Declaration -\*---------------------------------------------------------------------------*/ - -class realizableKE -: - public RASModel -{ - -protected: - - // Protected data - - // Model coefficients - - dimensionedScalar Cmu_; - dimensionedScalar A0_; - dimensionedScalar C2_; - dimensionedScalar sigmak_; - dimensionedScalar sigmaEps_; - dimensionedScalar Prt_; - - - // Fields - - volScalarField k_; - volScalarField epsilon_; - volScalarField mut_; - volScalarField alphat_; - - - // Protected Member Functions - - tmp<volScalarField> rCmu - ( - const volTensorField& gradU, - const volScalarField& S2, - const volScalarField& magS - ); - - tmp<volScalarField> rCmu(const volTensorField& gradU); - - -public: - - //- Runtime type information - TypeName("realizableKE"); - - // Constructors - - //- Construct from components - realizableKE - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~realizableKE() - {} - - - // Member Functions - - //- Return the effective diffusivity for k - tmp<volScalarField> DkEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DkEff", mut_/sigmak_ + mu()) - ); - } - - //- Return the effective diffusivity for epsilon - tmp<volScalarField> DepsilonEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu()) - ); - } - - //- Return the turbulence viscosity - virtual tmp<volScalarField> mut() const - { - return mut_; - } - - //- Return the turbulence thermal diffusivity - virtual tmp<volScalarField> alphat() const - { - return alphat_; - } - - //- Return the turbulence kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp<volScalarField> epsilon() const - { - return epsilon_; - } - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devRhoReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/v2f/v2f.C b/src/turbulenceModels/compressible/RAS/v2f/v2f.C deleted file mode 100644 index ec0c37363..000000000 --- a/src/turbulenceModels/compressible/RAS/v2f/v2f.C +++ /dev/null @@ -1,493 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "v2f.H" -#include "fixedValueFvPatchField.H" -#include "zeroGradientFvPatchField.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(v2f, 0); -addToRunTimeSelectionTable(RASModel, v2f, dictionary); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -wordList v2f::RBoundaryTypes() const -{ - const volScalarField::GeometricBoundaryField& bf(k_.boundaryField()); - - wordList bTypes - ( - bf.size(), - zeroGradientFvPatchField<symmTensor>::typeName - ); - - forAll(bf, patchI) - { - if (bf[patchI].fixesValue()) - { - bTypes[patchI] = fixedValueFvPatchField<symmTensor>::typeName; - } - } - - return bTypes; -} - - -tmp<volScalarField> v2f::davidsonCorrectNut -( - const tmp<volScalarField>& value -) const -{ - return min(CmuKEps_*sqr(k_)/epsilon_, value); -} - - -tmp<volScalarField> v2f::Ts() const -{ - return max(k_/epsilon_, 6.0*sqrt(mu()/rho_/epsilon_)); -} - - -tmp<volScalarField> v2f::Ls() const -{ - return - CL_*max(pow(k_, 1.5)/epsilon_, Ceta_*pow025(pow3(mu()/rho_)/epsilon_)); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -v2f::v2f -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName, - const word& modelName -) -: - RASModel(modelName, rho, U, phi, thermophysicalModel, turbulenceModelName), - - Cmu_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cmu", - coeffDict_, - 0.22 - ) - ), - CmuKEps_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "CmuKEps", - coeffDict_, - 0.09 - ) - ), - C1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C1", - coeffDict_, - 1.4 - ) - ), - C2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C2", - coeffDict_, - 0.3 - ) - ), - CL_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "CL", - coeffDict_, - 0.23 - ) - ), - Ceta_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Ceta", - coeffDict_, - 70.0 - ) - ), - Ceps2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Ceps2", - coeffDict_, - 1.9 - ) - ), - Ceps3_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Ceps3", - coeffDict_, - -0.33 - ) - ), - sigmaK_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaK", - coeffDict_, - 1.0 - ) - ), - sigmaEps_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaEps", - coeffDict_, - 1.3 - ) - ), - Prt_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Prt", - coeffDict_, - 1.0 - ) - ), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - epsilon_ - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - v2_ - ( - IOobject - ( - "v2", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - f_ - ( - IOobject - ( - "f", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - mut_ - ( - IOobject - ( - "mut", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - alphat_ - ( - IOobject - ( - "alphat", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - v2Min_(dimensionedScalar("v2Min", v2_.dimensions(), SMALL)), - fMin_(dimensionedScalar("fMin", f_.dimensions(), 0.0)) -{ - bound(k_, kMin_); - bound(epsilon_, epsilonMin_); - bound(v2_, v2Min_); - bound(f_, fMin_); - - mut_ = rho_*davidsonCorrectNut(Cmu_*v2_*Ts()); - mut_.correctBoundaryConditions(); - - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> v2f::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - (mut_/rho_)*dev(twoSymm(fvc::grad(U_))), - RBoundaryTypes() - ) - ); -} - - -tmp<volSymmTensorField> v2f::devRhoReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -muEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> v2f::divDevRhoReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(muEff(), U) - - fvc::div(muEff()*dev2(T(fvc::grad(U)))) - ); -} - - -bool v2f::read() -{ - if (RASModel::read()) - { - Cmu_.readIfPresent(coeffDict()); - CmuKEps_.readIfPresent(coeffDict()); - C1_.readIfPresent(coeffDict()); - C2_.readIfPresent(coeffDict()); - CL_.readIfPresent(coeffDict()); - Ceta_.readIfPresent(coeffDict()); - Ceps2_.readIfPresent(coeffDict()); - sigmaK_.readIfPresent(coeffDict()); - sigmaEps_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -void v2f::correct() -{ - if (!turbulence_) - { - // Re-calculate viscosity - mut_ = rho_*Cmu_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - return; - } - - RASModel::correct(); - - volScalarField divU(fvc::div(phi_/fvc::interpolate(rho_))); - - if (mesh_.moving()) - { - divU += fvc::div(mesh_.phi()); - } - - // use N=6 so that f=0 at walls - const dimensionedScalar N("N", dimless, 6.0); - - const volTensorField gradU(fvc::grad(U_)); - const volScalarField S2(2*magSqr(dev(symm(gradU)))); - - const volScalarField G(GName(), mut_*S2); - const volScalarField T(Ts()); - const volScalarField L2("v2f.L2", sqr(Ls())); - const volScalarField alpha - ( - "v2f::alpha", - 1.0/T*((C1_ - N)*v2_ - 2.0/3.0*k_*(C1_ - 1.0)) - ); - const volScalarField Ceps1 - ( - "Ceps1", - 1.4*(1.0 + 0.05*min(sqrt(k_/v2_), scalar(100.0))) - ); - - // Update epsilon (and possibly G) at the wall - epsilon_.boundaryField().updateCoeffs(); - - // Dissipation equation - tmp<fvScalarMatrix> epsEqn - ( - fvm::ddt(rho_, epsilon_) - + fvm::div(phi_, epsilon_) - - fvm::laplacian(DepsilonEff(), epsilon_) - == - Ceps1*G/T - - fvm::SuSp(((2.0/3.0)*Ceps1 + Ceps3_)*rho_*divU, epsilon_) - - fvm::Sp(Ceps2_*rho_/T, epsilon_) - ); - - epsEqn().relax(); - - epsEqn().boundaryManipulate(epsilon_.boundaryField()); - - solve(epsEqn); - bound(epsilon_, epsilonMin_); - - // Turbulent kinetic energy equation - tmp<fvScalarMatrix> kEqn - ( - fvm::ddt(rho_, k_) - + fvm::div(phi_, k_) - - fvm::laplacian(DkEff(), k_) - == - G - - fvm::SuSp((2.0/3.0)*rho_*divU, k_) - - fvm::Sp(rho_*epsilon_/k_, k_) - ); - - kEqn().relax(); - solve(kEqn); - bound(k_, kMin_); - - // Relaxation function equation - tmp<fvScalarMatrix> fEqn - ( - - fvm::laplacian(rho_, f_) - == - - fvm::Sp(rho_/L2, f_) - - 1.0/L2/k_*(rho_*alpha - C2_*G) - ); - - fEqn().relax(); - solve(fEqn); - bound(f_, fMin_); - - // Turbulence stress normal to streamlines equation - tmp<fvScalarMatrix> v2Eqn - ( - fvm::ddt(rho_, v2_) - + fvm::div(phi_, v2_) - - fvm::laplacian(DkEff(), v2_) - == - min(rho_*k_*f_, -rho_*alpha + C2_*G) - - fvm::Sp(rho_*N*epsilon_/k_, v2_) - ); - - v2Eqn().relax(); - solve(v2Eqn); - bound(v2_, v2Min_); - - // Re-calculate viscosity - mut_ = rho_*davidsonCorrectNut(Cmu_*v2_*T); - mut_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/v2f/v2f.H b/src/turbulenceModels/compressible/RAS/v2f/v2f.H deleted file mode 100644 index ce53c248b..000000000 --- a/src/turbulenceModels/compressible/RAS/v2f/v2f.H +++ /dev/null @@ -1,288 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::RASModels::v2f - -Group - grpCmpRASTurbulence - -Description - Lien and Kalitzin's v2-f turbulence model for incompressible flows, with - a limit imposed on the turbulent viscosity given by Davidson et al. - - The model solves for turbulence k and epsilon, with additional equations - for the turbulence stress normal to streamlines, v2, and elliptic damping - function, f. The variant implemented employs N=6, such that f=0 on walls. - - Wall boundary conditions are: - - k = kLowReWallFunction - epsilon = epsilonLowReWallFunction - v2 = v2WallFunction - f = fWallFunction - - These are applicable to both low- and high-Reynolds number flows. - - Inlet values can be approximated by: - - v2 = 2/3 k - f = zero-gradient - - - References: - - Lien F-S, Kalitzin G, 2001. Computations of transonic flow with the v2-f - turbulence model. Int. J. Heat Fluid Flow 22, pp 53-61 - - Davidson L, Nielsen P, Sveningsson A, 2003. Modifications of the v2-f - model for computing the flow in a 3D wall jet. Turbulence, Heat and Mass - Transfer 4, pp 577-584 - - The default model coefficients are given as: - \verbatim - v2fCoeffs - { - Cmu 0.22; - CmuKEps 0.09; - C1 1.4; - C2 0.3; - CL 0.23; - Ceta 70; - Ceps2 1.9; - sigmaEps 1.3; - sigmaK 1; - } - \endverbatim - -Note - If the kLowReWallFunction is employed, a velocity variant of the turbulent - viscosity wall function should be used, e.g. nutUWallFunction. Turbulence - k variants (nutk...) for this case will not behave correctly. - -SeeAlso - Foam::kEpsilon - Foam::kLowReWallFunctionFvPatchScalarField - Foam::epsilonLowReWallFunctionFvPatchScalarField - Foam::v2WallFunctionFvPatchScalarField - Foam::fWallFunctionFvPatchScalarField - -SourceFiles - v2f.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressiblev2f_H -#define compressiblev2f_H - -#include "RASModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class v2f Declaration -\*---------------------------------------------------------------------------*/ - -class v2f -: - public RASModel -{ - -protected: - - // Protected data - - // Model coefficients - - dimensionedScalar Cmu_; - dimensionedScalar CmuKEps_; - dimensionedScalar C1_; - dimensionedScalar C2_; - dimensionedScalar CL_; - dimensionedScalar Ceta_; - dimensionedScalar Ceps2_; - dimensionedScalar Ceps3_; - dimensionedScalar sigmaK_; - dimensionedScalar sigmaEps_; - dimensionedScalar Prt_; - - // Fields - - //- Turbulence kinetic energy - volScalarField k_; - - //- Turbulence dissipation - volScalarField epsilon_; - - //- Turbulence stress normal to streamlines - volScalarField v2_; - - //- Damping function - volScalarField f_; - - //- Turbulence viscosity - volScalarField mut_; - - //- Turbulence thermal diffusivity - volScalarField alphat_; - - - // Bounding values - - dimensionedScalar v2Min_; - dimensionedScalar fMin_; - - - // Protected Member Functions - - //- Return boundary type names for the R field - wordList RBoundaryTypes() const; - - //- Apply Davidson correction to nut - tmp<volScalarField> davidsonCorrectNut - ( - const tmp<volScalarField>& value - ) const; - - //- Return time scale, Ts - tmp<volScalarField> Ts() const; - - //- Return length scale, Ls - tmp<volScalarField> Ls() const; - - -public: - - //- Runtime type information - TypeName("v2f"); - - // Constructors - - //- Construct from components - v2f - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~v2f() - {} - - - // Member Functions - - //- Return the effective diffusivity for k - tmp<volScalarField> DkEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DkEff", mut_/sigmaK_ + mu()) - ); - } - - //- Return the effective diffusivity for epsilon - tmp<volScalarField> DepsilonEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu()) - ); - } - - //- Return the turbulence viscosity - virtual tmp<volScalarField> mut() const - { - return mut_; - } - - //- Return the turbulence thermal diffusivity - virtual tmp<volScalarField> alphat() const - { - return alphat_; - } - - //- Return the turbulence kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp<volScalarField> epsilon() const - { - return epsilon_; - } - - //- Return turbulence stress normal to streamlines - virtual tmp<volScalarField> v2() const - { - return v2_; - } - - //- Return the damping function - virtual tmp<volScalarField> f() const - { - return f_; - } - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devRhoReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/turbulenceModel/Make/files b/src/turbulenceModels/compressible/turbulenceModel/Make/files deleted file mode 100644 index 412045016..000000000 --- a/src/turbulenceModels/compressible/turbulenceModel/Make/files +++ /dev/null @@ -1,15 +0,0 @@ -turbulenceModel.C -laminar/laminar.C - -derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C -derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C -derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C -derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C -derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C -derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C -derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C -derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C - -derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C - -LIB = $(FOAM_LIBBIN)/libcompressibleTurbulenceModel diff --git a/src/turbulenceModels/compressible/turbulenceModel/Make/options b/src/turbulenceModels/compressible/turbulenceModel/Make/options deleted file mode 100644 index 9b024f163..000000000 --- a/src/turbulenceModels/compressible/turbulenceModel/Make/options +++ /dev/null @@ -1,17 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/solidSpecie/lnInclude - -LIB_LIBS = \ - -lsolidThermo \ - -lfluidThermophysicalModels \ - -lspecie \ - -lfiniteVolume \ - -lmeshTools \ - -lsolidSpecie \ - -lradiationModels diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C deleted file mode 100644 index a7188c5ee..000000000 --- a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C +++ /dev/null @@ -1,246 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "laminar.H" -#include "Time.H" -#include "volFields.H" -#include "fvcGrad.H" -#include "fvcDiv.H" -#include "fvmLaplacian.H" -#include "addToRunTimeSelectionTable.H" - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(laminar, 0); -addToRunTimeSelectionTable(turbulenceModel, laminar, turbulenceModel); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -laminar::laminar -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName -) -: - turbulenceModel(rho, U, phi, thermophysicalModel, turbulenceModelName) -{} - - -// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // - -autoPtr<laminar> laminar::New -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName -) -{ - return autoPtr<laminar> - ( - new laminar(rho, U, phi, thermophysicalModel, turbulenceModelName) - ); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -const dictionary& laminar::coeffDict() const -{ - return dictionary::null; -} - - -tmp<volScalarField> laminar::mut() const -{ - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "mut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("mut", mu().dimensions(), 0.0) - ) - ); -} - - -tmp<volScalarField> laminar::alphat() const -{ - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "alphat", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("alphat", alpha().dimensions(), 0.0) - ) - ); -} - - -tmp<volScalarField> laminar::k() const -{ - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("k", sqr(U_.dimensions()), 0.0) - ) - ); -} - - -tmp<volScalarField> laminar::epsilon() const -{ - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar - ( - "epsilon", sqr(U_.dimensions())/dimTime, 0.0 - ) - ) - ); -} - - -tmp<volSymmTensorField> laminar::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedSymmTensor - ( - "R", sqr(U_.dimensions()), symmTensor::zero - ) - ) - ); -} - - -tmp<volSymmTensorField> laminar::devRhoReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -mu()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> laminar::divDevRhoReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(muEff(), U) - - fvc::div(muEff()*dev2(T(fvc::grad(U)))) - ); -} - - -void laminar::correct() -{ - turbulenceModel::correct(); -} - - -bool laminar::read() -{ - return true; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H deleted file mode 100644 index b1de35154..000000000 --- a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H +++ /dev/null @@ -1,177 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::compressible::laminar - -Description - Turbulence model for laminar compressible flow. - -SourceFiles - laminar.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleLaminar_H -#define compressibleLaminar_H - -#include "turbulenceModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class laminar Declaration -\*---------------------------------------------------------------------------*/ - -class laminar -: - public turbulenceModel -{ - -public: - - //- Runtime type information - TypeName("laminar"); - - // Constructors - - //- Construct from components - laminar - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName - ); - - - // Selectors - - //- Return a reference to the selected turbulence model - static autoPtr<laminar> New - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName = turbulenceModel::typeName - ); - - - //- Destructor - virtual ~laminar() - {} - - - // Member Functions - - //- Const access to the coefficients dictionary - virtual const dictionary& coeffDict() const; - - //- Return the turbulence viscosity, i.e. 0 for laminar flow - virtual tmp<volScalarField> mut() const; - - //- Return the effective viscosity, i.e. the laminar viscosity - virtual tmp<volScalarField> muEff() const - { - return tmp<volScalarField>(new volScalarField("muEff", mu())); - } - - //- Return the turbulence thermal diffusivity, i.e. 0 for laminar flow - virtual tmp<volScalarField> alphat() const; - - //- Return the effective turbulent temperature diffusivity, - // i.e. the laminar thermal diffusivity - virtual tmp<volScalarField> kappaEff() const - { - return tmp<volScalarField> - ( - new volScalarField - ( - "kappaEff", - thermo().kappa() - ) - ); - } - - //- Return the effective turbulent temperature diffusivity for a patch, - // i.e. the laminar thermal diffusivity - virtual tmp<scalarField> kappaEff(const label patchI) const - { - return thermo().kappa(patchI); - } - - //- Return the effective turbulent thermal diffusivity, - // i.e. the laminar thermal diffusivity - virtual tmp<volScalarField> alphaEff() const - { - return tmp<volScalarField>(new volScalarField("alphaEff", alpha())); - } - - //- Return the effective turbulent thermal diffusivity for a patch, - // i.e. the laminar thermal diffusivity - virtual tmp<scalarField> alphaEff(const label patchI) const - { - return alpha().boundaryField()[patchI]; - } - - //- Return the turbulence kinetic energy, i.e. 0 for laminar flow - virtual tmp<volScalarField> k() const; - - //- Return the turbulence kinetic energy dissipation rate, - // i.e. 0 for laminar flow - virtual tmp<volScalarField> epsilon() const; - - //- Return the Reynolds stress tensor, i.e. 0 for laminar flow - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor, i.e. the laminar stress - virtual tmp<volSymmTensorField> devRhoReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; - - //- Correct the laminar viscosity - virtual void correct(); - - //- Read turbulenceProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C deleted file mode 100644 index 455ff9a72..000000000 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C +++ /dev/null @@ -1,155 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "turbulenceModel.H" -#include "volFields.H" -#include "surfaceFields.H" -#include "fvcGrad.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(turbulenceModel, 0); -defineRunTimeSelectionTable(turbulenceModel, turbulenceModel); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -turbulenceModel::turbulenceModel -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName -) -: - regIOobject - ( - IOobject - ( - turbulenceModelName, - U.time().constant(), - U.db(), - IOobject::NO_READ, - IOobject::NO_WRITE - ) - ), - runTime_(U.time()), - mesh_(U.mesh()), - - rho_(rho), - U_(U), - phi_(phi), - thermophysicalModel_(thermophysicalModel), - - y_(mesh_) -{} - - -// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // - -autoPtr<turbulenceModel> turbulenceModel::New -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermophysicalModel, - const word& turbulenceModelName -) -{ - // get model name, but do not register the dictionary - // otherwise it is registered in the database twice - const word modelType - ( - IOdictionary - ( - IOobject - ( - "turbulenceProperties", - U.time().constant(), - U.db(), - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) - ).lookup("simulationType") - ); - - Info<< "Selecting turbulence model type " << modelType << endl; - - turbulenceModelConstructorTable::iterator cstrIter = - turbulenceModelConstructorTablePtr_->find(modelType); - - if (cstrIter == turbulenceModelConstructorTablePtr_->end()) - { - FatalErrorIn - ( - "turbulenceModel::New(const volScalarField&, " - "const volVectorField&, const surfaceScalarField&, " - "fluidThermo&, const word&)" - ) << "Unknown turbulenceModel type " - << modelType << nl << nl - << "Valid turbulenceModel types:" << endl - << turbulenceModelConstructorTablePtr_->sortedToc() - << exit(FatalError); - } - - return autoPtr<turbulenceModel> - ( - cstrIter()(rho, U, phi, thermophysicalModel, turbulenceModelName) - ); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volScalarField> turbulenceModel::rhoEpsilonEff() const -{ - tmp<volTensorField> tgradU = fvc::grad(U_); - return mu()*(tgradU() && dev(twoSymm(tgradU()))) + rho_*epsilon(); -} - - -void turbulenceModel::correct() -{ - if (mesh_.changing()) - { - y_.correct(); - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H deleted file mode 100644 index b7e9195c5..000000000 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H +++ /dev/null @@ -1,282 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Namespace - Foam::compressible::turbulenceModels - -Description - Namespace for compressible turbulence turbulence models. - - -Class - Foam::compressible::turbulenceModel - -Description - Abstract base class for compressible turbulence models - (RAS, LES and laminar). - - -SourceFiles - turbulenceModel.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleturbulenceModel_H -#define compressibleturbulenceModel_H - -#include "primitiveFieldsFwd.H" -#include "volFieldsFwd.H" -#include "surfaceFieldsFwd.H" -#include "fvMatricesFwd.H" -#include "fluidThermo.H" -#include "nearWallDist.H" -#include "autoPtr.H" -#include "runTimeSelectionTables.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// Forward declarations -class fvMesh; - -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class turbulenceModel Declaration -\*---------------------------------------------------------------------------*/ - -class turbulenceModel -: - public regIOobject -{ - -protected: - - // Protected data - - const Time& runTime_; - const fvMesh& mesh_; - - const volScalarField& rho_; - const volVectorField& U_; - const surfaceScalarField& phi_; - - const fluidThermo& thermophysicalModel_; - - //- Near wall distance boundary field - nearWallDist y_; - - -private: - - // Private Member Functions - - //- Disallow default bitwise copy construct - turbulenceModel(const turbulenceModel&); - - //- Disallow default bitwise assignment - void operator=(const turbulenceModel&); - - -public: - - //- Runtime type information - TypeName("turbulenceModel"); - - - // Declare run-time constructor selection table - - declareRunTimeNewSelectionTable - ( - autoPtr, - turbulenceModel, - turbulenceModel, - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName - ), - (rho, U, phi, thermoPhysicalModel, turbulenceModelName) - ); - - - // Constructors - - //- Construct from components - turbulenceModel - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName = typeName - ); - - - // Selectors - - //- Return a reference to the selected turbulence model - static autoPtr<turbulenceModel> New - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const fluidThermo& thermoPhysicalModel, - const word& turbulenceModelName = typeName - ); - - - //- Destructor - virtual ~turbulenceModel() - {} - - - // Member Functions - - //- Const access to the coefficients dictionary - virtual const dictionary& coeffDict() const = 0; - - //- Helper function to return the nam eof the turbulence G field - inline word GName() const - { - return word(type() + ":G"); - } - - //- Access function to density field - const volScalarField& rho() const - { - return rho_; - } - - //- Access function to velocity field - const volVectorField& U() const - { - return U_; - } - - //- Access function to flux field - const surfaceScalarField& phi() const - { - return phi_; - } - - //- Access function to thermophysical model - const fluidThermo& thermo() const - { - return thermophysicalModel_; - } - - //- Return the near wall distances - const nearWallDist& y() const - { - return y_; - } - - //- Return the laminar viscosity - const volScalarField& mu() const - { - return thermophysicalModel_.mu(); - } - - //- Return the laminar thermal conductivity - const volScalarField& alpha() const - { - return thermophysicalModel_.alpha(); - } - - //- Return the turbulence viscosity - virtual tmp<volScalarField> mut() const = 0; - - //- Return the effective viscosity - virtual tmp<volScalarField> muEff() const = 0; - - //- Return the turbulence thermal diffusivity - virtual tmp<volScalarField> alphat() const = 0; - - //- Return the turbulence thermal diffusivity for a patch - virtual tmp<scalarField> alphat(const label patchI) const - { - return alphat()().boundaryField()[patchI]; - } - - //- Return the effective turbulence temperature diffusivity - virtual tmp<volScalarField> kappaEff() const = 0; - - //- Return the effective turbulence temperature diffusivity for a patch - virtual tmp<scalarField> kappaEff(const label patchI) const = 0; - - //- Return the effective turbulence thermal diffusivity - virtual tmp<volScalarField> alphaEff() const = 0; - - //- Return the effective turbulence thermal diffusivity for a patch - virtual tmp<scalarField> alphaEff(const label patchI) const = 0; - - //- Return the turbulence kinetic energy - virtual tmp<volScalarField> k() const = 0; - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp<volScalarField> epsilon() const = 0; - - //- Return the laminar+turbulence kinetic energy dissipation rate - // Used as the viscous contribution to the energy equations - virtual tmp<volScalarField> rhoEpsilonEff() const; - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const = 0; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devRhoReff() const = 0; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const = 0; - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct() = 0; - - //- Read LESProperties or RASProperties dictionary - virtual bool read() = 0; - - //- Default dummy write function - virtual bool writeData(Ostream&) const - { - return true; - } - -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/derivedFvPatchFields/Make/files b/src/turbulenceModels/derivedFvPatchFields/Make/files deleted file mode 100644 index f0a5fdfa8..000000000 --- a/src/turbulenceModels/derivedFvPatchFields/Make/files +++ /dev/null @@ -1,4 +0,0 @@ -porousBafflePressure/porousBafflePressureFvPatchFields.C -fixedShearStress/fixedShearStressFvPatchVectorField.C - -LIB = $(FOAM_LIBBIN)/libturbulenceDerivedFvPatchFields diff --git a/src/turbulenceModels/derivedFvPatchFields/Make/options b/src/turbulenceModels/derivedFvPatchFields/Make/options deleted file mode 100644 index 66712d18e..000000000 --- a/src/turbulenceModels/derivedFvPatchFields/Make/options +++ /dev/null @@ -1,16 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel - -LIB_LIBS = \ - -lfiniteVolume \ - -lfluidThermophysicalModels \ - -lspecie \ - -lmeshTools \ - -lcompressibleTurbulenceModel \ - -lincompressibleTurbulenceModel diff --git a/src/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C b/src/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C deleted file mode 100644 index 587ad9678..000000000 --- a/src/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C +++ /dev/null @@ -1,186 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "fixedShearStressFvPatchVectorField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "surfaceFields.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "compressible/turbulenceModel/turbulenceModel.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::fixedShearStressFvPatchVectorField::fixedShearStressFvPatchVectorField -( - const fvPatch& p, - const DimensionedField<vector, volMesh>& iF -) -: - fixedValueFvPatchVectorField(p, iF), - phiName_("phi"), - rhoName_("rho"), - tau0_(vector::zero) -{} - - -Foam::fixedShearStressFvPatchVectorField::fixedShearStressFvPatchVectorField -( - const fvPatch& p, - const DimensionedField<vector, volMesh>& iF, - const dictionary& dict -) -: - fixedValueFvPatchVectorField(p, iF), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), - tau0_(dict.lookupOrDefault<vector>("tau", vector::zero)) -{ - fvPatchField<vector>::operator=(patchInternalField()); -} - - -Foam::fixedShearStressFvPatchVectorField::fixedShearStressFvPatchVectorField -( - const fixedShearStressFvPatchVectorField& ptf, - const fvPatch& p, - const DimensionedField<vector, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchVectorField(ptf, p, iF, mapper), - phiName_(ptf.phiName_), - rhoName_(ptf.rhoName_), - tau0_(ptf.tau0_) -{} - - -Foam::fixedShearStressFvPatchVectorField::fixedShearStressFvPatchVectorField -( - const fixedShearStressFvPatchVectorField& ptf -) -: - fixedValueFvPatchVectorField(ptf), - phiName_(ptf.phiName_), - rhoName_(ptf.rhoName_), - tau0_(ptf.tau0_) -{} - - -Foam::fixedShearStressFvPatchVectorField::fixedShearStressFvPatchVectorField -( - const fixedShearStressFvPatchVectorField& ptf, - const DimensionedField<vector, volMesh>& iF -) -: - fixedValueFvPatchVectorField(ptf, iF), - phiName_(ptf.phiName_), - rhoName_(ptf.rhoName_), - tau0_(ptf.tau0_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::fixedShearStressFvPatchVectorField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const label patchI = patch().index(); - - const surfaceScalarField& phi = - db().lookupObject<surfaceScalarField>(phiName_); - - scalarField nuEff; - if (phi.dimensions() == dimVelocity*dimArea) - { - const incompressible::turbulenceModel& turbModel = - db().lookupObject<incompressible::turbulenceModel> - ( - "turbulenceModel" - ); - - nuEff = turbModel.nuEff()()[patchI]; - } - else if (phi.dimensions() == dimDensity*dimVelocity*dimArea) - { - const compressible::turbulenceModel& turbModel = - db().lookupObject<compressible::turbulenceModel> - ( - "turbulenceModel" - ); - - const fvPatchField<scalar>& rhop = - patch().lookupPatchField<volScalarField, scalar>(rhoName_); - - nuEff = turbModel.muEff()()[patchI]/rhop; - } - else - { - FatalErrorIn("fixedShearStressFvPatchVectorField::updateCoeffs()") - << "dimensions of phi are not correct" - << "\n on patch " << this->patch().name() - << " of field " << this->dimensionedInternalField().name() - << " in file " << this->dimensionedInternalField().objectPath() - << exit(FatalError); - } - - const vectorField Uc(patchInternalField()); - - vector tauHat = tau0_/(mag(tau0_) + ROOTVSMALL); - - const scalarField& ry = patch().deltaCoeffs(); - - operator==(tauHat*(tauHat & (tau0_*(1.0/(ry*nuEff)) + Uc))); - - fixedValueFvPatchVectorField::updateCoeffs(); -} - - -void Foam::fixedShearStressFvPatchVectorField::write(Ostream& os) const -{ - fixedValueFvPatchVectorField::write(os); - writeEntryIfDifferent<word>(os, "phi", "phi", phiName_); - writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_); - os.writeKeyword("tau") << tau0_ << token::END_STATEMENT << nl; - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makePatchTypeField - ( - fvPatchVectorField, - fixedShearStressFvPatchVectorField - ); -} - -// ************************************************************************* // diff --git a/src/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.H b/src/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.H deleted file mode 100644 index a399ff07e..000000000 --- a/src/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.H +++ /dev/null @@ -1,154 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::fixedShearStressFvPatchVectorField - -Group - grpWallBoundaryConditions - -Description - Set a constant shear stress as tau0 = -nuEff dU/dn. - -SourceFiles - fixedShearStressFvPatchVectorField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef fixedShearStressFvPatchVectorField_H -#define fixedShearStressFvPatchVectorField_H - -#include "fvPatchFields.H" -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class fixedShearStressFvPatchVectorField Declaration -\*---------------------------------------------------------------------------*/ - -class fixedShearStressFvPatchVectorField -: - public fixedValueFvPatchVectorField -{ - // Private data - - //- Name of flux field (default = phi) - const word phiName_; - - //- Name of density field (default = rho) - const word rhoName_; - - //- Constant shear stress - const vector tau0_; - - -public: - - //- Runtime type information - TypeName("fixedShearStress"); - - - // Constructors - - //- Construct from patch and internal field - fixedShearStressFvPatchVectorField - ( - const fvPatch&, - const DimensionedField<vector, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - fixedShearStressFvPatchVectorField - ( - const fvPatch&, - const DimensionedField<vector, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - fixedShearStressFvPatchVectorField - ( - const fixedShearStressFvPatchVectorField&, - const fvPatch&, - const DimensionedField<vector, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - fixedShearStressFvPatchVectorField - ( - const fixedShearStressFvPatchVectorField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchVectorField> clone() const - { - return tmp<fvPatchVectorField> - ( - new fixedShearStressFvPatchVectorField(*this) - ); - } - - //- Construct as copy setting internal field reference - fixedShearStressFvPatchVectorField - ( - const fixedShearStressFvPatchVectorField&, - const DimensionedField<vector, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchVectorField> clone - ( - const DimensionedField<vector, volMesh>& iF - ) const - { - return tmp<fvPatchVectorField> - ( - new fixedShearStressFvPatchVectorField(*this, iF) - ); - } - - - // Member functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C b/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C deleted file mode 100644 index afd43395b..000000000 --- a/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C +++ /dev/null @@ -1,121 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "porousBafflePressureFvPatchField.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template<class Type> -Foam::porousBafflePressureFvPatchField<Type>::porousBafflePressureFvPatchField -( - const fvPatch& p, - const DimensionedField<Type, volMesh>& iF -) -: - fixedJumpFvPatchField<Type>(p, iF), - D_(0), - I_(0), - length_(0) -{} - - -template<class Type> -Foam::porousBafflePressureFvPatchField<Type>::porousBafflePressureFvPatchField -( - const porousBafflePressureFvPatchField<Type>& ptf, - const fvPatch& p, - const DimensionedField<Type, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedJumpFvPatchField<Type>(ptf, p, iF, mapper), - D_(ptf.D_), - I_(ptf.I_), - length_(ptf.length_) -{} - - -template<class Type> -Foam::porousBafflePressureFvPatchField<Type>::porousBafflePressureFvPatchField -( - const fvPatch& p, - const DimensionedField<Type, volMesh>& iF, - const dictionary& dict -) -: - fixedJumpFvPatchField<Type>(p, iF), - D_(readScalar(dict.lookup("D"))), - I_(readScalar(dict.lookup("I"))), - length_(readScalar(dict.lookup("length"))) -{ - fvPatchField<Type>::operator= - ( - Field<Type>("value", dict, p.size()) - ); -} - - -template<class Type> -Foam::porousBafflePressureFvPatchField<Type>::porousBafflePressureFvPatchField -( - const porousBafflePressureFvPatchField<Type>& ptf -) -: - cyclicLduInterfaceField(), - fixedJumpFvPatchField<Type>(ptf), - D_(ptf.D_), - I_(ptf.I_), - length_(ptf.length_) -{} - - -template<class Type> -Foam::porousBafflePressureFvPatchField<Type>::porousBafflePressureFvPatchField -( - const porousBafflePressureFvPatchField<Type>& ptf, - const DimensionedField<Type, volMesh>& iF -) -: - fixedJumpFvPatchField<Type>(ptf, iF), - D_(ptf.D_), - I_(ptf.I_), - length_(ptf.length_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - - -template<class Type> -void Foam::porousBafflePressureFvPatchField<Type>::write(Ostream& os) const -{ - fixedJumpFvPatchField<Type>::write(os); - os.writeKeyword("D") << D_ << token::END_STATEMENT << nl; - os.writeKeyword("I") << I_ << token::END_STATEMENT << nl; - os.writeKeyword("length") << length_ << token::END_STATEMENT << nl; -} - - -// ************************************************************************* // diff --git a/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H b/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H deleted file mode 100644 index 520fe0985..000000000 --- a/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H +++ /dev/null @@ -1,216 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::porousBafflePressureFvPatchField - -Group - grpCoupledBoundaryConditions - -Description - This boundary condition provides a jump condition, using the \c cyclic - condition as a base. - - The porous baffle introduces a pressure jump defined by: - - \f[ - \Delta p = -(D \mu U + 0.5 I \rho |U|^2 )L - \f] - - where - - \vartable - p | pressure [Pa] - \rho | density [kg/m3] - \mu | laminar viscosity [Pa s] - I | inertial coefficient - D | Darcy coefficient - L | porous media length in the flow direction - \endvartable - - - \heading Patch usage - - \table - Property | Description | Required | Default value - patchType | underlying patch type should be \c cyclic| yes | - D | Darcy coefficient | yes | - I | inertial coefficient | yes | - L | porous media length in the flow direction | yes | - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type porousBafflePressure; - patchType cyclic; - jump uniform 0; - I 1000000; - D 0.001; - L 0.1; - value uniform 0; - } - \endverbatim - -Note - The underlying \c patchType should be set to \c cyclic - -SourceFiles - porousBafflePressureFvPatchField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef porousBafflePressureFvPatchField_H -#define porousBafflePressureFvPatchField_H - -#include "fixedJumpFvPatchField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class porousBafflePressureFvPatchField Declaration -\*---------------------------------------------------------------------------*/ - -template<class Type> -class porousBafflePressureFvPatchField -: - public fixedJumpFvPatchField<Type> -{ - // Private data - - //- Darcy pressure loss coefficient - scalar D_; - - //- Inertia pressure lost coefficient - scalar I_; - - //- Porous media length - scalar length_; - - -public: - - //- Runtime type information - TypeName("porousBafflePressure"); - - - // Constructors - - //- Construct from patch and internal field - porousBafflePressureFvPatchField - ( - const fvPatch&, - const DimensionedField<Type, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - porousBafflePressureFvPatchField - ( - const fvPatch&, - const DimensionedField<Type, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given porousBafflePressureFvPatchField - // onto a new patch - porousBafflePressureFvPatchField - ( - const porousBafflePressureFvPatchField<Type>&, - const fvPatch&, - const DimensionedField<Type, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - porousBafflePressureFvPatchField - ( - const porousBafflePressureFvPatchField<Type>& - ); - - //- Construct and return a clone - virtual tmp<fvPatchField<Type> > clone() const - { - return tmp<fvPatchField<Type> > - ( - new porousBafflePressureFvPatchField<Type>(*this) - ); - } - - //- Construct as copy setting internal field reference - porousBafflePressureFvPatchField - ( - const porousBafflePressureFvPatchField<Type>&, - const DimensionedField<Type, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchField<Type> > clone - ( - const DimensionedField<Type, volMesh>& iF - ) const - { - return tmp<fvPatchField<Type> > - ( - new porousBafflePressureFvPatchField<Type>(*this, iF) - ); - } - - - // Member functions - - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - - //- Write - virtual void write(Ostream&) const; -}; - - -//- Specialisation of the jump-condition for the pressure -template<> -void porousBafflePressureFvPatchField<scalar>::updateCoeffs(); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository -# include "porousBafflePressureFvPatchField.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchFields.C b/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchFields.C deleted file mode 100644 index 6f218bd8c..000000000 --- a/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchFields.C +++ /dev/null @@ -1,121 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "porousBafflePressureFvPatchFields.H" -#include "addToRunTimeSelectionTable.H" -#include "volFields.H" -#include "surfaceFields.H" - -#include "compressible/turbulenceModel/turbulenceModel.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -makeTemplatePatchTypeField -( - fvPatchScalarField, - porousBafflePressureFvPatchScalarField -); - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -//- Specialisation of the jump-condition for the pressure -template<> -void Foam::porousBafflePressureFvPatchField<Foam::scalar>::updateCoeffs() -{ - if (updated()) - { - return; - } - - const label patchI = patch().index(); - - const surfaceScalarField& phi = - db().lookupObject<surfaceScalarField>("phi"); - - const fvsPatchField<scalar>& phip = - patch().patchField<surfaceScalarField, scalar>(phi); - - scalarField Un(phip/patch().magSf()); - - scalarField magUn(mag(Un)); - - if (phi.dimensions() == dimensionSet(0, 3, -1, 0, 0)) - { - const incompressible::turbulenceModel& turbModel = - db().lookupObject<incompressible::turbulenceModel> - ( - "turbulenceModel" - ); - - const scalarField nu = turbModel.nu()().boundaryField()[patchI]; - - jump_ = -sign(Un)*(D_*nu + I_*0.5*magUn)*magUn*length_; - } - else - { - const compressible::turbulenceModel& turbModel = - db().lookupObject<compressible::turbulenceModel> - ( - "turbulenceModel" - ); - - const scalarField mu = turbModel.mu().boundaryField()[patchI]; - - const scalarField rhow = - patch().lookupPatchField<volScalarField, scalar>("rho"); - - Un /= rhow; - - jump_ = -sign(Un)*(D_*mu + I_*0.5*rhow*magUn)*magUn*length_; - } - - if (debug) - { - scalar avePressureJump = gAverage(jump_); - scalar aveVelocity = gAverage(mag(Un)); - - Info<< patch().boundaryMesh().mesh().name() << ':' - << patch().name() << ':' - << " Average pressure drop :" << avePressureJump - << " Average velocity :" << aveVelocity - << endl; - } - - fixedJumpFvPatchField<scalar>::updateCoeffs(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/Allwmake b/src/turbulenceModels/incompressible/Allwmake deleted file mode 100755 index ec2033465..000000000 --- a/src/turbulenceModels/incompressible/Allwmake +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Parse arguments for library compilation -targetType=libso -. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -set -x - -wmake $targetType turbulenceModel -wmake $targetType RAS -wmake $targetType LES - -# ----------------------------------------------------------------- end-of-file diff --git a/src/turbulenceModels/incompressible/LES/DESModel/DESModel.C b/src/turbulenceModels/incompressible/LES/DESModel/DESModel.C deleted file mode 100644 index 2f3e33931..000000000 --- a/src/turbulenceModels/incompressible/LES/DESModel/DESModel.C +++ /dev/null @@ -1,56 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "DESModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * * // - -DESModel::DESModel -( - const word& type, - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName -) -: - LESModel(type, U, phi, transport, turbulenceModelName) - -{} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/DESModel/DESModelDoc.H b/src/turbulenceModels/incompressible/LES/DESModel/DESModelDoc.H deleted file mode 100644 index 5311d09d6..000000000 --- a/src/turbulenceModels/incompressible/LES/DESModel/DESModelDoc.H +++ /dev/null @@ -1,32 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -\defgroup grpIcoDESTurbulence Incompressible DES turbulence -@{ - \ingroup grpIcoTurbulence - This group contains incompressible DES models. -@} - -\*---------------------------------------------------------------------------*/ diff --git a/src/turbulenceModels/incompressible/LES/DeardorffDiffStress/DeardorffDiffStress.C b/src/turbulenceModels/incompressible/LES/DeardorffDiffStress/DeardorffDiffStress.C deleted file mode 100644 index af3c7eb0a..000000000 --- a/src/turbulenceModels/incompressible/LES/DeardorffDiffStress/DeardorffDiffStress.C +++ /dev/null @@ -1,162 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "DeardorffDiffStress.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(DeardorffDiffStress, 0); -addToRunTimeSelectionTable(LESModel, DeardorffDiffStress, dictionary); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void DeardorffDiffStress::updateSubGridScaleFields(const volScalarField& K) -{ - nuSgs_ = ck_*sqrt(K)*delta(); - nuSgs_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -DeardorffDiffStress::DeardorffDiffStress -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, U, phi, transport, turbulenceModelName), - GenSGSStress(U, phi, transport), - - ck_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "ck", - coeffDict_, - 0.094 - ) - ), - cm_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "cm", - coeffDict_, - 4.13 - ) - ) -{ - updateSubGridScaleFields(0.5*tr(B_)); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void DeardorffDiffStress::correct(const tmp<volTensorField>& tgradU) -{ - const volTensorField& gradU = tgradU(); - - GenSGSStress::correct(gradU); - - const volSymmTensorField D(symm(gradU)); - - const volSymmTensorField P(-twoSymm(B_ & gradU)); - - volScalarField K(0.5*tr(B_)); - volScalarField Epsilon(2*nuEff()*magSqr(D)); - - tmp<fvSymmTensorMatrix> BEqn - ( - fvm::ddt(B_) - + fvm::div(phi(), B_) - - fvm::laplacian(DBEff(), B_) - + fvm::Sp(cm_*sqrt(K)/delta(), B_) - == - P - + 0.8*K*D - - (2*ce_ - 0.667*cm_)*I*Epsilon - ); - - BEqn().relax(); - BEqn().solve(); - - // Bounding the component kinetic energies - - forAll(B_, celli) - { - B_[celli].component(symmTensor::XX) = - max(B_[celli].component(symmTensor::XX), kMin_.value()); - B_[celli].component(symmTensor::YY) = - max(B_[celli].component(symmTensor::YY), kMin_.value()); - B_[celli].component(symmTensor::ZZ) = - max(B_[celli].component(symmTensor::ZZ), kMin_.value()); - } - - K = 0.5*tr(B_); - bound(K, kMin_); - - updateSubGridScaleFields(K); -} - - -bool DeardorffDiffStress::read() -{ - if (GenSGSStress::read()) - { - ck_.readIfPresent(coeffDict()); - cm_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/DeardorffDiffStress/DeardorffDiffStress.H b/src/turbulenceModels/incompressible/LES/DeardorffDiffStress/DeardorffDiffStress.H deleted file mode 100644 index 7125d3be0..000000000 --- a/src/turbulenceModels/incompressible/LES/DeardorffDiffStress/DeardorffDiffStress.H +++ /dev/null @@ -1,148 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::LESModels::DeardorffDiffStress - -Group - grpIcoLESTurbulence - -Description - Differential SGS Stress Equation Model for incompressible flows - - The DSEM uses a model version of the full balance equation for the SGS - stress tensor to simulate the behaviour of B. - Thus, - \f[ - \frac{d}{dt}(B) + \nabla\cdot(U B) - \nabla\cdot(\nu_{sgs}\nabla B) - = - P - c_1 \frac{\epsilon}{k}B - 0.667(1 - c_1)\epsilon I - - c_2 (P - 0.333 trP I) - \f] - - where - \f{eqnarray*}{ - k &=& 0.5 tr(B) \\ - \epsilon &=& c_e k^{3/2}/\Delta \\ - \epsilon/k &=& c_e k^{1/2}/\Delta \\ - P &=& -(B'L + L'B) \\ - \nu_{sgs} &=& c_k k^{1/2} \Delta \\ - \nu_{eff} &=& \nu_{sgs} + \nu - \f} - -SourceFiles - DeardorffDiffStress.C - -\*---------------------------------------------------------------------------*/ - -#ifndef DeardorffDiffStress_H -#define DeardorffDiffStress_H - -#include "GenSGSStress.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class DeardorffDiffStress Declaration -\*---------------------------------------------------------------------------*/ - -class DeardorffDiffStress -: - public GenSGSStress -{ - // Private data - - dimensionedScalar ck_; - dimensionedScalar cm_; - - - // Private Member Functions - - //- Update sub-grid scale fields - void updateSubGridScaleFields(const volScalarField& K); - - // Disallow default bitwise copy construct and assignment - DeardorffDiffStress(const DeardorffDiffStress&); - DeardorffDiffStress& operator=(const DeardorffDiffStress&); - - -public: - - //- Runtime type information - TypeName("DeardorffDiffStress"); - - // Constructors - - //- Construct from components - DeardorffDiffStress - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~DeardorffDiffStress() - {} - - - // Member Functions - - //- Return the effective diffusivity for B - tmp<volScalarField> DBEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DBEff", nuSgs_ + nu()) - ); - } - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.C b/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.C deleted file mode 100644 index 1dcad692c..000000000 --- a/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.C +++ /dev/null @@ -1,149 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "GenEddyVisc.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameWithName(GenEddyVisc, "GenEddyVisc"); - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -GenEddyVisc::GenEddyVisc -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, U, phi, transport, turbulenceModelName), - - ce_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "ce", - coeffDict_, - 1.048 - ) - ), - - nuSgs_ - ( - IOobject - ( - "nuSgs", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ) -{ -// printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> GenEddyVisc::B() const -{ - return ((2.0/3.0)*I)*k() - nuSgs_*twoSymm(fvc::grad(U())); -} - - -tmp<volSymmTensorField> GenEddyVisc::devReff() const -{ - return -nuEff()*dev(twoSymm(fvc::grad(U()))); -} - - -tmp<fvVectorMatrix> GenEddyVisc::divDevReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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)))) - ); -} - - -void GenEddyVisc::correct(const tmp<volTensorField>& gradU) -{ - LESModel::correct(gradU); -} - - -bool GenEddyVisc::read() -{ - if (LESModel::read()) - { - ce_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.H b/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.H deleted file mode 100644 index ab57b4cd8..000000000 --- a/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.H +++ /dev/null @@ -1,170 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::LESModels::GenEddyVisc - -Group - grpIcoLESTurbulence - -Description - General base class for all incompressible models that can be implemented - as an eddy viscosity, i.e. algebraic and one-equation models. - - Contains fields for k (SGS turbulent kinetic energy), gamma - (modelled viscosity) and epsilon (SGS dissipation). - -SourceFiles - GenEddyVisc.C - -\*---------------------------------------------------------------------------*/ - -#ifndef GenEddyVisc_H -#define GenEddyVisc_H - -#include "LESModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class GenEddyVisc Declaration -\*---------------------------------------------------------------------------*/ - -class GenEddyVisc -: - virtual public LESModel -{ - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - GenEddyVisc(const GenEddyVisc&); - GenEddyVisc& operator=(const GenEddyVisc&); - - -protected: - - // Model coefficients - - dimensionedScalar ce_; - - // Fields - - volScalarField nuSgs_; - - -public: - - //- Partial Runtime type information - static const word typeName; - - // Constructors - - //- Construct from components - GenEddyVisc - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~GenEddyVisc() - {} - - - // Member Functions - - //- Return sub-grid disipation rate - virtual tmp<volScalarField> epsilon() const - { - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ce_*k()*sqrt(k())/delta() - ) - ); - } - - //- Return the SGS viscosity. - virtual tmp<volScalarField> nuSgs() const - { - return nuSgs_; - } - - //- Return the sub-grid stress tensor. - virtual tmp<volSymmTensorField> B() const; - - //- Return the effective sub-grid turbulence stress tensor - // including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.C b/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.C deleted file mode 100644 index d44bb7e38..000000000 --- a/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.C +++ /dev/null @@ -1,230 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "GenSGSStress.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameWithName(GenSGSStress, "GenSGSStress"); - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -GenSGSStress::GenSGSStress -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, U, phi, transport, turbulenceModelName), - - ce_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "ce", - coeffDict_, - 1.048 - ) - ), - - couplingFactor_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "couplingFactor", - coeffDict_, - 0.0 - ) - ), - - B_ - ( - IOobject - ( - "B", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - nuSgs_ - ( - IOobject - ( - "nuSgs", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - nu(), - B_.boundaryField().types() - ) -{ - if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0) - { - FatalErrorIn - ( - "GenSGSStress::GenSGSStress" - "(const volVectorField& U, const surfaceScalarField& phi," - "transportModel& transport)" - ) << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" << nl - << exit(FatalError); - } -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> GenSGSStress::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - B_ - nu()*dev(twoSymm(fvc::grad(U()))) - ) - ); -} - - -tmp<fvVectorMatrix> GenSGSStress::divDevReff -( - volVectorField& U -) const -{ - if (couplingFactor_.value() > 0.0) - { - return - ( - fvc::div(B_ + couplingFactor_*nuSgs_*fvc::grad(U)) - + fvc::laplacian - ( - (1.0 - couplingFactor_)*nuSgs_, U, "laplacian(nuEff,U)" - ) - - fvm::laplacian(nuEff(), U) - ); - } - else - { - return - ( - fvc::div(B_) - + fvc::laplacian(nuSgs_, U, "laplacian(nuEff,U)") - - fvm::laplacian(nuEff(), U) - ); - } -} - - -tmp<fvVectorMatrix> 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()) - { - ce_.readIfPresent(coeffDict()); - - couplingFactor_.readIfPresent(coeffDict()); - - if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0) - { - FatalErrorIn("GenSGSStress::read()") - << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" - << exit(FatalError); - } - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.H b/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.H deleted file mode 100644 index da2b356a8..000000000 --- a/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.H +++ /dev/null @@ -1,192 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::LESModels::GenSGSStress - -Group - grpIcoLESTurbulence - -Description - General base class for all incompressible models that directly - solve for the SGS stress tensor B. - - Contains tensor fields B (the SGS stress tensor) as well as scalar - fields for k (SGS turbulent energy) gamma (SGS viscosity) and epsilon - (SGS dissipation). - -SourceFiles - GenSGSStress.C - -\*---------------------------------------------------------------------------*/ - -#ifndef GenSGSStress_H -#define GenSGSStress_H - -#include "LESModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class GenSGSStress Declaration -\*---------------------------------------------------------------------------*/ - -class GenSGSStress -: - virtual public LESModel -{ - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - GenSGSStress(const GenSGSStress&); - GenSGSStress& operator=(const GenSGSStress&); - - -protected: - - dimensionedScalar ce_; - - dimensionedScalar couplingFactor_; - - volSymmTensorField B_; - volScalarField nuSgs_; - - -public: - - //- Partial Runtime type information - static const word typeName; - - // Constructors - - //- Construct from components - GenSGSStress - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~GenSGSStress() - {} - - - // Member Functions - - //- Return the SGS turbulent kinetic energy. - virtual tmp<volScalarField> k() const - { - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - 0.5*tr(B_) - ) - ); - } - - //- Return the SGS turbulent dissipation. - virtual tmp<volScalarField> epsilon() const - { - const volScalarField K(k()); - - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ce_*K*sqrt(K)/delta() - ) - ); - } - - //- Return the SGS viscosity. - virtual tmp<volScalarField> nuSgs() const - { - return nuSgs_; - } - - //- Return the sub-grid stress tensor. - virtual tmp<volSymmTensorField> B() const - { - return B_; - } - - //- Return the effective sub-grid turbulence stress tensor - // including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C deleted file mode 100644 index 5486b5592..000000000 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C +++ /dev/null @@ -1,207 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "LESModel.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(LESModel, 0); -defineRunTimeSelectionTable(LESModel, dictionary); -addToRunTimeSelectionTable(turbulenceModel, LESModel, turbulenceModel); - -// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // - -void LESModel::printCoeffs() -{ - if (printCoeffs_) - { - Info<< type() << "Coeffs" << coeffDict_ << endl; - } -} - - -// * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * * // - -LESModel::LESModel -( - const word& type, - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName -) -: - turbulenceModel(U, phi, transport, turbulenceModelName), - - IOdictionary - ( - IOobject - ( - "LESProperties", - U.time().constant(), - U.db(), - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) - ), - - printCoeffs_(lookupOrDefault<Switch>("printCoeffs", false)), - coeffDict_(subOrEmptyDict(type + "Coeffs")), - - kMin_("kMin", sqr(dimVelocity), SMALL), - delta_(LESdelta::New("delta", U.mesh(), *this)) -{ - kMin_.readIfPresent(*this); - - // Force the construction of the mesh deltaCoeffs which may be needed - // for the construction of the derived models and BCs - mesh_.deltaCoeffs(); -} - - -// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // - -autoPtr<LESModel> LESModel::New -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName -) -{ - // get model name, but do not register the dictionary - // otherwise it is registered in the database twice - const word modelType - ( - IOdictionary - ( - IOobject - ( - "LESProperties", - U.time().constant(), - U.db(), - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) - ).lookup("LESModel") - ); - - Info<< "Selecting LES turbulence model " << modelType << endl; - - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); - - if (cstrIter == dictionaryConstructorTablePtr_->end()) - { - FatalErrorIn - ( - "LESModel::New" - "(" - "const volVectorField&, " - "const surfaceScalarField& ," - "transportModel&, " - "const word&" - ")" - ) << "Unknown LESModel type " - << modelType << nl << nl - << "Valid LESModel types:" << endl - << dictionaryConstructorTablePtr_->sortedToc() - << exit(FatalError); - } - - return autoPtr<LESModel> - ( - cstrIter()(U, phi, transport, turbulenceModelName) - ); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void LESModel::correct(const tmp<volTensorField>&) -{ - turbulenceModel::correct(); - delta_().correct(); -} - - -void LESModel::correct() -{ - correct(fvc::grad(U_)); -} - - -bool LESModel::read() -{ - //if (regIOobject::read()) - - // Bit of trickery : we are both IOdictionary ('RASProperties') and - // an regIOobject from the turbulenceModel level. Problem is to distinguish - // between the two - we only want to reread the IOdictionary. - - bool ok = IOdictionary::readData - ( - IOdictionary::readStream - ( - IOdictionary::type() - ) - ); - IOdictionary::close(); - - if (ok) - { - if (const dictionary* dictPtr = subDictPtr(type() + "Coeffs")) - { - coeffDict_ <<= *dictPtr; - } - - delta_().read(*this); - - kMin_.readIfPresent(*this); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H deleted file mode 100644 index 8dad795f6..000000000 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H +++ /dev/null @@ -1,246 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Namespace - Foam::incompressible::LESModels - -Group - grpIcoLESTurbulence - -Description - Namespace for incompressible LES models. - -Class - Foam::incompressible::LESModel - -Description - Base class for all incompressible flow LES SGS models. - - This class defines the basic interface for an incompressible flow SGS - model, and encapsulates data of value to all possible models. - In particular this includes references to all the dependent fields - (U, phi), the physical viscosity nu, and the LESProperties - dictionary, which contains the model selection and model coefficients. - -SourceFiles - LESModel.C - -\*---------------------------------------------------------------------------*/ - -#ifndef incompressibleLESModel_H -#define incompressibleLESModel_H - -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "incompressible/LES/incompressibleLESdelta/incompressibleLESdelta.H" -#include "fvm.H" -#include "fvc.H" -#include "fvMatrices.H" -#include "incompressible/transportModel/transportModel.H" -#include "bound.H" -#include "autoPtr.H" -#include "runTimeSelectionTables.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class LESModel Declaration -\*---------------------------------------------------------------------------*/ - -class LESModel -: - public turbulenceModel, - public IOdictionary -{ - -protected: - - // Protected data - - Switch printCoeffs_; - dictionary coeffDict_; - - dimensionedScalar kMin_; - - autoPtr<Foam::LESdelta> delta_; - - - // Protected Member Functions - - //- Print model coefficients - virtual void printCoeffs(); - - -private: - - // Private Member Functions - - //- Disallow default bitwise copy construct - LESModel(const LESModel&); - - //- Disallow default bitwise assignment - LESModel& operator=(const LESModel&); - - -public: - - //- Runtime type information - TypeName("LESModel"); - - - // Declare run-time constructor selection table - - declareRunTimeSelectionTable - ( - autoPtr, - LESModel, - dictionary, - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName - ), - (U, phi, transport, turbulenceModelName) - ); - - - // Constructors - - //- Construct from components - LESModel - ( - const word& type, - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName - ); - - - // Selectors - - //- Return a reference to the selected LES model - static autoPtr<LESModel> New - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName - ); - - - //- Destructor - virtual ~LESModel() - {} - - - // Member Functions - - // Access - - //- Const access to the coefficients dictionary, - // which provides info. about choice of models, - // and all related data (particularly model coefficients). - virtual const dictionary& coeffDict() const - { - return coeffDict_; - } - - //- Return the lower allowable limit for k (default: SMALL) - const dimensionedScalar& kMin() const - { - return kMin_; - } - - //- Allow kMin to be changed - dimensionedScalar& kMin() - { - return kMin_; - } - - //- Access function to filter width - virtual const volScalarField& delta() const - { - return delta_(); - } - - - //- Return the SGS viscosity. - virtual tmp<volScalarField> nuSgs() const = 0; - - //- Return the effective viscosity - virtual tmp<volScalarField> nuEff() const - { - return tmp<volScalarField> - ( - new volScalarField("nuEff", nuSgs() + nu()) - ); - } - - //- Return the sub-grid stress tensor. - virtual tmp<volSymmTensorField> B() const = 0; - - - // RAS compatibility functions for the turbulenceModel base class - - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const - { - return nuSgs(); - } - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const - { - return B(); - } - - - //- Correct Eddy-Viscosity and related properties. - // This calls correct(const tmp<volTensorField>& gradU) by supplying - // gradU calculated locally. - virtual void correct(); - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModelDoc.H b/src/turbulenceModels/incompressible/LES/LESModel/LESModelDoc.H deleted file mode 100644 index 9b400e23e..000000000 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModelDoc.H +++ /dev/null @@ -1,32 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -\defgroup grpIcoLESTurbulence Incompressible LES turbulence -@{ - \ingroup grpIcoTurbulence - This group contains incompressible LES models. -@} - -\*---------------------------------------------------------------------------*/ diff --git a/src/turbulenceModels/incompressible/LES/LRRDiffStress/LRRDiffStress.C b/src/turbulenceModels/incompressible/LES/LRRDiffStress/LRRDiffStress.C deleted file mode 100644 index 5fda184be..000000000 --- a/src/turbulenceModels/incompressible/LES/LRRDiffStress/LRRDiffStress.C +++ /dev/null @@ -1,176 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "LRRDiffStress.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(LRRDiffStress, 0); -addToRunTimeSelectionTable(LESModel, LRRDiffStress, dictionary); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void LRRDiffStress::updateSubGridScaleFields(const volScalarField& K) -{ - nuSgs_ = ck_*sqrt(K)*delta(); - nuSgs_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -LRRDiffStress::LRRDiffStress -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, U, phi, transport, turbulenceModelName), - GenSGSStress(U, phi, transport), - - ck_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "ck", - coeffDict_, - 0.09 - ) - ), - c1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "c1", - coeffDict_, - 1.8 - ) - ), - c2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "c2", - coeffDict_, - 0.6 - ) - ) -{ - volScalarField K(0.5*tr(B_)); - bound(K, kMin_); - - updateSubGridScaleFields(K); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void LRRDiffStress::correct(const tmp<volTensorField>& tgradU) -{ - const volTensorField& gradU = tgradU(); - - GenSGSStress::correct(gradU); - - const volSymmTensorField D(symm(gradU)); - - const volSymmTensorField P(-twoSymm(B_ & gradU)); - - volScalarField K(0.5*tr(B_)); - const volScalarField Epsilon(2*nuEff()*magSqr(D)); - - tmp<fvSymmTensorMatrix> BEqn - ( - fvm::ddt(B_) - + fvm::div(phi(), B_) - - fvm::laplacian(DBEff(), B_) - + fvm::Sp(c1_*Epsilon/K, B_) - == - P - - (0.667*(1.0 - c1_)*I)*Epsilon - - c2_*(P - 0.333*I*tr(P)) - - (0.667 - 2*c1_)*I*pow(K, 1.5)/delta() - ); - - BEqn().relax(); - BEqn().solve(); - - // Bounding the component kinetic energies - - forAll(B_, celli) - { - B_[celli].component(symmTensor::XX) = - max(B_[celli].component(symmTensor::XX), kMin_.value()); - B_[celli].component(symmTensor::YY) = - max(B_[celli].component(symmTensor::YY), kMin_.value()); - B_[celli].component(symmTensor::ZZ) = - max(B_[celli].component(symmTensor::ZZ), kMin_.value()); - } - - K = 0.5*tr(B_); - bound(K, kMin_); - - updateSubGridScaleFields(K); -} - - -bool LRRDiffStress::read() -{ - if (GenSGSStress::read()) - { - ck_.readIfPresent(coeffDict()); - c1_.readIfPresent(coeffDict()); - c2_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/LRRDiffStress/LRRDiffStress.H b/src/turbulenceModels/incompressible/LES/LRRDiffStress/LRRDiffStress.H deleted file mode 100644 index a5168b4bf..000000000 --- a/src/turbulenceModels/incompressible/LES/LRRDiffStress/LRRDiffStress.H +++ /dev/null @@ -1,145 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::LESModels::LRRDiffStress - -Group - grpIcoLESTurbulence - -Description - Differential SGS Stress Equation Model for incompressible flows. - - The DSEM uses a model version of the full balance equation for the SGS - stress tensor to simulate the behaviour of B, hence, - \verbatim - d/dt(B) + div(U*B) - div(nuSgs*grad(B)) - = - P - c1*e/k*B - 0.667*(1 - c1)*e*I - c2*(P - 0.333*trP*I) - where - k = 0.5*trB, - epsilon = ce*k^3/2/delta - epsilon/k = ce*k^1/2/delta - P = -(B'L + L'B) - nuEff = ck*sqrt(k)*delta + nu - \endverbatim - - This version from Launder, Rece & Rodi 1975 - -SourceFiles - LRRDiffStress.C - -\*---------------------------------------------------------------------------*/ - -#ifndef LRRDiffStress_H -#define LRRDiffStress_H - -#include "GenSGSStress.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class LRRDiffStress Declaration -\*---------------------------------------------------------------------------*/ - -class LRRDiffStress -: - public GenSGSStress -{ - // Private data - - dimensionedScalar ck_; - dimensionedScalar c1_; - dimensionedScalar c2_; - - - // Private Member Functions - - //- Update sub-grid scale fields - void updateSubGridScaleFields(const volScalarField& K); - - // Disallow default bitwise copy construct and assignment - LRRDiffStress(const LRRDiffStress&); - LRRDiffStress& operator=(const LRRDiffStress&); - - -public: - - //- Runtime type information - TypeName("LRRDiffStress"); - - // Constructors - - //- Construct from components - LRRDiffStress - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~LRRDiffStress() - {} - - - // Member Functions - - //- Return the effective diffusivity for B - tmp<volScalarField> DBEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DBEff", nuSgs_ + nu()) - ); - } - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/Make/files b/src/turbulenceModels/incompressible/LES/Make/files deleted file mode 100644 index 6d4e3cb4d..000000000 --- a/src/turbulenceModels/incompressible/LES/Make/files +++ /dev/null @@ -1,34 +0,0 @@ -incompressibleLESdelta/incompressibleLESdelta.C -vanDriestDelta/vanDriestDelta.C - -LESModel/LESModel.C - -DESModel/DESModel.C - -GenEddyVisc/GenEddyVisc.C -GenSGSStress/GenSGSStress.C - -laminar/laminar.C -SpalartAllmaras/SpalartAllmaras.C -SpalartAllmarasDDES/SpalartAllmarasDDES.C -SpalartAllmarasIDDES/SpalartAllmarasIDDES.C -SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C - -oneEqEddy/oneEqEddy.C -homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C -dynOneEqEddy/dynOneEqEddy.C -Smagorinsky/Smagorinsky.C -homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.C -LRRDiffStress/LRRDiffStress.C -DeardorffDiffStress/DeardorffDiffStress.C -spectEddyVisc/spectEddyVisc.C -dynLagrangian/dynLagrangian.C - -scaleSimilarity/scaleSimilarity.C -mixedSmagorinsky/mixedSmagorinsky.C - -/*Smagorinsky2/Smagorinsky2.C*/ - -kOmegaSSTSAS/kOmegaSSTSAS.C - -LIB = $(FOAM_LIBBIN)/libincompressibleLESModels diff --git a/src/turbulenceModels/incompressible/LES/Make/options b/src/turbulenceModels/incompressible/LES/Make/options deleted file mode 100644 index 2699300b5..000000000 --- a/src/turbulenceModels/incompressible/LES/Make/options +++ /dev/null @@ -1,14 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES/LESfilters/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude - -LIB_LIBS = \ - -lincompressibleTurbulenceModel \ - -lLESdeltas \ - -lLESfilters\ - -lfiniteVolume \ - -lmeshTools diff --git a/src/turbulenceModels/incompressible/LES/Smagorinsky/Smagorinsky.C b/src/turbulenceModels/incompressible/LES/Smagorinsky/Smagorinsky.C deleted file mode 100644 index 9ac283cb5..000000000 --- a/src/turbulenceModels/incompressible/LES/Smagorinsky/Smagorinsky.C +++ /dev/null @@ -1,112 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "Smagorinsky.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(Smagorinsky, 0); -addToRunTimeSelectionTable(LESModel, Smagorinsky, dictionary); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void Smagorinsky::updateSubGridScaleFields(const volTensorField& gradU) -{ - nuSgs_ = ck_*delta()*sqrt(k(gradU)); - nuSgs_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Smagorinsky::Smagorinsky -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, U, phi, transport, turbulenceModelName), - GenEddyVisc(U, phi, transport), - - ck_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "ck", - coeffDict_, - 0.094 - ) - ) -{ - updateSubGridScaleFields(fvc::grad(U)); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Smagorinsky::correct(const tmp<volTensorField>& gradU) -{ - GenEddyVisc::correct(gradU); - updateSubGridScaleFields(gradU()); -} - - -bool Smagorinsky::read() -{ - if (GenEddyVisc::read()) - { - ck_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/Smagorinsky/Smagorinsky.H b/src/turbulenceModels/incompressible/LES/Smagorinsky/Smagorinsky.H deleted file mode 100644 index d2eea980f..000000000 --- a/src/turbulenceModels/incompressible/LES/Smagorinsky/Smagorinsky.H +++ /dev/null @@ -1,147 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::LESModels::Smagorinsky - -Group - grpIcoLESTurbulence - -Description - The Isochoric Smagorinsky Model for incompressible flows. - - Algebraic eddy viscosity SGS model founded on the assumption that - local equilibrium prevails. - Thus, - \verbatim - B = 2/3*k*I - 2*nuSgs*dev(D) - Beff = 2/3*k*I - 2*nuEff*dev(D) - - where - - D = symm(grad(U)); - k = (2*ck/ce)*delta^2*||D||^2 - nuSgs = ck*sqrt(k)*delta - nuEff = nuSgs + nu - \endverbatim - -SourceFiles - Smagorinsky.C - -\*---------------------------------------------------------------------------*/ - -#ifndef Smagorinsky_H -#define Smagorinsky_H - -#include "GenEddyVisc.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class Smagorinsky Declaration -\*---------------------------------------------------------------------------*/ - -class Smagorinsky -: - public GenEddyVisc -{ - // Private data - - dimensionedScalar ck_; - - - // Private Member Functions - - //- Update sub-grid scale fields - void updateSubGridScaleFields(const volTensorField& gradU); - - // Disallow default bitwise copy construct and assignment - Smagorinsky(const Smagorinsky&); - Smagorinsky& operator=(const Smagorinsky&); - - -public: - - //- Runtime type information - TypeName("Smagorinsky"); - - // Constructors - - //- Construct from components - Smagorinsky - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~Smagorinsky() - {} - - - // Member Functions - - //- Return SGS kinetic energy - // calculated from the given velocity gradient - tmp<volScalarField> k(const tmp<volTensorField>& gradU) const - { - return (2.0*ck_/ce_)*sqr(delta())*magSqr(dev(symm(gradU))); - } - - //- Return SGS kinetic energy - virtual tmp<volScalarField> k() const - { - return k(fvc::grad(U())); - } - - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.C b/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.C deleted file mode 100644 index 7564c6c1e..000000000 --- a/src/turbulenceModels/incompressible/LES/Smagorinsky2/Smagorinsky2.C +++ /dev/null @@ -1,147 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "Smagorinsky2.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(Smagorinsky2, 0); -addToRunTimeSelectionTable(LESModel, Smagorinsky2, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Smagorinsky2::Smagorinsky2 -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, U, phi, transport, turbulenceModelName), - Smagorinsky(U, phi, transport), - - cD2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "cD2", - coeffDict_, - 0.02 - ) - ) -{ - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -// Evaluate B (from the definition of an eddy viscosity model) and -// return it. - -tmp<volSymmTensorField> Smagorinsky2::B() const -{ - volSymmTensorField D(dev(symm(fvc::grad(U())))); - - return (((2.0/3.0)*I)*k() - 2.0*nuSgs_*D - (2.0*cD2_)*delta()*(D&D)); -} - - -tmp<fvVectorMatrix> Smagorinsky2::divDevReff -( - volVectorField& U -) const -{ - volTensorField gradU(fvc::grad(U)); - - volSymmTensorField aniNuEff - ( - "aniNuEff", - I*nuEff() + cD2_*delta()*symm(gradU) - ); - - return - ( - - fvm::laplacian(aniNuEff, U) - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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()) - { - cD2.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C deleted file mode 100644 index 9b5414d20..000000000 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C +++ /dev/null @@ -1,463 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "SpalartAllmaras.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(SpalartAllmaras, 0); -addToRunTimeSelectionTable(LESModel, SpalartAllmaras, dictionary); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void SpalartAllmaras::updateSubGridScaleFields() -{ - nuSgs_.internalField() = fv1()*nuTilda_.internalField(); - nuSgs_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -tmp<volScalarField> SpalartAllmaras::fv1() const -{ - const volScalarField chi3("chi3", pow3(nuTilda_/nu())); - return chi3/(chi3 + pow3(Cv1_)); -} - - -tmp<volScalarField> SpalartAllmaras::fv2() const -{ - if (ashfordCorrection_) - { - return 1/pow3(scalar(1) + nuTilda_/(Cv2_*nu())); - } - else - { - const volScalarField chi("chi", nuTilda_/nu()); - return 1.0 - chi/(1.0 + chi*fv1()); - } -} - - -tmp<volScalarField> SpalartAllmaras::fv3() const -{ - if (ashfordCorrection_) - { - const volScalarField chi("chi", nuTilda_/nu()); - const volScalarField chiByCv2(chi/Cv2_); - - return - (scalar(1) + chi*fv1()) - *(1/Cv2_) - *(3*(scalar(1) + chiByCv2) + sqr(chiByCv2)) - /pow3(scalar(1) + chiByCv2); - } - else - { - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "fv3", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("fv3", dimless, 1), - zeroGradientFvPatchScalarField::typeName - ) - ); - } -} - - -tmp<volScalarField> SpalartAllmaras::S(const volTensorField& gradU) const -{ - return sqrt(2.0)*mag(skew(gradU)); -} - - -tmp<volScalarField> SpalartAllmaras::STilda -( - const volScalarField& S, - const volScalarField& dTilda -) const -{ - return fv3()*S + fv2()*nuTilda_/sqr(kappa_*dTilda); -} - - -tmp<volScalarField> SpalartAllmaras::r -( - const volScalarField& visc, - const volScalarField& S, - const volScalarField& dTilda -) const -{ - return min - ( - visc - /( - max - ( - S, - dimensionedScalar("SMALL", S.dimensions(), SMALL) - ) - *sqr(kappa_*dTilda) - + dimensionedScalar - ( - "ROOTVSMALL", - dimensionSet(0, 2 , -1, 0, 0), - ROOTVSMALL - ) - ), - scalar(10) - ); -} - - -tmp<volScalarField> SpalartAllmaras::fw -( - const volScalarField& S, - const volScalarField& dTilda -) const -{ - const volScalarField r(this->r(nuTilda_, S, dTilda)); - const volScalarField g(r + Cw2_*(pow6(r) - r)); - - return g*pow((1 + pow6(Cw3_))/(pow6(g) + pow6(Cw3_)), 1.0/6.0); -} - - -tmp<volScalarField> SpalartAllmaras::dTilda(const volScalarField&) const -{ - tmp<volScalarField> tdTilda(CDES_*delta()); - min(tdTilda().dimensionedInternalField(), tdTilda(), y_); - return tdTilda; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -SpalartAllmaras::SpalartAllmaras -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - DESModel(modelName, U, phi, transport, turbulenceModelName), - - sigmaNut_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaNut", - coeffDict_, - 0.66666 - ) - ), - kappa_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "kappa", - coeffDict_, - 0.41 - ) - ), - Cb1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cb1", - coeffDict_, - 0.1355 - ) - ), - Cb2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cb2", - coeffDict_, - 0.622 - ) - ), - Cv1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cv1", - coeffDict_, - 7.1 - ) - ), - Cv2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cv2", - coeffDict_, - 5.0 - ) - ), - CDES_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "CDES", - coeffDict_, - 0.65 - ) - ), - ck_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "ck", - coeffDict_, - 0.07 - ) - ), - Cw1_(Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_), - Cw2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cw2", - coeffDict_, - 0.3 - ) - ), - Cw3_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cw3", - coeffDict_, - 2.0 - ) - ), - - ashfordCorrection_(coeffDict_.lookupOrDefault("ashfordCorrection", true)), - - y_(wallDist::New(mesh_).y()), - - nuTilda_ - ( - IOobject - ( - "nuTilda", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - nuSgs_ - ( - IOobject - ( - "nuSgs", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ) -{ - updateSubGridScaleFields(); - - if (ashfordCorrection_) - { - Info<< " Employing Ashford correction" << endl; - } -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void SpalartAllmaras::correct(const tmp<volTensorField>& gradU) -{ - LESModel::correct(gradU); - - const volScalarField S(this->S(gradU)); - const volScalarField dTilda(this->dTilda(S)); - const volScalarField STilda(this->STilda(S, dTilda)); - - tmp<fvScalarMatrix> nuTildaEqn - ( - fvm::ddt(nuTilda_) - + fvm::div(phi(), nuTilda_) - - fvm::laplacian - ( - (nuTilda_ + nu())/sigmaNut_, - nuTilda_, - "laplacian(DnuTildaEff,nuTilda)" - ) - - Cb2_/sigmaNut_*magSqr(fvc::grad(nuTilda_)) - == - Cb1_*STilda*nuTilda_ - - fvm::Sp(Cw1_*fw(STilda, dTilda)*nuTilda_/sqr(dTilda), nuTilda_) - ); - - nuTildaEqn().relax(); - nuTildaEqn().solve(); - - bound(nuTilda_, dimensionedScalar("zero", nuTilda_.dimensions(), 0.0)); - nuTilda_.correctBoundaryConditions(); - - updateSubGridScaleFields(); -} - - -tmp<volScalarField> SpalartAllmaras::k() const -{ - return sqr(nuSgs()/ck_/dTilda(S(fvc::grad(U())))); -} - - -tmp<volScalarField> SpalartAllmaras::epsilon() const -{ - return 2*nuEff()*magSqr(symm(fvc::grad(U()))); -} - - -tmp<volSymmTensorField> SpalartAllmaras::B() const -{ - return ((2.0/3.0)*I)*k() - nuSgs()*twoSymm(fvc::grad(U())); -} - - -tmp<volSymmTensorField> SpalartAllmaras::devReff() const -{ - return -nuEff()*dev(twoSymm(fvc::grad(U()))); -} - - -tmp<fvVectorMatrix> SpalartAllmaras::divDevReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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 (LESModel::read()) - { - sigmaNut_.readIfPresent(coeffDict()); - kappa_.readIfPresent(*this); - - Cb1_.readIfPresent(coeffDict()); - Cb2_.readIfPresent(coeffDict()); - Cv1_.readIfPresent(coeffDict()); - Cv2_.readIfPresent(coeffDict()); - CDES_.readIfPresent(coeffDict()); - ck_.readIfPresent(coeffDict()); - Cw1_ = Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_; - Cw2_.readIfPresent(coeffDict()); - Cw3_.readIfPresent(coeffDict()); - - ashfordCorrection_.readIfPresent("ashfordCorrection", coeffDict()); - - return true; - } - else - { - return false; - } -} - - -tmp<volScalarField> SpalartAllmaras::LESRegion() const -{ - tmp<volScalarField> tLESRegion - ( - new volScalarField - ( - IOobject - ( - "DES::LESRegion", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - neg(dTilda(S(fvc::grad(U_))) - y_) - ) - ); - - return tLESRegion; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/dynLagrangian/dynLagrangian.C b/src/turbulenceModels/incompressible/LES/dynLagrangian/dynLagrangian.C deleted file mode 100644 index 0112352d0..000000000 --- a/src/turbulenceModels/incompressible/LES/dynLagrangian/dynLagrangian.C +++ /dev/null @@ -1,197 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "dynLagrangian.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(dynLagrangian, 0); -addToRunTimeSelectionTable(LESModel, dynLagrangian, dictionary); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void dynLagrangian::updateSubGridScaleFields -( - const tmp<volTensorField>& gradU -) -{ - nuSgs_ = (flm_/fmm_)*sqr(delta())*mag(dev(symm(gradU))); - nuSgs_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -dynLagrangian::dynLagrangian -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, U, phi, transport, turbulenceModelName), - GenEddyVisc(U, phi, transport), - - flm_ - ( - IOobject - ( - "flm", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - fmm_ - ( - IOobject - ( - "fmm", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - theta_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "theta", - coeffDict_, - 1.5 - ) - ), - simpleFilter_(U.mesh()), - filterPtr_(LESfilter::New(U.mesh(), coeffDict())), - filter_(filterPtr_()), - flm0_("flm0", flm_.dimensions(), 0.0), - fmm0_("fmm0", fmm_.dimensions(), VSMALL) -{ - updateSubGridScaleFields(fvc::grad(U)); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void dynLagrangian::correct(const tmp<volTensorField>& gradU) -{ - LESModel::correct(gradU); - - volSymmTensorField S(dev(symm(gradU()))); - - volScalarField magS(mag(S)); - - volVectorField Uf(filter_(U())); - - volSymmTensorField Sf(dev(symm(fvc::grad(Uf)))); - - volScalarField magSf(mag(Sf)); - - volSymmTensorField L(dev(filter_(sqr(U())) - (sqr(filter_(U()))))); - - volSymmTensorField M(2.0*sqr(delta())*(filter_(magS*S) - 4.0*magSf*Sf)); - - volScalarField invT - ( - (1.0/(theta_.value()*delta()))*pow(flm_*fmm_, 1.0/8.0) - ); - - volScalarField LM(L && M); - - fvScalarMatrix flmEqn - ( - fvm::ddt(flm_) - + fvm::div(phi(), flm_) - == - invT*LM - - fvm::Sp(invT, flm_) - ); - - flmEqn.relax(); - flmEqn.solve(); - - bound(flm_, flm0_); - - volScalarField MM(M && M); - - fvScalarMatrix fmmEqn - ( - fvm::ddt(fmm_) - + fvm::div(phi(), fmm_) - == - invT*MM - - fvm::Sp(invT, fmm_) - ); - - fmmEqn.relax(); - fmmEqn.solve(); - - bound(fmm_, fmm0_); - - updateSubGridScaleFields(gradU); -} - - -bool dynLagrangian::read() -{ - if (GenEddyVisc::read()) - { - filter_.read(coeffDict()); - theta_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/dynLagrangian/dynLagrangian.H b/src/turbulenceModels/incompressible/LES/dynLagrangian/dynLagrangian.H deleted file mode 100644 index 3500c6880..000000000 --- a/src/turbulenceModels/incompressible/LES/dynLagrangian/dynLagrangian.H +++ /dev/null @@ -1,196 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::LESModels::dynLagrangian - -Group - grpIcoLESTurbulence - -Description - Dynamic eddy-viscosity model with Lagrangian averaging for incompressible - flow - - \verbatim - B = 2/3*k*I - 2*nuSgs*dev(D) - Beff = 2/3*k*I - 2*nuEff*dev(D) - - where - - D = symm(grad(U)) - nuSgs = (flm/fmm)*delta^2*sqrt(2)*|D| - nuEff = nuSgs + nu - - Two relaxation equations are used to evaluate flm and fmm: - - d/dt(flm) + div(U*flm) - = - (1/T)*(L && M - flm) - - d/dt(fmm) + div(U*fmm) - = - (1/T)*(M && M - fmm) - - where - - L = F(U.U) - F(U).F(U) - M = 2.0 delta^2 (F(|D|.D) - 4 F(|D|).F(D)) - T = 1.5*delta*(flm.fmm)^(-1.0/8.0) - - \endverbatim - - Reference: - \verbatim - "A Lagrangian dynamic subgrid-scale model of turbulence" - Charles Meneveau, - Thomas Lund, - William Cabot, - J. Fluid Mech (1996), vol 319, pp. 353-385 - \endverbatim - -SourceFiles - dynLagrangian.C - -\*---------------------------------------------------------------------------*/ - -#ifndef dynLagrangian_H -#define dynLagrangian_H - -#include "GenEddyVisc.H" -#include "simpleFilter.H" -#include "LESfilter.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class dynLagrangian Declaration -\*---------------------------------------------------------------------------*/ - -class dynLagrangian -: - public GenEddyVisc -{ - // Private data - - volScalarField flm_; - volScalarField fmm_; - - dimensionedScalar theta_; - - simpleFilter simpleFilter_; - autoPtr<LESfilter> filterPtr_; - LESfilter& filter_; - - dimensionedScalar flm0_; - dimensionedScalar fmm0_; - - - // Private Member Functions - - //- Update sub-grid scale fields - void updateSubGridScaleFields - ( - const tmp<volTensorField>& gradU - ); - - // Disallow default bitwise copy construct and assignment - dynLagrangian(const dynLagrangian&); - dynLagrangian& operator=(const dynLagrangian&); - - -public: - - //- Runtime type information - TypeName("dynLagrangian"); - - // Constructors - - //- Construct from components - dynLagrangian - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~dynLagrangian() - {} - - - // Member Functions - - //- Return SGS kinetic energy - tmp<volScalarField> k(const tmp<volTensorField>& gradU) const - { - return - pow(2.0*flm_/fmm_, 2.0/3.0) - * pow(ce_, -2.0/3.0) - * sqr(delta())*magSqr(dev(symm(gradU))); - } - - //- Return SGS kinetic energy - virtual tmp<volScalarField> k() const - { - return k(fvc::grad(U())); - } - - //- Return the effective diffusivity for k - tmp<volScalarField> DkEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DkEff", nuSgs_ + nu()) - ); - } - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C deleted file mode 100644 index 269a204c5..000000000 --- a/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C +++ /dev/null @@ -1,196 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "dynOneEqEddy.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(dynOneEqEddy, 0); -addToRunTimeSelectionTable(LESModel, dynOneEqEddy, dictionary); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void dynOneEqEddy::updateSubGridScaleFields -( - const volSymmTensorField& D, - const volScalarField& KK -) -{ - nuSgs_ = ck(D, KK)*sqrt(k_)*delta(); - nuSgs_.correctBoundaryConditions(); -} - - -volScalarField dynOneEqEddy::ck -( - const volSymmTensorField& D, - const volScalarField& KK -) const -{ - const volSymmTensorField LL - ( - simpleFilter_(dev(filter_(sqr(U())) - (sqr(filter_(U()))))) - ); - - const volSymmTensorField MM - ( - simpleFilter_(-2.0*delta()*sqrt(KK)*filter_(D)) - ); - - const volScalarField ck - ( - simpleFilter_(0.5*(LL && MM)) - /( - simpleFilter_(magSqr(MM)) - + dimensionedScalar("small", sqr(MM.dimensions()), VSMALL) - ) - ); - - tmp<volScalarField> tfld = 0.5*(mag(ck) + ck); - return tfld(); -} - - -volScalarField dynOneEqEddy::ce -( - const volSymmTensorField& D, - const volScalarField& KK -) const -{ - const volScalarField ce - ( - simpleFilter_(nuEff()*(filter_(magSqr(D)) - magSqr(filter_(D)))) - /simpleFilter_(pow(KK, 1.5)/(2.0*delta())) - ); - - tmp<volScalarField> tfld = 0.5*(mag(ce) + ce); - return tfld(); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -dynOneEqEddy::dynOneEqEddy -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, U, phi, transport, turbulenceModelName), - GenEddyVisc(U, phi, transport), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - simpleFilter_(U.mesh()), - filterPtr_(LESfilter::New(U.mesh(), coeffDict())), - filter_(filterPtr_()) -{ - bound(k_, kMin_); - - const volScalarField KK(0.5*(filter_(magSqr(U)) - magSqr(filter_(U)))); - updateSubGridScaleFields(symm(fvc::grad(U)), KK); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void dynOneEqEddy::correct(const tmp<volTensorField>& gradU) -{ - LESModel::correct(gradU); - - const volSymmTensorField D(symm(gradU)); - - volScalarField KK(0.5*(filter_(magSqr(U())) - magSqr(filter_(U())))); - KK.max(dimensionedScalar("small", KK.dimensions(), SMALL)); - - const volScalarField P(2.0*nuSgs_*magSqr(D)); - - tmp<fvScalarMatrix> kEqn - ( - fvm::ddt(k_) - + fvm::div(phi(), k_) - - fvm::laplacian(DkEff(), k_) - == - P - - fvm::Sp(ce(D, KK)*sqrt(k_)/delta(), k_) - ); - - kEqn().relax(); - kEqn().solve(); - - bound(k_, kMin_); - - updateSubGridScaleFields(D, KK); -} - - -bool dynOneEqEddy::read() -{ - if (GenEddyVisc::read()) - { - filter_.read(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.H b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.H deleted file mode 100644 index 1a084a6ce..000000000 --- a/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.H +++ /dev/null @@ -1,184 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::LESModels::dynOneEqEddy - -Group - grpIcoLESTurbulence - -Description - Localised Dynamic One Equation Eddy Viscosity Model for incompressible - flows - - Eddy viscosity SGS model using a modeled balance equation to simulate - the behaviour of k, hence - \verbatim - d/dt(k) + div(U*k) - div(nuSgs*grad(k)) - = - -B*L - ce*rho*k^3/2/delta - and - B = 2/3*k*I - 2*nuSgs*dev(D) - Beff = 2/3*k*I - 2*nuEff*dev(D) - where - nuSgs = cD*delta^2*||D|| - nuEff = nuSgs + nu - \endverbatim - - A dynamic procedure is here applied to evaluate ck and ce - \verbatim - ck=<L.M>/<M.M> - and - ce=<e*m>/<m*m> - where - K = 0.5*(F(U.U) - F(U).F(U)) - L = (F(U*U) - F(U)*F(U) - 0.33*K*I) - M = delta*(F(sqrt(k)*D) - 2*sqrt(K + filter(k))*F(D)) - m = pow(K + F(k), 3.0/2.0)/(2*delta) - F(pow(k, 3.0/2.0))/delta - e = 2*delta*ck*(F(sqrt(k)*(D && D)) - 2*sqrt(K + F(k))*(F(D) && F(D)))/ - \endverbatim - -SourceFiles - dynOneEqEddy.C - -\*---------------------------------------------------------------------------*/ - -#ifndef dynOneEqEddy_H -#define dynOneEqEddy_H - -#include "GenEddyVisc.H" -#include "simpleFilter.H" -#include "LESfilter.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class dynOneEqEddy Declaration -\*---------------------------------------------------------------------------*/ - -class dynOneEqEddy -: - public GenEddyVisc -{ - // Private data - - volScalarField k_; - - simpleFilter simpleFilter_; - autoPtr<LESfilter> filterPtr_; - LESfilter& filter_; - - - // Private Member Functions - - //- Update sub-grid scale fields - void updateSubGridScaleFields - ( - const volSymmTensorField& D, - const volScalarField& KK - ); - - //- Calculate ck, ce by filtering the velocity field U. - volScalarField ck - ( - const volSymmTensorField&, - const volScalarField& - ) const; - - volScalarField ce - ( - const volSymmTensorField&, - const volScalarField& - ) const; - - // Disallow default bitwise copy construct and assignment - dynOneEqEddy(const dynOneEqEddy&); - dynOneEqEddy& operator=(const dynOneEqEddy&); - - -public: - - //- Runtime type information - TypeName("dynOneEqEddy"); - - // Constructors - - //- Construct from components - dynOneEqEddy - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~dynOneEqEddy() - {} - - - // Member Functions - - //- Return SGS kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Return the effective diffusivity for k - tmp<volScalarField> DkEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DkEff", nuSgs_ + nu()) - ); - } - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C b/src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C deleted file mode 100644 index 61fc5b550..000000000 --- a/src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.C +++ /dev/null @@ -1,209 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "homogeneousDynOneEqEddy.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(homogeneousDynOneEqEddy, 0); -addToRunTimeSelectionTable(LESModel, homogeneousDynOneEqEddy, dictionary); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void homogeneousDynOneEqEddy::updateSubGridScaleFields -( - const volSymmTensorField& D -) -{ - nuSgs_ = ck(D)*sqrt(k_)*delta(); - nuSgs_.correctBoundaryConditions(); -} - - -dimensionedScalar homogeneousDynOneEqEddy::ck -( - const volSymmTensorField& D -) const -{ - tmp<volScalarField> KK = 0.5*(filter_(magSqr(U())) - magSqr(filter_(U()))); - - const volSymmTensorField MM - ( - delta()*(filter_(sqrt(k_)*D) - 2*sqrt(KK + filter_(k_))*filter_(D)) - ); - - dimensionedScalar MMMM = average(magSqr(MM)); - - if (MMMM.value() > VSMALL) - { - tmp<volSymmTensorField> LL = dev(filter_(sqr(U())) - sqr(filter_(U()))); - - return average(LL && MM)/MMMM; - } - else - { - return 0.0; - } -} - - -dimensionedScalar homogeneousDynOneEqEddy::ce -( - const volSymmTensorField& D -) const -{ - const volScalarField KK - ( - 0.5*(filter_(magSqr(U())) - magSqr(filter_(U()))) - ); - - const volScalarField mm - ( - pow(KK + filter_(k_), 1.5)/(2*delta()) - filter_(pow(k_, 1.5))/delta() - ); - - dimensionedScalar mmmm = average(magSqr(mm)); - - if (mmmm.value() > VSMALL) - { - tmp<volScalarField> ee = - ( - 2*delta()*ck(D) - * ( - filter_(sqrt(k_)*magSqr(D)) - - 2*sqrt(KK + filter_(k_))*magSqr(filter_(D)) - ) - ); - - return average(ee*mm)/mmmm; - } - else - { - return 0.0; - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -homogeneousDynOneEqEddy::homogeneousDynOneEqEddy -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, U, phi, transport, turbulenceModelName), - GenEddyVisc(U, phi, transport), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - filterPtr_(LESfilter::New(U.mesh(), coeffDict())), - filter_(filterPtr_()) -{ - bound(k_, kMin_); - - updateSubGridScaleFields(symm(fvc::grad(U))); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void homogeneousDynOneEqEddy::correct(const tmp<volTensorField>& tgradU) -{ - const volTensorField& gradU = tgradU(); - - GenEddyVisc::correct(gradU); - - const volSymmTensorField D(symm(gradU)); - - const volScalarField P(2.0*nuSgs_*magSqr(D)); - - tmp<fvScalarMatrix> kEqn - ( - fvm::ddt(k_) - + fvm::div(phi(), k_) - - fvm::laplacian(DkEff(), k_) - == - P - - fvm::Sp(ce(D)*sqrt(k_)/delta(), k_) - ); - - kEqn().relax(); - kEqn().solve(); - - bound(k_, kMin_); - - updateSubGridScaleFields(D); -} - - -bool homogeneousDynOneEqEddy::read() -{ - if (GenEddyVisc::read()) - { - filter_.read(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.H b/src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.H deleted file mode 100644 index ea196dbe1..000000000 --- a/src/turbulenceModels/incompressible/LES/homogeneousDynOneEqEddy/homogeneousDynOneEqEddy.H +++ /dev/null @@ -1,162 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::LESModels::homogeneousDynOneEqEddy - -Group - grpIcoLESTurbulence - -Description - One Equation Eddy Viscosity Model for incompressible flows. - - Eddy viscosity SGS model using a modeled balance equation to simulate - the behaviour of k. - - Thus - \verbatim - d/dt(k) + div(U*k) - div(nuSgs*grad(k)) - = - -B*L - ce*k^3/2/delta - - and - - B = 2/3*k*I - 2*nuSgs*dev(D) - Beff = 2/3*k*I - 2*nuEff*dev(D) - - where - - D = symm(grad(U)); - nuSgs = ck*sqrt(k)*delta - nuEff = nuSgs + nu - \endverbatim - -SourceFiles - homogeneousDynOneEqEddy.C - -\*---------------------------------------------------------------------------*/ - -#ifndef homogeneousDynOneEqEddy_H -#define homogeneousDynOneEqEddy_H - -#include "GenEddyVisc.H" -#include "LESfilter.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class homogeneousDynOneEqEddy Declaration -\*---------------------------------------------------------------------------*/ - -class homogeneousDynOneEqEddy -: - public GenEddyVisc -{ - // Private data - - volScalarField k_; - - autoPtr<LESfilter> filterPtr_; - LESfilter& filter_; - - - // Private Member Functions - - //- Update sub-grid scale fields - void updateSubGridScaleFields(const volSymmTensorField& D); - - //- Calculate ck, ce by filtering the velocity field U. - dimensionedScalar ck(const volSymmTensorField& D) const; - dimensionedScalar ce(const volSymmTensorField& D) const; - - // Disallow default bitwise copy construct and assignment - homogeneousDynOneEqEddy(const homogeneousDynOneEqEddy&); - homogeneousDynOneEqEddy& operator=(const homogeneousDynOneEqEddy&); - - -public: - - //- Runtime type information - TypeName("homogeneousDynOneEqEddy"); - - // Constructors - - //- Construct from components - homogeneousDynOneEqEddy - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~homogeneousDynOneEqEddy() - {} - - - // Member Functions - - //- Return SGS kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Return the effective diffusivity for k - tmp<volScalarField> DkEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DkEff", nuSgs_ + nu()) - ); - } - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.C b/src/turbulenceModels/incompressible/LES/homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.C deleted file mode 100644 index 989458619..000000000 --- a/src/turbulenceModels/incompressible/LES/homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.C +++ /dev/null @@ -1,181 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "homogeneousDynSmagorinsky.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(homogeneousDynSmagorinsky, 0); -addToRunTimeSelectionTable(LESModel, homogeneousDynSmagorinsky, dictionary); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void homogeneousDynSmagorinsky::updateSubGridScaleFields -( - const volSymmTensorField& D -) -{ - nuSgs_ = cD(D)*sqr(delta())*sqrt(magSqr(D)); - nuSgs_.correctBoundaryConditions(); -} - - -dimensionedScalar homogeneousDynSmagorinsky::cD -( - const volSymmTensorField& D -) const -{ - const volSymmTensorField MM - ( - sqr(delta())*(filter_(mag(D)*(D)) - 4*mag(filter_(D))*filter_(D)) - ); - - dimensionedScalar MMMM = average(magSqr(MM)); - - if (MMMM.value() > VSMALL) - { - tmp<volSymmTensorField> LL = - dev(filter_(sqr(U())) - (sqr(filter_(U())))); - - return 0.5*average(LL && MM)/MMMM; - } - else - { - return 0.0; - } -} - - -dimensionedScalar homogeneousDynSmagorinsky::cI -( - const volSymmTensorField& D -) const -{ - const volScalarField mm - ( - sqr(delta())*(4*sqr(mag(filter_(D))) - filter_(sqr(mag(D)))) - ); - - dimensionedScalar mmmm = average(magSqr(mm)); - - if (mmmm.value() > VSMALL) - { - tmp<volScalarField> KK = - 0.5*(filter_(magSqr(U())) - magSqr(filter_(U()))); - - return average(KK*mm)/mmmm; - } - else - { - return 0.0; - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -homogeneousDynSmagorinsky::homogeneousDynSmagorinsky -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, U, phi, transport, turbulenceModelName), - GenEddyVisc(U, phi, transport), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - filterPtr_(LESfilter::New(U.mesh(), coeffDict())), - filter_(filterPtr_()) -{ - bound(k_, kMin_); - - updateSubGridScaleFields(dev(symm(fvc::grad(U)))); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void homogeneousDynSmagorinsky::correct(const tmp<volTensorField>& gradU) -{ - LESModel::correct(gradU); - - const volSymmTensorField D(dev(symm(gradU))); - - k_ = cI(D)*sqr(delta())*magSqr(D); - bound(k_, kMin_); - - updateSubGridScaleFields(D); -} - - -bool homogeneousDynSmagorinsky::read() -{ - if (GenEddyVisc::read()) - { - filter_.read(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.H b/src/turbulenceModels/incompressible/LES/homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.H deleted file mode 100644 index e2ef1b362..000000000 --- a/src/turbulenceModels/incompressible/LES/homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.H +++ /dev/null @@ -1,166 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::LESModels::homogeneousDynSmagorinsky - -Group - grpIcoLESTurbulence - -Description - The Isochoric homogeneous dynamic Smagorinsky Model for - incompressible flows. - - Algebraic eddy viscosity SGS model founded on the assumption that - local equilibrium prevails. - Thus, - \verbatim - B = 2/3*k*I - 2*nuSgs*dev(D) - Beff = 2/3*k*I - 2*nuEff*dev(D) - - where - - k = cI*delta^2*||D||^2 - nuSgs = cD*delta^2*||D|| - nuEff = nuSgs + nu - - In the dynamic version of the choric Smagorinsky model - the coefficients cI and cD are calculated during the simulation, - - cI=<K*m>/<m*m> - - and - - cD=1/2*<L.M>/<M.M>, - - where - - K = 0.5*(F(U.U) - F(U).F(U)) - m = delta^2*(4*||F(D)||^2 - F(||D||^2)) - L = dev(F(U*U) - F(U)*F(U)) - M = delta^2*(F(||D||*dev(D)) - 4*||F(D)||*F(dev(D))) - - The averaging <...> is over the whole domain, i.e. homogeneous turbulence - is assumed - \endverbatim - -SourceFiles - homogeneousDynSmagorinsky.C - -\*---------------------------------------------------------------------------*/ - -#ifndef homogeneousDynSmagorinsky_H -#define homogeneousDynSmagorinsky_H - -#include "Smagorinsky.H" -#include "LESfilter.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class homogeneousDynSmagorinsky Declaration -\*---------------------------------------------------------------------------*/ - -class homogeneousDynSmagorinsky -: - public GenEddyVisc -{ - // Private data - - volScalarField k_; - - autoPtr<LESfilter> filterPtr_; - LESfilter& filter_; - - - // Private Member Functions - - //- Update sub-grid scale fields - void updateSubGridScaleFields(const volSymmTensorField& D); - - //- Calculate coefficients cD, cI from filtering velocity field - dimensionedScalar cD(const volSymmTensorField& D) const; - dimensionedScalar cI(const volSymmTensorField& D) const; - - // Disallow default bitwise copy construct and assignment - homogeneousDynSmagorinsky(const homogeneousDynSmagorinsky&); - homogeneousDynSmagorinsky& operator=(const homogeneousDynSmagorinsky&); - - -public: - - //- Runtime type information - TypeName("homogeneousDynSmagorinsky"); - - // Constructors - - //- Construct from components - homogeneousDynSmagorinsky - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~homogeneousDynSmagorinsky() - {} - - - // Member Functions - - //- Return SGS kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/incompressibleLESdelta/incompressibleLESdelta.C b/src/turbulenceModels/incompressible/LES/incompressibleLESdelta/incompressibleLESdelta.C deleted file mode 100644 index daa17b640..000000000 --- a/src/turbulenceModels/incompressible/LES/incompressibleLESdelta/incompressibleLESdelta.C +++ /dev/null @@ -1,66 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "incompressibleLESdelta.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineRunTimeSelectionTable(LESdelta, dictionary); - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -LESdelta::LESdelta(const word& name, const fvMesh& mesh) -: - foamLESdelta(name, mesh) -{} - - -// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // - -Foam::autoPtr<foamLESdelta> LESdelta::New -( - const word& name, - const fvMesh& mesh, - const dictionary& dict -) -{ - return foamLESdelta::New(name, mesh, dict, *dictionaryConstructorTablePtr_); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/incompressibleLESdelta/incompressibleLESdelta.H b/src/turbulenceModels/incompressible/LES/incompressibleLESdelta/incompressibleLESdelta.H deleted file mode 100644 index ca1d5240f..000000000 --- a/src/turbulenceModels/incompressible/LES/incompressibleLESdelta/incompressibleLESdelta.H +++ /dev/null @@ -1,109 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::LESdelta - -Description - Abstract base class for incompressible LES deltas - -SourceFiles - incompressibleLESdelta.C - -\*---------------------------------------------------------------------------*/ - -#ifndef incompressibleLESdelta_H -#define incompressibleLESdelta_H - -#include "LESdelta.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// To avoid macro problems typedef scoped class -typedef Foam::LESdelta foamLESdelta; - -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class LESdelta Declaration -\*---------------------------------------------------------------------------*/ - -class LESdelta -: - public foamLESdelta -{ - -public: - - // Declare run-time constructor selection table - - declareRunTimeSelectionTable - ( - autoPtr, - foamLESdelta, - dictionary, - ( - const word& name, - const fvMesh& mesh, - const dictionary& LESdeltaDict - ), - (name, mesh, LESdeltaDict) - ); - - // Constructors - - //- Construct from name and mesh - LESdelta(const word& name, const fvMesh& mesh); - - - // Selectors - - //- Return a reference to the selected LES delta - static autoPtr<foamLESdelta> New - ( - const word& name, - const fvMesh& mesh, - const dictionary& dict - ); - - - //- Destructor - virtual ~LESdelta() - {} -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C deleted file mode 100644 index ad7daf84a..000000000 --- a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C +++ /dev/null @@ -1,492 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "kOmegaSSTSAS.H" -#include "addToRunTimeSelectionTable.H" -#include "wallDist.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(kOmegaSSTSAS, 0); -addToRunTimeSelectionTable(LESModel, kOmegaSSTSAS, dictionary); - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -void kOmegaSSTSAS::updateSubGridScaleFields(const volScalarField& S2) -{ - nuSgs_ == a1_*k_/max(a1_*omega_, F2()*sqrt(S2)); - nuSgs_.correctBoundaryConditions(); -} - - -tmp<volScalarField> kOmegaSSTSAS::F1(const volScalarField& CDkOmega) const -{ - tmp<volScalarField> CDkOmegaPlus = max - ( - CDkOmega, - dimensionedScalar("1.0e-10", dimless/sqr(dimTime), 1.0e-10) - ); - - tmp<volScalarField> arg1 = min - ( - min - ( - max - ( - (scalar(1)/betaStar_)*sqrt(k_)/(omega_*y_), - scalar(500)*nu()/(sqr(y_)*omega_) - ), - (4*alphaOmega2_)*k_/(CDkOmegaPlus*sqr(y_)) - ), - scalar(10) - ); - - return tanh(pow4(arg1)); -} - - -tmp<volScalarField> kOmegaSSTSAS::F2() const -{ - tmp<volScalarField> arg2 = min - ( - max - ( - (scalar(2)/betaStar_)*sqrt(k_)/(omega_*y_), - scalar(500)*nu()/(sqr(y_)*omega_) - ), - scalar(100) - ); - - return tanh(sqr(arg2)); -} - - -tmp<volScalarField> kOmegaSSTSAS::Lvk2 -( - const volScalarField& S2 -) const -{ - return max - ( - kappa_*sqrt(S2) - /( - mag(fvc::laplacian(U())) - + dimensionedScalar - ( - "ROOTVSMALL", - dimensionSet(0, -1 , -1, 0, 0, 0, 0), - ROOTVSMALL - ) - ), - Cs_*delta() - ); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -kOmegaSSTSAS::kOmegaSSTSAS -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, U, phi, transport, turbulenceModelName), - - alphaK1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "alphaK1", - coeffDict_, - 0.85034 - ) - ), - alphaK2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "alphaK2", - coeffDict_, - 1.0 - ) - ), - alphaOmega1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "alphaOmega1", - coeffDict_, - 0.5 - ) - ), - alphaOmega2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "alphaOmega2", - coeffDict_, - 0.85616 - ) - ), - gamma1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "gamma1", - coeffDict_, - 0.5532 - ) - ), - gamma2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "gamma2", - coeffDict_, - 0.4403 - ) - ), - beta1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "beta1", - coeffDict_, - 0.075 - ) - ), - beta2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "beta2", - coeffDict_, - 0.0828 - ) - ), - betaStar_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "betaStar", - coeffDict_, - 0.09 - ) - ), - a1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "a1", - coeffDict_, - 0.31 - ) - ), - c1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "c1", - coeffDict_, - 10.0 - ) - ), - Cs_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cs", - coeffDict_, - 0.262 - ) - ), - alphaPhi_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "alphaPhi", - coeffDict_, - 0.666667 - ) - ), - zetaTilda2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "zetaTilda2", - coeffDict_, - 1.755 - ) - ), - FSAS_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "FSAS", - coeffDict_, - 1.25 - ) - ), - - omegaMin_("omegaMin", dimless/dimTime, SMALL), - - Cmu_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cmu", - coeffDict_, - 0.09 - ) - ), - kappa_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "kappa", - *this, - 0.41 - ) - ), - - y_(wallDist::New(mesh_).y()), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - omega_ - ( - IOobject - ( - "omega", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - nuSgs_ - ( - IOobject - ( - "nuSgs", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ) -{ - omegaMin_.readIfPresent(*this); - - bound(k_, kMin_); - bound(omega_, omegaMin_); - - updateSubGridScaleFields(2.0*magSqr(symm(fvc::grad(U)))); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void kOmegaSSTSAS::correct(const tmp<volTensorField>& gradU) -{ - LESModel::correct(gradU); - - volScalarField S2(2.0*magSqr(symm(gradU()))); - gradU.clear(); - - volVectorField gradK(fvc::grad(k_)); - volVectorField gradOmega(fvc::grad(omega_)); - volScalarField L(sqrt(k_)/(pow025(Cmu_)*omega_)); - volScalarField CDkOmega((2.0*alphaOmega2_)*(gradK & gradOmega)/omega_); - volScalarField F1(this->F1(CDkOmega)); - volScalarField G(GName(), nuSgs_*S2); - - // Turbulent kinetic energy equation - { - fvScalarMatrix kEqn - ( - fvm::ddt(k_) - + fvm::div(phi(), k_) - - fvm::laplacian(DkEff(F1), k_) - == - min(G, c1_*betaStar_*k_*omega_) - - fvm::Sp(betaStar_*omega_, k_) - ); - - kEqn.relax(); - kEqn.solve(); - } - bound(k_, kMin_); - - tmp<volScalarField> grad_omega_k = max - ( - magSqr(gradOmega)/sqr(omega_), - magSqr(gradK)/sqr(k_) - ); - - // Turbulent frequency equation - { - fvScalarMatrix omegaEqn - ( - fvm::ddt(omega_) - + fvm::div(phi(), omega_) - - fvm::laplacian(DomegaEff(F1), omega_) - == - gamma(F1)*S2 - - fvm::Sp(beta(F1)*omega_, omega_) - - fvm::SuSp // cross diffusion term - ( - (F1 - scalar(1))*CDkOmega/omega_, - omega_ - ) - + FSAS_ - *max - ( - dimensionedScalar("zero",dimensionSet(0, 0, -2, 0, 0), 0.0), - zetaTilda2_*kappa_*S2*sqr(L/Lvk2(S2)) - - 2.0/alphaPhi_*k_*grad_omega_k - ) - ); - - omegaEqn.relax(); - omegaEqn.solve(); - } - bound(omega_, omegaMin_); - - updateSubGridScaleFields(S2); -} - - -tmp<volScalarField> kOmegaSSTSAS::epsilon() const -{ - return 2.0*nuEff()*magSqr(symm(fvc::grad(U()))); -} - - -tmp<volSymmTensorField> kOmegaSSTSAS::B() const -{ - return ((2.0/3.0)*I)*k() - nuSgs()*twoSymm(fvc::grad(U())); -} - - -tmp<volSymmTensorField> kOmegaSSTSAS::devReff() const -{ - return -nuEff()*dev(twoSymm(fvc::grad(U()))); -} - - -tmp<fvVectorMatrix> kOmegaSSTSAS::divDevReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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)))) - ); -} - - -bool kOmegaSSTSAS::read() -{ - if (LESModel::read()) - { - alphaK1_.readIfPresent(coeffDict()); - alphaK2_.readIfPresent(coeffDict()); - alphaOmega1_.readIfPresent(coeffDict()); - alphaOmega2_.readIfPresent(coeffDict()); - gamma1_.readIfPresent(coeffDict()); - gamma2_.readIfPresent(coeffDict()); - beta1_.readIfPresent(coeffDict()); - beta2_.readIfPresent(coeffDict()); - betaStar_.readIfPresent(coeffDict()); - a1_.readIfPresent(coeffDict()); - c1_.readIfPresent(coeffDict()); - Cs_.readIfPresent(coeffDict()); - alphaPhi_.readIfPresent(coeffDict()); - zetaTilda2_.readIfPresent(coeffDict()); - FSAS_.readIfPresent(coeffDict()); - - omegaMin_.readIfPresent(*this); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H deleted file mode 100644 index b10a0e9ed..000000000 --- a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H +++ /dev/null @@ -1,292 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::LESModels::kOmegaSSTSAS - -Group - grpIcoLESTurbulence - -Description - kOmegaSSTSAS LES turbulence model for incompressible flows - based on: - - "Evaluation of the SST-SAS model: channel flow, asymmetric diffuser - and axi-symmetric hill". - European Conference on Computational Fluid Dynamics ECCOMAS CFD 2006. - Lars Davidson - - - The first term of the Qsas expression is corrected following: - - DESider A European Effort on Hybrid RANS-LES Modelling: - Results of the European-Union Funded Project, 2004 - 2007 - (Notes on Numerical Fluid Mechanics and Multidisciplinary Design). - Chapter 2, section 8 Formulation of the Scale-Adaptive Simulation (SAS) - Model during the DESIDER Project. Published in Springer-Verlag Berlin - Heidelberg 2009. - F. R. Menter and Y. Egorov. - - -SourceFiles - kOmegaSSTSAS.C - -\*---------------------------------------------------------------------------*/ - -#ifndef kOmegaSSTSAS_H -#define kOmegaSSTSAS_H - -#include "LESModel.H" -#include "volFields.H" -#include "wallDist.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class kOmegaSSTSAS Declaration -\*---------------------------------------------------------------------------*/ - -class kOmegaSSTSAS -: - public LESModel -{ - // Private Member Functions - - //- Update sub-grid scale fields - void updateSubGridScaleFields(const volScalarField& D); - - // Disallow default bitwise copy construct and assignment - kOmegaSSTSAS(const kOmegaSSTSAS&); - kOmegaSSTSAS& operator=(const kOmegaSSTSAS&); - - -protected: - - // Protected data - - // Model constants - - dimensionedScalar alphaK1_; - dimensionedScalar alphaK2_; - - dimensionedScalar alphaOmega1_; - dimensionedScalar alphaOmega2_; - - dimensionedScalar gamma1_; - dimensionedScalar gamma2_; - - dimensionedScalar beta1_; - dimensionedScalar beta2_; - - dimensionedScalar betaStar_; - - dimensionedScalar a1_; - dimensionedScalar c1_; - dimensionedScalar Cs_; - - dimensionedScalar alphaPhi_; - dimensionedScalar zetaTilda2_; - dimensionedScalar FSAS_; - - dimensionedScalar omegaMin_; - - dimensionedScalar Cmu_; - dimensionedScalar kappa_; - - - // Fields - - //- Wall distance - // Note: different to wall distance in parent RASModel - // which is for near-wall cells only - const volScalarField& y_; - - volScalarField k_; - volScalarField omega_; - volScalarField nuSgs_; - - - // Protected Member Functions - - tmp<volScalarField> Lvk2 - ( - const volScalarField& S2 - ) const; - - tmp<volScalarField> F1(const volScalarField& CDkOmega) const; - tmp<volScalarField> F2() const; - - tmp<volScalarField> blend - ( - const volScalarField& F1, - const dimensionedScalar& psi1, - const dimensionedScalar& psi2 - ) const - { - return F1*(psi1 - psi2) + psi2; - } - - tmp<volScalarField> alphaK - ( - const volScalarField& F1 - ) const - { - return blend(F1, alphaK1_, alphaK2_); - } - - tmp<volScalarField> alphaOmega - ( - const volScalarField& F1 - ) const - { - return blend(F1, alphaOmega1_, alphaOmega2_); - } - - tmp<volScalarField> beta - ( - const volScalarField& F1 - ) const - { - return blend(F1, beta1_, beta2_); - } - - tmp<volScalarField> gamma - ( - const volScalarField& F1 - ) const - { - return blend(F1, gamma1_, gamma2_); - } - - -public: - - //- Runtime type information - TypeName("kOmegaSSTSAS"); - - - // Constructors - - //- Construct from components - kOmegaSSTSAS - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~kOmegaSSTSAS() - {} - - - // Member Functions - - //- Return SGS kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Return omega - virtual tmp<volScalarField> omega() const - { - return omega_; - } - - //- Return the effective diffusivity for k - tmp<volScalarField> DkEff(const volScalarField& F1) const - { - return tmp<volScalarField> - ( - new volScalarField("DkEff", alphaK(F1)*nuSgs_ + nu()) - ); - } - - //- Return the effective diffusivity for omega - tmp<volScalarField> DomegaEff(const volScalarField& F1) const - { - return tmp<volScalarField> - ( - new volScalarField("DomegaEff", alphaOmega(F1)*nuSgs_ + nu()) - ); - } - - //- Return sub-grid disipation rate - virtual tmp<volScalarField> epsilon() const; - - //- Return SGS viscosity - virtual tmp<volScalarField> nuSgs() const - { - return nuSgs_; - } - - //- Return the sub-grid stress tensor. - virtual tmp<volSymmTensorField> B() const; - - //- Return the effective sub-grid turbulence stress tensor - // including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - - //- Solve the turbulence equations (k-w) and correct the turbulence - // viscosity - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/laminar/laminar.C b/src/turbulenceModels/incompressible/LES/laminar/laminar.C deleted file mode 100644 index b0176e804..000000000 --- a/src/turbulenceModels/incompressible/LES/laminar/laminar.C +++ /dev/null @@ -1,183 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "laminar.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(laminar, 0); -addToRunTimeSelectionTable(LESModel, laminar, dictionary); - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -laminar::laminar -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, U, phi, transport, turbulenceModelName) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volScalarField> laminar::k() const -{ - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("k", sqr(U().dimensions()), 0.0) - ) - ); -} - -tmp<volScalarField> laminar::epsilon() const -{ - return 2*nu()*magSqr(symm(fvc::grad(U()))); -} - -tmp<volScalarField> laminar::nuSgs() const -{ - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "nuSgs", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("nuSgs", nu()().dimensions(), 0.0) - ) - ); -} - -tmp<volScalarField> laminar::nuEff() const -{ - return tmp<volScalarField> - ( - new volScalarField("nuEff", nu()) - ); -} - - -tmp<volSymmTensorField> laminar::B() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "B", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedSymmTensor - ( - "B", sqr(U().dimensions()), symmTensor::zero - ) - ) - ); -} - - -tmp<volSymmTensorField> laminar::devReff() const -{ - return -nu()*dev(twoSymm(fvc::grad(U()))); -} - - -tmp<fvVectorMatrix> laminar::divDevReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nu(), U) - - fvc::div(nu()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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 LESModel::read(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/laminar/laminar.H b/src/turbulenceModels/incompressible/LES/laminar/laminar.H deleted file mode 100644 index 7a7f501d4..000000000 --- a/src/turbulenceModels/incompressible/LES/laminar/laminar.H +++ /dev/null @@ -1,138 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::LESModels::laminar - -Description - LES model for laminar incompressible flow. - It simply returns laminar properties. - -SourceFiles - laminar.C - -\*---------------------------------------------------------------------------*/ - -#ifndef lesLaminar_H -#define lesLaminar_H - -#include "LESModel.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class laminar Declaration -\*---------------------------------------------------------------------------*/ - -class laminar -: - public LESModel -{ - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - laminar(const laminar&); - laminar& operator=(const laminar&); - - -public: - - //- Runtime type information - TypeName("laminar"); - - - // Constructors - - //- Construct from components - laminar - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~laminar() - {} - - - // Member Functions - - //- Return SGS kinetic energy - virtual tmp<volScalarField> k() const; - - //- Return sub-grid disipation rate - virtual tmp<volScalarField> epsilon() const; - - //- Return SGS viscosity - virtual tmp<volScalarField> nuSgs() const; - - //- Return the effective viscosity - virtual tmp<volScalarField> nuEff() const; - - //- Return the sub-grid stress tensor B. - virtual tmp<volSymmTensorField> B() const; - - //- Return the effective sub-grid turbulence stress tensor - // including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - - //- Read LESProperties dictionary - bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.C b/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.C deleted file mode 100644 index 7e82fe9fd..000000000 --- a/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.C +++ /dev/null @@ -1,160 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "mixedSmagorinsky.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(mixedSmagorinsky, 0); -addToRunTimeSelectionTable(LESModel, mixedSmagorinsky, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -mixedSmagorinsky::mixedSmagorinsky -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, U, phi, transport, turbulenceModelName), - scaleSimilarity(U, phi, transport), - Smagorinsky(U, phi, transport) -{ - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volScalarField> mixedSmagorinsky::k() const -{ - return - ( - scaleSimilarity::k() - + Smagorinsky::k() - ); -} - - -tmp<volScalarField> mixedSmagorinsky::epsilon() const -{ - return - ( - scaleSimilarity::epsilon() - + Smagorinsky::epsilon() - ); -} - - -tmp<volSymmTensorField> mixedSmagorinsky::B() const -{ - return - ( - scaleSimilarity::B() - + Smagorinsky::B() - ); -} - - -tmp<volSymmTensorField> mixedSmagorinsky::devReff() const -{ - return - ( - scaleSimilarity::devReff() - + Smagorinsky::devReff() - ); -} - - -tmp<fvVectorMatrix> mixedSmagorinsky::divDevReff -( - volVectorField& U -) const -{ - return - ( - scaleSimilarity::divDevReff(U) - + Smagorinsky::divDevReff(U) - ); -} - - -tmp<fvVectorMatrix> mixedSmagorinsky::divDevRhoReff -( - const volScalarField& rho, - volVectorField& U -) const -{ - return - ( - scaleSimilarity::divDevRhoReff(rho, U) - + Smagorinsky::divDevRhoReff(rho, U) - ); -} - - -void mixedSmagorinsky::correct(const tmp<volTensorField>& gradU) -{ - scaleSimilarity::correct(gradU); - Smagorinsky::correct(gradU); -} - - -bool mixedSmagorinsky::read() -{ - if (LESModel::read()) - { - scaleSimilarity::read(); - Smagorinsky::read(); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.H b/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.H deleted file mode 100644 index 8a30f9dea..000000000 --- a/src/turbulenceModels/incompressible/LES/mixedSmagorinsky/mixedSmagorinsky.H +++ /dev/null @@ -1,167 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::LESModels::mixedSmagorinsky - -Group - grpIcoLESTurbulence - -Description - The mixed Isochoric Smagorinsky Model for incompressible flows. - - The mixed model is a linear combination of an eddy viscosity model - (Smagorinsky) with a scale similarity model. Hence - \verbatim - B = (L + C) + R = (F(v*v) - F(v)*F(v)) + R - \endverbatim - - The algebraic eddy viscosity SGS model is founded on the assumption - that local equilibrium prevails, hence - \verbatim - R = 2/3*k*I - 2*nuEff*dev(D) - where - k = cI*delta^2*||D||^2 - nuEff = ck*sqrt(k)*delta + nu - \endverbatim - - The Leonard and cross contributions are incorporated - by adding, - \verbatim - + div(((filter(U*U) - filter(U)*filter(U)) - - 0.333*I*tr(filter(U*U) - filter(U)*filter(U)))) - + div((filter(U*epsilon) - filter(U)*filter(epsilon))) - \endverbatim - to the rhs. of the equations. - -SourceFiles - mixedSmagorinsky.C - -\*---------------------------------------------------------------------------*/ - -#ifndef mixedSmagorinsky_H -#define mixedSmagorinsky_H - -#include "scaleSimilarity.H" -#include "Smagorinsky.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class mixedSmagorinsky Declaration -\*---------------------------------------------------------------------------*/ - -class mixedSmagorinsky -: - public scaleSimilarity, - public Smagorinsky -{ - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - mixedSmagorinsky(const mixedSmagorinsky&); - mixedSmagorinsky& operator=(const mixedSmagorinsky&); - -public: - - //- Runtime type information - TypeName("mixedSmagorinsky"); - - - // Constructors - - //- Construct from components - mixedSmagorinsky - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~mixedSmagorinsky() - {} - - - // Member Functions - - //- Return the SGS turbulent kinetic energy. - virtual tmp<volScalarField> k() const; - - //- Return the SGS turbulent disipation rate. - virtual tmp<volScalarField> epsilon() const; - - //- Return the SGS viscosity. - virtual tmp<volScalarField> nuSgs() const - { - return nuSgs_; - } - - //- Return the sub-grid stress tensor. - virtual tmp<volSymmTensorField> B() const; - - //- Return the effective sub-grid turbulence stress tensor - // including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/oneEqEddy/oneEqEddy.C b/src/turbulenceModels/incompressible/LES/oneEqEddy/oneEqEddy.C deleted file mode 100644 index 2e95004a2..000000000 --- a/src/turbulenceModels/incompressible/LES/oneEqEddy/oneEqEddy.C +++ /dev/null @@ -1,146 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "oneEqEddy.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(oneEqEddy, 0); -addToRunTimeSelectionTable(LESModel, oneEqEddy, dictionary); - - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void oneEqEddy::updateSubGridScaleFields() -{ - nuSgs_ = ck_*sqrt(k_)*delta(); - nuSgs_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -oneEqEddy::oneEqEddy -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, U, phi, transport, turbulenceModelName), - GenEddyVisc(U, phi, transport), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - ck_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "ck", - coeffDict_, - 0.094 - ) - ) -{ - bound(k_, kMin_); - - updateSubGridScaleFields(); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void oneEqEddy::correct(const tmp<volTensorField>& gradU) -{ - GenEddyVisc::correct(gradU); - - volScalarField G(GName(), 2.0*nuSgs_*magSqr(symm(gradU))); - - tmp<fvScalarMatrix> kEqn - ( - fvm::ddt(k_) - + fvm::div(phi(), k_) - - fvm::laplacian(DkEff(), k_) - == - G - - fvm::Sp(ce_*sqrt(k_)/delta(), k_) - ); - - kEqn().relax(); - kEqn().solve(); - - bound(k_, kMin_); - - updateSubGridScaleFields(); -} - - -bool oneEqEddy::read() -{ - if (GenEddyVisc::read()) - { - ck_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/oneEqEddy/oneEqEddy.H b/src/turbulenceModels/incompressible/LES/oneEqEddy/oneEqEddy.H deleted file mode 100644 index fef3986d4..000000000 --- a/src/turbulenceModels/incompressible/LES/oneEqEddy/oneEqEddy.H +++ /dev/null @@ -1,154 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::LESModels::oneEqEddy - -Group - grpIcoLESTurbulence - -Description - One Equation Eddy Viscosity Model for incompressible flows - - Eddy viscosity SGS model using a modeled balance equation to simulate the - behaviour of k, hence, - \verbatim - d/dt(k) + div(U*k) - div(nuEff*grad(k)) - = - -D:B - ce*k^(3/2)/delta - - and - - B = 2/3*k*I - 2*nuSgs*dev(D) - Beff = 2/3*k*I - 2*nuEff*dev(D) - - where - - D = symm(grad(U)); - nuSgs = ck*sqrt(k)*delta - nuEff = nuSgs + nu - \endverbatim - -SourceFiles - oneEqEddy.C - -\*---------------------------------------------------------------------------*/ - -#ifndef oneEqEddy_H -#define oneEqEddy_H - -#include "GenEddyVisc.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class oneEqEddy Declaration -\*---------------------------------------------------------------------------*/ - -class oneEqEddy -: - public GenEddyVisc -{ - // Private data - - volScalarField k_; - - dimensionedScalar ck_; - - - // Private Member Functions - - //- Update sub-grid scale fields - void updateSubGridScaleFields(); - - // Disallow default bitwise copy construct and assignment - oneEqEddy(const oneEqEddy&); - oneEqEddy& operator=(const oneEqEddy&); - - -public: - - //- Runtime type information - TypeName("oneEqEddy"); - - // Constructors - - //- Construct from components - oneEqEddy - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~oneEqEddy() - {} - - - // Member Functions - - //- Return SGS kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Return the effective diffusivity for k - tmp<volScalarField> DkEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DkEff", nuSgs_ + nu()) - ); - } - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>& gradU); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C deleted file mode 100644 index 12c6b4f31..000000000 --- a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C +++ /dev/null @@ -1,129 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "scaleSimilarity.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(scaleSimilarity, 0); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -scaleSimilarity::scaleSimilarity -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, U, phi, transport, turbulenceModelName), - filterPtr_(LESfilter::New(U.mesh(), coeffDict())), - filter_(filterPtr_()) -{ - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volScalarField> scaleSimilarity::k() const -{ - return(0.5*(filter_(magSqr(U())) - magSqr(filter_(U())))); -} - - -tmp<volScalarField> scaleSimilarity::epsilon() const -{ - tmp<volSymmTensorField> D = symm(fvc::grad(U())); - - return((filter_(sqr(U())) - sqr(filter_(U()))) && D); -} - - -tmp<volSymmTensorField> scaleSimilarity::B() const -{ - return(filter_(sqr(U())) - sqr(filter_(U()))); -} - - -tmp<volSymmTensorField> scaleSimilarity::devReff() const -{ - return dev(B()); -} - - -tmp<fvVectorMatrix> scaleSimilarity::divDevReff(volVectorField& U) const -{ - return fvm::Su(fvc::div(devReff()), U); -} - - -tmp<fvVectorMatrix> scaleSimilarity::divDevRhoReff -( - const volScalarField& rho, - volVectorField& U -) const -{ - return fvm::Su(fvc::div(rho*devReff()), U); -} - - -void scaleSimilarity::correct(const tmp<volTensorField>&) -{} - - -bool scaleSimilarity::read() -{ - if (LESModel::read()) - { - filter_.read(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H deleted file mode 100644 index 94e9367fe..000000000 --- a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H +++ /dev/null @@ -1,146 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::LESModels::scaleSimilarity - -Group - grpIcoLESTurbulence - -Description - General base class for all scale similarity models - for incompressible flows. - - Since such models do not work without additional eddy viscosity terms, - this class must be combined with an eddy viscosity model of some form. - -SourceFiles - scaleSimilarity.C - -\*---------------------------------------------------------------------------*/ - -#ifndef scaleSimilarity_H -#define scaleSimilarity_H - -#include "LESModel.H" -#include "LESfilter.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class scaleSimilarity Declaration -\*---------------------------------------------------------------------------*/ - -class scaleSimilarity -: - virtual public LESModel -{ - // Private data - - autoPtr<LESfilter> filterPtr_; - LESfilter& filter_; - - - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - scaleSimilarity(const scaleSimilarity&); - scaleSimilarity& operator=(const scaleSimilarity&); - - -public: - - //- Runtime type information - TypeName("scaleSimilarity"); - - // Constructors - - //- Construct from components - scaleSimilarity - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~scaleSimilarity() - {} - - - // Member Functions - - //- Return the SGS turbulent kinetic energy. - virtual tmp<volScalarField> k() const; - - //- Return the SGS turbulent dissipation. - virtual tmp<volScalarField> epsilon() const; - - //- Return the sub-grid stress tensor. - virtual tmp<volSymmTensorField> B() const; - - //- Return the effective sub-grid turbulence stress tensor - // including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>&); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/spectEddyVisc/spectEddyVisc.C b/src/turbulenceModels/incompressible/LES/spectEddyVisc/spectEddyVisc.C deleted file mode 100644 index 80ffc16c5..000000000 --- a/src/turbulenceModels/incompressible/LES/spectEddyVisc/spectEddyVisc.C +++ /dev/null @@ -1,174 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "spectEddyVisc.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(spectEddyVisc, 0); -addToRunTimeSelectionTable(LESModel, spectEddyVisc, dictionary); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void spectEddyVisc::updateSubGridScaleFields(const volTensorField& gradU) -{ - const volScalarField Re(sqr(delta())*mag(symm(gradU))/nu()); - for (label i=0; i<5; i++) - { - nuSgs_ = - nu() - /( - scalar(1) - - exp(-cB_*pow(nu()/(nuSgs_ + nu()), 1.0/3.0)*pow(Re, -2.0/3.0)) - ); - } - - nuSgs_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -spectEddyVisc::spectEddyVisc -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - LESModel(modelName, U, phi, transport, turbulenceModelName), - GenEddyVisc(U, phi, transport), - - cB_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "cB", - coeffDict_, - 8.22 - ) - ), - cK1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "cK1", - coeffDict_, - 0.83 - ) - ), - cK2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "cK2", - coeffDict_, - 1.03 - ) - ), - cK3_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "cK3", - coeffDict_, - 4.75 - ) - ), - cK4_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "cK4", - coeffDict_, - 2.55 - ) - ) -{ - printCoeffs(); - - updateSubGridScaleFields(fvc::grad(U)); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volScalarField> spectEddyVisc::k() const -{ - const volScalarField eps(2*nuEff()*magSqr(symm(fvc::grad(U())))); - - return - cK1_*pow(delta()*eps, 2.0/3.0) - *exp(-cK2_*pow(delta(), -4.0/3.0)*nu()/pow(eps, 1.0/3.0)) - - cK3_*sqrt(eps*nu()) - *erfc(cK4_*pow(delta(), -2.0/3.0)*sqrt(nu())*pow(eps, -1.0/6.0)); -} - - -void spectEddyVisc::correct(const tmp<volTensorField>& gradU) -{ - GenEddyVisc::correct(gradU); - updateSubGridScaleFields(gradU()); -} - - -bool spectEddyVisc::read() -{ - if (GenEddyVisc::read()) - { - cB_.readIfPresent(coeffDict()); - cK1_.readIfPresent(coeffDict()); - cK2_.readIfPresent(coeffDict()); - cK3_.readIfPresent(coeffDict()); - cK4_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/LES/spectEddyVisc/spectEddyVisc.H b/src/turbulenceModels/incompressible/LES/spectEddyVisc/spectEddyVisc.H deleted file mode 100644 index 7428f5667..000000000 --- a/src/turbulenceModels/incompressible/LES/spectEddyVisc/spectEddyVisc.H +++ /dev/null @@ -1,144 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::LESModels::spectEddyVisc - -Group - grpIcoLESTurbulence - -Description - The Isochoric spectral Eddy Viscosity Model for incompressible flows. - - Algebraic eddy viscosity SGS model founded on the assumption that - local equilibrium prevail and that viscous effects may be of importance. - - Thus, - \verbatim - B = 2/3*k*I - 2*nuSgs*dev(D) - Beff = 2/3*k*I - 2*nuEff*dev(D) - - where - - k = cK1*delta^(2/3)*eps^(2/3)*exp(-cK2*delta^(4/3)*nu*eps^(-1/3)) - - ck3*sqrt(eps*nu)*erfc(ck4*delta^(-2/3)*sqrt(nu)*eps^(-1/6))) - - nuEff = nu/(1 - exp(-cB*pow((nu/nuEff), 1.0/3.0)*pow(Re, -2.0/3.0))) - nuSgs = nuEff - nu - - Re = delta^2*mag(D)/nu - \endverbatim - -SourceFiles - spectEddyVisc.C - -\*---------------------------------------------------------------------------*/ - -#ifndef spectEddyVisc_H -#define spectEddyVisc_H - -#include "GenEddyVisc.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class spectEddyVisc Declaration -\*---------------------------------------------------------------------------*/ - -class spectEddyVisc -: - public GenEddyVisc -{ - // Private data - - dimensionedScalar cB_; - dimensionedScalar cK1_; - dimensionedScalar cK2_; - dimensionedScalar cK3_; - dimensionedScalar cK4_; - - - // Private Member Functions - - //- Update sub-grid scale fields - void updateSubGridScaleFields(const volTensorField& gradU); - - // Disallow default bitwise copy construct and assignment - spectEddyVisc(const spectEddyVisc&); - spectEddyVisc& operator=(const spectEddyVisc&); - - -public: - - //- Runtime type information - TypeName("spectEddyVisc"); - - // Constructors - - // Construct from components - spectEddyVisc - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~spectEddyVisc() - {} - - - // Member Functions - - //- Return SGS kinetic energy - virtual tmp<volScalarField> k() const; - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp<volTensorField>&); - - //- Read LESProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/LRR/LRR.C b/src/turbulenceModels/incompressible/RAS/LRR/LRR.C deleted file mode 100644 index 18d5f5522..000000000 --- a/src/turbulenceModels/incompressible/RAS/LRR/LRR.C +++ /dev/null @@ -1,475 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "LRR.H" -#include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" - -#include "backwardsCompatibilityWallFunctions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(LRR, 0); -addToRunTimeSelectionTable(RASModel, LRR, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -LRR::LRR -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - RASModel(modelName, U, phi, transport, turbulenceModelName), - - Cmu_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cmu", - coeffDict_, - 0.09 - ) - ), - Clrr1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Clrr1", - coeffDict_, - 1.8 - ) - ), - Clrr2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Clrr2", - coeffDict_, - 0.6 - ) - ), - C1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C1", - coeffDict_, - 1.44 - ) - ), - C2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C2", - coeffDict_, - 1.92 - ) - ), - Cs_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cs", - coeffDict_, - 0.25 - ) - ), - Ceps_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Ceps", - coeffDict_, - 0.15 - ) - ), - sigmaEps_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaEps", - coeffDict_, - 1.3 - ) - ), - couplingFactor_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "couplingFactor", - coeffDict_, - 0.0 - ) - ), - - R_ - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateR("R", mesh_) - ), - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateK("k", mesh_) - ), - epsilon_ - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateEpsilon("epsilon", mesh_) - ), - nut_ - ( - IOobject - ( - "nut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateNut("nut", mesh_) - ) -{ - if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0) - { - FatalErrorIn - ( - "LRR::LRR" - "(const volVectorField& U, const surfaceScalarField& phi," - "transportModel& transport)" - ) << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" << nl - << exit(FatalError); - } - - bound(k_, kMin_); - bound(epsilon_, epsilonMin_); - - nut_ = Cmu_*sqr(k_)/epsilon_; - nut_.correctBoundaryConditions(); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> LRR::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - R_ - nu()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> LRR::divDevReff(volVectorField& U) const -{ - if (couplingFactor_.value() > 0.0) - { - return - ( - fvc::div(R_ + couplingFactor_*nut_*fvc::grad(U), "div(R)") - + fvc::laplacian - ( - (1.0 - couplingFactor_)*nut_, - U, - "laplacian(nuEff,U)" - ) - - fvm::laplacian(nuEff(), U) - ); - } - else - { - return - ( - fvc::div(R_) - + fvc::laplacian(nut_, U, "laplacian(nuEff,U)") - - fvm::laplacian(nuEff(), U) - ); - } -} - - -tmp<fvVectorMatrix> 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()) - { - Cmu_.readIfPresent(coeffDict()); - Clrr1_.readIfPresent(coeffDict()); - Clrr2_.readIfPresent(coeffDict()); - C1_.readIfPresent(coeffDict()); - C2_.readIfPresent(coeffDict()); - Cs_.readIfPresent(coeffDict()); - Ceps_.readIfPresent(coeffDict()); - sigmaEps_.readIfPresent(coeffDict()); - - couplingFactor_.readIfPresent(coeffDict()); - - if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0) - { - FatalErrorIn("LRR::read()") - << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" - << exit(FatalError); - } - - return true; - } - else - { - return false; - } -} - - -void LRR::correct() -{ - RASModel::correct(); - - if (!turbulence_) - { - return; - } - - volSymmTensorField P(-twoSymm(R_ & fvc::grad(U_))); - volScalarField G(GName(), 0.5*mag(tr(P))); - - // Update epsilon and G at the wall - epsilon_.boundaryField().updateCoeffs(); - - // Dissipation equation - tmp<fvScalarMatrix> epsEqn - ( - fvm::ddt(epsilon_) - + fvm::div(phi_, epsilon_) - //- fvm::laplacian(Ceps*(K/epsilon_)*R, epsilon_) - - fvm::laplacian(DepsilonEff(), epsilon_) - == - C1_*G*epsilon_/k_ - - fvm::Sp(C2_*epsilon_/k_, epsilon_) - ); - - epsEqn().relax(); - - epsEqn().boundaryManipulate(epsilon_.boundaryField()); - - solve(epsEqn); - bound(epsilon_, epsilonMin_); - - - // Reynolds stress equation - - const fvPatchList& patches = mesh_.boundary(); - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA<wallFvPatch>(curPatch)) - { - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - P[faceCelli] *= min - ( - G[faceCelli]/(0.5*mag(tr(P[faceCelli])) + SMALL), - 1.0 - ); - } - } - } - - - tmp<fvSymmTensorMatrix> REqn - ( - fvm::ddt(R_) - + fvm::div(phi_, R_) - //- fvm::laplacian(Cs*(k_/epsilon_)*R_, R_) - - fvm::laplacian(DREff(), R_) - + fvm::Sp(Clrr1_*epsilon_/k_, R_) - == - P - - (2.0/3.0*(1 - Clrr1_)*I)*epsilon_ - - Clrr2_*dev(P) - ); - - REqn().relax(); - solve(REqn); - - R_.max - ( - dimensionedSymmTensor - ( - "zero", - R_.dimensions(), - symmTensor - ( - kMin_.value(), -GREAT, -GREAT, - kMin_.value(), -GREAT, - kMin_.value() - ) - ) - ); - - k_ = 0.5*tr(R_); - bound(k_, kMin_); - - - // Re-calculate viscosity - nut_ = Cmu_*sqr(k_)/epsilon_; - nut_.correctBoundaryConditions(); - - - // Correct wall shear stresses - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA<wallFvPatch>(curPatch)) - { - symmTensorField& Rw = R_.boundaryField()[patchi]; - - const scalarField& nutw = nut_.boundaryField()[patchi]; - - const vectorField snGradU(U_.boundaryField()[patchi].snGrad()); - - const vectorField& faceAreas - = mesh_.Sf().boundaryField()[patchi]; - - const scalarField& magFaceAreas - = mesh_.magSf().boundaryField()[patchi]; - - forAll(curPatch, facei) - { - // Calculate near-wall velocity gradient - tensor gradUw - = (faceAreas[facei]/magFaceAreas[facei])*snGradU[facei]; - - // Calculate near-wall shear-stress tensor - tensor tauw = -nutw[facei]*2*symm(gradUw); - - // Reset the shear components of the stress tensor - Rw[facei].xy() = tauw.xy(); - Rw[facei].xz() = tauw.xz(); - Rw[facei].yz() = tauw.yz(); - } - } - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/LRR/LRR.H b/src/turbulenceModels/incompressible/RAS/LRR/LRR.H deleted file mode 100644 index 24cf36c58..000000000 --- a/src/turbulenceModels/incompressible/RAS/LRR/LRR.H +++ /dev/null @@ -1,204 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::RASModels::LRR - -Group - grpIcoRASTurbulence - -Description - Launder, Reece and Rodi Reynolds-stress turbulence model for - incompressible flows. - - The default model coefficients correspond to the following: - \verbatim - LRRCoeffs - { - Cmu 0.09; - Clrr1 1.8; - Clrr2 0.6; - C1 1.44; - C2 1.92; - Cs 0.25; - Ceps 0.15; - sigmaEps 1.3; - couplingFactor 0.0; // only for incompressible - } - \endverbatim - -SourceFiles - LRR.C - -\*---------------------------------------------------------------------------*/ - -#ifndef LRR_H -#define LRR_H - -#include "RASModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class LRR Declaration -\*---------------------------------------------------------------------------*/ - -class LRR -: - public RASModel -{ - -protected: - - // Protected data - - // Model coefficients - - dimensionedScalar Cmu_; - - dimensionedScalar Clrr1_; - dimensionedScalar Clrr2_; - - dimensionedScalar C1_; - dimensionedScalar C2_; - dimensionedScalar Cs_; - dimensionedScalar Ceps_; - dimensionedScalar sigmaEps_; - - dimensionedScalar couplingFactor_; - - - // Fields - - volSymmTensorField R_; - volScalarField k_; - volScalarField epsilon_; - volScalarField nut_; - - -public: - - //- Runtime type information - TypeName("LRR"); - - // Constructors - - //- Construct from components - LRR - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~LRR() - {} - - - // Member Functions - - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const - { - return nut_; - } - - //- Return the effective diffusivity for R - tmp<volScalarField> DREff() const - { - return tmp<volScalarField> - ( - new volScalarField("DREff", nut_ + nu()) - ); - } - - //- Return the effective diffusivity for epsilon - tmp<volScalarField> DepsilonEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu()) - ); - } - - //- Return the turbulence kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp<volScalarField> epsilon() const - { - return epsilon_; - } - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const - { - return R_; - } - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C deleted file mode 100644 index b8d55d9b3..000000000 --- a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ /dev/null @@ -1,527 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "LaunderGibsonRSTM.H" -#include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" - -#include "backwardsCompatibilityWallFunctions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(LaunderGibsonRSTM, 0); -addToRunTimeSelectionTable(RASModel, LaunderGibsonRSTM, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -LaunderGibsonRSTM::LaunderGibsonRSTM -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - RASModel(modelName, U, phi, transport, turbulenceModelName), - - Cmu_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cmu", - coeffDict_, - 0.09 - ) - ), - kappa_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "kappa", - coeffDict_, - 0.41 - ) - ), - Clg1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Clg1", - coeffDict_, - 1.8 - ) - ), - Clg2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Clg2", - coeffDict_, - 0.6 - ) - ), - C1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C1", - coeffDict_, - 1.44 - ) - ), - C2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C2", - coeffDict_, - 1.92 - ) - ), - Cs_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cs", - coeffDict_, - 0.25 - ) - ), - Ceps_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Ceps", - coeffDict_, - 0.15 - ) - ), - sigmaR_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaR", - coeffDict_, - 0.81967 - ) - ), - sigmaEps_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaEps", - coeffDict_, - 1.3 - ) - ), - C1Ref_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C1Ref", - coeffDict_, - 0.5 - ) - ), - C2Ref_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C2Ref", - coeffDict_, - 0.3 - ) - ), - couplingFactor_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "couplingFactor", - coeffDict_, - 0.0 - ) - ), - - n_(wallDist::New(mesh_).n()), - y_(wallDist::New(mesh_).y()), - - R_ - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateR("R", mesh_) - ), - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateK("k", mesh_) - ), - epsilon_ - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateEpsilon("epsilon", mesh_) - ), - nut_ - ( - IOobject - ( - "nut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateNut("nut", mesh_) - ) -{ - bound(k_, kMin_); - bound(epsilon_, epsilonMin_); - - nut_ = Cmu_*sqr(k_)/epsilon_; - nut_.correctBoundaryConditions(); - - if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0) - { - FatalErrorIn - ( - "LaunderGibsonRSTM::LaunderGibsonRSTM" - "(const volVectorField& U, const surfaceScalarField& phi," - "transportModel& transport)" - ) << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" << nl - << exit(FatalError); - } - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> LaunderGibsonRSTM::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - R_ - nu()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> LaunderGibsonRSTM::divDevReff(volVectorField& U) const -{ - if (couplingFactor_.value() > 0.0) - { - return - ( - fvc::div(R_ + couplingFactor_*nut_*fvc::grad(U), "div(R)") - + fvc::laplacian - ( - (1.0 - couplingFactor_)*nut_, - U, - "laplacian(nuEff,U)" - ) - - fvm::laplacian(nuEff(), U) - ); - } - else - { - return - ( - fvc::div(R_) - + fvc::laplacian(nut_, U, "laplacian(nuEff,U)") - - fvm::laplacian(nuEff(), U) - ); - } -} - - -tmp<fvVectorMatrix> 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()) - { - Cmu_.readIfPresent(coeffDict()); - kappa_.readIfPresent(coeffDict()); - Clg1_.readIfPresent(coeffDict()); - Clg2_.readIfPresent(coeffDict()); - C1_.readIfPresent(coeffDict()); - C2_.readIfPresent(coeffDict()); - Cs_.readIfPresent(coeffDict()); - Ceps_.readIfPresent(coeffDict()); - sigmaR_.readIfPresent(coeffDict()); - sigmaEps_.readIfPresent(coeffDict()); - C1Ref_.readIfPresent(coeffDict()); - C2Ref_.readIfPresent(coeffDict()); - - couplingFactor_.readIfPresent(coeffDict()); - - if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0) - { - FatalErrorIn("LaunderGibsonRSTM::read()") - << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" - << exit(FatalError); - } - - return true; - } - else - { - return false; - } -} - - -void LaunderGibsonRSTM::correct() -{ - RASModel::correct(); - - if (!turbulence_) - { - return; - } - - volSymmTensorField P(-twoSymm(R_ & fvc::grad(U_))); - volScalarField G(GName(), 0.5*mag(tr(P))); - - // Update epsilon and G at the wall - epsilon_.boundaryField().updateCoeffs(); - - // Dissipation equation - tmp<fvScalarMatrix> epsEqn - ( - fvm::ddt(epsilon_) - + fvm::div(phi_, epsilon_) - //- fvm::laplacian(Ceps*(k_/epsilon_)*R_, epsilon_) - - fvm::laplacian(DepsilonEff(), epsilon_) - == - C1_*G*epsilon_/k_ - - fvm::Sp(C2_*epsilon_/k_, epsilon_) - ); - - epsEqn().relax(); - - epsEqn().boundaryManipulate(epsilon_.boundaryField()); - - solve(epsEqn); - bound(epsilon_, epsilonMin_); - - - // Reynolds stress equation - - const fvPatchList& patches = mesh_.boundary(); - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA<wallFvPatch>(curPatch)) - { - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - P[faceCelli] *= - min(G[faceCelli]/(0.5*mag(tr(P[faceCelli])) + SMALL), 1.0); - } - } - } - - const volSymmTensorField reflect - ( - C1Ref_*epsilon_/k_*R_ - C2Ref_*Clg2_*dev(P) - ); - - tmp<fvSymmTensorMatrix> REqn - ( - fvm::ddt(R_) - + fvm::div(phi_, R_) - //- fvm::laplacian(Cs*(k_/epsilon_)*R_, R_) - - fvm::laplacian(DREff(), R_) - + fvm::Sp(Clg1_*epsilon_/k_, R_) - == - P - + (2.0/3.0*(Clg1_ - 1)*I)*epsilon_ - - Clg2_*dev(P) - - // wall reflection terms - + symm - ( - I*((n_ & reflect) & n_) - - 1.5*(n_*(reflect & n_) - + (n_ & reflect)*n_) - )*pow(Cmu_, 0.75)*pow(k_, 1.5)/(kappa_*y_*epsilon_) - ); - - REqn().relax(); - solve(REqn); - - R_.max - ( - dimensionedSymmTensor - ( - "zero", - R_.dimensions(), - symmTensor - ( - kMin_.value(), -GREAT, -GREAT, - kMin_.value(), -GREAT, - kMin_.value() - ) - ) - ); - - k_ == 0.5*tr(R_); - bound(k_, kMin_); - - - // Re-calculate turbulent viscosity - nut_ = Cmu_*sqr(k_)/epsilon_; - nut_.correctBoundaryConditions(); - - - // Correct wall shear stresses - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isA<wallFvPatch>(curPatch)) - { - symmTensorField& Rw = R_.boundaryField()[patchi]; - - const scalarField& nutw = nut_.boundaryField()[patchi]; - - const vectorField snGradU(U_.boundaryField()[patchi].snGrad()); - - const vectorField& faceAreas - = mesh_.Sf().boundaryField()[patchi]; - - const scalarField& magFaceAreas - = mesh_.magSf().boundaryField()[patchi]; - - forAll(curPatch, facei) - { - // Calculate near-wall velocity gradient - tensor gradUw - = (faceAreas[facei]/magFaceAreas[facei])*snGradU[facei]; - - // Calculate near-wall shear-stress tensor - tensor tauw = -nutw[facei]*2*symm(gradUw); - - // Reset the shear components of the stress tensor - Rw[facei].xy() = tauw.xy(); - Rw[facei].xz() = tauw.xz(); - Rw[facei].yz() = tauw.yz(); - } - } - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H deleted file mode 100644 index 921e2f468..000000000 --- a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H +++ /dev/null @@ -1,216 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::RASModels::LaunderGibsonRSTM - -Group - grpIcoRASTurbulence - -Description - Launder-Gibson Reynolds stress turbulence model for incompressible flows. - - The default model coefficients correspond to the following: - \verbatim - LaunderGibsonRSTMCoeffs - { - Cmu 0.09; - kappa 0.41; - Clg1 1.8; - Clg2 0.6; - C1 1.44; - C2 1.92; - C1Ref 0.5; - C2Ref 0.3; - Cs 0.25; - Ceps 0.15; - sigmaEps 1.3; - sigmaR 0.81967; - couplingFactor 0.0; - } - \endverbatim - -SourceFiles - LaunderGibsonRSTM.C - -\*---------------------------------------------------------------------------*/ - -#ifndef LaunderGibsonRSTM_H -#define LaunderGibsonRSTM_H - -#include "RASModel.H" -#include "wallDist.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class LaunderGibsonRSTM Declaration -\*---------------------------------------------------------------------------*/ - -class LaunderGibsonRSTM -: - public RASModel -{ - -protected: - - // Protected data - - // Model coefficients - - dimensionedScalar Cmu_; - dimensionedScalar kappa_; - - dimensionedScalar Clg1_; - dimensionedScalar Clg2_; - - dimensionedScalar C1_; - dimensionedScalar C2_; - dimensionedScalar Cs_; - dimensionedScalar Ceps_; - dimensionedScalar sigmaR_; - dimensionedScalar sigmaEps_; - - dimensionedScalar C1Ref_; - dimensionedScalar C2Ref_; - - dimensionedScalar couplingFactor_; - - - // Fields - - const volVectorField& n_; - const volScalarField& y_; - - volSymmTensorField R_; - volScalarField k_; - volScalarField epsilon_; - volScalarField nut_; - - -public: - - //- Runtime type information - TypeName("LaunderGibsonRSTM"); - - // Constructors - - //- Construct from components - LaunderGibsonRSTM - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~LaunderGibsonRSTM() - {} - - - // Member Functions - - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const - { - return nut_; - } - - //- Return the effective diffusivity for R - tmp<volScalarField> DREff() const - { - return tmp<volScalarField> - ( - new volScalarField("DREff", nut_/sigmaR_ + nu()) - ); - } - - //- Return the effective diffusivity for epsilon - tmp<volScalarField> DepsilonEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu()) - ); - } - - //- Return the turbulence kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp<volScalarField> epsilon() const - { - return epsilon_; - } - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const - { - return R_; - } - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C b/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C deleted file mode 100644 index 9c451b4ce..000000000 --- a/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.C +++ /dev/null @@ -1,309 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "LaunderSharmaKE.H" -#include "addToRunTimeSelectionTable.H" - -#include "backwardsCompatibilityWallFunctions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(LaunderSharmaKE, 0); -addToRunTimeSelectionTable(RASModel, LaunderSharmaKE, dictionary); - -// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // - -tmp<volScalarField> LaunderSharmaKE::fMu() const -{ - return exp(-3.4/sqr(scalar(1) + sqr(k_)/(nu()*epsilonTilda_)/50.0)); -} - - -tmp<volScalarField> LaunderSharmaKE::f2() const -{ - return - scalar(1) - - 0.3*exp(-min(sqr(sqr(k_)/(nu()*epsilonTilda_)), scalar(50.0))); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -LaunderSharmaKE::LaunderSharmaKE -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - RASModel(modelName, U, phi, transport, turbulenceModelName), - - Cmu_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cmu", - coeffDict_, - 0.09 - ) - ), - C1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C1", - coeffDict_, - 1.44 - ) - ), - C2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C2", - coeffDict_, - 1.92 - ) - ), - sigmaEps_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaEps", - coeffDict_, - 1.3 - ) - ), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - epsilonTilda_ - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - nut_ - ( - IOobject - ( - "nut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateLowReNut("nut", mesh_) - ) -{ - bound(k_, kMin_); - bound(epsilonTilda_, epsilonMin_); - - nut_ = Cmu_*fMu()*sqr(k_)/epsilonTilda_; - nut_.correctBoundaryConditions(); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> LaunderSharmaKE::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - nut_*twoSymm(fvc::grad(U_)), - k_.boundaryField().types() - ) - ); -} - - -tmp<volSymmTensorField> LaunderSharmaKE::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -nuEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> LaunderSharmaKE::divDevReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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()) - { - Cmu_.readIfPresent(coeffDict()); - C1_.readIfPresent(coeffDict()); - C2_.readIfPresent(coeffDict()); - sigmaEps_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -void LaunderSharmaKE::correct() -{ - RASModel::correct(); - - if (!turbulence_) - { - return; - } - - tmp<volScalarField> S2 = 2*magSqr(symm(fvc::grad(U_))); - - volScalarField G(GName(), nut_*S2); - - const volScalarField E(2.0*nu()*nut_*fvc::magSqrGradGrad(U_)); - const volScalarField D(2.0*nu()*magSqr(fvc::grad(sqrt(k_)))); - - - // Dissipation rate equation - - tmp<fvScalarMatrix> epsEqn - ( - fvm::ddt(epsilonTilda_) - + fvm::div(phi_, epsilonTilda_) - - fvm::laplacian(DepsilonEff(), epsilonTilda_) - == - C1_*G*epsilonTilda_/k_ - - fvm::Sp(C2_*f2()*epsilonTilda_/k_, epsilonTilda_) - + E - ); - - epsEqn().relax(); - solve(epsEqn); - bound(epsilonTilda_, epsilonMin_); - - - // Turbulent kinetic energy equation - - tmp<fvScalarMatrix> kEqn - ( - fvm::ddt(k_) - + fvm::div(phi_, k_) - - fvm::laplacian(DkEff(), k_) - == - G - fvm::Sp((epsilonTilda_ + D)/k_, k_) - ); - - kEqn().relax(); - solve(kEqn); - bound(k_, kMin_); - - - // Re-calculate viscosity - nut_ == Cmu_*fMu()*sqr(k_)/epsilonTilda_; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H b/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H deleted file mode 100644 index 0d628a747..000000000 --- a/src/turbulenceModels/incompressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H +++ /dev/null @@ -1,195 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::RASModels::LaunderSharmaKE - -Group - grpIcoRASTurbulence - -Description - Launder and Sharma low-Reynolds k-epsilon turbulence model for - incompressible flows. - - The default model coefficients correspond to the following: - \verbatim - LaunderSharmaKECoeffs - { - Cmu 0.09; - C1 1.44; - C2 1.92; - C3 -0.33; - sigmaEps 1.3; - } - \endverbatim - -SourceFiles - LaunderSharmaKE.C - -\*---------------------------------------------------------------------------*/ - -#ifndef LaunderSharmaKE_H -#define LaunderSharmaKE_H - -#include "RASModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class LaunderSharmaKE Declaration -\*---------------------------------------------------------------------------*/ - -class LaunderSharmaKE -: - public RASModel -{ - -protected: - - // Protected data - - // Model coefficients - - dimensionedScalar Cmu_; - dimensionedScalar C1_; - dimensionedScalar C2_; - dimensionedScalar sigmaEps_; - - - // Fields - - volScalarField k_; - volScalarField epsilonTilda_; - volScalarField nut_; - - - // Protected Member Functions - - tmp<volScalarField> fMu() const; - tmp<volScalarField> f2() const; - - -public: - - //- Runtime type information - TypeName("LaunderSharmaKE"); - - // Constructors - - //- Construct from components - LaunderSharmaKE - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~LaunderSharmaKE() - {} - - - // Member Functions - - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const - { - return nut_; - } - - //- Return the effective diffusivity for k - tmp<volScalarField> DkEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DkEff", nut_ + nu()) - ); - } - - //- Return the effective diffusivity for epsilon - tmp<volScalarField> DepsilonEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu()) - ); - } - - //- Return the turbulence kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Note that epsilonTilda is returned as epsilon. - // This is the appropriate variable for most purposes. - virtual tmp<volScalarField> epsilon() const - { - return epsilonTilda_; - } - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/Make/files b/src/turbulenceModels/incompressible/RAS/Make/files deleted file mode 100644 index bb0258c6f..000000000 --- a/src/turbulenceModels/incompressible/RAS/Make/files +++ /dev/null @@ -1,66 +0,0 @@ -RASModel/RASModel.C - -laminar/laminar.C -kEpsilon/kEpsilon.C -RNGkEpsilon/RNGkEpsilon.C -realizableKE/realizableKE.C -kOmega/kOmega.C -kOmegaSST/kOmegaSST.C -SpalartAllmaras/SpalartAllmaras.C -LRR/LRR.C -LaunderGibsonRSTM/LaunderGibsonRSTM.C -LaunderSharmaKE/LaunderSharmaKE.C -qZeta/qZeta.C -LienCubicKE/LienCubicKE.C -LienCubicKELowRe/LienCubicKELowRe.C -NonlinearKEShih/NonlinearKEShih.C -LienLeschzinerLowRe/LienLeschzinerLowRe.C -LamBremhorstKE/LamBremhorstKE.C -kkLOmega/kkLOmega.C -v2f/v2f.C - -/* Wall functions */ -wallFunctions = derivedFvPatchFields/wallFunctions - -nutWallFunctions = $(wallFunctions)/nutWallFunctions -$(nutWallFunctions)/nutWallFunction/nutWallFunctionFvPatchScalarField.C - -$(nutWallFunctions)/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C -$(nutWallFunctions)/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C -$(nutWallFunctions)/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C - -$(nutWallFunctions)/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C -$(nutWallFunctions)/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C -$(nutWallFunctions)/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C -$(nutWallFunctions)/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.C -$(nutWallFunctions)/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C - -epsilonWallFunctions = $(wallFunctions)/epsilonWallFunctions -$(epsilonWallFunctions)/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C -$(epsilonWallFunctions)/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.C - -fWallFunctions = $(wallFunctions)/fWallFunctions -$(fWallFunctions)/fWallFunction/fWallFunctionFvPatchScalarField.C - -omegaWallFunctions = $(wallFunctions)/omegaWallFunctions -$(omegaWallFunctions)/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C - -kqRWallFunctions = $(wallFunctions)/kqRWallFunctions -$(kqRWallFunctions)/kqRWallFunction/kqRWallFunctionFvPatchFields.C -$(kqRWallFunctions)/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C - -alphatWallFunctions = $(wallFunctions)/alphatWallFunctions -$(alphatWallFunctions)/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C - -v2WallFunctions = $(wallFunctions)/v2WallFunctions -$(v2WallFunctions)/v2WallFunction/v2WallFunctionFvPatchScalarField.C - -/* Patch fields */ -derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C -derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C -derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.C -derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C - -backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C - -LIB = $(FOAM_LIBBIN)/libincompressibleRASModels diff --git a/src/turbulenceModels/incompressible/RAS/Make/options b/src/turbulenceModels/incompressible/RAS/Make/options deleted file mode 100644 index a5242e05e..000000000 --- a/src/turbulenceModels/incompressible/RAS/Make/options +++ /dev/null @@ -1,11 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude - -LIB_LIBS = \ - -lincompressibleTurbulenceModel \ - -lfiniteVolume \ - -lmeshTools diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C deleted file mode 100644 index 47f80f23e..000000000 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C +++ /dev/null @@ -1,206 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "RASModel.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -defineTypeNameAndDebug(RASModel, 0); -defineRunTimeSelectionTable(RASModel, dictionary); -addToRunTimeSelectionTable(turbulenceModel, RASModel, turbulenceModel); - -// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // - -void RASModel::printCoeffs() -{ - if (printCoeffs_) - { - Info<< type() << "Coeffs" << coeffDict_ << endl; - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -RASModel::RASModel -( - const word& type, - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName -) -: - turbulenceModel(U, phi, transport, turbulenceModelName), - - IOdictionary - ( - IOobject - ( - "RASProperties", - U.time().constant(), - U.db(), - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) - ), - - turbulence_(lookup("turbulence")), - printCoeffs_(lookupOrDefault<Switch>("printCoeffs", false)), - coeffDict_(subOrEmptyDict(type + "Coeffs")), - - kMin_("kMin", sqr(dimVelocity), SMALL), - epsilonMin_("epsilonMin", kMin_.dimensions()/dimTime, SMALL), - omegaMin_("omegaMin", dimless/dimTime, SMALL) -{ - kMin_.readIfPresent(*this); - epsilonMin_.readIfPresent(*this); - omegaMin_.readIfPresent(*this); - - // Force the construction of the mesh deltaCoeffs which may be needed - // for the construction of the derived models and BCs - mesh_.deltaCoeffs(); -} - - -// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // - -autoPtr<RASModel> RASModel::New -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName -) -{ - // get model name, but do not register the dictionary - // otherwise it is registered in the database twice - const word modelType - ( - IOdictionary - ( - IOobject - ( - "RASProperties", - U.time().constant(), - U.db(), - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) - ).lookup("RASModel") - ); - - Info<< "Selecting RAS turbulence model " << modelType << endl; - - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); - - if (cstrIter == dictionaryConstructorTablePtr_->end()) - { - FatalErrorIn - ( - "RASModel::New" - "(" - "const volVectorField&, " - "const surfaceScalarField&, " - "transportModel&, " - "const word&" - ")" - ) << "Unknown RASModel type " - << modelType << nl << nl - << "Valid RASModel types:" << endl - << dictionaryConstructorTablePtr_->sortedToc() - << exit(FatalError); - } - - return autoPtr<RASModel> - ( - cstrIter()(U, phi, transport, turbulenceModelName) - ); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void RASModel::correct() -{ - turbulenceModel::correct(); -} - - -bool RASModel::read() -{ - //if (regIOobject::read()) - - // Bit of trickery : we are both IOdictionary ('RASProperties') and - // an regIOobject from the turbulenceModel level. Problem is to distinguish - // between the two - we only want to reread the IOdictionary. - - bool ok = IOdictionary::readData - ( - IOdictionary::readStream - ( - IOdictionary::type() - ) - ); - IOdictionary::close(); - - if (ok) - { - lookup("turbulence") >> turbulence_; - - if (const dictionary* dictPtr = subDictPtr(type() + "Coeffs")) - { - coeffDict_ <<= *dictPtr; - } - - kMin_.readIfPresent(*this); - epsilonMin_.readIfPresent(*this); - omegaMin_.readIfPresent(*this); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H deleted file mode 100644 index 08c63d220..000000000 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H +++ /dev/null @@ -1,243 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Namespace - Foam::incompressible::RASModels - -Group - grpIcoRASTurbulence - -Description - Namespace for incompressible RAS turbulence models. - -Class - Foam::incompressible::RASModel - -Description - Abstract base class for incompressible turbulence models. - -SourceFiles - RASModel.C - -\*---------------------------------------------------------------------------*/ - -#ifndef RASModel_H -#define RASModel_H - -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "volFields.H" -#include "surfaceFields.H" -#include "fvm.H" -#include "fvc.H" -#include "fvMatrices.H" -#include "incompressible/transportModel/transportModel.H" -#include "IOdictionary.H" -#include "Switch.H" -#include "bound.H" -#include "autoPtr.H" -#include "runTimeSelectionTables.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class RASModel Declaration -\*---------------------------------------------------------------------------*/ - -class RASModel -: - public turbulenceModel, - public IOdictionary -{ - -protected: - - // Protected data - - //- Turbulence on/off flag - Switch turbulence_; - - //- Flag to print the model coeffs at run-time - Switch printCoeffs_; - - //- Model coefficients dictionary - dictionary coeffDict_; - - //- Lower limit of k - dimensionedScalar kMin_; - - //- Lower limit of epsilon - dimensionedScalar epsilonMin_; - - //- Lower limit for omega - dimensionedScalar omegaMin_; - - - // Protected Member Functions - - //- Print model coefficients - virtual void printCoeffs(); - - -private: - - // Private Member Functions - - //- Disallow default bitwise copy construct - RASModel(const RASModel&); - - //- Disallow default bitwise assignment - void operator=(const RASModel&); - - -public: - - //- Runtime type information - TypeName("RASModel"); - - - // Declare run-time constructor selection table - - declareRunTimeSelectionTable - ( - autoPtr, - RASModel, - dictionary, - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName - ), - (U, phi, transport, turbulenceModelName) - ); - - - // Constructors - - //- Construct from components - RASModel - ( - const word& type, - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName - ); - - - // Selectors - - //- Return a reference to the selected RAS model - static autoPtr<RASModel> New - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName - ); - - - //- Destructor - virtual ~RASModel() - {} - - - // Member Functions - - // Access - - //- Return the lower allowable limit for k (default: SMALL) - const dimensionedScalar& kMin() const - { - return kMin_; - } - - //- Return the lower allowable limit for epsilon (default: SMALL) - const dimensionedScalar& epsilonMin() const - { - return epsilonMin_; - } - - //- Return the lower allowable limit for omega (default: SMALL) - const dimensionedScalar& omegaMin() const - { - return omegaMin_; - } - - //- Allow kMin to be changed - dimensionedScalar& kMin() - { - return kMin_; - } - - //- Allow epsilonMin to be changed - dimensionedScalar& epsilonMin() - { - return epsilonMin_; - } - - //- Allow omegaMin to be changed - dimensionedScalar& omegaMin() - { - return omegaMin_; - } - - //- Const access to the coefficients dictionary - virtual const dictionary& coeffDict() const - { - return coeffDict_; - } - - - //- Return the effective viscosity - virtual tmp<volScalarField> nuEff() const - { - return tmp<volScalarField> - ( - new volScalarField("nuEff", nut() + nu()) - ); - } - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModelDoc.H b/src/turbulenceModels/incompressible/RAS/RASModel/RASModelDoc.H deleted file mode 100644 index 216165664..000000000 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModelDoc.H +++ /dev/null @@ -1,32 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -\defgroup grpIcoRASTurbulence Incompressible RAS turbulence -@{ - \ingroup grpIcoTurbulence - This group contains incompressible RAS models. -@} - -\*---------------------------------------------------------------------------*/ diff --git a/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C deleted file mode 100644 index 5612ead2d..000000000 --- a/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C +++ /dev/null @@ -1,469 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "SpalartAllmaras.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(SpalartAllmaras, 0); -addToRunTimeSelectionTable(RASModel, SpalartAllmaras, dictionary); - -// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // - -tmp<volScalarField> SpalartAllmaras::chi() const -{ - return nuTilda_/nu(); -} - - -tmp<volScalarField> SpalartAllmaras::fv1(const volScalarField& chi) const -{ - const volScalarField chi3(pow3(chi)); - return chi3/(chi3 + pow3(Cv1_)); -} - - -tmp<volScalarField> SpalartAllmaras::fv2 -( - const volScalarField& chi, - const volScalarField& fv1 -) const -{ - if (ashfordCorrection_) - { - return 1.0/pow3(scalar(1) + chi/Cv2_); - } - else - { - return 1.0 - chi/(1.0 + chi*fv1); - } -} - - -tmp<volScalarField> SpalartAllmaras::fv3 -( - const volScalarField& chi, - const volScalarField& fv1 -) const -{ - if (ashfordCorrection_) - { - const volScalarField chiByCv2((1/Cv2_)*chi); - - return - (scalar(1) + chi*fv1) - *(1/Cv2_) - *(3*(scalar(1) + chiByCv2) + sqr(chiByCv2)) - /pow3(scalar(1) + chiByCv2); - } - else - { - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "fv3", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("fv3", dimless, 1), - zeroGradientFvPatchScalarField::typeName - ) - ); - } -} - - -tmp<volScalarField> SpalartAllmaras::fw(const volScalarField& Stilda) const -{ - volScalarField r - ( - min - ( - nuTilda_ - /( - max - ( - Stilda, - dimensionedScalar("SMALL", Stilda.dimensions(), SMALL) - ) - *sqr(kappa_*y_) - ), - scalar(10.0) - ) - ); - r.boundaryField() == 0.0; - - const volScalarField g(r + Cw2_*(pow6(r) - r)); - - return g*pow((1.0 + pow6(Cw3_))/(pow6(g) + pow6(Cw3_)), 1.0/6.0); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -SpalartAllmaras::SpalartAllmaras -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - RASModel(modelName, U, phi, transport, turbulenceModelName), - - sigmaNut_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaNut", - coeffDict_, - 0.66666 - ) - ), - kappa_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "kappa", - coeffDict_, - 0.41 - ) - ), - - Cb1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cb1", - coeffDict_, - 0.1355 - ) - ), - Cb2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cb2", - coeffDict_, - 0.622 - ) - ), - Cw1_(Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_), - Cw2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cw2", - coeffDict_, - 0.3 - ) - ), - Cw3_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cw3", - coeffDict_, - 2.0 - ) - ), - Cv1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cv1", - coeffDict_, - 7.1 - ) - ), - Cv2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cv2", - coeffDict_, - 5.0 - ) - ), - - ashfordCorrection_(coeffDict_.lookupOrDefault("ashfordCorrection", true)), - - nuTilda_ - ( - IOobject - ( - "nuTilda", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - nut_ - ( - IOobject - ( - "nut", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - y_(wallDist::New(mesh_).y()) -{ - printCoeffs(); - - if (ashfordCorrection_) - { - Info<< " Employing Ashford correction" << endl; - } -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volScalarField> SpalartAllmaras::DnuTildaEff() const -{ - return tmp<volScalarField> - ( - new volScalarField("DnuTildaEff", (nuTilda_ + nu())/sigmaNut_) - ); -} - - -tmp<volScalarField> SpalartAllmaras::k() const -{ - WarningIn("tmp<volScalarField> SpalartAllmaras::k() const") - << "Turbulence kinetic energy not defined for Spalart-Allmaras model. " - << "Returning zero field" << endl; - - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_ - ), - mesh_, - dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 0) - ) - ); -} - - -tmp<volScalarField> SpalartAllmaras::epsilon() const -{ - WarningIn("tmp<volScalarField> SpalartAllmaras::epsilon() const") - << "Turbulence kinetic energy dissipation rate not defined for " - << "Spalart-Allmaras model. Returning zero field" - << endl; - - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_ - ), - mesh_, - dimensionedScalar("0", dimensionSet(0, 2, -3, 0, 0), 0) - ) - ); -} - - -tmp<volSymmTensorField> SpalartAllmaras::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k() - nut()*twoSymm(fvc::grad(U_)) - ) - ); -} - - -tmp<volSymmTensorField> SpalartAllmaras::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -nuEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> SpalartAllmaras::divDevReff(volVectorField& U) const -{ - const volScalarField nuEff_(nuEff()); - - return - ( - - fvm::laplacian(nuEff_, U) - - fvc::div(nuEff_*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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()) - { - sigmaNut_.readIfPresent(coeffDict()); - kappa_.readIfPresent(coeffDict()); - - Cb1_.readIfPresent(coeffDict()); - Cb2_.readIfPresent(coeffDict()); - Cw1_ = Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_; - Cw2_.readIfPresent(coeffDict()); - Cw3_.readIfPresent(coeffDict()); - Cv1_.readIfPresent(coeffDict()); - Cv2_.readIfPresent(coeffDict()); - - ashfordCorrection_.readIfPresent("ashfordCorrection", coeffDict()); - - return true; - } - else - { - return false; - } -} - - -void SpalartAllmaras::correct() -{ - RASModel::correct(); - - if (!turbulence_) - { - // Re-calculate viscosity - nut_ = nuTilda_*fv1(this->chi()); - nut_.correctBoundaryConditions(); - - return; - } - - const volScalarField chi(this->chi()); - const volScalarField fv1(this->fv1(chi)); - - const volScalarField Stilda - ( - fv3(chi, fv1)*::sqrt(2.0)*mag(skew(fvc::grad(U_))) - + fv2(chi, fv1)*nuTilda_/sqr(kappa_*y_) - ); - - tmp<fvScalarMatrix> nuTildaEqn - ( - fvm::ddt(nuTilda_) - + fvm::div(phi_, nuTilda_) - - fvm::laplacian(DnuTildaEff(), nuTilda_) - - Cb2_/sigmaNut_*magSqr(fvc::grad(nuTilda_)) - == - Cb1_*Stilda*nuTilda_ - - fvm::Sp(Cw1_*fw(Stilda)*nuTilda_/sqr(y_), nuTilda_) - ); - - nuTildaEqn().relax(); - solve(nuTildaEqn); - bound(nuTilda_, dimensionedScalar("0", nuTilda_.dimensions(), 0.0)); - nuTilda_.correctBoundaryConditions(); - - // Re-calculate viscosity - nut_.internalField() = fv1*nuTilda_.internalField(); - nut_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C b/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C deleted file mode 100644 index df20a315f..000000000 --- a/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C +++ /dev/null @@ -1,286 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "backwardsCompatibilityWallFunctions.H" - -#include "volFields.H" -#include "calculatedFvPatchField.H" -#include "nutkWallFunctionFvPatchScalarField.H" -#include "nutLowReWallFunctionFvPatchScalarField.H" -#include "epsilonWallFunctionFvPatchScalarField.H" -#include "kqRWallFunctionFvPatchField.H" -#include "omegaWallFunctionFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -tmp<volScalarField> autoCreateNut -( - const word& fieldName, - const fvMesh& mesh -) -{ - IOobject nutHeader - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE, - false - ); - - if (nutHeader.headerOk()) - { - return tmp<volScalarField>(new volScalarField(nutHeader, mesh)); - } - else - { - Info<< "--> Creating " << fieldName - << " to employ run-time selectable wall functions" << endl; - - const fvBoundaryMesh& bm = mesh.boundary(); - - wordList nutBoundaryTypes(bm.size()); - - forAll(bm, patchI) - { - if (isA<wallFvPatch>(bm[patchI])) - { - nutBoundaryTypes[patchI] = - nutkWallFunctionFvPatchScalarField::typeName; - } - else - { - nutBoundaryTypes[patchI] = - calculatedFvPatchField<scalar>::typeName; - } - } - - tmp<volScalarField> nut - ( - new volScalarField - ( - IOobject - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - dimensionedScalar("zero", dimArea/dimTime, 0.0), - nutBoundaryTypes - ) - ); - - Info<< " Writing new " << fieldName << endl; - nut().write(); - - return nut; - } -} - - -tmp<volScalarField> autoCreateLowReNut -( - const word& fieldName, - const fvMesh& mesh -) -{ - IOobject nutHeader - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE, - false - ); - - if (nutHeader.headerOk()) - { - return tmp<volScalarField>(new volScalarField(nutHeader, mesh)); - } - else - { - Info<< "--> Creating " << fieldName - << " to employ run-time selectable wall functions" << endl; - - const fvBoundaryMesh& bm = mesh.boundary(); - - wordList nutBoundaryTypes(bm.size()); - - forAll(bm, patchI) - { - if (isA<wallFvPatch>(bm[patchI])) - { - nutBoundaryTypes[patchI] = - nutLowReWallFunctionFvPatchScalarField::typeName; - } - else - { - nutBoundaryTypes[patchI] = - calculatedFvPatchField<scalar>::typeName; - } - } - - tmp<volScalarField> nut - ( - new volScalarField - ( - IOobject - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - dimensionedScalar("zero", dimArea/dimTime, 0.0), - nutBoundaryTypes - ) - ); - - Info<< " Writing new " << fieldName << endl; - nut().write(); - - return nut; - } -} - - -tmp<volScalarField> autoCreateEpsilon -( - const word& fieldName, - const fvMesh& mesh -) -{ - return - autoCreateWallFunctionField - < - scalar, - epsilonWallFunctionFvPatchScalarField - > - ( - fieldName, - mesh - ); -} - - -tmp<volScalarField> autoCreateOmega -( - const word& fieldName, - const fvMesh& mesh -) -{ - return - autoCreateWallFunctionField - < - scalar, - omegaWallFunctionFvPatchScalarField - > - ( - fieldName, - mesh - ); -} - - -tmp<volScalarField> autoCreateK -( - const word& fieldName, - const fvMesh& mesh -) -{ - return - autoCreateWallFunctionField - < - scalar, - kqRWallFunctionFvPatchField<scalar> - > - ( - fieldName, - mesh - ); -} - - -tmp<volScalarField> autoCreateQ -( - const word& fieldName, - const fvMesh& mesh -) -{ - return - autoCreateWallFunctionField - < - scalar, - kqRWallFunctionFvPatchField<scalar> - > - ( - fieldName, - mesh - ); -} - - -tmp<volSymmTensorField> autoCreateR -( - const word& fieldName, - const fvMesh& mesh -) -{ - return - autoCreateWallFunctionField - < - symmTensor, - kqRWallFunctionFvPatchField<symmTensor> - > - ( - fieldName, - mesh - ); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // - diff --git a/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.H b/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.H deleted file mode 100644 index 3eac48808..000000000 --- a/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.H +++ /dev/null @@ -1,122 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible - -Description - Auto creation of fields to provide backwards compatibility with - runtime selectable wall functions - -SourceFiles - backwardsCompatibilityWallFunctions.C - backwardsCompatibilityWallFunctionsTemplates.C - -\*---------------------------------------------------------------------------*/ - -#ifndef backwardsCompatibilityWallFunctions_H -#define backwardsCompatibilityWallFunctions_H - -#include "fvMesh.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - //- nut - tmp<volScalarField> autoCreateNut - ( - const word& fieldName, - const fvMesh& mesh - ); - - //- nut for Low-Reynolds number models - tmp<volScalarField> autoCreateLowReNut - ( - const word& fieldName, - const fvMesh& mesh - ); - - //- epsilon - tmp<volScalarField> autoCreateEpsilon - ( - const word& fieldName, - const fvMesh& mesh - ); - - //- omega - tmp<volScalarField> autoCreateOmega - ( - const word& fieldName, - const fvMesh& mesh - ); - - //- k - tmp<volScalarField> autoCreateK - ( - const word& fieldName, - const fvMesh& mesh - ); - - //- Q - tmp<volScalarField> autoCreateQ - ( - const word& fieldName, - const fvMesh& mesh - ); - - //- R - tmp<volSymmTensorField> autoCreateR - ( - const word& fieldName, - const fvMesh& mesh - ); - - //- Helper function to create the new field - template<class Type, class PatchType> - tmp<GeometricField<Type, fvPatchField, volMesh> > - autoCreateWallFunctionField - ( - const word& fieldName, - const fvMesh& mesh - ); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository -# include "backwardsCompatibilityWallFunctionsTemplates.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C b/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C deleted file mode 100644 index e414d8053..000000000 --- a/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C +++ /dev/null @@ -1,169 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "backwardsCompatibilityWallFunctions.H" -#include "Time.H" -#include "OSspecific.H" - -#include "wallFvPatch.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -template<class Type, class PatchType> -tmp<GeometricField<Type, fvPatchField, volMesh> > -autoCreateWallFunctionField -( - const word& fieldName, - const fvMesh& mesh -) -{ - IOobject nutHeader - ( - "nut", - mesh.time().timeName(), - mesh, - IOobject::MUST_READ - ); - - typedef GeometricField<Type, fvPatchField, volMesh> fieldType; - - if (nutHeader.headerOk()) - { - return tmp<fieldType> - ( - new fieldType - ( - IOobject - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE, - false - ), - mesh - ) - ); - } - else - { - Info<< "--> Upgrading " << fieldName - << " to employ run-time selectable wall functions" << endl; - - // Read existing field - IOobject ioObj - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE, - false - ); - - tmp<fieldType> fieldOrig - ( - new fieldType - ( - ioObj, - mesh - ) - ); - - // rename file - Info<< " Backup original " << fieldName << " to " - << fieldName << ".old" << endl; - mvBak(ioObj.objectPath(), "old"); - - - PtrList<fvPatchField<Type> > newPatchFields(mesh.boundary().size()); - - forAll(newPatchFields, patchI) - { - if (isA<wallFvPatch>(mesh.boundary()[patchI])) - { - newPatchFields.set - ( - patchI, - new PatchType - ( - mesh.boundary()[patchI], - fieldOrig().dimensionedInternalField() - ) - ); - newPatchFields[patchI] == fieldOrig().boundaryField()[patchI]; - } - else - { - newPatchFields.set - ( - patchI, - fieldOrig().boundaryField()[patchI].clone() - ); - } - } - - tmp<fieldType> fieldNew - ( - new fieldType - ( - IOobject - ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - fieldOrig().dimensions(), - fieldOrig().internalField(), - newPatchFields - ) - ); - - Info<< " Writing updated " << fieldName << endl; - fieldNew().write(); - - return fieldNew; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C deleted file mode 100644 index a1bf04e96..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C +++ /dev/null @@ -1,142 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "atmBoundaryLayerInletEpsilonFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "surfaceFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -atmBoundaryLayerInletEpsilonFvPatchScalarField:: -atmBoundaryLayerInletEpsilonFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchScalarField(p, iF), - atmBoundaryLayer() -{} - - -atmBoundaryLayerInletEpsilonFvPatchScalarField:: -atmBoundaryLayerInletEpsilonFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - fixedValueFvPatchScalarField(p, iF), - atmBoundaryLayer(patch().Cf(), dict) -{ - scalarField::operator=(epsilon(patch().Cf())); -} - - -atmBoundaryLayerInletEpsilonFvPatchScalarField:: -atmBoundaryLayerInletEpsilonFvPatchScalarField -( - const atmBoundaryLayerInletEpsilonFvPatchScalarField& psf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchScalarField(psf, p, iF, mapper), - atmBoundaryLayer(psf, mapper) -{} - - -atmBoundaryLayerInletEpsilonFvPatchScalarField:: -atmBoundaryLayerInletEpsilonFvPatchScalarField -( - const atmBoundaryLayerInletEpsilonFvPatchScalarField& psf, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchScalarField(psf, iF), - atmBoundaryLayer(psf) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void atmBoundaryLayerInletEpsilonFvPatchScalarField::autoMap -( - const fvPatchFieldMapper& m -) -{ - fixedValueFvPatchScalarField::autoMap(m); - atmBoundaryLayer::autoMap(m); -} - - -void atmBoundaryLayerInletEpsilonFvPatchScalarField::rmap -( - const fvPatchScalarField& psf, - const labelList& addr -) -{ - fixedValueFvPatchScalarField::rmap(psf, addr); - - const atmBoundaryLayerInletEpsilonFvPatchScalarField& blpsf = - refCast<const atmBoundaryLayerInletEpsilonFvPatchScalarField>(psf); - - atmBoundaryLayer::rmap(blpsf, addr); -} - - -void atmBoundaryLayerInletEpsilonFvPatchScalarField::write(Ostream& os) const -{ - fvPatchScalarField::write(os); - atmBoundaryLayer::write(os); - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - atmBoundaryLayerInletEpsilonFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H deleted file mode 100644 index 4cbda74cf..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H +++ /dev/null @@ -1,177 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::atmBoundaryLayerInletEpsilonFvPatchScalarField - -Group - grpIcoRASBoundaryConditions grpInletBoundaryConditions - -Description - This boundary condition specifies an inlet value for the turbulence - dissipation, \f$\epsilon\f$, appropriate for atmospheric boundary layers. - - See Foam::incompressible::atmBoundaryLayer for details. - - Example of the boundary condition specification: - \verbatim - ground - { - type atmBoundaryLayerInletEpsilon; - z (0 0 1); - Uref 10.0; - Zref 20.0; - z0 uniform 0.1; - zGround uniform 0.0; - } - \endverbatim - -SeeAlso - Foam::incompressible::atmBoundaryLayer, - Foam::incompressible::atmBoundaryLayerInletVelocityFvPatchVectorField, - Foam::incompressible::atmBoundaryLayerInletKFvPatchScalarField - -SourceFiles - atmBoundaryLayerInletEpsilonFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef atmBoundaryLayerInletEpsilonFvPatchScalarField_H -#define atmBoundaryLayerInletEpsilonFvPatchScalarField_H - -#include "fvPatchFields.H" -#include "fixedValueFvPatchFields.H" -#include "atmBoundaryLayer.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class atmBoundaryLayerInletEpsilonFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class atmBoundaryLayerInletEpsilonFvPatchScalarField -: - public fixedValueFvPatchScalarField, - public atmBoundaryLayer -{ - -public: - - //- Runtime type information - TypeName("atmBoundaryLayerInletEpsilon"); - - - // Constructors - - //- Construct from patch and internal field - atmBoundaryLayerInletEpsilonFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - atmBoundaryLayerInletEpsilonFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // atmBoundaryLayerInletEpsilonFvPatchScalarField onto a new patch - atmBoundaryLayerInletEpsilonFvPatchScalarField - ( - const atmBoundaryLayerInletEpsilonFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new atmBoundaryLayerInletEpsilonFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - atmBoundaryLayerInletEpsilonFvPatchScalarField - ( - const atmBoundaryLayerInletEpsilonFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new atmBoundaryLayerInletEpsilonFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Mapping functions - - //- Map (and resize as needed) from self given a mapping object - virtual void autoMap - ( - const fvPatchFieldMapper& - ); - - //- Reverse map the given fvPatchField onto this fvPatchField - virtual void rmap - ( - const fvPatchScalarField&, - const labelList& - ); - - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/doc/incompressibleRASBoundaryConditionsDoc.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/doc/incompressibleRASBoundaryConditionsDoc.H deleted file mode 100644 index c59310206..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/doc/incompressibleRASBoundaryConditionsDoc.H +++ /dev/null @@ -1,39 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it under - the terms of the GNU General Public License as published by the Free - Software Foundation, either version 3 of the License, or (at your option) - any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - details. - - You should have received a copy of the GNU General Public License along with - OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -\defgroup grpIcoRASBoundaryConditions RAS incompressible boundary conditions -@{ - \ingroup grpIcoRASTurbulence - This group contains incompressible RAS turbulence model boundary conditions -@} - -\defgroup grpIcoWallFunctions RAS incompressible wall functions -@{ - \ingroup grpIcoRASBoundaryConditions - This group contains incompressible RAS turbulence model wall functions -@} - - -\*---------------------------------------------------------------------------*/ diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C deleted file mode 100644 index e0d6c9a8e..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C +++ /dev/null @@ -1,179 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "turbulentMixingLengthDissipationRateInletFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "surfaceFields.H" -#include "volFields.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -turbulentMixingLengthDissipationRateInletFvPatchScalarField:: -turbulentMixingLengthDissipationRateInletFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - inletOutletFvPatchScalarField(p, iF), - mixingLength_(0.0), - kName_("k") -{ - this->refValue() = 0.0; - this->refGrad() = 0.0; - this->valueFraction() = 0.0; -} - - -turbulentMixingLengthDissipationRateInletFvPatchScalarField:: -turbulentMixingLengthDissipationRateInletFvPatchScalarField -( - const turbulentMixingLengthDissipationRateInletFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - inletOutletFvPatchScalarField(ptf, p, iF, mapper), - mixingLength_(ptf.mixingLength_), - kName_(ptf.kName_) -{} - - -turbulentMixingLengthDissipationRateInletFvPatchScalarField:: -turbulentMixingLengthDissipationRateInletFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - inletOutletFvPatchScalarField(p, iF), - mixingLength_(readScalar(dict.lookup("mixingLength"))), - kName_(dict.lookupOrDefault<word>("k", "k")) -{ - this->phiName_ = dict.lookupOrDefault<word>("phi", "phi"); - fvPatchScalarField::operator=(scalarField("value", dict, p.size())); - - this->refValue() = 0.0; - this->refGrad() = 0.0; - this->valueFraction() = 0.0; -} - - -turbulentMixingLengthDissipationRateInletFvPatchScalarField:: -turbulentMixingLengthDissipationRateInletFvPatchScalarField -( - const turbulentMixingLengthDissipationRateInletFvPatchScalarField& ptf -) -: - inletOutletFvPatchScalarField(ptf), - mixingLength_(ptf.mixingLength_), - kName_(ptf.kName_) -{} - - -turbulentMixingLengthDissipationRateInletFvPatchScalarField:: -turbulentMixingLengthDissipationRateInletFvPatchScalarField -( - const turbulentMixingLengthDissipationRateInletFvPatchScalarField& ptf, - const DimensionedField<scalar, volMesh>& iF -) -: - inletOutletFvPatchScalarField(ptf, iF), - mixingLength_(ptf.mixingLength_), - kName_(ptf.kName_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - // Lookup Cmu corresponding to the turbulence model selected - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>("turbulenceModel"); - - const scalar Cmu = - turbulence.coeffDict().lookupOrDefault<scalar>("Cmu", 0.09); - - const scalar Cmu75 = pow(Cmu, 0.75); - - const fvPatchScalarField& kp = - patch().lookupPatchField<volScalarField, scalar>(kName_); - - const fvsPatchScalarField& phip = - patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_); - - this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_; - this->valueFraction() = 1.0 - pos(phip); - - inletOutletFvPatchScalarField::updateCoeffs(); -} - - -void turbulentMixingLengthDissipationRateInletFvPatchScalarField::write -( - Ostream& os -) const -{ - fvPatchScalarField::write(os); - os.writeKeyword("mixingLength") - << mixingLength_ << token::END_STATEMENT << nl; - os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl; - os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl; - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - turbulentMixingLengthDissipationRateInletFvPatchScalarField -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H deleted file mode 100644 index 13496315d..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H +++ /dev/null @@ -1,203 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible:: - turbulentMixingLengthDissipationRateInletFvPatchScalarField - -Group - grpIcoRASBoundaryConditions grpInletBoundaryConditions - -Description - This boundary condition provides a turbulence dissipation, \f$\epsilon\f$ - (epsilon) inlet condition based on a specified mixing length. The patch - values are calculated using: - - \f[ - \epsilon_p = \frac{C_{\mu}^{0.75} k^{1.5}}{L} - \f] - - where - - \vartable - \epsilon_p | patch epsilon values - C_{\mu} | Model coefficient, set to 0.09 - k | turbulence kinetic energy - L | length scale - \endvartable - - \heading Patch usage - - \table - Property | Description | Required | Default value - mixingLength | Length scale [m] | yes | - phi | flux field name | no | phi - k | turbulence kinetic energy field name | no | k - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type turbulentMixingLengthDissipationRateInlet; - mixingLength 0.005; - value uniform 200; // placeholder - } - \endverbatim - -Note - In the event of reverse flow, a zero-gradient condition is applied - -SeeAlso - Foam::inletOutletFvPatchField - -SourceFiles - turbulentMixingLengthDissipationRateInletFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef incompressibleturbulentMixingLengthDissipationRateInlet_H -#define incompressibleturbulentMixingLengthDissipationRateInlet_H - -#include "inletOutletFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class turbulentMixingLengthDissipationRateInletFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class turbulentMixingLengthDissipationRateInletFvPatchScalarField -: - public inletOutletFvPatchScalarField -{ - // Private data - - //- turbulent length scale - scalar mixingLength_; - - //- Name of the turbulent kinetic energy field - word kName_; - - -public: - - //- Runtime type information - TypeName("turbulentMixingLengthDissipationRateInlet"); - - - // Constructors - - //- Construct from patch and internal field - turbulentMixingLengthDissipationRateInletFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - turbulentMixingLengthDissipationRateInletFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // turbulentMixingLengthDissipationRateInletFvPatchScalarField - // onto a new patch - turbulentMixingLengthDissipationRateInletFvPatchScalarField - ( - const turbulentMixingLengthDissipationRateInletFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - turbulentMixingLengthDissipationRateInletFvPatchScalarField - ( - const turbulentMixingLengthDissipationRateInletFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new turbulentMixingLengthDissipationRateInletFvPatchScalarField - ( - *this - ) - ); - } - - //- Construct as copy setting internal field reference - turbulentMixingLengthDissipationRateInletFvPatchScalarField - ( - const turbulentMixingLengthDissipationRateInletFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new turbulentMixingLengthDissipationRateInletFvPatchScalarField - ( - *this, - iF - ) - ); - } - - - // Member functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C deleted file mode 100644 index 95bdac20f..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ /dev/null @@ -1,176 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "turbulentMixingLengthFrequencyInletFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "surfaceFields.H" -#include "volFields.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -turbulentMixingLengthFrequencyInletFvPatchScalarField:: -turbulentMixingLengthFrequencyInletFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - inletOutletFvPatchScalarField(p, iF), - mixingLength_(0.0), - kName_("undefined-k") -{ - this->refValue() = 0.0; - this->refGrad() = 0.0; - this->valueFraction() = 0.0; -} - -turbulentMixingLengthFrequencyInletFvPatchScalarField:: -turbulentMixingLengthFrequencyInletFvPatchScalarField -( - const turbulentMixingLengthFrequencyInletFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - inletOutletFvPatchScalarField(ptf, p, iF, mapper), - mixingLength_(ptf.mixingLength_), - kName_(ptf.kName_) -{} - -turbulentMixingLengthFrequencyInletFvPatchScalarField:: -turbulentMixingLengthFrequencyInletFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - inletOutletFvPatchScalarField(p, iF), - mixingLength_(readScalar(dict.lookup("mixingLength"))), - kName_(dict.lookupOrDefault<word>("k", "k")) -{ - this->phiName_ = dict.lookupOrDefault<word>("phi", "phi"); - - fvPatchScalarField::operator=(scalarField("value", dict, p.size())); - - this->refValue() = 0.0; - this->refGrad() = 0.0; - this->valueFraction() = 0.0; -} - -turbulentMixingLengthFrequencyInletFvPatchScalarField:: -turbulentMixingLengthFrequencyInletFvPatchScalarField -( - const turbulentMixingLengthFrequencyInletFvPatchScalarField& ptf -) -: - inletOutletFvPatchScalarField(ptf), - mixingLength_(ptf.mixingLength_), - kName_(ptf.kName_) -{} - -turbulentMixingLengthFrequencyInletFvPatchScalarField:: -turbulentMixingLengthFrequencyInletFvPatchScalarField -( - const turbulentMixingLengthFrequencyInletFvPatchScalarField& ptf, - const DimensionedField<scalar, volMesh>& iF -) -: - inletOutletFvPatchScalarField(ptf, iF), - mixingLength_(ptf.mixingLength_), - kName_(ptf.kName_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - // Lookup Cmu corresponding to the turbulence model selected - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>("turbulenceModel"); - - const scalar Cmu = - turbulence.coeffDict().lookupOrDefault<scalar>("Cmu", 0.09); - - const scalar Cmu25 = pow(Cmu, 0.25); - - const fvPatchScalarField& kp = - patch().lookupPatchField<volScalarField, scalar>(kName_); - - const fvsPatchScalarField& phip = - patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_); - - this->refValue() = sqrt(kp)/(Cmu25*mixingLength_); - this->valueFraction() = 1.0 - pos(phip); - - inletOutletFvPatchScalarField::updateCoeffs(); -} - - -void turbulentMixingLengthFrequencyInletFvPatchScalarField::write -( - Ostream& os -) const -{ - fvPatchScalarField::write(os); - os.writeKeyword("mixingLength") - << mixingLength_ << token::END_STATEMENT << nl; - os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl; - os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl; - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - turbulentMixingLengthFrequencyInletFvPatchScalarField -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H deleted file mode 100644 index 9fdff8d95..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H +++ /dev/null @@ -1,203 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::turbulentMixingLengthFrequencyInletFvPatchScalarField - -Group - grpIcoRASBoundaryConditions grpInletBoundaryConditions - -Description - This boundary condition provides a turbulence specific dissipation, - \f$\omega\f$ (omega) inlet condition based on a specified mixing length. - The patch values are calculated using: - - \f[ - \omega_p = \frac{k^{0.5}}{C_{\mu}^{0.25} L} - \f] - - where - - \vartable - \omega_p | patch omega values - C_{\mu} | Model coefficient, set to 0.09 - k | turbulence kinetic energy - L | length scale - \endvartable - - \heading Patch usage - - \table - Property | Description | Required | Default value - mixingLength | Length scale [m] | yes | - phi | flux field name | no | phi - k | turbulence kinetic energy field name | no | k - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type turbulentMixingLengthFrequencyInlet; - mixingLength 0.005; - value uniform 200; // placeholder - } - \endverbatim - -Note - In the event of reverse flow, a zero-gradient condition is applied - -SeeAlso - Foam::inletOutletFvPatchField - - -SourceFiles - turbulentMixingLengthFrequencyInletFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef incompressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H -#define incompressibleturbulentMixingLengthFrequencyInletFvPatchScalarField_H - -#include "inletOutletFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class turbulentMixingLengthFrequencyInletFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class turbulentMixingLengthFrequencyInletFvPatchScalarField -: - public inletOutletFvPatchScalarField -{ - // Private data - - //- Turbulent length scale - scalar mixingLength_; - - //- Name of the turbulent kinetic energy field - word kName_; - - -public: - - //- Runtime type information - TypeName("turbulentMixingLengthFrequencyInlet"); - - - // Constructors - - //- Construct from patch and internal field - turbulentMixingLengthFrequencyInletFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - turbulentMixingLengthFrequencyInletFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // turbulentMixingLengthFrequencyInletFvPatchScalarField - // onto a new patch - turbulentMixingLengthFrequencyInletFvPatchScalarField - ( - const turbulentMixingLengthFrequencyInletFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - turbulentMixingLengthFrequencyInletFvPatchScalarField - ( - const turbulentMixingLengthFrequencyInletFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new turbulentMixingLengthFrequencyInletFvPatchScalarField - ( - *this - ) - ); - } - - //- Construct as copy setting internal field reference - turbulentMixingLengthFrequencyInletFvPatchScalarField - ( - const turbulentMixingLengthFrequencyInletFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new turbulentMixingLengthFrequencyInletFvPatchScalarField - ( - *this, - iF - ) - ); - } - - - // Member functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.C deleted file mode 100644 index d9898beda..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,193 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "epsilonLowReWallFunctionFvPatchScalarField.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -scalar epsilonLowReWallFunctionFvPatchScalarField::yPlusLam -( - const scalar kappa, - const scalar E -) -{ - scalar ypl = 11.0; - - for (int i=0; i<10; i++) - { - ypl = log(max(E*ypl, 1))/kappa; - } - - return ypl; -} - - -void epsilonLowReWallFunctionFvPatchScalarField::calculate -( - const turbulenceModel& turbulence, - const List<scalar>& cornerWeights, - const fvPatch& patch, - scalarField& G, - scalarField& epsilon -) -{ - const label patchI = patch.index(); - - const scalarField& y = turbulence.y()[patchI]; - - const scalar Cmu25 = pow025(Cmu_); - const scalar Cmu75 = pow(Cmu_, 0.75); - - const tmp<volScalarField> tk = turbulence.k(); - const volScalarField& k = tk(); - - const tmp<volScalarField> tnu = turbulence.nu(); - const scalarField& nuw = tnu().boundaryField()[patchI]; - - const tmp<volScalarField> tnut = turbulence.nut(); - const volScalarField& nut = tnut(); - const scalarField& nutw = nut.boundaryField()[patchI]; - - const fvPatchVectorField& Uw = turbulence.U().boundaryField()[patchI]; - - const scalarField magGradUw(mag(Uw.snGrad())); - - // Set epsilon and G - forAll(nutw, faceI) - { - label cellI = patch.faceCells()[faceI]; - - scalar yPlus = Cmu25*sqrt(k[cellI])*y[faceI]/nuw[faceI]; - - scalar w = cornerWeights[faceI]; - - if (yPlus > yPlusLam_) - { - epsilon[cellI] = w*Cmu75*pow(k[cellI], 1.5)/(kappa_*y[faceI]); - } - else - { - epsilon[cellI] = w*2.0*k[cellI]*nuw[faceI]/sqr(y[faceI]); - } - - G[cellI] = - w - *(nutw[faceI] + nuw[faceI]) - *magGradUw[faceI] - *Cmu25*sqrt(k[cellI]) - /(kappa_*y[faceI]); - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -epsilonLowReWallFunctionFvPatchScalarField:: -epsilonLowReWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - epsilonWallFunctionFvPatchScalarField(p, iF), - yPlusLam_(yPlusLam(kappa_, E_)) -{} - - -epsilonLowReWallFunctionFvPatchScalarField:: -epsilonLowReWallFunctionFvPatchScalarField -( - const epsilonLowReWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - epsilonWallFunctionFvPatchScalarField(ptf, p, iF, mapper), - yPlusLam_(ptf.yPlusLam_) -{} - - -epsilonLowReWallFunctionFvPatchScalarField:: -epsilonLowReWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - epsilonWallFunctionFvPatchScalarField(p, iF, dict), - yPlusLam_(yPlusLam(kappa_, E_)) -{} - - -epsilonLowReWallFunctionFvPatchScalarField:: -epsilonLowReWallFunctionFvPatchScalarField -( - const epsilonLowReWallFunctionFvPatchScalarField& ewfpsf -) -: - epsilonWallFunctionFvPatchScalarField(ewfpsf), - yPlusLam_(ewfpsf.yPlusLam_) -{} - - -epsilonLowReWallFunctionFvPatchScalarField:: -epsilonLowReWallFunctionFvPatchScalarField -( - const epsilonLowReWallFunctionFvPatchScalarField& ewfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - epsilonWallFunctionFvPatchScalarField(ewfpsf, iF), - yPlusLam_(ewfpsf.yPlusLam_) -{} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - epsilonLowReWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.H deleted file mode 100644 index 778fffcfd..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,194 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::epsilonLowReWallFunctionFvPatchScalarField - -Group - grpIcoWallFunctions - -Description - This boundary condition provides a turbulence dissipation wall function - condition for low- and high-Reynolds number turbulent flow cases. - - The condition can be applied to wall boundaries, whereby it inserts near - wall epsilon values directly into the epsilon equation to act as a - constraint. - - The model operates in two modes, based on the computed laminar-to-turbulent - switch-over y+ value derived from kappa and E. - - \heading Patch usage - - \table - Property | Description | Required | Default value - Cmu | model coefficient | no | 0.09 - kappa | Von Karman constant | no | 0.41 - E | model coefficient | no | 9.8 - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type epsilonLowReWallFunction; - } - \endverbatim - -SeeAlso - Foam::epsilonWallFunctionFvPatchScalarField - -SourceFiles - epsilonLowReWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef epsilonLowReWallFunctionFvPatchScalarField_H -#define epsilonLowReWallFunctionFvPatchScalarField_H - -#include "epsilonWallFunctionFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class epsilonLowReWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class epsilonLowReWallFunctionFvPatchScalarField -: - public epsilonWallFunctionFvPatchScalarField -{ - -protected: - - // Protected data - - //- Y+ at the edge of the laminar sublayer - scalar yPlusLam_; - - - // Protected Member Functions - - //- Calculate the Y+ at the edge of the laminar sublayer - scalar yPlusLam(const scalar kappa, const scalar E); - - //- Calculate the epsilon and G - virtual void calculate - ( - const turbulenceModel& turbulence, - const List<scalar>& cornerWeights, - const fvPatch& patch, - scalarField& G, - scalarField& epsilon - ); - - -public: - - //- Runtime type information - TypeName("epsilonLowReWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - epsilonLowReWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - epsilonLowReWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // epsilonLowReWallFunctionFvPatchScalarField - // onto a new patch - epsilonLowReWallFunctionFvPatchScalarField - ( - const epsilonLowReWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - epsilonLowReWallFunctionFvPatchScalarField - ( - const epsilonLowReWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new epsilonLowReWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - epsilonLowReWallFunctionFvPatchScalarField - ( - const epsilonLowReWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new epsilonLowReWallFunctionFvPatchScalarField(*this, iF) - ); - } - - //- Destructor - virtual ~epsilonLowReWallFunctionFvPatchScalarField() - {} -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C deleted file mode 100644 index 2437271e2..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,586 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "epsilonWallFunctionFvPatchScalarField.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "fvMatrix.H" -#include "volFields.H" -#include "wallFvPatch.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -scalar epsilonWallFunctionFvPatchScalarField::tolerance_ = 1e-5; - -// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // - -void epsilonWallFunctionFvPatchScalarField::checkType() -{ - if (!isA<wallFvPatch>(patch())) - { - FatalErrorIn("epsilonWallFunctionFvPatchScalarField::checkType()") - << "Invalid wall function specification" << nl - << " Patch type for patch " << patch().name() - << " must be wall" << nl - << " Current patch type is " << patch().type() << nl << endl - << abort(FatalError); - } -} - - -void epsilonWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const -{ - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; -} - - -void epsilonWallFunctionFvPatchScalarField::setMaster() -{ - if (master_ != -1) - { - return; - } - - const volScalarField& epsilon = - static_cast<const volScalarField&>(this->dimensionedInternalField()); - - const volScalarField::GeometricBoundaryField& bf = epsilon.boundaryField(); - - label master = -1; - forAll(bf, patchI) - { - if (isA<epsilonWallFunctionFvPatchScalarField>(bf[patchI])) - { - epsilonWallFunctionFvPatchScalarField& epf = epsilonPatch(patchI); - - if (master == -1) - { - master = patchI; - } - - epf.master() = master; - } - } -} - - -void epsilonWallFunctionFvPatchScalarField::createAveragingWeights() -{ - const volScalarField& epsilon = - static_cast<const volScalarField&>(this->dimensionedInternalField()); - - const volScalarField::GeometricBoundaryField& bf = epsilon.boundaryField(); - - const fvMesh& mesh = epsilon.mesh(); - - if (initialised_ && !mesh.changing()) - { - return; - } - - volScalarField weights - ( - IOobject - ( - "weights", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false // do not register - ), - mesh, - dimensionedScalar("zero", dimless, 0.0) - ); - - DynamicList<label> epsilonPatches(bf.size()); - forAll(bf, patchI) - { - if (isA<epsilonWallFunctionFvPatchScalarField>(bf[patchI])) - { - epsilonPatches.append(patchI); - - const labelUList& faceCells = bf[patchI].patch().faceCells(); - forAll(faceCells, i) - { - label cellI = faceCells[i]; - weights[cellI]++; - } - } - } - - cornerWeights_.setSize(bf.size()); - forAll(epsilonPatches, i) - { - label patchI = epsilonPatches[i]; - const fvPatchScalarField& wf = weights.boundaryField()[patchI]; - cornerWeights_[patchI] = 1.0/wf.patchInternalField(); - } - - G_.setSize(dimensionedInternalField().size(), 0.0); - epsilon_.setSize(dimensionedInternalField().size(), 0.0); - - initialised_ = true; -} - - -epsilonWallFunctionFvPatchScalarField& -epsilonWallFunctionFvPatchScalarField::epsilonPatch(const label patchI) -{ - const volScalarField& epsilon = - static_cast<const volScalarField&>(this->dimensionedInternalField()); - - const volScalarField::GeometricBoundaryField& bf = epsilon.boundaryField(); - - const epsilonWallFunctionFvPatchScalarField& epf = - refCast<const epsilonWallFunctionFvPatchScalarField>(bf[patchI]); - - return const_cast<epsilonWallFunctionFvPatchScalarField&>(epf); -} - - -void epsilonWallFunctionFvPatchScalarField::calculateTurbulenceFields -( - const turbulenceModel& turbulence, - scalarField& G0, - scalarField& epsilon0 -) -{ - // accumulate all of the G and epsilon contributions - forAll(cornerWeights_, patchI) - { - if (!cornerWeights_[patchI].empty()) - { - epsilonWallFunctionFvPatchScalarField& epf = epsilonPatch(patchI); - - const List<scalar>& w = cornerWeights_[patchI]; - - epf.calculate(turbulence, w, epf.patch(), G0, epsilon0); - } - } - - // apply zero-gradient condition for epsilon - forAll(cornerWeights_, patchI) - { - if (!cornerWeights_[patchI].empty()) - { - epsilonWallFunctionFvPatchScalarField& epf = epsilonPatch(patchI); - - epf == scalarField(epsilon0, epf.patch().faceCells()); - } - } -} - - -void epsilonWallFunctionFvPatchScalarField::calculate -( - const turbulenceModel& turbulence, - const List<scalar>& cornerWeights, - const fvPatch& patch, - scalarField& G, - scalarField& epsilon -) -{ - const label patchI = patch.index(); - - const scalarField& y = turbulence.y()[patchI]; - - const scalar Cmu25 = pow025(Cmu_); - const scalar Cmu75 = pow(Cmu_, 0.75); - - const tmp<volScalarField> tk = turbulence.k(); - const volScalarField& k = tk(); - - const tmp<volScalarField> tnu = turbulence.nu(); - const scalarField& nuw = tnu().boundaryField()[patchI]; - - const tmp<volScalarField> tnut = turbulence.nut(); - const volScalarField& nut = tnut(); - const scalarField& nutw = nut.boundaryField()[patchI]; - - const fvPatchVectorField& Uw = turbulence.U().boundaryField()[patchI]; - - const scalarField magGradUw(mag(Uw.snGrad())); - - // Set epsilon and G - forAll(nutw, faceI) - { - label cellI = patch.faceCells()[faceI]; - - scalar w = cornerWeights[faceI]; - - epsilon[cellI] += w*Cmu75*pow(k[cellI], 1.5)/(kappa_*y[faceI]); - - G[cellI] += - w - *(nutw[faceI] + nuw[faceI]) - *magGradUw[faceI] - *Cmu25*sqrt(k[cellI]) - /(kappa_*y[faceI]); - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchField<scalar>(p, iF), - Cmu_(0.09), - kappa_(0.41), - E_(9.8), - G_(), - epsilon_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); -} - - -epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField -( - const epsilonWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchField<scalar>(ptf, p, iF, mapper), - Cmu_(ptf.Cmu_), - kappa_(ptf.kappa_), - E_(ptf.E_), - G_(), - epsilon_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); -} - - -epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - fixedValueFvPatchField<scalar>(p, iF, dict), - Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)), - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - E_(dict.lookupOrDefault<scalar>("E", 9.8)), - G_(), - epsilon_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); - - // apply zero-gradient condition on start-up - this->operator==(patchInternalField()); -} - - -epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField -( - const epsilonWallFunctionFvPatchScalarField& ewfpsf -) -: - fixedValueFvPatchField<scalar>(ewfpsf), - Cmu_(ewfpsf.Cmu_), - kappa_(ewfpsf.kappa_), - E_(ewfpsf.E_), - G_(), - epsilon_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); -} - - -epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField -( - const epsilonWallFunctionFvPatchScalarField& ewfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchField<scalar>(ewfpsf, iF), - Cmu_(ewfpsf.Cmu_), - kappa_(ewfpsf.kappa_), - E_(ewfpsf.E_), - G_(), - epsilon_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -scalarField& epsilonWallFunctionFvPatchScalarField::G(bool init) -{ - if (patch().index() == master_) - { - if (init) - { - G_ = 0.0; - } - - return G_; - } - - return epsilonPatch(master_).G(); -} - - -scalarField& epsilonWallFunctionFvPatchScalarField::epsilon(bool init) -{ - if (patch().index() == master_) - { - if (init) - { - epsilon_ = 0.0; - } - - return epsilon_; - } - - return epsilonPatch(master_).epsilon(init); -} - - -void epsilonWallFunctionFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>(turbulenceModel::typeName); - - setMaster(); - - if (patch().index() == master_) - { - createAveragingWeights(); - calculateTurbulenceFields(turbulence, G(true), epsilon(true)); - } - - const scalarField& G0 = this->G(); - const scalarField& epsilon0 = this->epsilon(); - - typedef DimensionedField<scalar, volMesh> FieldType; - - FieldType& G = - const_cast<FieldType&> - ( - db().lookupObject<FieldType>(turbulence.GName()) - ); - - FieldType& epsilon = const_cast<FieldType&>(dimensionedInternalField()); - - forAll(*this, faceI) - { - label cellI = patch().faceCells()[faceI]; - - G[cellI] = G0[cellI]; - epsilon[cellI] = epsilon0[cellI]; - } - - fvPatchField<scalar>::updateCoeffs(); -} - - -void epsilonWallFunctionFvPatchScalarField::updateCoeffs -( - const scalarField& weights -) -{ - if (updated()) - { - return; - } - - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>(turbulenceModel::typeName); - - setMaster(); - - if (patch().index() == master_) - { - createAveragingWeights(); - calculateTurbulenceFields(turbulence, G(true), epsilon(true)); - } - - const scalarField& G0 = this->G(); - const scalarField& epsilon0 = this->epsilon(); - - typedef DimensionedField<scalar, volMesh> FieldType; - - FieldType& G = - const_cast<FieldType&> - ( - db().lookupObject<FieldType>(turbulence.GName()) - ); - - FieldType& epsilon = const_cast<FieldType&>(dimensionedInternalField()); - - scalarField& epsilonf = *this; - - // only set the values if the weights are > tolerance - forAll(weights, faceI) - { - scalar w = weights[faceI]; - - if (w > tolerance_) - { - label cellI = patch().faceCells()[faceI]; - - G[cellI] = (1.0 - w)*G[cellI] + w*G0[cellI]; - epsilon[cellI] = (1.0 - w)*epsilon[cellI] + w*epsilon0[cellI]; - epsilonf[faceI] = epsilon[cellI]; - } - } - - fvPatchField<scalar>::updateCoeffs(); -} - - -void epsilonWallFunctionFvPatchScalarField::manipulateMatrix -( - fvMatrix<scalar>& matrix -) -{ - if (manipulatedMatrix()) - { - return; - } - - matrix.setValues(patch().faceCells(), patchInternalField()); - - fvPatchField<scalar>::manipulateMatrix(matrix); -} - - -void epsilonWallFunctionFvPatchScalarField::manipulateMatrix -( - fvMatrix<scalar>& matrix, - const Field<scalar>& weights -) -{ - if (manipulatedMatrix()) - { - return; - } - - // filter weights so that we only apply the constraint where the - // weight > SMALL - DynamicList<label> constraintCells(weights.size()); - DynamicList<scalar> constraintEpsilon(weights.size()); - const labelUList& faceCells = patch().faceCells(); - - const DimensionedField<scalar, volMesh>& epsilon = - dimensionedInternalField(); - - label nConstrainedCells = 0; - - - forAll(weights, faceI) - { - // only set the values if the weights are > tolerance - if (weights[faceI] > tolerance_) - { - nConstrainedCells++; - - label cellI = faceCells[faceI]; - - constraintCells.append(cellI); - constraintEpsilon.append(epsilon[cellI]); - } - } - - if (debug) - { - Pout<< "Patch: " << patch().name() - << ": number of constrained cells = " << nConstrainedCells - << " out of " << patch().size() - << endl; - } - - matrix.setValues - ( - constraintCells, - scalarField(constraintEpsilon.xfer()) - ); - - fvPatchField<scalar>::manipulateMatrix(matrix); -} - - -void epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fixedValueFvPatchField<scalar>::write(os); - writeLocalEntries(os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - epsilonWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H deleted file mode 100644 index ef2eeeb83..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,291 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::epsilonWallFunctionFvPatchScalarField - -Group - grpIcoWallFunctions - -Description - This boundary condition provides a turbulence dissipation wall function - condition for high Reynolds number, turbulent flow cases. - - The condition can be applied to wall boundaries, whereby it - - calculates \c epsilon and \c G - - inserts near wall epsilon values directly into the epsilon equation - to act as a constraint - - where - - \vartable - epsilon | turblence dissipation field - G | turblence generation field - \endvartable - - \heading Patch usage - - \table - Property | Description | Required | Default value - Cmu | model coefficient | no | 0.09 - kappa | Von Karman constant | no | 0.41 - E | model coefficient | no | 9.8 - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type epsilonWallFunction; - } - \endverbatim - -SeeAlso - Foam::fixedInternalValueFvPatchField - -SourceFiles - epsilonWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef epsilonWallFunctionFvPatchScalarField_H -#define epsilonWallFunctionFvPatchScalarField_H - -#include "fixedValueFvPatchField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -class turbulenceModel; - -/*---------------------------------------------------------------------------*\ - Class epsilonWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class epsilonWallFunctionFvPatchScalarField -: - public fixedValueFvPatchField<scalar> -{ -protected: - - // Protected data - - //- Tolerance used in weighted calculations - static scalar tolerance_; - - //- Cmu coefficient - scalar Cmu_; - - //- Von Karman constant - scalar kappa_; - - //- E coefficient - scalar E_; - - //- Local copy of turbulence G field - scalarField G_; - - //- Local copy of turbulence epsilon field - scalarField epsilon_; - - //- Initialised flag - bool initialised_; - - //- Master patch ID - label master_; - - //- List of averaging corner weights - List<List<scalar> > cornerWeights_; - - - // Protected Member Functions - - //- Check the type of the patch - virtual void checkType(); - - //- Write local wall function variables - virtual void writeLocalEntries(Ostream&) const; - - //- Set the master patch - master is responsible for updating all - // wall function patches - virtual void setMaster(); - - //- Create the averaging weights for cells which are bounded by - // multiple wall function faces - virtual void createAveragingWeights(); - - //- Helper function to return non-const access to an epsilon patch - virtual epsilonWallFunctionFvPatchScalarField& epsilonPatch - ( - const label patchI - ); - - //- Main driver to calculate the turbulence fields - virtual void calculateTurbulenceFields - ( - const turbulenceModel& turbulence, - scalarField& G0, - scalarField& epsilon0 - ); - - //- Calculate the epsilon and G - virtual void calculate - ( - const turbulenceModel& turbulence, - const List<scalar>& cornerWeights, - const fvPatch& patch, - scalarField& G, - scalarField& epsilon - ); - - //- Return non-const access to the master patch ID - virtual label& master() - { - return master_; - } - - -public: - - //- Runtime type information - TypeName("epsilonWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - epsilonWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - epsilonWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // epsilonWallFunctionFvPatchScalarField - // onto a new patch - epsilonWallFunctionFvPatchScalarField - ( - const epsilonWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - epsilonWallFunctionFvPatchScalarField - ( - const epsilonWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new epsilonWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - epsilonWallFunctionFvPatchScalarField - ( - const epsilonWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new epsilonWallFunctionFvPatchScalarField(*this, iF) - ); - } - - //- Destructor - virtual ~epsilonWallFunctionFvPatchScalarField() - {} - - - // Member functions - - // Access - - //- Return non-const access to the master's G field - scalarField& G(bool init = false); - - //- Return non-const access to the master's epsilon field - scalarField& epsilon(bool init = false); - - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(const scalarField& weights); - - //- Manipulate matrix - virtual void manipulateMatrix(fvMatrix<scalar>& matrix); - - //- Manipulate matrix with given weights - virtual void manipulateMatrix - ( - fvMatrix<scalar>& matrix, - const scalarField& weights - ); - - - // I-O - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C deleted file mode 100644 index 437ea7623..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,252 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "kLowReWallFunctionFvPatchScalarField.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void kLowReWallFunctionFvPatchScalarField::checkType() -{ - if (!isA<wallFvPatch>(patch())) - { - FatalErrorIn("kLowReWallFunctionFvPatchScalarField::checkType()") - << "Invalid wall function specification" << nl - << " Patch type for patch " << patch().name() - << " must be wall" << nl - << " Current patch type is " << patch().type() << nl << endl - << abort(FatalError); - } -} - - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -scalar kLowReWallFunctionFvPatchScalarField::yPlusLam -( - const scalar kappa, - const scalar E -) -{ - scalar ypl = 11.0; - - for (int i=0; i<10; i++) - { - ypl = log(max(E*ypl, 1))/kappa; - } - - return ypl; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchField<scalar>(p, iF), - Cmu_(0.09), - kappa_(0.41), - E_(9.8), - Ceps2_(1.9), - yPlusLam_(yPlusLam(kappa_, E_)) -{ - checkType(); -} - - -kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField -( - const kLowReWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchField<scalar>(ptf, p, iF, mapper), - Cmu_(ptf.Cmu_), - kappa_(ptf.kappa_), - E_(ptf.E_), - Ceps2_(ptf.Ceps2_), - yPlusLam_(ptf.yPlusLam_) -{ - checkType(); -} - - -kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - fixedValueFvPatchField<scalar>(p, iF, dict), - Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)), - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - E_(dict.lookupOrDefault<scalar>("E", 9.8)), - Ceps2_(dict.lookupOrDefault<scalar>("Ceps2", 1.9)), - yPlusLam_(yPlusLam(kappa_, E_)) -{ - checkType(); -} - - -kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField -( - const kLowReWallFunctionFvPatchScalarField& kwfpsf -) -: - fixedValueFvPatchField<scalar>(kwfpsf), - Cmu_(kwfpsf.Cmu_), - kappa_(kwfpsf.kappa_), - E_(kwfpsf.E_), - Ceps2_(kwfpsf.Ceps2_), - yPlusLam_(kwfpsf.yPlusLam_) -{ - checkType(); -} - - -kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField -( - const kLowReWallFunctionFvPatchScalarField& kwfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchField<scalar>(kwfpsf, iF), - Cmu_(kwfpsf.Cmu_), - kappa_(kwfpsf.kappa_), - E_(kwfpsf.E_), - Ceps2_(kwfpsf.Ceps2_), - yPlusLam_(kwfpsf.yPlusLam_) -{ - checkType(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void kLowReWallFunctionFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const label patchI = patch().index(); - - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbulence.y()[patchI]; - - const tmp<volScalarField> tk = turbulence.k(); - const volScalarField& k = tk(); - - const tmp<volScalarField> tnu = turbulence.nu(); - const scalarField& nuw = tnu().boundaryField()[patchI]; - - const scalar Cmu25 = pow025(Cmu_); - - scalarField& kw = *this; - - // Set k wall values - forAll(kw, faceI) - { - label faceCellI = patch().faceCells()[faceI]; - - scalar uTau = Cmu25*sqrt(k[faceCellI]); - - scalar yPlus = uTau*y[faceI]/nuw[faceI]; - - if (yPlus > yPlusLam_) - { - scalar Ck = -0.416; - scalar Bk = 8.366; - kw[faceI] = Ck/kappa_*log(yPlus) + Bk; - } - else - { - scalar C = 11.0; - scalar Cf = (1.0/sqr(yPlus + C) + 2.0*yPlus/pow3(C) - 1.0/sqr(C)); - kw[faceI] = 2400.0/sqr(Ceps2_)*Cf; - } - - kw[faceI] *= sqr(uTau); - } - - fixedValueFvPatchField<scalar>::updateCoeffs(); - - // TODO: perform averaging for cells sharing more than one boundary face -} - - -void kLowReWallFunctionFvPatchScalarField::evaluate -( - const Pstream::commsTypes commsType -) -{ - fixedValueFvPatchField<scalar>::evaluate(commsType); -} - - -void kLowReWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fixedValueFvPatchField<scalar>::write(os); - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; - os.writeKeyword("Ceps2") << Ceps2_ << token::END_STATEMENT << nl; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - kLowReWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.H deleted file mode 100644 index db99287ea..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,207 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::kLowReWallFunctionFvPatchScalarField - -Group - grpIcoWallFunctions - -Description - This boundary condition provides a turbulence kinetic energy wall function - condition for low- and high-Reynolds number turbulent flow cases. - - The model operates in two modes, based on the computed laminar-to-turbulent - switch-over y+ value derived from kappa and E. - - \heading Patch usage - - \table - Property | Description | Required | Default value - Cmu | model coefficient | no | 0.09 - kappa | Von Karman constant | no | 0.41 - E | model coefficient | no | 9.8 - Ceps2 | model coefficient | no | 1.9 - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type kLowReWallFunction; - } - \endverbatim - -SeeAlso - Foam::fixedValueFvPatchField - -SourceFiles - kLowReWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef kLowReWallFunctionFvPatchScalarField_H -#define kLowReWallFunctionFvPatchScalarField_H - -#include "fixedValueFvPatchField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class kLowReWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class kLowReWallFunctionFvPatchScalarField -: - public fixedValueFvPatchField<scalar> -{ -protected: - - // Protected data - - //- Cmu coefficient - scalar Cmu_; - - //- Von Karman constant - scalar kappa_; - - //- E coefficient - scalar E_; - - //- Ceps2 coefficient - scalar Ceps2_; - - //- Y+ at the edge of the laminar sublayer - scalar yPlusLam_; - - - // Protected Member Functions - - //- Check the type of the patch - virtual void checkType(); - - //- Calculate the Y+ at the edge of the laminar sublayer - scalar yPlusLam(const scalar kappa, const scalar E); - - -public: - - //- Runtime type information - TypeName("kLowReWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - kLowReWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - kLowReWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given kLowReWallFunctionFvPatchScalarField - // onto a new patch - kLowReWallFunctionFvPatchScalarField - ( - const kLowReWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - kLowReWallFunctionFvPatchScalarField - ( - const kLowReWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new kLowReWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - kLowReWallFunctionFvPatchScalarField - ( - const kLowReWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new kLowReWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - //- Evaluate the patchField - virtual void evaluate(const Pstream::commsTypes); - - - // I-O - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C deleted file mode 100644 index 9ff2371a6..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C +++ /dev/null @@ -1,150 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "kqRWallFunctionFvPatchField.H" -#include "fvPatchFieldMapper.H" -#include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template<class Type> -void kqRWallFunctionFvPatchField<Type>::checkType() -{ - if (!isA<wallFvPatch>(this->patch())) - { - FatalErrorIn("kqRWallFunctionFvPatchField::checkType()") - << "Invalid wall function specification" << nl - << " Patch type for patch " << this->patch().name() - << " must be wall" << nl - << " Current patch type is " << this->patch().type() - << nl << endl - << abort(FatalError); - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template<class Type> -kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField -( - const fvPatch& p, - const DimensionedField<Type, volMesh>& iF -) -: - zeroGradientFvPatchField<Type>(p, iF) -{ - checkType(); -} - - -template<class Type> -kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField -( - const kqRWallFunctionFvPatchField& ptf, - const fvPatch& p, - const DimensionedField<Type, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - zeroGradientFvPatchField<Type>(ptf, p, iF, mapper) -{ - checkType(); -} - - -template<class Type> -kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField -( - const fvPatch& p, - const DimensionedField<Type, volMesh>& iF, - const dictionary& dict -) -: - zeroGradientFvPatchField<Type>(p, iF, dict) -{ - checkType(); -} - - -template<class Type> -kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField -( - const kqRWallFunctionFvPatchField& tkqrwfpf -) -: - zeroGradientFvPatchField<Type>(tkqrwfpf) -{ - checkType(); -} - - -template<class Type> -kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField -( - const kqRWallFunctionFvPatchField& tkqrwfpf, - const DimensionedField<Type, volMesh>& iF -) -: - zeroGradientFvPatchField<Type>(tkqrwfpf, iF) -{ - checkType(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template<class Type> -void kqRWallFunctionFvPatchField<Type>::evaluate -( - const Pstream::commsTypes commsType -) -{ - zeroGradientFvPatchField<Type>::evaluate(commsType); -} - - -template<class Type> -void kqRWallFunctionFvPatchField<Type>::write(Ostream& os) const -{ - zeroGradientFvPatchField<Type>::write(os); - this->writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H deleted file mode 100644 index e9b3731de..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H +++ /dev/null @@ -1,185 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::kqRWallFunctionFvPatchField - -Group - grpIcoWallFunctions - -Description - This boundary condition provides a suitable condition for turbulence - \c k, \c q, and \c R fields for the case of high Reynolds number flow using - wall functions. - - It is a simple wrapper around the zero-gradient condition. - - \heading Patch usage - - Example of the boundary condition specification: - \verbatim - myPatch - { - type kqRWallFunction; - } - \endverbatim - -SeeAlso - Foam::zeroGradientFvPatchField - -SourceFiles - kqRWallFunctionFvPatchField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef kqRWallFunctionFvPatchField_H -#define kqRWallFunctionFvPatchField_H - -#include "zeroGradientFvPatchField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class kqRWallFunctionFvPatchField Declaration -\*---------------------------------------------------------------------------*/ - -template<class Type> -class kqRWallFunctionFvPatchField -: - public zeroGradientFvPatchField<Type> -{ - - // Private Member Functions - - //- Check the type of the patch - void checkType(); - - -public: - - //- Runtime type information - TypeName("kqRWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - kqRWallFunctionFvPatchField - ( - const fvPatch&, - const DimensionedField<Type, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - kqRWallFunctionFvPatchField - ( - const fvPatch&, - const DimensionedField<Type, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // kqRWallFunctionFvPatchField - // onto a new patch - kqRWallFunctionFvPatchField - ( - const kqRWallFunctionFvPatchField&, - const fvPatch&, - const DimensionedField<Type, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - kqRWallFunctionFvPatchField - ( - const kqRWallFunctionFvPatchField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchField<Type> > clone() const - { - return tmp<fvPatchField<Type> > - ( - new kqRWallFunctionFvPatchField(*this) - ); - } - - //- Construct as copy setting internal field reference - kqRWallFunctionFvPatchField - ( - const kqRWallFunctionFvPatchField&, - const DimensionedField<Type, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchField<Type> > clone - ( - const DimensionedField<Type, volMesh>& iF - ) const - { - return tmp<fvPatchField<Type> > - ( - new kqRWallFunctionFvPatchField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Evaluate the patchField - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::Pstream::blocking - ); - - - // I-O - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository -# include "kqRWallFunctionFvPatchField.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.C deleted file mode 100644 index 9465bdf18..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.C +++ /dev/null @@ -1,47 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "kqRWallFunctionFvPatchFields.H" -#include "fvPatchFields.H" -#include "addToRunTimeSelectionTable.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -makePatchFields(kqRWallFunction); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.H deleted file mode 100644 index b9a2727f3..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchFields.H +++ /dev/null @@ -1,52 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#ifndef kqRWallFunctionFvPatchFields_H -#define kqRWallFunctionFvPatchFields_H - -#include "kqRWallFunctionFvPatchField.H" -#include "fieldTypes.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeFieldTypedefs(kqRWallFunction); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.C deleted file mode 100644 index a0e340bf4..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,131 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "nutLowReWallFunctionFvPatchScalarField.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -tmp<scalarField> nutLowReWallFunctionFvPatchScalarField::calcNut() const -{ - return tmp<scalarField>(new scalarField(patch().size(), 0.0)); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -nutLowReWallFunctionFvPatchScalarField::nutLowReWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - nutWallFunctionFvPatchScalarField(p, iF) -{} - - -nutLowReWallFunctionFvPatchScalarField::nutLowReWallFunctionFvPatchScalarField -( - const nutLowReWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) -{} - - -nutLowReWallFunctionFvPatchScalarField::nutLowReWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - nutWallFunctionFvPatchScalarField(p, iF, dict) -{} - - -nutLowReWallFunctionFvPatchScalarField::nutLowReWallFunctionFvPatchScalarField -( - const nutLowReWallFunctionFvPatchScalarField& nlrwfpsf -) -: - nutWallFunctionFvPatchScalarField(nlrwfpsf) -{} - - -nutLowReWallFunctionFvPatchScalarField::nutLowReWallFunctionFvPatchScalarField -( - const nutLowReWallFunctionFvPatchScalarField& nlrwfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - nutWallFunctionFvPatchScalarField(nlrwfpsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<scalarField> nutLowReWallFunctionFvPatchScalarField::yPlus() const -{ - const label patchi = patch().index(); - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbModel.y()[patchi]; - const tmp<volScalarField> tnu = turbModel.nu(); - const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchi]; - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; - - return y*sqrt(nuw*mag(Uw.snGrad()))/nuw; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - nutLowReWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.H deleted file mode 100644 index f79533c20..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,166 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::nutLowReWallFunctionFvPatchScalarField - -Group - grpIcoWallFunctions - -Description - This boundary condition provides a turbulent kinematic viscosity condition - for use with low Reynolds number models. It sets \c nut to zero, and - provides an access function to calculate y+. - - \heading Patch usage - - Example of the boundary condition specification: - \verbatim - myPatch - { - type nutLowReWallFunction; - } - \endverbatim - -SeeAlso - Foam::nutWallFunctionFvPatchScalarField - -SourceFiles - nutLowReWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef nutLowReWallFunctionFvPatchScalarField_H -#define nutLowReWallFunctionFvPatchScalarField_H - -#include "nutWallFunctionFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class nutLowReWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class nutLowReWallFunctionFvPatchScalarField -: - public nutWallFunctionFvPatchScalarField -{ -protected: - - // Protected Member Functions - - //- Calculate the turbulence viscosity - virtual tmp<scalarField> calcNut() const; - - -public: - - //- Runtime type information - TypeName("nutLowReWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - nutLowReWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - nutLowReWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // nutLowReWallFunctionFvPatchScalarField - // onto a new patch - nutLowReWallFunctionFvPatchScalarField - ( - const nutLowReWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - nutLowReWallFunctionFvPatchScalarField - ( - const nutLowReWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new nutLowReWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - nutLowReWallFunctionFvPatchScalarField - ( - const nutLowReWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new nutLowReWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - //- Calculate and return the yPlus at the boundary - virtual tmp<scalarField> yPlus() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C deleted file mode 100644 index fb992f1e9..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,313 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "nutURoughWallFunctionFvPatchScalarField.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -tmp<scalarField> nutURoughWallFunctionFvPatchScalarField::calcNut() const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbModel.y()[patchi]; - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; - const tmp<volScalarField> tnu = turbModel.nu(); - const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchi]; - - // The flow velocity at the adjacent cell centre - const scalarField magUp(mag(Uw.patchInternalField() - Uw)); - - tmp<scalarField> tyPlus = calcYPlus(magUp); - scalarField& yPlus = tyPlus(); - - tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); - scalarField& nutw = tnutw(); - - forAll(yPlus, facei) - { - if (yPlus[facei] > yPlusLam_) - { - const scalar Re = magUp[facei]*y[facei]/nuw[facei] + ROOTVSMALL; - nutw[facei] = nuw[facei]*(sqr(yPlus[facei])/Re - 1); - } - } - - return tnutw; -} - - -tmp<scalarField> nutURoughWallFunctionFvPatchScalarField::calcYPlus -( - const scalarField& magUp -) const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbModel.y()[patchi]; - const tmp<volScalarField> tnu = turbModel.nu(); - const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchi]; - - tmp<scalarField> tyPlus(new scalarField(patch().size(), 0.0)); - scalarField& yPlus = tyPlus(); - - if (roughnessHeight_ > 0.0) - { - // Rough Walls - const scalar c_1 = 1/(90 - 2.25) + roughnessConstant_; - static const scalar c_2 = 2.25/(90 - 2.25); - static const scalar c_3 = 2.0*atan(1.0)/log(90/2.25); - static const scalar c_4 = c_3*log(2.25); - - //if (KsPlusBasedOnYPlus_) - { - // If KsPlus is based on YPlus the extra term added to the law - // of the wall will depend on yPlus - forAll(yPlus, facei) - { - const scalar magUpara = magUp[facei]; - const scalar Re = magUpara*y[facei]/nuw[facei]; - const scalar kappaRe = kappa_*Re; - - scalar yp = yPlusLam_; - const scalar ryPlusLam = 1.0/yp; - - int iter = 0; - scalar yPlusLast = 0.0; - scalar dKsPlusdYPlus = roughnessHeight_/y[facei]; - - // Enforce the roughnessHeight to be less than the distance to - // the first cell centre - if (dKsPlusdYPlus > 1) - { - dKsPlusdYPlus = 1; - } - - // Additional tuning parameter - nominally = 1 - dKsPlusdYPlus *= roughnessFactor_; - - do - { - yPlusLast = yp; - - // The non-dimensional roughness height - scalar KsPlus = yp*dKsPlusdYPlus; - - // The extra term in the law-of-the-wall - scalar G = 0.0; - - scalar yPlusGPrime = 0.0; - - if (KsPlus >= 90) - { - const scalar t_1 = 1 + roughnessConstant_*KsPlus; - G = log(t_1); - yPlusGPrime = roughnessConstant_*KsPlus/t_1; - } - else if (KsPlus > 2.25) - { - const scalar t_1 = c_1*KsPlus - c_2; - const scalar t_2 = c_3*log(KsPlus) - c_4; - const scalar sint_2 = sin(t_2); - const scalar logt_1 = log(t_1); - G = logt_1*sint_2; - yPlusGPrime = - (c_1*sint_2*KsPlus/t_1) + (c_3*logt_1*cos(t_2)); - } - - scalar denom = 1.0 + log(E_*yp) - G - yPlusGPrime; - if (mag(denom) > VSMALL) - { - yp = (kappaRe + yp*(1 - yPlusGPrime))/denom; - } - } while - ( - mag(ryPlusLam*(yp - yPlusLast)) > 0.0001 - && ++iter < 10 - && yp > VSMALL - ); - - yPlus[facei] = max(0.0, yp); - } - } - } - else - { - // Smooth Walls - forAll(yPlus, facei) - { - const scalar magUpara = magUp[facei]; - const scalar Re = magUpara*y[facei]/nuw[facei]; - const scalar kappaRe = kappa_*Re; - - scalar yp = yPlusLam_; - const scalar ryPlusLam = 1.0/yp; - - int iter = 0; - scalar yPlusLast = 0.0; - - do - { - yPlusLast = yp; - yp = (kappaRe + yp)/(1.0 + log(E_*yp)); - - } while (mag(ryPlusLam*(yp - yPlusLast)) > 0.0001 && ++iter < 10); - - yPlus[facei] = max(0.0, yp); - } - } - - return tyPlus; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - nutWallFunctionFvPatchScalarField(p, iF), - roughnessHeight_(pTraits<scalar>::zero), - roughnessConstant_(pTraits<scalar>::zero), - roughnessFactor_(pTraits<scalar>::zero) -{} - - -nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField -( - const nutURoughWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper), - roughnessHeight_(ptf.roughnessHeight_), - roughnessConstant_(ptf.roughnessConstant_), - roughnessFactor_(ptf.roughnessFactor_) -{} - - -nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - nutWallFunctionFvPatchScalarField(p, iF, dict), - roughnessHeight_(readScalar(dict.lookup("roughnessHeight"))), - roughnessConstant_(readScalar(dict.lookup("roughnessConstant"))), - roughnessFactor_(readScalar(dict.lookup("roughnessFactor"))) -{} - - -nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField -( - const nutURoughWallFunctionFvPatchScalarField& rwfpsf -) -: - nutWallFunctionFvPatchScalarField(rwfpsf), - roughnessHeight_(rwfpsf.roughnessHeight_), - roughnessConstant_(rwfpsf.roughnessConstant_), - roughnessFactor_(rwfpsf.roughnessFactor_) -{} - - -nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField -( - const nutURoughWallFunctionFvPatchScalarField& rwfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - nutWallFunctionFvPatchScalarField(rwfpsf, iF), - roughnessHeight_(rwfpsf.roughnessHeight_), - roughnessConstant_(rwfpsf.roughnessConstant_), - roughnessFactor_(rwfpsf.roughnessFactor_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<scalarField> nutURoughWallFunctionFvPatchScalarField::yPlus() const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; - tmp<scalarField> magUp = mag(Uw.patchInternalField() - Uw); - - return calcYPlus(magUp()); -} - - -void nutURoughWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fvPatchField<scalar>::write(os); - writeLocalEntries(os); - os.writeKeyword("roughnessHeight") - << roughnessHeight_ << token::END_STATEMENT << nl; - os.writeKeyword("roughnessConstant") - << roughnessConstant_ << token::END_STATEMENT << nl; - os.writeKeyword("roughnessFactor") - << roughnessFactor_ << token::END_STATEMENT << nl; - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - nutURoughWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.H deleted file mode 100644 index 17adf6f90..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,241 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::nutURoughWallFunctionFvPatchScalarField - -Group - grpIcoWallFunctions - -Description - This boundary condition provides a turbulent kinematic viscosity condition - when using wall functions for rough walls, based on velocity. - - \heading Patch usage - - \table - Property | Description | Required | Default value - roughnessHeight | roughness height | yes | - roughnessConstant | roughness constanr | yes | - roughnessFactor | scaling factor | yes | - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type nutURoughWallFunction; - roughnessHeight 1e-5; - roughnessConstant 0.5; - roughnessFactor 1; - } - \endverbatim - -SeeAlso - Foam::nutWallFunctionFvPatchScalarField - -SourceFiles - nutURoughWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef nutURoughWallFunctionFvPatchScalarField_H -#define nutURoughWallFunctionFvPatchScalarField_H - -#include "nutWallFunctionFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class nutURoughWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class nutURoughWallFunctionFvPatchScalarField -: - public nutWallFunctionFvPatchScalarField -{ - // Private data - - // Roughness model parameters - - //- Height - scalar roughnessHeight_; - - //- Constant - scalar roughnessConstant_; - - //- Scale factor - scalar roughnessFactor_; - - - // Protected Member Functions - - //- Calculate yPLus - virtual tmp<scalarField> calcYPlus(const scalarField& magUp) const; - - //- Calculate the turbulence viscosity - virtual tmp<scalarField> calcNut() const; - - -public: - - //- Runtime type information - TypeName("nutURoughWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - nutURoughWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - nutURoughWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // nutURoughWallFunctionFvPatchScalarField - // onto a new patch - nutURoughWallFunctionFvPatchScalarField - ( - const nutURoughWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - nutURoughWallFunctionFvPatchScalarField - ( - const nutURoughWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new nutURoughWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - nutURoughWallFunctionFvPatchScalarField - ( - const nutURoughWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new nutURoughWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Access - - //- Return the roughness height - scalar roughnessHeight() const - { - return roughnessHeight_; - } - - //- Return reference to the roughness height to allow adjustment - scalar& roughnessHeight() - { - return roughnessHeight_; - } - - - //- Return the roughness constant scale - scalar roughnessConstant() const - { - return roughnessConstant_; - } - - //- Return reference to the roughness constant to allow adjustment - scalar& roughnessConstant() - { - return roughnessConstant_; - } - - //- Return the roughness scale factor - scalar roughnessFactor() const - { - return roughnessFactor_; - } - - //- Return reference to the roughness scale factor to allow - // adjustment - scalar& roughnessFactor() - { - return roughnessFactor_; - } - - - // I-O - - // Evaluation functions - - //- Calculate and return the yPlus at the boundary - virtual tmp<scalarField> yPlus() const; - - - // I-O - - //- Write - virtual void write(Ostream& os) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C deleted file mode 100644 index 7dca54b3e..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,220 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "nutUSpaldingWallFunctionFvPatchScalarField.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcNut() const -{ - const label patchI = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchI]; - const scalarField magGradU(mag(Uw.snGrad())); - const tmp<volScalarField> tnu = turbModel.nu(); - const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchI]; - - return max - ( - scalar(0), - sqr(calcUTau(magGradU))/(magGradU + ROOTVSMALL) - nuw - ); -} - - -tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcUTau -( - const scalarField& magGradU -) const -{ - const label patchI = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbModel.y()[patchI]; - - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchI]; - const scalarField magUp(mag(Uw.patchInternalField() - Uw)); - - const tmp<volScalarField> tnu = turbModel.nu(); - const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchI]; - - const scalarField& nutw = *this; - - tmp<scalarField> tuTau(new scalarField(patch().size(), 0.0)); - scalarField& uTau = tuTau(); - - forAll(uTau, faceI) - { - scalar ut = sqrt((nutw[faceI] + nuw[faceI])*magGradU[faceI]); - - if (ut > ROOTVSMALL) - { - int iter = 0; - scalar err = GREAT; - - do - { - scalar kUu = min(kappa_*magUp[faceI]/ut, 50); - scalar fkUu = exp(kUu) - 1 - kUu*(1 + 0.5*kUu); - - scalar f = - - ut*y[faceI]/nuw[faceI] - + magUp[faceI]/ut - + 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu)); - - scalar df = - y[faceI]/nuw[faceI] - + magUp[faceI]/sqr(ut) - + 1/E_*kUu*fkUu/ut; - - scalar uTauNew = ut + f/df; - err = mag((ut - uTauNew)/ut); - ut = uTauNew; - - } while (ut > ROOTVSMALL && err > 0.01 && ++iter < 10); - - uTau[faceI] = max(0.0, ut); - } - } - - return tuTau; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -nutUSpaldingWallFunctionFvPatchScalarField:: -nutUSpaldingWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - nutWallFunctionFvPatchScalarField(p, iF) -{} - - -nutUSpaldingWallFunctionFvPatchScalarField:: -nutUSpaldingWallFunctionFvPatchScalarField -( - const nutUSpaldingWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) -{} - - -nutUSpaldingWallFunctionFvPatchScalarField:: -nutUSpaldingWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - nutWallFunctionFvPatchScalarField(p, iF, dict) -{} - - -nutUSpaldingWallFunctionFvPatchScalarField:: -nutUSpaldingWallFunctionFvPatchScalarField -( - const nutUSpaldingWallFunctionFvPatchScalarField& wfpsf -) -: - nutWallFunctionFvPatchScalarField(wfpsf) -{} - - -nutUSpaldingWallFunctionFvPatchScalarField:: -nutUSpaldingWallFunctionFvPatchScalarField -( - const nutUSpaldingWallFunctionFvPatchScalarField& wfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - nutWallFunctionFvPatchScalarField(wfpsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::yPlus() const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbModel.y()[patchi]; - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; - const tmp<volScalarField> tnu = turbModel.nu(); - const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchi]; - - return y*calcUTau(mag(Uw.snGrad()))/nuw; -} - - -void nutUSpaldingWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fvPatchField<scalar>::write(os); - writeLocalEntries(os); - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - nutUSpaldingWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.H deleted file mode 100644 index 210de4583..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,190 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::nutUSpaldingWallFunctionFvPatchScalarField - -Group - grpIcoWallFunctions - -Description - This boundary condition provides a turbulent kinematic viscosity condition - when using wall functions for rough walls, based on velocity, using - Spalding's law to give a continuous nut profile to the wall (y+ = 0) - - \f[ - y^+ = u^+ + \frac{1}{E} \left[exp(\kappa u^+) - 1 - \kappa u^+\, - - 0.5 (\kappa u^+)^2 - \frac{1}{6} (\kappa u^+)^3\right] - \f] - - where - \vartable - y^+ | non-dimensional position - u^+ | non-dimensional velocity - \kappa | Von Karman constant - \endvartable - - - \heading Patch usage - - Example of the boundary condition specification: - \verbatim - myPatch - { - type nutUSpaldingWallFunction; - } - \endverbatim - -SeeAlso - Foam::nutWallFunctionFvPatchScalarField - -SourceFiles - nutUSpaldingWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef nutUSpaldingWallFunctionFvPatchScalarField_H -#define nutUSpaldingWallFunctionFvPatchScalarField_H - -#include "nutWallFunctionFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class nutUSpaldingWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class nutUSpaldingWallFunctionFvPatchScalarField -: - public nutWallFunctionFvPatchScalarField -{ -protected: - - // Protected Member Functions - - //- Calculate the turbulence viscosity - virtual tmp<scalarField> calcNut() const; - - //- Calculate the friction velocity - virtual tmp<scalarField> calcUTau(const scalarField& magGradU) const; - - -public: - - //- Runtime type information - TypeName("nutUSpaldingWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - nutUSpaldingWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - nutUSpaldingWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // nutUSpaldingWallFunctionFvPatchScalarField - // onto a new patch - nutUSpaldingWallFunctionFvPatchScalarField - ( - const nutUSpaldingWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - nutUSpaldingWallFunctionFvPatchScalarField - ( - const nutUSpaldingWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new nutUSpaldingWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - nutUSpaldingWallFunctionFvPatchScalarField - ( - const nutUSpaldingWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new nutUSpaldingWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Calculate and return the yPlus at the boundary - virtual tmp<scalarField> yPlus() const; - - - // I-O - - //- Write - virtual void write(Ostream& os) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C deleted file mode 100644 index 63bab8147..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,218 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "nutUTabulatedWallFunctionFvPatchScalarField.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -tmp<scalarField> nutUTabulatedWallFunctionFvPatchScalarField::calcNut() const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbModel.y()[patchi]; - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; - const scalarField magUp(mag(Uw.patchInternalField() - Uw)); - const scalarField magGradU(mag(Uw.snGrad())); - const tmp<volScalarField> tnu = turbModel.nu(); - const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchi]; - - return - max - ( - scalar(0), - sqr(magUp/(calcUPlus(magUp*y/nuw) + ROOTVSMALL)) - /(magGradU + ROOTVSMALL) - - nuw - ); -} - - -tmp<scalarField> nutUTabulatedWallFunctionFvPatchScalarField::calcUPlus -( - const scalarField& Rey -) const -{ - tmp<scalarField> tuPlus(new scalarField(patch().size(), 0.0)); - scalarField& uPlus = tuPlus(); - - forAll(uPlus, faceI) - { - uPlus[faceI] = uPlusTable_.interpolateLog10(Rey[faceI]); - } - - return tuPlus; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -nutUTabulatedWallFunctionFvPatchScalarField:: -nutUTabulatedWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - nutWallFunctionFvPatchScalarField(p, iF), - uPlusTableName_("undefined-uPlusTableName"), - uPlusTable_ - ( - IOobject - ( - uPlusTableName_, - patch().boundaryMesh().mesh().time().constant(), - patch().boundaryMesh().mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - false - ) -{} - - -nutUTabulatedWallFunctionFvPatchScalarField:: -nutUTabulatedWallFunctionFvPatchScalarField -( - const nutUTabulatedWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper), - uPlusTableName_(ptf.uPlusTableName_), - uPlusTable_(ptf.uPlusTable_) -{} - - -nutUTabulatedWallFunctionFvPatchScalarField:: -nutUTabulatedWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - nutWallFunctionFvPatchScalarField(p, iF, dict), - uPlusTableName_(dict.lookup("uPlusTable")), - uPlusTable_ - ( - IOobject - ( - uPlusTableName_, - patch().boundaryMesh().mesh().time().constant(), - patch().boundaryMesh().mesh(), - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ), - true - ) -{} - - -nutUTabulatedWallFunctionFvPatchScalarField:: -nutUTabulatedWallFunctionFvPatchScalarField -( - const nutUTabulatedWallFunctionFvPatchScalarField& wfpsf -) -: - nutWallFunctionFvPatchScalarField(wfpsf), - uPlusTableName_(wfpsf.uPlusTableName_), - uPlusTable_(wfpsf.uPlusTable_) -{} - - -nutUTabulatedWallFunctionFvPatchScalarField:: -nutUTabulatedWallFunctionFvPatchScalarField -( - const nutUTabulatedWallFunctionFvPatchScalarField& wfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - nutWallFunctionFvPatchScalarField(wfpsf, iF), - uPlusTableName_(wfpsf.uPlusTableName_), - uPlusTable_(wfpsf.uPlusTable_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<scalarField> nutUTabulatedWallFunctionFvPatchScalarField::yPlus() const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbModel.y()[patchi]; - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; - const scalarField magUp(mag(Uw.patchInternalField() - Uw)); - const tmp<volScalarField> tnu = turbModel.nu(); - const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchi]; - const scalarField Rey(magUp*y/nuw); - - return Rey/(calcUPlus(Rey) + ROOTVSMALL); -} - - -void nutUTabulatedWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fvPatchField<scalar>::write(os); - os.writeKeyword("uPlusTable") << uPlusTableName_ - << token::END_STATEMENT << nl; - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - nutUTabulatedWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.H deleted file mode 100644 index f4f3d9a8f..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,198 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::nutUTabulatedWallFunctionFvPatchScalarField - -Group - grpIcoWallFunctions - -Description - This boundary condition provides a turbulent kinematic viscosity condition - when using wall functions. As input, the user specifies a look-up table - of U+ as a function of near-wall Reynolds number. The table should be - located in the $FOAM_CASE/constant directory. - - \heading Patch usage - - \table - Property | Description | Required | Default value - uPlusTable | U+ as a function of Re table name | yes | - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type nutTabulatedWallFunction; - uPlusTable myUPlusTable; - } - \endverbatim - -Note - The tables are not registered since the same table object may be used for - more than one patch. - -SeeAlso - Foam::nutWallFunctionFvPatchScalarField - -SourceFiles - nutUTabulatedWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef nutUTabulatedWallFunctionFvPatchScalarField_H -#define nutUTabulatedWallFunctionFvPatchScalarField_H - -#include "nutWallFunctionFvPatchScalarField.H" -#include "uniformInterpolationTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class nutUTabulatedWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class nutUTabulatedWallFunctionFvPatchScalarField -: - public nutWallFunctionFvPatchScalarField -{ -protected: - - // Protected data - - //- Name of u+ table - word uPlusTableName_; - - //- U+ table - uniformInterpolationTable<scalar> uPlusTable_; - - - // Protected Member Functions - - //- Calculate the turbulence viscosity - virtual tmp<scalarField> calcNut() const; - - //- Calculate wall u+ from table - virtual tmp<scalarField> calcUPlus(const scalarField& Rey) const; - - -public: - - //- Runtime type information - TypeName("nutTabulatedWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - nutUTabulatedWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - nutUTabulatedWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // nutUTabulatedWallFunctionFvPatchScalarField - // onto a new patch - nutUTabulatedWallFunctionFvPatchScalarField - ( - const nutUTabulatedWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - nutUTabulatedWallFunctionFvPatchScalarField - ( - const nutUTabulatedWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new nutUTabulatedWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - nutUTabulatedWallFunctionFvPatchScalarField - ( - const nutUTabulatedWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new nutUTabulatedWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Calculate and return the yPlus at the boundary - virtual tmp<scalarField> yPlus() const; - - - // I-O - - //- Write - virtual void write(Ostream& os) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C deleted file mode 100644 index 3b34b46df..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,202 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "nutUWallFunctionFvPatchScalarField.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -tmp<scalarField> nutUWallFunctionFvPatchScalarField::calcNut() const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; - const scalarField magUp(mag(Uw.patchInternalField() - Uw)); - const tmp<volScalarField> tnu = turbModel.nu(); - const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchi]; - - tmp<scalarField> tyPlus = calcYPlus(magUp); - scalarField& yPlus = tyPlus(); - - tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); - scalarField& nutw = tnutw(); - - forAll(yPlus, facei) - { - if (yPlus[facei] > yPlusLam_) - { - nutw[facei] = - nuw[facei]*(yPlus[facei]*kappa_/log(E_*yPlus[facei]) - 1.0); - } - } - - return tnutw; -} - - -tmp<scalarField> nutUWallFunctionFvPatchScalarField::calcYPlus -( - const scalarField& magUp -) const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbModel.y()[patchi]; - const tmp<volScalarField> tnu = turbModel.nu(); - const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchi]; - - tmp<scalarField> tyPlus(new scalarField(patch().size(), 0.0)); - scalarField& yPlus = tyPlus(); - - forAll(yPlus, facei) - { - scalar kappaRe = kappa_*magUp[facei]*y[facei]/nuw[facei]; - - scalar yp = yPlusLam_; - scalar ryPlusLam = 1.0/yp; - - int iter = 0; - scalar yPlusLast = 0.0; - - do - { - yPlusLast = yp; - yp = (kappaRe + yp)/(1.0 + log(E_*yp)); - - } while (mag(ryPlusLam*(yp - yPlusLast)) > 0.01 && ++iter < 10 ); - - yPlus[facei] = max(0.0, yp); - } - - return tyPlus; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - nutWallFunctionFvPatchScalarField(p, iF) -{} - - -nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField -( - const nutUWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) -{} - - -nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - nutWallFunctionFvPatchScalarField(p, iF, dict) -{} - - -nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField -( - const nutUWallFunctionFvPatchScalarField& sawfpsf -) -: - nutWallFunctionFvPatchScalarField(sawfpsf) -{} - - -nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField -( - const nutUWallFunctionFvPatchScalarField& sawfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - nutWallFunctionFvPatchScalarField(sawfpsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<scalarField> nutUWallFunctionFvPatchScalarField::yPlus() const -{ - const label patchi = patch().index(); - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; - const scalarField magUp(mag(Uw.patchInternalField() - Uw)); - - return calcYPlus(magUp); -} - - -void nutUWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fvPatchField<scalar>::write(os); - writeLocalEntries(os); - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - nutUWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.H deleted file mode 100644 index 0a34ad6fa..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,176 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::nutUWallFunctionFvPatchScalarField - -Group - grpIcoWallFunctions - -Description - This boundary condition provides a turbulent kinematic viscosity condition - when using wall functions, based on velocity. - - \heading Patch usage - - Example of the boundary condition specification: - \verbatim - myPatch - { - type nutUWallFunction; - } - \endverbatim - -SeeAlso - Foam::nutWallFunctionFvPatchScalarField - -SourceFiles - nutUWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef nutUWallFunctionFvPatchScalarField_H -#define nutUWallFunctionFvPatchScalarField_H - -#include "nutWallFunctionFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class nutUWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class nutUWallFunctionFvPatchScalarField -: - public nutWallFunctionFvPatchScalarField -{ -protected: - - // Protected Member Functions - - //- Calculate yPLus - virtual tmp<scalarField> calcYPlus(const scalarField& magUp) const; - - //- Calculate the turbulence viscosity - virtual tmp<scalarField> calcNut() const; - - -public: - - //- Runtime type information - TypeName("nutUWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - nutUWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - nutUWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // nutUWallFunctionFvPatchScalarField - // onto a new patch - nutUWallFunctionFvPatchScalarField - ( - const nutUWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - nutUWallFunctionFvPatchScalarField - ( - const nutUWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new nutUWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - nutUWallFunctionFvPatchScalarField - ( - const nutUWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new nutUWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Calculate and return the yPlus at the boundary - virtual tmp<scalarField> yPlus() const; - - - // I-O - - //- Write - virtual void write(Ostream& os) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C deleted file mode 100644 index 3b8749974..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,197 +0,0 @@ -/*---------------------------------------------------------------------------* \ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "nutWallFunctionFvPatchScalarField.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "wallFvPatch.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -defineTypeNameAndDebug(nutWallFunctionFvPatchScalarField, 0); - - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -void nutWallFunctionFvPatchScalarField::checkType() -{ - if (!isA<wallFvPatch>(patch())) - { - FatalErrorIn("nutWallFunctionFvPatchScalarField::checkType()") - << "Invalid wall function specification" << nl - << " Patch type for patch " << patch().name() - << " must be wall" << nl - << " Current patch type is " << patch().type() << nl << endl - << abort(FatalError); - } -} - - -void nutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const -{ - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchScalarField(p, iF), - Cmu_(0.09), - kappa_(0.41), - E_(9.8), - yPlusLam_(yPlusLam(kappa_, E_)) -{ - checkType(); -} - - -nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField -( - const nutWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchScalarField(ptf, p, iF, mapper), - Cmu_(ptf.Cmu_), - kappa_(ptf.kappa_), - E_(ptf.E_), - yPlusLam_(ptf.yPlusLam_) -{ - checkType(); -} - - -nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - fixedValueFvPatchScalarField(p, iF, dict), - Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)), - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - E_(dict.lookupOrDefault<scalar>("E", 9.8)), - yPlusLam_(yPlusLam(kappa_, E_)) -{ - checkType(); -} - - -nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField -( - const nutWallFunctionFvPatchScalarField& wfpsf -) -: - fixedValueFvPatchScalarField(wfpsf), - Cmu_(wfpsf.Cmu_), - kappa_(wfpsf.kappa_), - E_(wfpsf.E_), - yPlusLam_(wfpsf.yPlusLam_) -{ - checkType(); -} - - -nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField -( - const nutWallFunctionFvPatchScalarField& wfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchScalarField(wfpsf, iF), - Cmu_(wfpsf.Cmu_), - kappa_(wfpsf.kappa_), - E_(wfpsf.E_), - yPlusLam_(wfpsf.yPlusLam_) -{ - checkType(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -scalar nutWallFunctionFvPatchScalarField::yPlusLam -( - const scalar kappa, - const scalar E -) -{ - scalar ypl = 11.0; - - for (int i=0; i<10; i++) - { - ypl = log(max(E*ypl, 1))/kappa; - } - - return ypl; -} - - -void nutWallFunctionFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - operator==(calcNut()); - - fixedValueFvPatchScalarField::updateCoeffs(); -} - - -void nutWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fvPatchField<scalar>::write(os); - writeLocalEntries(os); - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H deleted file mode 100644 index de68000bd..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,181 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::nutWallFunctionFvPatchScalarField - -Group - grpIcoWallFunctions - -Description - This boundary condition provides a turbulent kinematic viscosity condition - when using wall functions, based on turbulence kinetic energy. - - replicates OpenFOAM v1.5 (and earlier) behaviour - - \heading Patch usage - - Example of the boundary condition specification: - \verbatim - myPatch - { - type nutWallFunction; - } - \endverbatim - -SeeAlso - Foam::fixedValueFvPatchField - -SourceFiles - nutWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef nutWallFunctionFvPatchScalarField_H -#define nutWallFunctionFvPatchScalarField_H - -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class nutWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class nutWallFunctionFvPatchScalarField -: - public fixedValueFvPatchScalarField -{ -protected: - - // Protected data - - //- Cmu coefficient - scalar Cmu_; - - //- Von Karman constant - scalar kappa_; - - //- E coefficient - scalar E_; - - //- Y+ at the edge of the laminar sublayer - scalar yPlusLam_; - - - // Protected Member Functions - - //- Check the type of the patch - virtual void checkType(); - - //- Calculate the turbulence viscosity - virtual tmp<scalarField> calcNut() const = 0; - - //- Write local wall function variables - virtual void writeLocalEntries(Ostream&) const; - - -public: - - //- Runtime type information - TypeName("nutWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - nutWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - nutWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // nutWallFunctionFvPatchScalarField - // onto a new patch - nutWallFunctionFvPatchScalarField - ( - const nutWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - nutWallFunctionFvPatchScalarField - ( - const nutWallFunctionFvPatchScalarField& - ); - - //- Construct as copy setting internal field reference - nutWallFunctionFvPatchScalarField - ( - const nutWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - - // Member functions - - //- Calculate the Y+ at the edge of the laminar sublayer - static scalar yPlusLam(const scalar kappa, const scalar E); - - //- Calculate and return the yPlus at the boundary - virtual tmp<scalarField> yPlus() const = 0; - - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - - // I-O - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C deleted file mode 100644 index 9e724596b..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,197 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "nutkAtmRoughWallFunctionFvPatchScalarField.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -tmp<scalarField> nutkAtmRoughWallFunctionFvPatchScalarField::calcNut() const -{ - const label patchI = patch().index(); - - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbulence.y()[patchI]; - const tmp<volScalarField> tk = turbulence.k(); - const volScalarField& k = tk(); - const tmp<volScalarField> tnu = turbulence.nu(); - const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchI]; - - const scalar Cmu25 = pow025(Cmu_); - - tmp<scalarField> tnutw(new scalarField(*this)); - scalarField& nutw = tnutw(); - - forAll(nutw, faceI) - { - label faceCellI = patch().faceCells()[faceI]; - - scalar uStar = Cmu25*sqrt(k[faceCellI]); - scalar yPlus = uStar*y[faceI]/nuw[faceI]; - - scalar Edash = (y[faceI] + z0_[faceI])/(z0_[faceI] + 1e-4); - - nutw[faceI] = - nuw[faceI]*(yPlus*kappa_/log(max(Edash, 1 + 1e-4)) - 1); - - if (debug) - { - Info<< "yPlus = " << yPlus - << ", Edash = " << Edash - << ", nutw = " << nutw[faceI] - << endl; - } - } - - return tnutw; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -nutkAtmRoughWallFunctionFvPatchScalarField:: -nutkAtmRoughWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - nutkWallFunctionFvPatchScalarField(p, iF), - z0_(p.size(), 0.0) -{} - - -nutkAtmRoughWallFunctionFvPatchScalarField:: -nutkAtmRoughWallFunctionFvPatchScalarField -( - const nutkAtmRoughWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper), - z0_(ptf.z0_, mapper) -{} - - -nutkAtmRoughWallFunctionFvPatchScalarField:: -nutkAtmRoughWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - nutkWallFunctionFvPatchScalarField(p, iF, dict), - z0_("z0", dict, p.size()) -{} - - -nutkAtmRoughWallFunctionFvPatchScalarField:: -nutkAtmRoughWallFunctionFvPatchScalarField -( - const nutkAtmRoughWallFunctionFvPatchScalarField& rwfpsf -) -: - nutkWallFunctionFvPatchScalarField(rwfpsf), - z0_(rwfpsf.z0_) -{} - - -nutkAtmRoughWallFunctionFvPatchScalarField:: -nutkAtmRoughWallFunctionFvPatchScalarField -( - const nutkAtmRoughWallFunctionFvPatchScalarField& rwfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - nutkWallFunctionFvPatchScalarField(rwfpsf, iF), - z0_(rwfpsf.z0_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void nutkAtmRoughWallFunctionFvPatchScalarField::autoMap -( - const fvPatchFieldMapper& m -) -{ - nutkWallFunctionFvPatchScalarField::autoMap(m); - z0_.autoMap(m); -} - - -void nutkAtmRoughWallFunctionFvPatchScalarField::rmap -( - const fvPatchScalarField& ptf, - const labelList& addr -) -{ - nutkWallFunctionFvPatchScalarField::rmap(ptf, addr); - - const nutkAtmRoughWallFunctionFvPatchScalarField& nrwfpsf = - refCast<const nutkAtmRoughWallFunctionFvPatchScalarField>(ptf); - - z0_.rmap(nrwfpsf.z0_, addr); -} - - -void nutkAtmRoughWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fvPatchField<scalar>::write(os); - writeLocalEntries(os); - z0_.writeEntry("z0", os); - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - nutkAtmRoughWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.H deleted file mode 100644 index 3767de1fc..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,217 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::nutkAtmRoughWallFunctionFvPatchScalarField - -Group - grpIcoWallFunctions - -Description - This boundary condition provides a turbulent kinematic viscosity for - atmospheric velocity profiles. It is desinged to be used in conjunction - with the atmBoundaryLayerInletVelocity boundary condition. The values - are calculated using: - - \f[ - U = frac{U_f}{K} ln(\frac{z + z_0}{z_0}) - \f] - - where - - \vartable - U_f | frictional velocity - K | Von Karman's constant - z_0 | surface roughness length - z | vertical co-ordinate - \endvartable - - \heading Patch usage - - \table - Property | Description | Required | Default value - z0 | surface roughness length| yes | - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type nutkAtmRoughWallFunction; - z0 uniform 0; - } - \endverbatim - -SeeAlso - Foam::nutkWallFunctionFvPatchField - -SourceFiles - nutkAtmRoughWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef nutkAtmRoughWallFunctionFvPatchScalarField_H -#define nutkAtmRoughWallFunctionFvPatchScalarField_H - -#include "nutkWallFunctionFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class nutkAtmRoughWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class nutkAtmRoughWallFunctionFvPatchScalarField -: - public nutkWallFunctionFvPatchScalarField -{ -protected: - - // Protected data - - //- Surface roughness length - scalarField z0_; - - - // Protected Member Functions - - - //- Calculate the turbulence viscosity - virtual tmp<scalarField> calcNut() const; - - -public: - - //- Runtime type information - TypeName("nutkAtmRoughWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - nutkAtmRoughWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - nutkAtmRoughWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // nutkAtmRoughWallFunctionFvPatchScalarField - // onto a new patch - nutkAtmRoughWallFunctionFvPatchScalarField - ( - const nutkAtmRoughWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - nutkAtmRoughWallFunctionFvPatchScalarField - ( - const nutkAtmRoughWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new nutkAtmRoughWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - nutkAtmRoughWallFunctionFvPatchScalarField - ( - const nutkAtmRoughWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new nutkAtmRoughWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Acces functions - - // Return z0 - scalarField& z0() - { - return z0_; - } - - - // Mapping functions - - //- Map (and resize as needed) from self given a mapping object - virtual void autoMap(const fvPatchFieldMapper&); - - //- Reverse map the given fvPatchField onto this fvPatchField - virtual void rmap - ( - const fvPatchScalarField&, - const labelList& - ); - - - // I-O - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C deleted file mode 100644 index 61d806882..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,241 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "nutkRoughWallFunctionFvPatchScalarField.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -scalar nutkRoughWallFunctionFvPatchScalarField::fnRough -( - const scalar KsPlus, - const scalar Cs -) const -{ - // Return fn based on non-dimensional roughness height - - if (KsPlus < 90.0) - { - return pow - ( - (KsPlus - 2.25)/87.75 + Cs*KsPlus, - sin(0.4258*(log(KsPlus) - 0.811)) - ); - } - else - { - return (1.0 + Cs*KsPlus); - } -} - - -tmp<scalarField> nutkRoughWallFunctionFvPatchScalarField::calcNut() const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbModel.y()[patchi]; - const tmp<volScalarField> tk = turbModel.k(); - const volScalarField& k = tk(); - const tmp<volScalarField> tnu = turbModel.nu(); - const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchi]; - - const scalar Cmu25 = pow025(Cmu_); - - tmp<scalarField> tnutw(new scalarField(*this)); - scalarField& nutw = tnutw(); - - forAll(nutw, faceI) - { - label faceCellI = patch().faceCells()[faceI]; - - scalar uStar = Cmu25*sqrt(k[faceCellI]); - scalar yPlus = uStar*y[faceI]/nuw[faceI]; - scalar KsPlus = uStar*Ks_[faceI]/nuw[faceI]; - - scalar Edash = E_; - if (KsPlus > 2.25) - { - Edash /= fnRough(KsPlus, Cs_[faceI]); - } - - scalar limitingNutw = max(nutw[faceI], nuw[faceI]); - - // To avoid oscillations limit the change in the wall viscosity - // which is particularly important if it temporarily becomes zero - nutw[faceI] = - max - ( - min - ( - nuw[faceI] - *(yPlus*kappa_/log(max(Edash*yPlus, 1+1e-4)) - 1), - 2*limitingNutw - ), 0.5*limitingNutw - ); - - if (debug) - { - Info<< "yPlus = " << yPlus - << ", KsPlus = " << KsPlus - << ", Edash = " << Edash - << ", nutw = " << nutw[faceI] - << endl; - } - } - - return tnutw; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - nutkWallFunctionFvPatchScalarField(p, iF), - Ks_(p.size(), 0.0), - Cs_(p.size(), 0.0) -{} - - -nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField -( - const nutkRoughWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper), - Ks_(ptf.Ks_, mapper), - Cs_(ptf.Cs_, mapper) -{} - - -nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - nutkWallFunctionFvPatchScalarField(p, iF, dict), - Ks_("Ks", dict, p.size()), - Cs_("Cs", dict, p.size()) -{} - - -nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField -( - const nutkRoughWallFunctionFvPatchScalarField& rwfpsf -) -: - nutkWallFunctionFvPatchScalarField(rwfpsf), - Ks_(rwfpsf.Ks_), - Cs_(rwfpsf.Cs_) -{} - - -nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField -( - const nutkRoughWallFunctionFvPatchScalarField& rwfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - nutkWallFunctionFvPatchScalarField(rwfpsf, iF), - Ks_(rwfpsf.Ks_), - Cs_(rwfpsf.Cs_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void nutkRoughWallFunctionFvPatchScalarField::autoMap -( - const fvPatchFieldMapper& m -) -{ - nutkWallFunctionFvPatchScalarField::autoMap(m); - Ks_.autoMap(m); - Cs_.autoMap(m); -} - - -void nutkRoughWallFunctionFvPatchScalarField::rmap -( - const fvPatchScalarField& ptf, - const labelList& addr -) -{ - nutkWallFunctionFvPatchScalarField::rmap(ptf, addr); - - const nutkRoughWallFunctionFvPatchScalarField& nrwfpsf = - refCast<const nutkRoughWallFunctionFvPatchScalarField>(ptf); - - Ks_.rmap(nrwfpsf.Ks_, addr); - Cs_.rmap(nrwfpsf.Cs_, addr); -} - - -void nutkRoughWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fvPatchField<scalar>::write(os); - writeLocalEntries(os); - Cs_.writeEntry("Cs", os); - Ks_.writeEntry("Ks", os); - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - nutkRoughWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.H deleted file mode 100644 index 5f5e495fd..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,221 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::nutkRoughWallFunctionFvPatchScalarField - -Group - grpIcoWallFunctions - -Description - This boundary condition provides a turbulent kinematic viscosity condition - when using wall functions for rough walls, based on turbulence kinetic - energy. The condition manipulates the E parameter to account for roughness - effects. - - Parameter ranges - - roughness height = sand-grain roughness (0 for smooth walls) - - roughness constant = 0.5-1.0 - - \heading Patch usage - - \table - Property | Description | Required | Default value - Ks | sand-grain roughness height | yes | - Cs | roughness constant | yes | - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type nutkRoughWallFunction; - Ks uniform 0; - Cs uniform 0.5; - } - \endverbatim - -SeeAlso - Foam::nutkRoughWallFunctionFvPatchScalarField - -SourceFiles - nutkRoughWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef nutkRoughWallFunctionFvPatchScalarField_H -#define nutkRoughWallFunctionFvPatchScalarField_H - -#include "nutkWallFunctionFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class nutkRoughWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class nutkRoughWallFunctionFvPatchScalarField -: - public nutkWallFunctionFvPatchScalarField -{ -protected: - - // Protected data - - //- Roughness height - scalarField Ks_; - - //- Roughness constant - scalarField Cs_; - - - // Protected Member Functions - - //- Compute the roughness function - virtual scalar fnRough(const scalar KsPlus, const scalar Cs) const; - - //- Calculate the turbulence viscosity - virtual tmp<scalarField> calcNut() const; - - -public: - - //- Runtime type information - TypeName("nutkRoughWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - nutkRoughWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - nutkRoughWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // nutkRoughWallFunctionFvPatchScalarField - // onto a new patch - nutkRoughWallFunctionFvPatchScalarField - ( - const nutkRoughWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - nutkRoughWallFunctionFvPatchScalarField - ( - const nutkRoughWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new nutkRoughWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - nutkRoughWallFunctionFvPatchScalarField - ( - const nutkRoughWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new nutkRoughWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Acces functions - - // Return Ks - scalarField& Ks() - { - return Ks_; - } - - // Return Cs - scalarField& Cs() - { - return Cs_; - } - - - // Mapping functions - - //- Map (and resize as needed) from self given a mapping object - virtual void autoMap(const fvPatchFieldMapper&); - - //- Reverse map the given fvPatchField onto this fvPatchField - virtual void rmap - ( - const fvPatchScalarField&, - const labelList& - ); - - - // I-O - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C deleted file mode 100644 index bfc542434..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,164 +0,0 @@ -/*---------------------------------------------------------------------------* \ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "nutkWallFunctionFvPatchScalarField.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "wallFvPatch.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -tmp<scalarField> nutkWallFunctionFvPatchScalarField::calcNut() const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbModel.y()[patchi]; - const tmp<volScalarField> tk = turbModel.k(); - const volScalarField& k = tk(); - const tmp<volScalarField> tnu = turbModel.nu(); - const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchi]; - - const scalar Cmu25 = pow025(Cmu_); - - tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); - scalarField& nutw = tnutw(); - - forAll(nutw, faceI) - { - label faceCellI = patch().faceCells()[faceI]; - - scalar yPlus = Cmu25*y[faceI]*sqrt(k[faceCellI])/nuw[faceI]; - - if (yPlus > yPlusLam_) - { - nutw[faceI] = nuw[faceI]*(yPlus*kappa_/log(E_*yPlus) - 1.0); - } - } - - return tnutw; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - nutWallFunctionFvPatchScalarField(p, iF) -{} - - -nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField -( - const nutkWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) -{} - - -nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - nutWallFunctionFvPatchScalarField(p, iF, dict) -{} - - -nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField -( - const nutkWallFunctionFvPatchScalarField& wfpsf -) -: - nutWallFunctionFvPatchScalarField(wfpsf) -{} - - -nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField -( - const nutkWallFunctionFvPatchScalarField& wfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - nutWallFunctionFvPatchScalarField(wfpsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<scalarField> nutkWallFunctionFvPatchScalarField::yPlus() const -{ - const label patchi = patch().index(); - - const turbulenceModel& turbModel = - db().lookupObject<turbulenceModel>("turbulenceModel"); - const scalarField& y = turbModel.y()[patchi]; - - const tmp<volScalarField> tk = turbModel.k(); - const volScalarField& k = tk(); - tmp<scalarField> kwc = k.boundaryField()[patchi].patchInternalField(); - const tmp<volScalarField> tnu = turbModel.nu(); - const volScalarField& nu = tnu(); - const scalarField& nuw = nu.boundaryField()[patchi]; - - return pow025(Cmu_)*y*sqrt(kwc)/nuw; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - nutkWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H deleted file mode 100644 index ef0a3066d..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,166 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::nutkWallFunctionFvPatchScalarField - -Group - grpIcoWallFunctions - -Description - This boundary condition provides a turbulent kinematic viscosity condition - when using wall functions, based on turbulence kinetic energy. - - replicates OpenFOAM v1.5 (and earlier) behaviour - - \heading Patch usage - - Example of the boundary condition specification: - \verbatim - myPatch - { - type nutkWallFunction; - } - \endverbatim - -SeeAlso - Foam::nutWallFunctionFvPatchScalarField - -SourceFiles - nutkWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef nutkWallFunctionFvPatchScalarField_H -#define nutkWallFunctionFvPatchScalarField_H - -#include "nutWallFunctionFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class nutkWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class nutkWallFunctionFvPatchScalarField -: - public nutWallFunctionFvPatchScalarField -{ -protected: - - // Protected Member Functions - - //- Calculate the turbulence viscosity - virtual tmp<scalarField> calcNut() const; - - -public: - - //- Runtime type information - TypeName("nutkWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - nutkWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - nutkWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // nutkWallFunctionFvPatchScalarField - // onto a new patch - nutkWallFunctionFvPatchScalarField - ( - const nutkWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - nutkWallFunctionFvPatchScalarField - ( - const nutkWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new nutkWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - nutkWallFunctionFvPatchScalarField - ( - const nutkWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new nutkWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - //- Calculate and return the yPlus at the boundary - virtual tmp<scalarField> yPlus() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C deleted file mode 100644 index ebc195ece..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,601 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "omegaWallFunctionFvPatchScalarField.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "fvPatchFieldMapper.H" -#include "fvMatrix.H" -#include "volFields.H" -#include "wallFvPatch.H" -#include "nutkWallFunctionFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -scalar omegaWallFunctionFvPatchScalarField::tolerance_ = 1e-5; - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -void omegaWallFunctionFvPatchScalarField::checkType() -{ - if (!isA<wallFvPatch>(patch())) - { - FatalErrorIn("omegaWallFunctionFvPatchScalarField::checkType()") - << "Invalid wall function specification" << nl - << " Patch type for patch " << patch().name() - << " must be wall" << nl - << " Current patch type is " << patch().type() << nl << endl - << abort(FatalError); - } -} - - -void omegaWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const -{ - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; - os.writeKeyword("beta1") << beta1_ << token::END_STATEMENT << nl; -} - - -void omegaWallFunctionFvPatchScalarField::setMaster() -{ - if (master_ != -1) - { - return; - } - - const volScalarField& omega = - static_cast<const volScalarField&>(this->dimensionedInternalField()); - - const volScalarField::GeometricBoundaryField& bf = omega.boundaryField(); - - label master = -1; - forAll(bf, patchI) - { - if (isA<omegaWallFunctionFvPatchScalarField>(bf[patchI])) - { - omegaWallFunctionFvPatchScalarField& opf = omegaPatch(patchI); - - if (master == -1) - { - master = patchI; - } - - opf.master() = master; - } - } -} - - -void omegaWallFunctionFvPatchScalarField::createAveragingWeights() -{ - const volScalarField& omega = - static_cast<const volScalarField&>(this->dimensionedInternalField()); - - const volScalarField::GeometricBoundaryField& bf = omega.boundaryField(); - - const fvMesh& mesh = omega.mesh(); - - if (initialised_ && !mesh.changing()) - { - return; - } - - volScalarField weights - ( - IOobject - ( - "weights", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false // do not register - ), - mesh, - dimensionedScalar("zero", dimless, 0.0) - ); - - DynamicList<label> omegaPatches(bf.size()); - forAll(bf, patchI) - { - if (isA<omegaWallFunctionFvPatchScalarField>(bf[patchI])) - { - omegaPatches.append(patchI); - - const labelUList& faceCells = bf[patchI].patch().faceCells(); - forAll(faceCells, i) - { - label cellI = faceCells[i]; - weights[cellI]++; - } - } - } - - cornerWeights_.setSize(bf.size()); - forAll(omegaPatches, i) - { - label patchI = omegaPatches[i]; - const fvPatchScalarField& wf = weights.boundaryField()[patchI]; - cornerWeights_[patchI] = 1.0/wf.patchInternalField(); - } - - G_.setSize(dimensionedInternalField().size(), 0.0); - omega_.setSize(dimensionedInternalField().size(), 0.0); - - initialised_ = true; -} - - -omegaWallFunctionFvPatchScalarField& -omegaWallFunctionFvPatchScalarField::omegaPatch(const label patchI) -{ - const volScalarField& omega = - static_cast<const volScalarField&>(this->dimensionedInternalField()); - - const volScalarField::GeometricBoundaryField& bf = omega.boundaryField(); - - const omegaWallFunctionFvPatchScalarField& opf = - refCast<const omegaWallFunctionFvPatchScalarField>(bf[patchI]); - - return const_cast<omegaWallFunctionFvPatchScalarField&>(opf); -} - - -void omegaWallFunctionFvPatchScalarField::calculateTurbulenceFields -( - const turbulenceModel& turbulence, - scalarField& G0, - scalarField& omega0 -) -{ - // accumulate all of the G and omega contributions - forAll(cornerWeights_, patchI) - { - if (!cornerWeights_[patchI].empty()) - { - omegaWallFunctionFvPatchScalarField& opf = omegaPatch(patchI); - - const List<scalar>& w = cornerWeights_[patchI]; - - opf.calculate(turbulence, w, opf.patch(), G0, omega0); - } - } - - // apply zero-gradient condition for omega - forAll(cornerWeights_, patchI) - { - if (!cornerWeights_[patchI].empty()) - { - omegaWallFunctionFvPatchScalarField& opf = omegaPatch(patchI); - - opf == scalarField(omega0, opf.patch().faceCells()); - } - } -} - - -void omegaWallFunctionFvPatchScalarField::calculate -( - const turbulenceModel& turbulence, - const List<scalar>& cornerWeights, - const fvPatch& patch, - scalarField& G, - scalarField& omega -) -{ - const label patchI = patch.index(); - - const scalarField& y = turbulence.y()[patchI]; - - const scalar Cmu25 = pow025(Cmu_); - - const tmp<volScalarField> tk = turbulence.k(); - const volScalarField& k = tk(); - - const tmp<volScalarField> tnu = turbulence.nu(); - const scalarField& nuw = tnu().boundaryField()[patchI]; - - const tmp<volScalarField> tnut = turbulence.nut(); - const volScalarField& nut = tnut(); - const scalarField& nutw = nut.boundaryField()[patchI]; - - const fvPatchVectorField& Uw = turbulence.U().boundaryField()[patchI]; - - const scalarField magGradUw(mag(Uw.snGrad())); - - // Set omega and G - forAll(nutw, faceI) - { - label cellI = patch.faceCells()[faceI]; - - scalar w = cornerWeights[faceI]; - - scalar omegaVis = 6.0*nuw[faceI]/(beta1_*sqr(y[faceI])); - - scalar omegaLog = sqrt(k[cellI])/(Cmu25*kappa_*y[faceI]); - - omega[cellI] += w*sqrt(sqr(omegaVis) + sqr(omegaLog)); - - G[cellI] += - w - *(nutw[faceI] + nuw[faceI]) - *magGradUw[faceI] - *Cmu25*sqrt(k[cellI]) - /(kappa_*y[faceI]); - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchField<scalar>(p, iF), - Cmu_(0.09), - kappa_(0.41), - E_(9.8), - beta1_(0.075), - yPlusLam_(nutkWallFunctionFvPatchScalarField::yPlusLam(kappa_, E_)), - G_(), - omega_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); -} - - -omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField -( - const omegaWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchField<scalar>(ptf, p, iF, mapper), - Cmu_(ptf.Cmu_), - kappa_(ptf.kappa_), - E_(ptf.E_), - beta1_(ptf.beta1_), - yPlusLam_(ptf.yPlusLam_), - G_(), - omega_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); -} - - -omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - fixedValueFvPatchField<scalar>(p, iF, dict), - Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)), - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - E_(dict.lookupOrDefault<scalar>("E", 9.8)), - beta1_(dict.lookupOrDefault<scalar>("beta1", 0.075)), - yPlusLam_(nutkWallFunctionFvPatchScalarField::yPlusLam(kappa_, E_)), - G_(), - omega_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); - - // apply zero-gradient condition on start-up - this->operator==(patchInternalField()); -} - - -omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField -( - const omegaWallFunctionFvPatchScalarField& owfpsf -) -: - fixedValueFvPatchField<scalar>(owfpsf), - Cmu_(owfpsf.Cmu_), - kappa_(owfpsf.kappa_), - E_(owfpsf.E_), - beta1_(owfpsf.beta1_), - yPlusLam_(owfpsf.yPlusLam_), - G_(), - omega_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); -} - - -omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField -( - const omegaWallFunctionFvPatchScalarField& owfpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchField<scalar>(owfpsf, iF), - Cmu_(owfpsf.Cmu_), - kappa_(owfpsf.kappa_), - E_(owfpsf.E_), - beta1_(owfpsf.beta1_), - yPlusLam_(owfpsf.yPlusLam_), - G_(), - omega_(), - initialised_(false), - master_(-1), - cornerWeights_() -{ - checkType(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -scalarField& omegaWallFunctionFvPatchScalarField::G(bool init) -{ - if (patch().index() == master_) - { - if (init) - { - G_ = 0.0; - } - - return G_; - } - - return omegaPatch(master_).G(); -} - - -scalarField& omegaWallFunctionFvPatchScalarField::omega(bool init) -{ - if (patch().index() == master_) - { - if (init) - { - omega_ = 0.0; - } - - return omega_; - } - - return omegaPatch(master_).omega(init); -} - - -void omegaWallFunctionFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>(turbulenceModel::typeName); - - setMaster(); - - if (patch().index() == master_) - { - createAveragingWeights(); - calculateTurbulenceFields(turbulence, G(true), omega(true)); - } - - const scalarField& G0 = this->G(); - const scalarField& omega0 = this->omega(); - - typedef DimensionedField<scalar, volMesh> FieldType; - - FieldType& G = - const_cast<FieldType&> - ( - db().lookupObject<FieldType>(turbulence.GName()) - ); - - FieldType& omega = const_cast<FieldType&>(dimensionedInternalField()); - - forAll(*this, faceI) - { - label cellI = patch().faceCells()[faceI]; - - G[cellI] = G0[cellI]; - omega[cellI] = omega0[cellI]; - } - - fvPatchField<scalar>::updateCoeffs(); -} - - -void omegaWallFunctionFvPatchScalarField::updateCoeffs -( - const scalarField& weights -) -{ - if (updated()) - { - return; - } - - const turbulenceModel& turbulence = - db().lookupObject<turbulenceModel>(turbulenceModel::typeName); - - setMaster(); - - if (patch().index() == master_) - { - createAveragingWeights(); - calculateTurbulenceFields(turbulence, G(true), omega(true)); - } - - const scalarField& G0 = this->G(); - const scalarField& omega0 = this->omega(); - - typedef DimensionedField<scalar, volMesh> FieldType; - - FieldType& G = - const_cast<FieldType&> - ( - db().lookupObject<FieldType>(turbulence.GName()) - ); - - FieldType& omega = const_cast<FieldType&>(dimensionedInternalField()); - - scalarField& omegaf = *this; - - // only set the values if the weights are > tolerance - forAll(weights, faceI) - { - scalar w = weights[faceI]; - - if (w > tolerance_) - { - label cellI = patch().faceCells()[faceI]; - - G[cellI] = (1.0 - w)*G[cellI] + w*G0[cellI]; - omega[cellI] = (1.0 - w)*omega[cellI] + w*omega0[cellI]; - omegaf[faceI] = omega[cellI]; - } - } - - fvPatchField<scalar>::updateCoeffs(); -} - - -void omegaWallFunctionFvPatchScalarField::manipulateMatrix -( - fvMatrix<scalar>& matrix -) -{ - if (manipulatedMatrix()) - { - return; - } - - matrix.setValues(patch().faceCells(), patchInternalField()); - - fvPatchField<scalar>::manipulateMatrix(matrix); -} - - -void omegaWallFunctionFvPatchScalarField::manipulateMatrix -( - fvMatrix<scalar>& matrix, - const Field<scalar>& weights -) -{ - if (manipulatedMatrix()) - { - return; - } - - // filter weights so that we only apply the constraint where the - // weight > SMALL - DynamicList<label> constraintCells(weights.size()); - DynamicList<scalar> constraintomega(weights.size()); - const labelUList& faceCells = patch().faceCells(); - - const DimensionedField<scalar, volMesh>& omega = - dimensionedInternalField(); - - label nConstrainedCells = 0; - - - forAll(weights, faceI) - { - // only set the values if the weights are > tolerance - if (weights[faceI] > tolerance_) - { - nConstrainedCells++; - - label cellI = faceCells[faceI]; - - constraintCells.append(cellI); - constraintomega.append(omega[cellI]); - } - } - - if (debug) - { - Pout<< "Patch: " << patch().name() - << ": number of constrained cells = " << nConstrainedCells - << " out of " << patch().size() - << endl; - } - - matrix.setValues - ( - constraintCells, - scalarField(constraintomega.xfer()) - ); - - fvPatchField<scalar>::manipulateMatrix(matrix); -} - - -void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const -{ - fixedValueFvPatchField<scalar>::write(os); - writeLocalEntries(os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - omegaWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H deleted file mode 100644 index 74eef728c..000000000 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,298 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::omegaWallFunctionFvPatchScalarField - -Group - grpIcoWallFunctions - -Description - This boundary condition provides a wall function constraint on turbulnce - specific dissipation, omega. The values are computed using: - - \f[ - \omega = sqrt(\omega_{vis}^2 + \omega_{log}^2) - \f] - - where - - \vartable - \omega_{vis} | omega in viscous region - \omega_{log} | omega in logarithmic region - \endvartable - - Model described by Eqs.(14, 15) of: - \verbatim - Menter, F., Esch, T. - "Elements of Industrial Heat Transfer Prediction" - 16th Brazilian Congress of Mechanical Engineering (COBEM), - Nov. 2001 - \endverbatim - - \heading Patch usage - - \table - Property | Description | Required | Default value - Cmu | model coefficient | no | 0.09 - kappa | Von Karman constant | no | 0.41 - E | model coefficient | no | 9.8 - beta1 | model coefficient | no | 0.075 - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type omegaWallFunction; - } - \endverbatim - -SourceFiles - omegaWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef omegaWallFunctionFvPatchScalarField_H -#define omegaWallFunctionFvPatchScalarField_H - -#include "fixedValueFvPatchField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -class turbulenceModel; - -/*---------------------------------------------------------------------------*\ - Class omegaWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class omegaWallFunctionFvPatchScalarField -: - public fixedValueFvPatchField<scalar> -{ -protected: - - // Protected data - - //- Tolerance used in weighted calculations - static scalar tolerance_; - - //- Cmu coefficient - scalar Cmu_; - - //- Von Karman constant - scalar kappa_; - - //- E coefficient - scalar E_; - - //- beta1 coefficient - scalar beta1_; - - //- Y+ at the edge of the laminar sublayer - scalar yPlusLam_; - - //- Local copy of turbulence G field - scalarField G_; - - //- Local copy of turbulence omega field - scalarField omega_; - - //- Initialised flag - bool initialised_; - - //- Master patch ID - label master_; - - //- List of averaging corner weights - List<List<scalar> > cornerWeights_; - - - // Protected Member Functions - - //- Check the type of the patch - virtual void checkType(); - - //- Write local wall function variables - virtual void writeLocalEntries(Ostream&) const; - - //- Set the master patch - master is responsible for updating all - // wall function patches - virtual void setMaster(); - - //- Create the averaging weights for cells which are bounded by - // multiple wall function faces - virtual void createAveragingWeights(); - - //- Helper function to return non-const access to an omega patch - virtual omegaWallFunctionFvPatchScalarField& omegaPatch - ( - const label patchI - ); - - //- Main driver to calculate the turbulence fields - virtual void calculateTurbulenceFields - ( - const turbulenceModel& turbulence, - scalarField& G0, - scalarField& omega0 - ); - - //- Calculate the omega and G - virtual void calculate - ( - const turbulenceModel& turbulence, - const List<scalar>& cornerWeights, - const fvPatch& patch, - scalarField& G, - scalarField& omega - ); - - //- Return non-const access to the master patch ID - virtual label& master() - { - return master_; - } - - -public: - - //- Runtime type information - TypeName("omegaWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - omegaWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - omegaWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // omegaWallFunctionFvPatchScalarField - // onto a new patch - omegaWallFunctionFvPatchScalarField - ( - const omegaWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - omegaWallFunctionFvPatchScalarField - ( - const omegaWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new omegaWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - omegaWallFunctionFvPatchScalarField - ( - const omegaWallFunctionFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new omegaWallFunctionFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Access - - //- Return non-const access to the master's G field - scalarField& G(bool init = false); - - //- Return non-const access to the master's omega field - scalarField& omega(bool init = false); - - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(const scalarField& weights); - - //- Manipulate matrix - virtual void manipulateMatrix(fvMatrix<scalar>& matrix); - - //- Manipulate matrix with given weights - virtual void manipulateMatrix - ( - fvMatrix<scalar>& matrix, - const scalarField& weights - ); - - - // I-O - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C b/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C deleted file mode 100644 index a152daae9..000000000 --- a/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C +++ /dev/null @@ -1,290 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "kEpsilon.H" -#include "addToRunTimeSelectionTable.H" - -#include "backwardsCompatibilityWallFunctions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(kEpsilon, 0); -addToRunTimeSelectionTable(RASModel, kEpsilon, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -kEpsilon::kEpsilon -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - RASModel(modelName, U, phi, transport, turbulenceModelName), - - Cmu_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cmu", - coeffDict_, - 0.09 - ) - ), - C1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C1", - coeffDict_, - 1.44 - ) - ), - C2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C2", - coeffDict_, - 1.92 - ) - ), - sigmaEps_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaEps", - coeffDict_, - 1.3 - ) - ), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateK("k", mesh_) - ), - epsilon_ - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateEpsilon("epsilon", mesh_) - ), - nut_ - ( - IOobject - ( - "nut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateNut("nut", mesh_) - ) -{ - bound(k_, kMin_); - bound(epsilon_, epsilonMin_); - - nut_ = Cmu_*sqr(k_)/epsilon_; - nut_.correctBoundaryConditions(); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> kEpsilon::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - nut_*twoSymm(fvc::grad(U_)), - k_.boundaryField().types() - ) - ); -} - - -tmp<volSymmTensorField> kEpsilon::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -nuEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> kEpsilon::divDevReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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()) - { - Cmu_.readIfPresent(coeffDict()); - C1_.readIfPresent(coeffDict()); - C2_.readIfPresent(coeffDict()); - sigmaEps_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -void kEpsilon::correct() -{ - RASModel::correct(); - - if (!turbulence_) - { - return; - } - - volScalarField G(GName(), nut_*2*magSqr(symm(fvc::grad(U_)))); - - // Update epsilon and G at the wall - epsilon_.boundaryField().updateCoeffs(); - - // Dissipation equation - tmp<fvScalarMatrix> epsEqn - ( - fvm::ddt(epsilon_) - + fvm::div(phi_, epsilon_) - - fvm::laplacian(DepsilonEff(), epsilon_) - == - C1_*G*epsilon_/k_ - - fvm::Sp(C2_*epsilon_/k_, epsilon_) - ); - - epsEqn().relax(); - - epsEqn().boundaryManipulate(epsilon_.boundaryField()); - - solve(epsEqn); - bound(epsilon_, epsilonMin_); - - - // Turbulent kinetic energy equation - tmp<fvScalarMatrix> kEqn - ( - fvm::ddt(k_) - + fvm::div(phi_, k_) - - fvm::laplacian(DkEff(), k_) - == - G - - fvm::Sp(epsilon_/k_, k_) - ); - - kEqn().relax(); - solve(kEqn); - bound(k_, kMin_); - - - // Re-calculate viscosity - nut_ = Cmu_*sqr(k_)/epsilon_; - nut_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.H b/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.H deleted file mode 100644 index b11e84097..000000000 --- a/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.H +++ /dev/null @@ -1,197 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::RASModels::kEpsilon - -Group - grpIcoRASTurbulence - -Description - Standard k-epsilon turbulence model for incompressible flows. - - Reference: - \verbatim - Launder, B.E., and Spalding, D.B., - "Mathematical Models of Turbulence", - Academic Press, 1972. - - Launder, B.E., and Spalding, D.B., - "Computational Methods for Turbulent Flows", - Comp. Meth in Appl Mech & Eng'g, Vol 3, 1974, pp 269-289. - \endverbatim - - The default model coefficients correspond to the following: - \verbatim - kEpsilonCoeffs - { - Cmu 0.09; - C1 1.44; - C2 1.92; - sigmaEps 1.3; - } - \endverbatim - -SourceFiles - kEpsilon.C - -\*---------------------------------------------------------------------------*/ - -#ifndef kEpsilon_H -#define kEpsilon_H - -#include "RASModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class kEpsilon Declaration -\*---------------------------------------------------------------------------*/ - -class kEpsilon -: - public RASModel -{ - -protected: - - // Protected data - - // Model coefficients - - dimensionedScalar Cmu_; - dimensionedScalar C1_; - dimensionedScalar C2_; - dimensionedScalar sigmaEps_; - - - // Fields - - volScalarField k_; - volScalarField epsilon_; - volScalarField nut_; - - -public: - - //- Runtime type information - TypeName("kEpsilon"); - - // Constructors - - //- Construct from components - kEpsilon - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~kEpsilon() - {} - - - // Member Functions - - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const - { - return nut_; - } - - //- Return the effective diffusivity for k - tmp<volScalarField> DkEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DkEff", nut_ + nu()) - ); - } - - //- Return the effective diffusivity for epsilon - tmp<volScalarField> DepsilonEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu()) - ); - } - - //- Return the turbulence kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp<volScalarField> epsilon() const - { - return epsilon_; - } - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C deleted file mode 100644 index 9eada0bf2..000000000 --- a/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C +++ /dev/null @@ -1,472 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "kOmegaSST.H" -#include "addToRunTimeSelectionTable.H" - -#include "backwardsCompatibilityWallFunctions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(kOmegaSST, 0); -addToRunTimeSelectionTable(RASModel, kOmegaSST, dictionary); - -// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // - -tmp<volScalarField> kOmegaSST::F1(const volScalarField& CDkOmega) const -{ - tmp<volScalarField> CDkOmegaPlus = max - ( - CDkOmega, - dimensionedScalar("1.0e-10", dimless/sqr(dimTime), 1.0e-10) - ); - - tmp<volScalarField> arg1 = min - ( - min - ( - max - ( - (scalar(1)/betaStar_)*sqrt(k_)/(omega_*y_), - scalar(500)*nu()/(sqr(y_)*omega_) - ), - (4*alphaOmega2_)*k_/(CDkOmegaPlus*sqr(y_)) - ), - scalar(10) - ); - - return tanh(pow4(arg1)); -} - - -tmp<volScalarField> kOmegaSST::F2() const -{ - tmp<volScalarField> arg2 = min - ( - max - ( - (scalar(2)/betaStar_)*sqrt(k_)/(omega_*y_), - scalar(500)*nu()/(sqr(y_)*omega_) - ), - scalar(100) - ); - - return tanh(sqr(arg2)); -} - - -tmp<volScalarField> kOmegaSST::F3() const -{ - tmp<volScalarField> arg3 = min - ( - 150*nu()/(omega_*sqr(y_)), - scalar(10) - ); - - return 1 - tanh(pow4(arg3)); -} - - -tmp<volScalarField> kOmegaSST::F23() const -{ - tmp<volScalarField> f23(F2()); - - if (F3_) - { - f23() *= F3(); - } - - return f23; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -kOmegaSST::kOmegaSST -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - RASModel(modelName, U, phi, transport, turbulenceModelName), - - alphaK1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "alphaK1", - coeffDict_, - 0.85 - ) - ), - alphaK2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "alphaK2", - coeffDict_, - 1.0 - ) - ), - alphaOmega1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "alphaOmega1", - coeffDict_, - 0.5 - ) - ), - alphaOmega2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "alphaOmega2", - coeffDict_, - 0.856 - ) - ), - gamma1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "gamma1", - coeffDict_, - 5.0/9.0 - ) - ), - gamma2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "gamma2", - coeffDict_, - 0.44 - ) - ), - beta1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "beta1", - coeffDict_, - 0.075 - ) - ), - beta2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "beta2", - coeffDict_, - 0.0828 - ) - ), - betaStar_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "betaStar", - coeffDict_, - 0.09 - ) - ), - a1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "a1", - coeffDict_, - 0.31 - ) - ), - b1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "b1", - coeffDict_, - 1.0 - ) - ), - c1_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "c1", - coeffDict_, - 10.0 - ) - ), - F3_ - ( - Switch::lookupOrAddToDict - ( - "F3", - coeffDict_, - false - ) - ), - - y_(wallDist::New(mesh_).y()), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateK("k", mesh_) - ), - omega_ - ( - IOobject - ( - "omega", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateOmega("omega", mesh_) - ), - nut_ - ( - IOobject - ( - "nut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateNut("nut", mesh_) - ) -{ - bound(k_, kMin_); - bound(omega_, omegaMin_); - - nut_ = - ( - a1_*k_ - / max - ( - a1_*omega_, - b1_*F23()*sqrt(2.0)*mag(symm(fvc::grad(U_))) - ) - ); - nut_.correctBoundaryConditions(); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> kOmegaSST::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - nut_*twoSymm(fvc::grad(U_)), - k_.boundaryField().types() - ) - ); -} - - -tmp<volSymmTensorField> kOmegaSST::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -nuEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> kOmegaSST::divDevReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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()) - { - alphaK1_.readIfPresent(coeffDict()); - alphaK2_.readIfPresent(coeffDict()); - alphaOmega1_.readIfPresent(coeffDict()); - alphaOmega2_.readIfPresent(coeffDict()); - gamma1_.readIfPresent(coeffDict()); - gamma2_.readIfPresent(coeffDict()); - beta1_.readIfPresent(coeffDict()); - beta2_.readIfPresent(coeffDict()); - betaStar_.readIfPresent(coeffDict()); - a1_.readIfPresent(coeffDict()); - b1_.readIfPresent(coeffDict()); - c1_.readIfPresent(coeffDict()); - F3_.readIfPresent("F3", coeffDict()); - - return true; - } - else - { - return false; - } -} - - -void kOmegaSST::correct() -{ - RASModel::correct(); - - if (!turbulence_) - { - return; - } - - const volScalarField S2(2*magSqr(symm(fvc::grad(U_)))); - volScalarField G(GName(), nut_*S2); - - // Update omega and G at the wall - omega_.boundaryField().updateCoeffs(); - - const volScalarField CDkOmega - ( - (2*alphaOmega2_)*(fvc::grad(k_) & fvc::grad(omega_))/omega_ - ); - - const volScalarField F1(this->F1(CDkOmega)); - - // Turbulent frequency equation - tmp<fvScalarMatrix> omegaEqn - ( - fvm::ddt(omega_) - + fvm::div(phi_, omega_) - - fvm::laplacian(DomegaEff(F1), omega_) - == - gamma(F1) - *min(S2, (c1_/a1_)*betaStar_*omega_*max(a1_*omega_, b1_*F23()*sqrt(S2))) - - fvm::Sp(beta(F1)*omega_, omega_) - - fvm::SuSp - ( - (F1 - scalar(1))*CDkOmega/omega_, - omega_ - ) - ); - - omegaEqn().relax(); - - omegaEqn().boundaryManipulate(omega_.boundaryField()); - - solve(omegaEqn); - bound(omega_, omegaMin_); - - // Turbulent kinetic energy equation - tmp<fvScalarMatrix> kEqn - ( - fvm::ddt(k_) - + fvm::div(phi_, k_) - - fvm::laplacian(DkEff(F1), k_) - == - min(G, c1_*betaStar_*k_*omega_) - - fvm::Sp(betaStar_*omega_, k_) - ); - - kEqn().relax(); - solve(kEqn); - bound(k_, kMin_); - - - // Re-calculate viscosity - nut_ = a1_*k_/max(a1_*omega_, b1_*F23()*sqrt(S2)); - nut_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H deleted file mode 100644 index c64f5e36b..000000000 --- a/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H +++ /dev/null @@ -1,311 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::RASModels::kOmegaSST - -Description - Implementation of the k-omega-SST turbulence model for incompressible - flows. - - Turbulence model described in - \verbatim - Menter, F., Esch, T., - "Elements of Industrial Heat Transfer Prediction", - 16th Brazilian Congress of Mechanical Engineering (COBEM), - Nov. 2001. - \endverbatim - - with updated coefficients from - \verbatim - Menter, F. R., Kuntz, M., and Langtry, R., - "Ten Years of Industrial Experience with the SST Turbulence Model", - Turbulence, Heat and Mass Transfer 4, 2003, - pp. 625 - 632. - \endverbatim - - but with the consistent production terms from the 2001 paper as form in the - 2003 paper is a typo, see - \verbatim - http://turbmodels.larc.nasa.gov/sst.html - \endverbatim - - and the addition of the optional F3 term for rough walls from - \verbatim - Hellsten, A. - "Some Improvements in Menter’s k-omega-SST turbulence model" - 29th AIAA Fluid Dynamics Conference, - AIAA-98-2554, - June 1998. - \endverbatim - - Note that this implementation is written in terms of alpha diffusion - coefficients rather than the more traditional sigma (alpha = 1/sigma) so - that the blending can be applied to all coefficuients in a consistent - manner. The paper suggests that sigma is blended but this would not be - consistent with the blending of the k-epsilon and k-omega models. - - Also note that the error in the last term of equation (2) relating to - sigma has been corrected. - - The default model coefficients correspond to the following: - \verbatim - kOmegaSSTCoeffs - { - alphaK1 0.85; - alphaK2 1.0; - alphaOmega1 0.5; - alphaOmega2 0.856; - beta1 0.075; - beta2 0.0828; - betaStar 0.09; - gamma1 5/9; - gamma2 0.44; - a1 0.31; - b1 1.0; - c1 10.0; - F3 no; - } - \endverbatim - -SourceFiles - kOmegaSST.C - -\*---------------------------------------------------------------------------*/ - -#ifndef kOmegaSST_H -#define kOmegaSST_H - -#include "RASModel.H" -#include "wallDist.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class kOmegaSST Declaration -\*---------------------------------------------------------------------------*/ - -class kOmegaSST -: - public RASModel -{ - -protected: - - // Protected data - - // Model coefficients - dimensionedScalar alphaK1_; - dimensionedScalar alphaK2_; - - dimensionedScalar alphaOmega1_; - dimensionedScalar alphaOmega2_; - - dimensionedScalar gamma1_; - dimensionedScalar gamma2_; - - dimensionedScalar beta1_; - dimensionedScalar beta2_; - - dimensionedScalar betaStar_; - - dimensionedScalar a1_; - dimensionedScalar b1_; - dimensionedScalar c1_; - - Switch F3_; - - - // Fields - - //- Wall distance - // Note: different to wall distance in parent RASModel - // which is for near-wall cells only - const volScalarField& y_; - - volScalarField k_; - volScalarField omega_; - volScalarField nut_; - - - // Protected Member Functions - - tmp<volScalarField> F1(const volScalarField& CDkOmega) const; - tmp<volScalarField> F2() const; - tmp<volScalarField> F3() const; - tmp<volScalarField> F23() const; - - tmp<volScalarField> blend - ( - const volScalarField& F1, - const dimensionedScalar& psi1, - const dimensionedScalar& psi2 - ) const - { - return F1*(psi1 - psi2) + psi2; - } - - tmp<volScalarField> alphaK(const volScalarField& F1) const - { - return blend(F1, alphaK1_, alphaK2_); - } - - tmp<volScalarField> alphaOmega(const volScalarField& F1) const - { - return blend(F1, alphaOmega1_, alphaOmega2_); - } - - tmp<volScalarField> beta(const volScalarField& F1) const - { - return blend(F1, beta1_, beta2_); - } - - tmp<volScalarField> gamma(const volScalarField& F1) const - { - return blend(F1, gamma1_, gamma2_); - } - - -public: - - //- Runtime type information - TypeName("kOmegaSST"); - - - // Constructors - - //- Construct from components - kOmegaSST - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~kOmegaSST() - {} - - - // Member Functions - - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const - { - return nut_; - } - - //- Return the effective diffusivity for k - tmp<volScalarField> DkEff(const volScalarField& F1) const - { - return tmp<volScalarField> - ( - new volScalarField("DkEff", alphaK(F1)*nut_ + nu()) - ); - } - - //- Return the effective diffusivity for omega - tmp<volScalarField> DomegaEff(const volScalarField& F1) const - { - return tmp<volScalarField> - ( - new volScalarField("DomegaEff", alphaOmega(F1)*nut_ + nu()) - ); - } - - //- Return the turbulence kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Return the turbulence specific dissipation rate - virtual tmp<volScalarField> omega() const - { - return omega_; - } - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp<volScalarField> epsilon() const - { - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "epsilon", - mesh_.time().timeName(), - mesh_ - ), - betaStar_*k_*omega_, - omega_.boundaryField().types() - ) - ); - } - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C deleted file mode 100644 index 6967db5ed..000000000 --- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C +++ /dev/null @@ -1,214 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "laminar.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(laminar, 0); -addToRunTimeSelectionTable(RASModel, laminar, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -laminar::laminar -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - RASModel(modelName, U, phi, transport, turbulenceModelName) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volScalarField> laminar::nut() const -{ - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "nut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("nut", nu()().dimensions(), 0.0) - ) - ); -} - - -tmp<volScalarField> laminar::k() const -{ - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("k", sqr(U_.dimensions()), 0.0) - ) - ); -} - - -tmp<volScalarField> laminar::epsilon() const -{ - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar - ( - "epsilon", sqr(U_.dimensions())/dimTime, 0.0 - ) - ) - ); -} - - -tmp<volSymmTensorField> laminar::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedSymmTensor - ( - "R", sqr(U_.dimensions()), symmTensor::zero - ) - ) - ); -} - - -tmp<volSymmTensorField> laminar::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -nu()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> laminar::divDevReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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(); -} - - -void laminar::correct() -{ - turbulenceModel::correct(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.C b/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.C deleted file mode 100644 index 75c4624c2..000000000 --- a/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.C +++ /dev/null @@ -1,356 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "realizableKE.H" -#include "addToRunTimeSelectionTable.H" - -#include "backwardsCompatibilityWallFunctions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(realizableKE, 0); -addToRunTimeSelectionTable(RASModel, realizableKE, dictionary); - -// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // - -tmp<volScalarField> realizableKE::rCmu -( - const volTensorField& gradU, - const volScalarField& S2, - const volScalarField& magS -) -{ - tmp<volSymmTensorField> tS = dev(symm(gradU)); - const volSymmTensorField& S = tS(); - - tmp<volScalarField> W - ( - (2*sqrt(2.0))*((S&S)&&S) - /( - magS*S2 - + dimensionedScalar("small", dimensionSet(0, 0, -3, 0, 0), SMALL) - ) - ); - - tS.clear(); - - tmp<volScalarField> phis - ( - (1.0/3.0)*acos(min(max(sqrt(6.0)*W, -scalar(1)), scalar(1))) - ); - tmp<volScalarField> As = sqrt(6.0)*cos(phis); - tmp<volScalarField> Us = sqrt(S2/2.0 + magSqr(skew(gradU))); - - return 1.0/(A0_ + As*Us*k_/epsilon_); -} - - -tmp<volScalarField> realizableKE::rCmu -( - const volTensorField& gradU -) -{ - const volScalarField S2(2*magSqr(dev(symm(gradU)))); - tmp<volScalarField> magS = sqrt(S2); - return rCmu(gradU, S2, magS); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -realizableKE::realizableKE -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName, - const word& modelName -) -: - RASModel(modelName, U, phi, transport, turbulenceModelName), - - Cmu_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "Cmu", - coeffDict_, - 0.09 - ) - ), - A0_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "A0", - coeffDict_, - 4.0 - ) - ), - C2_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "C2", - coeffDict_, - 1.9 - ) - ), - sigmak_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmak", - coeffDict_, - 1.0 - ) - ), - sigmaEps_ - ( - dimensioned<scalar>::lookupOrAddToDict - ( - "sigmaEps", - coeffDict_, - 1.2 - ) - ), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateK("k", mesh_) - ), - epsilon_ - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateEpsilon("epsilon", mesh_) - ), - nut_ - ( - IOobject - ( - "nut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateNut("nut", mesh_) - ) -{ - bound(k_, kMin_); - bound(epsilon_, epsilonMin_); - - nut_ = rCmu(fvc::grad(U_))*sqr(k_)/epsilon_; - nut_.correctBoundaryConditions(); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp<volSymmTensorField> realizableKE::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - nut_*twoSymm(fvc::grad(U_)), - k_.boundaryField().types() - ) - ); -} - - -tmp<volSymmTensorField> realizableKE::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -nuEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> realizableKE::divDevReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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()) - { - Cmu_.readIfPresent(coeffDict()); - A0_.readIfPresent(coeffDict()); - C2_.readIfPresent(coeffDict()); - sigmak_.readIfPresent(coeffDict()); - sigmaEps_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -void realizableKE::correct() -{ - RASModel::correct(); - - if (!turbulence_) - { - return; - } - - const volTensorField gradU(fvc::grad(U_)); - const volScalarField S2(2*magSqr(dev(symm(gradU)))); - const volScalarField magS(sqrt(S2)); - - const volScalarField eta(magS*k_/epsilon_); - tmp<volScalarField> C1 = max(eta/(scalar(5) + eta), scalar(0.43)); - - volScalarField G(GName(), nut_*S2); - - // Update epsilon and G at the wall - epsilon_.boundaryField().updateCoeffs(); - - - // Dissipation equation - tmp<fvScalarMatrix> epsEqn - ( - fvm::ddt(epsilon_) - + fvm::div(phi_, epsilon_) - - fvm::laplacian(DepsilonEff(), epsilon_) - == - C1*magS*epsilon_ - - fvm::Sp - ( - C2_*epsilon_/(k_ + sqrt(nu()*epsilon_)), - epsilon_ - ) - ); - - epsEqn().relax(); - - epsEqn().boundaryManipulate(epsilon_.boundaryField()); - - solve(epsEqn); - bound(epsilon_, epsilonMin_); - - - // Turbulent kinetic energy equation - tmp<fvScalarMatrix> kEqn - ( - fvm::ddt(k_) - + fvm::div(phi_, k_) - - fvm::laplacian(DkEff(), k_) - == - G - fvm::Sp(epsilon_/k_, k_) - ); - - kEqn().relax(); - solve(kEqn); - bound(k_, kMin_); - - - // Re-calculate viscosity - nut_ = rCmu(gradU, S2, magS)*sqr(k_)/epsilon_; - nut_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.H b/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.H deleted file mode 100644 index 699479253..000000000 --- a/src/turbulenceModels/incompressible/RAS/realizableKE/realizableKE.H +++ /dev/null @@ -1,211 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::RASModels::realizableKE - -Group - grpIcoRASTurbulence - -Description - Realizable k-epsilon turbulence model for incompressible flows. - - Model described in the paper: - \verbatim - "A New k-epsilon Eddy Viscosity Model for High Reynolds Number - Turbulent Flows" - - Tsan-Hsing Shih, William W. Liou, Aamir Shabbir, Zhigang Tang and - Jiang Zhu - - Computers and Fluids Vol. 24, No. 3, pp. 227-238, 1995 - \endverbatim - - The default model coefficients correspond to the following: - \verbatim - realizableKECoeffs - { - Cmu 0.09; - A0 4.0; - C2 1.9; - sigmak 1.0; - sigmaEps 1.2; - } - \endverbatim - -SourceFiles - realizableKE.C - -\*---------------------------------------------------------------------------*/ - -#ifndef realizableKE_H -#define realizableKE_H - -#include "RASModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class realizableKE Declaration -\*---------------------------------------------------------------------------*/ - -class realizableKE -: - public RASModel -{ - -protected: - - // Protected data - - // Model coefficients - - dimensionedScalar Cmu_; - dimensionedScalar A0_; - dimensionedScalar C2_; - dimensionedScalar sigmak_; - dimensionedScalar sigmaEps_; - - - // Fields - - volScalarField k_; - volScalarField epsilon_; - volScalarField nut_; - - - // Protected Member Functions - - tmp<volScalarField> rCmu - ( - const volTensorField& gradU, - const volScalarField& S2, - const volScalarField& magS - ); - - tmp<volScalarField> rCmu(const volTensorField& gradU); - - -public: - - //- Runtime type information - TypeName("realizableKE"); - - // Constructors - - //- Construct from components - realizableKE - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = turbulenceModel::typeName, - const word& modelName = typeName - ); - - - //- Destructor - virtual ~realizableKE() - {} - - - // Member Functions - - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const - { - return nut_; - } - - //- Return the effective diffusivity for k - tmp<volScalarField> DkEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DkEff", nut_/sigmak_ + nu()) - ); - } - - //- Return the effective diffusivity for epsilon - tmp<volScalarField> DepsilonEff() const - { - return tmp<volScalarField> - ( - new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu()) - ); - } - - //- Return the turbulence kinetic energy - virtual tmp<volScalarField> k() const - { - return k_; - } - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp<volScalarField> epsilon() const - { - return epsilon_; - } - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devReff() const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const; - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/Make/files b/src/turbulenceModels/incompressible/turbulenceModel/Make/files deleted file mode 100644 index f770af1ec..000000000 --- a/src/turbulenceModels/incompressible/turbulenceModel/Make/files +++ /dev/null @@ -1,7 +0,0 @@ -turbulenceModel.C -laminar/laminar.C -derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C -derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C -derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C - -LIB = $(FOAM_LIBBIN)/libincompressibleTurbulenceModel diff --git a/src/turbulenceModels/incompressible/turbulenceModel/Make/options b/src/turbulenceModels/incompressible/turbulenceModel/Make/options deleted file mode 100644 index 2af4fa4ba..000000000 --- a/src/turbulenceModels/incompressible/turbulenceModel/Make/options +++ /dev/null @@ -1,8 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels \ - -I$(LIB_SRC)/transportModels - -LIB_LIBS = \ - -lfiniteVolume - diff --git a/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C b/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C deleted file mode 100644 index 9c8e5e423..000000000 --- a/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C +++ /dev/null @@ -1,142 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "atmBoundaryLayerInletVelocityFvPatchVectorField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "surfaceFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -atmBoundaryLayerInletVelocityFvPatchVectorField:: -atmBoundaryLayerInletVelocityFvPatchVectorField -( - const fvPatch& p, - const DimensionedField<vector, volMesh>& iF -) -: - fixedValueFvPatchVectorField(p, iF), - atmBoundaryLayer() -{} - - -atmBoundaryLayerInletVelocityFvPatchVectorField:: -atmBoundaryLayerInletVelocityFvPatchVectorField -( - const fvPatch& p, - const DimensionedField<vector, volMesh>& iF, - const dictionary& dict -) -: - fixedValueFvPatchVectorField(p, iF), - atmBoundaryLayer(patch().Cf(), dict) -{ - vectorField::operator=(U(patch().Cf())); -} - - -atmBoundaryLayerInletVelocityFvPatchVectorField:: -atmBoundaryLayerInletVelocityFvPatchVectorField -( - const atmBoundaryLayerInletVelocityFvPatchVectorField& pvf, - const fvPatch& p, - const DimensionedField<vector, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchVectorField(pvf, p, iF, mapper), - atmBoundaryLayer(pvf, mapper) -{} - - -atmBoundaryLayerInletVelocityFvPatchVectorField:: -atmBoundaryLayerInletVelocityFvPatchVectorField -( - const atmBoundaryLayerInletVelocityFvPatchVectorField& pvf, - const DimensionedField<vector, volMesh>& iF -) -: - fixedValueFvPatchVectorField(pvf, iF), - atmBoundaryLayer(pvf) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void atmBoundaryLayerInletVelocityFvPatchVectorField::autoMap -( - const fvPatchFieldMapper& m -) -{ - fixedValueFvPatchVectorField::autoMap(m); - atmBoundaryLayer::autoMap(m); -} - - -void atmBoundaryLayerInletVelocityFvPatchVectorField::rmap -( - const fvPatchVectorField& pvf, - const labelList& addr -) -{ - fixedValueFvPatchVectorField::rmap(pvf, addr); - - const atmBoundaryLayerInletVelocityFvPatchVectorField& blpvf = - refCast<const atmBoundaryLayerInletVelocityFvPatchVectorField>(pvf); - - atmBoundaryLayer::rmap(blpvf, addr); -} - - -void atmBoundaryLayerInletVelocityFvPatchVectorField::write(Ostream& os) const -{ - fvPatchVectorField::write(os); - atmBoundaryLayer::write(os); - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchVectorField, - atmBoundaryLayerInletVelocityFvPatchVectorField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H b/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H deleted file mode 100644 index 870228368..000000000 --- a/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H +++ /dev/null @@ -1,178 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::atmBoundaryLayerInletVelocityFvPatchVectorField - -Group - grpIcoRASBoundaryConditions grpInletBoundaryConditions - -Description - This boundary condition specifies a velocity inlet profile appropriate - for atmospheric boundary layers (ABL). - - See Foam::incompressible::atmBoundaryLayer for details. - - Example of the boundary condition specification: - \verbatim - ground - { - type atmBoundaryLayerInletVelocity; - n (1 0 0); - z (0 0 1); - Uref 10.0; - Zref 20.0; - z0 uniform 0.1; - zGround uniform 0.0; - } - \endverbatim - -SeeAlso - Foam::incompressible::atmBoundaryLayer, - Foam::incompressible::atmBoundaryLayerInletKFvPatchScalarField, - Foam::incompressible::atmBoundaryLayerInletEpsilonFvPatchScalarField - -SourceFiles - atmBoundaryLayerInletVelocityFvPatchVectorField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef atmBoundaryLayerInletVelocityFvPatchVectorField_H -#define atmBoundaryLayerInletVelocityFvPatchVectorField_H - -#include "fvPatchFields.H" -#include "fixedValueFvPatchFields.H" -#include "atmBoundaryLayer.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class atmBoundaryLayerInletVelocityFvPatchVectorField Declaration -\*---------------------------------------------------------------------------*/ - -class atmBoundaryLayerInletVelocityFvPatchVectorField -: - public fixedValueFvPatchVectorField, - public atmBoundaryLayer -{ - -public: - - //- Runtime type information - TypeName("atmBoundaryLayerInletVelocity"); - - - // Constructors - - //- Construct from patch and internal field - atmBoundaryLayerInletVelocityFvPatchVectorField - ( - const fvPatch&, - const DimensionedField<vector, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - atmBoundaryLayerInletVelocityFvPatchVectorField - ( - const fvPatch&, - const DimensionedField<vector, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // atmBoundaryLayerInletVelocityFvPatchVectorField onto a new patch - atmBoundaryLayerInletVelocityFvPatchVectorField - ( - const atmBoundaryLayerInletVelocityFvPatchVectorField&, - const fvPatch&, - const DimensionedField<vector, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct and return a clone - virtual tmp<fvPatchVectorField> clone() const - { - return tmp<fvPatchVectorField> - ( - new atmBoundaryLayerInletVelocityFvPatchVectorField(*this) - ); - } - - //- Construct as copy setting internal field reference - atmBoundaryLayerInletVelocityFvPatchVectorField - ( - const atmBoundaryLayerInletVelocityFvPatchVectorField&, - const DimensionedField<vector, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchVectorField> clone - ( - const DimensionedField<vector, volMesh>& iF - ) const - { - return tmp<fvPatchVectorField> - ( - new atmBoundaryLayerInletVelocityFvPatchVectorField(*this, iF) - ); - } - - - // Member functions - - // Mapping functions - - //- Map (and resize as needed) from self given a mapping object - virtual void autoMap - ( - const fvPatchFieldMapper& - ); - - //- Reverse map the given fvPatchField onto this fvPatchField - virtual void rmap - ( - const fvPatchVectorField&, - const labelList& - ); - - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C b/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C deleted file mode 100644 index 077e77fda..000000000 --- a/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C +++ /dev/null @@ -1,256 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "turbulentHeatFluxTemperatureFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - // declare specialization within 'Foam' namespace - template<> - const char* NamedEnum - < - Foam::incompressible:: - turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceType, - 2 - >::names[] = - { - "power", - "flux" - }; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - -namespace Foam -{ - -namespace incompressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -const NamedEnum -< - turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceType, - 2 -> turbulentHeatFluxTemperatureFvPatchScalarField::heatSourceTypeNames_; - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -turbulentHeatFluxTemperatureFvPatchScalarField:: -turbulentHeatFluxTemperatureFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedGradientFvPatchScalarField(p, iF), - heatSource_(hsPower), - q_(p.size(), 0.0), - alphaEffName_("undefinedAlphaEff") -{} - - -turbulentHeatFluxTemperatureFvPatchScalarField:: -turbulentHeatFluxTemperatureFvPatchScalarField -( - const turbulentHeatFluxTemperatureFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedGradientFvPatchScalarField(ptf, p, iF, mapper), - heatSource_(ptf.heatSource_), - q_(ptf.q_, mapper), - alphaEffName_(ptf.alphaEffName_) -{} - - -turbulentHeatFluxTemperatureFvPatchScalarField:: -turbulentHeatFluxTemperatureFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - fixedGradientFvPatchScalarField(p, iF), - heatSource_(heatSourceTypeNames_.read(dict.lookup("heatSource"))), - q_("q", dict, p.size()), - alphaEffName_(dict.lookup("alphaEff")) -{ - if (dict.found("value") && dict.found("gradient")) - { - fvPatchField<scalar>::operator=(Field<scalar>("value", dict, p.size())); - gradient() = Field<scalar>("gradient", dict, p.size()); - } - else - { - fvPatchField<scalar>::operator=(patchInternalField()); - gradient() = 0.0; - } -} - - -turbulentHeatFluxTemperatureFvPatchScalarField:: -turbulentHeatFluxTemperatureFvPatchScalarField -( - const turbulentHeatFluxTemperatureFvPatchScalarField& thftpsf -) -: - fixedGradientFvPatchScalarField(thftpsf), - heatSource_(thftpsf.heatSource_), - q_(thftpsf.q_), - alphaEffName_(thftpsf.alphaEffName_) -{} - - -turbulentHeatFluxTemperatureFvPatchScalarField:: -turbulentHeatFluxTemperatureFvPatchScalarField -( - const turbulentHeatFluxTemperatureFvPatchScalarField& thftpsf, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedGradientFvPatchScalarField(thftpsf, iF), - heatSource_(thftpsf.heatSource_), - q_(thftpsf.q_), - alphaEffName_(thftpsf.alphaEffName_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void turbulentHeatFluxTemperatureFvPatchScalarField::autoMap -( - const fvPatchFieldMapper& m -) -{ - scalarField::autoMap(m); - q_.autoMap(m); -} - - -void turbulentHeatFluxTemperatureFvPatchScalarField::rmap -( - const fvPatchScalarField& ptf, - const labelList& addr -) -{ - fixedGradientFvPatchScalarField::rmap(ptf, addr); - - const turbulentHeatFluxTemperatureFvPatchScalarField& thftptf = - refCast<const turbulentHeatFluxTemperatureFvPatchScalarField> - ( - ptf - ); - - q_.rmap(thftptf.q_, addr); -} - - -void turbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const scalarField& alphaEffp = - patch().lookupPatchField<volScalarField, scalar>(alphaEffName_); - - // retrieve (constant) specific heat capacity from transport dictionary - const IOdictionary& transportProperties = - db().lookupObject<IOdictionary>("transportProperties"); - const scalar Cp0(readScalar(transportProperties.lookup("Cp0"))); - - switch (heatSource_) - { - case hsPower: - { - const scalar Ap = gSum(patch().magSf()); - gradient() = q_/(Ap*Cp0*alphaEffp); - break; - } - case hsFlux: - { - gradient() = q_/(Cp0*alphaEffp); - break; - } - default: - { - FatalErrorIn - ( - "turbulentHeatFluxTemperatureFvPatchScalarField" - "(" - "const fvPatch&, " - "const DimensionedField<scalar, volMesh>&, " - "const dictionary&" - ")" - ) << "Unknown heat source type. Valid types are: " - << heatSourceTypeNames_ << nl << exit(FatalError); - } - } - - fixedGradientFvPatchScalarField::updateCoeffs(); -} - - -void turbulentHeatFluxTemperatureFvPatchScalarField::write(Ostream& os) const -{ - fixedGradientFvPatchScalarField::write(os); - os.writeKeyword("heatSource") << heatSourceTypeNames_[heatSource_] - << token::END_STATEMENT << nl; - q_.writeEntry("q", os); - os.writeKeyword("alphaEff") << alphaEffName_ << token::END_STATEMENT << nl; - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - turbulentHeatFluxTemperatureFvPatchScalarField -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H b/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H deleted file mode 100644 index 3a7e1d849..000000000 --- a/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H +++ /dev/null @@ -1,228 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Class - Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField - -Group - grpIcoRASBoundaryConditions grpWallBoundaryConditions - -Description - Fixed heat boundary condition to specify temperature gradient. Input - heat source either specified in terms of an absolute power [W], or as a - flux [W/m2]. - - \heading Patch usage - - \table - Property | Description | Required | Default value - heatSource | heat source type: \c flux [W/m2] or \c power [W]| yes | - q | heat source value | yes | - alphaEff | turbulent thermal diffusivity field name | yes | - \endtable - - Example of the boundary condition specification: - \verbatim - myPatch - { - type turbulentHeatFluxTemperature; - heatSource flux; - q uniform 10; - alphaEff alphaEff; - value uniform 300; // place holder - } - \endverbatim - -Note - - it is assumed that the units of \c alphaEff are [kg/m/s] - - the specific heat capcaity is read from the transport dictionary entry - \c Cp0 - -SourceFiles - turbulentHeatFluxTemperatureFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef turbulentHeatFluxTemperatureFvPatchScalarFields_H -#define turbulentHeatFluxTemperatureFvPatchScalarFields_H - -#include "fvPatchFields.H" -#include "fixedGradientFvPatchFields.H" -#include "NamedEnum.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class turbulentHeatFluxTemperatureFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class turbulentHeatFluxTemperatureFvPatchScalarField -: - public fixedGradientFvPatchScalarField -{ -public: - - // Data types - - //- Enumeration listing the possible hest source input modes - enum heatSourceType - { - hsPower, - hsFlux - }; - - -private: - - // Private data - - //- Heat source type names - static const NamedEnum<heatSourceType, 2> heatSourceTypeNames_; - - //- Heat source type - heatSourceType heatSource_; - - //- Heat power [W] or flux [W/m2] - // NOTE: to be divided by density, rho, if used in kinematic form - scalarField q_; - - //- Name of effective thermal diffusivity field - word alphaEffName_; - - -public: - - //- Runtime type information - TypeName("turbulentHeatFluxTemperature"); - - - // Constructors - - //- Construct from patch and internal field - turbulentHeatFluxTemperatureFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - turbulentHeatFluxTemperatureFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // turbulentHeatFluxTemperatureFvPatchScalarField onto - // a new patch - turbulentHeatFluxTemperatureFvPatchScalarField - ( - const turbulentHeatFluxTemperatureFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - turbulentHeatFluxTemperatureFvPatchScalarField - ( - const turbulentHeatFluxTemperatureFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new turbulentHeatFluxTemperatureFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - turbulentHeatFluxTemperatureFvPatchScalarField - ( - const turbulentHeatFluxTemperatureFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new turbulentHeatFluxTemperatureFvPatchScalarField - ( - *this, - iF - ) - ); - } - - - // Member functions - - // Mapping functions - - //- Map (and resize as needed) from self given a mapping object - virtual void autoMap(const fvPatchFieldMapper&); - - //- Reverse map the given fvPatchField onto this fvPatchField - virtual void rmap - ( - const fvPatchScalarField&, - const labelList& - ); - - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - - // I-O - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C deleted file mode 100644 index f14b68101..000000000 --- a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C +++ /dev/null @@ -1,245 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "laminar.H" -#include "Time.H" -#include "volFields.H" -#include "fvcGrad.H" -#include "fvcDiv.H" -#include "fvmLaplacian.H" -#include "addToRunTimeSelectionTable.H" - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(laminar, 0); -addToRunTimeSelectionTable(turbulenceModel, laminar, turbulenceModel); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -laminar::laminar -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName -) -: - turbulenceModel(U, phi, transport, turbulenceModelName) -{} - - -// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // - -autoPtr<laminar> laminar::New -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName -) -{ - return autoPtr<laminar> - ( - new laminar(U, phi, transport, turbulenceModelName) - ); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -const dictionary& laminar::coeffDict() const -{ - return dictionary::null; -} - - -tmp<volScalarField> laminar::nut() const -{ - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "nut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("nut", nu()().dimensions(), 0.0) - ) - ); -} - - -tmp<volScalarField> laminar::nuEff() const -{ - return tmp<volScalarField>(new volScalarField("nuEff", nu())); -} - - -tmp<volScalarField> laminar::k() const -{ - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("k", sqr(U_.dimensions()), 0.0) - ) - ); -} - - -tmp<volScalarField> laminar::epsilon() const -{ - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar - ( - "epsilon", sqr(U_.dimensions())/dimTime, 0.0 - ) - ) - ); -} - - -tmp<volSymmTensorField> laminar::R() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedSymmTensor - ( - "R", sqr(U_.dimensions()), symmTensor::zero - ) - ) - ); -} - - -tmp<volSymmTensorField> laminar::devReff() const -{ - return tmp<volSymmTensorField> - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -nu()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp<fvVectorMatrix> laminar::divDevReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(T(fvc::grad(U)))) - ); -} - - -tmp<fvVectorMatrix> 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(); -} - - -bool laminar::read() -{ - return true; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C deleted file mode 100644 index 6e607c160..000000000 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C +++ /dev/null @@ -1,143 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "turbulenceModel.H" -#include "volFields.H" -#include "surfaceFields.H" -#include "wallFvPatch.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(turbulenceModel, 0); -defineRunTimeSelectionTable(turbulenceModel, turbulenceModel); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -turbulenceModel::turbulenceModel -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName -) -: - regIOobject - ( - IOobject - ( - turbulenceModelName, - U.time().constant(), - U.db(), - IOobject::NO_READ, - IOobject::NO_WRITE - ) - ), - runTime_(U.time()), - mesh_(U.mesh()), - - U_(U), - phi_(phi), - transportModel_(transport), - y_(mesh_) -{} - - -// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // - -autoPtr<turbulenceModel> turbulenceModel::New -( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName -) -{ - // get model name, but do not register the dictionary - // otherwise it is registered in the database twice - const word modelType - ( - IOdictionary - ( - IOobject - ( - "turbulenceProperties", - U.time().constant(), - U.db(), - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) - ).lookup("simulationType") - ); - - Info<< "Selecting turbulence model type " << modelType << endl; - - turbulenceModelConstructorTable::iterator cstrIter = - turbulenceModelConstructorTablePtr_->find(modelType); - - if (cstrIter == turbulenceModelConstructorTablePtr_->end()) - { - FatalErrorIn - ( - "turbulenceModel::New(const volVectorField&, " - "const surfaceScalarField&, transportModel&, const word&)" - ) << "Unknown turbulenceModel type " - << modelType << nl << nl - << "Valid turbulenceModel types:" << endl - << turbulenceModelConstructorTablePtr_->sortedToc() - << exit(FatalError); - } - - return autoPtr<turbulenceModel> - ( - cstrIter()(U, phi, transport, turbulenceModelName) - ); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void turbulenceModel::correct() -{ - if (mesh_.changing()) - { - y_.correct(); - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H deleted file mode 100644 index 52684d712..000000000 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H +++ /dev/null @@ -1,246 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -Namespace - Foam::incompressible::turbulenceModels - -Description - Namespace for incompressible turbulence turbulence models. - -Class - Foam::incompressible::turbulenceModel - -Description - Abstract base class for incompressible turbulence models - (RAS, LES and laminar). - -SourceFiles - turbulenceModel.C - newTurbulenceModel.C - -\*---------------------------------------------------------------------------*/ - -#ifndef turbulenceModel_H -#define turbulenceModel_H - -#include "primitiveFieldsFwd.H" -#include "volFieldsFwd.H" -#include "surfaceFieldsFwd.H" -#include "fvMatricesFwd.H" -#include "incompressible/transportModel/transportModel.H" -#include "nearWallDist.H" -#include "autoPtr.H" -#include "runTimeSelectionTables.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// Forward declarations -class fvMesh; - -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class turbulenceModel Declaration -\*---------------------------------------------------------------------------*/ - -class turbulenceModel -: - public regIOobject -{ - -protected: - - // Protected data - - const Time& runTime_; - const fvMesh& mesh_; - - const volVectorField& U_; - const surfaceScalarField& phi_; - - const transportModel& transportModel_; - - //- Near wall distance boundary field - nearWallDist y_; - - -private: - - // Private Member Functions - - //- Disallow default bitwise copy construct - turbulenceModel(const turbulenceModel&); - - //- Disallow default bitwise assignment - void operator=(const turbulenceModel&); - - -public: - - //- Runtime type information - TypeName("turbulenceModel"); - - - // Declare run-time New selection table - - declareRunTimeNewSelectionTable - ( - autoPtr, - turbulenceModel, - turbulenceModel, - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName - ), - (U, phi, transport, turbulenceModelName) - ); - - - // Constructors - - //- Construct from components - turbulenceModel - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = typeName - ); - - - // Selectors - - //- Return a reference to the selected turbulence model - static autoPtr<turbulenceModel> New - ( - const volVectorField& U, - const surfaceScalarField& phi, - const transportModel& transport, - const word& turbulenceModelName = typeName - ); - - - //- Destructor - virtual ~turbulenceModel() - {} - - - // Member Functions - - //- Const access to the coefficients dictionary - virtual const dictionary& coeffDict() const = 0; - - //- Helper function to return the nam eof the turbulence G field - inline word GName() const - { - return word(type() + ":G"); - } - - //- Access function to velocity field - inline const volVectorField& U() const - { - return U_; - } - - //- Access function to flux field - inline const surfaceScalarField& phi() const - { - return phi_; - } - - //- Access function to incompressible transport model - inline const transportModel& transport() const - { - return transportModel_; - } - - //- Return the near wall distances - const nearWallDist& y() const - { - return y_; - } - - //- Return the laminar viscosity - inline tmp<volScalarField> nu() const - { - return transportModel_.nu(); - } - - //- Return the turbulence viscosity - virtual tmp<volScalarField> nut() const = 0; - - //- Return the effective viscosity - virtual tmp<volScalarField> nuEff() const = 0; - - //- Return the turbulence kinetic energy - virtual tmp<volScalarField> k() const = 0; - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp<volScalarField> epsilon() const = 0; - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const = 0; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devReff() const = 0; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const = 0; - - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff - ( - const volScalarField& rho, - volVectorField& U - ) const = 0; - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct() = 0; - - //- Read LESProperties or RASProperties dictionary - virtual bool read() = 0; - - //- Default dummy write function - virtual bool writeData(Ostream&) const - { - return true; - } -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/fvSchemes b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/fvSchemes index dbda14ce2..050a277e0 100644 --- a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/fvSchemes +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phid,p) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1; div(phi,k) Gauss limitedLinear 1; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/epsilon b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/epsilon index 8dc2a96f1..26ca09c49 100644 --- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/epsilon +++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/epsilon @@ -29,7 +29,7 @@ boundaryField } ground { - type compressible::epsilonWallFunction; + type epsilonWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -37,7 +37,7 @@ boundaryField } blockedFaces { - type compressible::epsilonWallFunction; + type epsilonWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -45,7 +45,7 @@ boundaryField } baffleWall { - type compressible::epsilonWallFunction; + type epsilonWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/k b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/k index 408330319..a9ff01787 100644 --- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/k +++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/k @@ -29,17 +29,17 @@ boundaryField } ground { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1.5; } blockedFaces { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1.5; } baffleWall { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1.5; } baffleCyclic_half0 diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/k.old b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/k.old index 408330319..a9ff01787 100644 --- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/k.old +++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/k.old @@ -29,17 +29,17 @@ boundaryField } ground { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1.5; } blockedFaces { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1.5; } baffleWall { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1.5; } baffleCyclic_half0 diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/mut b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/nut similarity index 89% rename from tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/mut rename to tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/nut index da762e68d..50a3a27e9 100644 --- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/mut +++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -28,7 +28,7 @@ boundaryField } ground { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -36,7 +36,7 @@ boundaryField } blockedFaces { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -44,7 +44,7 @@ boundaryField } baffleWall { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/RASProperties b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/RASProperties deleted file mode 100644 index 2f7a80d57..000000000 --- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/RASProperties +++ /dev/null @@ -1,36 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel PDRkEpsilon; - -PDRkEpsilonCoeffs -{ - Cmu 0.09; - C1 1.44; - C2 1.92; - C3 0; - C4 0.1; - alphah 1; - alphak 1; - alphaEps 0.76923; -} - -turbulence on; - -printCoeffs on; - -// ************************************************************************* // diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/turbulenceProperties b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/turbulenceProperties index 3721a46a2..3cf4138c4 100644 --- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/turbulenceProperties +++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/turbulenceProperties @@ -15,7 +15,28 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel PDRkEpsilon; + + PDRkEpsilonCoeffs + { + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 0; + C4 0.1; + alphah 1; + alphak 1; + alphaEps 0.76923; + } + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/changeDictionaryDict b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/changeDictionaryDict index a8ce95c9c..b48f2bf73 100644 --- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/changeDictionaryDict +++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/changeDictionaryDict @@ -78,12 +78,12 @@ dictionaryReplacement { blockedFaces { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.1; } baffleWall { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 1e-5; } baffleCyclic_half0 @@ -103,12 +103,12 @@ dictionaryReplacement { blockedFaces { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1.5; } baffleWall { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1.5; } baffleCyclic_half0 diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSchemes b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSchemes index b8943aa44..979d0d7dc 100644 --- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSchemes +++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSchemes @@ -50,7 +50,7 @@ divSchemes div((Su*grad(b))) Gauss linear; div((U+((Su*Xi)*grad(b)))) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(U) Gauss linear; } diff --git a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/0/mut b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/0/nut similarity index 95% rename from tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/0/mut rename to tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/0/nut index a9920120d..113acd86c 100644 --- a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/0/mut +++ b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 1 -1 -1 0 0 0 0 ]; +dimensions [ 0 2 -1 0 0 0 0 ]; internalField uniform 0; diff --git a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/constant/turbulenceProperties b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/constant/turbulenceProperties index 3721a46a2..b9a4c7ca8 100644 --- a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/constant/turbulenceProperties +++ b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel LaunderSharmaKE; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSchemes b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSchemes index c23bdd6ac..359b92b03 100644 --- a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSchemes +++ b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSchemes @@ -49,7 +49,7 @@ divSchemes div(U) Gauss linear; div((Su*grad(b))) Gauss linear; div((U+((Su*Xi)*grad(b)))) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/combustion/engineFoam/kivaTest/-180/epsilon b/tutorials/combustion/engineFoam/kivaTest/-180/epsilon index fed15ed84..9cb713ec9 100644 --- a/tutorials/combustion/engineFoam/kivaTest/-180/epsilon +++ b/tutorials/combustion/engineFoam/kivaTest/-180/epsilon @@ -23,7 +23,7 @@ boundaryField { piston { - type compressible::epsilonWallFunction; + type epsilonWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -31,7 +31,7 @@ boundaryField } liner { - type compressible::epsilonWallFunction; + type epsilonWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -39,7 +39,7 @@ boundaryField } cylinderHead { - type compressible::epsilonWallFunction; + type epsilonWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/combustion/engineFoam/kivaTest/-180/k b/tutorials/combustion/engineFoam/kivaTest/-180/k index 3b0e37804..fb951423a 100644 --- a/tutorials/combustion/engineFoam/kivaTest/-180/k +++ b/tutorials/combustion/engineFoam/kivaTest/-180/k @@ -23,17 +23,17 @@ boundaryField { piston { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 4; } liner { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 4; } cylinderHead { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 4; } } diff --git a/tutorials/combustion/engineFoam/kivaTest/-180/mut b/tutorials/combustion/engineFoam/kivaTest/-180/nut similarity index 87% rename from tutorials/combustion/engineFoam/kivaTest/-180/mut rename to tutorials/combustion/engineFoam/kivaTest/-180/nut index 22cccd07d..68a368eb0 100644 --- a/tutorials/combustion/engineFoam/kivaTest/-180/mut +++ b/tutorials/combustion/engineFoam/kivaTest/-180/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "-180"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -23,7 +23,7 @@ boundaryField { piston { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -31,7 +31,7 @@ boundaryField } liner { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -39,7 +39,7 @@ boundaryField } cylinderHead { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/combustion/engineFoam/kivaTest/constant/polyMesh/boundary b/tutorials/combustion/engineFoam/kivaTest/constant/polyMesh/boundary index 24684a3ec..0b12967f8 100644 --- a/tutorials/combustion/engineFoam/kivaTest/constant/polyMesh/boundary +++ b/tutorials/combustion/engineFoam/kivaTest/constant/polyMesh/boundary @@ -20,18 +20,21 @@ FoamFile piston { type wall; + inGroups 1(wall); nFaces 1326; startFace 79522; } liner { type wall; + inGroups 1(wall); nFaces 2710; startFace 80848; } cylinderHead { type wall; + inGroups 1(wall); nFaces 2184; startFace 83558; } diff --git a/tutorials/combustion/engineFoam/kivaTest/constant/turbulenceProperties b/tutorials/combustion/engineFoam/kivaTest/constant/turbulenceProperties index 3721a46a2..cd2daf822 100644 --- a/tutorials/combustion/engineFoam/kivaTest/constant/turbulenceProperties +++ b/tutorials/combustion/engineFoam/kivaTest/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/combustion/engineFoam/kivaTest/system/fvSchemes b/tutorials/combustion/engineFoam/kivaTest/system/fvSchemes index a92565fef..ed155cb77 100644 --- a/tutorials/combustion/engineFoam/kivaTest/system/fvSchemes +++ b/tutorials/combustion/engineFoam/kivaTest/system/fvSchemes @@ -53,7 +53,7 @@ divSchemes div(U) Gauss linear; div((Su*grad(b))) Gauss linear; div((U+((Su*Xi)*grad(b)))) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/0/alphaSgs b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/0/alphat similarity index 98% rename from tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/0/alphaSgs rename to tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/0/alphat index 91c0c2894..6de647070 100644 --- a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/0/alphaSgs +++ b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/0/alphat @@ -11,7 +11,7 @@ FoamFile format ascii; class volScalarField; location "0"; - object alphaSgs; + object alphat; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/0/muSgs b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/0/nut similarity index 89% rename from tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/0/muSgs rename to tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/0/nut index 9da5b0c67..f7a34d206 100644 --- a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/0/muSgs +++ b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/0/nut @@ -12,13 +12,13 @@ FoamFile format ascii; location "0"; class volScalarField; - object muSgs; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -32,7 +32,7 @@ boundaryField ground { - type mutUSpaldingWallFunction; + type nutUSpaldingWallFunction; value uniform 0; } @@ -50,7 +50,7 @@ boundaryField region0_to_pyrolysisRegion_coupledWall { - type mutUSpaldingWallFunction; + type nutUSpaldingWallFunction; value uniform 0; } diff --git a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/constant/LESProperties b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/constant/LESProperties deleted file mode 100644 index 5ecdc02d1..000000000 --- a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/constant/LESProperties +++ /dev/null @@ -1,93 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object LESProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -LESModel oneEqEddy; - -delta cubeRootVol; - -turbulence on; - -printCoeffs on; - -oneEqEddyCoeffs -{ - Prt 1; -} - -cubeRootVolCoeffs -{ - deltaCoeff 1; -} - -PrandtlCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Cdelta 0.158; -} - -vanDriestCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Aplus 26; - Cdelta 0.158; -} - -smoothCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; -} - - -// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/constant/turbulenceProperties b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/constant/turbulenceProperties index 098d0823a..097319268 100644 --- a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/constant/turbulenceProperties +++ b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/constant/turbulenceProperties @@ -1,4 +1,4 @@ -/*---------------------------------------------------------------------------*\ +/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: dev | @@ -17,7 +17,84 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType LESModel; +simulationType LES; + +LES +{ + LESModel kEqn; + + delta cubeRootVol; + + turbulence on; + + printCoeffs on; + + kEqnCoeffs + { + Prt 1; + } + + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + PrandtlCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Cdelta 0.158; + } + + vanDriestCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Aplus 26; + Cdelta 0.158; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } +} // ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/system/fvSchemes b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/system/fvSchemes index a5dcaf45b..1173de15c 100644 --- a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/system/fvSchemes +++ b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/system/fvSchemes @@ -44,7 +44,7 @@ divSchemes h limitedLinear 1; }; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phiU,p) Gauss linear; div(Ji,Ii_h) Gauss upwind; } diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/alphaSgs b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/alphat similarity index 94% rename from tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/alphaSgs rename to tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/alphat index 5daa28149..b9d5bb084 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/alphaSgs +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/alphat @@ -11,7 +11,7 @@ FoamFile format ascii; class volScalarField; location "0"; - object alphaSgs; + object alphat; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -24,7 +24,6 @@ boundaryField ground { type compressible::alphatWallFunction; - mut muSgs; value uniform 0; } @@ -46,7 +45,6 @@ boundaryField "(region0_to.*)" { type compressible::alphatWallFunction; - mut muSgs; value uniform 0; } } diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/muSgs b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/nut similarity index 91% rename from tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/muSgs rename to tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/nut index cf1d55136..6bce27260 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/muSgs +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/nut @@ -11,10 +11,10 @@ FoamFile format ascii; class volScalarField; location "0"; - object muSgs; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -43,7 +43,7 @@ boundaryField "(region0_to.*)" { - type mutUSpaldingWallFunction; + type nutUSpaldingWallFunction; value uniform 0; } } diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/Allrun b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/Allrun index 28496ffcf..5528c96c7 100755 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/Allrun +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/Allrun @@ -24,9 +24,11 @@ runApplication topoSet -dict system/fBurner.topoSetDict runApplication createPatch -overwrite -decomposePar -force > log.decomposePar.log 2>&1 +decomposePar -force > log.decomposePar 2>&1 -decomposePar -region panelRegion > log.decomposeParPanelRegion.log 2>&1 +decomposePar -region panelRegion > log.decomposeParPanelRegion 2>&1 + +decomposePar -fields > log.decomposePar 2>&1 runParallel `getApplication` 6 diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/LESProperties b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/LESProperties deleted file mode 100644 index 5ecdc02d1..000000000 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/LESProperties +++ /dev/null @@ -1,93 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object LESProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -LESModel oneEqEddy; - -delta cubeRootVol; - -turbulence on; - -printCoeffs on; - -oneEqEddyCoeffs -{ - Prt 1; -} - -cubeRootVolCoeffs -{ - deltaCoeff 1; -} - -PrandtlCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Cdelta 0.158; -} - -vanDriestCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Aplus 26; - Cdelta 0.158; -} - -smoothCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; -} - - -// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/turbulenceProperties b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/turbulenceProperties index 098d0823a..94eb369ba 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/turbulenceProperties +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/turbulenceProperties @@ -1,4 +1,4 @@ -/*---------------------------------------------------------------------------*\ +/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: dev | @@ -17,7 +17,83 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType LESModel; +simulationType LES; +LES +{ + LESModel kEqn; + + delta cubeRootVol; + + turbulence on; + + printCoeffs on; + + kEqnCoeffs + { + Prt 1; + } + + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + PrandtlCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Cdelta 0.158; + } + + vanDriestCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Aplus 26; + Cdelta 0.158; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } +} // ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSchemes b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSchemes index 275212626..0ca1dcaa6 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSchemes +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSchemes @@ -39,7 +39,7 @@ divSchemes CO2 linearUpwind grad(CO2); h linearUpwind grad(h); }; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phi,K) Gauss limitedLinear 1; div(Ji,Ii_h) Gauss upwind; } diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/muSgs b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/alphat similarity index 98% rename from tutorials/combustion/fireFoam/les/smallPoolFire2D/0/muSgs rename to tutorials/combustion/fireFoam/les/smallPoolFire2D/0/alphat index 203285a6c..fe217e29e 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/muSgs +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/alphat @@ -11,7 +11,7 @@ FoamFile format ascii; class volScalarField; location "0"; - object muSgs; + object alphat; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/alphaSgs b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/nut similarity index 95% rename from tutorials/combustion/fireFoam/les/smallPoolFire2D/0/alphaSgs rename to tutorials/combustion/fireFoam/les/smallPoolFire2D/0/nut index 5495f422b..d22df48d1 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/alphaSgs +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object alphaSgs; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/LESProperties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/LESProperties deleted file mode 100644 index c24a9553b..000000000 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/LESProperties +++ /dev/null @@ -1,82 +0,0 @@ -/*---------------------------------------------------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object LESProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -LESModel oneEqEddy; - -delta cubeRootVol; - -turbulence on; - -printCoeffs on; - - -cubeRootVolCoeffs -{ - deltaCoeff 1; -} - -PrandtlCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - maxDeltaRatio 1.1; - } - Cdelta 0.158; -} - -vanDriestCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - maxDeltaRatio 1.1; - } - Aplus 26; - Cdelta 0.158; -} - -smoothCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - maxDeltaRatio 1.1; -} - - -// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/turbulenceProperties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/turbulenceProperties index 098d0823a..2b6d52fc7 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/turbulenceProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/turbulenceProperties @@ -1,4 +1,4 @@ -/*---------------------------------------------------------------------------*\ +/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: dev | @@ -14,10 +14,75 @@ FoamFile location "constant"; object turbulenceProperties; } - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType LESModel; +simulationType LES; + +LES +{ + LESModel kEqn; + + delta cubeRootVol; + + turbulence on; + + printCoeffs on; + + + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + PrandtlCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + maxDeltaRatio 1.1; + } + Cdelta 0.158; + } + + vanDriestCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + maxDeltaRatio 1.1; + } + Aplus 26; + Cdelta 0.158; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + maxDeltaRatio 1.1; + } +} // ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes index efa1275f2..406f98c2a 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes @@ -39,7 +39,7 @@ divSchemes CO2 limitedLinear01 1; h limitedLinear 1; }; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phi,omega) Gauss limitedLinear 1; div(phi,K) Gauss limitedLinear 1; div(U) Gauss linear; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/0/muSgs b/tutorials/combustion/fireFoam/les/smallPoolFire3D/0/alphat similarity index 97% rename from tutorials/combustion/fireFoam/les/smallPoolFire3D/0/muSgs rename to tutorials/combustion/fireFoam/les/smallPoolFire3D/0/alphat index d94861f4b..eee8d350d 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/0/muSgs +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/0/alphat @@ -11,7 +11,7 @@ FoamFile format ascii; class volScalarField; location "0"; - object muSgs; + object alphat; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -37,6 +37,7 @@ boundaryField { type zeroGradient; } + } diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/0/alphaSgs b/tutorials/combustion/fireFoam/les/smallPoolFire3D/0/nut similarity index 94% rename from tutorials/combustion/fireFoam/les/smallPoolFire3D/0/alphaSgs rename to tutorials/combustion/fireFoam/les/smallPoolFire3D/0/nut index ed7509d9f..f626af566 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/0/alphaSgs +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object alphaSgs; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -37,7 +37,6 @@ boundaryField { type zeroGradient; } - } diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/LESProperties b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/LESProperties deleted file mode 100644 index 12e4f39bd..000000000 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/LESProperties +++ /dev/null @@ -1,88 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ - -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object LESProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -LESModel oneEqEddy; - -delta cubeRootVol; - -turbulence on; - -printCoeffs on; - - -oneEqEddyCoeffs -{ - ck 0.07; -} - -cubeRootVolCoeffs -{ - deltaCoeff 1; -} - -PrandtlCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - maxDeltaRatio 1.1; - } - Cdelta 0.158; -} - -vanDriestCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - maxDeltaRatio 1.1; - } - Aplus 26; - Cdelta 0.158; -} - -smoothCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - maxDeltaRatio 1.1; -} - - -// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/turbulenceProperties b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/turbulenceProperties index f97f6389b..fc866e336 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/turbulenceProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/turbulenceProperties @@ -13,10 +13,80 @@ FoamFile location "constant"; object turbulenceProperties; } - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType LESModel; +simulationType LES; + +LES +{ + LESModel kEqn; + + delta cubeRootVol; + + turbulence on; + + printCoeffs on; + + + kEqnCoeffs + { + ck 0.07; + } + + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + PrandtlCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + maxDeltaRatio 1.1; + } + Cdelta 0.158; + } + + vanDriestCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + maxDeltaRatio 1.1; + } + Aplus 26; + Cdelta 0.158; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + maxDeltaRatio 1.1; + } +} // ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSchemes b/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSchemes index e82354947..fbb43d9b9 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSchemes +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSchemes @@ -40,7 +40,7 @@ divSchemes CO2 limitedLinear01 1; h limitedLinear 1; }; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(Ji,Ii_h) Gauss upwind; } diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSchemes b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSchemes index 4e19f9c7d..48b4e3fff 100644 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSchemes +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phid,p) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1; div(phi,k) Gauss limitedLinear 1; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/epsilon b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/epsilon index c6f28faee..8c7abfb78 100644 --- a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/epsilon +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/epsilon @@ -23,27 +23,27 @@ boundaryField { front { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } back { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } walls { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } porosityWall { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } inlet { - type compressible::turbulentMixingLengthDissipationRateInlet; + type turbulentMixingLengthDissipationRateInlet; mixingLength 0.005; value uniform 200; } diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/k b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/k index b92ab42af..acbc36ec2 100644 --- a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/k +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/k @@ -23,22 +23,22 @@ boundaryField { front { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } back { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } walls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } porosityWall { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } inlet diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/mut b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/nut similarity index 85% rename from tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/mut rename to tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/nut index 6f779fd41..4170dde35 100644 --- a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/mut +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -23,22 +23,22 @@ boundaryField { front { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } back { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } walls { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } porosityWall { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } inlet diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/turbulenceProperties b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/turbulenceProperties index 3721a46a2..cd2daf822 100644 --- a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/turbulenceProperties +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/system/fvSchemes b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/system/fvSchemes index cec14e1fb..49aa2c4c8 100644 --- a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/system/fvSchemes +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/system/fvSchemes @@ -39,7 +39,7 @@ divSchemes div((rho*R)) Gauss linear; div(R) Gauss linear; div(U) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.org/mut b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.org/nut similarity index 86% rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.org/mut rename to tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.org/nut index 21f395468..1272c0822 100644 --- a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.org/mut +++ b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.org/nut @@ -11,21 +11,21 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "${FOAM_CASE}/constant/caseSettings" -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; boundaryField { - inlet { $:calculated.mut; } - outlet { $:calculated.mut; } - movingWalls { $:wall.mut; } + inlet { $:calculated.nut; } + outlet { $:calculated.nut; } + movingWalls { $:wall.nut; } staticWalls { $movingWalls; } #include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes" diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/boundaryConditions b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/boundaryConditions index 7c492476c..6224731ba 100644 --- a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/boundaryConditions +++ b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/boundaryConditions @@ -22,7 +22,7 @@ calculated type calculated; value uniform 0; } - mut + nut { type calculated; value uniform 0; @@ -99,19 +99,19 @@ wall k { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform $:innerInlet.k; } epsilon { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform $:innerInlet.epsilon; } - mut + nut { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/turbulenceProperties b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/turbulenceProperties index c2021e727..cd2daf822 100644 --- a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/turbulenceProperties +++ b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/turbulenceProperties @@ -15,6 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + // ************************************************************************* // diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/fvSchemes b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/fvSchemes index 4256201f4..1cd4e17a5 100644 --- a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/fvSchemes +++ b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(meshPhi,p) Gauss linear; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/alphaSgs b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/alphat similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/alphaSgs rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/alphat diff --git a/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/0/nuSgs b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/nut similarity index 98% rename from tutorials/incompressible/pisoFoam/les/pitzDailyMapped/0/nuSgs rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/nut index 608ec8c46..726b637f7 100644 --- a/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/0/nuSgs +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/nut @@ -10,7 +10,7 @@ FoamFile version 2.0; format ascii; class volScalarField; - object nuSgs; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/LESProperties b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/LESProperties deleted file mode 100644 index b78b63e5e..000000000 --- a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/LESProperties +++ /dev/null @@ -1,88 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object LESProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -LESModel oneEqEddy; - -turbulence on; - -printCoeffs on; - -delta cubeRootVol; - -cubeRootVolCoeffs -{ - deltaCoeff 1; -} - -PrandtlCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Cdelta 0.158; -} - -vanDriestCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Aplus 26; - Cdelta 0.158; -} - -smoothCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; -} - - -// ************************************************************************* // diff --git a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/polyMesh/boundary b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/polyMesh/boundary index 43b78ef41..581ceffc7 100644 --- a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/polyMesh/boundary +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/polyMesh/boundary @@ -32,12 +32,14 @@ FoamFile upperWall { type wall; + inGroups 1(wall); nFaces 223; startFace 24257; } lowerWall { type wall; + inGroups 1(wall); nFaces 250; startFace 24480; } diff --git a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/turbulenceProperties b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/turbulenceProperties index a925d3cc2..dccceff3d 100644 --- a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/turbulenceProperties +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/turbulenceProperties @@ -15,7 +15,79 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType LESModel; +simulationType LES; + +LES +{ + LESModel kEqn; + + turbulence on; + + printCoeffs on; + + delta cubeRootVol; + + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + PrandtlCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Cdelta 0.158; + } + + vanDriestCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Aplus 26; + Cdelta 0.158; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } +} // ************************************************************************* // diff --git a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSchemes index 51d323683..36d3193af 100644 --- a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSchemes +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phi,B) Gauss limitedLinear 1; div(phi,muTilda) Gauss limitedLinear 1; div(B) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/epsilon b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/epsilon index c6f28faee..8c7abfb78 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/epsilon +++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/epsilon @@ -23,27 +23,27 @@ boundaryField { front { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } back { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } walls { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } porosityWall { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } inlet { - type compressible::turbulentMixingLengthDissipationRateInlet; + type turbulentMixingLengthDissipationRateInlet; mixingLength 0.005; value uniform 200; } diff --git a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/k b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/k index b92ab42af..acbc36ec2 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/k +++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/k @@ -23,22 +23,22 @@ boundaryField { front { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } back { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } walls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } porosityWall { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } inlet diff --git a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/mut b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/nut similarity index 85% rename from tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/mut rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/nut index 6f779fd41..4170dde35 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/mut +++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -23,22 +23,22 @@ boundaryField { front { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } back { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } walls { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } porosityWall { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } inlet diff --git a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/turbulenceProperties b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/turbulenceProperties index 3721a46a2..cd2daf822 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/turbulenceProperties +++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSchemes index 5d15eae6c..dce2ee09f 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSchemes +++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSchemes @@ -39,7 +39,7 @@ divSchemes div((rho*R)) Gauss linear; div(R) Gauss linear; div(U) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/epsilon b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/epsilon index 6f1ace6a1..cfc9a229b 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/epsilon +++ b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/epsilon @@ -23,13 +23,13 @@ boundaryField { movingWall { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value $internalField; } fixedWalls { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value $internalField; } diff --git a/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/k b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/k index 6917b826d..72d1287df 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/k +++ b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/k @@ -23,12 +23,12 @@ boundaryField { movingWall { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.00325; } fixedWalls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.00325; } frontAndBack diff --git a/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/mut b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/nut similarity index 91% rename from tutorials/compressible/rhoPimpleFoam/ras/cavity/0/mut rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/nut index db1e79f1d..94c53c3de 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/mut +++ b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/nut @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -23,7 +23,7 @@ boundaryField { movingWall { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -31,7 +31,7 @@ boundaryField } fixedWalls { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/omega b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/omega index 5a9f7e014..dc890e42e 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/omega +++ b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/omega @@ -23,7 +23,7 @@ boundaryField { movingWall { - type compressible::omegaWallFunction; + type omegaWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -31,7 +31,7 @@ boundaryField } fixedWalls { - type compressible::omegaWallFunction; + type omegaWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/turbulenceProperties b/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/turbulenceProperties index 3721a46a2..02fa2df1b 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/turbulenceProperties +++ b/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kOmegaSST; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/compressible/rhoPimpleFoam/ras/cavity/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/ras/cavity/system/fvSchemes index 7510de7b7..c2728910f 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/cavity/system/fvSchemes +++ b/tutorials/compressible/rhoPimpleFoam/ras/cavity/system/fvSchemes @@ -39,7 +39,7 @@ divSchemes div((rho*R)) Gauss linear; div(R) Gauss linear; div(U) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/0/epsilon b/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/0/epsilon index dcbf83049..07e4effd3 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/0/epsilon +++ b/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/0/epsilon @@ -23,13 +23,13 @@ boundaryField { rotor { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 20; } stator { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 20; } diff --git a/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/0/k b/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/0/k index 29b185dea..60208ba13 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/0/k +++ b/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/0/k @@ -23,13 +23,13 @@ boundaryField { rotor { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0; } stator { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0; } diff --git a/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/0/mut b/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/0/nut similarity index 88% rename from tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/0/mut rename to tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/0/nut index 98af49fbc..6ca6d3aef 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/0/mut +++ b/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -23,13 +23,13 @@ boundaryField { rotor { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } stator { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } diff --git a/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/constant/RASProperties b/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/constant/turbulenceProperties b/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/constant/turbulenceProperties index 3721a46a2..cd2daf822 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/constant/turbulenceProperties +++ b/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/system/fvSchemes index db6494d80..ddea2bbda 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/system/fvSchemes +++ b/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,h) Gauss limitedLinear 1; div(phi,k) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phi,K) Gauss linear; } diff --git a/tutorials/compressible/rhoPimplecFoam/angledDuct/0/alphat b/tutorials/compressible/rhoPimplecFoam/angledDuct/0/alphat index 33ecb425e..b2a20bdcd 100644 --- a/tutorials/compressible/rhoPimplecFoam/angledDuct/0/alphat +++ b/tutorials/compressible/rhoPimplecFoam/angledDuct/0/alphat @@ -17,39 +17,39 @@ FoamFile dimensions [1 -1 -1 0 0 0 0]; -internalField uniform 0; +internalField uniform 1e-3; boundaryField { front { type compressible::alphatWallFunction; - value uniform 0; + value $internalField; } back { type compressible::alphatWallFunction; - value uniform 0; + value $internalField; } walls { type compressible::alphatWallFunction; - value uniform 0; + value $internalField; } porosityWall { type compressible::alphatWallFunction; - value uniform 0; + value $internalField; } inlet { type calculated; - value uniform 0; + value $internalField; } outlet { type calculated; - value uniform 0; + value $internalField; } } diff --git a/tutorials/compressible/rhoPimplecFoam/angledDuct/0/epsilon b/tutorials/compressible/rhoPimplecFoam/angledDuct/0/epsilon index c6f28faee..8c7abfb78 100644 --- a/tutorials/compressible/rhoPimplecFoam/angledDuct/0/epsilon +++ b/tutorials/compressible/rhoPimplecFoam/angledDuct/0/epsilon @@ -23,27 +23,27 @@ boundaryField { front { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } back { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } walls { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } porosityWall { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } inlet { - type compressible::turbulentMixingLengthDissipationRateInlet; + type turbulentMixingLengthDissipationRateInlet; mixingLength 0.005; value uniform 200; } diff --git a/tutorials/compressible/rhoPimplecFoam/angledDuct/0/k b/tutorials/compressible/rhoPimplecFoam/angledDuct/0/k index b92ab42af..acbc36ec2 100644 --- a/tutorials/compressible/rhoPimplecFoam/angledDuct/0/k +++ b/tutorials/compressible/rhoPimplecFoam/angledDuct/0/k @@ -23,22 +23,22 @@ boundaryField { front { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } back { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } walls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } porosityWall { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } inlet diff --git a/tutorials/compressible/rhoPimplecFoam/angledDuct/0/mut b/tutorials/compressible/rhoPimplecFoam/angledDuct/0/nut similarity index 85% rename from tutorials/compressible/rhoPimplecFoam/angledDuct/0/mut rename to tutorials/compressible/rhoPimplecFoam/angledDuct/0/nut index 6f779fd41..4170dde35 100644 --- a/tutorials/compressible/rhoPimplecFoam/angledDuct/0/mut +++ b/tutorials/compressible/rhoPimplecFoam/angledDuct/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -23,22 +23,22 @@ boundaryField { front { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } back { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } walls { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } porosityWall { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } inlet diff --git a/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/RASProperties b/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/turbulenceProperties b/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/turbulenceProperties index 3721a46a2..cd2daf822 100644 --- a/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/turbulenceProperties +++ b/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvSchemes b/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvSchemes index 5d15eae6c..dce2ee09f 100644 --- a/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvSchemes +++ b/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvSchemes @@ -39,7 +39,7 @@ divSchemes div((rho*R)) Gauss linear; div(R) Gauss linear; div(U) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSchemes b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSchemes index f83203612..232bd728b 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSchemes +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSchemes @@ -28,7 +28,7 @@ gradSchemes divSchemes { div(phi,U) bounded Gauss upwind; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phi,e) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/epsilon b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/epsilon index 12c9b362e..21b1e98ef 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/epsilon +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/epsilon @@ -23,31 +23,31 @@ boundaryField { front { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } back { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } walls { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } porosityWall { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } inlet { - type compressible::turbulentMixingLengthDissipationRateInlet; + type turbulentMixingLengthDissipationRateInlet; mixingLength 0.005; value uniform 200; } diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/k b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/k index 3dbe46f03..cd7aa3109 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/k +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/k @@ -23,25 +23,25 @@ boundaryField { front { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } back { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } walls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } porosityWall { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } diff --git a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/0/mut b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/nut similarity index 85% rename from tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/0/mut rename to tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/nut index a01a5a0ee..4362a65a8 100644 --- a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/0/mut +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 1 -1 -1 0 0 0 0 ]; +dimensions [ 0 2 -1 0 0 0 0 ]; internalField uniform 0; @@ -23,25 +23,25 @@ boundaryField { front { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } back { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } walls { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } porosityWall { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/constant/RASProperties b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/constant/turbulenceProperties b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/constant/turbulenceProperties new file mode 100644 index 000000000..59a2e7e20 --- /dev/null +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/constant/turbulenceProperties @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSchemes b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSchemes index f83203612..232bd728b 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSchemes +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSchemes @@ -28,7 +28,7 @@ gradSchemes divSchemes { div(phi,U) bounded Gauss upwind; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phi,e) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; diff --git a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/0/epsilon b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/0/epsilon index 12c9b362e..21b1e98ef 100644 --- a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/0/epsilon +++ b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/0/epsilon @@ -23,31 +23,31 @@ boundaryField { front { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } back { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } walls { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } porosityWall { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 200; } inlet { - type compressible::turbulentMixingLengthDissipationRateInlet; + type turbulentMixingLengthDissipationRateInlet; mixingLength 0.005; value uniform 200; } diff --git a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/0/k b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/0/k index 3dbe46f03..cd7aa3109 100644 --- a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/0/k +++ b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/0/k @@ -23,25 +23,25 @@ boundaryField { front { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } back { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } walls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } porosityWall { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/mut b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/0/nut similarity index 85% rename from tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/mut rename to tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/0/nut index a01a5a0ee..fcb2bc9b0 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/mut +++ b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 1 -1 -1 0 0 0 0 ]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -23,25 +23,25 @@ boundaryField { front { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } back { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } walls { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } porosityWall { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } diff --git a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/constant/RASProperties b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/constant/polyMesh/boundary b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/constant/polyMesh/boundary index 76e163242..7a2d7d0e5 100644 --- a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/constant/polyMesh/boundary +++ b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/constant/polyMesh/boundary @@ -20,24 +20,28 @@ FoamFile front { type wall; + inGroups 1(wall); nFaces 700; startFace 63400; } back { type wall; + inGroups 1(wall); nFaces 700; startFace 64100; } walls { type wall; + inGroups 1(wall); nFaces 1400; startFace 64800; } porosityWall { type wall; + inGroups 1(wall); nFaces 1600; startFace 66200; } diff --git a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/constant/turbulenceProperties b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/constant/turbulenceProperties new file mode 100644 index 000000000..59a2e7e20 --- /dev/null +++ b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/constant/turbulenceProperties @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/system/fvSchemes b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/system/fvSchemes index b4ca79e3c..7c3213ef9 100644 --- a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/system/fvSchemes +++ b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes default none; div(phi,U) bounded Gauss upwind; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phi,e) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; diff --git a/tutorials/compressible/rhoSimplecFoam/squareBend/0/epsilon b/tutorials/compressible/rhoSimplecFoam/squareBend/0/epsilon index 9161ca617..71b9c782d 100644 --- a/tutorials/compressible/rhoSimplecFoam/squareBend/0/epsilon +++ b/tutorials/compressible/rhoSimplecFoam/squareBend/0/epsilon @@ -23,7 +23,7 @@ boundaryField { Default_Boundary_Region { - type compressible::epsilonWallFunction; + type epsilonWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -31,7 +31,7 @@ boundaryField } inlet { - type compressible::turbulentMixingLengthDissipationRateInlet; + type turbulentMixingLengthDissipationRateInlet; mixingLength 0.005; value uniform 200; } diff --git a/tutorials/compressible/rhoSimplecFoam/squareBend/0/k b/tutorials/compressible/rhoSimplecFoam/squareBend/0/k index baffcd16d..7ee52f8db 100644 --- a/tutorials/compressible/rhoSimplecFoam/squareBend/0/k +++ b/tutorials/compressible/rhoSimplecFoam/squareBend/0/k @@ -23,7 +23,7 @@ boundaryField { Default_Boundary_Region { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } inlet diff --git a/tutorials/compressible/rhoSimplecFoam/squareBend/0/mut b/tutorials/compressible/rhoSimplecFoam/squareBend/0/nut similarity index 92% rename from tutorials/compressible/rhoSimplecFoam/squareBend/0/mut rename to tutorials/compressible/rhoSimplecFoam/squareBend/0/nut index eb4656f29..ac8d562f4 100644 --- a/tutorials/compressible/rhoSimplecFoam/squareBend/0/mut +++ b/tutorials/compressible/rhoSimplecFoam/squareBend/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -23,7 +23,7 @@ boundaryField { Default_Boundary_Region { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/compressible/rhoSimplecFoam/squareBend/constant/RASProperties b/tutorials/compressible/rhoSimplecFoam/squareBend/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/compressible/rhoSimplecFoam/squareBend/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/compressible/rhoSimplecFoam/squareBend/constant/turbulenceProperties b/tutorials/compressible/rhoSimplecFoam/squareBend/constant/turbulenceProperties index 3721a46a2..cd2daf822 100644 --- a/tutorials/compressible/rhoSimplecFoam/squareBend/constant/turbulenceProperties +++ b/tutorials/compressible/rhoSimplecFoam/squareBend/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/compressible/rhoSimplecFoam/squareBend/system/fvSchemes b/tutorials/compressible/rhoSimplecFoam/squareBend/system/fvSchemes index 5a12a4e1d..665b390b9 100644 --- a/tutorials/compressible/rhoSimplecFoam/squareBend/system/fvSchemes +++ b/tutorials/compressible/rhoSimplecFoam/squareBend/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes default none; div(phi,U) bounded Gauss upwind; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phi,e) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSchemes b/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSchemes index 4d56bbf40..0b421e801 100644 --- a/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSchemes +++ b/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSchemes @@ -33,7 +33,7 @@ divSchemes div(phi,e) Gauss limitedLinear 1; div(phi,K) Gauss limitedLinear 1; div(phiv,p) Gauss limitedLinear 1; - div((muEff*dev2(T(grad(U))))) Gauss linear 1; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear 1; } laplacianSchemes diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSchemes b/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSchemes index d42c248c2..85d4f97a6 100644 --- a/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSchemes +++ b/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSchemes @@ -33,7 +33,7 @@ divSchemes div(phi,e) Gauss limitedLinear 1; div(phi,K) Gauss limitedLinear 1; div(phiv,p) Gauss limitedLinear 1; - div((muEff*dev2(T(grad(U))))) Gauss linear 1; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear 1; } laplacianSchemes diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/epsilon b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/epsilon index 9a65ce7ee..867915923 100644 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/epsilon +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/epsilon @@ -39,7 +39,7 @@ boundaryField } WALL10 { - type compressible::epsilonWallFunction; + type epsilonWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/k b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/k index 552f881f4..807d2a2b3 100644 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/k +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/k @@ -39,7 +39,7 @@ boundaryField } WALL10 { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1000; } } diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/mut b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/nut similarity index 92% rename from tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/mut rename to tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/nut index d10d50870..b8c80af97 100644 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/mut +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -37,7 +37,7 @@ boundaryField } WALL10 { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/RASProperties b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/RASProperties deleted file mode 100644 index 34805a0b2..000000000 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel LaunderSharmaKE; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/polyMesh/boundary b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/polyMesh/boundary index b6f0d1102..becd8320f 100644 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/polyMesh/boundary +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/polyMesh/boundary @@ -39,6 +39,7 @@ FoamFile WALL10 { type wall; + inGroups 1(wall); nFaces 260; startFace 160170; } diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/turbulenceProperties b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/turbulenceProperties index 3721a46a2..b9a4c7ca8 100644 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/turbulenceProperties +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel LaunderSharmaKE; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSchemes b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSchemes index ec1368d9c..e43f10e9b 100644 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSchemes +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phiv,p) Gauss limitedLinear 1; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/compressible/sonicFoam/ras/prism/0/epsilon b/tutorials/compressible/sonicFoam/ras/prism/0/epsilon index a7bd5b6bb..baba5a800 100644 --- a/tutorials/compressible/sonicFoam/ras/prism/0/epsilon +++ b/tutorials/compressible/sonicFoam/ras/prism/0/epsilon @@ -46,7 +46,7 @@ boundaryField } prismWall { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 266000; } defaultFaces diff --git a/tutorials/compressible/sonicFoam/ras/prism/0/k b/tutorials/compressible/sonicFoam/ras/prism/0/k index 2917c4e84..61815273a 100644 --- a/tutorials/compressible/sonicFoam/ras/prism/0/k +++ b/tutorials/compressible/sonicFoam/ras/prism/0/k @@ -46,7 +46,7 @@ boundaryField } prismWall { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1000; } defaultFaces diff --git a/tutorials/compressible/sonicFoam/ras/prism/0/mut b/tutorials/compressible/sonicFoam/ras/prism/0/nut similarity index 93% rename from tutorials/compressible/sonicFoam/ras/prism/0/mut rename to tutorials/compressible/sonicFoam/ras/prism/0/nut index 61d98a744..3035025dd 100644 --- a/tutorials/compressible/sonicFoam/ras/prism/0/mut +++ b/tutorials/compressible/sonicFoam/ras/prism/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -43,7 +43,7 @@ boundaryField } prismWall { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } defaultFaces diff --git a/tutorials/compressible/sonicFoam/ras/prism/constant/RASProperties b/tutorials/compressible/sonicFoam/ras/prism/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/compressible/sonicFoam/ras/prism/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/compressible/sonicFoam/ras/prism/constant/turbulenceProperties b/tutorials/compressible/sonicFoam/ras/prism/constant/turbulenceProperties index 3721a46a2..cd2daf822 100644 --- a/tutorials/compressible/sonicFoam/ras/prism/constant/turbulenceProperties +++ b/tutorials/compressible/sonicFoam/ras/prism/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/compressible/sonicFoam/ras/prism/system/fvSchemes b/tutorials/compressible/sonicFoam/ras/prism/system/fvSchemes index bf71cbee7..6519c5e77 100644 --- a/tutorials/compressible/sonicFoam/ras/prism/system/fvSchemes +++ b/tutorials/compressible/sonicFoam/ras/prism/system/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phiv,p) Gauss limitedLinear 1; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/RASProperties b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/turbulenceProperties b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/turbulenceProperties new file mode 100644 index 000000000..59a2e7e20 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/turbulenceProperties @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/fvSchemes b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/fvSchemes index 2ea94995a..9052cd188 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phi,epsilon) Gauss upwind; div(phi,R) Gauss upwind; div(R) Gauss linear; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/RASProperties b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/turbulenceProperties b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/turbulenceProperties new file mode 100644 index 000000000..59a2e7e20 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/turbulenceProperties @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSchemes b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSchemes index 7f51468ad..cbc48629e 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSchemes @@ -33,7 +33,7 @@ divSchemes div(phi,T) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/constant/RASProperties b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/constant/turbulenceProperties b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/constant/turbulenceProperties new file mode 100644 index 000000000..59a2e7e20 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/constant/turbulenceProperties @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/controlDict b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/controlDict index 31ca07d47..590a482d4 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/controlDict +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/controlDict @@ -15,13 +15,6 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -libs -( - "libincompressibleTurbulenceModel.so" - "libincompressibleRASModels.so" - "libincompressibleTransportModels.so" -); - application buoyantBoussinesqSimpleFoam; startFrom startTime; diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/fvSchemes b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/fvSchemes index bba4ac8e0..b64a3959f 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phi,epsilon) bounded Gauss upwind; div(phi,R) bounded Gauss upwind; div(R) Gauss linear; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/epsilon b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/epsilon index 23851291d..892d69375 100644 --- a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/epsilon +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/epsilon @@ -23,17 +23,17 @@ boundaryField { floor { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } ceiling { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } fixedWalls { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } } diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/k b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/k index 62dd72207..8e5e6563e 100644 --- a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/k +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/k @@ -23,17 +23,17 @@ boundaryField { floor { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } ceiling { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } fixedWalls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } } diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/mut b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/nut similarity index 85% rename from tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/mut rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/nut index 3da3e391b..a4ff41498 100644 --- a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/mut +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -23,17 +23,17 @@ boundaryField { floor { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } ceiling { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } fixedWalls { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } } diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/RASProperties b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/turbulenceProperties b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/turbulenceProperties index 3721a46a2..cd2daf822 100644 --- a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/turbulenceProperties +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSchemes b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSchemes index 9ca38f037..d156cf98b 100644 --- a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSchemes @@ -37,7 +37,7 @@ divSchemes div(phi,K) Gauss linear; div(phi,Ekp) Gauss linear; div(R) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/epsilon b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/epsilon index da6d89154..f1ac11910 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/epsilon +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/epsilon @@ -23,22 +23,22 @@ boundaryField { frontAndBack { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 4e-06; } topAndBottom { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 4e-06; } hot { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 4e-06; } cold { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 4e-06; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/k b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/k index 886667fb5..ccdab2054 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/k +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/k @@ -23,22 +23,22 @@ boundaryField { frontAndBack { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 3.75e-04; } topAndBottom { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 3.75e-04; } hot { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 3.75e-04; } cold { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 3.75e-04; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/mut b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/nut similarity index 83% rename from tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/mut rename to tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/nut index 0ecb8672d..bc7b91040 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/mut +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -23,22 +23,22 @@ boundaryField { frontAndBack { - type mutUWallFunction; + type nutUWallFunction; value uniform 0; } topAndBottom { - type mutUWallFunction; + type nutUWallFunction; value uniform 0; } hot { - type mutUWallFunction; + type nutUWallFunction; value uniform 0; } cold { - type mutUWallFunction; + type nutUWallFunction; value uniform 0; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/omega b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/omega index 423815a2d..481f4e64d 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/omega +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/omega @@ -23,22 +23,22 @@ boundaryField { frontAndBack { - type compressible::omegaWallFunction; + type omegaWallFunction; value uniform 0.12; } topAndBottom { - type compressible::omegaWallFunction; + type omegaWallFunction; value uniform 0.12; } hot { - type compressible::omegaWallFunction; + type omegaWallFunction; value uniform 0.12; } cold { - type compressible::omegaWallFunction; + type omegaWallFunction; value uniform 0.12; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/RASProperties b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/RASProperties deleted file mode 100644 index be86bc1ef..000000000 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/RASProperties +++ /dev/null @@ -1,23 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kOmegaSST; - -turbulence on; - -printCoeffs on; - -// ************************************************************************* // diff --git a/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/RASProperties b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/turbulenceProperties similarity index 89% rename from tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/RASProperties rename to tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/turbulenceProperties index e0e6b776a..beee8bdf0 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/RASProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/turbulenceProperties @@ -10,16 +10,18 @@ FoamFile version 2.0; format ascii; class dictionary; - location "constant"; object RASProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -RASModel kOmegaSST; +RAS +{ + RASModel kOmegaSST; -turbulence on; + turbulence on; -printCoeffs on; + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSchemes b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSchemes index 5e55527b8..d2738ff36 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(phi,k) bounded Gauss limitedLinear 0.2; div(phi,epsilon) bounded Gauss limitedLinear 0.2; div(phi,omega) bounded Gauss limitedLinear 0.2; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/epsilon b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/epsilon index 7ac88b923..e850a8a82 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/epsilon +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/epsilon @@ -26,7 +26,7 @@ boundaryField floor { - type compressible::epsilonWallFunction; + type epsilonWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -34,7 +34,7 @@ boundaryField } ceiling { - type compressible::epsilonWallFunction; + type epsilonWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/wallBafflePatches b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/wallBafflePatches index fd5f3f8c4..c9385a0f6 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/wallBafflePatches +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/wallBafflePatches @@ -14,19 +14,19 @@ alphat epsilon { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } k { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.01; } -mut +nut { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/k b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/k index 97f41e6e2..e231033d1 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/k +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/k @@ -26,12 +26,12 @@ boundaryField floor { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } ceiling { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } inlet diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/mut b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/nut similarity index 91% rename from tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/mut rename to tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/nut index 329027bb9..53df88227 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/mut +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -26,7 +26,7 @@ boundaryField floor { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -34,7 +34,7 @@ boundaryField } ceiling { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/RASProperties b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/RASProperties deleted file mode 100644 index 5eeb61a9a..000000000 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/RASProperties +++ /dev/null @@ -1,23 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - -// ************************************************************************* // diff --git a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/RASProperties b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/turbulenceProperties similarity index 89% rename from tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/RASProperties rename to tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/turbulenceProperties index a4937b503..1c094d0a3 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/RASProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/turbulenceProperties @@ -10,16 +10,18 @@ FoamFile version 2.0; format ascii; class dictionary; - location "constant"; object RASProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -RASModel kEpsilon; +RAS +{ + RASModel kEpsilon; -turbulence on; + turbulence on; -printCoeffs on; + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/controlDict b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/controlDict index f35c15f10..78f6a784a 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/controlDict +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/controlDict @@ -44,6 +44,6 @@ timePrecision 6; runTimeModifiable true; -libs ("libthermalBaffleModels.so" "libcompressibleRASModels.so"); +libs ("libthermalBaffleModels.so"); // ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes index 9881bbd43..0c8ae95a6 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes @@ -33,18 +33,18 @@ divSchemes div(phi,k) bounded Gauss limitedLinear 0.2; div(phi,epsilon) bounded Gauss limitedLinear 0.2; div(phi,omega) bounded Gauss limitedLinear 0.2; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default none; - laplacian(muEff,U) Gauss linear uncorrected; + laplacian((rho*nuEff),U) Gauss linear uncorrected; laplacian(rhorAUf,p_rgh) Gauss linear uncorrected; laplacian(alphaEff,h) Gauss linear uncorrected; - laplacian(DkEff,k) Gauss linear uncorrected; - laplacian(DepsilonEff,epsilon) Gauss linear uncorrected; - laplacian(DomegaEff,omega) Gauss linear uncorrected; + laplacian((rho*DkEff),k) Gauss linear uncorrected; + laplacian((rho*DepsilonEff),epsilon) Gauss linear uncorrected; + laplacian((rho*DomegaEff),omega) Gauss linear uncorrected; } interpolationSchemes diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/epsilon b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/epsilon index da6d89154..f1ac11910 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/epsilon +++ b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/epsilon @@ -23,22 +23,22 @@ boundaryField { frontAndBack { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 4e-06; } topAndBottom { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 4e-06; } hot { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 4e-06; } cold { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 4e-06; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/k b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/k index 886667fb5..ccdab2054 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/k +++ b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/k @@ -23,22 +23,22 @@ boundaryField { frontAndBack { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 3.75e-04; } topAndBottom { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 3.75e-04; } hot { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 3.75e-04; } cold { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 3.75e-04; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/mut b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/nut similarity index 83% rename from tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/mut rename to tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/nut index 0ecb8672d..bc7b91040 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/mut +++ b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -23,22 +23,22 @@ boundaryField { frontAndBack { - type mutUWallFunction; + type nutUWallFunction; value uniform 0; } topAndBottom { - type mutUWallFunction; + type nutUWallFunction; value uniform 0; } hot { - type mutUWallFunction; + type nutUWallFunction; value uniform 0; } cold { - type mutUWallFunction; + type nutUWallFunction; value uniform 0; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/omega b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/omega index 423815a2d..481f4e64d 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/omega +++ b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/omega @@ -23,22 +23,22 @@ boundaryField { frontAndBack { - type compressible::omegaWallFunction; + type omegaWallFunction; value uniform 0.12; } topAndBottom { - type compressible::omegaWallFunction; + type omegaWallFunction; value uniform 0.12; } hot { - type compressible::omegaWallFunction; + type omegaWallFunction; value uniform 0.12; } cold { - type compressible::omegaWallFunction; + type omegaWallFunction; value uniform 0.12; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/constant/RASProperties b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/constant/RASProperties deleted file mode 100644 index be86bc1ef..000000000 --- a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/constant/RASProperties +++ /dev/null @@ -1,23 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kOmegaSST; - -turbulence on; - -printCoeffs on; - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/constant/turbulenceProperties b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/constant/turbulenceProperties new file mode 100644 index 000000000..beee8bdf0 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/constant/turbulenceProperties @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object RASProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel kOmegaSST; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/system/fvSchemes b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/system/fvSchemes index 5e55527b8..d2738ff36 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/system/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(phi,k) bounded Gauss limitedLinear 0.2; div(phi,epsilon) bounded Gauss limitedLinear 0.2; div(phi,omega) bounded Gauss limitedLinear 0.2; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/epsilon b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/epsilon index 312afc24a..a0fa682a6 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/epsilon +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/epsilon @@ -23,22 +23,22 @@ boundaryField { box { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } floor { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } ceiling { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } fixedWalls { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/k b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/k index 2b618db2f..0ca172de8 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/k +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/k @@ -23,22 +23,22 @@ boundaryField { box { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } floor { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } ceiling { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } fixedWalls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/mut b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/nut similarity index 83% rename from tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/mut rename to tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/nut index 504bd304c..86ee5ac89 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/mut +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -23,22 +23,22 @@ boundaryField { box { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } floor { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } ceiling { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } fixedWalls { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/constant/RASProperties b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/constant/RASProperties b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/constant/turbulenceProperties similarity index 90% rename from tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/constant/RASProperties rename to tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/constant/turbulenceProperties index 34805a0b2..15d9319a4 100644 --- a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/constant/RASProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/constant/turbulenceProperties @@ -15,11 +15,14 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -RASModel LaunderSharmaKE; +RAS +{ + RASModel kEpsilon; -turbulence on; + turbulence on; -printCoeffs on; + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/system/fvSchemes b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/system/fvSchemes index 2ceace5b7..293a173b1 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/system/fvSchemes @@ -33,7 +33,7 @@ divSchemes div(phi,h) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/epsilon b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/epsilon index b8e91addc..c49b1005e 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/epsilon +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/epsilon @@ -23,7 +23,7 @@ boundaryField { box { - type compressible::epsilonWallFunction; + type epsilonWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -31,7 +31,7 @@ boundaryField } floor { - type compressible::epsilonWallFunction; + type epsilonWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -39,7 +39,7 @@ boundaryField } ceiling { - type compressible::epsilonWallFunction; + type epsilonWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -47,7 +47,7 @@ boundaryField } fixedWalls { - type compressible::epsilonWallFunction; + type epsilonWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/k b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/k index 2b618db2f..0ca172de8 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/k +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/k @@ -23,22 +23,22 @@ boundaryField { box { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } floor { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } ceiling { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } fixedWalls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/mut b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/nut similarity index 86% rename from tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/mut rename to tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/nut index 93c6dc22b..a7fc155fc 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/mut +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -23,7 +23,7 @@ boundaryField { box { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -31,7 +31,7 @@ boundaryField } floor { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -39,7 +39,7 @@ boundaryField } ceiling { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -47,7 +47,7 @@ boundaryField } fixedWalls { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/constant/RASProperties b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/RASProperties b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/constant/turbulenceProperties similarity index 90% rename from tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/RASProperties rename to tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/constant/turbulenceProperties index a4937b503..15d9319a4 100644 --- a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/RASProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/constant/turbulenceProperties @@ -15,11 +15,14 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -RASModel kEpsilon; +RAS +{ + RASModel kEpsilon; -turbulence on; + turbulence on; -printCoeffs on; + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/system/fvSchemes b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/system/fvSchemes index e0a0f4efd..1abd80550 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/system/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(phi,k) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; div(Ji,Ii_h) bounded Gauss linearUpwind grad(Ii_h); - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/bottomWater/epsilon b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/bottomWater/epsilon index c09d9c59c..f8b893353 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/bottomWater/epsilon +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/bottomWater/epsilon @@ -34,32 +34,32 @@ boundaryField } minY { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } minZ { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } maxZ { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } bottomWater_to_rightSolid { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } bottomWater_to_leftSolid { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } bottomWater_to_heater { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/bottomWater/k b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/bottomWater/k index 556c0d3d9..2558d1e2e 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/bottomWater/k +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/bottomWater/k @@ -34,32 +34,32 @@ boundaryField } minY { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } minZ { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } maxZ { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } bottomWater_to_rightSolid { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } bottomWater_to_leftSolid { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } bottomWater_to_heater { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun index 070546bfc..bf6e7f748 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun @@ -12,7 +12,7 @@ runApplication splitMeshRegions -cellZones -overwrite # remove fluid fields from solid regions (important for post-processing) for i in heater leftSolid rightSolid do - rm -f 0*/$i/{mut,alphat,epsilon,k,U,p_rgh} + rm -f 0*/$i/{nut,alphat,epsilon,k,U,p_rgh} done diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomWater/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomWater/changeDictionaryDict index dad0abea1..63a08c87a 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomWater/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomWater/changeDictionaryDict @@ -97,7 +97,7 @@ dictionaryReplacement ".*" { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } } @@ -123,7 +123,7 @@ dictionaryReplacement ".*" { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomWater/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomWater/fvSchemes index 3051d55b0..1278f2856 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomWater/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomWater/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phi,epsilon) Gauss upwind; div(phi,R) Gauss upwind; div(R) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/controlDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/controlDict index 77bc57943..32b54e823 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/controlDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/controlDict @@ -15,12 +15,6 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -libs -( - "libcompressibleTurbulenceModel.so" - "libcompressibleRASModels.so" -); - application chtMultiRegionFoam; startFrom latestTime; diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict index fef7666e7..ae6e8d8c8 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict @@ -83,7 +83,7 @@ dictionaryReplacement { ".*" { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } @@ -109,7 +109,7 @@ dictionaryReplacement { ".*" { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun index f00ffc591..1b68a368e 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun @@ -16,7 +16,7 @@ runApplication splitMeshRegions -cellZones -overwrite # remove fluid fields from solid regions (important for post-processing) for i in heater leftSolid rightSolid do - rm -f 0*/$i/{mut,alphat,epsilon,k,U,p_rgh} + rm -f 0*/$i/{nut,alphat,epsilon,k,U,p_rgh} done diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/RASProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/RASProperties deleted file mode 100644 index 09a9a5585..000000000 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/RASProperties +++ /dev/null @@ -1,24 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel laminar; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/RASProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/RASProperties deleted file mode 120000 index eaf002d2e..000000000 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/RASProperties +++ /dev/null @@ -1 +0,0 @@ -../bottomAir/RASProperties \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/changeDictionaryDict index caff66645..b7bddf908 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/changeDictionaryDict @@ -74,7 +74,7 @@ dictionaryReplacement { ".*" { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } } @@ -88,7 +88,7 @@ dictionaryReplacement { ".*" { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/fvSchemes index dca5ba3f8..867b0a2e9 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phi,epsilon) Gauss upwind; div(phi,R) Gauss upwind; div(R) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/changeDictionaryDict index fef7666e7..ae6e8d8c8 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/changeDictionaryDict @@ -83,7 +83,7 @@ dictionaryReplacement { ".*" { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } @@ -109,7 +109,7 @@ dictionaryReplacement { ".*" { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/air/alphat b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/air/alphat new file mode 100644 index 000000000..40eeda22b --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/air/alphat @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.3.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0/air"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + walls + { + type compressible::alphatWallFunction; + value uniform 0; + } + inlet + { + type calculated; + value uniform 0; + } + outlet + { + type calculated; + value uniform 0; + } + blades + { + type compressible::alphatWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/air/epsilon b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/air/epsilon index 46cfcab3a..49dcfaa45 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/air/epsilon +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/air/epsilon @@ -23,7 +23,7 @@ boundaryField { walls { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value $internalField; } inlet @@ -37,7 +37,7 @@ boundaryField } blades { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value $internalField; } } diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/air/k b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/air/k index 6a2ab6f94..3f0421bdf 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/air/k +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/air/k @@ -23,7 +23,7 @@ boundaryField { walls { - type compressible::kqRWallFunction; + type kqRWallFunction; value $internalField; } inlet @@ -37,7 +37,7 @@ boundaryField } blades { - type compressible::kqRWallFunction; + type kqRWallFunction; value $internalField; } } diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/air/nut b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/air/nut new file mode 100644 index 000000000..63b9c797a --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/air/nut @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.3.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0/air"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + walls + { + type nutkWallFunction; + value uniform 0; + } + inlet + { + type calculated; + value uniform 0; + } + outlet + { + type calculated; + value uniform 0; + } + blades + { + type nutkWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/air/RASProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/air/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/air/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/air/turbulenceProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/air/turbulenceProperties index 3721a46a2..cd2daf822 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/air/turbulenceProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/air/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/porous/RASProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/porous/RASProperties deleted file mode 100644 index 1cc42b8af..000000000 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/porous/RASProperties +++ /dev/null @@ -1,24 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel laminar; - -turbulence off; - -printCoeffs off; - - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/air/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/air/fvSchemes index a39397c7c..52e15c826 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/air/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/air/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phi,K) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/porous/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/porous/fvSchemes index f787aa1bb..27a33bf7c 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/porous/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/porous/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(phi,K) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun.pre index 6590684a5..9ce6c565d 100755 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun.pre +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun.pre @@ -12,7 +12,7 @@ runApplication splitMeshRegions -cellZones -overwrite # remove fluid fields from solid regions (important for post-processing) for i in heater leftSolid rightSolid do - rm -f 0*/$i/{rho,mut,alphat,epsilon,k,U,p_rgh,Qr,G,IDefault} + rm -f 0*/$i/{rho,nut,alphat,epsilon,k,U,p_rgh,Qr,G,IDefault} done for i in bottomAir topAir heater leftSolid rightSolid diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/RASProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/RASProperties deleted file mode 100644 index c6886ad28..000000000 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/RASProperties +++ /dev/null @@ -1,24 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel laminar; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/RASProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/RASProperties deleted file mode 120000 index eaf002d2e..000000000 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/RASProperties +++ /dev/null @@ -1 +0,0 @@ -../bottomAir/RASProperties \ No newline at end of file diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/changeDictionaryDict index b115024cc..c583021fa 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/changeDictionaryDict @@ -71,7 +71,7 @@ dictionaryReplacement { ".*" { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } } @@ -84,7 +84,7 @@ dictionaryReplacement { ".*" { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } } diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/fvSchemes index 127c9c965..f761dabb4 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/fvSchemes @@ -37,7 +37,7 @@ divSchemes div(phi,R) bounded Gauss upwind; div(R) Gauss linear; div(Ji,Ii_h) Gauss linearUpwind grad(U); - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/changeDictionaryDict index e62946373..68f73839a 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/changeDictionaryDict @@ -82,7 +82,7 @@ dictionaryReplacement { ".*" { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.01; } @@ -107,7 +107,7 @@ dictionaryReplacement { ".*" { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.1; } diff --git a/tutorials/incompressible/SRFPimpleFoam/rotor2D/constant/RASProperties b/tutorials/incompressible/SRFPimpleFoam/rotor2D/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/incompressible/SRFPimpleFoam/rotor2D/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/SRFPimpleFoam/rotor2D/constant/polyMesh/boundary b/tutorials/incompressible/SRFPimpleFoam/rotor2D/constant/polyMesh/boundary index 0ffa7ce34..921d19779 100644 --- a/tutorials/incompressible/SRFPimpleFoam/rotor2D/constant/polyMesh/boundary +++ b/tutorials/incompressible/SRFPimpleFoam/rotor2D/constant/polyMesh/boundary @@ -20,6 +20,7 @@ FoamFile rotor { type wall; + inGroups 1(wall); nFaces 144; startFace 5640; } @@ -32,12 +33,14 @@ FoamFile front { type empty; + inGroups 1(empty); nFaces 2880; startFace 5880; } back { type empty; + inGroups 1(empty); nFaces 2880; startFace 8760; } diff --git a/tutorials/incompressible/SRFPimpleFoam/rotor2D/constant/turbulenceProperties b/tutorials/incompressible/SRFPimpleFoam/rotor2D/constant/turbulenceProperties index e7fa28c74..381b548ef 100644 --- a/tutorials/incompressible/SRFPimpleFoam/rotor2D/constant/turbulenceProperties +++ b/tutorials/incompressible/SRFPimpleFoam/rotor2D/constant/turbulenceProperties @@ -15,6 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + // ************************************************************************* // diff --git a/tutorials/incompressible/SRFPimpleFoam/rotor2D/system/fvSchemes b/tutorials/incompressible/SRFPimpleFoam/rotor2D/system/fvSchemes index d93000913..4a2232f73 100644 --- a/tutorials/incompressible/SRFPimpleFoam/rotor2D/system/fvSchemes +++ b/tutorials/incompressible/SRFPimpleFoam/rotor2D/system/fvSchemes @@ -31,7 +31,7 @@ divSchemes div(phi,Urel) Gauss limitedLinearV 1; div(phi,k) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1; - div((nuEff*dev(T(grad(Urel))))) Gauss linear; + div((nuEff*dev2(T(grad(Urel))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/SRFSimpleFoam/mixer/constant/RASProperties b/tutorials/incompressible/SRFSimpleFoam/mixer/constant/RASProperties deleted file mode 100644 index e0e6b776a..000000000 --- a/tutorials/incompressible/SRFSimpleFoam/mixer/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kOmegaSST; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/SRFSimpleFoam/mixer/constant/turbulenceProperties b/tutorials/incompressible/SRFSimpleFoam/mixer/constant/turbulenceProperties new file mode 100644 index 000000000..85d399a1e --- /dev/null +++ b/tutorials/incompressible/SRFSimpleFoam/mixer/constant/turbulenceProperties @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel kOmegaSST; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/SRFSimpleFoam/mixer/system/fvSchemes b/tutorials/incompressible/SRFSimpleFoam/mixer/system/fvSchemes index c6d44d3c2..e5ff26a90 100644 --- a/tutorials/incompressible/SRFSimpleFoam/mixer/system/fvSchemes +++ b/tutorials/incompressible/SRFSimpleFoam/mixer/system/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phi,R) bounded Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) bounded Gauss upwind; - div((nuEff*dev(T(grad(Urel))))) Gauss linear; + div((nuEff*dev2(T(grad(Urel))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/SRFSimpleFoam/mixer/turbulenceProperties b/tutorials/incompressible/SRFSimpleFoam/mixer/turbulenceProperties new file mode 100644 index 000000000..85d399a1e --- /dev/null +++ b/tutorials/incompressible/SRFSimpleFoam/mixer/turbulenceProperties @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel kOmegaSST; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/constant/RASProperties b/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/constant/RASProperties deleted file mode 100644 index aed2ebec5..000000000 --- a/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/constant/RASProperties +++ /dev/null @@ -1,24 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - -// ************************************************************************* // diff --git a/tutorials/combustion/engineFoam/kivaTest/constant/RASProperties b/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/constant/turbulenceProperties similarity index 90% rename from tutorials/combustion/engineFoam/kivaTest/constant/RASProperties rename to tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/constant/turbulenceProperties index a4937b503..15d9319a4 100644 --- a/tutorials/combustion/engineFoam/kivaTest/constant/RASProperties +++ b/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/constant/turbulenceProperties @@ -15,11 +15,14 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -RASModel kEpsilon; +RAS +{ + RASModel kEpsilon; -turbulence on; + turbulence on; -printCoeffs on; + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/system/fvSchemes b/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/system/fvSchemes index de12e1d3a..06b08169d 100644 --- a/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/system/fvSchemes +++ b/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/system/fvSchemes @@ -32,10 +32,10 @@ divSchemes div(phi,U) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; div(-phi,Ua) bounded Gauss upwind; - div((nuEff*dev(T(grad(Ua))))) Gauss linear; + div((nuEff*dev2(T(grad(Ua))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/boundaryFoam/boundaryLaunderSharma/constant/RASProperties b/tutorials/incompressible/boundaryFoam/boundaryLaunderSharma/constant/RASProperties deleted file mode 100644 index 34805a0b2..000000000 --- a/tutorials/incompressible/boundaryFoam/boundaryLaunderSharma/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel LaunderSharmaKE; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/boundaryFoam/boundaryLaunderSharma/constant/turbulenceProperties b/tutorials/incompressible/boundaryFoam/boundaryLaunderSharma/constant/turbulenceProperties new file mode 100644 index 000000000..8e24a9035 --- /dev/null +++ b/tutorials/incompressible/boundaryFoam/boundaryLaunderSharma/constant/turbulenceProperties @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel LaunderSharmaKE; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/boundaryFoam/boundaryLaunderSharma/system/fvSchemes b/tutorials/incompressible/boundaryFoam/boundaryLaunderSharma/system/fvSchemes index 815e25820..0fd54ce50 100644 --- a/tutorials/incompressible/boundaryFoam/boundaryLaunderSharma/system/fvSchemes +++ b/tutorials/incompressible/boundaryFoam/boundaryLaunderSharma/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,epsilon) bounded Gauss linear; div(phi,R) bounded Gauss linear; div(phi,nuTilda) bounded Gauss linear; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/constant/RASProperties b/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/constant/turbulenceProperties b/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/constant/turbulenceProperties new file mode 100644 index 000000000..59a2e7e20 --- /dev/null +++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/constant/turbulenceProperties @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/system/fvSchemes b/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/system/fvSchemes index 815e25820..0fd54ce50 100644 --- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/system/fvSchemes +++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,epsilon) bounded Gauss linear; div(phi,R) bounded Gauss linear; div(phi,nuTilda) bounded Gauss linear; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/constant/RASProperties b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/constant/RASProperties deleted file mode 100644 index b74bfe573..000000000 --- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; // SpalartAllmaras; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/constant/turbulenceProperties b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/constant/turbulenceProperties new file mode 100644 index 000000000..59a2e7e20 --- /dev/null +++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/constant/turbulenceProperties @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/system/fvSchemes b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/system/fvSchemes index ce1e571bf..36dca60f6 100644 --- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/system/fvSchemes +++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/system/fvSchemes @@ -33,7 +33,7 @@ divSchemes div(phi,omega) bounded Gauss linear; div(phi,R) bounded Gauss linear; div(phi,nuTilda) bounded Gauss linear; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/constant/RASProperties b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/system/fvSchemes index 83902138b..44da6880a 100644 --- a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/system/fvSchemes +++ b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/system/fvSchemes @@ -31,7 +31,7 @@ divSchemes { default none; div(phi,U) Gauss linearUpwind grad(U); - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSchemes index b7e6607f8..51be17c90 100644 --- a/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSchemes +++ b/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSchemes @@ -29,7 +29,7 @@ divSchemes { default none; div(phi,U) Gauss linear; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/nuSgs b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/0.org/nut similarity index 61% rename from tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/nuSgs rename to tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/0.org/nut index 77f51f798..55d04b421 100644 --- a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/nuSgs +++ b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/0.org/nut @@ -10,7 +10,8 @@ FoamFile version 2.0; format ascii; class volScalarField; - object nuSgs; + location "0"; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -23,25 +24,44 @@ boundaryField inlet { type fixedValue; - value uniform 0; + value $internalField; } - outlet { type inletOutlet; - inletValue uniform 0; - value uniform 0; + inletValue $internalField; + value $internalField; } - walls { - type zeroGradient; + type nutkWallFunction; + value $internalField; } - defaultFaces { type empty; } + ACMI1_blockage + { + type nutkWallFunction; + value $internalField; + } + ACMI1_couple + { + type cyclicACMI; + value $internalField; + } + ACMI2_blockage + { + type nutkWallFunction; + value $internalField; + } + ACMI2_couple + { + type cyclicACMI; + value $internalField; + } } + // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/constant/RASProperties b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/constant/turbulenceProperties b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/constant/turbulenceProperties index 3721a46a2..cd2daf822 100644 --- a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/constant/turbulenceProperties +++ b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/system/fvSchemes index b6ae74a4e..f65b5bf39 100644 --- a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/system/fvSchemes +++ b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/system/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(phi,U) Gauss linearUpwind grad(U); div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/constant/RASProperties b/tutorials/incompressible/pimpleDyMFoam/propeller/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/incompressible/pimpleDyMFoam/propeller/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/constant/turbulenceProperties b/tutorials/incompressible/pimpleDyMFoam/propeller/constant/turbulenceProperties index 3721a46a2..cd2daf822 100644 --- a/tutorials/incompressible/pimpleDyMFoam/propeller/constant/turbulenceProperties +++ b/tutorials/incompressible/pimpleDyMFoam/propeller/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/system/controlDict b/tutorials/incompressible/pimpleDyMFoam/propeller/system/controlDict index 264b5c1c1..57b261e48 100644 --- a/tutorials/incompressible/pimpleDyMFoam/propeller/system/controlDict +++ b/tutorials/incompressible/pimpleDyMFoam/propeller/system/controlDict @@ -15,12 +15,6 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -libs -( - "libincompressibleTurbulenceModel.so" - "libincompressibleRASModels.so" -); - application pimpleDyMFoam; startFrom startTime; diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/propeller/system/fvSchemes index b6ae74a4e..f65b5bf39 100644 --- a/tutorials/incompressible/pimpleDyMFoam/propeller/system/fvSchemes +++ b/tutorials/incompressible/pimpleDyMFoam/propeller/system/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(phi,U) Gauss linearUpwind grad(U); div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/constant/RASProperties b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/constant/RASProperties deleted file mode 100644 index e0e6b776a..000000000 --- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kOmegaSST; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/constant/turbulenceProperties b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/constant/turbulenceProperties index 3721a46a2..02fa2df1b 100644 --- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/constant/turbulenceProperties +++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kOmegaSST; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/fvSchemes index 5f9910228..82d5997ca 100644 --- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/fvSchemes +++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,U) Gauss linearUpwind grad(U); div(phi,k) Gauss limitedLinear 1; div(phi,omega) Gauss limitedLinear 1; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/constant/RASProperties b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/constant/RASProperties deleted file mode 100644 index e0e6b776a..000000000 --- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kOmegaSST; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/constant/turbulenceProperties b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/constant/turbulenceProperties new file mode 100644 index 000000000..af8a54be2 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/constant/turbulenceProperties @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel kOmegaSST; + + turbulence on; + + printCoeffs on; +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/fvSchemes index 370aa5a66..da2c979ea 100644 --- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/fvSchemes +++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,U) bounded Gauss linearUpwind grad(U); div(phi,k) bounded Gauss upwind; div(phi,omega) bounded Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/fvSchemes index 14f066ebe..f8bab393c 100644 --- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/fvSchemes +++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phid,p) Gauss limitedLinear 1; div(phi,K) Gauss limitedLinear 1; div(phi,e) Gauss limitedLinear 1; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/pimpleFoam/TJunction/constant/RASProperties b/tutorials/incompressible/pimpleFoam/TJunction/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/incompressible/pimpleFoam/TJunction/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/TJunction/constant/turbulenceProperties b/tutorials/incompressible/pimpleFoam/TJunction/constant/turbulenceProperties index e7fa28c74..381b548ef 100644 --- a/tutorials/incompressible/pimpleFoam/TJunction/constant/turbulenceProperties +++ b/tutorials/incompressible/pimpleFoam/TJunction/constant/turbulenceProperties @@ -15,6 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/TJunction/system/controlDict b/tutorials/incompressible/pimpleFoam/TJunction/system/controlDict index e35188318..8495249e2 100644 --- a/tutorials/incompressible/pimpleFoam/TJunction/system/controlDict +++ b/tutorials/incompressible/pimpleFoam/TJunction/system/controlDict @@ -15,13 +15,6 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -libs -( - "libOpenFOAM.so" - "libincompressibleTurbulenceModel.so" - "libincompressibleRASModels.so" -); - application pimpleFoam; startFrom startTime; diff --git a/tutorials/incompressible/pimpleFoam/TJunction/system/fvSchemes b/tutorials/incompressible/pimpleFoam/TJunction/system/fvSchemes index a59b75bee..ff07884de 100644 --- a/tutorials/incompressible/pimpleFoam/TJunction/system/fvSchemes +++ b/tutorials/incompressible/pimpleFoam/TJunction/system/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(phi,R) Gauss limitedLinear 1; div(R) Gauss linear; div(phi,nuTilda) Gauss limitedLinear 1; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/pimpleFoam/TJunctionFan/constant/RASProperties b/tutorials/incompressible/pimpleFoam/TJunctionFan/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/incompressible/pimpleFoam/TJunctionFan/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/TJunctionFan/constant/turbulenceProperties b/tutorials/incompressible/pimpleFoam/TJunctionFan/constant/turbulenceProperties index e7fa28c74..381b548ef 100644 --- a/tutorials/incompressible/pimpleFoam/TJunctionFan/constant/turbulenceProperties +++ b/tutorials/incompressible/pimpleFoam/TJunctionFan/constant/turbulenceProperties @@ -15,6 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/TJunctionFan/system/controlDict b/tutorials/incompressible/pimpleFoam/TJunctionFan/system/controlDict index 0cbeb15c6..929e6a503 100644 --- a/tutorials/incompressible/pimpleFoam/TJunctionFan/system/controlDict +++ b/tutorials/incompressible/pimpleFoam/TJunctionFan/system/controlDict @@ -48,12 +48,6 @@ adjustTimeStep yes; maxCo 3; -libs -( - "libOpenFOAM.so" - "libincompressibleTurbulenceModel.so" - "libincompressibleRASModels.so" -); functions { diff --git a/tutorials/incompressible/pimpleFoam/TJunctionFan/system/fvSchemes b/tutorials/incompressible/pimpleFoam/TJunctionFan/system/fvSchemes index a59b75bee..ff07884de 100644 --- a/tutorials/incompressible/pimpleFoam/TJunctionFan/system/fvSchemes +++ b/tutorials/incompressible/pimpleFoam/TJunctionFan/system/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(phi,R) Gauss limitedLinear 1; div(R) Gauss linear; div(phi,nuTilda) Gauss limitedLinear 1; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/pimpleFoam/channel395/0.org/nuSgs b/tutorials/incompressible/pimpleFoam/channel395/0.org/nut similarity index 98% rename from tutorials/incompressible/pimpleFoam/channel395/0.org/nuSgs rename to tutorials/incompressible/pimpleFoam/channel395/0.org/nut index b4ba303bf..df3efc151 100644 --- a/tutorials/incompressible/pimpleFoam/channel395/0.org/nuSgs +++ b/tutorials/incompressible/pimpleFoam/channel395/0.org/nut @@ -11,7 +11,7 @@ FoamFile format ascii; class volScalarField; location "1"; - object nuSgs; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/incompressible/pimpleFoam/channel395/0/nuSgs.gz b/tutorials/incompressible/pimpleFoam/channel395/0/nuSgs.gz deleted file mode 100644 index 7c05e74de..000000000 Binary files a/tutorials/incompressible/pimpleFoam/channel395/0/nuSgs.gz and /dev/null differ diff --git a/tutorials/incompressible/pimpleFoam/channel395/Allrun b/tutorials/incompressible/pimpleFoam/channel395/Allrun index 436a3b7ae..a94c6e72a 100755 --- a/tutorials/incompressible/pimpleFoam/channel395/Allrun +++ b/tutorials/incompressible/pimpleFoam/channel395/Allrun @@ -14,7 +14,7 @@ runApplication blockMesh #- Run parallel runApplication decomposePar -cellDist -runParallel $application 5 +runParallel $application 4 runApplication reconstructPar runApplication postChannel diff --git a/tutorials/incompressible/pimpleFoam/channel395/constant/LESProperties b/tutorials/incompressible/pimpleFoam/channel395/constant/LESProperties deleted file mode 100644 index af3a82dbe..000000000 --- a/tutorials/incompressible/pimpleFoam/channel395/constant/LESProperties +++ /dev/null @@ -1,86 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object LESProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -LESModel oneEqEddy; - -printCoeffs on; - -delta vanDriest; - -cubeRootVolCoeffs -{ - deltaCoeff 1; -} - -PrandtlCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Cdelta 0.158; -} - -vanDriestCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Aplus 26; - Cdelta 0.158; -} - -smoothCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; -} - - -// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/channel395/constant/turbulenceProperties b/tutorials/incompressible/pimpleFoam/channel395/constant/turbulenceProperties index 2d60fc8bf..b04390b6e 100644 --- a/tutorials/incompressible/pimpleFoam/channel395/constant/turbulenceProperties +++ b/tutorials/incompressible/pimpleFoam/channel395/constant/turbulenceProperties @@ -15,6 +15,79 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType LESModel; +simulationType LES; + +LES +{ + LESModel SpalartAllmarasDDES; //kEqn; + + turbulence on; + + printCoeffs on; + + delta vanDriest; + + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + PrandtlCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Cdelta 0.158; + } + + vanDriestCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Aplus 26; + Cdelta 0.158; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } +} + // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/channel395/system/decomposeParDict b/tutorials/incompressible/pimpleFoam/channel395/system/decomposeParDict index 9f0365f2d..d4b2c3d0a 100644 --- a/tutorials/incompressible/pimpleFoam/channel395/system/decomposeParDict +++ b/tutorials/incompressible/pimpleFoam/channel395/system/decomposeParDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -numberOfSubdomains 5; +numberOfSubdomains 4; //- Keep owner and neighbour on same processor for faces in zones: // preserveFaceZones (heater solid1 solid3); @@ -38,9 +38,9 @@ numberOfSubdomains 5; // for a balanced number of particles in a lagrangian simulation. // weightField dsmcRhoNMean; -method scotch; -//method hierarchical; -// method simple; +// method scotch; +// method hierarchical; +method simple; // method metis; // method manual; // method multiLevel; @@ -73,7 +73,7 @@ multiLevelCoeffs simpleCoeffs { - n (2 1 1); + n (1 2 2); delta 0.001; } diff --git a/tutorials/incompressible/pimpleFoam/channel395/system/fvSchemes b/tutorials/incompressible/pimpleFoam/channel395/system/fvSchemes index 6d5ef5ab9..8973a7c1c 100644 --- a/tutorials/incompressible/pimpleFoam/channel395/system/fvSchemes +++ b/tutorials/incompressible/pimpleFoam/channel395/system/fvSchemes @@ -33,7 +33,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((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes @@ -57,5 +57,10 @@ fluxRequired p ; } +wallDist +{ + method meshWave; +} + // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/channel395/system/fvSolution b/tutorials/incompressible/pimpleFoam/channel395/system/fvSolution index 3beda0be2..b3abd8eaf 100644 --- a/tutorials/incompressible/pimpleFoam/channel395/system/fvSolution +++ b/tutorials/incompressible/pimpleFoam/channel395/system/fvSolution @@ -39,7 +39,7 @@ solvers relTol 0; } - "(U|k)" + "(U|k|nuTilda)" { solver smoothSolver; smoother symGaussSeidel; @@ -47,7 +47,7 @@ solvers relTol 0.1; } - "(U|k)Final" + "(U|k|nuTilda)Final" { $U; tolerance 1e-05; diff --git a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/constant/RASProperties b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/constant/RASProperties deleted file mode 100644 index 88b1e501a..000000000 --- a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kkLOmega; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/constant/turbulenceProperties b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/constant/turbulenceProperties index e7fa28c74..d6c092654 100644 --- a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/constant/turbulenceProperties +++ b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/constant/turbulenceProperties @@ -15,6 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kkLOmega; + + turbulence on; + + printCoeffs on; +} + // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/system/fvSchemes b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/system/fvSchemes index ea3c1491e..0adb77555 100644 --- a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/system/fvSchemes +++ b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/system/fvSchemes @@ -37,7 +37,7 @@ divSchemes div(phi,R) Gauss limitedLinear 1; div(R) Gauss linear; div(phi,nuTilda) Gauss limitedLinear 1; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/pimpleFoam/pitzDaily/constant/RASProperties b/tutorials/incompressible/pimpleFoam/pitzDaily/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/incompressible/pimpleFoam/pitzDaily/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/pitzDaily/constant/polyMesh/boundary b/tutorials/incompressible/pimpleFoam/pitzDaily/constant/polyMesh/boundary index 43b78ef41..581ceffc7 100644 --- a/tutorials/incompressible/pimpleFoam/pitzDaily/constant/polyMesh/boundary +++ b/tutorials/incompressible/pimpleFoam/pitzDaily/constant/polyMesh/boundary @@ -32,12 +32,14 @@ FoamFile upperWall { type wall; + inGroups 1(wall); nFaces 223; startFace 24257; } lowerWall { type wall; + inGroups 1(wall); nFaces 250; startFace 24480; } diff --git a/tutorials/incompressible/pimpleFoam/pitzDaily/constant/turbulenceProperties b/tutorials/incompressible/pimpleFoam/pitzDaily/constant/turbulenceProperties index e7fa28c74..d5016f6d2 100644 --- a/tutorials/incompressible/pimpleFoam/pitzDaily/constant/turbulenceProperties +++ b/tutorials/incompressible/pimpleFoam/pitzDaily/constant/turbulenceProperties @@ -15,6 +15,15 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/pitzDaily/system/fvSchemes b/tutorials/incompressible/pimpleFoam/pitzDaily/system/fvSchemes index 926d489aa..e72eaed33 100644 --- a/tutorials/incompressible/pimpleFoam/pitzDaily/system/fvSchemes +++ b/tutorials/incompressible/pimpleFoam/pitzDaily/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phi,R) bounded Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) bounded Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/Allrun b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/Allrun index 4cbfb18b0..769a0e506 100755 --- a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/Allrun +++ b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/Allrun @@ -3,20 +3,14 @@ # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions - # Set-up the LES case cp ../lesFiles/fvS* ../lesFiles/controlDict system/ -cp ../lesFiles/LESProperties ../lesFiles/turbulenceProperties constant/ +cp ../lesFiles/turbulenceProperties constant/ ls -d processor* | xargs -i rm -rf ./{}/0 $1 ls -d processor* | xargs -i mv ./{}/500 ./{}/0 $1 ls -d processor* | xargs -i rm -rf ./{}/0/uniform $1 -ls -d processor* | xargs -i cp ../lesFiles/LESProperties ./{}/constant/ $1 -ls -d processor* | xargs -i cp ../lesFiles/turbulenceProperties ./{}/constant/ $1 -ls -d processor* | xargs -i cp ../lesFiles/nuSgs ./{}/0/ $1 - - runParallel pisoFoam 8 runApplication reconstructParMesh -constant -mergeTol 1e-6 diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/LESProperties b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/LESProperties deleted file mode 100644 index 197e16d12..000000000 --- a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/LESProperties +++ /dev/null @@ -1,79 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object LESProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -LESModel SpalartAllmarasDDES; - -delta cubeRootVol; - -printCoeffs on; - -cubeRootVolCoeffs -{ - deltaCoeff 1; -} - -PrandtlCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - maxDeltaRatio 1.1; - } - Cdelta 0.158; -} - -vanDriestCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - maxDeltaRatio 1.1; - } - Aplus 26; - Cdelta 0.158; -} - -smoothCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - maxDeltaRatio 1.1; -} - - -// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSchemes b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSchemes index 3972a7e78..2c7ad38af 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSchemes +++ b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSchemes @@ -36,11 +36,10 @@ divSchemes default none; div(phi,U) Gauss LUST unlimitedGrad(U); - //div(phi,U) Gauss linearUpwind unlimitedGrad(U); div(phi,k) Gauss limitedLinear 1; div(phi,nuTilda) Gauss limitedLinear 1; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSolution b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSolution index 19904d0a3..ea00426f6 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSolution +++ b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSolution @@ -20,7 +20,7 @@ solvers { solver GAMG; tolerance 1e-6; - relTol 0.1; + relTol 0.05; smoother GaussSeidel; nPreSweeps 0; @@ -28,7 +28,7 @@ solvers cacheAgglomeration true; - nCellsInCoarsestLevel 50;//10; + nCellsInCoarsestLevel 50; agglomerator faceAreaPair; mergeLevels 1; }; @@ -36,23 +36,22 @@ solvers pFinal { $p; - tolerance 1e-6; relTol 0; }; "(U|k|B|nuTilda)" { solver smoothSolver; - smoother GaussSeidel; - tolerance 1e-07; + smoother symGaussSeidel; + tolerance 1e-7; relTol 0; }; } PISO { - nCorrectors 2; - nNonOrthogonalCorrectors 1; + nCorrectors 3; + nNonOrthogonalCorrectors 0; } relaxationFactors diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/nuSgs b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/nuSgs deleted file mode 100644 index bcc0d1104..000000000 --- a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/nuSgs +++ /dev/null @@ -1,69 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - object nuSgs; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -1 0 0 0 0]; - -internalField uniform 0.0544766; - -boundaryField -{ - inlet - { - type fixedValue; - value uniform 0.0544766; - } - - outlet - { - type inletOutlet; - inletValue uniform 0.0544766; - value uniform 0.0544766; - } - - front - { - type symmetryPlane; - } - - back - { - type symmetryPlane; - } - - lowerWall - { - type nutUSpaldingWallFunction; - value uniform 0.0544766; - } - - upperWall - { - type symmetryPlane; - } - - "motorBike_.*" - { - type nutUSpaldingWallFunction; - value uniform 0.0544766; - } - - "proc.*" - { - type processor; - } -} - -// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/turbulenceProperties b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/turbulenceProperties index ab998a16d..35b21043f 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/turbulenceProperties +++ b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/turbulenceProperties @@ -15,6 +15,72 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType LESModel; +simulationType LES; + +LES +{ + LESModel SpalartAllmarasDDES; + + delta cubeRootVol; + + printCoeffs on; + + turbulence on; + + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + PrandtlCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + maxDeltaRatio 1.1; + } + Cdelta 0.158; + } + + vanDriestCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + maxDeltaRatio 1.1; + } + Aplus 26; + Cdelta 0.158; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + maxDeltaRatio 1.1; + } +} + // ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/RASProperties b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/RASProperties deleted file mode 100644 index d76eff61b..000000000 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel SpalartAllmaras; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/boundary b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/boundary index 578783eae..7e7cb8fc3 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/boundary +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/boundary @@ -15,441 +15,47 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -72 +6 ( - frontAndBack + front { type symmetryPlane; inGroups 1(symmetryPlane); - nFaces 320; - startFace 9440280; + nFaces 160; + startFace 3456; + } + back + { + type symmetryPlane; + inGroups 1(symmetryPlane); + nFaces 160; + startFace 3616; } inlet { type patch; nFaces 64; - startFace 9440600; + startFace 3776; } outlet { type patch; nFaces 64; - startFace 9440664; + startFace 3840; } lowerWall { type wall; - nFaces 15243; - startFace 9440728; + inGroups 1(wall); + nFaces 160; + startFace 3904; } upperWall { type symmetryPlane; inGroups 1(symmetryPlane); nFaces 160; - startFace 9455971; - } - motorBike_frt-fairing:001%1 - { - type wall; - nFaces 90875; - startFace 9456131; - } - motorBike_windshield:002%2 - { - type wall; - nFaces 376; - startFace 9547006; - } - motorBike_rr-wh-rim:005%5 - { - type wall; - nFaces 2402; - startFace 9547382; - } - motorBike_rr-wh-rim:010%10 - { - type wall; - nFaces 5288; - startFace 9549784; - } - motorBike_fr-wh-rim:011%11 - { - type wall; - nFaces 7215; - startFace 9555072; - } - motorBike_fr-wh-brake-disk:012%12 - { - type wall; - nFaces 973; - startFace 9562287; - } - motorBike_frame:016-shadow%13 - { - type wall; - nFaces 1718; - startFace 9563260; - } - motorBike_rear-susp:014%14 - { - type wall; - nFaces 14936; - startFace 9564978; - } - motorBike_rear-susp:014-shadow%15 - { - type wall; - nFaces 8564; - startFace 9579914; - } - motorBike_frame:016%16 - { - type wall; - nFaces 969; - startFace 9588478; - } - motorBike_rr-wh-rim:005-shadow%17 - { - type wall; - nFaces 1251; - startFace 9589447; - } - motorBike_rr-wh-chain-hub:022%22 - { - type wall; - nFaces 1827; - startFace 9590698; - } - motorBike_rearseat%24 - { - type wall; - nFaces 3241; - startFace 9592525; - } - motorBike_frt-fairing%25 - { - type wall; - nFaces 5078; - startFace 9595766; - } - motorBike_windshield%26 - { - type wall; - nFaces 6545; - startFace 9600844; - } - motorBike_headlights%27 - { - type wall; - nFaces 455; - startFace 9607389; - } - motorBike_driversseat%28 - { - type wall; - nFaces 5112; - startFace 9607844; - } - motorBike_rear-body%29 - { - type wall; - nFaces 12033; - startFace 9612956; - } - motorBike_fuel-tank%30 - { - type wall; - nFaces 6586; - startFace 9624989; - } - motorBike_exhaust%31 - { - type wall; - nFaces 20319; - startFace 9631575; - } - motorBike_rr-wh-rim%32 - { - type wall; - nFaces 9928; - startFace 9651894; - } - motorBike_fr-mud-guard%33 - { - type wall; - nFaces 13989; - startFace 9661822; - } - motorBike_fr-wh-rim%34 - { - type wall; - nFaces 6592; - startFace 9675811; - } - motorBike_fr-wh-brake-disk%35 - { - type wall; - nFaces 7374; - startFace 9682403; - } - motorBike_fr-brake-caliper%36 - { - type wall; - nFaces 2178; - startFace 9689777; - } - motorBike_fr-wh-tyre%37 - { - type wall; - nFaces 9947; - startFace 9691955; - } - motorBike_hbars%38 - { - type wall; - nFaces 7345; - startFace 9701902; - } - motorBike_fr-forks%39 - { - type wall; - nFaces 10349; - startFace 9709247; - } - motorBike_chain%40 - { - type wall; - nFaces 7168; - startFace 9719596; - } - motorBike_rr-wh-tyre%41 - { - type wall; - nFaces 7245; - startFace 9726764; - } - motorBike_square-dial%42 - { - type wall; - nFaces 62; - startFace 9734009; - } - motorBike_round-dial%43 - { - type wall; - nFaces 183; - startFace 9734071; - } - motorBike_dial-holder%44 - { - type wall; - nFaces 1336; - startFace 9734254; - } - motorBike_rear-susp%45 - { - type wall; - nFaces 25738; - startFace 9735590; - } - motorBike_rear-brake-lights%46 - { - type wall; - nFaces 860; - startFace 9761328; - } - motorBike_rear-light-bracket%47 - { - type wall; - nFaces 2003; - startFace 9762188; - } - motorBike_frame%48 - { - type wall; - nFaces 20232; - startFace 9764191; - } - motorBike_rear-mud-guard%49 - { - type wall; - nFaces 10690; - startFace 9784423; - } - motorBike_rear-susp-spring-damp%50 - { - type wall; - nFaces 1769; - startFace 9795113; - } - motorBike_fairing-inner-plate%51 - { - type wall; - nFaces 4660; - startFace 9796882; - } - motorBike_clutch-housing%52 - { - type wall; - nFaces 8237; - startFace 9801542; - } - motorBike_radiator%53 - { - type wall; - nFaces 1849; - startFace 9809779; - } - motorBike_water-pipe%54 - { - type wall; - nFaces 1182; - startFace 9811628; - } - motorBike_water-pump%55 - { - type wall; - nFaces 902; - startFace 9812810; - } - motorBike_engine%56 - { - type wall; - nFaces 19087; - startFace 9813712; - } - motorBike_rear-shock-link%57 - { - type wall; - nFaces 512; - startFace 9832799; - } - motorBike_rear-brake-fluid-pot-bracket%58 - { - type wall; - nFaces 721; - startFace 9833311; - } - motorBike_rear-brake-fluid-pot%59 - { - type wall; - nFaces 795; - startFace 9834032; - } - motorBike_footpeg%60 - { - type wall; - nFaces 1405; - startFace 9834827; - } - motorBike_rr-wh-chain-hub%61 - { - type wall; - nFaces 1984; - startFace 9836232; - } - motorBike_rear-brake-caliper%62 - { - type wall; - nFaces 2119; - startFace 9838216; - } - motorBike_rider-helmet%65 - { - type wall; - nFaces 2244; - startFace 9840335; - } - motorBike_rider-visor%66 - { - type wall; - nFaces 171; - startFace 9842579; - } - motorBike_rider-boots%67 - { - type wall; - nFaces 5287; - startFace 9842750; - } - motorBike_rider-gloves%68 - { - type wall; - nFaces 3129; - startFace 9848037; - } - motorBike_rider-body%69 - { - type wall; - nFaces 22909; - startFace 9851166; - } - motorBike_frame:0%70 - { - type wall; - nFaces 361; - startFace 9874075; - } - motorBike_frt-fairing:001-shadow%74 - { - type wall; - nFaces 56996; - startFace 9874436; - } - motorBike_windshield-shadow%75 - { - type wall; - nFaces 4535; - startFace 9931432; - } - motorBike_fr-mud-guard-shadow%81 - { - type wall; - nFaces 9174; - startFace 9935967; - } - motorBike_fr-wh-brake-disk-shadow%83 - { - type wall; - nFaces 3923; - startFace 9945141; - } - motorBike_rear-mud-guard-shadow%84 - { - type wall; - nFaces 6792; - startFace 9949064; - } - motorBike_rear-susp-spring-damp-shadow%85 - { - type wall; - nFaces 1211; - startFace 9955856; - } - motorBike_radiator-shadow%86 - { - type wall; - nFaces 1080; - startFace 9957067; - } - motorBike_rear-shock-link-shadow%87 - { - type wall; - nFaces 357; - startFace 9958147; - } - motorBike_rear-brake-fluid-pot-bracket-shadow%88 - { - type wall; - nFaces 420; - startFace 9958504; - } - motorBike_rr-wh-chain-hub-shadow%89 - { - type wall; - nFaces 1071; - startFace 9958924; + startFace 4064; } ) diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/RASProperties b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/turbulenceProperties similarity index 90% rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/RASProperties rename to tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/turbulenceProperties index aed2ebec5..f9d4381ee 100644 --- a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/RASProperties +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/turbulenceProperties @@ -15,10 +15,13 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -RASModel kEpsilon; +RAS +{ + RASModel SpalartAllmaras; -turbulence on; + turbulence on; -printCoeffs on; + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/fvSchemes b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/fvSchemes index 3bc772bfe..c6c8fbf6f 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/fvSchemes +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/fvSchemes @@ -33,7 +33,7 @@ divSchemes div(phi,U) bounded Gauss linearUpwindV grad(U); div(phi,k) bounded Gauss upwind; div(phi,omega) bounded Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; div(phi,nuTilda) bounded Gauss upwind; } diff --git a/tutorials/incompressible/pisoFoam/les/pitzDaily/0/nuSgs b/tutorials/incompressible/pisoFoam/les/pitzDaily/0/nut similarity index 98% rename from tutorials/incompressible/pisoFoam/les/pitzDaily/0/nuSgs rename to tutorials/incompressible/pisoFoam/les/pitzDaily/0/nut index 608ec8c46..726b637f7 100644 --- a/tutorials/incompressible/pisoFoam/les/pitzDaily/0/nuSgs +++ b/tutorials/incompressible/pisoFoam/les/pitzDaily/0/nut @@ -10,7 +10,7 @@ FoamFile version 2.0; format ascii; class volScalarField; - object nuSgs; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/incompressible/pisoFoam/les/pitzDaily/constant/LESProperties b/tutorials/incompressible/pisoFoam/les/pitzDaily/constant/LESProperties deleted file mode 100644 index b0c6edf80..000000000 --- a/tutorials/incompressible/pisoFoam/les/pitzDaily/constant/LESProperties +++ /dev/null @@ -1,86 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object LESProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -LESModel oneEqEddy; - -delta cubeRootVol; - -printCoeffs on; - -cubeRootVolCoeffs -{ - deltaCoeff 1; -} - -PrandtlCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Cdelta 0.158; -} - -vanDriestCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Aplus 26; - Cdelta 0.158; -} - -smoothCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; -} - - -// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/pitzDaily/constant/turbulenceProperties b/tutorials/incompressible/pisoFoam/les/pitzDaily/constant/turbulenceProperties index ab998a16d..19b969557 100644 --- a/tutorials/incompressible/pisoFoam/les/pitzDaily/constant/turbulenceProperties +++ b/tutorials/incompressible/pisoFoam/les/pitzDaily/constant/turbulenceProperties @@ -15,6 +15,78 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType LESModel; +simulationType LES; + +LES +{ + LESModel kEqn; + + turbulence on; + + printCoeffs on; + + delta cubeRootVol; + + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + PrandtlCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Cdelta 0.158; + } + + vanDriestCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Aplus 26; + Cdelta 0.158; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } +} // ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/pitzDaily/system/fvSchemes b/tutorials/incompressible/pisoFoam/les/pitzDaily/system/fvSchemes index 45cce4ef1..752f20f66 100644 --- a/tutorials/incompressible/pisoFoam/les/pitzDaily/system/fvSchemes +++ b/tutorials/incompressible/pisoFoam/les/pitzDaily/system/fvSchemes @@ -33,7 +33,7 @@ divSchemes div(phi,B) Gauss limitedLinear 1; div(phi,nuTilda) Gauss limitedLinear 1; div(B) Gauss linear; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/muSgs b/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/0/nut similarity index 95% rename from tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/muSgs rename to tutorials/incompressible/pisoFoam/les/pitzDailyMapped/0/nut index 65048d6cc..726b637f7 100644 --- a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/muSgs +++ b/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/0/nut @@ -10,11 +10,11 @@ FoamFile version 2.0; format ascii; class volScalarField; - object muSgs; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; diff --git a/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/constant/LESProperties b/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/constant/LESProperties deleted file mode 100644 index b0c6edf80..000000000 --- a/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/constant/LESProperties +++ /dev/null @@ -1,86 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object LESProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -LESModel oneEqEddy; - -delta cubeRootVol; - -printCoeffs on; - -cubeRootVolCoeffs -{ - deltaCoeff 1; -} - -PrandtlCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Cdelta 0.158; -} - -vanDriestCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Aplus 26; - Cdelta 0.158; -} - -smoothCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; -} - - -// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/constant/turbulenceProperties b/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/constant/turbulenceProperties index a925d3cc2..19b969557 100644 --- a/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/constant/turbulenceProperties +++ b/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/constant/turbulenceProperties @@ -15,7 +15,78 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType LESModel; +simulationType LES; +LES +{ + LESModel kEqn; + + turbulence on; + + printCoeffs on; + + delta cubeRootVol; + + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + PrandtlCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Cdelta 0.158; + } + + vanDriestCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Aplus 26; + Cdelta 0.158; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } +} // ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/system/fvSchemes b/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/system/fvSchemes index 62b8ad368..75f357060 100644 --- a/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/system/fvSchemes +++ b/tutorials/incompressible/pisoFoam/les/pitzDailyMapped/system/fvSchemes @@ -33,7 +33,7 @@ divSchemes div(phi,B) Gauss limitedLinear 1; div(phi,nuTilda) Gauss limitedLinear 1; div(B) Gauss linear; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/pisoFoam/ras/cavity/0/omega b/tutorials/incompressible/pisoFoam/ras/cavity/0/omega new file mode 100644 index 000000000..a7040dd84 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/ras/cavity/0/omega @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object omega; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 -1 0 0 0 0]; + +internalField uniform 1; + +boundaryField +{ + movingWall + { + type omegaWallFunction; + value uniform 1; + } + fixedWalls + { + type omegaWallFunction; + value uniform 1; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/ras/cavity/constant/RASProperties b/tutorials/incompressible/pisoFoam/ras/cavity/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/incompressible/pisoFoam/ras/cavity/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/ras/cavity/constant/turbulenceProperties b/tutorials/incompressible/pisoFoam/ras/cavity/constant/turbulenceProperties index 3721a46a2..3ffed52b9 100644 --- a/tutorials/incompressible/pisoFoam/ras/cavity/constant/turbulenceProperties +++ b/tutorials/incompressible/pisoFoam/ras/cavity/constant/turbulenceProperties @@ -15,7 +15,15 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; +RAS +{ + RASModel kOmega; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSchemes b/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSchemes index a59b75bee..9d066714d 100644 --- a/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSchemes +++ b/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSchemes @@ -31,10 +31,11 @@ divSchemes div(phi,U) Gauss limitedLinearV 1; div(phi,k) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1; + div(phi,omega) Gauss limitedLinear 1; div(phi,R) Gauss limitedLinear 1; div(R) Gauss linear; div(phi,nuTilda) Gauss limitedLinear 1; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSolution b/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSolution index 983e6dd80..7342e01eb 100644 --- a/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSolution +++ b/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSolution @@ -38,7 +38,7 @@ solvers relTol 0; } - "(U|k|epsilon|R|nuTilda)" + "(U|k|epsilon|omega|R|nuTilda)" { solver smoothSolver; smoother GaussSeidel; diff --git a/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/constant/RASProperties b/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/constant/turbulenceProperties b/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/constant/turbulenceProperties index 3721a46a2..d587253c9 100644 --- a/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/constant/turbulenceProperties +++ b/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/constant/turbulenceProperties @@ -15,7 +15,15 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/system/fvSchemes b/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/system/fvSchemes index a59b75bee..ff07884de 100644 --- a/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/system/fvSchemes +++ b/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/system/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(phi,R) Gauss limitedLinear 1; div(R) Gauss linear; div(phi,nuTilda) Gauss limitedLinear 1; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuctExplicit/system/fvSchemes b/tutorials/incompressible/porousSimpleFoam/angledDuctExplicit/system/fvSchemes index 5db0abc18..930ef501a 100644 --- a/tutorials/incompressible/porousSimpleFoam/angledDuctExplicit/system/fvSchemes +++ b/tutorials/incompressible/porousSimpleFoam/angledDuctExplicit/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes default none; div(phi,U) bounded Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; div(phi,epsilon) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; } diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/constant/RASProperties b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/constant/turbulenceProperties b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/constant/turbulenceProperties new file mode 100644 index 000000000..59a2e7e20 --- /dev/null +++ b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/constant/turbulenceProperties @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/system/fvSchemes b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/system/fvSchemes index 9376d2300..ee3301aea 100644 --- a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/system/fvSchemes +++ b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes default none; div(phi,U) bounded Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; div(phi,epsilon) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; } diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/constant/RASProperties b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/constant/turbulenceProperties b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/constant/turbulenceProperties new file mode 100644 index 000000000..59a2e7e20 --- /dev/null +++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/constant/turbulenceProperties @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/system/fvSchemes b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/system/fvSchemes index 9376d2300..ee3301aea 100644 --- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/system/fvSchemes +++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes default none; div(phi,U) bounded Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; div(phi,epsilon) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; } diff --git a/tutorials/incompressible/simpleFoam/airFoil2D/constant/RASProperties b/tutorials/incompressible/simpleFoam/airFoil2D/constant/RASProperties deleted file mode 100644 index d76eff61b..000000000 --- a/tutorials/incompressible/simpleFoam/airFoil2D/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel SpalartAllmaras; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/airFoil2D/constant/turbulenceProperties b/tutorials/incompressible/simpleFoam/airFoil2D/constant/turbulenceProperties new file mode 100644 index 000000000..2c4a27454 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/airFoil2D/constant/turbulenceProperties @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel SpalartAllmaras; + + turbulence on; + + printCoeffs on; +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/airFoil2D/system/fvSchemes b/tutorials/incompressible/simpleFoam/airFoil2D/system/fvSchemes index 4158d2dea..38d944924 100644 --- a/tutorials/incompressible/simpleFoam/airFoil2D/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/airFoil2D/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes default none; div(phi,U) bounded Gauss linearUpwind grad(U); div(phi,nuTilda) bounded Gauss linearUpwind grad(nuTilda); - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/simpleFoam/mixerVessel2D/constant/RASProperties b/tutorials/incompressible/simpleFoam/mixerVessel2D/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/incompressible/simpleFoam/mixerVessel2D/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/mixerVessel2D/constant/turbulenceProperties b/tutorials/incompressible/simpleFoam/mixerVessel2D/constant/turbulenceProperties new file mode 100644 index 000000000..a9b58dc78 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/mixerVessel2D/constant/turbulenceProperties @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/mixerVessel2D/system/fvSchemes b/tutorials/incompressible/simpleFoam/mixerVessel2D/system/fvSchemes index dddcf6c24..6a50ad98d 100644 --- a/tutorials/incompressible/simpleFoam/mixerVessel2D/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/mixerVessel2D/system/fvSchemes @@ -31,7 +31,7 @@ divSchemes div(phi,U) bounded Gauss limitedLinearV 1; div(phi,k) bounded Gauss limitedLinear 1; div(phi,epsilon) bounded Gauss limitedLinear 1; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/simpleFoam/motorBike/constant/RASProperties b/tutorials/incompressible/simpleFoam/motorBike/constant/RASProperties deleted file mode 100644 index 3b7dcacf8..000000000 --- a/tutorials/incompressible/simpleFoam/motorBike/constant/RASProperties +++ /dev/null @@ -1,24 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kOmegaSST; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/motorBike/constant/turbulenceProperties b/tutorials/incompressible/simpleFoam/motorBike/constant/turbulenceProperties new file mode 100644 index 000000000..f1719c6a0 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/motorBike/constant/turbulenceProperties @@ -0,0 +1,26 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel kOmegaSST; + + turbulence on; + + printCoeffs on; +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/controlDict b/tutorials/incompressible/simpleFoam/motorBike/system/controlDict index 553c603b4..c7607fc23 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/controlDict +++ b/tutorials/incompressible/simpleFoam/motorBike/system/controlDict @@ -14,13 +14,6 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -libs -( - "libOpenFOAM.so" - "libincompressibleTurbulenceModel.so" - "libincompressibleRASModels.so" -); - application simpleFoam; startFrom latestTime; diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes b/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes index 065507c3f..cf8155eea 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes @@ -31,7 +31,7 @@ divSchemes div(phi,U) bounded Gauss linearUpwindV grad(U); div(phi,k) bounded Gauss upwind; div(phi,omega) bounded Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/constant/RASProperties b/tutorials/incompressible/simpleFoam/pipeCyclic/constant/RASProperties deleted file mode 100644 index 63ed5a5ef..000000000 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel realizableKE; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/constant/turbulenceProperties b/tutorials/incompressible/simpleFoam/pipeCyclic/constant/turbulenceProperties index e7fa28c74..45b095b54 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/constant/turbulenceProperties +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/constant/turbulenceProperties @@ -15,6 +15,14 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +RAS +{ + RASModel realizableKE; + + turbulence on; + + printCoeffs on; +} + // ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/system/controlDict b/tutorials/incompressible/simpleFoam/pipeCyclic/system/controlDict index da248aeec..e43cefc79 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/system/controlDict +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/system/controlDict @@ -15,13 +15,6 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -libs -( - "libOpenFOAM.so" - "libincompressibleTurbulenceModel.so" - "libincompressibleRASModels.so" -); - application simpleFoam; startFrom startTime; diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSchemes b/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSchemes index eb56b2a74..eff3e37ae 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(phi,R) bounded Gauss limitedLinear 1; div(R) Gauss linear; div(phi,nuTilda) bounded Gauss limitedLinear 1; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/simpleFoam/pitzDaily/constant/RASProperties b/tutorials/incompressible/simpleFoam/pitzDaily/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/incompressible/simpleFoam/pitzDaily/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/pitzDaily/constant/turbulenceProperties b/tutorials/incompressible/simpleFoam/pitzDaily/constant/turbulenceProperties new file mode 100644 index 000000000..59a2e7e20 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/pitzDaily/constant/turbulenceProperties @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSchemes b/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSchemes index 821adc7eb..268cde63e 100644 --- a/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(phi,R) bounded Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) bounded Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/RASProperties b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/turbulenceProperties b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/turbulenceProperties new file mode 100644 index 000000000..a9b58dc78 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/constant/turbulenceProperties @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/fvSchemes b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/fvSchemes index 821adc7eb..268cde63e 100644 --- a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(phi,R) bounded Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) bounded Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/constant/RASProperties b/tutorials/incompressible/simpleFoam/turbineSiting/constant/turbulenceProperties similarity index 58% rename from tutorials/incompressible/simpleFoam/turbineSiting/constant/RASProperties rename to tutorials/incompressible/simpleFoam/turbineSiting/constant/turbulenceProperties index e8f2fd502..1385aff11 100644 --- a/tutorials/incompressible/simpleFoam/turbineSiting/constant/RASProperties +++ b/tutorials/incompressible/simpleFoam/turbineSiting/constant/turbulenceProperties @@ -10,26 +10,31 @@ FoamFile version 2.0; format ascii; class dictionary; - object RASProperties; + object turbulenceProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -RASModel kEpsilon; +RAS +{ + RASModel kEpsilon; -turbulence on; + turbulence on; -printCoeffs on; + printCoeffs on; -kEpsilonCoeffs -{ - Cmu 0.09; - C1 1.44; - C2 1.92; - sigmaEps 1.11; //Original value:1.44 - //NOTE: See "On the use of the k-Epsilon model in commercial CFD software - // to model the neutral atmospheric boundary layer". J. of wind engineering - // and inductrial aerodymanics 95(2007) 355-269 by - // D.M. Hargreaves and N.G. Wright + kEpsilonCoeffs + { + Cmu 0.09; + C1 1.44; + C2 1.92; + sigmaEps 1.11; //Original value:1.44 + // See: + // D.M. Hargreaves and N.G. Wright + // "On the use of the k-Epsilon model in commercial CFD software + // to model the neutral atmospheric boundary layer", + // J. of wind engineering and industrial aerodymanics, + // 95(2007) 355-269 + } } // ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/system/controlDict b/tutorials/incompressible/simpleFoam/turbineSiting/system/controlDict index 1b295b32a..f648f3ed7 100644 --- a/tutorials/incompressible/simpleFoam/turbineSiting/system/controlDict +++ b/tutorials/incompressible/simpleFoam/turbineSiting/system/controlDict @@ -14,8 +14,6 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -libs ("libincompressibleRASModels.so"); - application simpleFoam; startFrom latestTime; @@ -34,7 +32,7 @@ writeInterval 50; purgeWrite 0; -writeFormat binary; //ascii; +writeFormat binary; writePrecision 12; diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/system/fvSchemes b/tutorials/incompressible/simpleFoam/turbineSiting/system/fvSchemes index 492b79ef7..445a2f3bd 100644 --- a/tutorials/incompressible/simpleFoam/turbineSiting/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/turbineSiting/system/fvSchemes @@ -27,10 +27,12 @@ gradSchemes divSchemes { default none; + div(phi,U) bounded Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; div(phi,epsilon) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; + + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/0/mut b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/0/nut similarity index 95% rename from tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/0/mut rename to tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/0/nut index 47d65d567..7c1a3594d 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/0/mut +++ b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/RASProperties b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/turbulenceProperties b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/turbulenceProperties index c2c3b28a1..aefe0c27d 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/turbulenceProperties +++ b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/turbulenceProperties @@ -17,5 +17,4 @@ FoamFile simulationType laminar; - // ************************************************************************* // diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/system/fvSchemes b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/system/fvSchemes index 73cdf5dca..a3d785d31 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/system/fvSchemes +++ b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phi,epsilon) Gauss limitedLinear 1; div(phi,k) Gauss limitedLinear 1; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0.org/k b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0.org/k index 2a7693689..098b4a6eb 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0.org/k +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0.org/k @@ -48,7 +48,7 @@ boundaryField } walls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0; } } diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/mut b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0.org/nut similarity index 93% rename from tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/mut rename to tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0.org/nut index 7cfeaae13..41fe07482 100644 --- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/mut +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0.org/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -46,7 +46,7 @@ boundaryField } walls { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0.org/omega b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0.org/omega index c1aa352a7..462084a38 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0.org/omega +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0.org/omega @@ -31,14 +31,14 @@ boundaryField } inletCentral { - type compressible::turbulentMixingLengthFrequencyInlet; + type turbulentMixingLengthFrequencyInlet; mixingLength 0.007; k k; value uniform 4.5e-3; } inletSides { - type compressible::turbulentMixingLengthFrequencyInlet; + type turbulentMixingLengthFrequencyInlet; mixingLength 0.007; k k; value uniform 4.5e-3; @@ -50,7 +50,7 @@ boundaryField } walls { - type compressible::omegaWallFunction; + type omegaWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0/k b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0/k index 2a7693689..098b4a6eb 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0/k +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0/k @@ -48,7 +48,7 @@ boundaryField } walls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0; } } diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0.org/mut b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0/nut similarity index 93% rename from tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0.org/mut rename to tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0/nut index 7cfeaae13..41fe07482 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0.org/mut +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -46,7 +46,7 @@ boundaryField } walls { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0/omega b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0/omega index c1aa352a7..462084a38 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0/omega +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0/omega @@ -31,14 +31,14 @@ boundaryField } inletCentral { - type compressible::turbulentMixingLengthFrequencyInlet; + type turbulentMixingLengthFrequencyInlet; mixingLength 0.007; k k; value uniform 4.5e-3; } inletSides { - type compressible::turbulentMixingLengthFrequencyInlet; + type turbulentMixingLengthFrequencyInlet; mixingLength 0.007; k k; value uniform 4.5e-3; @@ -50,7 +50,7 @@ boundaryField } walls { - type compressible::omegaWallFunction; + type omegaWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/RASProperties b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/RASProperties deleted file mode 100644 index 568821b00..000000000 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/RASProperties +++ /dev/null @@ -1,24 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kOmegaSST; // kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/turbulenceProperties b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/turbulenceProperties index aaccd5feb..89a95c3f0 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/turbulenceProperties +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/turbulenceProperties @@ -14,7 +14,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kOmegaSST; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSchemes b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSchemes index 4bef25ebf..13bfbc31f 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSchemes +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,omega) Gauss upwind; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phi,Yi_h) Gauss upwind; } diff --git a/tutorials/lagrangian/MPPICFoam/column/constant/RASProperties b/tutorials/lagrangian/MPPICFoam/column/constant/RASProperties deleted file mode 100644 index cc1647b25..000000000 --- a/tutorials/lagrangian/MPPICFoam/column/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel laminar; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/epsilon b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/epsilon index 9fcf588c0..5f62ec144 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/epsilon +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/epsilon @@ -23,17 +23,17 @@ boundaryField { top { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 5390.5; } bottom { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 5390.5; } walls { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 5390.5; } symmetry diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/k b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/k index d5f2de207..31facc9f6 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/k +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/k @@ -23,17 +23,17 @@ boundaryField { top { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 37.5; } bottom { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 37.5; } walls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 37.5; } symmetry diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/mut b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/nut similarity index 86% rename from tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/mut rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/nut index 9622ffefd..718743bbc 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/mut +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -23,17 +23,17 @@ boundaryField { top { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } bottom { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } walls { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } symmetry diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/RASProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/RASProperties deleted file mode 100644 index fede44f8c..000000000 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/RASProperties +++ /dev/null @@ -1,24 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs yes; - -// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/turbulenceProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/turbulenceProperties index 3721a46a2..c323d9397 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/turbulenceProperties +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs yes; +} // ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes index 3bcfc65ff..dfc512358 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(U) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phi,Yi_h) Gauss upwind; } diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/constant/RASProperties b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/constant/RASProperties deleted file mode 100644 index cc1647b25..000000000 --- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel laminar; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/constant/turbulenceProperties b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/constant/turbulenceProperties index 3721a46a2..c2c3b28a1 100644 --- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/constant/turbulenceProperties +++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/constant/turbulenceProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType laminar; // ************************************************************************* // diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/constant/RASProperties b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/constant/RASProperties deleted file mode 100644 index cc1647b25..000000000 --- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel laminar; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/constant/turbulenceProperties b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/constant/turbulenceProperties index 3721a46a2..c2c3b28a1 100644 --- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/constant/turbulenceProperties +++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/constant/turbulenceProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType laminar; // ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSchemes index 560f65db1..f073a5ff5 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(U) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phi,Yi_h) Gauss upwind; } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/epsilon b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/epsilon index b4d9f6fdb..e73cabb04 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/epsilon +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/epsilon @@ -23,12 +23,12 @@ boundaryField { walls { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 1e-7; } wallFilm { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 1e-7; } } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/k b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/k index 9036004c5..01d40325b 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/k +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/k @@ -23,12 +23,12 @@ boundaryField { walls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1e-5; } wallFilm { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1e-5; } } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/mut b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/nut similarity index 88% rename from tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/mut rename to tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/nut index c0cf6eed6..e985d6e5f 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/mut +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 1e-7; @@ -23,12 +23,12 @@ boundaryField { walls { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } wallFilm { - type mutkFilmWallFunction; + type nutkFilmWallFunction; B 5.5; yPlusCrit 11.05; value uniform 0; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/RASProperties b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/RASProperties deleted file mode 100644 index 85d8b8af8..000000000 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs no; - - -// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/turbulenceProperties b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/turbulenceProperties index fcb13c355..eeaaa9205 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/turbulenceProperties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; // laminar; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs no; +} // ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/changeDictionaryDict b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/changeDictionaryDict index 9097048a7..b7b5130a7 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/changeDictionaryDict +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/changeDictionaryDict @@ -46,7 +46,7 @@ dictionaryReplacement } } - "mut" + "nut" { boundaryField { diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSchemes index 906c819b4..cc232dbb0 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(U) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phi,Yi_h) Gauss upwind; } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSchemes index 7cb276073..1885c5628 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(U) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phi,Yi_h) Gauss upwind; } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSchemes index 906c819b4..cc232dbb0 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(U) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phi,Yi_h) Gauss upwind; } diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/0.org/epsilon b/tutorials/lagrangian/reactingParcelFoam/filter/0.org/epsilon index 741efe7cc..448a7a085 100644 --- a/tutorials/lagrangian/reactingParcelFoam/filter/0.org/epsilon +++ b/tutorials/lagrangian/reactingParcelFoam/filter/0.org/epsilon @@ -23,7 +23,7 @@ boundaryField { walls { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.0449; } inlet diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/0.org/k b/tutorials/lagrangian/reactingParcelFoam/filter/0.org/k index 99ad23a21..7d79256b2 100644 --- a/tutorials/lagrangian/reactingParcelFoam/filter/0.org/k +++ b/tutorials/lagrangian/reactingParcelFoam/filter/0.org/k @@ -23,7 +23,7 @@ boundaryField { walls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.0938; } inlet diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/0.org/mut b/tutorials/lagrangian/reactingParcelFoam/filter/0.org/nut similarity index 93% rename from tutorials/lagrangian/reactingParcelFoam/filter/0.org/mut rename to tutorials/lagrangian/reactingParcelFoam/filter/0.org/nut index ed047925d..c0334a141 100644 --- a/tutorials/lagrangian/reactingParcelFoam/filter/0.org/mut +++ b/tutorials/lagrangian/reactingParcelFoam/filter/0.org/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "1"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 1 -1 -1 0 0 0 0 ]; +dimensions [ 0 2 -1 0 0 0 0 ]; internalField uniform 0; @@ -23,7 +23,7 @@ boundaryField { walls { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } inlet diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/0/epsilon b/tutorials/lagrangian/reactingParcelFoam/filter/0/epsilon index 741efe7cc..448a7a085 100644 --- a/tutorials/lagrangian/reactingParcelFoam/filter/0/epsilon +++ b/tutorials/lagrangian/reactingParcelFoam/filter/0/epsilon @@ -23,7 +23,7 @@ boundaryField { walls { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 0.0449; } inlet diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/0/k b/tutorials/lagrangian/reactingParcelFoam/filter/0/k index 99ad23a21..7d79256b2 100644 --- a/tutorials/lagrangian/reactingParcelFoam/filter/0/k +++ b/tutorials/lagrangian/reactingParcelFoam/filter/0/k @@ -23,7 +23,7 @@ boundaryField { walls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0.0938; } inlet diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/0/mut b/tutorials/lagrangian/reactingParcelFoam/filter/0/nut similarity index 93% rename from tutorials/lagrangian/reactingParcelFoam/filter/0/mut rename to tutorials/lagrangian/reactingParcelFoam/filter/0/nut index ed047925d..c0334a141 100644 --- a/tutorials/lagrangian/reactingParcelFoam/filter/0/mut +++ b/tutorials/lagrangian/reactingParcelFoam/filter/0/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "1"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 1 -1 -1 0 0 0 0 ]; +dimensions [ 0 2 -1 0 0 0 0 ]; internalField uniform 0; @@ -23,7 +23,7 @@ boundaryField { walls { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } inlet diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/constant/RASProperties b/tutorials/lagrangian/reactingParcelFoam/filter/constant/RASProperties deleted file mode 100644 index dffc9c2d5..000000000 --- a/tutorials/lagrangian/reactingParcelFoam/filter/constant/RASProperties +++ /dev/null @@ -1,24 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/constant/turbulenceProperties b/tutorials/lagrangian/reactingParcelFoam/filter/constant/turbulenceProperties index aaccd5feb..2939a395e 100644 --- a/tutorials/lagrangian/reactingParcelFoam/filter/constant/turbulenceProperties +++ b/tutorials/lagrangian/reactingParcelFoam/filter/constant/turbulenceProperties @@ -14,7 +14,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/system/changeDictionaryDict b/tutorials/lagrangian/reactingParcelFoam/filter/system/changeDictionaryDict index 217e56ec6..908f3c60e 100644 --- a/tutorials/lagrangian/reactingParcelFoam/filter/system/changeDictionaryDict +++ b/tutorials/lagrangian/reactingParcelFoam/filter/system/changeDictionaryDict @@ -96,7 +96,7 @@ dictionaryReplacement } } } - mut + nut { boundaryField { diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/system/controlDict b/tutorials/lagrangian/reactingParcelFoam/filter/system/controlDict index 66667655d..51019fc93 100644 --- a/tutorials/lagrangian/reactingParcelFoam/filter/system/controlDict +++ b/tutorials/lagrangian/reactingParcelFoam/filter/system/controlDict @@ -51,12 +51,5 @@ maxCo 1.0; maxDeltaT 1; -libs -( - "libOpenFOAM.so" - "libcompressibleTurbulenceModel.so" - "libcompressibleRASModels.so" - "libradiationModels.so" -); // ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/system/fvSchemes b/tutorials/lagrangian/reactingParcelFoam/filter/system/fvSchemes index cbdf8c0b4..536c43de0 100644 --- a/tutorials/lagrangian/reactingParcelFoam/filter/system/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFoam/filter/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(U) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phi,Yi_h) Gauss upwind; } diff --git a/tutorials/lagrangian/reactingParcelFoam/parcelInBox/system/fvSchemes b/tutorials/lagrangian/reactingParcelFoam/parcelInBox/system/fvSchemes index e7d730d2f..890464255 100644 --- a/tutorials/lagrangian/reactingParcelFoam/parcelInBox/system/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFoam/parcelInBox/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,omega) Gauss upwind; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phi,Yi_h) Gauss upwind; } diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/0.org/k b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/0.org/k index 2a7693689..098b4a6eb 100644 --- a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/0.org/k +++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/0.org/k @@ -48,7 +48,7 @@ boundaryField } walls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0; } } diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0/mut b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/0.org/nut similarity index 93% rename from tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0/mut rename to tutorials/lagrangian/reactingParcelFoam/verticalChannel/0.org/nut index 7cfeaae13..41fe07482 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0/mut +++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/0.org/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -46,7 +46,7 @@ boundaryField } walls { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/0.org/omega b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/0.org/omega index c1aa352a7..462084a38 100644 --- a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/0.org/omega +++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/0.org/omega @@ -31,14 +31,14 @@ boundaryField } inletCentral { - type compressible::turbulentMixingLengthFrequencyInlet; + type turbulentMixingLengthFrequencyInlet; mixingLength 0.007; k k; value uniform 4.5e-3; } inletSides { - type compressible::turbulentMixingLengthFrequencyInlet; + type turbulentMixingLengthFrequencyInlet; mixingLength 0.007; k k; value uniform 4.5e-3; @@ -50,7 +50,7 @@ boundaryField } walls { - type compressible::omegaWallFunction; + type omegaWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/constant/RASProperties b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/constant/RASProperties deleted file mode 100644 index 568821b00..000000000 --- a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/constant/RASProperties +++ /dev/null @@ -1,24 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kOmegaSST; // kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/constant/turbulenceProperties b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/constant/turbulenceProperties index aaccd5feb..89a95c3f0 100644 --- a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/constant/turbulenceProperties +++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/constant/turbulenceProperties @@ -14,7 +14,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kOmegaSST; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/system/fvSchemes b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/system/fvSchemes index d3296d433..fb6d354d1 100644 --- a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/system/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/system/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,omega) Gauss upwind; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phi,Yi_h) Gauss upwind; } diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/k b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/k index 2a7693689..098b4a6eb 100644 --- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/k +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/k @@ -48,7 +48,7 @@ boundaryField } walls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0; } } diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/0.org/mut b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/nut similarity index 93% rename from tutorials/lagrangian/reactingParcelFoam/verticalChannel/0.org/mut rename to tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/nut index 7cfeaae13..41fe07482 100644 --- a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/0.org/mut +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/nut @@ -11,11 +11,11 @@ FoamFile format ascii; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -46,7 +46,7 @@ boundaryField } walls { - type mutkWallFunction; + type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/omega b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/omega index c1aa352a7..462084a38 100644 --- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/omega +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/omega @@ -31,14 +31,14 @@ boundaryField } inletCentral { - type compressible::turbulentMixingLengthFrequencyInlet; + type turbulentMixingLengthFrequencyInlet; mixingLength 0.007; k k; value uniform 4.5e-3; } inletSides { - type compressible::turbulentMixingLengthFrequencyInlet; + type turbulentMixingLengthFrequencyInlet; mixingLength 0.007; k k; value uniform 4.5e-3; @@ -50,7 +50,7 @@ boundaryField } walls { - type compressible::omegaWallFunction; + type omegaWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/k b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/k index 2a7693689..098b4a6eb 100644 --- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/k +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/k @@ -48,7 +48,7 @@ boundaryField } walls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 0; } } diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/mut b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/mut deleted file mode 100644 index 7cfeaae13..000000000 --- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/mut +++ /dev/null @@ -1,58 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object mut; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [1 -1 -1 0 0 0 0]; - -internalField uniform 0; - -boundaryField -{ - back - { - type symmetryPlane; - } - front - { - type symmetryPlane; - } - inletCentral - { - type calculated; - value uniform 0; - } - inletSides - { - type calculated; - value uniform 0; - } - outlet - { - type calculated; - value uniform 0; - } - walls - { - type mutkWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0; - } -} - - -// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/nut b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/nut new file mode 100644 index 000000000..41fe07482 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/nut @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + inletCentral + { + type calculated; + value uniform 0; + } + inletSides + { + type calculated; + value uniform 0; + } + outlet + { + type calculated; + value uniform 0; + } + walls + { + type nutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/omega b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/omega index c1aa352a7..462084a38 100644 --- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/omega +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/omega @@ -31,14 +31,14 @@ boundaryField } inletCentral { - type compressible::turbulentMixingLengthFrequencyInlet; + type turbulentMixingLengthFrequencyInlet; mixingLength 0.007; k k; value uniform 4.5e-3; } inletSides { - type compressible::turbulentMixingLengthFrequencyInlet; + type turbulentMixingLengthFrequencyInlet; mixingLength 0.007; k k; value uniform 4.5e-3; @@ -50,7 +50,7 @@ boundaryField } walls { - type compressible::omegaWallFunction; + type omegaWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/RASProperties b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/RASProperties deleted file mode 100644 index 568821b00..000000000 --- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/RASProperties +++ /dev/null @@ -1,24 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kOmegaSST; // kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/turbulenceProperties b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/turbulenceProperties index aaccd5feb..87ceaddfd 100644 --- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/turbulenceProperties +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/turbulenceProperties @@ -14,7 +14,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kOmegaSST; // kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/system/fvSchemes b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/system/fvSchemes index d80f5e4e2..2091a6975 100644 --- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/system/fvSchemes +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/system/fvSchemes @@ -37,7 +37,7 @@ divSchemes div(phi,epsilon) bounded Gauss upwind; div(phi,omega) bounded Gauss upwind; div(phi,Yi_h) Gauss upwind; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/0/epsilon b/tutorials/lagrangian/sprayFoam/aachenBomb/0/epsilon index e38ed0278..c14d3d7e0 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/0/epsilon +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/0/epsilon @@ -23,7 +23,7 @@ boundaryField { walls { - type compressible::epsilonWallFunction; + type epsilonWallFunction; value uniform 90; } } diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/0/k b/tutorials/lagrangian/sprayFoam/aachenBomb/0/k index 6650fed2a..434499066 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/0/k +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/0/k @@ -23,7 +23,7 @@ boundaryField { walls { - type compressible::kqRWallFunction; + type kqRWallFunction; value uniform 1; } } diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/0/mut b/tutorials/lagrangian/sprayFoam/aachenBomb/0/nut similarity index 90% rename from tutorials/lagrangian/sprayFoam/aachenBomb/0/mut rename to tutorials/lagrangian/sprayFoam/aachenBomb/0/nut index ce6dfaf3e..455e74634 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/0/mut +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/0/nut @@ -11,11 +11,11 @@ FoamFile format binary; class volScalarField; location "0"; - object mut; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; @@ -23,7 +23,7 @@ boundaryField { walls { - type mutkWallFunction; + type nutkWallFunction; value uniform 0; } } diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/RASProperties b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/RASProperties deleted file mode 100644 index 648ca4453..000000000 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format binary; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/turbulenceProperties b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/turbulenceProperties index 85d799ea5..017f5dba9 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/turbulenceProperties +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSchemes b/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSchemes index c4a6d627c..d064aca38 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSchemes +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(U) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(phi,Yi_h) Gauss upwind; } diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/constant/RASProperties b/tutorials/mesh/foamyHexMesh/mixerVessel/constant/RASProperties deleted file mode 100644 index da54fd75a..000000000 --- a/tutorials/mesh/foamyHexMesh/mixerVessel/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs off; - - -// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/constant/turbulenceProperties b/tutorials/mesh/foamyHexMesh/mixerVessel/constant/turbulenceProperties index e7fa28c74..d7309cb88 100644 --- a/tutorials/mesh/foamyHexMesh/mixerVessel/constant/turbulenceProperties +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/constant/turbulenceProperties @@ -15,6 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs off; +} + // ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/fvSchemes b/tutorials/mesh/foamyHexMesh/mixerVessel/system/fvSchemes index 6ecda2783..59d9365ad 100644 --- a/tutorials/mesh/foamyHexMesh/mixerVessel/system/fvSchemes +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/fvSchemes @@ -37,7 +37,7 @@ divSchemes div(rhoPhi,K) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/LTSInterFoam/DTCHull/constant/RASProperties b/tutorials/multiphase/LTSInterFoam/DTCHull/constant/RASProperties deleted file mode 100644 index e0e6b776a..000000000 --- a/tutorials/multiphase/LTSInterFoam/DTCHull/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kOmegaSST; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/multiphase/LTSInterFoam/DTCHull/constant/turbulenceProperties b/tutorials/multiphase/LTSInterFoam/DTCHull/constant/turbulenceProperties index 3721a46a2..02fa2df1b 100644 --- a/tutorials/multiphase/LTSInterFoam/DTCHull/constant/turbulenceProperties +++ b/tutorials/multiphase/LTSInterFoam/DTCHull/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kOmegaSST; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/multiphase/LTSInterFoam/DTCHull/system/fvSchemes b/tutorials/multiphase/LTSInterFoam/DTCHull/system/fvSchemes index 5dac71381..66a883a15 100644 --- a/tutorials/multiphase/LTSInterFoam/DTCHull/system/fvSchemes +++ b/tutorials/multiphase/LTSInterFoam/DTCHull/system/fvSchemes @@ -33,7 +33,7 @@ divSchemes div(phirb,alpha) Gauss linear; div(phi,k) Gauss linearUpwind limitedGrad; div(phi,omega) Gauss linearUpwind limitedGrad; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/0/nuSgs b/tutorials/multiphase/cavitatingFoam/les/throttle/0/nut similarity index 98% rename from tutorials/multiphase/cavitatingFoam/les/throttle/0/nuSgs rename to tutorials/multiphase/cavitatingFoam/les/throttle/0/nut index 6d4b26abe..f56907e7b 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle/0/nuSgs +++ b/tutorials/multiphase/cavitatingFoam/les/throttle/0/nut @@ -11,7 +11,7 @@ FoamFile format ascii; class volScalarField; location "0"; - object nuSgs; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/constant/LESProperties b/tutorials/multiphase/cavitatingFoam/les/throttle/constant/LESProperties deleted file mode 100644 index e6d3db2b5..000000000 --- a/tutorials/multiphase/cavitatingFoam/les/throttle/constant/LESProperties +++ /dev/null @@ -1,84 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object LESProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -LESModel oneEqEddy; - -delta smooth; - -cubeRootVolCoeffs -{ - deltaCoeff 1; -} - -PrandtlCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Cdelta 0.158; -} - -vanDriestCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Aplus 26; - Cdelta 0.158; -} - -smoothCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/constant/turbulenceProperties b/tutorials/multiphase/cavitatingFoam/les/throttle/constant/turbulenceProperties index a925d3cc2..ec7ce0246 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle/constant/turbulenceProperties +++ b/tutorials/multiphase/cavitatingFoam/les/throttle/constant/turbulenceProperties @@ -15,7 +15,79 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType LESModel; +simulationType LES; + +LES +{ + LESModel kEqn; + + turbulence on; + + printCoeffs on; + + delta smooth; + + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + PrandtlCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Cdelta 0.158; + } + + vanDriestCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Aplus 26; + Cdelta 0.158; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } +} // ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes b/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes index 17346054f..9072b1b48 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes +++ b/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes @@ -31,7 +31,7 @@ divSchemes div(phi,rho) Gauss vanLeer; div(rhoPhi,U) Gauss LUST grad(U); div(phi,k) Gauss LUST grad(k); - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } gradSchemes diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/0.org/nuSgs b/tutorials/multiphase/cavitatingFoam/les/throttle3D/0.org/nut similarity index 98% rename from tutorials/multiphase/cavitatingFoam/les/throttle3D/0.org/nuSgs rename to tutorials/multiphase/cavitatingFoam/les/throttle3D/0.org/nut index c4d32cf2f..f85002726 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/0.org/nuSgs +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/0.org/nut @@ -11,7 +11,7 @@ FoamFile format ascii; class volScalarField; location "0"; - object nuSgs; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/constant/LESProperties b/tutorials/multiphase/cavitatingFoam/les/throttle3D/constant/LESProperties deleted file mode 100644 index e6d3db2b5..000000000 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/constant/LESProperties +++ /dev/null @@ -1,84 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object LESProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -LESModel oneEqEddy; - -delta smooth; - -cubeRootVolCoeffs -{ - deltaCoeff 1; -} - -PrandtlCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Cdelta 0.158; -} - -vanDriestCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Aplus 26; - Cdelta 0.158; -} - -smoothCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/constant/turbulenceProperties b/tutorials/multiphase/cavitatingFoam/les/throttle3D/constant/turbulenceProperties index a925d3cc2..ec7ce0246 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/constant/turbulenceProperties +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/constant/turbulenceProperties @@ -15,7 +15,79 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType LESModel; +simulationType LES; + +LES +{ + LESModel kEqn; + + turbulence on; + + printCoeffs on; + + delta smooth; + + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + PrandtlCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Cdelta 0.158; + } + + vanDriestCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Aplus 26; + Cdelta 0.158; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } +} // ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes index 64aa6e54b..8753ef178 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,rho) Gauss vanLeer; div(rhoPhi,U) Gauss LUST grad(U); div(phi,k) Gauss LUST grad(k); - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } gradSchemes diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/constant/RASProperties b/tutorials/multiphase/cavitatingFoam/ras/throttle/constant/RASProperties deleted file mode 100644 index e0e6b776a..000000000 --- a/tutorials/multiphase/cavitatingFoam/ras/throttle/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kOmegaSST; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/constant/turbulenceProperties b/tutorials/multiphase/cavitatingFoam/ras/throttle/constant/turbulenceProperties index 3721a46a2..02fa2df1b 100644 --- a/tutorials/multiphase/cavitatingFoam/ras/throttle/constant/turbulenceProperties +++ b/tutorials/multiphase/cavitatingFoam/ras/throttle/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kOmegaSST; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSchemes b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSchemes index 618d1b4a9..0235d8bc0 100644 --- a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSchemes +++ b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(rhoPhi,U) Gauss limitedLinearV 1; div(phi,omega) Gauss limitedLinear 1; div(phi,k) Gauss limitedLinear 1; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } gradSchemes diff --git a/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/constant/RASProperties b/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/constant/RASProperties deleted file mode 100644 index 4773e27a4..000000000 --- a/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel laminar; - -turbulence off; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/system/fvSchemes b/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/system/fvSchemes index 045d871d3..c64e1f810 100644 --- a/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/system/fvSchemes +++ b/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/system/fvSchemes @@ -37,7 +37,7 @@ divSchemes div(rhoPhi,K) Gauss linear; div((phi+meshPhi),p) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/LESProperties b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/LESProperties deleted file mode 100644 index b3cfc0ba0..000000000 --- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/LESProperties +++ /dev/null @@ -1,84 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object LESProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -LESModel laminar; - -delta cubeRootVol; - -cubeRootVolCoeffs -{ - deltaCoeff 1; -} - -PrandtlCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Cdelta 0.158; -} - -vanDriestCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Aplus 26; - Cdelta 0.158; -} - -smoothCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/polyMesh/boundary b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/polyMesh/boundary index 81845d8cb..85fa84fac 100644 --- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/polyMesh/boundary +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/polyMesh/boundary @@ -20,6 +20,7 @@ FoamFile walls { type wall; + inGroups 1(wall); nFaces 480; startFace 25360; } diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/fvSchemes b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/fvSchemes index 273c37e72..990fea86e 100644 --- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/fvSchemes +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/fvSchemes @@ -38,7 +38,7 @@ divSchemes div(phi,p) Gauss upwind; div(phi,k) Gauss upwind; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/LESProperties b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/LESProperties deleted file mode 100644 index b3cfc0ba0..000000000 --- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/LESProperties +++ /dev/null @@ -1,84 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object LESProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -LESModel laminar; - -delta cubeRootVol; - -cubeRootVolCoeffs -{ - deltaCoeff 1; -} - -PrandtlCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Cdelta 0.158; -} - -vanDriestCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Aplus 26; - Cdelta 0.158; -} - -smoothCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/fvSchemes b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/fvSchemes index 273c37e72..990fea86e 100644 --- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/fvSchemes +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/fvSchemes @@ -38,7 +38,7 @@ divSchemes div(phi,p) Gauss upwind; div(phi,k) Gauss upwind; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/system/fvSchemes b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/system/fvSchemes index 0fb6563e2..d32c57728 100644 --- a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/system/fvSchemes +++ b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/system/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(rhoPhi,T) Gauss upwind; div(rhoPhi,K) Gauss upwind; div(phi,p) Gauss upwind; - div((muEff*dev2(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/RASProperties b/tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/RASProperties deleted file mode 100644 index e0e6b776a..000000000 --- a/tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kOmegaSST; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/turbulenceProperties b/tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/turbulenceProperties index 3721a46a2..02fa2df1b 100644 --- a/tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/turbulenceProperties +++ b/tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kOmegaSST; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/DTCHull/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/DTCHull/system/fvSchemes index 84b639311..44668611d 100644 --- a/tutorials/multiphase/interDyMFoam/ras/DTCHull/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/DTCHull/system/fvSchemes @@ -33,7 +33,7 @@ divSchemes div(phirb,alpha) Gauss linear; div(phi,k) Gauss linearUpwind limitedGrad; div(phi,omega) Gauss linearUpwind limitedGrad; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/RASProperties b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/RASProperties deleted file mode 100644 index af7ecd49d..000000000 --- a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kOmegaSST; - -turbulence on; - -printCoeffs off; - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/turbulenceProperties b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/turbulenceProperties index 09c25018c..c2c3b28a1 100644 --- a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/turbulenceProperties +++ b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/turbulenceProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType laminar; //RASModel; +simulationType laminar; // ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSchemes index 020384e5e..06de48abe 100644 --- a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phirb,alpha) Gauss linear; div(phi,k) Gauss upwind; div(phi,omega) Gauss upwind; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/RASProperties b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/turbulenceProperties b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/turbulenceProperties index c2021e727..cd2daf822 100644 --- a/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/turbulenceProperties +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/turbulenceProperties @@ -15,6 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + // ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/fvSchemes index 88424a730..4749335ec 100644 --- a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phirb,alpha) Gauss linear; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/constant/RASProperties b/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/constant/RASProperties deleted file mode 100644 index da54fd75a..000000000 --- a/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs off; - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/constant/turbulenceProperties b/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/constant/turbulenceProperties index e7fa28c74..d7309cb88 100644 --- a/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/constant/turbulenceProperties +++ b/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/constant/turbulenceProperties @@ -15,6 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs off; +} + // ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/system/fvSchemes index bf1d065bc..59d9365ad 100644 --- a/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/system/fvSchemes @@ -37,9 +37,7 @@ divSchemes div(rhoPhi,K) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; - div((muEff*dev2(T(grad(U))))) Gauss linear; - - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/constant/RASProperties b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/constant/RASProperties deleted file mode 100644 index 4773e27a4..000000000 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel laminar; - -turbulence off; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/fvSchemes index e9bac3f71..a956c1938 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes div(rhoPhi,U) Gauss vanLeerV; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss vanLeer; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/constant/RASProperties b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/constant/RASProperties deleted file mode 100644 index 4773e27a4..000000000 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel laminar; - -turbulence off; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/fvSchemes index e9bac3f71..a956c1938 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes div(rhoPhi,U) Gauss vanLeerV; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss vanLeer; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/constant/RASProperties b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/constant/RASProperties deleted file mode 100644 index 4773e27a4..000000000 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel laminar; - -turbulence off; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/fvSchemes index e9bac3f71..a956c1938 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes div(rhoPhi,U) Gauss vanLeerV; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss vanLeer; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(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 e9bac3f71..a956c1938 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes div(rhoPhi,U) Gauss vanLeerV; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss vanLeer; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/constant/RASProperties b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/constant/RASProperties deleted file mode 100644 index 4773e27a4..000000000 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel laminar; - -turbulence off; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/fvSchemes index e9bac3f71..a956c1938 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes div(rhoPhi,U) Gauss vanLeerV; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss vanLeer; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/constant/RASProperties b/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/constant/RASProperties deleted file mode 100644 index 4773e27a4..000000000 --- a/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel laminar; - -turbulence off; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/system/fvSchemes index e9bac3f71..a956c1938 100644 --- a/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes div(rhoPhi,U) Gauss vanLeerV; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss vanLeer; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(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 cdfd201c6..6f42b083e 100644 --- a/tutorials/multiphase/interFoam/laminar/capillaryRise/system/fvSchemes +++ b/tutorials/multiphase/interFoam/laminar/capillaryRise/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes div(rhoPhi,U) Gauss upwind; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss linear; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(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 cdd6f1ed1..ba6f492d2 100644 --- a/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSchemes +++ b/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes div(rhoPhi,U) Gauss linearUpwind grad(U); div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss linear; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interFoam/laminar/mixerVessel2D/system/fvSchemes b/tutorials/multiphase/interFoam/laminar/mixerVessel2D/system/fvSchemes index a90bcae2d..e4c518a24 100644 --- a/tutorials/multiphase/interFoam/laminar/mixerVessel2D/system/fvSchemes +++ b/tutorials/multiphase/interFoam/laminar/mixerVessel2D/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes div(rhoPhi,U) Gauss linear; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss linear; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interFoam/les/nozzleFlow2D/0/nuSgs b/tutorials/multiphase/interFoam/les/nozzleFlow2D/0/nut similarity index 98% rename from tutorials/multiphase/interFoam/les/nozzleFlow2D/0/nuSgs rename to tutorials/multiphase/interFoam/les/nozzleFlow2D/0/nut index 95e02c374..7b34de6ad 100644 --- a/tutorials/multiphase/interFoam/les/nozzleFlow2D/0/nuSgs +++ b/tutorials/multiphase/interFoam/les/nozzleFlow2D/0/nut @@ -10,7 +10,7 @@ FoamFile version 2.0; format ascii; class volScalarField; - object nuSgs; + object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/multiphase/interFoam/les/nozzleFlow2D/constant/LESProperties b/tutorials/multiphase/interFoam/les/nozzleFlow2D/constant/LESProperties deleted file mode 100644 index 720e13925..000000000 --- a/tutorials/multiphase/interFoam/les/nozzleFlow2D/constant/LESProperties +++ /dev/null @@ -1,86 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object LESProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -LESModel oneEqEddy; - -delta smooth; - -printCoeffs on; - -cubeRootVolCoeffs -{ - deltaCoeff 1; -} - -PrandtlCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Cdelta 0.158; -} - -vanDriestCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - smoothCoeffs - { - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; - } - - Aplus 26; - Cdelta 0.158; -} - -smoothCoeffs -{ - delta cubeRootVol; - cubeRootVolCoeffs - { - deltaCoeff 1; - } - - maxDeltaRatio 1.1; -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/les/nozzleFlow2D/constant/turbulenceProperties b/tutorials/multiphase/interFoam/les/nozzleFlow2D/constant/turbulenceProperties index a925d3cc2..b0b4dcee0 100644 --- a/tutorials/multiphase/interFoam/les/nozzleFlow2D/constant/turbulenceProperties +++ b/tutorials/multiphase/interFoam/les/nozzleFlow2D/constant/turbulenceProperties @@ -15,7 +15,78 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType LESModel; +simulationType LES; +LES +{ + LESModel kEqn; + + turbulence on; + + printCoeffs on; + + delta smooth; + + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + PrandtlCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Cdelta 0.158; + } + + vanDriestCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Aplus 26; + Cdelta 0.158; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } +} // ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/fvSchemes b/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/fvSchemes index 07bd316e0..9510ee686 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((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interFoam/ras/Allclean b/tutorials/multiphase/interFoam/ras/Allclean index 236e233b9..8b652373b 100755 --- a/tutorials/multiphase/interFoam/ras/Allclean +++ b/tutorials/multiphase/interFoam/ras/Allclean @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -keepCases="damBreak damBreakPorousBaffle weirOverflow waterChannel" +keepCases="damBreak damBreakPorousBaffle weirOverflow waterChannel angledDuct" loseCases="damBreakFine" for case in $keepCases diff --git a/tutorials/multiphase/interFoam/ras/angledDuct/constant/RASProperties b/tutorials/multiphase/interFoam/ras/angledDuct/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/multiphase/interFoam/ras/angledDuct/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/angledDuct/constant/turbulenceProperties b/tutorials/multiphase/interFoam/ras/angledDuct/constant/turbulenceProperties index 3721a46a2..cd2daf822 100644 --- a/tutorials/multiphase/interFoam/ras/angledDuct/constant/turbulenceProperties +++ b/tutorials/multiphase/interFoam/ras/angledDuct/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/angledDuct/system/fvSchemes b/tutorials/multiphase/interFoam/ras/angledDuct/system/fvSchemes index f44c0bc2a..749207137 100644 --- a/tutorials/multiphase/interFoam/ras/angledDuct/system/fvSchemes +++ b/tutorials/multiphase/interFoam/ras/angledDuct/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phirb,alpha) Gauss linear; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interFoam/ras/damBreak/constant/RASProperties b/tutorials/multiphase/interFoam/ras/damBreak/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/multiphase/interFoam/ras/damBreak/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreak/constant/polyMesh/boundary b/tutorials/multiphase/interFoam/ras/damBreak/constant/polyMesh/boundary index 1b4dbb60a..79ef3a79e 100644 --- a/tutorials/multiphase/interFoam/ras/damBreak/constant/polyMesh/boundary +++ b/tutorials/multiphase/interFoam/ras/damBreak/constant/polyMesh/boundary @@ -20,18 +20,21 @@ FoamFile leftWall { type wall; + inGroups 1(wall); nFaces 50; startFace 4432; } rightWall { type wall; + inGroups 1(wall); nFaces 50; startFace 4482; } lowerWall { type wall; + inGroups 1(wall); nFaces 62; startFace 4532; } diff --git a/tutorials/multiphase/interFoam/ras/damBreak/constant/turbulenceProperties b/tutorials/multiphase/interFoam/ras/damBreak/constant/turbulenceProperties index 3721a46a2..cd2daf822 100644 --- a/tutorials/multiphase/interFoam/ras/damBreak/constant/turbulenceProperties +++ b/tutorials/multiphase/interFoam/ras/damBreak/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreak/system/fvSchemes b/tutorials/multiphase/interFoam/ras/damBreak/system/fvSchemes index 3bc534759..960ff2562 100644 --- a/tutorials/multiphase/interFoam/ras/damBreak/system/fvSchemes +++ b/tutorials/multiphase/interFoam/ras/damBreak/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phirb,alpha) Gauss linear; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh index 6fe05fbb3..f24e6e1ed 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/p_rgh @@ -59,7 +59,7 @@ boundaryField jump uniform 0; value uniform 0; D 1000; - I 1000; + I 500; length 0.15; } porous_half1 @@ -68,7 +68,7 @@ boundaryField patchType cyclic; value uniform 0; D 1000; - I 1000; + I 500; length 0.15; } } diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/RASProperties b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary index 49282f81f..45396d407 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary @@ -20,18 +20,21 @@ FoamFile leftWall { type wall; + inGroups 1(wall); nFaces 50; startFace 4419; } rightWall { type wall; + inGroups 1(wall); nFaces 50; startFace 4469; } lowerWall { type wall; + inGroups 1(wall); nFaces 62; startFace 4519; } @@ -51,7 +54,13 @@ FoamFile porous_half0 { type cyclic; - inGroups 1(cyclic); + inGroups +2 +( +cyclic +cyclicFaces +) +; nFaces 13; startFace 9163; matchTolerance 0.0001; @@ -61,7 +70,13 @@ FoamFile porous_half1 { type cyclic; - inGroups 1(cyclic); + inGroups +2 +( +cyclic +cyclicFaces +) +; nFaces 13; startFace 9176; matchTolerance 0.0001; diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/turbulenceProperties b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/turbulenceProperties index 3721a46a2..cd2daf822 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/turbulenceProperties +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict index 53bb12ff9..f66e5d7c7 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict @@ -52,11 +52,5 @@ maxAlphaCo 0.1; maxDeltaT 1; -libs -( - "libturbulenceDerivedFvPatchFields.so" - "libincompressibleTurbulenceModel.so" - "libincompressibleRASModels.so" -); // ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes index 3bc534759..960ff2562 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phirb,alpha) Gauss linear; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(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 a05ac072d..22019100d 100644 --- a/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/fvSchemes +++ b/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phirb,alpha) Gauss linear; div(phi,k) Gauss upwind; div(phi,omega) Gauss upwind; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/constant/RASProperties b/tutorials/multiphase/interFoam/ras/waterChannel/constant/RASProperties deleted file mode 100644 index 34da39d90..000000000 --- a/tutorials/multiphase/interFoam/ras/waterChannel/constant/RASProperties +++ /dev/null @@ -1,24 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kOmegaSST; - -turbulence on; - -printCoeffs on; - -// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/constant/turbulenceProperties b/tutorials/multiphase/interFoam/ras/waterChannel/constant/turbulenceProperties index 3721a46a2..02fa2df1b 100644 --- a/tutorials/multiphase/interFoam/ras/waterChannel/constant/turbulenceProperties +++ b/tutorials/multiphase/interFoam/ras/waterChannel/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kOmegaSST; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSchemes b/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSchemes index 8774b16c1..42584c41c 100644 --- a/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSchemes +++ b/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(phirb,alpha) Gauss linear; "div\(phi,(k|omega)\)" Gauss upwind; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interFoam/ras/weirOverflow/constant/RASProperties b/tutorials/multiphase/interFoam/ras/weirOverflow/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/multiphase/interFoam/ras/weirOverflow/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/weirOverflow/constant/turbulenceProperties b/tutorials/multiphase/interFoam/ras/weirOverflow/constant/turbulenceProperties index 3721a46a2..cd2daf822 100644 --- a/tutorials/multiphase/interFoam/ras/weirOverflow/constant/turbulenceProperties +++ b/tutorials/multiphase/interFoam/ras/weirOverflow/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/weirOverflow/system/fvSchemes b/tutorials/multiphase/interFoam/ras/weirOverflow/system/fvSchemes index 40392f6f9..ba84fd84f 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((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(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 31b1e85b5..b0d1f73aa 100644 --- a/tutorials/multiphase/interMixingFoam/laminar/damBreak/system/fvSchemes +++ b/tutorials/multiphase/interMixingFoam/laminar/damBreak/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes div(rhoPhi,U) Gauss limitedLinearV 1; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss linear; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/RASProperties b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/turbulenceProperties b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/turbulenceProperties index 3721a46a2..cd2daf822 100644 --- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/turbulenceProperties +++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/turbulenceProperties @@ -15,7 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/controlDict b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/controlDict index a121b19dd..3ff478fa5 100644 --- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/controlDict +++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/controlDict @@ -15,12 +15,6 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -libs -( - "libincompressibleTurbulenceModel.so" - "libincompressibleRASModels.so" -); - application interPhaseChangeDyMFoam; startFrom startTime; diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/fvSchemes b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/fvSchemes index 663657c04..7f42a48fe 100644 --- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/fvSchemes +++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSchemes b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSchemes index 2c2507cfb..a61518f61 100644 --- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSchemes +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,k) Gauss linearUpwind grad(k); div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss linear; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } gradSchemes diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/LESProperties b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/LESProperties deleted file mode 100644 index ec20bc01d..000000000 --- a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/LESProperties +++ /dev/null @@ -1,29 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object LESProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -LESModel laminar; - -printCoeffs on; - -delta cubeRootVol; - -cubeRootVolCoeffs -{ - deltaCoeff 1; -} - -// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/polyMesh/boundary b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/polyMesh/boundary index bf47f6964..4564ccc46 100644 --- a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/polyMesh/boundary +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/polyMesh/boundary @@ -32,6 +32,7 @@ FoamFile walls { type wall; + inGroups 1(wall); nFaces 150; startFace 3700; } diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/constant/RASProperties b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/turbulenceProperties similarity index 91% rename from tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/constant/RASProperties rename to tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/turbulenceProperties index 8107da2ca..c2c3b28a1 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/constant/RASProperties +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/turbulenceProperties @@ -11,13 +11,11 @@ FoamFile format ascii; class dictionary; location "constant"; - object RASProperties; + object turbulenceProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -RASModel laminar; - -turbulence off; +simulationType laminar; // ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/LESProperties b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/LESProperties deleted file mode 100644 index ec20bc01d..000000000 --- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/LESProperties +++ /dev/null @@ -1,29 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object LESProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -LESModel laminar; - -printCoeffs on; - -delta cubeRootVol; - -cubeRootVolCoeffs -{ - deltaCoeff 1; -} - -// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/polyMesh/boundary b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/polyMesh/boundary index 1b4dbb60a..79ef3a79e 100644 --- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/polyMesh/boundary +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/polyMesh/boundary @@ -20,18 +20,21 @@ FoamFile leftWall { type wall; + inGroups 1(wall); nFaces 50; startFace 4432; } rightWall { type wall; + inGroups 1(wall); nFaces 50; startFace 4482; } lowerWall { type wall; + inGroups 1(wall); nFaces 62; startFace 4532; } diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/constant/LESProperties b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/constant/LESProperties deleted file mode 100644 index ec20bc01d..000000000 --- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/constant/LESProperties +++ /dev/null @@ -1,29 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object LESProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -LESModel laminar; - -printCoeffs on; - -delta cubeRootVol; - -cubeRootVolCoeffs -{ - deltaCoeff 1; -} - -// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/constant/polyMesh/boundary b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/constant/polyMesh/boundary index a477fd3cb..f1ec54505 100644 --- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/constant/polyMesh/boundary +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/constant/polyMesh/boundary @@ -20,18 +20,21 @@ FoamFile leftWall { type wall; + inGroups 1(wall); nFaces 195; startFace 68014; } rightWall { type wall; + inGroups 1(wall); nFaces 195; startFace 68209; } lowerWall { type wall; + inGroups 1(wall); nFaces 206; startFace 68404; } diff --git a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/constant/LESProperties b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/constant/LESProperties deleted file mode 100644 index ec20bc01d..000000000 --- a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/constant/LESProperties +++ /dev/null @@ -1,29 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object LESProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -LESModel laminar; - -printCoeffs on; - -delta cubeRootVol; - -cubeRootVolCoeffs -{ - deltaCoeff 1; -} - -// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/constant/polyMesh/boundary b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/constant/polyMesh/boundary index 188a0f0c5..5c2a6cf99 100644 --- a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/constant/polyMesh/boundary +++ b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/constant/polyMesh/boundary @@ -20,12 +20,14 @@ FoamFile rotor { type wall; + inGroups 1(wall); nFaces 192; startFace 5952; } stator { type wall; + inGroups 1(wall); nFaces 192; startFace 6144; } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomWater/RASProperties b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/constant/turbulenceProperties similarity index 89% rename from tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomWater/RASProperties rename to tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/constant/turbulenceProperties index 09a9a5585..c2c3b28a1 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomWater/RASProperties +++ b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/constant/turbulenceProperties @@ -10,15 +10,12 @@ FoamFile version 2.0; format ascii; class dictionary; - object RASProperties; + location "constant"; + object turbulenceProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -RASModel laminar; - -turbulence on; - -printCoeffs on; +simulationType laminar; // ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/constant/RASProperties b/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/constant/RASProperties deleted file mode 100644 index a4937b503..000000000 --- a/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/system/fvSchemes b/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/system/fvSchemes index d640b56b8..2234c3afd 100644 --- a/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/system/fvSchemes +++ b/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes div(rhoPhi,U) Gauss limitedLinearV 1; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss linear; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/system/fvSchemes b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/system/fvSchemes index 69de4bdbc..f4c635c89 100644 --- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/system/fvSchemes +++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(rhoPhi,U) Gauss upwind; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss linear; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(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 69de4bdbc..f4c635c89 100644 --- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/system/fvSchemes +++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(rhoPhi,U) Gauss upwind; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss linear; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/system/fvSchemes b/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/system/fvSchemes index 9f1495f17..0844c2a1e 100644 --- a/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/system/fvSchemes +++ b/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes div(rhoPhi,U) Gauss limitedLinearV 1; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss linear; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/fvSchemes b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/fvSchemes index 51db9cc49..a5bdba477 100644 --- a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/fvSchemes +++ b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/fvSchemes @@ -29,7 +29,7 @@ divSchemes { default none; div(phi,U) Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/fvSchemes b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/fvSchemes index 9ff435c16..4f34ad122 100644 --- a/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/fvSchemes +++ b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/fvSchemes @@ -31,7 +31,7 @@ divSchemes { default none; div(phi,U) Gauss upwind; - div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSchemes b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSchemes index 84a24f492..133816f9e 100644 --- a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSchemes +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSchemes @@ -33,7 +33,7 @@ divSchemes div(rhoPhi,U) Gauss linear; div(phi,alpha) Gauss vanLeer; div(phi,k) Gauss limitedLinear 1; - div((muEff*dev(T(grad(U))))) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes