mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: overset: Initial release of overset capability.
Adds overset discretisation to selected physics: - diffusion : overLaplacianDyMFoam - incompressible steady : overSimpleFoam - incompressible transient : overPimpleDyMFoam - compressible transient: overRhoPimpleDyMFoam - two-phase VOF: overInterDyMFoam The overset method chosen is a parallel, fully implicit implementation whereby the interpolation (from donor to acceptor) is inserted as an adapted discretisation on the donor cells, such that the resulting matrix can be solved using the standard linear solvers. Above solvers come with a set of tutorials, showing how to create and set-up simple simulations from scratch.
This commit is contained in:
@ -420,7 +420,7 @@ void Foam::meshToMesh::calcAddressing
|
||||
}
|
||||
|
||||
|
||||
void Foam::meshToMesh::calculate(const word& methodName)
|
||||
void Foam::meshToMesh::calculate(const word& methodName, const bool normalise)
|
||||
{
|
||||
Info<< "Creating mesh-to-mesh addressing for " << srcRegion_.name()
|
||||
<< " and " << tgtRegion_.name() << " regions using "
|
||||
@ -566,19 +566,22 @@ void Foam::meshToMesh::calculate(const word& methodName)
|
||||
);
|
||||
|
||||
// weights normalisation
|
||||
normaliseWeights
|
||||
(
|
||||
"source",
|
||||
srcToTgtCellAddr_,
|
||||
srcToTgtCellWght_
|
||||
);
|
||||
if (normalise)
|
||||
{
|
||||
normaliseWeights
|
||||
(
|
||||
"source",
|
||||
srcToTgtCellAddr_,
|
||||
srcToTgtCellWght_
|
||||
);
|
||||
|
||||
normaliseWeights
|
||||
(
|
||||
"target",
|
||||
tgtToSrcCellAddr_,
|
||||
tgtToSrcCellWght_
|
||||
);
|
||||
normaliseWeights
|
||||
(
|
||||
"target",
|
||||
tgtToSrcCellAddr_,
|
||||
tgtToSrcCellWght_
|
||||
);
|
||||
}
|
||||
|
||||
// cache maps and reset addresses
|
||||
List<Map<label>> cMap;
|
||||
@ -598,19 +601,22 @@ void Foam::meshToMesh::calculate(const word& methodName)
|
||||
{
|
||||
calcAddressing(methodName, srcRegion_, tgtRegion_);
|
||||
|
||||
normaliseWeights
|
||||
(
|
||||
"source",
|
||||
srcToTgtCellAddr_,
|
||||
srcToTgtCellWght_
|
||||
);
|
||||
if (normalise)
|
||||
{
|
||||
normaliseWeights
|
||||
(
|
||||
"source",
|
||||
srcToTgtCellAddr_,
|
||||
srcToTgtCellWght_
|
||||
);
|
||||
|
||||
normaliseWeights
|
||||
(
|
||||
"target",
|
||||
tgtToSrcCellAddr_,
|
||||
tgtToSrcCellWght_
|
||||
);
|
||||
normaliseWeights
|
||||
(
|
||||
"target",
|
||||
tgtToSrcCellAddr_,
|
||||
tgtToSrcCellWght_
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Info<< " Overlap volume: " << V_ << endl;
|
||||
@ -743,7 +749,7 @@ void Foam::meshToMesh::constructNoCuttingPatches
|
||||
}
|
||||
|
||||
// calculate volume addressing and weights
|
||||
calculate(methodName);
|
||||
calculate(methodName, true);
|
||||
|
||||
// calculate patch addressing and weights
|
||||
calculatePatchAMIs(AMIMethodName);
|
||||
@ -755,7 +761,8 @@ void Foam::meshToMesh::constructFromCuttingPatches
|
||||
const word& methodName,
|
||||
const word& AMIMethodName,
|
||||
const HashTable<word>& patchMap,
|
||||
const wordList& cuttingPatches
|
||||
const wordList& cuttingPatches,
|
||||
const bool normalise
|
||||
)
|
||||
{
|
||||
const polyBoundaryMesh& srcBm = srcRegion_.boundaryMesh();
|
||||
@ -806,7 +813,7 @@ void Foam::meshToMesh::constructFromCuttingPatches
|
||||
tgtPatchID_.transfer(tgtIDs);
|
||||
|
||||
// calculate volume addressing and weights
|
||||
calculate(methodName);
|
||||
calculate(methodName, normalise);
|
||||
|
||||
// calculate patch addressing and weights
|
||||
calculatePatchAMIs(AMIMethodName);
|
||||
@ -888,7 +895,8 @@ Foam::meshToMesh::meshToMesh
|
||||
const polyMesh& tgt,
|
||||
const interpolationMethod& method,
|
||||
const HashTable<word>& patchMap,
|
||||
const wordList& cuttingPatches
|
||||
const wordList& cuttingPatches,
|
||||
const bool normalise
|
||||
)
|
||||
:
|
||||
srcRegion_(src),
|
||||
@ -914,7 +922,8 @@ Foam::meshToMesh::meshToMesh
|
||||
interpolationMethodAMI(method)
|
||||
),
|
||||
patchMap,
|
||||
cuttingPatches
|
||||
cuttingPatches,
|
||||
normalise
|
||||
);
|
||||
}
|
||||
|
||||
@ -926,7 +935,8 @@ Foam::meshToMesh::meshToMesh
|
||||
const word& methodName, // internal mapping
|
||||
const word& AMIMethodName, // boundary mapping
|
||||
const HashTable<word>& patchMap,
|
||||
const wordList& cuttingPatches
|
||||
const wordList& cuttingPatches,
|
||||
const bool normalise
|
||||
)
|
||||
:
|
||||
srcRegion_(src),
|
||||
@ -949,7 +959,8 @@ Foam::meshToMesh::meshToMesh
|
||||
methodName,
|
||||
AMIMethodName,
|
||||
patchMap,
|
||||
cuttingPatches
|
||||
cuttingPatches,
|
||||
normalise
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -205,7 +205,7 @@ private:
|
||||
);
|
||||
|
||||
//- Calculate - main driver function
|
||||
void calculate(const word& methodName);
|
||||
void calculate(const word& methodName, const bool normalise);
|
||||
|
||||
//- Calculate patch overlap
|
||||
void calculatePatchAMIs(const word& amiMethodName);
|
||||
@ -224,7 +224,8 @@ private:
|
||||
const word& methodName,
|
||||
const word& AMIMethodName,
|
||||
const HashTable<word>& patchMap,
|
||||
const wordList& cuttingPatches
|
||||
const wordList& cuttingPatches,
|
||||
const bool normalise
|
||||
);
|
||||
|
||||
// Parallel operations
|
||||
@ -320,7 +321,8 @@ public:
|
||||
const polyMesh& tgt,
|
||||
const interpolationMethod& method,
|
||||
const HashTable<word>& patchMap,
|
||||
const wordList& cuttingPatches
|
||||
const wordList& cuttingPatches,
|
||||
const bool normalise = true
|
||||
);
|
||||
|
||||
|
||||
@ -332,7 +334,8 @@ public:
|
||||
const word& methodName, // internal mapping
|
||||
const word& AMIMethodName, // boundary mapping
|
||||
const HashTable<word>& patchMap,
|
||||
const wordList& cuttingPatches
|
||||
const wordList& cuttingPatches,
|
||||
const bool normalise = true
|
||||
);
|
||||
|
||||
|
||||
@ -383,6 +386,15 @@ public:
|
||||
patchAMIs() const;
|
||||
|
||||
|
||||
// Explicit access. Can probably be done with combine operator.
|
||||
|
||||
//- Source map pointer - valid if no singleMeshProc
|
||||
inline const autoPtr<mapDistribute>& srcMap() const;
|
||||
|
||||
//- Target map pointer - valid if no singleMeshProc
|
||||
inline const autoPtr<mapDistribute>& tgtMap() const;
|
||||
|
||||
|
||||
// Evaluation
|
||||
|
||||
// Source-to-target field mapping
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -81,6 +81,20 @@ inline Foam::scalar Foam::meshToMesh::V() const
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::autoPtr<Foam::mapDistribute>&
|
||||
Foam::meshToMesh::srcMap() const
|
||||
{
|
||||
return srcMapPtr_;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::autoPtr<Foam::mapDistribute>&
|
||||
Foam::meshToMesh::tgtMap() const
|
||||
{
|
||||
return tgtMapPtr_;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::PtrList<Foam::AMIPatchToPatchInterpolation>&
|
||||
Foam::meshToMesh::patchAMIs() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user