ENH: Updated compressible turbulence models

This commit is contained in:
andy
2012-11-27 17:10:55 +00:00
parent 2ea1949003
commit 1e7035b32d
14 changed files with 30 additions and 18 deletions

View File

@ -169,7 +169,7 @@ public:
//- Const access to the coefficients dictionary, //- Const access to the coefficients dictionary,
// which provides info. about choice of models, // which provides info. about choice of models,
// and all related data (particularly model coefficients). // and all related data (particularly model coefficients).
inline const dictionary& coeffDict() const virtual const dictionary& coeffDict() const
{ {
return coeffDict_; return coeffDict_;
} }

View File

@ -342,7 +342,7 @@ void LRR::correct()
RASModel::correct(); RASModel::correct();
volSymmTensorField P(-twoSymm(R_ & fvc::grad(U_))); volSymmTensorField P(-twoSymm(R_ & fvc::grad(U_)));
volScalarField G("RASModel.G", 0.5*mag(tr(P))); volScalarField G(type() + ".G", 0.5*mag(tr(P)));
// Update epsilon and G at the wall // Update epsilon and G at the wall
epsilon_.boundaryField().updateCoeffs(); epsilon_.boundaryField().updateCoeffs();

View File

@ -379,7 +379,7 @@ void LaunderGibsonRSTM::correct()
} }
volSymmTensorField P(-twoSymm(R_ & fvc::grad(U_))); volSymmTensorField P(-twoSymm(R_ & fvc::grad(U_)));
volScalarField G("RASModel.G", 0.5*mag(tr(P))); volScalarField G(type() + ".G", 0.5*mag(tr(P)));
// Update epsilon and G at the wall // Update epsilon and G at the wall
epsilon_.boundaryField().updateCoeffs(); epsilon_.boundaryField().updateCoeffs();

View File

@ -304,7 +304,7 @@ void LaunderSharmaKE::correct()
} }
tmp<volTensorField> tgradU = fvc::grad(U_); tmp<volTensorField> tgradU = fvc::grad(U_);
volScalarField G("RASModel.G", mut_*(tgradU() && dev(twoSymm(tgradU())))); volScalarField G(type() + ".G", mut_*(tgradU() && dev(twoSymm(tgradU()))));
tgradU.clear(); tgradU.clear();

View File

@ -209,7 +209,7 @@ public:
} }
//- Const access to the coefficients dictionary //- Const access to the coefficients dictionary
const dictionary& coeffDict() const virtual const dictionary& coeffDict() const
{ {
return coeffDict_; return coeffDict_;
} }

View File

@ -303,7 +303,7 @@ void RNGkEpsilon::correct()
volScalarField S2((tgradU() && dev(twoSymm(tgradU())))); volScalarField S2((tgradU() && dev(twoSymm(tgradU()))));
tgradU.clear(); tgradU.clear();
volScalarField G("RASModel.G", mut_*S2); volScalarField G(type() + ".G", mut_*S2);
volScalarField eta(sqrt(mag(S2))*k_/epsilon_); volScalarField eta(sqrt(mag(S2))*k_/epsilon_);
volScalarField eta3(eta*sqr(eta)); volScalarField eta3(eta*sqr(eta));

View File

