diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C index 426eb5ced0..46a9468215 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C @@ -127,6 +127,10 @@ void Foam::cyclicACMIPolyPatch::setNeighbourFaceAreas() const void Foam::cyclicACMIPolyPatch::initGeometry(PstreamBuffers& pBufs) { + // initialise the AMI so that base geometry (e.g. cell volumes) are + // correctly evaluated + resetAMI(); + cyclicAMIPolyPatch::initGeometry(pBufs); } diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatchTemplates.C b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatchTemplates.C index 544a7261b3..231a2e0ba7 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatchTemplates.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatchTemplates.C @@ -32,13 +32,16 @@ Foam::tmp > Foam::cyclicACMIPolyPatch::interpolate const Field& fldNonOverlap ) const { + // note: do not scale AMI field as face areas have already been taken + // into account + if (owner()) { const scalarField& w = srcMask_; tmp > interpField(AMI().interpolateToSource(fldCouple)); - return w*interpField + (1.0 - w)*fldNonOverlap; + return interpField + (1.0 - w)*fldNonOverlap; } else { @@ -49,7 +52,7 @@ Foam::tmp > Foam::cyclicACMIPolyPatch::interpolate neighbPatch().AMI().interpolateToTarget(fldCouple) ); - return w*interpField + (1.0 - w)*fldNonOverlap; + return interpField + (1.0 - w)*fldNonOverlap; } } @@ -74,19 +77,22 @@ void Foam::cyclicACMIPolyPatch::interpolate List& result ) const { + // note: do not scale AMI field as face areas have already been taken + // into account + if (owner()) { const scalarField& w = srcMask_; AMI().interpolateToSource(fldCouple, cop, result); - result = w*result + (1.0 - w)*fldNonOverlap; + result = result + (1.0 - w)*fldNonOverlap; } else { const scalarField& w = neighbPatch().tgtMask(); neighbPatch().AMI().interpolateToTarget(fldCouple, cop, result); - result = w*result + (1.0 - w)*fldNonOverlap; + result = result + (1.0 - w)*fldNonOverlap; } }