wedgeFvPatch: provide specialized version of delta()

to ensure than the delta vectors are normal to the wedge plane.
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1185
This commit is contained in:
Henry
2014-02-26 10:02:00 +00:00
committed by Andrew Heather
parent d9eba622c5
commit 6270f912f0
2 changed files with 14 additions and 3 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -39,7 +39,6 @@ addToRunTimeSelectionTable(fvPatch, wedgeFvPatch, polyPatch);
// * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
//- Construct from polyPatch
wedgeFvPatch::wedgeFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm)
:
fvPatch(patch, bm),
@ -47,6 +46,15 @@ wedgeFvPatch::wedgeFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::vectorField> Foam::wedgeFvPatch::delta() const
{
const vectorField nHat(nf());
return nHat*(nHat & (Cf() - Cn()));
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -83,6 +83,9 @@ public:
{
return wedgePolyPatch_.cellT();
}
//- Return cell-centre to face normal vector
virtual tmp<vectorField> delta() const;
};