CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (https://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   vector plus bug (https://www.cfd-online.com/Forums/openfoam-bugs/123335-vector-plus-bug.html)

 cctv September 10, 2013 07:28

vector plus bug

Hi
have you ever met a case that is when two very small negative values are plusing, the result turned out to be positive.

 Bernhard September 10, 2013 07:47

No. Give some more background and ask what you really want to ask.

Seems to be an XY problem: http://mywiki.wooledge.org/XyProblem

 cctv September 10, 2013 10:25

Quote:
 Originally Posted by Bernhard (Post 450912) No. Give some more background and ask what you really want to ask. Seems to be an XY problem: http://mywiki.wooledge.org/XyProblem
In openfoam 1.6-ext. the solver interTrackFoam
it has force calculating
vector totalForce =
interface.totalViscousForce()
+ interface.totalPressureForce();
vector freeSurface::totalPressureForce() const
{
const scalarField& S = aMesh().S();
const vectorField& n = aMesh().faceAreaNormals().internalField();
const scalarField& P = p().boundaryField()[aPatchID()];
vectorField pressureForces = S*P*n;
return gSum(pressureForces);
}
vector freeSurface::totalViscousForce() const
{
const scalarField& S = aMesh().S();
const vectorField& n = aMesh().faceAreaNormals().internalField();
vectorField viscousForces =
- muFluidA().value()*S
*(