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 errorPatchFacei0 = 2*origPatchFacei;
|
||||||
const label errorPatchFacei1 = 2*origPatchFacei + 1;
|
const label errorPatchFacei1 = 2*origPatchFacei + 1;
|
||||||
|
|
||||||
const vector errorSf =
|
const scalar a =
|
||||||
origPp.faceNormals()[origPatchFacei]
|
phi.boundaryField()[errorPatchi][errorPatchFacei0]
|
||||||
*phi.boundaryField()[errorPatchi][errorPatchFacei0]
|
|
||||||
/max(meshMagUfb[origPatchi][origPatchFacei], vSmall);
|
/max(meshMagUfb[origPatchi][origPatchFacei], vSmall);
|
||||||
|
|
||||||
|
const vector errorSf =
|
||||||
|
sign(a)*min(mag(a), origPp.magFaceAreas()[origPatchFacei])
|
||||||
|
*origPp.faceNormals()[origPatchFacei];
|
||||||
|
|
||||||
fvsPatchField<vector>& Sfp =
|
fvsPatchField<vector>& Sfp =
|
||||||
SfSf.boundaryFieldRef()[errorPatchi];
|
SfSf.boundaryFieldRef()[errorPatchi];
|
||||||
Sfp[errorPatchFacei0] += errorSf;
|
Sfp[errorPatchFacei0] += errorSf;
|
||||||
|
|||||||
Reference in New Issue
Block a user