diff --git a/applications/solvers/combustion/PDRFoam/Make/options b/applications/solvers/combustion/PDRFoam/Make/options index b6c6398fdea5b27262b932e70ebb32a5cf5dc078..6b89ae638354ea6dc73d82d66c0f8d2f54201fd2 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 ad6e2d029862c32aaa002d55cc8452e6e92e6b2b..1d56ab28f84a08635bb297b637fbe7a5a0e069a5 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 88d6305e12a21ed11e435b00f3050be5617c0f93..1904325703bcf24d6321d827f1a946d966ba8e80 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 426e65981d388dcd6648e604884951b74ae9f072..de5b26c1353edc27ef91f85bc2cb118255cbb897 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 05aeb059f6a7cdac203fdb089f1d67f59b09041c..f5a76fa5c20a50a0a05cf5907d02354fb18fbcb8 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 feb9ae8d41ddd3799b23644f24c7c1ffa6ac1f0d..4cf94228048c24fcf88b56f2c636207a9ce61b67 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 d8e3a9ed9cf49f8a2b7accf14c04442ba8f6de52..be2cc6dab3cb17a8359241339021e8a1e2d63bd0 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 12cfba078b3acb271fa6c651b71df547b9c18716..73dbee5664c3e5186ade28cb04347a88813bc5fc 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 d210aab70c57f6b9f395b4f0e99dabd2047820d5..689a47844a4ca25066c7f8e1a9c126e3b1417826 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 8fe73daa9441d9127aa19311b4b094c312501691..ba0e121e7b59908cf714496e7202e5a369bccc04 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 929c4df11c0e247c818666927250a38811a620a0..2574c4c1448bf5d7bb4f23d824b83a4e28dd6430 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 3bc4b53a95e0e9ea351a93b0f14fc57ba336ae73..ac61eb7f8a3e827af8e47ef09f0136b410be1737 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 ad091f410fbd072a11438ddc9557e82c8732dd27..ae69d5bab5f19e1dc40d6a88e2fac3e65bc6f923 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 caf471a15a341e4dc0c7549d06d8358744a72d4a..91ad18fdff55d15e4aa9fd498433a93e4d638361 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 468cc1919baa34eab930970f2ace4243e5b5f786..4860d14f4d05ccda7e1aa8195c8030e32add35ab 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 84fac04820f628ee9528a2bcd6b63e0c19d82725..898e79f415c457427c45ed393498d95fe1180815 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 9facf7ac9c065e01dd5231bdc20edb52f5f49429..79647a861094f3b40b7989f347f07803dc68862b 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 4183045a1039445b8f5c8be418e7627d6ea92992..699a929bbce1dc6927d758b8049061a224bec2de 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 d688fb1e2dfdd8c207c3e39a6bf700399aa230a2..c49f5de1b84604aa136d8303b9303fecc35cffaa 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 43eb616e17376390e190ed965c566a3ec9a193db..988cf128b3dd94a405a7b02f9bd4a3d60b443a39 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 fcbc3a4206f3facb049d49b730e30d7436c243e2..0ede4569ef8039ea167a75d845208c3f6a20c8af 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 a35e22dc58d9cb2595766221d30ed1b778e1cf16..97c5cc56f2ed0346e362d2bf7a06c9537318cf51 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 cd5ad097ace53133b2a0b7581ba6bf4c0cad8698..cccf0a7dacf984c9fe7f4a850d2b0b4f372a846d 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 b8c48549a68bf3b652e49fb3f8f3716f50b130a8..b70a9d6ccbde3778950bbfb5f26cbf321998a5d8 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 0b34210865f87a91c78d489ea0a9dd71d83b448f..9088b382a4ca0bb77ca8517b595e31b53745b2dc 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 abac9d96a4c1da64039dd6e1c09b4b6e7ad4fbcc..1028061264c6bb71e325d88452569d78db2c543b 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 15cf68cb5e1ee384e7f74fe523740fc33c320de7..5a7c91bce97957e8279c8da66d22450215a5fd0f 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 831df5c9a3eb67203e1fa2ae29a2aeafccb451bc..755cf14ab286fc323eb8bfd5e530d35fd865c869 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 bf015097e3542242f87928ac0824d2dd06b1c068..a9ea986c0ea4726780aaa8ac40abf7c3a742d4ed 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 fd4b6f58eb5410fc0cc042e2b71011c9099dae2a..0adee03a9fad9861ce6b96f6b8fa527d523fa8e2 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 bf015097e3542242f87928ac0824d2dd06b1c068..a9ea986c0ea4726780aaa8ac40abf7c3a742d4ed 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 192fb74051a8447baf7da2b0f41915e4b957be27..bdbf5f594ccb6fd69c6d0c97d9c269a0b0cca25b 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 4ddaa7fb9714e9ec0106886343b52157ef7fcb36..1b16a7b364e76f1d0163e7aae2202540fa158870 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 33707728f697baebd4fbc5b604e0cea1b6592549..f79e10048ee4083cb832d8e13c60e8d39f27b2f6 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 a4282534217c6742fd2739cea7645961cf478f2d..d8f83da121cb4220088267fe31b43b1363ec71f9 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 3ae35694ec76e203fa3bf08bec7043ed7c0a1f3d..164f0d1a209e03a136f6687312c10773853c83e3 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 c25d7701488ea0c3dce537a1e4e270e46c5b3b02..8f38ef182ef6498e2a2d9fd6204a5f7f3b1705a1 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 502938c53c027fcd59c4ae9bc1e7b7c7c84d52fd..669cd4a3d4f56787994ca2fe5425cb65956dffa9 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 8f2943f84cfa62d86e4369930edea5d9caa0d414..8ff8c28da2703cfc5b5c7d3408753d705dc334fc 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 2093b620b5e769165d367711b962dd7ef12f5277..f94f65e6ac00e129911fd3821e3029f6c2a80acd 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 fcfc2aa79523e64b2d64383fb317b400599ed363..f3676b66dba540076fb6a461008fa58019ca0160 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 6c6c4e99ab4df634b6648562ab809e19254253dc..ae43c9504443173c996686ea92a42df1a7ce7320 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 502938c53c027fcd59c4ae9bc1e7b7c7c84d52fd..669cd4a3d4f56787994ca2fe5425cb65956dffa9 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 308a90e51af0500b3d1269ef2d25bbb73120bc92..fd3e102dc4be8d5191181cd6e0b49f06b1c2057d 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 4606400cbdf344c50831b052190ca1a161219eb7..dc86432603e91ba30ae8b695159fb5e9c0581ddf 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 39d6f696eb53e600fa8a86e289e35ce9ae4f7e5f..bf3eda58730c45aa2151202b14d17c32be13cf0f 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 fd30404ae6b3c7dbffcb1e9b73c58de8f312faf6..d8598bae4751c5eaf165d6bdecec68efdeb15a93 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 c0a6282a3e4e1af93a651dafaa3171925c522cf0..1d70a557cd80dab1d64f5a0277c90a139957dfa7 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 cc82ba958d74e570be58a9a614ccf3813a352c3e..bf3eda58730c45aa2151202b14d17c32be13cf0f 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 a7c9b2070b30eae18b592edbbbee7980ad06b45a..bad31d3783c3fcae394f51a38c9b3d5c7f532ff8 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 b1663bb8243cdfa06262d92f46b1dceeaf93011d..92ca5cd17b948fd4de94aa465a37e3c3a0e94a5b 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 761311a8b0b7176044e0eedabaffb5afca75d512..1561dffa7d14ac96d12452922494951da604a3a5 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 5a8e0b92edc3c4fbba180213be5607e2313be96d..a78ef861d68d3294d26a398a4ad172085d19ffc0 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 875e7afa7d7f86a02929cc6f94beaedbfb67daa5..1042889dbb93098d880e6c5b103c5c36393fada6 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 1e23e45944010f00be52570ec954279f9dae123b..9a60cac4333ef53eb708aa2b5b448204934358bd 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 5827ddf2c9963049561b7a7a68b8eae360c56761..1e9fca7f86868b4c890940dc4e7925e2d713e0c9 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 6a6311e47cd49d05fbec8e81e4e9bd0503a3a701..48d83838acd83c0bd0aa252fd7ca759fdffbcabd 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 bcf4729a4b72dd425a1704bd237594f2246cc82a..e9a964c814a3b76962f0d270c86a9679b35c0a33 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 e57cfc441f909f36bd81e8e4e41cd7ffe6b3dfcc..fc4620b28b494ca1daecdf22a2cedec321c2a295 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 9d62893f18ae4a59a54596313c14dc0321bff2c9..3792168548c0800ae35d0baac7b07ddb5d248cae 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 11decf6bb4295d419776514827b50d611d8b66ee..383ee341f191951f3de7206a9e5c93762027b21b 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 2e52da8f5310ee2edcfe1a56c5979036bdf24727..6c05e0cacc1e9533573b51de9f6a88ed787c6666 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 359d2d4526400f2086b875218be90bfcdd963a8c..75695454d68b9fb5a905dfb76ea4862d608b68fb 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 6aae0cf5b68eee3598da96ede3b920fc07d37926..7ee8492cbe2ad7fa227fa38a2c006754b3ad84ba 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 93b544d0e0398b61e2840309f904c1a4a0dcfffa..e3c4d178f13ed843e709ab66abe438e4c4111e01 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 75720dd51c28d1f8a9f1cf9ca0c21bd0b7d3286e..6c07dcbdfc42a7e5c3ccf87f74848f8086857b1f 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 d4d56df1b1e6e01b81b82d27468d4b650463298f..fc4620b28b494ca1daecdf22a2cedec321c2a295 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 f765ca86e8a6fa0a21197f412b1466be50bcbffc..a23ce288e3c5e6e4459a8a500eef1ec5f08e7b3b 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 1223bdd06f48178f0b2eee8032d29c936634f328..50a9de0195abf28345df67c4220953d9fb531bfb 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 62a083e3653a5a31c5d1dc4be703f8f6319d9065..460e72c5e852371d0ada48222c0093b7aafb6ab3 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 d993beac0a2734e0ca4c8f3a5d39370cb93f867b..895199f10ed0494cfdd7ee690fdc3c3db68495fc 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 03ccffccef7d0cc77ff2f0b895ff571f94d93605..39d214a6e1319e5375b34823cb72dd28d07a7a5d 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 a597aafbc7f031ac5c72fcd61be7f48a9599af66..bc0201f371c5a675b5d94cd9ffdd38c5f5cd7d8f 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 7cdb6a555110c3c2500650af576b5784f1a27172..20feab872f6d991e2cac8bee367e4c4149a77dd1 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 f6beed97336bae36c0f488f28f360ac25381141a..f9c35f073e6080ab2f30e4f881367dd45cec6bd0 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 263fd7375f8f52a939d470a7b41d848f0696e648..90e43d56aa15c86a1f00ca333c865d36626ab2be 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 3feb2a97f55fc315dfe18fc1dad3555e04df0bd0..7c23e6583e8136bea4ee265c9c3ffb52411d1271 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 8361c546204d2eeff15bae2d9189fd631655d9b8..85861ae394afb2298f22b373fb9aaf31c50ad1c1 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 259f95f7b93158e2925f06bb839bba3ffb502079..23368faba684d628a16a3420a7f47dfa85312d0a 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 14237946a83a36bf606c2dfed23af377dfc31345..b812418fd6aacb54ab43df425e1c51cf670e6b0d 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 f9913bf0dd1f5a75613c5516587b979d90468227..bc0201f371c5a675b5d94cd9ffdd38c5f5cd7d8f 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 cae6c88fed72960bd034da0f6be78948ba35a811..a888499d85d942d58c94114cf7a6602677ee6e72 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 354757b66d9f9d7cf92c452a495fcfc7be9b1c33..00178524aef43b640ed97b429fe5e8a26a730d35 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 6cee67f66f70d81761d9ea925b19bfb45118d7f8..a888499d85d942d58c94114cf7a6602677ee6e72 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 d10ba2d1efb284b4bb75eb853243f608e6a8f19d..a6c48d7c19d2c09e90ad3152602aae5b7d3c416a 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 9541bcbd1be6e618b949c0efc24a0b9d3f3e64c5..807c1e5a086687e2ebd0db9fc2903b697b2772b4 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 1aeca779573b243add17fabb301afbea523f4353..3ade3bbfddedfba3b8798dc80f663eb2a45af1f0 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 4a0c3a56593ecddfe80233ab74e817057d28e04c..843220db55b6cfb93b9557445fd241474aa387e6 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 83684e57c44b7fd10574bcc20400632313494b98..5734ebb65872248c6f8d038cb95ceec062f48652 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 8abe45c5c0cc0f144284836e19a1799673a3c76c..5689c1bab158a19009fed1d1b70454b7c3be280b 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 475e48a1cc02d1eb38652be80d74955b90762f75..fc28c3de42b2e112285c921972268fd02f77b795 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 05b6391edae5a989f233893e046a716b2c8de906..bec7663b66b9133b6c2160d9384da90801d5b6b3 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 e35babe8f4e84f5c6b9a4d8ac91bb1adba7781b3..000a4abb2d8d8f47df718292b87a6661d2f1a87f 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 8f7619cdd3fc1aa593e39cd1b6ddc38536821b0a..b355148a94c14d78df0c69978a44a063f401a2bf 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 2bf1238452fed62d8bbc9e89d2317d8cd753cdca..befcb57d02b84a929d17a1dc8ec30d724c6f4aed 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 b6f5cf10588cd02e082c0d48925f87a413e11525..96880c05c03b98ad4251fac71ea17494d93d1059 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 27f272100af795893e3c5f3740c140565fc39462..08bc14d8551c52ae14c03ed6cd5f99bcf9eb7f53 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 7481ae79cda16cc7f2572c73fe40a506bd60ca38..e81f37593b807f6bd08b8f807fab5b9c63cd96fc 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 1eb9a3dba566f41960c83ae436cadcdc182cd8ad..f0d8062ecbacd6992a44813b13c1d69d32ea0c2b 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 997aeae66b5530831f2d546a185f04b80cbaa48f..cc79d690f73f0dd5f732463199f861bf6c6199f4 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 1425a3e5f2b516d709e2b2e72b19303622e6d956..30e44df94c4d059ae76598188b5474aab3af43d2 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 997aeae66b5530831f2d546a185f04b80cbaa48f..cc79d690f73f0dd5f732463199f861bf6c6199f4 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 6620d2af52dfbb6a40bf811c3503132db7d75f89..22667ba1874fbba15c009a0305fd30fd48141fe2 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 5c63b0d2f5adbd853eba75cb7c3d50d6826fb601..404a0d3731919b8e58b35e33915d3a4c7d146369 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 a8a0bfc56a0e3d39ad3f719f9787a69af48cb38c..487508d3071276ab60d6809ca7663b87bde148a8 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 b91a3ad79de5e5c8341e571564c65b8453994ea9..11caf270ae7dacb46d07177e85460558748fdfd4 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 1c93d3ab13e1c609cbc7b01068e6a4d438a119c2..9da22ec75cb34eb0102e60ce8cfa0052f555ea3d 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 3e975674d035b7515db70e924ab4e9556375bee4..026161c0d5b2ad49012396c3f88357d2fe09323d 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 352678f8530fff0ee233aebf4010756fe201c915..6545c4d72b415ff258cdadbbcb6579ef8d1c9ea9 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 5efeeb355d655e16d52a584cf24c7d43abbaa5ce..1bcdc8e8383dc7c0aeb6f24ef832fdf0d7de37ca 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 34590e930b0391b4a664e3fbe10c70b9f2fed435..5ec5c9a72c261d7aa8a08ef1d096d3e774212bcf 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 284ca97bd4aff4ad4480a123c25337761d177959..9910f1a4bd78a1a8327f60931ecee09c3ec6503c 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 2b04d58fb5980db1803c89a57f143b0cbb21f864..78b92961531cac3e744bec4c5fef04902652c4fe 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 54e9f74e4af7dbe9ba1978683edd8ed9316a95da..a36fe0541452b92166c7d181dbb86b38082d947e 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 123645b4c3616bf3f8a53f6e2c4926059ce0af79..91f2d03a29d87d327fe67922fa72bd18b9300aa7 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 06444163304bdae83032ea072608fe5459b896ac..cf35e60beca2cfb3d5b5120ee5267bc02a41a78a 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 030b997f486bf0c15ccf4c86531f16407d24cdf6..0559985b54617a9e4990aacb03e1df997d84eead 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 af7020f40f67acdba7bc2b56fc849692b59ba410..900ababa19f4aa35a60ba5d11826a1d76f1b9ff4 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 5648f2d3bd24831f9bc14c2a7405131421f2c767..24ba56e3e5ef257b86c00c884800eb91dc68e346 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 1e870c42a93fc7e631af1f98e48d9561ead9f36c..575d8d79346790f9bf8af84bd074413f71961edd 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 14861f2b880c44239c4e31ec8b719e9df4f4459c..f0762e15d2ea8816f627c0439c411d4f1222967d 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 207a796b1dab6264d98ac2066ab2f50bb9f4c57f..df659a93d2ac49534260eb59333f6898e58c5748 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 b9638e612bee301aad0a5a00796c9b60169195be..2e8c289ff7fe582c95228526adf5e6c300ea7bd0 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 58d74a625507d5ac712fedcc1ff0522fc87427fa..ba40cc3e1732b59b3b27f909f308b34a95207ea7 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 6b6168bf0e75b0d92903fc1a12b249ab9cc4b01a..deb001c4fb9d209bdf9f1607664c527ead1e2dfc 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 43456c90472b61e73e03fb6b28b110f50fb8ece6..7198616b30fd7b60270128cf15fbe2048a87c715 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 09cb7f1c7eb2b3faec8208e4a832c49910abe790..a39adb3c17788ab862e0039e7940270e63f9d594 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 fffa41da94c813a8a5044f5560345ccf12fb7988..7a3dd1e71f07d90006f987c2946aefa09135d4d8 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 c17847bd3da1c6240550b551421f64379f70a200..ee2b6e4d53d81b9d21107128973dd74a11885211 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 4721c88961199e6b77f9ef74ed269a1d657c60a8..254f3ad8be1660d9917e8ddc3557ff750c0754db 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 3bf8a5dfb697b1971eaf37a8a69235d720a25e4a..0512ee1946fc2dba4bb4f95ff40de087d4eb11b0 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 e336e4a0c3d42eaf4ea1e09f9a125596541999ea..4afaca6ca935c5dac2a6dc21e66b01b5ecce8b9a 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 32f94bf303bec3f617c789dd58eb108f4caa4428..7cd7ad43b264d072cf439b6417ff474ba18a97e9 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 ab8d970994e942c1a2b19aac4f5859a44c3e8214..86b52d3385a227f9a36d6c686d10392a0db670dd 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 7584d84f27e95d9a6ccfd6712120c7d3ba46d7a9..1dd551f8f2521462d293accb5afc9984726b230c 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 79fa72d7587eabc198bc6a4d01b132db1db2e5a0..8de6d490215602762c4056be1a205d3c3437d3c5 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 d0285dc3577663755f2c91ebc84c26bb783db424..237a62a7cd41d9d3a55a2fd8f353a9026c7bafc3 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 27f633d621e864eab235e833aadcb853d65b8daa..2eb366fd985f60dc3d1ec47f8e31f7aeee44239e 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 83653482210db89fcffe74b1c4ba1a84af2f2ae0..e05b53a962535c68c3ba33c7d9e11227a0d197f2 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 acfa7eb3eea5194669528acd6016d1e56e6d4b1c..7e31d9e4205c7df33718f700196b5bd10fd6bcb2 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 fdd93eae5da22ccd9cd473f517e8ce25aa6b3a72..78bed884e97377a4fddc9dc785b24b9e742ff6fc 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 a597aafbc7f031ac5c72fcd61be7f48a9599af66..72a106ba1e3812f50313eada854d2a38168ee12f 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 6772c7f35a68bea870f0fc61b876e592e1eabfc7..df44bd78a00cb98d73c61c3c11f632a957d458fe 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 d44f3d2f0152d28e45870670219375fe9dfdcb57..cf0c1af3e3004e16edf4a83ab96e6b6b412639e2 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 9cfe6f99e0fb78970bde877c50ff31d2419e14b0..4f4239890e687364ffebadc20642b1d91806d7e6 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 53ea250a164143c1ffaa76a583187ac9520f1dae..32f8d8e623044f86f0d46e8641b2a4858db9e82d 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 7593aeab113c5349e6e8f5bedbb31feb27842986..4d1cdd3d936140d1c1e75f5d73bc51fc174415f8 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 340f8016c268e338d05d5f49fc660ee66fa439fe..0000000000000000000000000000000000000000 --- 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 d14a833f121a1050f2bc68d2357169952d4a8e75..0000000000000000000000000000000000000000 --- 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 e6fa770876af23c89051ef64da345fa6db8fd9d2..0000000000000000000000000000000000000000 --- 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 77a4ab413d68ef196ec25bb1777c13d968c1c15d..0000000000000000000000000000000000000000 --- 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 9972bdfff7b295d03e939b29996330d22c832a4e..0000000000000000000000000000000000000000 --- 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 087a67d2136b2dcc3ca9580c4af54021e0244e17..0000000000000000000000000000000000000000 --- 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 f8879e9ab5ad6e36b54629ac608b80d75e073c04..0000000000000000000000000000000000000000 --- 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 a73e90e27d2b8a60824ae9340699c709be1add04..0000000000000000000000000000000000000000 --- 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 23547aa0c5289ce28df987d796153421b277c0e8..0000000000000000000000000000000000000000 --- 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 4ce2e001eaab52b06b6368812abbcf33685c4698..9544389ab3c60451be7a8b837dfcda4342dacd0a 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 43f0c24cb535928cd2280c59b22338245ddebd46..23e78b6bf53eb3f46611587e4db282a4df642271 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 41ca9e9b573647baf223ed5feaaa2cb587a0d42b..8191b8b00dd9e3e3c257ec8b415155a9acd19cab 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 01b25c79aaa51b51a00841f8fe98dedfa0a4da36..b3d092f10260d0a9dc8ebb485610e11a4de09c5f 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 012600720f321864e9266ee983c514403b1d4d2a..220589ea78c3b43207a37fabed900a0b28105d82 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 246a36fcc6048e1d4ad3abf2def1504a769c1bb4..99d7de9b956e6b0d68f8632e0d14d2d0d3898c8f 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 d1016e9d4d6e35d72cd165e646024082664c9243..c5c3ac8e97bb5980b333082baa9f7dbc79583c2f 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 27b70cae0a7d3fd5c02368e001ad81a0c135c2dc..fefdc6b780092e4e66c010fbc351fcadfb2ddca4 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 708cda72141919597a63a65cda05a34bc777376e..f487a13e548b6559fbdf9f222c7b3ab05f511703 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 88625658635aad84f541d7f9cb1adcdff85fac08..980dabb8d255587ec3ca509541c29a2af0a4c924 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 1982b4f24280015e0d274e271cdea1b1123730fc..ce074ccc54785fd8f1c6b5757430f512cb55fcd5 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 1d984aa9b559049112c465682139fcf44dcd7daf..09f921715f8800ff67d30ccbc37aad25593fe4e7 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 544a1169210c0440292739b835d4c1b8d4cce1bf..e4d0833ba0ae53721edea36a19bcedc565e1b1e3 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 cd09f8d5b764d65350fb4fb0dec1645a8455b374..c1b5ad47e8df7dbf9c9e804f6bbbee0aa86f6372 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 c45c48b35e6e6ccd94711ebb35780ba859d17259..8c80f0cf2177d95c9605846d9cb043d7f7a271da 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 240bf953ba50f36955bf829a38a84d2bf8408f6e..3235acdec90c12b0c1839f50f391c4fa4cf84781 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 360f03b39c58b0c7668b564e8899a8f607063c18..3cf944ea4ca8d685d35e43cd79f54d9afa521015 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 d7446846b06e6d87e4aae4afaf351985b0262565..a3e31c2203c10abcdb466204b074868fd381506c 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 e8d5f431a03fea3c976e54db8cdde351a8d12a86..731c6ea6b51d5bb954079c6e8b4995cd8a611d0d 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 27b70cae0a7d3fd5c02368e001ad81a0c135c2dc..cacf4eb319a85cd282e991dfd53d84b11a8889c1 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 c66f88373914dded1d7e4316cc34970971bd2959..dde81571e73fb2b7d1a8fc800f66fed6d070da36 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 e4ea36c3cf0975c2a0bb388629d71353a3abf262..9778b15c09da197c25fef02b86cd13e6b2dcecde 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 18fa6a61ef6cf6294c2eb905c28a165af914e3ca..4f2a30fb5f40539e52e5a4298213dd60168ad95c 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 41d3c8b6a542667a177e1acfc88024c4ec6ae602..0000000000000000000000000000000000000000 --- 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 60692ce6739d543330594fac6880c1dd8a686000..0000000000000000000000000000000000000000 --- 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 95222a4a7ab757c3dd7af191d1abfe7a1bfce6fb..0000000000000000000000000000000000000000 --- 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 a5b0bb57772c85ec65b7f1d736acf7b9ad5ab275..c719bbebe0a1f34ea43525b571b58bea89c7d527 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 c2b07c70247b621c7c6b968856a751fe4bdd8c4d..3facebbe19894fa1896655542d5a5b41465f56bd 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 b0dbd4000feaee878d6483436595eccfa52bcdb2..89eb06d829f180c11f7ab75f99b9e7addce354ba 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 925b3f211ec7b3dcbc1b1ee91935f25bad2a9fd1..c0ea041c37ab36a1552f123a0b0ac6ae59d9acac 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 40cee9b5f3d71b634eb43aeb037209120068b247..93c7e16ac1f468ad1a8cfea9eca0aee2cfa2d63b 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 97ecb28ec423f03c9f3345b7d918484c997fb3fa..92b7aa226e56acefae494678a592690893fbdcc9 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 38ba5f90fdc04aff5b6948f8485d5057353f282d..0a9cdfe58b810af67c363ce2b74148318389c9ba 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 c4107f1050164b4542b63b0b355b78efa52585aa..2f6e9f1dd3571823ef23f012b6b18d42c22daf13 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 55388cb598c30149d14949824d54bf6dc2b4257f..1d4b638c6a8b74f80067076e0870e877f4c28bb5 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 0000000000000000000000000000000000000000..b7430341b2d0d7a0540d6824e301ee88fc8ff0fd --- /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 bf0532e03ae92b55893677b668a47179ceb3876f..d8cacd876b31404d34927c41bd30aa014ae5a1fb 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 533d8992bc9f585803994390294ac814e3f0ccbc..0019bd281fa11d87cb06c6158e1212a105439e26 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 0000000000000000000000000000000000000000..a6dbee759f072549ab4483e9cbc3fe9e48114fb1 --- /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 0000000000000000000000000000000000000000..18d5c98281b1fafebc71dbe6d7e232445f65414c --- /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 0000000000000000000000000000000000000000..5b25fe8d8e63366d7233af15438efc66379c7183 --- /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 0000000000000000000000000000000000000000..b62cfa2e95ec435399aa6ef0acf90a14dc620cf0 --- /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 17bc210959fe987753d0437a6480e29a733ecea3..5722cee54e88064bceebbb4f56a89404dd989583 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 65405445628d270328547a7cebc3182cae43f90f..02e87c7a776e08424112330dc5db2a793334a28c 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 cbbd7869befd12b7b5ba42fb4ca4b6e8758dd45b..f1af5d9185c405bad552259665c45dc95cdfdd26 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 c4d54b83b27ac464334a64549ee08885b3125287..36b6ce879680cc5fee1e98d7f7c00c3412fc87e0 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 3d17d955a69fbbe51a4259320679d6f0a6ad8ac8..47fb9153185cd3ec0ab3ea2c7943162f2b80e7c6 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 e6470981e61bb9be81b4fd6a6ab1d2baa9e22c25..27306f29c55f9f88ae0cc8c23d6faa74fa624e15 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 ad4bc5fd8b45504c9bcd7dd86ef59b6e8c676f80..0799e9dd7894e8c7e87315442b6273ecbe15d00d 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 b128e562e8f9c983bdf4ee2f9df31966c19749c3..ff6c5e9f262eb9b8235940abf60059514b20007b 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 f90c8d90f31f24418698cb41d9a3c4c12b99da0d..7385c39df26863cf138699ae5fa8b7a7189c8ce8 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 490bec5c7126135d20b66f4e361f860a9b92996a..caef418099040691bae3523120a80e636262c6d7 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 bed019f4bd2bdd38d1e574e07ae7a01d761f89e8..4df0d438206365097248e7e2c77bb02b23e76009 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 ca3f232992d2101e7876768bb09b442b055039a0..8eab801324967faa7013e0d199d979aecfbf75f4 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 db7dcf0c9fc1ecd64572cff16cb68e64b7e4ae5c..8a3187abcd1c7358e4296f2c8f4f115020232bf6 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 e3d00dea6948fb24849a884675474868b14aadbd..646fbed6620ef1eaac5cde7bd8dc0a730e5e2621 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 79a1da68ef53fdccc1856a46d6e1e5dab9333971..a6313f71ae7d944429b22249d5e6191cee200f86 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 9f0f1a3367f1736d68b7026be9c0eb718640d13e..4ebd0c1803723ec28d029b9a40c40b0f19392877 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 740183e35902541cc29b212efcd879cdf71266ce..fc816b3d67c016e0d67cd27a2b21bccda0626501 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 dff61c398961dc90fa1aef79eb2216f0983c1216..d304e598eee578ec49c12f5b21976f5970a25af0 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 ac17f3c330d4a95b97000af33b29088e1eb91a31..862abc1852239d0d313dd4b7e5ed0277c5465f1c 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 19f8a971a582d1297917eb069a9c53818e3733e4..e610afc80e9418d1c05366b67821ca78efc04900 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 bbfe48c631e08ac80bafaa5f26f765100ea890cd..8c332402e920c329ef223d37b4701bcb337d6da1 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 16b69874f0eb13caf7404530ea06f50ec95e2ae3..98a5a05f5e75c94032da7d005f00f69c67dba5ae 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 5a43d7773e49362c8ec429a1d7a6f0c97db792ba..2626bafc37d9acafd5c46565433cca22e1cef6c1 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 dcf694ad1ab6eaa115a7c17308e51594e177d675..90d2236005691bcda5e309cc602d7b304826703c 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 0500caec6b3f773ebbe45cd6cf99d554f88a8042..f44ee6b8cf13c048843de3e88f813883a16334a9 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 2efdccde5e1f2fa37b09ab2ead23c80902639058..bc5f23ced42ce5e5df4f6c04c94641bba4593848 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 a33ce4e472977a06f7d3f9c040629208a4b001b5..1524f6c0b4e0900bf0e29e8ec000fa4da5f6606d 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 0000000000000000000000000000000000000000..ae0b0cb5977a201f4cd233b4d2527022630a13ee --- /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 a62cd0806edd69365a1137a76c7b4c9f293e6e04..7725dee9717de05d7a2a9bacfa98d1a09a542d12 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 054dee8884593e0e0bc0b35b6918a235e443662a..ad86b169aa2b463555d94d187d9d3c06e4a9b147 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 ce93b0d59150d569984afc8580dca659820359fd..447af12fff9882a722dbe560593a3cb4d2fbd2a7 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 c0d4af42a565a8574420b027b9c41c829106716c..eb9d8bfb06a4ce1f7151cd7879fee47b713fc27e 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 4b3ca65c16bf001f753def92d83733e5a85a32f9..4d4d5729bdcf6809883f8577b7183f58d71136dc 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 617607373e87e22888f7533f2e93154cc0b03f8c..acb769c06fef078788163617e7e8a5f679ed3140 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 0000000000000000000000000000000000000000..f6ba580c0f730774cbd254d04b5a611b69fb8c58 --- /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 6aec3ee060b2b0fefd43f8bbc19af8571af09963..e7cc38118b579c3547ae35bba47f2af45081a603 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 f9751dc542e29c5416e6e5f8f5091e83ca4c37f7..2e5547351f1a35a65c933524b4b2c24385aa5160 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 c23bc4b0b21a890f6cfecef2bc50dc907c19a0f6..aa7e9457dc4aa226e630ee555ef80d1503fbcc52 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 30e590cad7d1b39b9e6bc4323851445c46adebb0..4041e045210c7594d3ecb66252f5980e73f932f9 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 4065ab267ef7708dc6dc3c466c12742f0ab3cbe1..30f7de7b5916067fec837a30fda8616ca1188bb9 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 9367a766efc2873b28377d633990296927fbc99d..411244cc7fd5f757881f056ef491d3442f3e3ae9 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 12a05b4feff001aed5771f4722696c31c9ed0ce3..cef1ad5bf314fc1686974a7ef567fdca94c61e81 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 a7dcac84c2cfdd5b1143b5e24f8fb9d1fed369ce..40faf67621d35e9971fef5d9dfae240c72840362 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 5b4c77477cd74b47308303df2c2e74dfabbe411f..65880a8a825a75b3b0f25b3418b68660a4a09686 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 c9d664ce0d450cc230c14bc2aa0711e1feb483c4..206abb09b25678dcce940674f7dd817472e4d2f4 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 12cbbfcd8ec255cd27cbdddc8c60ff7eebfd8ba5..1dd886498286cc9cadc2e9f5e28e3d633e7d5daa 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 caaa4f2d84a2a7e1546ed8e4453985d3a6b34a0c..1d32e4aaadce15916523f37bd9ad7d27f4326367 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 c24937c520df24fc85411f82ea822b6cd912901d..fa2652446bc3aa3b134d31ad1e427a48bc316664 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 b5d92d94213bf082563950c12931f3b31ebb88ba..d99d16102642a9c99bd4aefd4ca2b4676c7de01d 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 19ae103d79f9b64cb618fb4c43d06fdfa34c07b8..c2df8e4a94ef8bf7778d6e5a3a2b43bdbfe1f883 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 a0a8cde8e7183873ac41c7ceffa33c0dc2707684..e4e8fdafa061a35310a75290979158f9c3aae241 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 90b21921b7913b92f20be0977aeb6350280167e9..46bf81176f4cd8088e5545b78582573082d2cca8 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 3e60bffec7a0f0f41d907a97fe3aff10ddb501aa..a519333622381574dd1dd5c5431555d02c34cddf 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 6b1080d2a575c836965b434d80ee95b49bda3f0b..b6936b49c2e234cdd634bcb3a63a79f4648b92c1 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 0000000000000000000000000000000000000000..51cb377b02b22b3a5e544744e1e0f8efdb9e736c --- /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 8394f986e97f5f55f56c790d4c201178d32ea74c..12a95d07f6b68099da3b1dd62e898cc6191aa45d 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 f2c091305c1be0564424c7ce8b61a7146876b9b2..a0b6b732cff17c91939f8590d9cb1df452543c0b 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 b7e8231ca34ae7a738e338a0a877c01f2cc78e5c..a32ce3b4afe0b2434ff60f8d83f3b1f260a58a68 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 65a14ce357e19f66487533ac4be37cd154ded3ae..0b45136b895d539379dc3cb475b863a28bfa85d9 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 5883278c66c0b9d6fc32b809762cfca788ddd792..20c71af7bfba80b890d37c6bc9c4f1d703aa0d0d 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 10d51669b74a54d733ee86d458adb7f5b386f07d..9037328e6951d4d652a73f139e9bba52c598a9a2 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 c6b20e54f859c6c542d73701f226ad7e6017522a..7d62a6259675466a970ac15e56271f32fcf6c5cd 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 dc9e1f6b5772ca915fd01783360e365fe6f6da62..9393e0237a35b0093144b29c3286da7be321760b 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 8b5ad858d09f820a2f2fe812456e3f6eb0697825..5ad4914970ad5a9091baabac901714d22ce1dc4c 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 04b0fcde02047d319f5aedc7978ddcb2334a76c5..4d1fdc33fe4fe07ab07bb6895e5e8aa9934c0311 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 f311165ebebf148eb589f0664ec68b2788147826..46051f0a671597e0e611443fb4b13c5929d1ffac 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 f4064c4efa8d4b7845131d9d9b8ea8e5c4ea5dc3..b4a9005ff044f6eed3a3fa928b18e6ea633eee77 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 946f45d0762a167f5c0e26d852e339e728599424..72818e7f3cb4c5b468198a7196bc5f55e4b5e744 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 361c6f4b75b173d48b07e8d7409ed529ca8c054d..c97c42fdbd8f10e2d0e6fb09504814790c3482c3 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 35af8e7428ac1cd98aab63ed07bc78924b0e42fa..a09689d068120788e91cd97b0ee755884f49e124 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 d39949c9d8c270dbc073cb80632b8939e4441082..7ebabf307275e407c7b7b9fee65e7e818e2991e5 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 1633180836d69bc92d2b1ff73fe7af71bf72ec7b..25539ac161b23f7ef1efac6ad83ef46e848bac48 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 836deaaa466a13a252c1c48cf942de7e450719c2..fb4ee56c3230b5489091e99367f56008059fb69a 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 11ab976a8a82c848aa9a2705bf9c90b6e9a0231f..c3586574bf79989502fb247006c444959bbaf6cb 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 e7c459b888c77d5b4a69fa00b3db8c17cb2d7016..301638dd5f5ea6a74ec1278bc0ca3eb055bc7c3e 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 0274a192f9db2ed4030395a46e297a4116fdeb19..4f1bf55b141fffac2cf7ecbac1c5e13768844b72 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 5a8ff1c3fb0c3e514c3740f228c1988d38dfcc5d..a685bd5e534ab4a0a3c324446ec0ba623c186f11 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 c84ae74c3b13298eca1f63c441955fda7c069e88..35aea4620add75e1abc292ce238367c5f2915426 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 9d90e7c6922520cb8163891cacbb447968dd46f1..d2b9f762b4a2589ed6c8f1038945ccb4783112d5 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 d8840ff1a88917515b94af312c86713ae4beee1e..3cb8b77420241ee7fd192e0c0fe85c335416778f 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 cdacbc669041ac4a2777474f9372d6589c4e7c28..4767c400ce435e32ff3d19a3c1bf650775ac4e77 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 f6abbe7e1278b6dc990312b9788f4fbb33ca4671..d0238d8dfd9e126037961c1a86a0528888819f5c 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 9e4e574719852b3e81adb9c04352b4e0ac5b418e..6c277bf7eb859f614bc5f641d94df125511326c4 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 05df8af5520d50a02464d160649869c24281865f..8fd626654728db6006e53f642c56d2bad2861cc6 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 07a5ad6febb12a5e3e35270769908ad697ccb091..843f1076a62df4a3320f2ee2058e4199cb474ef3 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 e80d0948447aa8af403475977d32b509e0573bb6..bae48b7a82c62e0cfb823a929cb3aaf7de670b9a 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 16fbd8b519f3fbe3827ea7469a63058c1571bf59..eef7c42d89a63f57049821943a5b7fcc7063b76e 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 35cf23f686ac0719d12edbbbe2ec22bde6c0ec0e..b0338981ee638e0497792ac6ea2ce4188bc6684b 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 217f86e9dec3aa377d76efa2b1b8f687de0589e9..81feca5793ce5843adbeb7fa6f75eb4b339b6eab 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 a344ee920771cb1f1fb2f9765de8f3018ec40215..186970ca6137e643fce28ebb4cb1676d01cbc66a 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 5421384e2721ed6442f716c94fd59b2c0cbd89b0..addcb635a4c1dfebf0dd5bf7154b411d517133c0 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 0000000000000000000000000000000000000000..f0a8c60ac10953de4c4139289a5be2919a2c8a66 --- /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 f5753ebfcc0d6b89f7a7a90afa42528e048987e5..4c512487a3fee7c5015f41307990af99dc4af588 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 eade16f384f5f699c3d2d1b94cd9019330e6436a..f96cdc6a161717a012501eaf5b04df38f478592d 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 036d319130424569a5962181d84c1599cc87a3cd..2bfaf6089a18c4418f51e9c5a69f0471b8226d09 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 b3d1c98f10b45978fd63e8b4d9bf9e23f89843cd..2a58c71e3588f4473d817b5aa724a84df9bb0dbb 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 6a2a307da2ece00271dece0f1eceeabc4600771a..b525666a798f6cd3aa24c3aacee9dd992fd0ccb2 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 47c070ccbbb3031b57798efe95fca351b57cf371..0dffeeaa325979c841f6db4f2d139bfb80fc7440 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 0000000000000000000000000000000000000000..61addc591d8178002fd71f0f93bfbbaf44098719 --- /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 dd6fee6f1b6693b0afde457a8b9d9cb2056c88cf..8b67ea50fc190134d20d64c1a1796864643cad8b 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 ada33eb5ff487ac4ce1f56005b968cbe138313b2..9dfd900c650d85de7d2e9e17b15cc177441e12f9 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 51acd76873ce3ca1105697dc8fb975ca79309bcb..7ecd22b2b28d6af969424b0a38e08ba59cacccea 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 0000000000000000000000000000000000000000..c07e677155f09633d1e4195b03e37c9e5ff73b79 --- /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 554ad12d329b775933b273e3e28c258772bf0f1a..b09a325d7b47f3fd7101d98878675d8cd83e0d06 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 1c6ff3fcff096ccba37cdc553dc83621f6f442b9..0ec40850460bcf724c75fb6d8977244bf4e06d07 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 50641ee0e56e028a7f381e24b54bc6110e67526e..21e6e7bb22f89a28a6fee4e078d504b09c53681e 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 d621d8884506bf9dfd4d8a54ca15e4bfe3d9d837..9b04284c0e6137e4e2551d59f711d6535c4c8ce8 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 f18ce28dba99cd9947a1124af7ed8a66168988ee..bc020fed3886d3072a5e5ef01e5c368dc234db03 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 3980ad27e045ab98a11a1a40c2a0cba4efb5e972..de2404ab13af927805351a14d40300deb6c22a44 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 7463fce17e3c3bb0427b2c4cfabd36645a6591a8..cc95eca33a7b51154362be057df5c6febcb3c217 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 0966e506076e3806813d2c7a286c276b3c8d339b..652b6e07bce55ebacc81ab4624de2f66d2afd173 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 b2f7245ccbd78c9196d2e4df937bc0458ee76d35..ea93312fa6fa66c396b6adf255d94a02d2464fad 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 1b8ed898ffeafe857bb7011423b3092fac708bbe..ce40a41ae691c1f6e9cae4139e2913cf3995bdd2 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 af1c1d0031c23a88bc3194b81c4f3948758d87b3..f37b906a2296c7c8392aec79f9434be86f315e25 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 b0f1a3152fec36918bbd58a36e7f3abc361d85f0..a5ea71e0e900ae8648bf6faba147e9b07efb0126 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 153518ff166ca0ddfbcb796335cc8d217a982405..dcaf5882a5e86c10211ba9b222f73c1a05dffd9a 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 0000000000000000000000000000000000000000..345e69d2a3c09f9c6e631e0f90050c2cddce6513 --- /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 ea8d4b2665b86e217fa40874bb5496c426cf6155..9c27cc4c81d73dd8c3bb24342c0a7474de0d3288 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 1b98457bf7fd83adfb30e5cca3e49e73627f6b14..5ad9a350a7c3b61c62047a60eab19a1c1c9a50dc 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 d8070248e95352100b0bcfc6876f5cbc48d75447..ec92c7ba1c7e032be78f5e5372531d8c87b2c29e 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 eac733d49d9ebb909022a0efeee57ef275ba95bd..b9528cd4a5860011d9fccbf926fb1f120d895451 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 260d4eb0ad8a890b86a7612772a717d6eee5e269..07988089d2622774221cbb86373af51345d3b0fe 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 0000000000000000000000000000000000000000..1ac59915cfd62917f541e7a50e549f8804bd7dea --- /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 f715bd0f129a3d473b8a1b5a60f13af8f1ee8888..0a8f0e85634cc8ef4031f29a77fddce123e2b3df 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 0000000000000000000000000000000000000000..c24ac4d6c5e3410ab77166211b5acbb35dd5481b --- /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 7905934184cbc4426036020ae305c88ea10d2b5a..da8a24a055022a386ecf5323b721c521a1d2343c 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 bc09825f9c9dc16995f4af1bb3cbd845ecf608f1..e2177bb72aaf644042f3cb5513130af284a29f70 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 739af7388e3ec6bdf896fb637ca17e6cadd0b78f..91eab7254d848bea1b925767fc10f35956e86781 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 307d2410c5462d933e7079c52757c331d6be28c1..85b0f21b8635510981709489e45f122ff7fb014f 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 29d5e7e6a55c726a536866827d92294c26fb6ab2..daf8e6d2e2bf9bea82617cfc51c16dfc26419af4 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 6d5a1ffd92aad2bb5e9f40cc21164301bbe8b48e..7ca8a5107483ee900271bfe9cada3aae44a8f36f 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 3f887c8de654ef1ab203b908fc24deaf0333722c..f46072820d97c3b79a197f7901d58f52087cd241 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 d4edb59316eb843afdbe098ff885705cd0686985..124084c0575dfd4a0fb89d7c272c891ca1ea1fd6 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 cf96fa0433e59eacc29da07a3d32a5dd1d83577e..a9fc1e279635d7f70d5d44d5e68d73e7cfab4e26 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 1f00dde890ba7331a47146d71578cb32fcdd2cf3..66d1baabaf6bc6311ac6e9e2c9327c1061f2ff66 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 3aed62832021c744a1594fa626b740095a2136ad..d3d76c7b62402b5cd02c6e4ba2c20f9ef5c01226 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 c5dcfccdabf8f71138daef1528e75a5b29802bf0..66e977a0ac6eaa109c6e206e07e281b26e2ddbeb 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 43b1b36693df14be737ee7c51f350e3b1ce02699..80aa0221310db50aa49241003a57069794f571d0 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 0000000000000000000000000000000000000000..e479250d9ada61fd77fb25ba57ed69969101c484 --- /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 0000000000000000000000000000000000000000..c9434117d226e9b2cdf4a7869b5b6fae2e338cca --- /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 53757f8141d0733e92dbba76c37256230739e478..0c93d981becd575ecf55e28e854c663ef1af788e 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 0f4bce678d29379fa73271eec50a1befaf1fcb21..a67fc62000f2cb6b3c4076dcd86ae4e0ed755d2d 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 b959d7f75b7486ae5f2b40235051c2446672c03f..98a31411af63aaf17d09ffbb41c5b1433d95ac2b 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 817f57e50f9f78025aaab219969645dabf4a4ece..174734fa2ad74d0fd761cee0dcbccc210b8e1645 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 552a6caab7041b51349ba13c91289d7571a5ebc4..e99b06152170d9372d6b0b76f543bdb531efe246 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 24bdf4927bd9e219b420f1605e024ea6c0f115dc..151ad7037a9b3c66e7850077129143d6960276f6 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 847964c3e03fa49625cbe4df440ae19cf019e98e..5ffc645e8216bfea557cf974185a61c33cc35d6a 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 d8f37f8a9ae6a44b81fc587afd70f3973ecc2149..6d8dc12b2a95756035aefe1d5eec8e6b71c2aecc 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 b387a99ea7a6bf0fdef4c2540a579913f9115414..221c687a60969d9ebbb2419941ad1ded24680d09 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 adde0740a02db512191094e0221e17b20886630c..c655faa3650b515d37dc517ffcab18f307adff02 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 d3a8ca8aed6d12e1203266485afd219c32f3ab22..935b357188daf88b2629ab6b7452aaa4a38d9c22 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 0238727ccd3a70f7b9d8fc7b1a8d9238d1567ff1..76e4aeb7d601236d569733933c368aec8f440b3f 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 0b1419c5a393a041cfb3cc38af7a79e7b798061c..f9702b6d1d13c638d0a4dc236cef50cb59fed577 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 7b96cb00808a365487f72e1553438e0947d48256..811fe0951adf34b7b42c304c5da5409d819a428e 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 b01d3b49c74abcd35443a2af49e3da543528d466..cb314e5af977735ba968358ac3494a482000438f 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 58ffe6b460953c5901fd1ba62d164e76f3fc432f..02641346151c75c151d3f578385609345abd3cae 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 79e3796baab586c438f6ca388fdefb3ff016ef06..4618b228d9970e0043c5171b4224ed028f1def9d 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 5952c6b6cb5f66e783d7dddeaccce7bdf5f89f25..3dd0b12484513d88fbb2556e0acb3aa2ed511e1b 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 539e14b309343321dc0fa11d8a83a011baf275e6..fa8cfdcfc6b0d2fd28f9208d266eba8287d57b5f 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 c642e5e694770793cc6e070efb8c4abd03d16db6..23063d1548b2253567b17ada7dbaa241bb4241a0 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 0b5490616803b38a79142425e82f11329a432f09..3f2c2ebad4d0195527db11b95462b4dee2e421d7 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 a561f6ca133c860f693faf625fb0125f1f7d8b34..d7868cbb8ac3bfab9578bc20bd35ce67afc83be3 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 6d288fcfc00bff8e1591ecca5ec976d9c08a8fda..a0683b4a1a5d1108337e7e6f1f58347c9897f8b0 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 4428388604b3258d552d40923c141253c15ed524..d65dc92fbeef610d459fcdea69b24181f308b0d7 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 3d89600cfa4782d2e12e33f32445a9b6c7c771d3..3fbbb8fb07f742aacdeabba11fd5e9fe235e7d80 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 00647d1494b2d1741ddc29cb602c939f15a3d016..393d890d2aa96c292227a6a85b67ffe56bcc87ac 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 68125069acb6e9494ad366d00e3c20130a675f1c..12c8349a3e58663fd28bc3fc178ed875086e4362 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 8a73cd47d593739964a43a45af51255d6746311b..7c3cdd696ef61998e657958e7ba1c310d8fdf51a 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 ea55cd87d2330db73e974c58ab311bac38e1dcae..e877774c16d3e1f3008a262fbd5328f027d71e96 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 9f0fe9a60c1eeb3ba2ea0b458034a078fde7a61d..fd01b6497512258b5d6c67a55a69e093a9e6b186 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 7f59d752485a880d45a01be74eb3d3a410eaaace..75d130d3498d9c8eaa841ca7fdb29d25a41a369f 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 a346c249b48e2a9749ff749786d924441b997d0d..ce912009504a2fe730cc6c2a62f811515dd55cff 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 6f150005fd893f833d29b84062e970aec952be17..01e50d24ace6fd6cfe0d46f1ad67d3a5bcbc9a68 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 e894e6d69c740b31365f7bfd0f947f7b874ecc93..ca490a0744af3e34986bdf8af043127a3a577fff 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 fb2d123496b45f83f66ebd6b101fe04a1dc4d541..e6eb83bc9db59c7ea77509ca8fc1948424117d11 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 ee912e61830daad2b5dee8d384d4d5681023a4d4..2b6727b91f3df9304d541007f1bf3687c73ebc16 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 7e7a2a99f84c1d5b275f8946f0a5481050c48067..9eb4c5e191c44fc2a2f7e88a8d6dcc931850f3eb 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 7e69974761a890a01946b6ac504a1bfcd28513d6..bc36cf7dce51b877a41da03e5d8a31b58e375945 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 5fec22dc9aa4bf226fb435343a469c7f3aa9bb3b..2c3403ed2d5fd9e67b9a6beddcb6a9deb15b0b96 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 dda7e94287488d16e8ced1668805f5ba3e54d4f4..3910a4f37fada44ede1068e313281934a131dc8f 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 baf20aeba98c0ea2974eecc4cd65556f4c87de35..a36766ade86484f3cd28d0a3face4ce87bdfe759 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 e84b5a226f918d6d4aa6e887b8c6056ec1a5484f..fa1505700bc293536e6460e8073bff003d70cf5a 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 a97eb1b4f6d7d2ce1da8750d96be4712c44983be..e03bbb7973b0edd39b4826de161622b30b50619a 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 ffe602dc4bd0b1db8dff2b7f651efe7d0e277475..ea76fb2426f58377504746de9553873055dc2df6 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 33e3b31c816d19cb20215538daedbec43b85f1c7..b46543a40003e99e509400f4e465b425658876a6 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 bda645c0f3751ea27a8fc04d791a52f5f5acc006..511e871bf199b5ec0538700ce4e1361a12d09ea4 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 f639ffce97224dd257d06bd25eef0c5cb02b7d1c..c92082dae7595d1eefc2f9e2343482213fa507e6 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 3136307fe91c020ea01c144c3edeeab09dfbe8cd..b8e73cf2c74268bd8b94f3ff6628be89a4947b65 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 07068363816d21158bde34dbc5380d3573f9dd3f..d897968d129e8d413cf63fda0bf7295de45b5037 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 3a95797baf906b3e9607fd86b93ac11cd01ccc74..0000000000000000000000000000000000000000 --- 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 a209819d1692cf6b7fc0aff02b5c1adc742c93c3..0000000000000000000000000000000000000000 --- 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 5a8ff1c3fb0c3e514c3740f228c1988d38dfcc5d..0000000000000000000000000000000000000000 --- 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 c84ae74c3b13298eca1f63c441955fda7c069e88..0000000000000000000000000000000000000000 --- 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 b150cc49969bf7d1649fe00d9687a869d85ae6ff..0000000000000000000000000000000000000000 --- 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 6ef95061d10ec29a7c980f2464f3ec02fdb494cc..0000000000000000000000000000000000000000 --- 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 a66e32fe576fb4081c41d1a157d0f16820ac0255..0000000000000000000000000000000000000000 --- 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 d8840ff1a88917515b94af312c86713ae4beee1e..0000000000000000000000000000000000000000 --- 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 0e5e2820dd0eb9e20e0abe6401d4be3e4f94d515..0000000000000000000000000000000000000000 --- 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 f6abbe7e1278b6dc990312b9788f4fbb33ca4671..0000000000000000000000000000000000000000 --- 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 e4bf785fb08ccfc8148bc1a2a712e553b2cf645d..0000000000000000000000000000000000000000 --- 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 05df8af5520d50a02464d160649869c24281865f..0000000000000000000000000000000000000000 --- 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 1b28e85a0e75b7149dd4b01b097e8a00cc906589..0000000000000000000000000000000000000000 --- 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 e80d0948447aa8af403475977d32b509e0573bb6..0000000000000000000000000000000000000000 --- 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 16fbd8b519f3fbe3827ea7469a63058c1571bf59..0000000000000000000000000000000000000000 --- 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 0414535108d96c313109b89c530ea432866bdb36..0000000000000000000000000000000000000000 --- 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 410ada0682c915cf404956627a179717c74d446e..0000000000000000000000000000000000000000 --- 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 864b819f321ec688ee188c35af0e79c72816257a..0000000000000000000000000000000000000000 --- 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 6d158a43206809a3fc1d34da26c8dc3a71458785..0000000000000000000000000000000000000000 --- 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 08ce6197c6543cd4a14c4fc32790b4475091290b..0000000000000000000000000000000000000000 --- 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 aac332e3a5bec276bb7f1bb960c28a2709c444c5..0000000000000000000000000000000000000000 --- 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 24db120ffa99b37c454e06e473b8780f30c29ffc..0000000000000000000000000000000000000000 --- 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 bb7ad27eec484c428cd6c1e654b919d4a323e78d..0000000000000000000000000000000000000000 --- 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 d3140fddcc63a7786d352531d3af885e1f6d4575..0000000000000000000000000000000000000000 --- 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 f14af21b21c48bf5006488bb8027a4182159b524..0000000000000000000000000000000000000000 --- 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 ec2033465e94f6513a6c59037a27e52f249a35ec..0000000000000000000000000000000000000000 --- 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 74873f49e56f6f19332bf5df5a257488ac54d5dc..0000000000000000000000000000000000000000 --- 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 e9deb3208edc0f55672c0c3afdda65716e28fe23..0000000000000000000000000000000000000000 --- 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 6d724be63a44c6f6484966f775e315a13991a16d..0000000000000000000000000000000000000000 --- 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 f84c00f5d3ebd4d3abb4da65e0ac5eaad69f2aa2..0000000000000000000000000000000000000000 --- 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 d6ceef8489e2741f91ea97621f1d6e08b0afa9f9..0000000000000000000000000000000000000000 --- 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 d4af6e5e2a7149f6a36a8409bf824d2454c0b916..0000000000000000000000000000000000000000 --- 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 f643e2c4b0aecf83140948f696f00d634e7a52cc..0000000000000000000000000000000000000000 --- 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 44eef6da8f164f0ee14c566fbedb3bdf4445c412..0000000000000000000000000000000000000000 --- 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 0a338e29068848fdbeb30263ed5f5dc7bdb536cb..0000000000000000000000000000000000000000 --- 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 5b4cc39fca2cbf0a7978c2c5da9045be3b0b57da..0000000000000000000000000000000000000000 --- 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 ac8c52e36ad9580d7ea04cc09555476d52af335a..0000000000000000000000000000000000000000 --- 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 58e7485772a604f44e04c30537db4710b3e34dc2..0000000000000000000000000000000000000000 --- 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 5f392cebf63e9ecf3989bdc4f3cdf60c14b980b5..0000000000000000000000000000000000000000 --- 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 89719bb7e57099091b39629d8c108b184c694e37..0000000000000000000000000000000000000000 --- 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 56821ae60eb481f5b024ad5ed0bddbafce65a191..0000000000000000000000000000000000000000 --- 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 ab6718a0cc42f0f044ab2cce9fadba0a345ef1b9..0000000000000000000000000000000000000000 --- 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 133cd6d1734bf4f05fd17a1cb672a83238c526f0..0000000000000000000000000000000000000000 --- 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 4b8fbbc44ad6df691b4adfe554221bea52cca060..0000000000000000000000000000000000000000 --- 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 56d1437cc2deaa8d2266da816b1c157f6e611ba7..0000000000000000000000000000000000000000 --- 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 7b146b89a1053549968b116a23ec262ec6ae80f8..0000000000000000000000000000000000000000 --- 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 fca371f0d3904480ed43961f779433342b2b856d..0000000000000000000000000000000000000000 --- 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 704daaa48987c0e90d02a798a4fe28d150296770..0000000000000000000000000000000000000000 --- 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 e3e836d3a58c5aa0332c237b2855eda6e7ec5940..0000000000000000000000000000000000000000 --- 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 537e98ecf76522a1142749a9c005125516a9ed79..0000000000000000000000000000000000000000 --- 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 7e0896935ca1e71d89b1a7d65653163783ee670b..0000000000000000000000000000000000000000 --- 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 8c9137846d0963f4eeb39ce584a28976eda9a6c4..0000000000000000000000000000000000000000 --- 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 88e26c75540270af5e412eaf75e419161cc10e66..0000000000000000000000000000000000000000 --- 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 e17052df0e04eed077a6bbd53d8f70c601aaf56e..0000000000000000000000000000000000000000 --- 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 a80bf4171be81cb7bc6c671ee55806d0f7303ff7..0000000000000000000000000000000000000000 --- 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 60a1a53a1cb2e7c2bc355bc0868880321079bd1e..0000000000000000000000000000000000000000 --- 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 b3aa0ddb50dd1960ddb5ed46f66609e91fff923f..0000000000000000000000000000000000000000 --- 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 6a7d0a1abd9ec3961d082fd51d48e426ff3ba9ba..0000000000000000000000000000000000000000 --- 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 e107b6793d815e6334096f346c467129e0efe91e..0000000000000000000000000000000000000000 --- 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 8b8e57cd17927311b940a24407541a31a17eb6c0..0000000000000000000000000000000000000000 --- 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 7e09a4b1a864ee70f204ceb69b9b68b0002fdb4a..0000000000000000000000000000000000000000 --- 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 6780860b8719a6ba1bd71cda939aa704e5d9d782..0000000000000000000000000000000000000000 --- 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 58ad1f571e2a1c83c1269a5f433d37291eea79f3..0000000000000000000000000000000000000000 --- 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 ba8061365cb1096070ba84666c93675f8db3781f..0000000000000000000000000000000000000000 --- 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 bd54bd80f489fa9e2e8b2b2f769790f8825bcfba..0000000000000000000000000000000000000000 --- 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 0d366d71ba0fd30f1c44ef49011ea86776af20b1..0000000000000000000000000000000000000000 --- 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 7846bec820854630a76ec920f6fe76564c2f099a..0000000000000000000000000000000000000000 --- 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 c2b34c4a6e0ccf098cddf9ea060a52a12b85c3ec..0000000000000000000000000000000000000000 --- 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 d91f1bcd724be0af48e86da09cdff243797f6f04..0000000000000000000000000000000000000000 --- 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 d0ef1e1af9ce1d1b4627ffd3d0efb87ac5cc2167..0000000000000000000000000000000000000000 --- 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 0d6694fa3bb4729e3af9c4e30c3b18bd44c1828d..0000000000000000000000000000000000000000 --- 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 63aa24b8eb6938e701770117c3bba55f529779fc..0000000000000000000000000000000000000000 --- 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 70017d525055a6f48b52c3224440ae3515b8e6a4..0000000000000000000000000000000000000000 --- 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 cafd2d9d108ee362a018b0c866011db5bf8120b4..0000000000000000000000000000000000000000 --- 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 347993c1fb394429c35177c9b10b0db0b864b8c1..0000000000000000000000000000000000000000 --- 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 bac27237c3828f02dad9e3e09aa516b5163d418d..0000000000000000000000000000000000000000 --- 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 1bf17b6fad69efadbffa4c7d614efafbdbdd07b0..0000000000000000000000000000000000000000 --- 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 b024313213d08d8a01a9bd27af999a70f1085804..0000000000000000000000000000000000000000 --- 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 60ad82717c42b4c8caf9f69f2f5a7d0defb7a873..0000000000000000000000000000000000000000 --- 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 6163d05ad9ce7a90b8742c2ef7ae03ee1189f6f7..0000000000000000000000000000000000000000 --- 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 72a987b68976f9969914f12ee2893ef2c5f4a2c0..0000000000000000000000000000000000000000 --- 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 511bc19b6c6304a6260b80005a960482d2d46dcb..0000000000000000000000000000000000000000 --- 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 0d0fc613812df257164a92d88d7807a5c5360bb5..0000000000000000000000000000000000000000 --- 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 e96076fbc76a038958b20c81d4d07f7d9893a400..0000000000000000000000000000000000000000 --- 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 249b99ba3d0581fffab745a0d7851f53fc488a99..0000000000000000000000000000000000000000 --- 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 269f9698a9515b66d71ab8aa4a5c1f78889798fe..0000000000000000000000000000000000000000 --- 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 75f751288b97c80d911e2b3e2199af905a7d5449..0000000000000000000000000000000000000000 --- 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 5591904c9e0e93f49917e3d979539977ac8805bb..0000000000000000000000000000000000000000 --- 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 ea1aaa184fd0d2406bfaae77c373d612cd31367e..0000000000000000000000000000000000000000 --- 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 64bb1238ec7869113a6844989f3aceee24fc5893..0000000000000000000000000000000000000000 --- 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 a0322dbeb26b8b2688830588dcdd3af37843074f..0000000000000000000000000000000000000000 --- 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 3148119dcfb100f226e955946a998f0d0ec61385..0000000000000000000000000000000000000000 --- 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 1c6ed4f7d64cf47fd91894404bf7ffead1f0eebb..0000000000000000000000000000000000000000 --- 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 f4a6476be6b7fad21ace76c82e6204876eec9d33..0000000000000000000000000000000000000000 --- 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 29bc406aa1e3f9ee85b88acb35f8bc4e72c8d2de..0000000000000000000000000000000000000000 --- 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 e634b89acc1baca2277abe37645aaa311e3c105f..0000000000000000000000000000000000000000 --- 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 6ff72c42d3b22341b64a0f13c7e84298dd692f18..0000000000000000000000000000000000000000 --- 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 72b010d55d0d11b3774ef07b41a1d0b3c84559b4..0000000000000000000000000000000000000000 --- 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 f81625627cf26d86d2ac36abc5f492078f59ab5e..0000000000000000000000000000000000000000 --- 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 89d4782aa3bd853e22852217d4ec611ed7f51d70..0000000000000000000000000000000000000000 --- 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 a17c65ef4a2f38e5c846ebe862578a1fa9b8eb2e..0000000000000000000000000000000000000000 --- 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 6759772f17757605ab89f83588797423ed2cea93..0000000000000000000000000000000000000000 --- 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 dc64df9345e07c19515a3d4e50689d3d54985185..0000000000000000000000000000000000000000 --- 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 a4089610ce35f89784bb2ee74d6f16ad84306b68..0000000000000000000000000000000000000000 --- 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 70b5e85a9b6e856f6627aacff14cc87e4bd00b50..0000000000000000000000000000000000000000 --- 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 0f74e653925c746d656e7bf596a440bb61b3bcc3..0000000000000000000000000000000000000000 --- 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 f17484e97b31adf9f1ddb47dbc39be4cb3d06d6c..0000000000000000000000000000000000000000 --- 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 aa3200ee856377a963e176386d05b3a56e83e898..0000000000000000000000000000000000000000 --- 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 0b099d01aa77b94311987ad94d809a32537f4a21..0000000000000000000000000000000000000000 --- 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 c9b5c36742c27716f170bb14ac3f22587e1a318d..0000000000000000000000000000000000000000 --- 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 c417fa5c4347e2529a26b0d03ee66c1eeb989607..0000000000000000000000000000000000000000 --- 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 ec0c37363ddb6b511b0728d31a9d4480df523ba5..0000000000000000000000000000000000000000 --- 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 ce53c248b8cd354244da21c370f580b892ef01fc..0000000000000000000000000000000000000000 --- 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 412045016a7b70f6f4f8dc5e1913e5eaed45fa0a..0000000000000000000000000000000000000000 --- 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 9b024f163da9d0895dc55e75f65ab3c3af9992ae..0000000000000000000000000000000000000000 --- 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 a7188c5eebdd9a61873dc0d964178888164f3805..0000000000000000000000000000000000000000 --- 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 b1de35154ecb5612d72cf11480821425518ccb9d..0000000000000000000000000000000000000000 --- 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 455ff9a72d1b7ac39f36c88fe7e1caa391040947..0000000000000000000000000000000000000000 --- 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 b7e9195c5519fbb6c8362532c67cb4f90d971393..0000000000000000000000000000000000000000 --- 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 f0a5fdfa8a46fea1f71552718f705e23ced305ff..0000000000000000000000000000000000000000 --- 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 66712d18ee2e6e3ee8805877897696f2aa6e8f1f..0000000000000000000000000000000000000000 --- 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 587ad9678d253f485934d97bff2faf3c873b92e6..0000000000000000000000000000000000000000 --- 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 a399ff07eb2d87ce8bb956a2e8406442d23ebd19..0000000000000000000000000000000000000000 --- 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 afd43395ba493f779ebee2267b0ba3156b48c4a1..0000000000000000000000000000000000000000 --- 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 520fe0985ec81db19bd2e2bc9e73f12100e7eb96..0000000000000000000000000000000000000000 --- 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 6f218bd8cb575535a47dbdeefe768e14c274c132..0000000000000000000000000000000000000000 --- 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 ec2033465e94f6513a6c59037a27e52f249a35ec..0000000000000000000000000000000000000000 --- 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 2f3e33931d8fba8430071620671624c0d7e459b2..0000000000000000000000000000000000000000 --- 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 5311d09d671711799f45c8d5d5ca6555b04eec9d..0000000000000000000000000000000000000000 --- 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 af3c7eb0a2d92ff3d486d6a16c470dda08cf7e75..0000000000000000000000000000000000000000 --- 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 7125d3be09aa3d532d7d9f7822a8eb4afdf83102..0000000000000000000000000000000000000000 --- 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 1dcad692c4ff984536dde513d964d1b2c2b594ff..0000000000000000000000000000000000000000 --- 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 ab57b4cd833c7572247996b2b2b95b7b2d3e368b..0000000000000000000000000000000000000000 --- 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 d44bb7e383d8e16c2d04af906377e5fc86f02029..0000000000000000000000000000000000000000 --- 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 da2b356a81efe36f34d4546ce6c48c3fdbcadb1b..0000000000000000000000000000000000000000 --- 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 5486b559208788870bd4cb79453f87fd5ebeff5e..0000000000000000000000000000000000000000 --- 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 8dad795f6dcc136421ce61538e2737fafb94312c..0000000000000000000000000000000000000000 --- 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 9b400e23eeb517ee6afaeb8dc906fbb86f461e54..0000000000000000000000000000000000000000 --- 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 5fda184beea8e4825ddd5fcf531dd600ed54d8f5..0000000000000000000000000000000000000000 --- 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 a5168b4bfc1c80d46836e0dca3b14019b3ff685b..0000000000000000000000000000000000000000 --- 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 6d4e3cb4d7da2ea725af60a0abe8805563c2b3ee..0000000000000000000000000000000000000000 --- 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 2699300b565258d1db0f10b08a048c0e73a9b0f6..0000000000000000000000000000000000000000 --- 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 9ac283cb5873fef5809644019acf8314e65b4f63..0000000000000000000000000000000000000000 --- 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 d2eea980f267dfd97f465e55a631f7156ccbeeb3..0000000000000000000000000000000000000000 --- 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 7564c6c1e7d5f2104a5bba381a4d05713596a8ac..0000000000000000000000000000000000000000 --- 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 9b5414d206f11b39ccd050f4fba7dbfcad66357f..0000000000000000000000000000000000000000 --- 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 0112352d076fd78799dc8ca203bafad83bd3cee9..0000000000000000000000000000000000000000 --- 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 3500c6880aacfb58ae4c1e009700da4fcf58aa1a..0000000000000000000000000000000000000000 --- 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 269a204c55487af7e996a7de5df6809cbf2f50f1..0000000000000000000000000000000000000000 --- 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 1a084a6ce188fc4f9443d7e91bd3cf9674c8b165..0000000000000000000000000000000000000000 --- 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 61fc5b5504359b0b56c489729385374ca9391d29..0000000000000000000000000000000000000000 --- 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 ea196dbe10bc8b7d46d7370f2aec65f0218c007b..0000000000000000000000000000000000000000 --- 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 989458619322a2c940a973c1f0fcbfb8f1567357..0000000000000000000000000000000000000000 --- 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 e2ef1b362b6c35cc962aaf38c962b7619cf9bd1f..0000000000000000000000000000000000000000 --- 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 daa17b640649ac7fd9090047a5a5909055c4f0ed..0000000000000000000000000000000000000000 --- 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 ca1d5240f3d9f8a22b6f6c1b32ffb2809395c47f..0000000000000000000000000000000000000000 --- 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 ad7daf84ae25ece119672b5eac32a0a764b0b30d..0000000000000000000000000000000000000000 --- 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 b10a0e9ed1cdbdd7d6e8fa11bc618f0f52d3c563..0000000000000000000000000000000000000000 --- 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 b0176e804d63dbb5a2e06f1b9b768f54900a89b2..0000000000000000000000000000000000000000 --- 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 7a7f501d4f2df02fc50e09fe80ad0d34d622cda7..0000000000000000000000000000000000000000 --- 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 7e82fe9fdcc2735448fe0ed238d8f9d5d30ed860..0000000000000000000000000000000000000000 --- 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 8a30f9deac0b84eec4afcd2bb9e92f3b3203eba1..0000000000000000000000000000000000000000 --- 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 2e95004a28861e9a8b8bb81b071a492e1c810751..0000000000000000000000000000000000000000 --- 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 fef3986d4eb7994aa8e00e47fe36300773d6a9d7..0000000000000000000000000000000000000000 --- 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 12c6b4f313195ac766dc65798f279e3afa49820f..0000000000000000000000000000000000000000 --- 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 94e9367fe2409bbbc54344b84ac533c45ee6a274..0000000000000000000000000000000000000000 --- 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 80ffc16c5fa165153547f64a9adf97a01d8681f1..0000000000000000000000000000000000000000 --- 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 7428f5667ed128a48587bcbcb1438cb82135a43d..0000000000000000000000000000000000000000 --- 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 18d5f552219997dad7b57ae87182682939142e01..0000000000000000000000000000000000000000 --- 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 24cf36c589155be5ba3056194d4991d518563ccb..0000000000000000000000000000000000000000 --- 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 b8d55d9b3cb14787edbb329703b9ac9512c5b362..0000000000000000000000000000000000000000 --- 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 921e2f4685fcd981543c2c2219ec9d2003f143f6..0000000000000000000000000000000000000000 --- 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 9c451b4ce7b23daec68a6cf85a62255b14898cd2..0000000000000000000000000000000000000000 --- 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 0d628a7471ef4ed0c5b7b806555b6db6975d5fda..0000000000000000000000000000000000000000 --- 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 bb0258c6f4ad00028a45fa9df9c4ac546d2c6546..0000000000000000000000000000000000000000 --- 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 a5242e05ee4b0df567ebec7630f129cbd54aa116..0000000000000000000000000000000000000000 --- 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 47f80f23e84f0f14fbb7fe1f9238eca5b1e0d794..0000000000000000000000000000000000000000 --- 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 08c63d220bf023872c3f427af885de9629528f2b..0000000000000000000000000000000000000000 --- 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 216165664d20d67bb5d63e8607b472dad86047d0..0000000000000000000000000000000000000000 --- 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 5612ead2d3786c9a38ae565f76d6a7511eac2757..0000000000000000000000000000000000000000 --- 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 df20a315f840909a40f526197b773bb6355fa3c5..0000000000000000000000000000000000000000 --- 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 3eac48808717b27da913b794d1205f324a20e60b..0000000000000000000000000000000000000000 --- 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 e414d8053d9885b6cc4edddc85e789b0a1eef176..0000000000000000000000000000000000000000 --- 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 a1bf04e968136b2c3c6e39e0bd91c79dc1816b76..0000000000000000000000000000000000000000 --- 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 4cbda74cf38b8104ec6cae354b170d62f54558aa..0000000000000000000000000000000000000000 --- 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 c59310206487cb7a6d1ef670a31964e9eac67e39..0000000000000000000000000000000000000000 --- 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 e0d6c9a8e94a53d072b005bf04d9ef626219acd0..0000000000000000000000000000000000000000 --- 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 13496315d749b90db961411f708e88c7b6ecadb4..0000000000000000000000000000000000000000 --- 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 95bdac20f42a58215093c87827fe38611b8632f2..0000000000000000000000000000000000000000 --- 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 9fdff8d950abc2b816d817bbe93df220abac2228..0000000000000000000000000000000000000000 --- 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 d9898beda113f5acfa77adfa3e7d8eb013794708..0000000000000000000000000000000000000000 --- 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 778fffcfd7b8e19c640be3170e417e17ee17ee6e..0000000000000000000000000000000000000000 --- 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 2437271e2665a07c889d8329855047ca9de9736e..0000000000000000000000000000000000000000 --- 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 ef2eeeb831d126dbaa6395a7ae2ddf2bddc3d875..0000000000000000000000000000000000000000 --- 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 437ea76234f7c1c3bf63e02fa7f9063becde037e..0000000000000000000000000000000000000000 --- 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 db99287eaaf6b348d74bd72599bf69ea158dfd23..0000000000000000000000000000000000000000 --- 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 9ff2371a62c5528fbd0b0c1f6cabdb0aeedce4f5..0000000000000000000000000000000000000000 --- 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 e9b3731deb16fc93be0c1724d012328fe6734ac3..0000000000000000000000000000000000000000 --- 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 9465bdf18c5bf24fce9b0e6afd9362c9882bba35..0000000000000000000000000000000000000000 --- 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 b9a2727f34da2c52c2556b79d4d86a854b50e1df..0000000000000000000000000000000000000000 --- 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 a0e340bf4dee21b29bb69d8d5cb274e272c2942e..0000000000000000000000000000000000000000 --- 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 f79533c20420fb94bbd3d4bae786e8a5d7883ee5..0000000000000000000000000000000000000000 --- 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 fb992f1e9409ec26693cbe003aa5f7a8635672e2..0000000000000000000000000000000000000000 --- 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 17adf6f909fa2d0f334c8e52b3f675cba0b0f9c9..0000000000000000000000000000000000000000 --- 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 7dca54b3e5964ce3e3d07abbedc1434622dfb295..0000000000000000000000000000000000000000 --- 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 210de458373175f451c07339024440bbfa499d3c..0000000000000000000000000000000000000000 --- 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 63bab814711cfb16d81a159f16cb629fe6b19cc6..0000000000000000000000000000000000000000 --- 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 f4f3d9a8f324161e4d35d349665c646271fe89e5..0000000000000000000000000000000000000000 --- 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 3b34b46df128ec8a0736e236c791a4adca532a58..0000000000000000000000000000000000000000 --- 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 0a34ad6facabbf086557f2613ad576559f9199a8..0000000000000000000000000000000000000000 --- 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 3b8749974d706e54d98b177e838ce84f350d6b7c..0000000000000000000000000000000000000000 --- 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 de68000bd9f6e672442787c9262a29ff0090b316..0000000000000000000000000000000000000000 --- 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 9e724596bf18237891ae0c7a97fbf754087a0d62..0000000000000000000000000000000000000000 --- 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 3767de1fc0dc1ad73f634fe2c4e49fe0f9afc80f..0000000000000000000000000000000000000000 --- 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 61d806882685d2b1c4831ae6bff8e8dedea7cdcc..0000000000000000000000000000000000000000 --- 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 5f5e495fdd1c8bfff267439079c930704401fc4d..0000000000000000000000000000000000000000 --- 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 bfc542434fa882b2a288e036cd9d2ccebced29d3..0000000000000000000000000000000000000000 --- 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 ef0a3066db762efa32589694d81909d77fa324e0..0000000000000000000000000000000000000000 --- 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 ebc195ece68c6f3bd0b2c67468dc7d30eb7e1544..0000000000000000000000000000000000000000 --- 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 74eef728cf6a107c7f4b73f350bcf45d1e655077..0000000000000000000000000000000000000000 --- 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 a152daae9a2f0bb46025d058191831f8efd7314b..0000000000000000000000000000000000000000 --- 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 b11e84097cc400f0c079f844bef00cda65426349..0000000000000000000000000000000000000000 --- 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 9eada0bf2719d37daac8853f55fbd6d135a266eb..0000000000000000000000000000000000000000 --- 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 c64f5e36b3232396c3853543121cb5c553ed6d8c..0000000000000000000000000000000000000000 --- 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 6967db5edb4f4d5d7a937bd6839a9ddd6db89419..0000000000000000000000000000000000000000 --- 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 75c4624c2fabade69ab881947f4c411f83573ce9..0000000000000000000000000000000000000000 --- 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 699479253f9f423f69b6e4755535f00abe00fe97..0000000000000000000000000000000000000000 --- 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 f770af1ec8bab3d01e8f4fe0a2196ca6dbdc0f49..0000000000000000000000000000000000000000 --- 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 2af4fa4baf8eac1eb3d8c8fcf2b26877546cc830..0000000000000000000000000000000000000000 --- 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 9c8e5e423b3bdac7a35ad31bd8ec73cbba3d2750..0000000000000000000000000000000000000000 --- 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 87022836869383e3735db9dbcc8db279ab393467..0000000000000000000000000000000000000000 --- 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 077e77fdaa44e699b5c4c938eb8d2ef496b330be..0000000000000000000000000000000000000000 --- 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 3a7e1d849e0469bbfd9501e16a7727c8fad756d2..0000000000000000000000000000000000000000 --- 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 f14b681011d47010e8840442328ef2906d7bc331..0000000000000000000000000000000000000000 --- 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 6e607c160d8a3a7eee5c338bb20e85780239ed5d..0000000000000000000000000000000000000000 --- 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 52684d71256400cce2510c0beb912aab7ef48e46..0000000000000000000000000000000000000000 --- 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 dbda14ce2e99e2601cfeb1ef009f233b935c1889..050a277e00fa80fc3b73a7e1147d1a09476505a4 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 8dc2a96f1c3ad6a46597e646fbca4960302e607a..26ca09c49a4e23474361b5820d143111ea232c76 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 4083303190776bde96e1ba003271ab6f655d14a8..a9ff01787fbca262cf592b0e145c796f05d38f02 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 4083303190776bde96e1ba003271ab6f655d14a8..a9ff01787fbca262cf592b0e145c796f05d38f02 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 da762e68d0b09d24a66e69c2175402ed50f2013a..50a3a27e9d0a224c444ebe83dae8a1186cb4fa9a 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 2f7a80d5772ab0872e8d476cb21a520ecf6318c7..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..3cf4138c4124e877fa6eabc2991cfeeb66ebf28f 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 a8ce95c9cd30a5b136255451f50090518f56585e..b48f2bf7336592ca8fd8dfb90ad5dc9a32774b7b 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 b8943aa44f9d3c954f98a7358a47793c715b73bc..979d0d7dc9ac1767ec6794bcf0ee2af31689893d 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 a9920120d019319b6b5bcc3e0ca728684970e2a0..113acd86c3edf4a57d45336553a49ee7dc425bea 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..b9a4c7ca82ec7ac822ec272597a90732eef59565 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 c23bdd6acf6dbc7fb319987d3c61a8941908b5e8..359b92b0352dd0632aed7ea5b5319e522457a0a7 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 fed15ed846297340fe80db7f61c69dba5773fb07..9cb713ec95d4b9e51290b2e321420aedebcab4fc 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 3b0e378049e19a487e76042c7dd439ec4b971a84..fb951423a9f57745569c4e50e2dc133a49d94d0a 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 22cccd07d63b45123b67984cd0a2d8e9a82c8057..68a368eb002a9dc48163c4dcc03a539714bfce6e 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 24684a3ecfde305ea8ba37ac041d8c3e75c1d87c..0b12967f8e62f9d51cfa05f4e9ec1d3f344cc4c0 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..cd2daf8229ba0b2be3dca97cab3a5c08f20b0e8a 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 a92565feff27b97e4a0918e9dc37cae47751da0b..ed155cb77b80b481f9155afe59e486168ab45cb0 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 91c0c2894e3024443ce19558d2ef323443ca02a8..6de6470702db0e66e87a633d4b415371d978bfc1 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 9da5b0c67de46057a51f7b7f99381e0ebb6449d7..f7a34d206902bc36f0263c030a7f9318a56905bd 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 5ecdc02d18a2f1602cec522f63bce5623f3b34aa..0000000000000000000000000000000000000000 --- 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 098d0823ab8eea1574eccb5c77ffe4f4559166db..0973192685e54f8da44c10a4b2489141eb786202 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 a5dcaf45b653798ac6ac364446fd5d45fc92b169..1173de15cff950aa63520d412639c503c54e861c 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 5daa281498ed1d492784fd78311eb50dbca2ea10..b9d5bb084f71575cc3472cd6ab5db0090433b1f1 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 cf1d5513646262a7ddf209706ffa07d9f9d5a83f..6bce2726001fc9f9b5ba309a8bc35adde25d1a46 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 28496ffcf7787c4ae33513793bc822eeb586f37b..5528c96c783c74decf2eb23070b9c43dde31567f 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 5ecdc02d18a2f1602cec522f63bce5623f3b34aa..0000000000000000000000000000000000000000 --- 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 098d0823ab8eea1574eccb5c77ffe4f4559166db..94eb369ba13789575200dba332bf091f524da1ca 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 2752126264917511a39b1f9255d4f5c7725309d1..0ca1dcaa675c72a85b83fe6bed3093947e1f207b 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 203285a6c281f2f4487c1374c498c13781a5fe0b..fe217e29ee3e3f700eaa417439850ab1ae29efb4 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 5495f422b44a22c8c3af211a3cd80a45e186aea8..d22df48d1b68c81ba5e2256e6301557d9487afcb 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 c24a9553bd1f930b5b43e6e70f70e1172101d901..0000000000000000000000000000000000000000 --- 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 098d0823ab8eea1574eccb5c77ffe4f4559166db..2b6d52fc7df38bf2a22cfd7b6e9796a8fec36a9d 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 efa1275f2b63aaa2b539fd3ef7cea7e5a5c23a7d..406f98c2aa0aa1a72a86f9a69b44b2f2ea91546b 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 d94861f4ba916fc33c2b8a78dee31abd824aa735..eee8d350d2d73dc457787c72b4b049f99f0e1885 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 ed7509d9f40faa7f5eef93792515b71bbb45693f..f626af5668347c7a1ecc24b578cf82c933b1ce79 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 12e4f39bd629ed10fb9ce495ae63c8c936c4bbaa..0000000000000000000000000000000000000000 --- 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 f97f6389b049a7d8efdd5427a9412ded3184de80..fc866e336276eef5fe5ee3069a5ce81d851e9363 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 e82354947c664a7c1ee03dcde3eccf8d04635878..fbb43d9b9cdbfae0365693d115865413af0fa80d 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 4e19f9c7de191b5a27f4dfca980a761c634866ba..48b4e3fff93e3c9cbca1b4a36eb4547755f56523 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 c6f28faeeaf202cd08718d61816fa127f2566cbd..8c7abfb78fcf2405391b67d6293b3889acb787ca 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 b92ab42afed9c7b45cf4466d159470b451dc2f00..acbc36ec25a3072cac5863f6e49c9bf9621eb019 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 6f779fd4165aa85ac33ecc18e39ae1a43a7dda6d..4170dde35ce668b645752c42d08ec00575d88682 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..cd2daf8229ba0b2be3dca97cab3a5c08f20b0e8a 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 cec14e1fb5664e675ef48273068bdaec79d142f5..49aa2c4c8301c3ed0675e37bbae72da60d1cc07e 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 21f39546801fb50ddc29f9d9441e1f3404ba4e48..1272c0822c99f36f9ff385a009c69ad96707afb1 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 7c492476ce234329f571faf0771acc65efe40e64..6224731ba238e302116d6e961d5cd6469f1cb5d2 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 c2021e7271ad4486bc209ceb70840ec26087d5e1..cd2daf8229ba0b2be3dca97cab3a5c08f20b0e8a 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 4256201f449820246a774cb496b842dfab918192..1cd4e17a525edb5f7dd64f63866a043322fa2ec7 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 608ec8c465fc5a56407e60ce470985e17310f482..726b637f782b357247c940da8cd53f160ac3f510 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 b78b63e5ed9494841a6d3af81ae7a9d6851e4470..0000000000000000000000000000000000000000 --- 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 43b78ef4111bd17a26b37dd07818415f04eac737..581ceffc70916371943c45d2956fac9155640283 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 a925d3cc2b28640b5aebf7779f6a9008e77b09fc..dccceff3d8c95c94d015bd0194c209aec1eb29ad 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 51d3236831d8c435f26594017286250440c20611..36d3193afd8e96e3f3fa0db80768bb7c2b43efc7 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 c6f28faeeaf202cd08718d61816fa127f2566cbd..8c7abfb78fcf2405391b67d6293b3889acb787ca 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 b92ab42afed9c7b45cf4466d159470b451dc2f00..acbc36ec25a3072cac5863f6e49c9bf9621eb019 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 6f779fd4165aa85ac33ecc18e39ae1a43a7dda6d..4170dde35ce668b645752c42d08ec00575d88682 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..cd2daf8229ba0b2be3dca97cab3a5c08f20b0e8a 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 5d15eae6c0f2731cb45678ae30dbe052bab1d412..dce2ee09ff17bd18609606b90b87472aff4a9d8d 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 6f1ace6a16236d72811a5f268fcaad2d93db66a8..cfc9a229b5600365095bb9c87b65383ac793f0a3 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 6917b826d91e01b079a4c441caf0ef89e8908d7f..72d1287df1f9d694a11cdb8b08012070367d6f06 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 db1e79f1de908f3b4bfc0789a36f6266aa323b69..94c53c3de52a3ac4e2e132443c8d72db7f4b2aeb 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 5a9f7e014d53857bcae8734637f7e2f65caa6ef9..dc890e42e1a65aa912587d777c0adba9803e5a56 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..02fa2df1b93d8d08358c3b2b17c69d5e89fe3689 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 7510de7b7a50e6cc559a21a0ac58b4380bbf751f..c2728910fe236f558f2d5f91014bb46eed5e2ad1 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 dcbf83049b59cd60e0610c1d36b689d43fa892f9..07e4effd34477ef7ca3540c51a879f8f622b4a94 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 29b185deadfe173ed1a7cbf05844b631616b158b..60208ba1315b9f30cb3dbcfc013eaf2118504c1a 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 98af49fbc18055972aa0707c44b57147dbf6626c..6ca6d3aef64b62b03fe24851002176f4f8797cdc 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..cd2daf8229ba0b2be3dca97cab3a5c08f20b0e8a 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 db6494d806a6983ce6d16d465f310d75de57098c..ddea2bbda030c46ed767a4672033d344e13718fd 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 33ecb425e27cb111e2666f0fa5ffc8d0172cfbcc..b2a20bdcd7934ad43cbf9ee92782e3f74d8e9480 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 c6f28faeeaf202cd08718d61816fa127f2566cbd..8c7abfb78fcf2405391b67d6293b3889acb787ca 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 b92ab42afed9c7b45cf4466d159470b451dc2f00..acbc36ec25a3072cac5863f6e49c9bf9621eb019 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 6f779fd4165aa85ac33ecc18e39ae1a43a7dda6d..4170dde35ce668b645752c42d08ec00575d88682 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..cd2daf8229ba0b2be3dca97cab3a5c08f20b0e8a 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 5d15eae6c0f2731cb45678ae30dbe052bab1d412..dce2ee09ff17bd18609606b90b87472aff4a9d8d 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 f83203612eeb7cbf3a29817a1b9efa0d2b843c8c..232bd728b011a1255efc3de2a7407803c65978cf 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 12c9b362e351103e30b05972cde2500ebdd1db6a..21b1e98ef916e45e087b197e36c0e1d1e8190105 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 3dbe46f030c7483050fa5023e9cb4716939c57a8..cd7aa31096656069b0dd238accfc2160b6efb306 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 a01a5a0eed8c3424ca6025f067546ab01055b02e..4362a65a8dc56d908eea3ae8f3a9a5702dea1a96 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..59a2e7e2073e496e7a341169dd932ea6858947a1 --- /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 f83203612eeb7cbf3a29817a1b9efa0d2b843c8c..232bd728b011a1255efc3de2a7407803c65978cf 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 12c9b362e351103e30b05972cde2500ebdd1db6a..21b1e98ef916e45e087b197e36c0e1d1e8190105 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 3dbe46f030c7483050fa5023e9cb4716939c57a8..cd7aa31096656069b0dd238accfc2160b6efb306 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 a01a5a0eed8c3424ca6025f067546ab01055b02e..fcb2bc9b0086d3236de4cfe6d5891b3035585ce9 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 76e163242f2a76e34b8b5ca9f1aee9844f006eaf..7a2d7d0e5e3c3269c847b329574269a0fa857aac 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 0000000000000000000000000000000000000000..59a2e7e2073e496e7a341169dd932ea6858947a1 --- /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 b4ca79e3c84b2e2290460c1907f0b8bfa48f60b1..7c3213ef9b408b1b1f638bbbaacce361c485f952 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 9161ca6171ed095461335a3a4336b6ce984d5e1d..71b9c782d16b20ab323bac4da2fff64bb7c575b3 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 baffcd16db4239c831623a43bea20cadac334efc..7ee52f8dbfbbffab77678b0c45528cc6e4d3348f 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 eb4656f2966a2578ad53a0dc7333106681ec3573..ac8d562f40e110cac00448754c08883e7cda7f42 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..cd2daf8229ba0b2be3dca97cab3a5c08f20b0e8a 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 5a12a4e1dad9591a9322cced1e3bfb8041170629..665b390b98b049b7729ee618c0cdfe1fedb5336c 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 4d56bbf40f8c91fbe7c0d4a2a2a94ec7399e31ac..0b421e801c74e2be301f344732aebc7ed960370a 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 d42c248c254d2526d3e3f817111735e324497f05..85d4f97a6ce580f5b5ef57f49961923dc3840e35 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 9a65ce7eec4d534d8c7aeaa332a09e8d44296fd9..867915923d517c4af694acd8f429550b93d115f3 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 552f881f4ef995e2b2977d76399dda8ab193db6b..807d2a2b30275c8d4dec8cf84f47c3364953ebe4 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 d10d5087061f29d22ed330a53a6868c8a3d0e62a..b8c80af97ce22eede26c86bab0e3afeb8273faf4 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 34805a0b264a3d2754bbc41be045a96d19192e1b..0000000000000000000000000000000000000000 --- 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 b6f0d11024aaf164309fa920c645cd84269497b5..becd8320f7be03b46ac3118de08c8ca75e8c2683 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..b9a4c7ca82ec7ac822ec272597a90732eef59565 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 ec1368d9cac60b0b192b810b85b3b13874840ed8..e43f10e9b913f0e49c7fde69d87a8aea4a2834a7 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 a7bd5b6bb0bc4abbaef7a976081f49762a3ab986..baba5a80013565167dcfbede4a9f415c2732da3c 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 2917c4e84935a3cac8f07fd3bc56986c9a383495..61815273a5399c46537ae14951686658de182cd0 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 61d98a744d325a2039fedb9c8d26d34dca123639..3035025ddc6cfcac0149537d75cbddeae0b20933 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..cd2daf8229ba0b2be3dca97cab3a5c08f20b0e8a 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 bf71cbee709ff3417a5ee90acef6482cd711d9a9..6519c5e77cb0ecad97608ee1dd3ba4cdceac0471 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..59a2e7e2073e496e7a341169dd932ea6858947a1 --- /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 2ea94995ae82573e7c20c9b442a23e131f11b009..9052cd188f644e3e980d5aa0dac20e3c0d7c5b66 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..59a2e7e2073e496e7a341169dd932ea6858947a1 --- /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 7f51468ad721208001d1276b3872f8263a3be51e..cbc48629e53d21f6206652c74951edf43dd0b2ac 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..59a2e7e2073e496e7a341169dd932ea6858947a1 --- /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 31ca07d47d105adc96770c8f2667ff9a10b655ea..590a482d4a0ab0771e23f9cf7b5f5c20c7c442c2 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 bba4ac8e0c1ad1fc65b558695bd4fd9078df5447..b64a3959f5eef4c07ef98dd0df2d3fe710ace04e 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 23851291dc60d3b0df3be887acfbeb0bb5067ef8..892d69375d9d5eab2aa804a87ee6661bbc1a9f06 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 62dd722078f97fe6bafb63653f4d1941347e893a..8e5e6563ee09d954a0efb1fab65f3230ed32fdf2 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 3da3e391bf661bd2a8dc0f88a24f5d64562b6743..a4ff41498400afb77f3a298c1cb67e0ae090439f 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..cd2daf8229ba0b2be3dca97cab3a5c08f20b0e8a 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 9ca38f0376fc13b4591e7891231c1637df0b7be5..d156cf98bb75246aa1bd2b2c455983cdae452d53 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 da6d89154851331611a27d6b49a58efd89858852..f1ac119104a47031603714d652d9ccd9ec7feb4b 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 886667fb5c3f9345b3bcd01d6af87fd49d640837..ccdab2054e56a89c2890e16cd16428d7ae6fbebb 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 0ecb8672d2758749a6119dd49183237cb1bfa503..bc7b9104086a9c7ae35d1d1f7104faa1d56c2d0a 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 423815a2de8a485bfb7829b7669a7b147a225d3e..481f4e64d7c72aa3ac16b1b9632ba05ff72aae89 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 be86bc1efaab5bb87f00ce3f86915c671b6ef43b..0000000000000000000000000000000000000000 --- 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 e0e6b776a2718fb18c8fb279b523831255e7b3b3..beee8bdf08581b26c09d418afd15d2024ce2c5d0 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 5e55527b803835d3b6b34d7b351621e4492b7119..d2738ff36b34d0f98faeb79758027cfb778ead3d 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 7ac88b9230b1da2c8e6d50303e375c519fcd50b2..e850a8a82f194cee8376713b43839b4960387a96 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 fd5f3f8c4c8921b1c0c0749135f29218b63f6241..c9385a0f64089077f32e539fc5d51fd9f6177266 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 97f41e6e200425dfb58ebf718a4f637940b599c9..e231033d12f977cc00d12ae83b064f383bdcbff7 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 329027bb91ef622ea523c0511394a2ad917def0d..53df882276951f8be43d7f4afadac470247641bf 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 5eeb61a9ad99d1f8a6e2da459b147a049af0e3fb..0000000000000000000000000000000000000000 --- 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 a4937b503a46850b2626f0d301e4a07b9f691507..1c094d0a3839c9440f14f7e74d2b918c586e2412 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 f35c15f101f989ea0db7c5697a90cee2b16aaaf5..78f6a784a2984d095953fc33b40a9f2fcb589ee1 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 9881bbd431b51d78fb7b81b6000aae9d69a61063..0c8ae95a6dc5e6030cdf388d0fea792f839b9e77 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 da6d89154851331611a27d6b49a58efd89858852..f1ac119104a47031603714d652d9ccd9ec7feb4b 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 886667fb5c3f9345b3bcd01d6af87fd49d640837..ccdab2054e56a89c2890e16cd16428d7ae6fbebb 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 0ecb8672d2758749a6119dd49183237cb1bfa503..bc7b9104086a9c7ae35d1d1f7104faa1d56c2d0a 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 423815a2de8a485bfb7829b7669a7b147a225d3e..481f4e64d7c72aa3ac16b1b9632ba05ff72aae89 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 be86bc1efaab5bb87f00ce3f86915c671b6ef43b..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..beee8bdf08581b26c09d418afd15d2024ce2c5d0 --- /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 5e55527b803835d3b6b34d7b351621e4492b7119..d2738ff36b34d0f98faeb79758027cfb778ead3d 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 312afc24a63d2b1df722665ee5a8058bd5ba10e6..a0fa682a6109d7b9279f8411ee56ca79480c9407 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 2b618db2f3e3fdf27faeb43ab2d1f58d2a559f8e..0ca172de859b131297905104ed72a49d61cb539a 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 504bd304c157b94d43452cbc4ff8df3a708cb178..86ee5ac89b2c949e0a57ad1319b7d7c890492c4c 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 34805a0b264a3d2754bbc41be045a96d19192e1b..15d9319a4480bcacb5e9a53c76fb999df2ce7f13 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 2ceace5b7c74faf00665a93de5b102db1657d533..293a173b11bc8c99702adfa0d09cc7a231a908d4 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 b8e91addc9d4bc784c991cec9f397808d635cf50..c49b1005e381256733430c70f69fcc64764fec3c 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 2b618db2f3e3fdf27faeb43ab2d1f58d2a559f8e..0ca172de859b131297905104ed72a49d61cb539a 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 93c6dc22bcd787d6d7ee0756a36bc6f760add8df..a7fc155fc21a7c1d54467c5e9a4d90d2b08cff68 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 a4937b503a46850b2626f0d301e4a07b9f691507..15d9319a4480bcacb5e9a53c76fb999df2ce7f13 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 e0a0f4efd26185c350d14cd27f8ebb719b593bc1..1abd80550c21706b52eb5fe6c3df31d4484f27ce 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 c09d9c59c9b4c628e383fad7403ca341524eecc6..f8b893353b76f57d6ae12e26155222de3fb11916 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 556c0d3d9ef58cfee3ad06350e2c536b36529abc..2558d1e2e9d4b39746087c89a625c847af9eca80 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 070546bfcfde132de9a729e6f92b9e125983555c..bf6e7f74877057e6882321811f2629a3e1a7ee49 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 dad0abea12aae563ee7a9e358193eb364b55bc3b..63a08c87a1d5a617fcd24e720b5e8af983834c51 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 3051d55b0f4d9088fb23e727693c3342ae0ef68d..1278f2856a55cbb86189001de3480d1789ba8c90 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 77bc57943a22195b99e062c15412a74652afae32..32b54e823d7207c18260cd15448821b74d246dd9 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 fef7666e767c70a2c9cf4ab6e41a149436b03e25..ae6e8d8c8f0d82e955340babebbfd74af60e7dbd 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 f00ffc5918016488aade7296f983e698399e02db..1b68a368e417128360141863aac2c763304b9625 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 09a9a55851d05da7dc6c64a6e800b9f5d0fe7a0e..0000000000000000000000000000000000000000 --- 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 eaf002d2e96e89052d5371ad0b0aa2da5c665aba..0000000000000000000000000000000000000000 --- 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 caff66645869eb06a81ac753439365f77d5b7fd0..b7bddf908d94b128e91289d44c0caa3227d526f6 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 dca5ba3f8e430546245bfd5d281ddf9521587f12..867b0a2e978308608a118a9966fb808df31df57d 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 fef7666e767c70a2c9cf4ab6e41a149436b03e25..ae6e8d8c8f0d82e955340babebbfd74af60e7dbd 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 0000000000000000000000000000000000000000..40eeda22be7dc7580c9493973b8680af9eb89f4b --- /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 46cfcab3a224cb4d925d3b113fbc112ec14f098d..49dcfaa45a15f38adeca53e0ae2a8ee23b81f5ea 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 6a2ab6f9406ff84ea976a052b0f27c58407de619..3f0421bdf849f17623202e47a6b7f2e5595931a5 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 0000000000000000000000000000000000000000..63b9c797a6d76ceca5b38736b908dadc5760b7fa --- /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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..cd2daf8229ba0b2be3dca97cab3a5c08f20b0e8a 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 1cc42b8af81227d09c91f3d1cfe899e474a5236b..0000000000000000000000000000000000000000 --- 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 a39397c7c31c55c99376c2fa1f2823d12a7304bb..52e15c826bb34d20dd1695ebdce92ac888a6f294 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 f787aa1bb47da4a177e1e12f8fa090c5625d8641..27a33bf7c41754441027815f6febd6c991eeb8a4 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 6590684a5aa1ec7dd6b9ddf3ca10fff634a2bae9..9ce6c565d54a49aba1e5a5a5334740be3a98765e 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 c6886ad2826303c9aaf3e2e6e4298e4575e8f4b1..0000000000000000000000000000000000000000 --- 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 eaf002d2e96e89052d5371ad0b0aa2da5c665aba..0000000000000000000000000000000000000000 --- 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 b115024cc77871236ce272e5ba7a3f105112859f..c583021fa3cc0a49bff0ba9356b5028055710e57 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 127c9c965f09ae447303fa4f3c986d44faad8c1c..f761dabb4a9ba9fe443a00d179c935bddb5f7461 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 e62946373980f15e779527696e503a5c1ac102f5..68f73839a2d2ef50cad8bf93d3bf63aac71a0126 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 0ffa7ce34e9e94e65cc0cf38ceb116fec0fa7172..921d19779b8f8980b1e65a2ebaffc4c02cfe2c67 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 e7fa28c74a5fead3fbcdd79b5587ef684e8bacb4..381b548effbea957b459c0f348abcb5750f849c4 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 d930009138178fe3c31d34380127a9526a79ccc8..4a2232f7315a28a308800e7aa54dc50f67cd338f 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 e0e6b776a2718fb18c8fb279b523831255e7b3b3..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..85d399a1ec6bf72f93e575feee2ca4b8bba376c7 --- /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 c6d44d3c2e7bbb9e9d008df8ca792ea64f3c3eb1..e5ff26a907dbb2fcee4bf265433540f8b8ce33da 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 0000000000000000000000000000000000000000..85d399a1ec6bf72f93e575feee2ca4b8bba376c7 --- /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 aed2ebec5622482604f48d109adb2fdf56187181..0000000000000000000000000000000000000000 --- 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 a4937b503a46850b2626f0d301e4a07b9f691507..15d9319a4480bcacb5e9a53c76fb999df2ce7f13 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 de12e1d3a84c6575e86fab044cb5339d71544506..06b08169dbdc2e0d2b611280a0157ab15a5b3c92 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 34805a0b264a3d2754bbc41be045a96d19192e1b..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..8e24a9035ab2300844c0260c51ac7f16306993dc --- /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 815e258200555d39038c93e35e7244657663eacd..0fd54ce506d835d73294218fb2e51a9f34ce5dd9 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..59a2e7e2073e496e7a341169dd932ea6858947a1 --- /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 815e258200555d39038c93e35e7244657663eacd..0fd54ce506d835d73294218fb2e51a9f34ce5dd9 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 b74bfe5738c59d74d68df022037b39dae5eab6e0..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..59a2e7e2073e496e7a341169dd932ea6858947a1 --- /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 ce1e571bfbd2f8021c06364703ffb554aafe85bd..36dca60f67c8c3da2c5fb6295628b92431376071 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 83902138b4815ff733f142364f8a498a794d26cc..44da6880a95bed845fec4996cb2c3caa5e6e1213 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 b7e6607f8999919f3a03ba92c2f99b8117a98b16..51be17c90c8ab32e0164a95d64b5dde0202ea2a9 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 77f51f798039bec400141da362bad0c9b28e38b5..55d04b4210b2938599ccde6539355a44120d9091 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..cd2daf8229ba0b2be3dca97cab3a5c08f20b0e8a 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 b6ae74a4e93443b0987df7ae5831866b36b37584..f65b5bf39794233dcb01c32d3a3db441071f2ba9 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..cd2daf8229ba0b2be3dca97cab3a5c08f20b0e8a 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 264b5c1c1b0797c668d3923d3fd16e512e2fbcff..57b261e48031d06dbd800834dda2de7d73c0f3aa 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 b6ae74a4e93443b0987df7ae5831866b36b37584..f65b5bf39794233dcb01c32d3a3db441071f2ba9 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 e0e6b776a2718fb18c8fb279b523831255e7b3b3..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..02fa2df1b93d8d08358c3b2b17c69d5e89fe3689 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 5f9910228503e7867ca688f8a7eb493fbab603f7..82d5997ca4869dc668dce0d6875a43fe9ccb322e 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 e0e6b776a2718fb18c8fb279b523831255e7b3b3..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..af8a54be2327ced9f5d58e525e6b401d5db7e6cb --- /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 370aa5a6649b9d60e9af3d1e51fb85ff1aec2556..da2c979ea8d11c95a81191678897f560a9cea6f3 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 14f066ebe92e9088c5e5fcf60ed9ec1a7be02d97..f8bab393c97e03ab4ece733a7332059678cf7133 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 e7fa28c74a5fead3fbcdd79b5587ef684e8bacb4..381b548effbea957b459c0f348abcb5750f849c4 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 e351883188c35023f509c73b4fc8f7c97e025058..8495249e24062853c0366e2d3a246ad08266750d 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 a59b75bee93cce703e32d22ec931eb2b7c68d201..ff07884de817ba83148f151cb35cb92012ddce8d 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 e7fa28c74a5fead3fbcdd79b5587ef684e8bacb4..381b548effbea957b459c0f348abcb5750f849c4 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 0cbeb15c6b5455b011663c2385610630d20b1f3e..929e6a5039cf9357667eae484208f0315f838bcf 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 a59b75bee93cce703e32d22ec931eb2b7c68d201..ff07884de817ba83148f151cb35cb92012ddce8d 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 b4ba303bf75439f84b202fdf9c503222465365ab..df3efc1518b4fbcf6c705f2cacca7a833afea8cf 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 7c05e74de9f71cf1d5853ab5496bae46aa9d785d..0000000000000000000000000000000000000000 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 436a3b7ae5e6703642df86377dd3eedada198edc..a94c6e72a3b70b30bf1db73b8204ab3aad0771bf 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 af3a82dbea0286592e97e4b8d9848c55cef4386d..0000000000000000000000000000000000000000 --- 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 2d60fc8bf13bc5b8b17e602c318cdf69ef32ecc8..b04390b6e247ace3b9f01bedeea464af4806e326 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 9f0365f2de4db8c3e8c07d8faf5cad1640cbed17..d4b2c3d0ab934778e03279f5158078cb791b227e 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 6d5ef5ab979d770638c5961247d7126896a71089..8973a7c1c4ca451f4b4169650d5558637ab1779d 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 3beda0be2d64ad986967037cd5125746cb02b5df..b3abd8eafb310dc3c7f97b97cf80bc91886c412a 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 88b1e501ac636cd3da87755fc926a6c76da7d2fd..0000000000000000000000000000000000000000 --- 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 e7fa28c74a5fead3fbcdd79b5587ef684e8bacb4..d6c0926546d751b25a184a92a092159baa7f6cb4 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 ea3c1491e16fe5afcad7c167711ce9f033b48d04..0adb7755519a78feca97e9120488d03f3a4305dc 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 43b78ef4111bd17a26b37dd07818415f04eac737..581ceffc70916371943c45d2956fac9155640283 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 e7fa28c74a5fead3fbcdd79b5587ef684e8bacb4..d5016f6d22b4b168cfb0f288bd3bb08980c563a3 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 926d489aae55eb3d059e41849197d58c6129a2b3..e72eaed33ac229c7c4a5dbdda6b5c9d0f8b2dd88 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 4cbfb18b0e1a9e246e5039a1df6c1315c724185a..769a0e506ba18cea6b216b0adb41ac5d9f46f529 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 197e16d1261b7f744db693cc75782d86837d7ecb..0000000000000000000000000000000000000000 --- 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 3972a7e7887b013a88dd4b0342697170eafb7f93..2c7ad38af543030200325d94303ab0d9b3445744 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 19904d0a37830abfe2d2b2be0eaa86a84c44906b..ea00426f6108a307a3bf5b2ece5b4a94d55d837f 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 bcc0d11042c5c8e48e43f34d36b62076c293b843..0000000000000000000000000000000000000000 --- 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 ab998a16d7a87b1579af406f4b27fc4cb98337a4..35b21043f9e2d47058f61fe35fc29217aae0653d 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 d76eff61b45de9bd893feffcac2124a15a592133..0000000000000000000000000000000000000000 --- 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 578783eaeb9392c4f1d70bc4e50003807d0aeb7a..7e7cb8fc3c6e6536b150d88784ce7929bf5efb0e 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 aed2ebec5622482604f48d109adb2fdf56187181..f9d4381ee657a2a5228ac73c78e0d300079228ad 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 3bc772bfed716ef265271a234b6b11057004b3ad..c6c8fbf6f8d2f4b4630c8e4cf2ff9ee24c94e8ed 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 608ec8c465fc5a56407e60ce470985e17310f482..726b637f782b357247c940da8cd53f160ac3f510 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 b0c6edf80fdc0a43b979e3ac095dcea84ac52a2a..0000000000000000000000000000000000000000 --- 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 ab998a16d7a87b1579af406f4b27fc4cb98337a4..19b9695576877f971ba9f5084614db04322241e8 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 45cce4ef17799b018c26509fa6705589b10b3160..752f20f660a2d10471ef576996e8adb2c6e7789a 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 65048d6cc30220f1573ac5042ae805b1c64c00b7..726b637f782b357247c940da8cd53f160ac3f510 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 b0c6edf80fdc0a43b979e3ac095dcea84ac52a2a..0000000000000000000000000000000000000000 --- 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 a925d3cc2b28640b5aebf7779f6a9008e77b09fc..19b9695576877f971ba9f5084614db04322241e8 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 62b8ad368d4622410f9064dc486a1121c160dcf3..75f357060477bb0459545523b765ba1f119195c0 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 0000000000000000000000000000000000000000..a7040dd8439e0778741e94489c8be57d791605da --- /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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..3ffed52b9a27d83ffcc25c12798027487c5b1c65 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 a59b75bee93cce703e32d22ec931eb2b7c68d201..9d066714d2b073b26b76e20a5f146bdc9ba097cb 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 983e6dd80458cef603619a5d588b7d5f62c3daea..7342e01ebe45cfb4b60ea867ddee6a4f07a655b1 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..d587253c9a80d6d2069002058994493642c5bfb6 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 a59b75bee93cce703e32d22ec931eb2b7c68d201..ff07884de817ba83148f151cb35cb92012ddce8d 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 5db0abc188c7a3960414a9cf6653a00d2547317b..930ef501addd9fa80ca49d520e6dfe4243f16daf 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..59a2e7e2073e496e7a341169dd932ea6858947a1 --- /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 9376d23004a0d33d568a61305b490b973b497eea..ee3301aead90f2e2261e34e3f910461537cb7835 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..59a2e7e2073e496e7a341169dd932ea6858947a1 --- /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 9376d23004a0d33d568a61305b490b973b497eea..ee3301aead90f2e2261e34e3f910461537cb7835 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 d76eff61b45de9bd893feffcac2124a15a592133..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..2c4a27454642a0dff6738b1ad7d58073de751ff3 --- /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 4158d2dead36ef65edd567e25985798c2ee88ec4..38d9449246cf75fcfcd202ea91182e08e42b1b02 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..a9b58dc78e7012fd121f218bb4435060d7c8663f --- /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 dddcf6c24b88f94a42dfcb2a0ea104245351b5d2..6a50ad98d871870920439d58b8b103e876b5613b 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 3b7dcacf86913e1f5c727771938fc13b6fa633a5..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..f1719c6a0016dc3795f8ec098cf928f8e713b203 --- /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 553c603b445da3b5b018fb13da13561d256fb82c..c7607fc236cc359cf548ba69a611b4710669a03c 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 065507c3f4397f2658cda9296e190ac205f98897..cf8155eeaaa014761b76d7401dae31b0746db221 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 63ed5a5ef8f1400e71fb3b34c1903c4a6afb3946..0000000000000000000000000000000000000000 --- 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 e7fa28c74a5fead3fbcdd79b5587ef684e8bacb4..45b095b5455d44afdfb0bdcf3977281f24a868aa 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 da248aeec7b4fa9b59702ed90b734d49e4eb7238..e43cefc79a5ade11897d10834c5a34c226908953 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 eb56b2a74bdb490b3b878c68fb8ede03e32f0521..eff3e37ae4b2311082cdd447758531cf70598f75 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..59a2e7e2073e496e7a341169dd932ea6858947a1 --- /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 821adc7eb93b84614dfb5c52c78cdd864294077d..268cde63e037887ca656db5f97054c9dd342f154 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..a9b58dc78e7012fd121f218bb4435060d7c8663f --- /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 821adc7eb93b84614dfb5c52c78cdd864294077d..268cde63e037887ca656db5f97054c9dd342f154 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 e8f2fd50229c5a78420b2d020728e8d0b09ed730..1385aff112bc6c7969b1b72f946880f20fb21798 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 1b295b32a3a15f9f877f47265161b49058aa0017..f648f3ed70a4d41c09afb1663442c95c7159ccd3 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 492b79ef744f264eeef3d8054c15216ce5d29448..445a2f3bd51bb564142b7b2dacf5e6b1f2910aff 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 47d65d567db19cb35dfe8637deebe525d1bd7580..7c1a3594d0539bc4a06ece1c6b4e6e4ffc0e3db8 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 c2c3b28a1b4e8f4a2cae55f58bd61f9b1a67b488..aefe0c27d7a3bc1b0638d7907c0b8fa67a8b60ed 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 73cdf5dcaae60aa47c7bf96a07d04ffcfe5807b4..a3d785d315317230403a50a8644236ed560cb173 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 2a76936893757ac6bb3379bc2dcf737d40fb1b69..098b4a6eb052b8681817ee0d022bf0ca1224d53d 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 7cfeaae133d7fe8289f4a415540c45b7a6a9b5fe..41fe074824a8de063e7242831ff2b417606d47a9 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 c1aa352a73f5adee542f1cfcee7ed95e842872e8..462084a38f000d11be8be35e27e6bd0978370745 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 2a76936893757ac6bb3379bc2dcf737d40fb1b69..098b4a6eb052b8681817ee0d022bf0ca1224d53d 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 7cfeaae133d7fe8289f4a415540c45b7a6a9b5fe..41fe074824a8de063e7242831ff2b417606d47a9 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 c1aa352a73f5adee542f1cfcee7ed95e842872e8..462084a38f000d11be8be35e27e6bd0978370745 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 568821b00def4945fcf168421ab44c7f7cd3c15a..0000000000000000000000000000000000000000 --- 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 aaccd5feb0f9b868f458ca63411e1a59b376d567..89a95c3f03bc7a140de612f221b911f241a7e888 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 4bef25ebf90e9fb089a33d33a698cb9b4c22fcde..13bfbc31febfc45fe5bb8b0680274cce2b50e47c 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 cc1647b252d10958360b5bd52d0d74cac11b73c2..0000000000000000000000000000000000000000 --- 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 9fcf588c0c292537815ea7ef2c72563a85a14851..5f62ec144f2af05686145b19f9bdc3657c0459f8 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 d5f2de2074bbefdbb035222b6b68a2406e4ed9f6..31facc9f6fddabe517344e18d452aa63ea3512b8 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 9622ffefd9db638b1b04f0dc0bc9acd83fb1a570..718743bbcaa1ed868fc860a4559732de058bc88a 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 fede44f8c3227e97836ce67a4e13c9f46b575eb4..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..c323d93972ef3b084aa15776c674395fb144d4c1 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 3bcfc65ff8bec34e95048127df5328590540eb11..dfc51235887170190a51c00baae24758c699967b 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 cc1647b252d10958360b5bd52d0d74cac11b73c2..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..c2c3b28a1b4e8f4a2cae55f58bd61f9b1a67b488 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 cc1647b252d10958360b5bd52d0d74cac11b73c2..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..c2c3b28a1b4e8f4a2cae55f58bd61f9b1a67b488 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 560f65db18d983a254a1c59472efa671a5822f68..f073a5ff5b209622480b82868f127f9e4df28586 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 b4d9f6fdbd6010a39715cae2cfd3fd1eee095997..e73cabb04b8db6026c8309a5a4d851bc89f9da66 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 9036004c5ad324e55fc3326959f6a878e34581f8..01d40325b58cd3bf9d19f8c316ad5d037a3828f7 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 c0cf6eed6cf491d5952f7847b7450dea8ffba979..e985d6e5f2564fa39abc003a351aed3b5932aab3 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 85d8b8af86bcdb0b52972fd4109bd236fc58fcf8..0000000000000000000000000000000000000000 --- 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 fcb13c3557c3d2e5e0dcbc14cfd0ef872d83277f..eeaaa9205c923e0536760d09adab3a6da7ce4f72 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 9097048a7a69b7901829ed6716b46c57d2b5c507..b7b5130a7e529c9f361ba377a96b221390c19b0f 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 906c819b4535544301c2cfd5718f82e4ceec3f31..cc232dbb081a88e3b747ad102522b75b1b59d3e1 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 7cb2760736596de38c86627d15126e4182770f65..1885c5628c8291fd85997a2eb0e194047e0ab355 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 906c819b4535544301c2cfd5718f82e4ceec3f31..cc232dbb081a88e3b747ad102522b75b1b59d3e1 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 741efe7ccbb7b11bc89c3664efd02e7b88143aee..448a7a0858360aab277ccd6a63ade402fd2e8dab 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 99ad23a21f33c85b46a9a3914b232514351932f4..7d79256b2a21ea0c1b3d0bf7b1208da1b312a7f8 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 ed047925d497e904fa074fe92c501b7c2b969e89..c0334a14120c1db180af96be7e72ba62e92dbe19 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 741efe7ccbb7b11bc89c3664efd02e7b88143aee..448a7a0858360aab277ccd6a63ade402fd2e8dab 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 99ad23a21f33c85b46a9a3914b232514351932f4..7d79256b2a21ea0c1b3d0bf7b1208da1b312a7f8 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 ed047925d497e904fa074fe92c501b7c2b969e89..c0334a14120c1db180af96be7e72ba62e92dbe19 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 dffc9c2d5bd12a4f864a797756c5d553ea79db3e..0000000000000000000000000000000000000000 --- 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 aaccd5feb0f9b868f458ca63411e1a59b376d567..2939a395ed51bf146e426ce6c2ef07f245840883 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 217e56ec64ccca229957d7d0ae9c6876c3896b89..908f3c60e1fe83fa7798c1d431f46a6f6c872b9c 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 66667655d7c9ee52ccb63720f7ec8eb0739a9a32..51019fc93ef8b065f50c2cf739e680daeef028c1 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 cbdf8c0b4aa36c2fd55c51040dd85e55619172b3..536c43de095c206e1866c384029cdb477362f86f 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 e7d730d2f8c4270a13d6bf9f148931d9fe5ce171..890464255b7dfb668606f6760d2f05b8abed06ff 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 2a76936893757ac6bb3379bc2dcf737d40fb1b69..098b4a6eb052b8681817ee0d022bf0ca1224d53d 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 7cfeaae133d7fe8289f4a415540c45b7a6a9b5fe..41fe074824a8de063e7242831ff2b417606d47a9 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 c1aa352a73f5adee542f1cfcee7ed95e842872e8..462084a38f000d11be8be35e27e6bd0978370745 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 568821b00def4945fcf168421ab44c7f7cd3c15a..0000000000000000000000000000000000000000 --- 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 aaccd5feb0f9b868f458ca63411e1a59b376d567..89a95c3f03bc7a140de612f221b911f241a7e888 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 d3296d43385f692d1029019c1b66bb53d5054dd0..fb6d354d17ea27b960b4c50944dc60e1b44b0e43 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 2a76936893757ac6bb3379bc2dcf737d40fb1b69..098b4a6eb052b8681817ee0d022bf0ca1224d53d 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 7cfeaae133d7fe8289f4a415540c45b7a6a9b5fe..41fe074824a8de063e7242831ff2b417606d47a9 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 c1aa352a73f5adee542f1cfcee7ed95e842872e8..462084a38f000d11be8be35e27e6bd0978370745 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 2a76936893757ac6bb3379bc2dcf737d40fb1b69..098b4a6eb052b8681817ee0d022bf0ca1224d53d 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 7cfeaae133d7fe8289f4a415540c45b7a6a9b5fe..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..41fe074824a8de063e7242831ff2b417606d47a9 --- /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 c1aa352a73f5adee542f1cfcee7ed95e842872e8..462084a38f000d11be8be35e27e6bd0978370745 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 568821b00def4945fcf168421ab44c7f7cd3c15a..0000000000000000000000000000000000000000 --- 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 aaccd5feb0f9b868f458ca63411e1a59b376d567..87ceaddfd108c800017395df5927b77afac681bc 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 d80f5e4e2a5621fc9bca441c5b154009f5486ad7..2091a6975945faddd7b7661b7aaad1ebac1bc354 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 e38ed02784cfef654a658662ead0d66dd32c48a6..c14d3d7e021c20c8bdd5d30a0c2592947c01e263 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 6650fed2abfb771031243c55cf53e7fb7ddfd573..434499066b61f6870c68bd73c51afb3b422f7610 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 ce6dfaf3ee0b1ced33f4f2b680d8f470c2440b22..455e74634560b45b522e9955219647a0bb4f67fe 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 648ca445386a6a16ab31c3068f07c1fb77e35018..0000000000000000000000000000000000000000 --- 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 85d799ea5f1793788b67d7f281e563607b459b7d..017f5dba9f2730b5b75614f40cdb49a16b4f367f 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 c4a6d627c3a08fdc48941a30cfb442e3cdf47860..d064aca3876b876f3cae167789457c812cc8deb6 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 da54fd75a00df8d3ebbe93b88fdb2c9f217551fb..0000000000000000000000000000000000000000 --- 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 e7fa28c74a5fead3fbcdd79b5587ef684e8bacb4..d7309cb8888644fab7c8613b1181e71a9392a045 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 6ecda2783ce920f93ce16d4ee4b816a5d9ce5034..59d9365ade1700a945ceac41a4872d466fff070d 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 e0e6b776a2718fb18c8fb279b523831255e7b3b3..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..02fa2df1b93d8d08358c3b2b17c69d5e89fe3689 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 5dac7138140e70851704e700819c52b9e509f875..66a883a157dd4b587155778687901edfbce31478 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 6d4b26abea7615f2413b0fad7d4956782bccc968..f56907e7b47de33c03f7a9cf62eef3076fd1c706 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 e6d3db2b5f98fe6a0a0b0720004fbadac26f91f8..0000000000000000000000000000000000000000 --- 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 a925d3cc2b28640b5aebf7779f6a9008e77b09fc..ec7ce02462cafb93ea12acd387290c20ca93c05d 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 17346054f62fd6668b0023b5fd57dbae31920073..9072b1b4874c0c45d30d429c4196fffb1f724747 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 c4d32cf2ff7d6597b53e84048a1078b387fa7df9..f85002726dd95cd19aacac539c3676e6ef1ef50e 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 e6d3db2b5f98fe6a0a0b0720004fbadac26f91f8..0000000000000000000000000000000000000000 --- 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 a925d3cc2b28640b5aebf7779f6a9008e77b09fc..ec7ce02462cafb93ea12acd387290c20ca93c05d 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 64aa6e54b9d2f3264fdafbe8cb53f99a826e55f8..8753ef178c35c067570f3be3ccbbbbe6572a3472 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 e0e6b776a2718fb18c8fb279b523831255e7b3b3..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..02fa2df1b93d8d08358c3b2b17c69d5e89fe3689 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 618d1b4a9c9ffad49e6264b953de896d1e9d6337..0235d8bc0f0035f3d3fe02fc810fbfe30a3cf02b 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 4773e27a41a100b308cec5d0fd481bb6aab1eda0..0000000000000000000000000000000000000000 --- 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 045d871d38649ca257e55754a76a78de1caa83a8..c64e1f81078366398885af2a9b4494d6492068b5 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 b3cfc0ba03af3fb2a7f427c61867c23853f224fc..0000000000000000000000000000000000000000 --- 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 81845d8cb3f4398b699c70a886266f48558c355e..85fa84fac74d16d2fbf76366eacb374b29fb3ae0 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 273c37e720d6947df4460088beb45df9ec9a7ef0..990fea86e2fb732d7d4de7c3ec9af0ccccd052a6 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 b3cfc0ba03af3fb2a7f427c61867c23853f224fc..0000000000000000000000000000000000000000 --- 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 273c37e720d6947df4460088beb45df9ec9a7ef0..990fea86e2fb732d7d4de7c3ec9af0ccccd052a6 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 0fb6563e2c62fff0ea32bc7c187403b94efdf4ad..d32c577288fb896d741369aa3ff57dc191684815 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 e0e6b776a2718fb18c8fb279b523831255e7b3b3..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..02fa2df1b93d8d08358c3b2b17c69d5e89fe3689 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 84b63931146c870b50f820feaff9d4e1007ea673..44668611dfa669f716bcc1016e223e83a1b573f9 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 af7ecd49d2a5e2222f44578f55eb0edf6e4ee653..0000000000000000000000000000000000000000 --- 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 09c25018c3d03a8fe312c812dcaee80ab568c16f..c2c3b28a1b4e8f4a2cae55f58bd61f9b1a67b488 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 020384e5e842d90d4a0ecb093d034415a14c31e2..06de48abed26c14ce3e8a9207019cfb0e9d65301 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 c2021e7271ad4486bc209ceb70840ec26087d5e1..cd2daf8229ba0b2be3dca97cab3a5c08f20b0e8a 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 88424a730cbdf5f4a6c63c0f9a86c97b048cf293..4749335ec9d5f83a5a4e29aa7e3da06869fe6dae 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 da54fd75a00df8d3ebbe93b88fdb2c9f217551fb..0000000000000000000000000000000000000000 --- 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 e7fa28c74a5fead3fbcdd79b5587ef684e8bacb4..d7309cb8888644fab7c8613b1181e71a9392a045 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 bf1d065bcab0bcaa96a40b4cccac105a78fe6d44..59d9365ade1700a945ceac41a4872d466fff070d 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 4773e27a41a100b308cec5d0fd481bb6aab1eda0..0000000000000000000000000000000000000000 --- 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 e9bac3f71077a7155cc177fcfdec82a6d492a5ab..a956c19382618caace7bac853f3cc46df105c809 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 4773e27a41a100b308cec5d0fd481bb6aab1eda0..0000000000000000000000000000000000000000 --- 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 e9bac3f71077a7155cc177fcfdec82a6d492a5ab..a956c19382618caace7bac853f3cc46df105c809 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 4773e27a41a100b308cec5d0fd481bb6aab1eda0..0000000000000000000000000000000000000000 --- 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 e9bac3f71077a7155cc177fcfdec82a6d492a5ab..a956c19382618caace7bac853f3cc46df105c809 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 e9bac3f71077a7155cc177fcfdec82a6d492a5ab..a956c19382618caace7bac853f3cc46df105c809 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 4773e27a41a100b308cec5d0fd481bb6aab1eda0..0000000000000000000000000000000000000000 --- 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 e9bac3f71077a7155cc177fcfdec82a6d492a5ab..a956c19382618caace7bac853f3cc46df105c809 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 4773e27a41a100b308cec5d0fd481bb6aab1eda0..0000000000000000000000000000000000000000 --- 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 e9bac3f71077a7155cc177fcfdec82a6d492a5ab..a956c19382618caace7bac853f3cc46df105c809 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 cdfd201c6e3f7b473122c999a060b082ddd89e9f..6f42b083edc12228b2ffbd5d5312d11f698a8e01 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 cdd6f1ed153b4a1cd79be4be725d94a30584804a..ba6f492d2eab8117367e6c092f6569a2b04bdb89 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 a90bcae2d34d2fbccfdd878af694407046d0d356..e4c518a2479c0c155c1c9a8632ef55c7cf46b3db 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 95e02c374ead3fedc9215a0921654b85fd66cc51..7b34de6ad32908b561f80fea5a0fc0017cc6c326 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 720e13925e49ff2b4c4786305ca0b6d4490d9777..0000000000000000000000000000000000000000 --- 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 a925d3cc2b28640b5aebf7779f6a9008e77b09fc..b0b4dcee0f3798851cb0b216fc804db403718c0c 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 07bd316e0ead9e2895568b2470a8ec1ba0b0d6a6..9510ee686d018cbb08dae85332b23ea32e5968e2 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 236e233b97ec469e8fb62c6152ed62a3cba26bad..8b652373baa466330cb2c6337233873c9cfa2912 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..cd2daf8229ba0b2be3dca97cab3a5c08f20b0e8a 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 f44c0bc2a6466dd353d95843f6fafb7bf8bac3da..749207137df90652316293d6f4d4a064c7fcc24f 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 1b4dbb60aaeaec2d5cfe40e3d4a35843d35b44a2..79ef3a79e11a08b76b27179d917e8348d8ae5065 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..cd2daf8229ba0b2be3dca97cab3a5c08f20b0e8a 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 3bc53475986acd3f669e5d3e4a41d86fd26a1efe..960ff2562c0b34d824a46ae2d96740ae2f462124 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 6fe05fbb320405584e13a46e4acbdb4cc7aeeb78..f24e6e1ede3d72fc52f3edde3a6aa6452bf558fd 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 49282f81f06ff1afeface41c55ac7aedfadccc14..45396d4074568170fb2be872905557cc530391f7 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..cd2daf8229ba0b2be3dca97cab3a5c08f20b0e8a 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 53bb12ff938fa8ef2ef666431c30bc477f42f156..f66e5d7c7767e5f43e319e9e1efd050495d37cad 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 3bc53475986acd3f669e5d3e4a41d86fd26a1efe..960ff2562c0b34d824a46ae2d96740ae2f462124 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 a05ac072d7ce4332529f99fa08feb3ce81242b7c..22019100ddb16e3fa1eaeb8ae76aca8e530964ac 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 34da39d900e58a47e81688d1a69958232b15cc58..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..02fa2df1b93d8d08358c3b2b17c69d5e89fe3689 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 8774b16c15f36b0d25062d5f59c65884ff7b1adf..42584c41cb54d5829e3ac53b64b978719cb5bdf7 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..cd2daf8229ba0b2be3dca97cab3a5c08f20b0e8a 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 40392f6f90a126f3c7dc7a4b82968863a778eff1..ba84fd84f3755344a527aa316be81e2d2e2c6383 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 31b1e85b563db0d867c2beaa3e498bc7ed0a3bce..b0d1f73aac1e2ed98ca29eca4959c39124a6554c 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 3721a46a2ead37eb2bf10434bcde59afa9fe9bf6..cd2daf8229ba0b2be3dca97cab3a5c08f20b0e8a 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 a121b19ddf1ae620f7dc8b1db47be23a33a6fed3..3ff478fa50b7fc5edfebfb533a62b411317997e7 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 663657c0474a857059a0fe4133ed93896a4ee84f..7f42a48fe4fa434ba0fb3c3e4b62335ca6856edb 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 2c2507cfbfb8bf1224940ba5b19d4f790cc8067a..a61518f6189fc69b971a092b159bbea76626dde3 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 ec20bc01dc69b12eccdc04c57e2e0be12a752262..0000000000000000000000000000000000000000 --- 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 bf47f69643c9925d3a1ef19c6b4ddc67cf604e0a..4564ccc46a64685c98cc53274688263dee85086a 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 8107da2ca193720996c5ec4d70558f90ef300d94..c2c3b28a1b4e8f4a2cae55f58bd61f9b1a67b488 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 ec20bc01dc69b12eccdc04c57e2e0be12a752262..0000000000000000000000000000000000000000 --- 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 1b4dbb60aaeaec2d5cfe40e3d4a35843d35b44a2..79ef3a79e11a08b76b27179d917e8348d8ae5065 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 ec20bc01dc69b12eccdc04c57e2e0be12a752262..0000000000000000000000000000000000000000 --- 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 a477fd3cba1dfb4d49afe79be92324ba5e3a1249..f1ec545053d184aaff275d632c9e063e9f00cdc8 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 ec20bc01dc69b12eccdc04c57e2e0be12a752262..0000000000000000000000000000000000000000 --- 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 188a0f0c58b018d912058f8471d3a283847f7b01..5c2a6cf99c517b8361b84403c7ca9833023efacd 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 09a9a55851d05da7dc6c64a6e800b9f5d0fe7a0e..c2c3b28a1b4e8f4a2cae55f58bd61f9b1a67b488 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 a4937b503a46850b2626f0d301e4a07b9f691507..0000000000000000000000000000000000000000 --- 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 d640b56b899086945b1961dc505e09d510abea29..2234c3afd1cc2f7664f6f603fd37f3c8ce968ca7 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 69de4bdbcd8799ab7fd8e40e0d33e6b2cf759c51..f4c635c895df0d3d0a17669b090768715cfb54fc 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 69de4bdbcd8799ab7fd8e40e0d33e6b2cf759c51..f4c635c895df0d3d0a17669b090768715cfb54fc 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 9f1495f1726fa54fb4d21f985fbb370986279000..0844c2a1e1ef52d26ce2941bdac8f90ca6ac16d3 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 51db9cc4903807c219d8b9b17d34e9318f01b154..a5bdba477d688d42f4789939a0783a6800d0e72f 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 9ff435c167a650ea9f32890706113e689a8a2de8..4f34ad12222e3165507c024bb6ed7ef69eaf0779 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 84a24f49246ed00e059462e590ef65ecab7b5723..133816f9e5c5d8d5a87e4580a1e8719c27199c50 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