wallGradU: Calculate patch gradient only on wall patches

This commit is contained in:
Henry
2013-04-08 15:38:22 +01:00
parent d81d35bbc0
commit 1aa09612e5

View File

@ -30,6 +30,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "wallFvPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -83,11 +84,18 @@ int main(int argc, char *argv[])
)
);
const fvPatchList& patches = mesh.boundary();
forAll(wallGradU.boundaryField(), patchi)
{
const fvPatch& currPatch = patches[patchi];
if (isA<wallFvPatch>(currPatch))
{
wallGradU.boundaryField()[patchi] =
-U.boundaryField()[patchi].snGrad();
}
}
wallGradU.write();
}