Immersed boundary updates in fvMesh and patches
This commit is contained in:
parent
c6c7720f36
commit
140a0f45e2
30 changed files with 252 additions and 111 deletions
|
@ -28,6 +28,7 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "coupledFvPatch.H"
|
||||
#include "fvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -47,7 +48,7 @@ coupledFvPatch::~coupledFvPatch()
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void coupledFvPatch::makeCorrVecs(vectorField& cv) const
|
||||
void coupledFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const
|
||||
{
|
||||
// Calculate correction vectors on coupled patches
|
||||
const scalarField& patchDeltaCoeffs = deltaCoeffs();
|
||||
|
|
|
@ -64,13 +64,13 @@ protected:
|
|||
// Protected Member Functions
|
||||
|
||||
//- Make patch weighting factors
|
||||
virtual void makeWeights(scalarField&) const = 0;
|
||||
virtual void makeWeights(fvsPatchScalarField&) const = 0;
|
||||
|
||||
//- Make patch face - neighbour cell distances
|
||||
virtual void makeDeltaCoeffs(scalarField&) const = 0;
|
||||
virtual void makeDeltaCoeffs(fvsPatchScalarField&) const = 0;
|
||||
|
||||
//- Make patch face non-orthogonality correction vectors
|
||||
virtual void makeCorrVecs(vectorField&) const;
|
||||
virtual void makeCorrVecs(fvsPatchVectorField&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
@ -24,8 +24,11 @@ License
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "cyclicFvPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvMesh.H"
|
||||
#include "fvPatchFields.H"
|
||||
#include "fvsPatchFields.H"
|
||||
#include "slicedSurfaceFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -40,8 +43,18 @@ addToRunTimeSelectionTable(fvPatch, cyclicFvPatch, polyPatch);
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
// Make mesh cell centres. Moved from fvMeshGeometry
|
||||
void cyclicFvPatch::makeC(slicedSurfaceVectorField& C) const
|
||||
{
|
||||
C.boundaryField()[index()].UList<vector>::operator=
|
||||
(
|
||||
patchSlice(cyclicPolyPatch_.boundaryMesh().mesh().faceCentres())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Make patch weighting factors
|
||||
void cyclicFvPatch::makeWeights(scalarField& w) const
|
||||
void cyclicFvPatch::makeWeights(fvsPatchScalarField& w) const
|
||||
{
|
||||
const scalarField& magFa = magSf();
|
||||
|
||||
|
@ -89,7 +102,7 @@ void cyclicFvPatch::makeWeights(scalarField& w) const
|
|||
{
|
||||
scalar avFa = (magFa[errorFace] + magFa[errorFace + sizeby2])/2.0;
|
||||
|
||||
FatalErrorIn("cyclicFvPatch::makeWeights(scalarField& w) const")
|
||||
FatalErrorIn("cyclicFvPatch::makeWeights(fvsPatchScalarField& w) const")
|
||||
<< "face " << errorFace << " and " << errorFace + sizeby2
|
||||
<< " areas do not match by "
|
||||
<< 100*mag(magFa[errorFace] - magFa[errorFace + sizeby2])/avFa
|
||||
|
@ -102,7 +115,7 @@ void cyclicFvPatch::makeWeights(scalarField& w) const
|
|||
|
||||
|
||||
// Make patch face - neighbour cell distances
|
||||
void cyclicFvPatch::makeDeltaCoeffs(scalarField& dc) const
|
||||
void cyclicFvPatch::makeDeltaCoeffs(fvsPatchScalarField& dc) const
|
||||
{
|
||||
vectorField d = delta();
|
||||
vectorField n = nf();
|
||||
|
|
|
@ -55,6 +55,7 @@ class cyclicFvPatch
|
|||
{
|
||||
// Private data
|
||||
|
||||
//- Reference to cyclicPolyPatch
|
||||
const cyclicPolyPatch& cyclicPolyPatch_;
|
||||
|
||||
|
||||
|
@ -62,11 +63,19 @@ protected:
|
|||
|
||||
// Protected Member functions
|
||||
|
||||
//- Make patch weighting factors
|
||||
void makeWeights(scalarField&) const;
|
||||
// Geometry correction functions
|
||||
|
||||
//- Make patch face - neighbour cell distances
|
||||
void makeDeltaCoeffs(scalarField&) const;
|
||||
//- Make mesh cell centres. Moved from fvMeshGeometry
|
||||
virtual void makeC(slicedSurfaceVectorField&) const;
|
||||
|
||||
|
||||
// Discretisation correction functions
|
||||
|
||||
//- Make patch weighting factors
|
||||
void makeWeights(fvsPatchScalarField&) const;
|
||||
|
||||
//- Make patch face - neighbour cell distances
|
||||
void makeDeltaCoeffs(fvsPatchScalarField&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
@ -30,8 +30,12 @@ Contributor
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "cyclicGgiFvPatch.H"
|
||||
#include "fvMesh.H"
|
||||
#include "fvPatchFields.H"
|
||||
#include "fvPatchFields.H"
|
||||
#include "fvsPatchFields.H"
|
||||
#include "slicedSurfaceFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvBoundaryMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -44,8 +48,18 @@ namespace Foam
|
|||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
// Make mesh cell centres. Moved from fvMeshGeometry
|
||||
void Foam::cyclicGgiFvPatch::makeC(slicedSurfaceVectorField& C) const
|
||||
{
|
||||
C.boundaryField()[index()].UList<vector>::operator=
|
||||
(
|
||||
patchSlice(cyclicGgiPolyPatch_.boundaryMesh().mesh().faceCentres())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Make patch weighting factors
|
||||
void Foam::cyclicGgiFvPatch::makeWeights(scalarField& w) const
|
||||
void Foam::cyclicGgiFvPatch::makeWeights(fvsPatchScalarField& w) const
|
||||
{
|
||||
// Calculation of weighting factors is performed from the master
|
||||
// position, using reconstructed shadow cell centres
|
||||
|
@ -77,7 +91,12 @@ void Foam::cyclicGgiFvPatch::makeWeights(scalarField& w) const
|
|||
else
|
||||
{
|
||||
// Pick up weights from the master side
|
||||
scalarField masterWeights(shadow().size());
|
||||
fvsPatchScalarField masterWeights
|
||||
(
|
||||
shadow(),
|
||||
w.dimensionedInternalField()
|
||||
);
|
||||
|
||||
shadow().makeWeights(masterWeights);
|
||||
|
||||
w = interpolate(1 - masterWeights);
|
||||
|
@ -93,7 +112,7 @@ void Foam::cyclicGgiFvPatch::makeWeights(scalarField& w) const
|
|||
|
||||
|
||||
// Make patch face - neighbour cell distances
|
||||
void Foam::cyclicGgiFvPatch::makeDeltaCoeffs(scalarField& dc) const
|
||||
void Foam::cyclicGgiFvPatch::makeDeltaCoeffs(fvsPatchScalarField& dc) const
|
||||
{
|
||||
if (cyclicGgiPolyPatch_.master())
|
||||
{
|
||||
|
@ -111,8 +130,14 @@ void Foam::cyclicGgiFvPatch::makeDeltaCoeffs(scalarField& dc) const
|
|||
}
|
||||
else
|
||||
{
|
||||
scalarField masterDeltas(shadow().size());
|
||||
fvsPatchScalarField masterDeltas
|
||||
(
|
||||
shadow(),
|
||||
dc.dimensionedInternalField()
|
||||
);
|
||||
|
||||
shadow().makeDeltaCoeffs(masterDeltas);
|
||||
|
||||
dc = interpolate(masterDeltas);
|
||||
|
||||
if (bridgeOverlap())
|
||||
|
|
|
@ -67,11 +67,19 @@ protected:
|
|||
|
||||
// Protected Member functions
|
||||
|
||||
//- Make patch weighting factors
|
||||
virtual void makeWeights(scalarField&) const;
|
||||
// Geometry correction functions
|
||||
|
||||
//- Make patch face - neighbour cell distances
|
||||
virtual void makeDeltaCoeffs(scalarField&) const;
|
||||
//- Make mesh cell centres. Moved from fvMeshGeometry
|
||||
virtual void makeC(slicedSurfaceVectorField&) const;
|
||||
|
||||
|
||||
// Discretisation correction functions
|
||||
|
||||
//- Make patch weighting factors
|
||||
void makeWeights(fvsPatchScalarField&) const;
|
||||
|
||||
//- Make patch face - neighbour cell distances
|
||||
void makeDeltaCoeffs(fvsPatchScalarField&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
@ -34,8 +34,9 @@ Contributor
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "ggiFvPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFields.H"
|
||||
#include "fvBoundaryMesh.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -55,7 +56,7 @@ Foam::ggiFvPatch::~ggiFvPatch()
|
|||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
// Make patch weighting factors
|
||||
void Foam::ggiFvPatch::makeWeights(scalarField& w) const
|
||||
void Foam::ggiFvPatch::makeWeights(fvsPatchScalarField& w) const
|
||||
{
|
||||
// Calculation of weighting factors is performed from the master
|
||||
// position, using reconstructed shadow cell centres
|
||||
|
@ -84,7 +85,12 @@ void Foam::ggiFvPatch::makeWeights(scalarField& w) const
|
|||
else
|
||||
{
|
||||
// Pick up weights from the master side
|
||||
scalarField masterWeights(shadow().size());
|
||||
fvsPatchScalarField masterWeights
|
||||
(
|
||||
shadow(),
|
||||
w.dimensionedInternalField()
|
||||
);
|
||||
|
||||
shadow().makeWeights(masterWeights);
|
||||
|
||||
scalarField oneMinusW = 1 - masterWeights;
|
||||
|
@ -102,7 +108,7 @@ void Foam::ggiFvPatch::makeWeights(scalarField& w) const
|
|||
|
||||
|
||||
// Make patch face - neighbour cell distances
|
||||
void Foam::ggiFvPatch::makeDeltaCoeffs(scalarField& dc) const
|
||||
void Foam::ggiFvPatch::makeDeltaCoeffs(fvsPatchScalarField& dc) const
|
||||
{
|
||||
if (ggiPolyPatch_.master())
|
||||
{
|
||||
|
@ -120,8 +126,14 @@ void Foam::ggiFvPatch::makeDeltaCoeffs(scalarField& dc) const
|
|||
}
|
||||
else
|
||||
{
|
||||
scalarField masterDeltas(shadow().size());
|
||||
fvsPatchScalarField masterDeltas
|
||||
(
|
||||
shadow(),
|
||||
dc.dimensionedInternalField()
|
||||
);
|
||||
|
||||
shadow().makeDeltaCoeffs(masterDeltas);
|
||||
|
||||
dc = interpolate(masterDeltas);
|
||||
|
||||
if (bridgeOverlap())
|
||||
|
@ -135,7 +147,7 @@ void Foam::ggiFvPatch::makeDeltaCoeffs(scalarField& dc) const
|
|||
|
||||
|
||||
// Make patch face non-orthogonality correction vectors
|
||||
void Foam::ggiFvPatch::makeCorrVecs(vectorField& cv) const
|
||||
void Foam::ggiFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const
|
||||
{
|
||||
// Non-orthogonality correction on a ggi interface
|
||||
// MB, 7/April/2009
|
||||
|
@ -239,7 +251,7 @@ const Foam::labelList& Foam::ggiFvPatch::zoneAddressing() const
|
|||
}
|
||||
|
||||
|
||||
const Foam::labelListList& Foam::ggiFvPatch::addressing() const
|
||||
const Foam::labelListList& Foam::ggiFvPatch::ggiAddressing() const
|
||||
{
|
||||
if (ggiPolyPatch_.master())
|
||||
{
|
||||
|
@ -264,7 +276,7 @@ const Foam::mapDistribute& Foam::ggiFvPatch::map() const
|
|||
}
|
||||
|
||||
|
||||
const Foam::scalarListList& Foam::ggiFvPatch::weights() const
|
||||
const Foam::scalarListList& Foam::ggiFvPatch::ggiWeights() const
|
||||
{
|
||||
if (ggiPolyPatch_.master())
|
||||
{
|
||||
|
@ -325,7 +337,7 @@ void Foam::ggiFvPatch::expandCrMatrixToZone(crMatrix& patchP) const
|
|||
{
|
||||
nZoneEntries += zoneColsFF[zfI].size();
|
||||
}
|
||||
|
||||
|
||||
// Reconstruct matrix
|
||||
labelList zoneRowStart(zoneSize() + 1);
|
||||
labelList zoneCols(nZoneEntries);
|
||||
|
@ -334,12 +346,12 @@ void Foam::ggiFvPatch::expandCrMatrixToZone(crMatrix& patchP) const
|
|||
zoneRowStart[0] = 0;
|
||||
// Reset nZoneEntries for use as a counter
|
||||
nZoneEntries = 0;
|
||||
|
||||
|
||||
forAll(zoneColsFF, zfI)
|
||||
{
|
||||
const labelField& curCols = zoneColsFF[zfI];
|
||||
const scalarField& corCoeffs = zoneCoeffsFF[zfI];
|
||||
|
||||
|
||||
zoneRowStart[zfI + 1] = zoneRowStart[zfI] + curCols.size();
|
||||
|
||||
forAll (curCols, coeffI)
|
||||
|
@ -358,7 +370,7 @@ void Foam::ggiFvPatch::expandCrMatrixToZone(crMatrix& patchP) const
|
|||
);
|
||||
|
||||
// Set coeffs
|
||||
patchP.coeffs() = zoneCoeffs;
|
||||
patchP.coeffs() = zoneCoeffs;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -67,13 +67,13 @@ protected:
|
|||
// Protected Member functions
|
||||
|
||||
//- Make patch weighting factors
|
||||
virtual void makeWeights(scalarField&) const;
|
||||
virtual void makeWeights(fvsPatchScalarField&) const;
|
||||
|
||||
//- Make patch face - neighbour cell distances
|
||||
virtual void makeDeltaCoeffs(scalarField&) const;
|
||||
virtual void makeDeltaCoeffs(fvsPatchScalarField&) const;
|
||||
|
||||
//- Make patch face non-orthogonality correction vectors
|
||||
virtual void makeCorrVecs(vectorField&) const;
|
||||
virtual void makeCorrVecs(fvsPatchVectorField&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
@ -180,7 +180,7 @@ public:
|
|||
|
||||
//- Return addressing. Master side returns own addressing and
|
||||
// slave side returns addressing from master
|
||||
virtual const labelListList& addressing() const;
|
||||
virtual const labelListList& ggiAddressing() const;
|
||||
|
||||
//- Is the patch localised on a single processor
|
||||
virtual bool localParallel() const;
|
||||
|
@ -190,7 +190,7 @@ public:
|
|||
|
||||
//- Return weights. Master side returns own weights and
|
||||
// slave side returns weights from master
|
||||
virtual const scalarListList& weights() const;
|
||||
virtual const scalarListList& ggiWeights() const;
|
||||
|
||||
//- Return face transformation tensor
|
||||
virtual const tensorField& forwardT() const
|
||||
|
|
|
@ -34,8 +34,10 @@ Contributor
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "mixingPlaneFvPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFields.H"
|
||||
#include "fvsPatchFields.H"
|
||||
#include "fvBoundaryMesh.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -55,7 +57,7 @@ Foam::mixingPlaneFvPatch::~mixingPlaneFvPatch()
|
|||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
// Make patch weighting factors
|
||||
void Foam::mixingPlaneFvPatch::makeWeights(scalarField& w) const
|
||||
void Foam::mixingPlaneFvPatch::makeWeights(fvsPatchScalarField& w) const
|
||||
{
|
||||
// Calculation of weighting factors is performed from the master
|
||||
// position, using reconstructed shadow cell centres
|
||||
|
@ -76,7 +78,12 @@ void Foam::mixingPlaneFvPatch::makeWeights(scalarField& w) const
|
|||
else
|
||||
{
|
||||
// Pick up weights from the master side
|
||||
scalarField masterWeights(shadow().size());
|
||||
fvsPatchScalarField masterWeights
|
||||
(
|
||||
shadow(),
|
||||
w.dimensionedInternalField()
|
||||
);
|
||||
|
||||
shadow().makeWeights(masterWeights);
|
||||
|
||||
scalarField oneMinusW = 1 - masterWeights;
|
||||
|
@ -86,7 +93,7 @@ void Foam::mixingPlaneFvPatch::makeWeights(scalarField& w) const
|
|||
}
|
||||
|
||||
|
||||
void Foam::mixingPlaneFvPatch::makeDeltaCoeffs(scalarField& dc) const
|
||||
void Foam::mixingPlaneFvPatch::makeDeltaCoeffs(fvsPatchScalarField& dc) const
|
||||
{
|
||||
if (mixingPlanePolyPatch_.master())
|
||||
{
|
||||
|
@ -97,14 +104,20 @@ void Foam::mixingPlaneFvPatch::makeDeltaCoeffs(scalarField& dc) const
|
|||
}
|
||||
else
|
||||
{
|
||||
scalarField masterDeltas(shadow().size());
|
||||
fvsPatchScalarField masterDeltas
|
||||
(
|
||||
shadow(),
|
||||
dc.dimensionedInternalField()
|
||||
);
|
||||
|
||||
shadow().makeDeltaCoeffs(masterDeltas);
|
||||
|
||||
dc = interpolate(masterDeltas);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::mixingPlaneFvPatch::makeCorrVecs(vectorField& cv) const
|
||||
void Foam::mixingPlaneFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const
|
||||
{
|
||||
cv = vector::zero;
|
||||
#if 0
|
||||
|
@ -171,7 +184,7 @@ Foam::mixingPlaneFvPatch::shadowInterface() const
|
|||
}
|
||||
|
||||
|
||||
const Foam::labelListList& Foam::mixingPlaneFvPatch::addressing() const
|
||||
const Foam::labelListList& Foam::mixingPlaneFvPatch::ggiAddressing() const
|
||||
{
|
||||
if (mixingPlanePolyPatch_.master())
|
||||
{
|
||||
|
@ -184,7 +197,7 @@ const Foam::labelListList& Foam::mixingPlaneFvPatch::addressing() const
|
|||
}
|
||||
|
||||
|
||||
const Foam::scalarListList& Foam::mixingPlaneFvPatch::weights() const
|
||||
const Foam::scalarListList& Foam::mixingPlaneFvPatch::ggiWeights() const
|
||||
{
|
||||
if (mixingPlanePolyPatch_.master())
|
||||
{
|
||||
|
|
|
@ -70,13 +70,13 @@ protected:
|
|||
// Protected Member functions
|
||||
|
||||
//- Make patch weighting factors
|
||||
virtual void makeWeights(scalarField&) const;
|
||||
virtual void makeWeights(fvsPatchScalarField&) const;
|
||||
|
||||
//- Make patch face - neighbour cell distances
|
||||
virtual void makeDeltaCoeffs(scalarField&) const;
|
||||
virtual void makeDeltaCoeffs(fvsPatchScalarField&) const;
|
||||
|
||||
//- Make patch face non-orthogonality correction vectors
|
||||
virtual void makeCorrVecs(vectorField&) const;
|
||||
virtual void makeCorrVecs(fvsPatchVectorField&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
@ -219,11 +219,11 @@ public:
|
|||
|
||||
//- Return addressing. Master side returns own addressing and
|
||||
// slave side returns addressing from master
|
||||
virtual const labelListList& addressing() const;
|
||||
virtual const labelListList& ggiAddressing() const;
|
||||
|
||||
//- Return weights. Master side returns own weights and
|
||||
// slave side returns weights from master
|
||||
virtual const scalarListList& weights() const;
|
||||
virtual const scalarListList& ggiWeights() const;
|
||||
|
||||
//- Return face transformation tensor
|
||||
virtual const tensorField& forwardT() const
|
||||
|
|
|
@ -27,8 +27,10 @@ Author
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "overlapGgiFvPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFields.H"
|
||||
#include "fvsPatchFields.H"
|
||||
#include "fvBoundaryMesh.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -42,7 +44,7 @@ namespace Foam
|
|||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
// Make patch weighting factors
|
||||
void Foam::overlapGgiFvPatch::makeWeights(scalarField& w) const
|
||||
void Foam::overlapGgiFvPatch::makeWeights(fvsPatchScalarField& w) const
|
||||
{
|
||||
// Calculation of weighting factors is performed from the master
|
||||
// position, using reconstructed shadow cell centres
|
||||
|
@ -64,7 +66,12 @@ void Foam::overlapGgiFvPatch::makeWeights(scalarField& w) const
|
|||
else
|
||||
{
|
||||
// Pick up weights from the master side
|
||||
scalarField masterWeights(shadow().size());
|
||||
fvsPatchScalarField masterWeights
|
||||
(
|
||||
shadow(),
|
||||
w.dimensionedInternalField()
|
||||
);
|
||||
|
||||
shadow().makeWeights(masterWeights);
|
||||
|
||||
w = interpolate(1 - masterWeights);
|
||||
|
@ -73,7 +80,7 @@ void Foam::overlapGgiFvPatch::makeWeights(scalarField& w) const
|
|||
|
||||
|
||||
// Make patch face - neighbour cell distances
|
||||
void Foam::overlapGgiFvPatch::makeDeltaCoeffs(scalarField& dc) const
|
||||
void Foam::overlapGgiFvPatch::makeDeltaCoeffs(fvsPatchScalarField& dc) const
|
||||
{
|
||||
if (overlapGgiPolyPatch_.master())
|
||||
{
|
||||
|
@ -84,14 +91,20 @@ void Foam::overlapGgiFvPatch::makeDeltaCoeffs(scalarField& dc) const
|
|||
}
|
||||
else
|
||||
{
|
||||
scalarField masterDeltas(shadow().size());
|
||||
fvsPatchScalarField masterDeltas
|
||||
(
|
||||
shadow(),
|
||||
dc.dimensionedInternalField()
|
||||
);
|
||||
|
||||
shadow().makeDeltaCoeffs(masterDeltas);
|
||||
|
||||
dc = interpolate(masterDeltas);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::overlapGgiFvPatch::makeCorrVecs(vectorField& cv) const
|
||||
void Foam::overlapGgiFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const
|
||||
{
|
||||
// Non-orthogonality correction on a ggi interface
|
||||
// MB, 7/April/2009
|
||||
|
|
|
@ -74,13 +74,13 @@ protected:
|
|||
// Protected Member functions
|
||||
|
||||
//- Make patch weighting factors
|
||||
virtual void makeWeights(scalarField&) const;
|
||||
virtual void makeWeights(fvsPatchScalarField&) const;
|
||||
|
||||
//- Make patch face - neighbour cell distances
|
||||
virtual void makeDeltaCoeffs(scalarField&) const;
|
||||
virtual void makeDeltaCoeffs(fvsPatchScalarField&) const;
|
||||
|
||||
//- Make patch face non-orthogonality correction vectors
|
||||
virtual void makeCorrVecs(vectorField&) const;
|
||||
virtual void makeCorrVecs(fvsPatchVectorField&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
@ -99,10 +99,9 @@ public:
|
|||
{}
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~overlapGgiFvPatch()
|
||||
{}
|
||||
//- Destructor
|
||||
virtual ~overlapGgiFvPatch()
|
||||
{}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
|
|
@ -24,9 +24,10 @@ License
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "processorFvPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "transformField.H"
|
||||
#include "crMatrix.H"
|
||||
#include "transformField.H"
|
||||
#include "fvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -41,7 +42,7 @@ addToRunTimeSelectionTable(fvPatch, processorFvPatch, polyPatch);
|
|||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void processorFvPatch::makeWeights(scalarField& w) const
|
||||
void processorFvPatch::makeWeights(fvsPatchScalarField& w) const
|
||||
{
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
|
@ -75,7 +76,7 @@ void processorFvPatch::makeWeights(scalarField& w) const
|
|||
}
|
||||
|
||||
|
||||
void processorFvPatch::makeDeltaCoeffs(scalarField& dc) const
|
||||
void processorFvPatch::makeDeltaCoeffs(fvsPatchScalarField& dc) const
|
||||
{
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
|
|
|
@ -64,10 +64,10 @@ protected:
|
|||
// Protected Member functions
|
||||
|
||||
//- Make patch weighting factors
|
||||
void makeWeights(scalarField&) const;
|
||||
void makeWeights(fvsPatchScalarField&) const;
|
||||
|
||||
//- Make patch face - neighbour cell distances
|
||||
void makeDeltaCoeffs(scalarField&) const;
|
||||
void makeDeltaCoeffs(fvsPatchScalarField&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
@ -30,11 +30,13 @@ Author
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "regionCoupleFvPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "foamTime.H"
|
||||
#include "fvMesh.H"
|
||||
#include "fvBoundaryMesh.H"
|
||||
#include "foamTime.H"
|
||||
#include "mapDistribute.H"
|
||||
#include "fvPatchFields.H"
|
||||
#include "fvsPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -54,7 +56,7 @@ Foam::regionCoupleFvPatch::~regionCoupleFvPatch()
|
|||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
// Make patch weighting factors
|
||||
void Foam::regionCoupleFvPatch::makeWeights(scalarField& w) const
|
||||
void Foam::regionCoupleFvPatch::makeWeights(fvsPatchScalarField& w) const
|
||||
{
|
||||
if (rcPolyPatch_.coupled())
|
||||
{
|
||||
|
@ -82,7 +84,12 @@ void Foam::regionCoupleFvPatch::makeWeights(scalarField& w) const
|
|||
else
|
||||
{
|
||||
// Pick up weights from the master side
|
||||
scalarField masterWeights(shadow().size());
|
||||
fvsPatchScalarField masterWeights
|
||||
(
|
||||
shadow(),
|
||||
w.dimensionedInternalField()
|
||||
);
|
||||
|
||||
shadow().makeWeights(masterWeights);
|
||||
|
||||
scalarField oneMinusW = 1 - masterWeights;
|
||||
|
@ -105,7 +112,7 @@ void Foam::regionCoupleFvPatch::makeWeights(scalarField& w) const
|
|||
|
||||
|
||||
// Make patch face - neighbour cell distances
|
||||
void Foam::regionCoupleFvPatch::makeDeltaCoeffs(scalarField& dc) const
|
||||
void Foam::regionCoupleFvPatch::makeDeltaCoeffs(fvsPatchScalarField& dc) const
|
||||
{
|
||||
if (rcPolyPatch_.coupled())
|
||||
{
|
||||
|
@ -125,8 +132,14 @@ void Foam::regionCoupleFvPatch::makeDeltaCoeffs(scalarField& dc) const
|
|||
}
|
||||
else
|
||||
{
|
||||
scalarField masterDeltas(shadow().size());
|
||||
fvsPatchScalarField masterDeltas
|
||||
(
|
||||
shadow(),
|
||||
dc.dimensionedInternalField()
|
||||
);
|
||||
|
||||
shadow().makeDeltaCoeffs(masterDeltas);
|
||||
|
||||
dc = interpolate(masterDeltas);
|
||||
|
||||
if (bridgeOverlap())
|
||||
|
@ -145,7 +158,7 @@ void Foam::regionCoupleFvPatch::makeDeltaCoeffs(scalarField& dc) const
|
|||
|
||||
|
||||
// Make patch face non-orthogonality correction vectors
|
||||
void Foam::regionCoupleFvPatch::makeCorrVecs(vectorField& cv) const
|
||||
void Foam::regionCoupleFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const
|
||||
{
|
||||
if (rcPolyPatch_.coupled())
|
||||
{
|
||||
|
@ -284,7 +297,7 @@ const Foam::labelList& Foam::regionCoupleFvPatch::zoneAddressing() const
|
|||
}
|
||||
|
||||
|
||||
const Foam::labelListList& Foam::regionCoupleFvPatch::addressing() const
|
||||
const Foam::labelListList& Foam::regionCoupleFvPatch::ggiAddressing() const
|
||||
{
|
||||
if (rcPolyPatch_.master())
|
||||
{
|
||||
|
@ -309,7 +322,7 @@ const Foam::mapDistribute& Foam::regionCoupleFvPatch::map() const
|
|||
}
|
||||
|
||||
|
||||
const Foam::scalarListList& Foam::regionCoupleFvPatch::weights() const
|
||||
const Foam::scalarListList& Foam::regionCoupleFvPatch::ggiWeights() const
|
||||
{
|
||||
if (rcPolyPatch_.master())
|
||||
{
|
||||
|
|
|
@ -70,13 +70,13 @@ protected:
|
|||
// Protected Member functions
|
||||
|
||||
//- Make patch weighting factors
|
||||
virtual void makeWeights(scalarField&) const;
|
||||
virtual void makeWeights(fvsPatchScalarField&) const;
|
||||
|
||||
//- Make patch face - neighbour cell distances
|
||||
virtual void makeDeltaCoeffs(scalarField&) const;
|
||||
virtual void makeDeltaCoeffs(fvsPatchScalarField&) const;
|
||||
|
||||
//- Make patch face non-orthogonality correction vectors
|
||||
virtual void makeCorrVecs(vectorField&) const;
|
||||
virtual void makeCorrVecs(fvsPatchVectorField&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
@ -189,7 +189,7 @@ public:
|
|||
|
||||
//- Return addressing. Master side returns own addressing and
|
||||
// slave side returns addressing from master
|
||||
virtual const labelListList& addressing() const;
|
||||
virtual const labelListList& ggiAddressing() const;
|
||||
|
||||
//- Is the patch localised on a single processor
|
||||
virtual bool localParallel() const;
|
||||
|
@ -199,7 +199,7 @@ public:
|
|||
|
||||
//- Return weights. Master side returns own weights and
|
||||
// slave side returns weights from master
|
||||
virtual const scalarListList& weights() const;
|
||||
virtual const scalarListList& ggiWeights() const;
|
||||
|
||||
//- Return face transformation tensor
|
||||
virtual const tensorField& forwardT() const
|
||||
|
|
|
@ -26,6 +26,7 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "symmetryFvPatch.H"
|
||||
#include "fvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
@ -40,7 +41,7 @@ addToRunTimeSelectionTable(fvPatch, symmetryFvPatch, polyPatch);
|
|||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void symmetryFvPatch::makeCorrVecs(vectorField& cv) const
|
||||
void symmetryFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const
|
||||
{
|
||||
// Non-orthogonal correction not allowed. HJ, 16/Apr/2009
|
||||
cv = vector::zero;
|
||||
|
|
|
@ -57,7 +57,7 @@ protected:
|
|||
// Protected Member Functions
|
||||
|
||||
//- Make patch face non-orthogonality correction vectors
|
||||
virtual void makeCorrVecs(vectorField&) const;
|
||||
virtual void makeCorrVecs(fvsPatchVectorField&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
@ -26,6 +26,7 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "wedgeFvPatch.H"
|
||||
#include "fvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
@ -41,7 +42,7 @@ addToRunTimeSelectionTable(fvPatch, wedgeFvPatch, polyPatch);
|
|||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void wedgeFvPatch::makeCorrVecs(vectorField& cv) const
|
||||
void wedgeFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const
|
||||
{
|
||||
// Non-orthogonal correction not allowed. HJ, 16/Apr/2009
|
||||
cv = vector::zero;
|
||||
|
|
|
@ -60,7 +60,7 @@ protected:
|
|||
// Protected Member Functions
|
||||
|
||||
//- Make patch face non-orthogonality correction vectors
|
||||
virtual void makeCorrVecs(vectorField&) const;
|
||||
virtual void makeCorrVecs(fvsPatchVectorField&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
@ -24,8 +24,9 @@ License
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "cohesiveFvPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvMesh.H"
|
||||
#include "fvsPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -39,7 +40,7 @@ namespace Foam
|
|||
|
||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||
|
||||
void Foam::cohesiveFvPatch::makeCorrVecs(vectorField& cv) const
|
||||
void Foam::cohesiveFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const
|
||||
{
|
||||
cv = vector::zero;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ protected:
|
|||
// Protected Member Functions
|
||||
|
||||
//- Make patch face non-orthogonality correction vectors
|
||||
virtual void makeCorrVecs(vectorField&) const;
|
||||
virtual void makeCorrVecs(fvsPatchVectorField&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
@ -24,6 +24,7 @@ License
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "directMappedFvPatch.H"
|
||||
#include "fvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
@ -36,7 +37,7 @@ namespace Foam
|
|||
|
||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||
|
||||
void Foam::directMappedFvPatch::makeCorrVecs(vectorField& cv) const
|
||||
void Foam::directMappedFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const
|
||||
{
|
||||
cv = vector::zero;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ protected:
|
|||
// Protected Member Functions
|
||||
|
||||
//- Make patch face non-orthogonality correction vectors
|
||||
virtual void makeCorrVecs(vectorField&) const;
|
||||
virtual void makeCorrVecs(fvsPatchVectorField&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
@ -24,6 +24,7 @@ License
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "directMappedWallFvPatch.H"
|
||||
#include "fvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
@ -36,7 +37,7 @@ namespace Foam
|
|||
|
||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||
|
||||
void Foam::directMappedWallFvPatch::makeCorrVecs(vectorField& cv) const
|
||||
void Foam::directMappedWallFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const
|
||||
{
|
||||
cv = vector::zero;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ protected:
|
|||
// Protected Member Functions
|
||||
|
||||
//- Make patch face non-orthogonality correction vectors
|
||||
virtual void makeCorrVecs(vectorField&) const;
|
||||
virtual void makeCorrVecs(fvsPatchVectorField&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
@ -26,6 +26,7 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "wallFvPatch.H"
|
||||
#include "fvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
@ -41,7 +42,7 @@ addToRunTimeSelectionTable(fvPatch, wallFvPatch, polyPatch);
|
|||
|
||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||
|
||||
void wallFvPatch::makeCorrVecs(vectorField& cv) const
|
||||
void wallFvPatch::makeCorrVecs(fvsPatchVectorField& cv) const
|
||||
{
|
||||
cv = vector::zero;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ protected:
|
|||
// Protected Member Functions
|
||||
|
||||
//- Make patch face non-orthogonality correction vectors
|
||||
virtual void makeCorrVecs(vectorField&) const;
|
||||
virtual void makeCorrVecs(fvsPatchVectorField&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
@ -115,7 +115,9 @@ tmp<vectorField> fvPatch::Cn() const
|
|||
const unallocLabelList& faceCells = this->faceCells();
|
||||
|
||||
// Get reference to global cell centres
|
||||
const vectorField& gcc = boundaryMesh().mesh().cellCentres();
|
||||
// Bugfix: access cell centres from fvMesh data, not polyMesh.
|
||||
// HJ, 30/Nov/2017
|
||||
const vectorField& gcc = boundaryMesh().mesh().C().internalField();
|
||||
|
||||
forAll (faceCells, faceI)
|
||||
{
|
||||
|
@ -150,19 +152,19 @@ tmp<vectorField> fvPatch::delta() const
|
|||
}
|
||||
|
||||
|
||||
void fvPatch::makeWeights(scalarField& w) const
|
||||
void fvPatch::makeWeights(fvsPatchScalarField& w) const
|
||||
{
|
||||
w = 1.0;
|
||||
}
|
||||
|
||||
|
||||
void fvPatch::makeDeltaCoeffs(scalarField& dc) const
|
||||
void fvPatch::makeDeltaCoeffs(fvsPatchScalarField& dc) const
|
||||
{
|
||||
dc = 1.0/(nf() & delta());
|
||||
}
|
||||
|
||||
|
||||
void fvPatch::makeCorrVecs(vectorField& cv) const
|
||||
void fvPatch::makeCorrVecs(fvsPatchVectorField& cv) const
|
||||
{
|
||||
cv = vector::zero;
|
||||
}
|
||||
|
|
|
@ -44,6 +44,9 @@ SourceFiles
|
|||
#include "primitiveFields.H"
|
||||
#include "SubField.H"
|
||||
#include "fvPatchFieldsFwd.H"
|
||||
#include "fvsPatchFieldsFwd.H"
|
||||
#include "slicedVolFieldsFwd.H"
|
||||
#include "slicedSurfaceFieldsFwd.H"
|
||||
#include "autoPtr.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
|
@ -52,6 +55,7 @@ SourceFiles
|
|||
namespace Foam
|
||||
{
|
||||
|
||||
class fvMesh;
|
||||
class fvBoundaryMesh;
|
||||
class surfaceInterpolation;
|
||||
|
||||
|
@ -83,26 +87,48 @@ protected:
|
|||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Make patch weighting factors
|
||||
virtual void makeWeights(scalarField&) const;
|
||||
// Geometry correction functions
|
||||
|
||||
//- Make patch face - neighbour cell distances
|
||||
virtual void makeDeltaCoeffs(scalarField&) const;
|
||||
//- Make mesh face centres
|
||||
virtual void makeCf(slicedSurfaceVectorField&) const
|
||||
{}
|
||||
|
||||
//- Make patch face non-orthogonality correction vectors
|
||||
virtual void makeCorrVecs(vectorField&) const;
|
||||
//- Make mesh face areas
|
||||
virtual void makeSf(slicedSurfaceVectorField&) const
|
||||
{}
|
||||
|
||||
//- Initialise the patches for moving points
|
||||
virtual void initMovePoints();
|
||||
//- Make mesh cell centres
|
||||
virtual void makeC(slicedVolVectorField&) const
|
||||
{}
|
||||
|
||||
//- Correct patches after moving points
|
||||
virtual void movePoints();
|
||||
//- Make mesh cell volumes
|
||||
virtual void makeV(scalarField&) const
|
||||
{}
|
||||
|
||||
|
||||
// Discretisation correction functions
|
||||
|
||||
//- Make patch weighting factors
|
||||
virtual void makeWeights(fvsPatchScalarField&) const;
|
||||
|
||||
//- Make patch face - neighbour cell distances
|
||||
virtual void makeDeltaCoeffs(fvsPatchScalarField&) const;
|
||||
|
||||
//- Make patch face non-orthogonality correction vectors
|
||||
virtual void makeCorrVecs(fvsPatchVectorField&) const;
|
||||
|
||||
//- Initialise the patches for moving points
|
||||
virtual void initMovePoints();
|
||||
|
||||
//- Correct patches after moving points
|
||||
virtual void movePoints();
|
||||
|
||||
|
||||
public:
|
||||
|
||||
typedef fvBoundaryMesh BoundaryMesh;
|
||||
|
||||
friend class fvMesh;
|
||||
friend class fvBoundaryMesh;
|
||||
friend class surfaceInterpolation;
|
||||
|
||||
|
|
Reference in a new issue