@ -76,7 +76,7 @@ tmp<volScalarField> autoCreateAlphat
if (isA<wallFvPatch>(bm[patchI])) if (isA<wallFvPatch>(bm[patchI]))
{ {
alphatBoundaryTypes[patchI] = alphatBoundaryTypes[patchI] =
RASModels::alphatWallFunctionFvPatchScalarField::typeName; alphatWallFunctionFvPatchScalarField::typeName;
} }
else else
{ {
@ -146,7 +146,7 @@ tmp<volScalarField> autoCreateMut
if (isA<wallFvPatch>(bm[patchI])) if (isA<wallFvPatch>(bm[patchI]))
{ {
mutBoundaryTypes[patchI] = mutBoundaryTypes[patchI] =
RASModels::mutkWallFunctionFvPatchScalarField::typeName; mutkWallFunctionFvPatchScalarField::typeName;
} }
else else
{ {
@ -216,7 +216,7 @@ tmp<volScalarField> autoCreateLowReMut
if (isA<wallFvPatch>(bm[patchI])) if (isA<wallFvPatch>(bm[patchI]))
{ {
mutBoundaryTypes[patchI] = mutBoundaryTypes[patchI] =
RASModels::mutLowReWallFunctionFvPatchScalarField::typeName; mutLowReWallFunctionFvPatchScalarField::typeName;
} }
else else
{ {
@ -262,7 +262,7 @@ tmp<volScalarField> autoCreateEpsilon
autoCreateWallFunctionField autoCreateWallFunctionField
< <
scalar, scalar,
RASModels::epsilonWallFunctionFvPatchScalarField epsilonWallFunctionFvPatchScalarField
> >
( (
fieldName, fieldName,
@ -281,7 +281,7 @@ tmp<volScalarField> autoCreateOmega
autoCreateWallFunctionField autoCreateWallFunctionField
< <
scalar, scalar,
RASModels::omegaWallFunctionFvPatchScalarField omegaWallFunctionFvPatchScalarField
> >
( (
fieldName, fieldName,
@ -300,7 +300,7 @@ tmp<volScalarField> autoCreateK
autoCreateWallFunctionField autoCreateWallFunctionField
< <
scalar, scalar,
RASModels::kqRWallFunctionFvPatchField<scalar> kqRWallFunctionFvPatchField<scalar>
> >
( (
fieldName, fieldName,
@ -319,7 +319,7 @@ tmp<volScalarField> autoCreateQ
autoCreateWallFunctionField autoCreateWallFunctionField
< <
scalar, scalar,
RASModels::kqRWallFunctionFvPatchField<scalar> kqRWallFunctionFvPatchField<scalar>
> >
( (
fieldName, fieldName,
@ -338,7 +338,7 @@ tmp<volSymmTensorField> autoCreateR
autoCreateWallFunctionField autoCreateWallFunctionField
< <
symmTensor, symmTensor,
RASModels::kqRWallFunctionFvPatchField<symmTensor> kqRWallFunctionFvPatchField<symmTensor>
> >
( (
fieldName, fieldName,

View File

@ -281,7 +281,7 @@ void kEpsilon::correct()
} }
tmp<volTensorField> tgradU = fvc::grad(U_); tmp<volTensorField> tgradU = fvc::grad(U_);
volScalarField G("RASModel.G", mut_*(tgradU() && dev(twoSymm(tgradU())))); volScalarField G(type() + ".G", mut_*(tgradU() && dev(twoSymm(tgradU()))));
tgradU.clear(); tgradU.clear();
// Update epsilon and G at the wall // Update epsilon and G at the wall

View File

@ -392,7 +392,7 @@ void kOmegaSST::correct()
tmp<volTensorField> tgradU = fvc::grad(U_); tmp<volTensorField> tgradU = fvc::grad(U_);
volScalarField S2(2*magSqr(symm(tgradU()))); volScalarField S2(2*magSqr(symm(tgradU())));
volScalarField GbyMu((tgradU() && dev(twoSymm(tgradU())))); volScalarField GbyMu((tgradU() && dev(twoSymm(tgradU()))));
volScalarField G("RASModel.G", mut_*GbyMu); volScalarField G(type() + ".G", mut_*GbyMu);
tgradU.clear(); tgradU.clear();
// Update omega and G at the wall // Update omega and G at the wall

View File

@ -321,7 +321,7 @@ void realizableKE::correct()
volScalarField eta(magS*k_/epsilon_); volScalarField eta(magS*k_/epsilon_);
volScalarField C1(max(eta/(scalar(5) + eta), scalar(0.43))); volScalarField C1(max(eta/(scalar(5) + eta), scalar(0.43)));
volScalarField G("RASModel.G", mut_*(gradU && dev(twoSymm(gradU)))); volScalarField G(type() + ".G", mut_*(gradU && dev(twoSymm(gradU))));
// Update epsilon and G at the wall // Update epsilon and G at the wall
epsilon_.boundaryField().updateCoeffs(); epsilon_.boundaryField().updateCoeffs();

View File

@ -398,7 +398,7 @@ void v2f::correct()
const volTensorField gradU(fvc::grad(U_)); const volTensorField gradU(fvc::grad(U_));
const volScalarField S2(2*magSqr(dev(symm(gradU)))); const volScalarField S2(2*magSqr(dev(symm(gradU))));
const volScalarField G("RASModel.G", mut_*S2); const volScalarField G(type() + ".G", mut_*S2);
const volScalarField T(Ts()); const volScalarField T(Ts());
const volScalarField L2("v2f.L2", sqr(Ls())); const volScalarField L2("v2f.L2", sqr(Ls()));
const volScalarField alpha const volScalarField alpha

View File

@ -79,6 +79,12 @@ autoPtr<laminar> laminar::New
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const dictionary& laminar::coeffDict() const
{
return dictionary::null;
}
tmp<volScalarField> laminar::mut() const tmp<volScalarField> laminar::mut() const
{ {
return tmp<volScalarField> return tmp<volScalarField>

View File

@ -91,6 +91,9 @@ public:
// Member Functions // Member Functions
//- Const access to the coefficients dictionary
virtual const dictionary& coeffDict() const;
//- Return the turbulence viscosity, i.e. 0 for laminar flow //- Return the turbulence viscosity, i.e. 0 for laminar flow
virtual tmp<volScalarField> mut() const; virtual tmp<volScalarField> mut() const;

View File

@ -158,6 +158,9 @@ public:
// Member Functions // Member Functions
//- Const access to the coefficients dictionary
virtual const dictionary& coeffDict() const = 0;
//- Access function to density field //- Access function to density field
const volScalarField& rho() const const volScalarField& rho() const
{ {