Skip to content
Snippets Groups Projects
Commit 9ff25596 authored by Andrew Heather's avatar Andrew Heather
Browse files

added feedback in the case that no valid nut/mut BCs are identified

parent 567453c7
Branches
Tags
No related merge requests found
...@@ -71,10 +71,13 @@ void calcIncompressibleYPlus ...@@ -71,10 +71,13 @@ void calcIncompressibleYPlus
const volScalarField::GeometricBoundaryField nutPatches = const volScalarField::GeometricBoundaryField nutPatches =
RASModel->nut()().boundaryField(); RASModel->nut()().boundaryField();
bool foundNutPatch = false;
forAll(nutPatches, patchi) forAll(nutPatches, patchi)
{ {
if (isA<wallFunctionPatchField>(nutPatches[patchi])) if (isA<wallFunctionPatchField>(nutPatches[patchi]))
{ {
foundNutPatch = true;
const wallFunctionPatchField& nutPw = const wallFunctionPatchField& nutPw =
dynamic_cast<const wallFunctionPatchField&> dynamic_cast<const wallFunctionPatchField&>
(nutPatches[patchi]); (nutPatches[patchi]);
...@@ -88,6 +91,12 @@ void calcIncompressibleYPlus ...@@ -88,6 +91,12 @@ void calcIncompressibleYPlus
<< " average: " << average(Yp) << nl << endl; << " average: " << average(Yp) << nl << endl;
} }
} }
if (!foundNutPatch)
{
Info<< " no " << wallFunctionPatchField::typeName << " patches"
<< endl;
}
} }
...@@ -142,10 +151,13 @@ void calcCompressibleYPlus ...@@ -142,10 +151,13 @@ void calcCompressibleYPlus
const volScalarField::GeometricBoundaryField mutPatches = const volScalarField::GeometricBoundaryField mutPatches =
RASModel->mut()().boundaryField(); RASModel->mut()().boundaryField();
bool foundMutPatch = false;
forAll(mutPatches, patchi) forAll(mutPatches, patchi)
{ {
if (isA<wallFunctionPatchField>(mutPatches[patchi])) if (isA<wallFunctionPatchField>(mutPatches[patchi]))
{ {
foundMutPatch = true;
const wallFunctionPatchField& mutPw = const wallFunctionPatchField& mutPw =
dynamic_cast<const wallFunctionPatchField&> dynamic_cast<const wallFunctionPatchField&>
(mutPatches[patchi]); (mutPatches[patchi]);
...@@ -159,6 +171,12 @@ void calcCompressibleYPlus ...@@ -159,6 +171,12 @@ void calcCompressibleYPlus
<< " average: " << average(Yp) << nl << endl; << " average: " << average(Yp) << nl << endl;
} }
} }
if (!foundMutPatch)
{
Info<< " no " << wallFunctionPatchField::typeName << " patches"
<< endl;
}
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment