This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/surfaceTracking/bubbleInterTrackFoam/include/freeSurfacePatchFlowRateScaling.H

14 lines
303 B
C
Raw Normal View History

if(Pstream::master())
{
scalarField weights =
mag(phi.boundaryField()[interface.bPatchID()]);
if(mag(sum(weights)) > SMALL)
{
weights /= sum(weights);
}
phi.boundaryField()[interface.bPatchID()] -=
weights*sum(phi.boundaryField()[interface.bPatchID()]);
}