mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: surfaceInterpolation: extended patch override of geometry calculation.
This commit is contained in:
@ -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()
|
void Foam::fvPatch::initMovePoints()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -81,6 +81,15 @@ protected:
|
|||||||
//- Make patch weighting factors
|
//- Make patch weighting factors
|
||||||
virtual void makeWeights(scalarField&) const;
|
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
|
//- Initialise the patches for moving points
|
||||||
virtual void initMovePoints();
|
virtual void initMovePoints();
|
||||||
|
|
||||||
|
|||||||
@ -246,7 +246,11 @@ void Foam::surfaceInterpolation::makeDeltaCoeffs() const
|
|||||||
|
|
||||||
forAll(deltaCoeffsBf, patchi)
|
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] =
|
patchDeltaCoeffs[patchFacei] =
|
||||||
1.0/max(unitArea & delta, 0.05*mag(delta));
|
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];
|
fvsPatchVectorField& patchCorrVecs = corrVecsBf[patchi];
|
||||||
|
|
||||||
|
const fvPatch& p = patchCorrVecs.patch();
|
||||||
|
|
||||||
if (!patchCorrVecs.coupled())
|
if (!patchCorrVecs.coupled())
|
||||||
{
|
{
|
||||||
patchCorrVecs = Zero;
|
patchCorrVecs = Zero;
|
||||||
@ -394,8 +403,6 @@ void Foam::surfaceInterpolation::makeNonOrthCorrectionVectors() const
|
|||||||
const fvsPatchScalarField& patchNonOrthDeltaCoeffs =
|
const fvsPatchScalarField& patchNonOrthDeltaCoeffs =
|
||||||
NonOrthDeltaCoeffs.boundaryField()[patchi];
|
NonOrthDeltaCoeffs.boundaryField()[patchi];
|
||||||
|
|
||||||
const fvPatch& p = patchCorrVecs.patch();
|
|
||||||
|
|
||||||
const vectorField patchDeltas(mesh_.boundary()[patchi].delta());
|
const vectorField patchDeltas(mesh_.boundary()[patchi].delta());
|
||||||
|
|
||||||
forAll(p, patchFacei)
|
forAll(p, patchFacei)
|
||||||
@ -410,6 +417,9 @@ void Foam::surfaceInterpolation::makeNonOrthCorrectionVectors() const
|
|||||||
unitArea - delta*patchNonOrthDeltaCoeffs[patchFacei];
|
unitArea - delta*patchNonOrthDeltaCoeffs[patchFacei];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Optionally correct
|
||||||
|
p.makeNonOrthoCorrVectors(patchCorrVecs);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
|
|||||||
Reference in New Issue
Block a user