CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Post-Processing (
-   -   wallShearStress vs. force functionObject (

pad August 14, 2013 02:43

wallShearStress vs. force functionObject

I have been simulating an impeller and extracting the power by using both wallShearStress utility (for moment calc. in paraview) and the force functionObject for gettting the moment directly.

Comparing the data I realized that the moment from viscous forces are in opposite direction, i.e. with wallShearStress utility and paraview I get the following moment from viscous forces

(0.300199 0.191866 1.55875)

while the force function object gives me

(-0.3002453 -0.1916713 -1.556391)

Looking at the code for wallShearStress and forces.c it seems that wallShearStress.C uses


forAll(wallShearStress.boundaryField(), patchI)
        wallShearStress.boundaryField()[patchI] =
        ) & Reff.boundaryField()[patchI];

while forces.C uses


forAllConstIter(labelHashSet, patchSet_, iter)
            label patchi = iter.key();

            vectorField Md
                mesh.C().boundaryField()[patchi] - coordSys_.origin()

            vectorField pf(Sfb[patchi]*(p.boundaryField()[patchi] - pRef));

            fm.first().first() += rho(p)*sum(pf);
            fm.second().first() += rho(p)*sum(Md ^ pf);

            vectorField vf(Sfb[patchi] & devRhoReffb[patchi]);

            fm.first().second() += sum(vf);
            fm.second().second() += sum(Md ^ vf);

Why does wallShearStress.C incorporate the neg. sign while forces.C does not? Which approach is the correct one to use when trying to calculate the pump / impeller power?

All times are GMT -4. The time now is 22:18.