fvMeshStitcher: Stabilise calculation of error face areas
This commit is contained in:
@ -987,11 +987,14 @@ void Foam::fvMeshStitchers::moving::unconformErrorFaceCorrectMeshPhi
|
||||
const label errorPatchFacei0 = 2*origPatchFacei;
|
||||
const label errorPatchFacei1 = 2*origPatchFacei + 1;
|
||||
|
||||
const vector errorSf =
|
||||
origPp.faceNormals()[origPatchFacei]
|
||||
*phi.boundaryField()[errorPatchi][errorPatchFacei0]
|
||||
const scalar a =
|
||||
phi.boundaryField()[errorPatchi][errorPatchFacei0]
|
||||
/max(meshMagUfb[origPatchi][origPatchFacei], vSmall);
|
||||
|
||||
const vector errorSf =
|
||||
sign(a)*min(mag(a), origPp.magFaceAreas()[origPatchFacei])
|
||||
*origPp.faceNormals()[origPatchFacei];
|
||||
|
||||
fvsPatchField<vector>& Sfp =
|
||||
SfSf.boundaryFieldRef()[errorPatchi];
|
||||
Sfp[errorPatchFacei0] += errorSf;
|
||||
|
||||
Reference in New Issue
Block a user