mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
TurbulenceModels: updated the mapping of k to R BCs
Now k BCs which do not have a symmTensor equivalent are converted to "calculated"
This commit is contained in:
@ -84,6 +84,23 @@ Foam::eddyViscosity<BasicTurbulenceModel>::R() const
|
|||||||
{
|
{
|
||||||
tmp<volScalarField> tk(k());
|
tmp<volScalarField> tk(k());
|
||||||
|
|
||||||
|
// Get list of patchField type names from k
|
||||||
|
wordList patchFieldTypes(tk().boundaryField().types());
|
||||||
|
|
||||||
|
// For k patchField types which do not have an equivalent for symmTensor
|
||||||
|
// set to calculated
|
||||||
|
forAll(patchFieldTypes, i)
|
||||||
|
{
|
||||||
|
if
|
||||||
|
(
|
||||||
|
!fvPatchField<symmTensor>::patchConstructorTablePtr_
|
||||||
|
->found(patchFieldTypes[i])
|
||||||
|
)
|
||||||
|
{
|
||||||
|
patchFieldTypes[i] = calculatedFvPatchField<symmTensor>::typeName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return tmp<volSymmTensorField>
|
return tmp<volSymmTensorField>
|
||||||
(
|
(
|
||||||
new volSymmTensorField
|
new volSymmTensorField
|
||||||
@ -98,7 +115,7 @@ Foam::eddyViscosity<BasicTurbulenceModel>::R() const
|
|||||||
false
|
false
|
||||||
),
|
),
|
||||||
((2.0/3.0)*I)*tk() - (nut_)*dev(twoSymm(fvc::grad(this->U_))),
|
((2.0/3.0)*I)*tk() - (nut_)*dev(twoSymm(fvc::grad(this->U_))),
|
||||||
tk().boundaryField().types()
|
patchFieldTypes
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user