Skip to content
Snippets Groups Projects
Commit 827a27e9 authored by mattijs's avatar mattijs
Browse files

BUG: momentum: angularVelocity zero on boundary. Fixes #2157.

parent 651c7639
No related merge requests found
......@@ -177,11 +177,22 @@ void Foam::functionObjects::momentum::calc()
// Global to local
{
const auto& C = mesh_.C();
angularVel.primitiveFieldRef() =
csys_.invTransform(C, U.internalField());
angularVel.primitiveFieldRef() =
csys_.invTransform(mesh_.cellCentres(), U.internalField());
angularVel.correctBoundaryConditions();
auto& bfld = angularVel.boundaryFieldRef();
forAll(bfld, patchi)
{
bfld[patchi] = csys_.invTransform
(
C.boundaryField()[patchi],
U.boundaryField()[patchi]
);
}
angularVel.correctBoundaryConditions();
}
if (rhoPtr)
{
......
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