diff --git a/applications/solvers/compressible/rhoCentralFoam/createFields.H b/applications/solvers/compressible/rhoCentralFoam/createFields.H index daf3a88435..fc65b3e5b4 100644 --- a/applications/solvers/compressible/rhoCentralFoam/createFields.H +++ b/applications/solvers/compressible/rhoCentralFoam/createFields.H @@ -7,7 +7,7 @@ autoPtr pThermo basicPsiThermo& thermo = pThermo(); volScalarField& p = thermo.p(); -volScalarField& h = thermo.h(); +volScalarField& e = thermo.e(); const volScalarField& T = thermo.T(); const volScalarField& psi = thermo.psi(); const volScalarField& mu = thermo.mu(); @@ -70,7 +70,7 @@ volScalarField rhoE IOobject::NO_READ, IOobject::NO_WRITE ), - rho*(h + 0.5*magSqr(U)) - p + rho*(e + 0.5*magSqr(U)) ); surfaceScalarField pos diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C index f418f17637..f01a2d5a8a 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C @@ -76,10 +76,10 @@ int main(int argc, char *argv[]) surfaceScalarField rPsi_neg = fvc::interpolate(rPsi, neg, "reconstruct(T)"); - surfaceScalarField h_pos = - fvc::interpolate(h, pos, "reconstruct(T)"); - surfaceScalarField h_neg = - fvc::interpolate(h, neg, "reconstruct(T)"); + surfaceScalarField e_pos = + fvc::interpolate(e, pos, "reconstruct(T)"); + surfaceScalarField e_neg = + fvc::interpolate(e, neg, "reconstruct(T)"); surfaceVectorField U_pos = rhoU_pos/rho_pos; surfaceVectorField U_neg = rhoU_neg/rho_neg; @@ -132,8 +132,8 @@ int main(int argc, char *argv[]) + (a_pos*p_pos + a_neg*p_neg)*mesh.Sf(); surfaceScalarField phiEp = - aphiv_pos*rho_pos*(h_pos + 0.5*magSqr(U_pos)) - + aphiv_neg*rho_neg*(h_neg + 0.5*magSqr(U_neg)) + aphiv_pos*(rho_pos*(e_pos + 0.5*magSqr(U_pos)) + p_pos) + + aphiv_neg*(rho_neg*(e_neg + 0.5*magSqr(U_neg)) + p_neg) + aSf*p_pos - aSf*p_neg; volTensorField tauMC("tauMC", mu*dev2(fvc::grad(U)().T())); @@ -156,7 +156,7 @@ int main(int argc, char *argv[]) { solve ( - fvm::ddt(rho, U) - fvc::ddt(rho,U) + fvm::ddt(rho, U) - fvc::ddt(rho, U) - fvm::laplacian(mu, U) - fvc::div(tauMC) ); @@ -180,28 +180,27 @@ int main(int argc, char *argv[]) - fvc::div(sigmaDotU) ); - h = (rhoE + p)/rho - 0.5*magSqr(U); - h.correctBoundaryConditions(); + e = rhoE/rho - 0.5*magSqr(U); + e.correctBoundaryConditions(); thermo.correct(); rhoE.boundaryField() = rho.boundaryField()* ( - h.boundaryField() + 0.5*magSqr(U.boundaryField()) - ) - - p.boundaryField(); + e.boundaryField() + 0.5*magSqr(U.boundaryField()) + ); if (!inviscid) { volScalarField k("k", thermo.Cp()*mu/Pr); solve ( - fvm::ddt(rho, h) - fvc::ddt(rho, h) - - fvm::laplacian(thermo.alpha(), h) - + fvc::laplacian(thermo.alpha(), h) + fvm::ddt(rho, e) - fvc::ddt(rho, e) + - fvm::laplacian(thermo.alpha(), e) + + fvc::laplacian(thermo.alpha(), e) - fvc::laplacian(k, T) ); thermo.correct(); - rhoE = rho*(h + 0.5*magSqr(U)) - p; + rhoE = rho*(e + 0.5*magSqr(U)); } p.dimensionedInternalField() = diff --git a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C index b2f31cb61c..91197141ef 100644 --- a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C +++ b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C @@ -71,10 +71,13 @@ void calcIncompressibleYPlus const volScalarField::GeometricBoundaryField nutPatches = RASModel->nut()().boundaryField(); + bool foundNutPatch = false; forAll(nutPatches, patchi) { if (isA(nutPatches[patchi])) { + foundNutPatch = true; + const wallFunctionPatchField& nutPw = dynamic_cast (nutPatches[patchi]); @@ -88,6 +91,12 @@ void calcIncompressibleYPlus << " average: " << average(Yp) << nl << endl; } } + + if (!foundNutPatch) + { + Info<< " no " << wallFunctionPatchField::typeName << " patches" + << endl; + } } @@ -142,10 +151,13 @@ void calcCompressibleYPlus const volScalarField::GeometricBoundaryField mutPatches = RASModel->mut()().boundaryField(); + bool foundMutPatch = false; forAll(mutPatches, patchi) { if (isA(mutPatches[patchi])) { + foundMutPatch = true; + const wallFunctionPatchField& mutPw = dynamic_cast (mutPatches[patchi]); @@ -159,6 +171,12 @@ void calcCompressibleYPlus << " average: " << average(Yp) << nl << endl; } } + + if (!foundMutPatch) + { + Info<< " no " << wallFunctionPatchField::typeName << " patches" + << endl; + } } diff --git a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/Make/options b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/Make/options index 89e52b6d52..1d01ecc4c3 100644 --- a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/Make/options +++ b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/Make/options @@ -1,6 +1,13 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude EXE_LIBS = \ + -lincompressibleRASModels \ + -lbasicThermophysicalModels \ + -lspecie \ + -lcompressibleRASModels \ -lfiniteVolume diff --git a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C index dde4becd3f..166386c8e3 100644 --- a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C +++ b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C @@ -26,14 +26,13 @@ Application applyWallFunctionBounaryConditions Description - Updates OpenFOAM RAS cases to use the new wall function framework + Updates OpenFOAM RAS cases to use the new (v1.6) wall function framework Attempts to determine whether case is compressible or incompressible, or can be supplied with -compressible command line argument \*---------------------------------------------------------------------------*/ - #include "argList.H" #include "fvMesh.H" #include "Time.H" @@ -42,6 +41,16 @@ Description #include "wallPolyPatch.H" +#include "incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H" +#include "incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H" +#include "incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H" +#include "incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H" + +#include "compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H" +#include "compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H" +#include "compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H" +#include "compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H" + using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -105,25 +114,6 @@ bool caseIsCompressible(const fvMesh& mesh) } } - // Attempt hydrostatic pressure field - IOobject pdHeader - ( - "pd", - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ); - - if (pdHeader.headerOk()) - { - volScalarField pd(pdHeader, mesh); - if (pd.dimensions() == dimMass/sqr(dimTime)/dimLength) - { - return true; - } - } - // If none of the above are true, assume that the case is incompressible return false; } @@ -231,15 +221,125 @@ void replaceBoundaryType } +void updateCompressibleCase(const fvMesh& mesh) +{ + Info<< "Case treated as compressible" << nl << endl; + createVolScalarField + ( + mesh, + "mut", + dimArea/dimTime*dimDensity + ); + replaceBoundaryType + ( + mesh, + "mut", + compressible::RASModels::mutWallFunctionFvPatchScalarField::typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "epsilon", + compressible::RASModels::epsilonWallFunctionFvPatchScalarField:: + typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "omega", + compressible::RASModels::omegaWallFunctionFvPatchScalarField::typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "k", + compressible::RASModels::kqRWallFunctionFvPatchField::typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "q", + compressible::RASModels::kqRWallFunctionFvPatchField::typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "R", + compressible::RASModels::kqRWallFunctionFvPatchField:: + typeName, + "(0 0 0 0 0 0)" + ); +} + + +void updateIncompressibleCase(const fvMesh& mesh) +{ + Info<< "Case treated as incompressible" << nl << endl; + createVolScalarField(mesh, "nut", dimArea/dimTime); + + replaceBoundaryType + ( + mesh, + "nut", + incompressible::RASModels::nutWallFunctionFvPatchScalarField::typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "epsilon", + incompressible::RASModels::epsilonWallFunctionFvPatchScalarField:: + typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "omega", + incompressible::RASModels::omegaWallFunctionFvPatchScalarField:: + typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "k", + incompressible::RASModels::kqRWallFunctionFvPatchField:: + typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "q", + incompressible::RASModels::kqRWallFunctionFvPatchField:: + typeName, + "0" + ); + replaceBoundaryType + ( + mesh, + "R", + incompressible::RASModels::kqRWallFunctionFvPatchField:: + typeName, + "(0 0 0 0 0 0)" + ); +} + + int main(int argc, char *argv[]) { - -# include "addTimeOptions.H" + #include "addTimeOptions.H" argList::validOptions.insert("compressible", ""); -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" bool compressible = args.optionFound("compressible"); @@ -249,28 +349,13 @@ int main(int argc, char *argv[]) if (compressible || caseIsCompressible(mesh)) { - Info<< "Case treated as compressible" << nl << endl; - createVolScalarField - ( - mesh, - "mut", - dimArea/dimTime*dimDensity - ); - replaceBoundaryType(mesh, "mut", "mutWallFunction", "0"); + updateCompressibleCase(mesh); } else { - Info<< "Case treated as incompressible" << nl << endl; - createVolScalarField(mesh, "nut", dimArea/dimTime); - replaceBoundaryType(mesh, "nut", "nutWallFunction", "0"); + updateIncompressibleCase(mesh); } - replaceBoundaryType(mesh, "epsilon", "epsilonWallFunction", "0"); - replaceBoundaryType(mesh, "omega", "omegaWallFunction", "0"); - replaceBoundaryType(mesh, "k", "kqRWallFunction", "0"); - replaceBoundaryType(mesh, "q", "kqRWallFunction", "0"); - replaceBoundaryType(mesh, "R", "kqRWallFunction", "(0 0 0 0 0 0)"); - Info<< "End\n" << endl; return 0; diff --git a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C b/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C index 0517a06ec2..886f703915 100644 --- a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C +++ b/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C @@ -29,6 +29,7 @@ License #include "perfectGas.H" #include "eConstThermo.H" +#include "hConstThermo.H" #include "janafThermo.H" #include "specieThermo.H" @@ -63,6 +64,24 @@ makeBasicPsiThermo perfectGas ); +makeBasicPsiThermo +( + ePsiThermo, + pureMixture, + constTransport, + hConstThermo, + perfectGas +); + +makeBasicPsiThermo +( + ePsiThermo, + pureMixture, + sutherlandTransport, + hConstThermo, + perfectGas +); + makeBasicPsiThermo ( ePsiThermo, diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H index a20db7eacc..2abf27b4c6 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H @@ -36,8 +36,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef alphatWallFunctionFvPatchScalarField_H -#define alphatWallFunctionFvPatchScalarField_H +#ifndef compressibleAlphatWallFunctionFvPatchScalarField_H +#define compressibleAlphatWallFunctionFvPatchScalarField_H #include "fixedValueFvPatchFields.H" diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H index 31cbf011d8..f3e8d9e23e 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H @@ -35,8 +35,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef epsilonWallFunctionFvPatchScalarField_H -#define epsilonWallFunctionFvPatchScalarField_H +#ifndef compressibleEpsilonWallFunctionFvPatchScalarField_H +#define compressibleEpsilonWallFunctionFvPatchScalarField_H #include "fixedInternalValueFvPatchField.H" diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H index 60baa36ff4..2d892bbf98 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H @@ -34,8 +34,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef kqRWallFunctionFvPatchField_H -#define kqRWallFunctionFvPatchField_H +#ifndef compressiblekqRWallFunctionFvPatchField_H +#define compressiblekqRWallFunctionFvPatchField_H #include "zeroGradientFvPatchField.H" diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H index 4cbe9ee09c..4b9679462e 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H @@ -40,8 +40,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef mutRoughWallFunctionFvPatchScalarField_H -#define mutRoughWallFunctionFvPatchScalarField_H +#ifndef compressibleMutRoughWallFunctionFvPatchScalarField_H +#define compressibleMutRoughWallFunctionFvPatchScalarField_H #include "mutWallFunctionFvPatchScalarField.H" diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H index 2414825d21..ff321bf622 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H @@ -34,8 +34,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H -#define mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H +#ifndef compressibleMutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H +#define compressibleMutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H #include "mutWallFunctionFvPatchScalarField.H" diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H index 09ba112ce4..409bc0b9eb 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H @@ -34,8 +34,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef mutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H -#define mutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H +#ifndef compressibleMutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H +#define compressibleMutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H #include "mutWallFunctionFvPatchScalarField.H" diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.H index 69f12cd87a..fc37af6d82 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.H @@ -34,8 +34,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef mutSpalartAllmarasWallFunctionFvPatchScalarField_H -#define mutSpalartAllmarasWallFunctionFvPatchScalarField_H +#ifndef compressibleMutSpalartAllmarasWallFunctionFvPatchScalarField_H +#define compressibleMutSpalartAllmarasWallFunctionFvPatchScalarField_H #include "mutWallFunctionFvPatchScalarField.H" diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H index 6134256e23..bf11c1031c 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H @@ -35,8 +35,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef mutWallFunctionFvPatchScalarField_H -#define mutWallFunctionFvPatchScalarField_H +#ifndef compressibleMutWallFunctionFvPatchScalarField_H +#define compressibleMutWallFunctionFvPatchScalarField_H #include "fixedValueFvPatchFields.H" diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H index be50b4a33f..d0b3580ee6 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H @@ -33,8 +33,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef omegaWallFunctionFvPatchScalarField_H -#define omegaWallFunctionFvPatchScalarField_H +#ifndef compressibleOmegaWallFunctionFvPatchScalarField_H +#define compressibleOmegaWallFunctionFvPatchScalarField_H #include "fixedInternalValueFvPatchField.H" diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C index c440294bad..0932bb524e 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.C @@ -155,13 +155,13 @@ SpalartAllmaras::SpalartAllmaras : LESModel(modelName, U, phi, transport), - alphaNut_ + sigmaNut_ ( dimensioned::lookupOrAddToDict ( - "alphaNut", + "sigmaNut", coeffDict_, - 1.5 + 0.66666 ) ), kappa_ @@ -169,7 +169,7 @@ SpalartAllmaras::SpalartAllmaras dimensioned::lookupOrAddToDict ( "kappa", - *this, + coeffDict_, 0.41 ) ), @@ -227,7 +227,7 @@ SpalartAllmaras::SpalartAllmaras 0.07 ) ), - Cw1_(Cb1_/sqr(kappa_) + alphaNut_*(1.0 + Cb2_)), + Cw1_(Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_), Cw2_ ( dimensioned::lookupOrAddToDict @@ -301,11 +301,11 @@ void SpalartAllmaras::correct(const tmp& gradU) + fvm::div(phi(), nuTilda_) - fvm::laplacian ( - alphaNut_*(nuTilda_ + nu()), + (nuTilda_ + nu())/sigmaNut_, nuTilda_, "laplacian(DnuTildaEff,nuTilda)" ) - - alphaNut_*Cb2_*magSqr(fvc::grad(nuTilda_)) + - Cb2_/sigmaNut_*magSqr(fvc::grad(nuTilda_)) == Cb1_*STilda*nuTilda_ - fvm::Sp(Cw1_*fw(STilda, dTilda)*nuTilda_/sqr(dTilda), nuTilda_) @@ -358,7 +358,7 @@ bool SpalartAllmaras::read() { if (LESModel::read()) { - alphaNut_.readIfPresent(coeffDict()); + sigmaNut_.readIfPresent(coeffDict()); kappa_.readIfPresent(*this); Cb1_.readIfPresent(coeffDict()); Cb2_.readIfPresent(coeffDict()); @@ -366,7 +366,7 @@ bool SpalartAllmaras::read() Cv2_.readIfPresent(coeffDict()); CDES_.readIfPresent(coeffDict()); ck_.readIfPresent(coeffDict()); - Cw1_ = Cb1_/sqr(kappa_) + alphaNut_*(1.0 + Cb2_); + Cw1_ = Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_; Cw2_.readIfPresent(coeffDict()); Cw3_.readIfPresent(coeffDict()); diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H index a1f951ac92..03058f5b68 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmaras/SpalartAllmaras.H @@ -71,7 +71,7 @@ protected: // Protected data - dimensionedScalar alphaNut_; + dimensionedScalar sigmaNut_; dimensionedScalar kappa_; diff --git a/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/constant/thermophysicalProperties index b1205e97f4..55925db292 100644 --- a/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo>>>>; +thermoType ePsiThermo>>>>; mixture air 1 28.96 1004.5 0 1.458e-06 110.4; diff --git a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/constant/thermophysicalProperties index 235296e9d8..b156eb8224 100644 --- a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/constant/thermophysicalProperties @@ -17,7 +17,7 @@ FoamFile Pr Pr [ 0 0 0 0 0 0 0 ] 0.72; -thermoType hPsiThermo>>>>; +thermoType ePsiThermo>>>>; mixture N2 1 28.01348 100 10000 1000 2.9525407 0.0013968838 -4.9262577e-07 7.8600091e-11 -4.6074978e-15 -923.93753 5.8718221 3.5309628 -0.0001236595 -5.0299339e-07 2.4352768e-09 -1.4087954e-12 -1046.9637 2.9674391 1.458e-06 110; diff --git a/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties index b59bf35129..e2ad38ed54 100644 --- a/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo>>>>; +thermoType ePsiThermo>>>>; mixture normalisedGas 1 11640.3 2.5 0 0 1; diff --git a/tutorials/compressible/rhoCentralFoam/obliqueShock/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/obliqueShock/constant/thermophysicalProperties index b59bf35129..e2ad38ed54 100644 --- a/tutorials/compressible/rhoCentralFoam/obliqueShock/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/obliqueShock/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo>>>>; +thermoType ePsiThermo>>>>; mixture normalisedGas 1 11640.3 2.5 0 0 1; diff --git a/tutorials/compressible/rhoCentralFoam/shockTube/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/shockTube/constant/thermophysicalProperties index b10f83c449..3992653087 100644 --- a/tutorials/compressible/rhoCentralFoam/shockTube/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/shockTube/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo>>>>; +thermoType ePsiThermo>>>>; mixture air 1 28.96 1004.5 2.544e+06 0 1; diff --git a/tutorials/compressible/rhoCentralFoam/wedge15Ma5/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/wedge15Ma5/constant/thermophysicalProperties index b59bf35129..e2ad38ed54 100644 --- a/tutorials/compressible/rhoCentralFoam/wedge15Ma5/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/wedge15Ma5/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo>>>>; +thermoType ePsiThermo>>>>; mixture normalisedGas 1 11640.3 2.5 0 0 1;