diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C index 2b0b8ee5cba6e28b171382559c7eb6c205e1c5b4..b100323976d3f15a0bafe2adc491f0e7b06a119a 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C @@ -167,6 +167,18 @@ void Foam::fvPatch::makeWeights(scalarField& w) const } +void Foam::fvPatch::makeDeltaCoeffs(scalarField& w) const +{} + + +void Foam::fvPatch::makeNonOrthoDeltaCoeffs(scalarField& w) const +{} + + +void Foam::fvPatch::makeNonOrthoCorrVectors(vectorField& w) const +{} + + void Foam::fvPatch::initMovePoints() {} diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H index 7f1e99775f9beda654b35a3285f5812bcdf4b442..3a04adfb38f06e0dec75600fbe38a75b4d2082a9 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H @@ -81,6 +81,15 @@ protected: //- Make patch weighting factors virtual void makeWeights(scalarField&) const; + //- Correct patch deltaCoeffs + virtual void makeDeltaCoeffs(scalarField&) const; + + //- Correct patch non-ortho deltaCoeffs + virtual void makeNonOrthoDeltaCoeffs(scalarField&) const; + + //- Correct patch non-ortho correction vectors + virtual void makeNonOrthoCorrVectors(vectorField&) const; + //- Initialise the patches for moving points virtual void initMovePoints(); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C index c716e1456a060ee1a870bf5af17121018cd7a778..7642933971866680ca7687b0ba82604db92cf956 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C @@ -246,7 +246,11 @@ void Foam::surfaceInterpolation::makeDeltaCoeffs() const forAll(deltaCoeffsBf, patchi) { - deltaCoeffsBf[patchi] = 1.0/mag(mesh_.boundary()[patchi].delta()); + const fvPatch& p = mesh_.boundary()[patchi]; + deltaCoeffsBf[patchi] = 1.0/mag(p.delta()); + + // Optionally correct + p.makeDeltaCoeffs(deltaCoeffsBf[patchi]); } } @@ -329,6 +333,9 @@ void Foam::surfaceInterpolation::makeNonOrthDeltaCoeffs() const patchDeltaCoeffs[patchFacei] = 1.0/max(unitArea & delta, 0.05*mag(delta)); } + + // Optionally correct + p.makeNonOrthoDeltaCoeffs(patchDeltaCoeffs); } } @@ -385,6 +392,8 @@ void Foam::surfaceInterpolation::makeNonOrthCorrectionVectors() const { fvsPatchVectorField& patchCorrVecs = corrVecsBf[patchi]; + const fvPatch& p = patchCorrVecs.patch(); + if (!patchCorrVecs.coupled()) { patchCorrVecs = Zero; @@ -394,8 +403,6 @@ void Foam::surfaceInterpolation::makeNonOrthCorrectionVectors() const const fvsPatchScalarField& patchNonOrthDeltaCoeffs = NonOrthDeltaCoeffs.boundaryField()[patchi]; - const fvPatch& p = patchCorrVecs.patch(); - const vectorField patchDeltas(mesh_.boundary()[patchi].delta()); forAll(p, patchFacei) @@ -410,6 +417,9 @@ void Foam::surfaceInterpolation::makeNonOrthCorrectionVectors() const unitArea - delta*patchNonOrthDeltaCoeffs[patchFacei]; } } + + // Optionally correct + p.makeNonOrthoCorrVectors(patchCorrVecs); } if (debug)