Commit 1aa09612 authored by Henry's avatar Henry
Browse files

wallGradU: Calculate patch gradient only on wall patches

parent d81d35bb
......@@ -30,6 +30,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "wallFvPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -37,9 +38,9 @@ int main(int argc, char *argv[])
{
timeSelector::addOptions();
#include "setRootCase.H"
# include "createTime.H"
#include "createTime.H"
instantList timeDirs = timeSelector::select0(runTime, args);
# include "createMesh.H"
#include "createMesh.H"
forAll(timeDirs, timeI)
{
......@@ -83,10 +84,17 @@ int main(int argc, char *argv[])
)
);
const fvPatchList& patches = mesh.boundary();
forAll(wallGradU.boundaryField(), patchi)
{
wallGradU.boundaryField()[patchi] =
-U.boundaryField()[patchi].snGrad();
const fvPatch& currPatch = patches[patchi];
if (isA<wallFvPatch>(currPatch))
{
wallGradU.boundaryField()[patchi] =
-U.boundaryField()[patchi].snGrad();
}
}
wallGradU.write();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment