2012-09-11 15:42:55 +00:00
|
|
|
{
|
2014-06-01 18:12:52 +00:00
|
|
|
const vectorField& solidPatchDisplacement =
|
2012-09-11 15:42:55 +00:00
|
|
|
DU.boundaryField()[solidPatchID];
|
|
|
|
|
|
|
|
vectorField solidZoneDisplacement
|
|
|
|
(
|
2014-06-01 18:12:52 +00:00
|
|
|
stressMesh.faceZones()[solidZoneID]().size(),
|
2012-09-11 15:42:55 +00:00
|
|
|
vector::zero
|
|
|
|
);
|
|
|
|
|
2014-06-01 18:12:52 +00:00
|
|
|
const label solidPatchStart =
|
2012-09-11 15:42:55 +00:00
|
|
|
stressMesh.boundaryMesh()[solidPatchID].start();
|
|
|
|
|
|
|
|
forAll(solidPatchDisplacement, i)
|
|
|
|
{
|
|
|
|
solidZoneDisplacement
|
|
|
|
[
|
|
|
|
stressMesh.faceZones()[solidZoneID]
|
|
|
|
.whichFace(solidPatchStart + i)
|
2014-06-01 18:12:52 +00:00
|
|
|
] =
|
2012-09-11 15:42:55 +00:00
|
|
|
solidPatchDisplacement[i];
|
|
|
|
}
|
|
|
|
|
|
|
|
// Parallel data exchange: collect displacement field on all processors
|
|
|
|
reduce(solidZoneDisplacement, sumOp<vectorField>());
|
|
|
|
|
|
|
|
vectorField fluidZoneDisplacement =
|
|
|
|
interpolatorSolidFluid.faceInterpolate
|
|
|
|
(
|
|
|
|
solidZoneDisplacement
|
|
|
|
);
|
|
|
|
|
|
|
|
vectorField fluidPatchDisplacement
|
|
|
|
(
|
|
|
|
mesh.boundary()[fluidPatchID].size(),
|
|
|
|
vector::zero
|
|
|
|
);
|
|
|
|
|
2014-06-01 18:12:52 +00:00
|
|
|
const label fluidPatchStart =
|
2012-09-11 15:42:55 +00:00
|
|
|
mesh.boundaryMesh()[fluidPatchID].start();
|
|
|
|
|
|
|
|
forAll(fluidPatchDisplacement, i)
|
|
|
|
{
|
|
|
|
fluidPatchDisplacement[i] =
|
|
|
|
fluidZoneDisplacement
|
|
|
|
[
|
|
|
|
mesh.faceZones()[fluidZoneID].whichFace(fluidPatchStart + i)
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
primitivePatchInterpolation fluidPatchInterpolator
|
|
|
|
(
|
|
|
|
mesh.boundaryMesh()[fluidPatchID]
|
|
|
|
);
|
|
|
|
|
|
|
|
solidPatchPointsDispl =
|
|
|
|
fluidPatchInterpolator.faceToPointInterpolate
|
|
|
|
(
|
|
|
|
fluidPatchDisplacement
|
|
|
|
);
|
|
|
|
|
|
|
|
fsiResidualOld = fsiResidual;
|
|
|
|
|
|
|
|
fsiResidual = solidPatchPointsDispl - fluidPatchPointsDispl;
|
|
|
|
|
2014-06-01 18:12:52 +00:00
|
|
|
// maxFsiResidual =
|
2012-09-11 15:42:55 +00:00
|
|
|
// gMax
|
|
|
|
// (
|
|
|
|
// mag(fsiResidual)
|
|
|
|
// /(mag(solidPatchPointsDispl) + SMALL)
|
|
|
|
// );
|
|
|
|
|
|
|
|
// Info << "Maximal fsi residual: " << maxFsiResidual << endl;
|
|
|
|
|
|
|
|
fsiResidualNorm = ::sqrt(gSum(magSqr(fsiResidual)));
|
|
|
|
|
|
|
|
if (outerCorr == 1)
|
|
|
|
{
|
|
|
|
initialFsiResidualNorm = fsiResidualNorm;
|
|
|
|
}
|
|
|
|
|
|
|
|
fsiResidualNorm /= initialFsiResidualNorm + SMALL;
|
|
|
|
|
|
|
|
Info << "Current fsi residual norm: " << fsiResidualNorm << endl;
|
|
|
|
}
|