mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
@ -98,11 +98,13 @@ void matchPatchFaces
|
|||||||
const labelList& patchesj,
|
const labelList& patchesj,
|
||||||
|
|
||||||
DynamicList<labelList>& interfaceMesh0,
|
DynamicList<labelList>& interfaceMesh0,
|
||||||
|
DynamicList<label>& interfaceSource0,
|
||||||
DynamicList<labelList>& interfacePatch0,
|
DynamicList<labelList>& interfacePatch0,
|
||||||
DynamicList<wordList>& interfaceNames0,
|
DynamicList<wordList>& interfaceNames0,
|
||||||
DynamicList<List<DynamicList<label>>>& interfaceFaces0,
|
DynamicList<List<DynamicList<label>>>& interfaceFaces0,
|
||||||
|
|
||||||
DynamicList<labelList>& interfaceMesh1,
|
DynamicList<labelList>& interfaceMesh1,
|
||||||
|
DynamicList<label>& interfaceSource1,
|
||||||
DynamicList<labelList>& interfacePatch1,
|
DynamicList<labelList>& interfacePatch1,
|
||||||
DynamicList<wordList>& interfaceNames1,
|
DynamicList<wordList>& interfaceNames1,
|
||||||
DynamicList<List<DynamicList<label>>>& interfaceFaces1
|
DynamicList<List<DynamicList<label>>>& interfaceFaces1
|
||||||
@ -136,8 +138,10 @@ void matchPatchFaces
|
|||||||
|
|
||||||
Info<< "Introducing interface " << inti << " between"
|
Info<< "Introducing interface " << inti << " between"
|
||||||
<< " mesh " << meshes[meshi].name()
|
<< " mesh " << meshes[meshi].name()
|
||||||
|
//<< " source:" << sourcei
|
||||||
<< " patch " << ppi.name()
|
<< " patch " << ppi.name()
|
||||||
<< " and mesh " << meshes[meshj].name()
|
<< " and mesh " << meshes[meshj].name()
|
||||||
|
//<< " source:" << sourcej
|
||||||
<< " patch " << ppj.name()
|
<< " patch " << ppj.name()
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
@ -149,6 +153,8 @@ void matchPatchFaces
|
|||||||
intMesh0.setSize(nSourcei, -1);
|
intMesh0.setSize(nSourcei, -1);
|
||||||
intMesh0[sourcei] = meshi;
|
intMesh0[sourcei] = meshi;
|
||||||
|
|
||||||
|
interfaceSource0.append(sourcei);
|
||||||
|
|
||||||
interfacePatch0.append(labelList());
|
interfacePatch0.append(labelList());
|
||||||
auto& intPatch0 = interfacePatch0.last();
|
auto& intPatch0 = interfacePatch0.last();
|
||||||
intPatch0.setSize(nSourcei, -1);
|
intPatch0.setSize(nSourcei, -1);
|
||||||
@ -157,15 +163,11 @@ void matchPatchFaces
|
|||||||
interfaceNames0.append(wordList());
|
interfaceNames0.append(wordList());
|
||||||
auto& intNames0 = interfaceNames0.last();
|
auto& intNames0 = interfaceNames0.last();
|
||||||
intNames0.setSize(nSourcei);
|
intNames0.setSize(nSourcei);
|
||||||
//intNames0[sourcei] =
|
|
||||||
// meshes[meshi].name()
|
|
||||||
// + "_to_"
|
|
||||||
// + meshes[meshj].name();
|
|
||||||
intNames0[sourcei] =
|
intNames0[sourcei] =
|
||||||
patchName(entryName, meshes[meshi], meshes[meshj]);
|
patchName(entryName, meshes[meshi], meshes[meshj]);
|
||||||
|
|
||||||
|
|
||||||
// Mesh 0
|
// Mesh 1
|
||||||
//~~~~~~~
|
//~~~~~~~
|
||||||
|
|
||||||
interfaceMesh1.append(labelList());
|
interfaceMesh1.append(labelList());
|
||||||
@ -173,6 +175,8 @@ void matchPatchFaces
|
|||||||
intMesh1.setSize(nSourcej, -1);
|
intMesh1.setSize(nSourcej, -1);
|
||||||
intMesh1[sourcej] = meshj;
|
intMesh1[sourcej] = meshj;
|
||||||
|
|
||||||
|
interfaceSource1.append(sourcej);
|
||||||
|
|
||||||
interfacePatch1.append(labelList());
|
interfacePatch1.append(labelList());
|
||||||
auto& intPatch1 = interfacePatch1.last();
|
auto& intPatch1 = interfacePatch1.last();
|
||||||
intPatch1.setSize(nSourcej, -1);
|
intPatch1.setSize(nSourcej, -1);
|
||||||
@ -181,10 +185,6 @@ void matchPatchFaces
|
|||||||
interfaceNames1.append(wordList());
|
interfaceNames1.append(wordList());
|
||||||
auto& intNames1 = interfaceNames1.last();
|
auto& intNames1 = interfaceNames1.last();
|
||||||
intNames1.setSize(nSourcej);
|
intNames1.setSize(nSourcej);
|
||||||
//intNames1[sourcej] =
|
|
||||||
// meshes[meshj].name()
|
|
||||||
// + "_to_"
|
|
||||||
// + meshes[meshi].name();
|
|
||||||
intNames1[sourcej] =
|
intNames1[sourcej] =
|
||||||
patchName(entryName, meshes[meshj], meshes[meshi]);
|
patchName(entryName, meshes[meshj], meshes[meshi]);
|
||||||
|
|
||||||
@ -283,11 +283,13 @@ void matchPatchFaces
|
|||||||
List<PtrList<dictionary>> patchInfoDicts,
|
List<PtrList<dictionary>> patchInfoDicts,
|
||||||
|
|
||||||
DynamicList<labelList>& interfaceMesh0,
|
DynamicList<labelList>& interfaceMesh0,
|
||||||
|
DynamicList<label>& interfaceSource0,
|
||||||
DynamicList<labelList>& interfacePatch0,
|
DynamicList<labelList>& interfacePatch0,
|
||||||
DynamicList<List<DynamicList<label>>>& interfaceFaces0,
|
DynamicList<List<DynamicList<label>>>& interfaceFaces0,
|
||||||
DynamicList<wordList>& interfaceNames0,
|
DynamicList<wordList>& interfaceNames0,
|
||||||
|
|
||||||
DynamicList<labelList>& interfaceMesh1,
|
DynamicList<labelList>& interfaceMesh1,
|
||||||
|
DynamicList<label>& interfaceSource1,
|
||||||
DynamicList<labelList>& interfacePatch1,
|
DynamicList<labelList>& interfacePatch1,
|
||||||
DynamicList<List<DynamicList<label>>>& interfaceFaces1,
|
DynamicList<List<DynamicList<label>>>& interfaceFaces1,
|
||||||
DynamicList<wordList>& interfaceNames1
|
DynamicList<wordList>& interfaceNames1
|
||||||
@ -338,11 +340,13 @@ void matchPatchFaces
|
|||||||
patchesj,
|
patchesj,
|
||||||
|
|
||||||
interfaceMesh0,
|
interfaceMesh0,
|
||||||
|
interfaceSource0,
|
||||||
interfacePatch0,
|
interfacePatch0,
|
||||||
interfaceNames0,
|
interfaceNames0,
|
||||||
interfaceFaces0,
|
interfaceFaces0,
|
||||||
|
|
||||||
interfaceMesh1,
|
interfaceMesh1,
|
||||||
|
interfaceSource1,
|
||||||
interfacePatch1,
|
interfacePatch1,
|
||||||
interfaceNames1,
|
interfaceNames1,
|
||||||
interfaceFaces1
|
interfaceFaces1
|
||||||
@ -413,10 +417,23 @@ void changePatchID
|
|||||||
|
|
||||||
if (!isRepatchedBoundary.set(facei-mesh.nInternalFaces()))
|
if (!isRepatchedBoundary.set(facei-mesh.nInternalFaces()))
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
static label nWarnings = 0;
|
||||||
<< "Face " << facei << " is already marked to be moved"
|
if (nWarnings == 0)
|
||||||
<< " to patch " << meshMod.region()[facei]
|
{
|
||||||
<< exit(FatalError);
|
const label newPatchi = meshMod.region()[facei];
|
||||||
|
//FatalErrorInFunction
|
||||||
|
WarningInFunction
|
||||||
|
<< "Face " << facei
|
||||||
|
<< " at " << mesh.faceCentres()[facei]
|
||||||
|
<< " marked for patch " << patchID
|
||||||
|
<< " name " << mesh.boundaryMesh()[patchID].name()
|
||||||
|
<< " is already marked for patch " << newPatchi
|
||||||
|
<< " name " << mesh.boundaryMesh()[newPatchi].name()
|
||||||
|
<< ". Suppressing further warnings"
|
||||||
|
//<< exit(FatalError);
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
nWarnings++;
|
||||||
}
|
}
|
||||||
|
|
||||||
changePatchID(mesh, facei, patchID, meshMod);
|
changePatchID(mesh, facei, patchID, meshMod);
|
||||||
@ -721,7 +738,6 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
|
|
||||||
#include "addOverwriteOption.H"
|
#include "addOverwriteOption.H"
|
||||||
//#include "addRegionOption.H"
|
|
||||||
#include "addAllRegionOptions.H"
|
#include "addAllRegionOptions.H"
|
||||||
|
|
||||||
argList::addOption("dict", "file", "Alternative createPatchDict");
|
argList::addOption("dict", "file", "Alternative createPatchDict");
|
||||||
@ -780,17 +796,25 @@ int main(int argc, char *argv[])
|
|||||||
forAll(patchSources, sourcei)
|
forAll(patchSources, sourcei)
|
||||||
{
|
{
|
||||||
const auto& pDict = patchSources[sourcei];
|
const auto& pDict = patchSources[sourcei];
|
||||||
patchNames[meshi][sourcei] = pDict.get<word>("name");
|
patchNames[meshi][sourcei] = pDict.getOrDefault<word>
|
||||||
|
(
|
||||||
|
"name",
|
||||||
|
word::null,
|
||||||
|
keyType::LITERAL
|
||||||
|
);
|
||||||
|
|
||||||
patchInfoDicts[meshi].set
|
patchInfoDicts[meshi].set
|
||||||
(
|
(
|
||||||
sourcei,
|
sourcei,
|
||||||
new dictionary(pDict.subDict("patchInfo"))
|
new dictionary(pDict.subDict("patchInfo"))
|
||||||
);
|
);
|
||||||
const dictionary& patchDict = patchInfoDicts[meshi][sourcei];
|
dictionary& patchDict = patchInfoDicts[meshi][sourcei];
|
||||||
if (patchDict.found("AMIMethod"))
|
if (patchDict.found("AMIMethod"))
|
||||||
{
|
{
|
||||||
matchMethods[meshi][sourcei] = patchDict.get<word>("AMIMethod");
|
matchMethods[meshi][sourcei] = patchDict.get<word>("AMIMethod");
|
||||||
|
// Disable full matching since we're trying to use AMIMethod to
|
||||||
|
// find out actual overlap
|
||||||
|
patchDict.add("requireMatch", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
wordRes matchNames;
|
wordRes matchNames;
|
||||||
@ -817,9 +841,11 @@ int main(int argc, char *argv[])
|
|||||||
// It matches all mesh against each other. Lower numbered mesh gets
|
// It matches all mesh against each other. Lower numbered mesh gets
|
||||||
// postfix 0, higher numbered mesh postfix 1.
|
// postfix 0, higher numbered mesh postfix 1.
|
||||||
|
|
||||||
// Per interface, per mesh, per patchSource:
|
// Per interface, per patchSource:
|
||||||
// 1. the lower numbered mesh
|
// 1. the lower numbered mesh
|
||||||
DynamicList<labelList> interfaceMesh0;
|
DynamicList<labelList> interfaceMesh0;
|
||||||
|
// 1b. the source index (i.e. the patch dictionary)
|
||||||
|
DynamicList<label> interfaceSource0;
|
||||||
// 2. the patch on the interfaceMesh0
|
// 2. the patch on the interfaceMesh0
|
||||||
DynamicList<labelList> interfacePatch0;
|
DynamicList<labelList> interfacePatch0;
|
||||||
// 3. the facelabels on the interfaceMesh0
|
// 3. the facelabels on the interfaceMesh0
|
||||||
@ -829,6 +855,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Same for the higher numbered mesh
|
// Same for the higher numbered mesh
|
||||||
DynamicList<labelList> interfaceMesh1;
|
DynamicList<labelList> interfaceMesh1;
|
||||||
|
DynamicList<label> interfaceSource1;
|
||||||
DynamicList<labelList> interfacePatch1;
|
DynamicList<labelList> interfacePatch1;
|
||||||
DynamicList<List<DynamicList<label>>> interfaceFaces1;
|
DynamicList<List<DynamicList<label>>> interfaceFaces1;
|
||||||
DynamicList<wordList> interfaceNames1;
|
DynamicList<wordList> interfaceNames1;
|
||||||
@ -843,15 +870,17 @@ int main(int argc, char *argv[])
|
|||||||
interRegionSources,
|
interRegionSources,
|
||||||
patchNames,
|
patchNames,
|
||||||
matchPatchIDs,
|
matchPatchIDs,
|
||||||
matchMethods, //faceAreaWeightAMI2D::typeName,
|
matchMethods,
|
||||||
patchInfoDicts,
|
patchInfoDicts,
|
||||||
|
|
||||||
interfaceMesh0,
|
interfaceMesh0,
|
||||||
|
interfaceSource0,
|
||||||
interfacePatch0,
|
interfacePatch0,
|
||||||
interfaceFaces0,
|
interfaceFaces0,
|
||||||
interfaceNames0,
|
interfaceNames0,
|
||||||
|
|
||||||
interfaceMesh1,
|
interfaceMesh1,
|
||||||
|
interfaceSource1,
|
||||||
interfacePatch1,
|
interfacePatch1,
|
||||||
interfaceFaces1,
|
interfaceFaces1,
|
||||||
interfaceNames1
|
interfaceNames1
|
||||||
@ -859,6 +888,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Read fields
|
// Read fields
|
||||||
List<PtrList<volScalarField>> vsFlds(meshes.size());
|
List<PtrList<volScalarField>> vsFlds(meshes.size());
|
||||||
List<PtrList<volVectorField>> vvFlds(meshes.size());
|
List<PtrList<volVectorField>> vvFlds(meshes.size());
|
||||||
@ -914,6 +944,9 @@ int main(int argc, char *argv[])
|
|||||||
forAll(meshes, meshi)
|
forAll(meshes, meshi)
|
||||||
{
|
{
|
||||||
fvMesh& mesh = meshes[meshi];
|
fvMesh& mesh = meshes[meshi];
|
||||||
|
|
||||||
|
Info<< "\n\nAdding patches to mesh " << mesh.name() << nl << endl;
|
||||||
|
|
||||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||||
const dictionary& dict = dicts[meshi];
|
const dictionary& dict = dicts[meshi];
|
||||||
|
|
||||||
@ -933,11 +966,20 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
const dictionary& dict = patchSources[sourcei];
|
const dictionary& dict = patchSources[sourcei];
|
||||||
const word sourceType(dict.get<word>("constructFrom"));
|
const word sourceType(dict.get<word>("constructFrom"));
|
||||||
const word patchName(dict.get<word>("name"));
|
const word patchName
|
||||||
|
(
|
||||||
|
dict.getOrDefault<word>
|
||||||
|
(
|
||||||
|
"name",
|
||||||
|
word::null,
|
||||||
|
keyType::LITERAL
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
dictionary patchDict(dict.subDict("patchInfo"));
|
dictionary patchDict(patchInfoDicts[meshi][sourcei]);
|
||||||
patchDict.set("nFaces", 0);
|
patchDict.set("nFaces", 0);
|
||||||
patchDict.set("startFace", 0); //startFacei);
|
patchDict.set("startFace", 0); // Gets overwritten
|
||||||
|
|
||||||
|
|
||||||
if (sourceType == "autoPatch")
|
if (sourceType == "autoPatch")
|
||||||
{
|
{
|
||||||
@ -951,17 +993,21 @@ int main(int argc, char *argv[])
|
|||||||
const labelList& allMeshes1 = interfaceMesh1[inti];
|
const labelList& allMeshes1 = interfaceMesh1[inti];
|
||||||
const wordList& allNames1 = interfaceNames1[inti];
|
const wordList& allNames1 = interfaceNames1[inti];
|
||||||
|
|
||||||
forAll(allMeshes0, sourcei)
|
if
|
||||||
|
(
|
||||||
|
interfaceSource0[inti] == sourcei
|
||||||
|
&& allMeshes0[sourcei] == meshi
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (allMeshes0[sourcei] == meshi)
|
// Current mesh is mesh0. mesh1 is the remote mesh.
|
||||||
{
|
const label sourcej = interfaceSource1[inti];
|
||||||
const auto& mesh1 = meshes[allMeshes1[sourcei]];
|
|
||||||
const word& patchName = allNames0[sourcei];
|
const word& patchName = allNames0[sourcei];
|
||||||
if (patches.findPatchID(patchName) == -1)
|
if (patches.findPatchID(patchName) == -1)
|
||||||
{
|
{
|
||||||
dictionary allDict(patchDict);
|
dictionary allDict(patchDict);
|
||||||
|
const auto& mesh1 = meshes[allMeshes1[sourcej]];
|
||||||
allDict.set("sampleRegion", mesh1.name());
|
allDict.set("sampleRegion", mesh1.name());
|
||||||
const auto& destPatch = allNames1[sourcei];
|
const auto& destPatch = allNames1[sourcej];
|
||||||
allDict.set("samplePatch", destPatch);
|
allDict.set("samplePatch", destPatch);
|
||||||
allDict.set("neighbourPatch", destPatch);
|
allDict.set("neighbourPatch", destPatch);
|
||||||
|
|
||||||
@ -989,7 +1035,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
forAll(interfaceMesh1, inti)
|
forAll(interfaceMesh1, inti)
|
||||||
{
|
{
|
||||||
@ -998,16 +1043,21 @@ int main(int argc, char *argv[])
|
|||||||
const labelList& allMeshes1 = interfaceMesh1[inti];
|
const labelList& allMeshes1 = interfaceMesh1[inti];
|
||||||
const wordList& allNames1 = interfaceNames1[inti];
|
const wordList& allNames1 = interfaceNames1[inti];
|
||||||
|
|
||||||
forAll(allMeshes1, sourcei)
|
if
|
||||||
|
(
|
||||||
|
interfaceSource1[inti] == sourcei
|
||||||
|
&& allMeshes1[sourcei] == meshi
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (allMeshes1[sourcei] == meshi)
|
// Current mesh is mesh1. mesh0 is the remote mesh.
|
||||||
{
|
|
||||||
const auto& mesh0 = meshes[allMeshes0[sourcei]];
|
const label sourcej = interfaceSource0[inti];
|
||||||
const word& patchName = allNames1[sourcei];
|
const word& patchName = allNames1[sourcei];
|
||||||
if (patches.findPatchID(patchName) == -1)
|
if (patches.findPatchID(patchName) == -1)
|
||||||
{
|
{
|
||||||
dictionary allDict(patchDict);
|
dictionary allDict(patchDict);
|
||||||
const auto& destPatch = allNames0[sourcei];
|
const auto& destPatch = allNames0[sourcej];
|
||||||
|
const auto& mesh0 = meshes[allMeshes0[sourcej]];
|
||||||
allDict.set("sampleRegion", mesh0.name());
|
allDict.set("sampleRegion", mesh0.name());
|
||||||
allDict.set("samplePatch", destPatch);
|
allDict.set("samplePatch", destPatch);
|
||||||
allDict.set("neighbourPatch", destPatch);
|
allDict.set("neighbourPatch", destPatch);
|
||||||
@ -1037,7 +1087,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (patches.findPatchID(patchName) == -1)
|
if (patches.findPatchID(patchName) == -1)
|
||||||
@ -1077,6 +1126,10 @@ int main(int argc, char *argv[])
|
|||||||
forAll(meshes, meshi)
|
forAll(meshes, meshi)
|
||||||
{
|
{
|
||||||
fvMesh& mesh = meshes[meshi];
|
fvMesh& mesh = meshes[meshi];
|
||||||
|
|
||||||
|
Info<< "\n\nRepatching mesh " << mesh.name() << nl << endl;
|
||||||
|
|
||||||
|
|
||||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||||
const dictionary& dict = dicts[meshi];
|
const dictionary& dict = dicts[meshi];
|
||||||
|
|
||||||
@ -1096,7 +1149,15 @@ int main(int argc, char *argv[])
|
|||||||
forAll(patchSources, sourcei)
|
forAll(patchSources, sourcei)
|
||||||
{
|
{
|
||||||
const dictionary& dict = patchSources[sourcei];
|
const dictionary& dict = patchSources[sourcei];
|
||||||
const word patchName(dict.get<word>("name"));
|
const word patchName
|
||||||
|
(
|
||||||
|
dict.getOrDefault<word>
|
||||||
|
(
|
||||||
|
"name",
|
||||||
|
word::null,
|
||||||
|
keyType::LITERAL
|
||||||
|
)
|
||||||
|
);
|
||||||
const word sourceType(dict.get<word>("constructFrom"));
|
const word sourceType(dict.get<word>("constructFrom"));
|
||||||
|
|
||||||
if (sourceType == "autoPatch")
|
if (sourceType == "autoPatch")
|
||||||
@ -1111,17 +1172,22 @@ int main(int argc, char *argv[])
|
|||||||
const wordList& allNames1 = interfaceNames1[inti];
|
const wordList& allNames1 = interfaceNames1[inti];
|
||||||
const auto& allFaces1 = interfaceFaces1[inti];
|
const auto& allFaces1 = interfaceFaces1[inti];
|
||||||
|
|
||||||
forAll(allMeshes0, sourcei)
|
if
|
||||||
{
|
(
|
||||||
if (allMeshes0[sourcei] == meshi)
|
interfaceSource0[inti] == sourcei
|
||||||
|
&& allMeshes0[sourcei] == meshi
|
||||||
|
)
|
||||||
{
|
{
|
||||||
|
// Current mesh is mesh0. mesh1 is the remote mesh.
|
||||||
|
|
||||||
const label destPatchi =
|
const label destPatchi =
|
||||||
patches.findPatchID(allNames0[sourcei], false);
|
patches.findPatchID(allNames0[sourcei], false);
|
||||||
|
|
||||||
Pout<< "Matched mesh:" << mesh.name()
|
//const auto& mesh1 =
|
||||||
<< " to mesh:"
|
// meshes[allMeshes1[interfaceSource1[inti]]];
|
||||||
<< meshes[allMeshes1[sourcei]].name()
|
//Pout<< "Matched mesh:" << mesh.name()
|
||||||
<< " through:" << allNames0[sourcei] << endl;
|
// << " to mesh:" << mesh1.name()
|
||||||
|
// << " through:" << allNames0[sourcei] << endl;
|
||||||
|
|
||||||
changePatchID
|
changePatchID
|
||||||
(
|
(
|
||||||
@ -1132,18 +1198,22 @@ int main(int argc, char *argv[])
|
|||||||
meshMod
|
meshMod
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
if
|
||||||
forAll(allMeshes1, sourcei)
|
(
|
||||||
{
|
interfaceSource1[inti] == sourcei
|
||||||
if (allMeshes1[sourcei] == meshi)
|
&& allMeshes1[sourcei] == meshi
|
||||||
|
)
|
||||||
{
|
{
|
||||||
|
// Current mesh is mesh1. mesh0 is the remote mesh.
|
||||||
|
|
||||||
const label destPatchi =
|
const label destPatchi =
|
||||||
patches.findPatchID(allNames1[sourcei], false);
|
patches.findPatchID(allNames1[sourcei], false);
|
||||||
|
|
||||||
Pout<< "Matched mesh:" << mesh.name()
|
//const auto& mesh0 =
|
||||||
<< " to mesh:"
|
// meshes[allMeshes0[interfaceSource0[inti]]];
|
||||||
<< meshes[allMeshes0[sourcei]].name()
|
//Pout<< "Matched mesh:" << mesh.name()
|
||||||
<< " through:" << allNames1[sourcei] << endl;
|
// << " to mesh:" << mesh0.name()
|
||||||
|
// << " through:" << allNames1[sourcei] << endl;
|
||||||
|
|
||||||
changePatchID
|
changePatchID
|
||||||
(
|
(
|
||||||
@ -1156,7 +1226,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (sourceType == "patches")
|
else if (sourceType == "patches")
|
||||||
{
|
{
|
||||||
const label destPatchi = patches.findPatchID(patchName, false);
|
const label destPatchi = patches.findPatchID(patchName, false);
|
||||||
@ -1213,7 +1282,6 @@ int main(int argc, char *argv[])
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Info<< endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Change mesh, use inflation to reforce calculation of transformation
|
// Change mesh, use inflation to reforce calculation of transformation
|
||||||
@ -1398,10 +1466,6 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
dumpCyclicMatch("final_", mesh);
|
dumpCyclicMatch("final_", mesh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Set the precision of the points data to 10
|
|
||||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!overwrite)
|
if (!overwrite)
|
||||||
@ -1418,11 +1482,14 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the precision of the points data to 10
|
||||||
|
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||||
|
|
||||||
// Write resulting mesh
|
// Write resulting mesh
|
||||||
forAll(meshes, meshi)
|
forAll(meshes, meshi)
|
||||||
{
|
{
|
||||||
fvMesh& mesh = meshes[meshi];
|
fvMesh& mesh = meshes[meshi];
|
||||||
Info<< "Writing repatched mesh " << mesh.name()
|
Info<< "\n\nWriting repatched mesh " << mesh.name()
|
||||||
<< " to " << runTime.timeName() << nl << endl;
|
<< " to " << runTime.timeName() << nl << endl;
|
||||||
mesh.clearOut(); // remove meshPhi
|
mesh.clearOut(); // remove meshPhi
|
||||||
mesh.write();
|
mesh.write();
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,65 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
arch "LSB;label=32;scalar=64";
|
||||||
|
class volScalarField;
|
||||||
|
location "0/bottomWater";
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 0 0 1 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 300;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type uniformFixedValue;
|
||||||
|
uniformValue 600;
|
||||||
|
}
|
||||||
|
minZ
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
group_solid
|
||||||
|
{
|
||||||
|
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||||
|
value uniform 300;
|
||||||
|
Tnbr T;
|
||||||
|
kappaMethod solidThermo;
|
||||||
|
}
|
||||||
|
group_fluid
|
||||||
|
{
|
||||||
|
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||||
|
value uniform 300;
|
||||||
|
Tnbr T;
|
||||||
|
kappaMethod solidThermo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
arch "LSB;label=32;scalar=64";
|
||||||
|
class volScalarField;
|
||||||
|
location "0/bottomWater";
|
||||||
|
object p;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 1 -1 -2 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
arch "LSB;label=32;scalar=64";
|
||||||
|
class volScalarField;
|
||||||
|
location "0/bottomWater";
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 0 0 1 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 300;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
minZ
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
group_solid
|
||||||
|
{
|
||||||
|
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||||
|
value uniform 300;
|
||||||
|
Tnbr T;
|
||||||
|
kappaMethod solidThermo;
|
||||||
|
}
|
||||||
|
group_fluid
|
||||||
|
{
|
||||||
|
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||||
|
value uniform 300;
|
||||||
|
Tnbr T;
|
||||||
|
kappaMethod solidThermo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
arch "LSB;label=32;scalar=64";
|
||||||
|
class volScalarField;
|
||||||
|
location "0/bottomWater";
|
||||||
|
object p;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 1 -1 -2 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
arch "LSB;label=32;scalar=64";
|
||||||
|
class volScalarField;
|
||||||
|
location "0/bottomWater";
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 0 0 1 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 300;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
minZ
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
group_solid
|
||||||
|
{
|
||||||
|
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||||
|
value uniform 300;
|
||||||
|
Tnbr T;
|
||||||
|
kappaMethod solidThermo;
|
||||||
|
}
|
||||||
|
group_fluid
|
||||||
|
{
|
||||||
|
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||||
|
value uniform 300;
|
||||||
|
Tnbr T;
|
||||||
|
kappaMethod solidThermo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
arch "LSB;label=32;scalar=64";
|
||||||
|
class volScalarField;
|
||||||
|
location "0/bottomWater";
|
||||||
|
object p;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 1 -1 -2 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
arch "LSB;label=32;scalar=64";
|
||||||
|
class volScalarField;
|
||||||
|
location "0/topAir";
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 0 0 1 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 300;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type uniformFixedValue;
|
||||||
|
uniformValue 300;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform 300;
|
||||||
|
inletValue uniform 300;
|
||||||
|
}
|
||||||
|
minZ
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
group_solid
|
||||||
|
{
|
||||||
|
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||||
|
value uniform 300;
|
||||||
|
Tnbr T;
|
||||||
|
kappaMethod fluidThermo;
|
||||||
|
}
|
||||||
|
group_fluid
|
||||||
|
{
|
||||||
|
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||||
|
value uniform 300;
|
||||||
|
Tnbr T;
|
||||||
|
kappaMethod fluidThermo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
arch "LSB;label=32;scalar=64";
|
||||||
|
class volVectorField;
|
||||||
|
location "0/topAir";
|
||||||
|
object U;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 1 -1 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform ( 0.1 0 0 );
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type noSlip;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type uniformFixedValue;
|
||||||
|
uniformValue ( 0.1 0 0 );
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform ( 0.1 0 0 );
|
||||||
|
inletValue uniform ( 0 0 0 );
|
||||||
|
}
|
||||||
|
minZ
|
||||||
|
{
|
||||||
|
type noSlip;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type noSlip;
|
||||||
|
}
|
||||||
|
group_solid
|
||||||
|
{
|
||||||
|
type noSlip;
|
||||||
|
}
|
||||||
|
group_fluid
|
||||||
|
{
|
||||||
|
type noSlip;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
arch "LSB;label=32;scalar=64";
|
||||||
|
class volScalarField;
|
||||||
|
location "0/topAir";
|
||||||
|
object epsilon;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 2 -3 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 0.01;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
value uniform 0.01;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type uniformFixedValue;
|
||||||
|
uniformValue 0.01;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform 0.01;
|
||||||
|
inletValue uniform 0.01;
|
||||||
|
}
|
||||||
|
minZ
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
value uniform 0.01;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
value uniform 0.01;
|
||||||
|
}
|
||||||
|
group_solid
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
value uniform 0.01;
|
||||||
|
}
|
||||||
|
group_fluid
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
value uniform 0.01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
arch "LSB;label=32;scalar=64";
|
||||||
|
class volScalarField;
|
||||||
|
location "0/topAir";
|
||||||
|
object k;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 2 -2 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 0.1;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type kqRWallFunction;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type uniformFixedValue;
|
||||||
|
uniformValue 0.1;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform 0.1;
|
||||||
|
inletValue uniform 0.1;
|
||||||
|
}
|
||||||
|
minZ
|
||||||
|
{
|
||||||
|
type kqRWallFunction;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type kqRWallFunction;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
group_solid
|
||||||
|
{
|
||||||
|
type kqRWallFunction;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
group_fluid
|
||||||
|
{
|
||||||
|
type kqRWallFunction;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,65 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
arch "LSB;label=32;scalar=64";
|
||||||
|
class volScalarField;
|
||||||
|
location "0/topAir";
|
||||||
|
object p;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 1 -1 -2 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 100000;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
minZ
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
group_solid
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
group_fluid
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,65 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
arch "LSB;label=32;scalar=64";
|
||||||
|
class volScalarField;
|
||||||
|
location "0/topAir";
|
||||||
|
object p_rgh;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 1 -1 -2 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 100000;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type fixedFluxPressure;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type fixedFluxPressure;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type uniformFixedValue;
|
||||||
|
uniformValue 100000;
|
||||||
|
}
|
||||||
|
minZ
|
||||||
|
{
|
||||||
|
type fixedFluxPressure;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type fixedFluxPressure;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
group_solid
|
||||||
|
{
|
||||||
|
type fixedFluxPressure;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
group_fluid
|
||||||
|
{
|
||||||
|
type fixedFluxPressure;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
12
tutorials/mesh/createPatch/multiRegionHeater_autoPatch/Allclean
Executable file
12
tutorials/mesh/createPatch/multiRegionHeater_autoPatch/Allclean
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
|
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
cleanCase0
|
||||||
|
rm -r constant/bottomSolid/polyMesh
|
||||||
|
rm -r constant/leftSolid/polyMesh
|
||||||
|
rm -r constant/rightSolid/polyMesh
|
||||||
|
rm -r constant/topAir/polyMesh
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
20
tutorials/mesh/createPatch/multiRegionHeater_autoPatch/Allrun
Executable file
20
tutorials/mesh/createPatch/multiRegionHeater_autoPatch/Allrun
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
runApplication ./Allrun.pre
|
||||||
|
|
||||||
|
#-- Run on single processor
|
||||||
|
#runApplication $(getApplication)
|
||||||
|
|
||||||
|
# Decompose
|
||||||
|
runApplication decomposePar -allRegions
|
||||||
|
|
||||||
|
# Run
|
||||||
|
runParallel $(getApplication)
|
||||||
|
|
||||||
|
# Reconstruct
|
||||||
|
runApplication reconstructPar -allRegions
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
25
tutorials/mesh/createPatch/multiRegionHeater_autoPatch/Allrun.pre
Executable file
25
tutorials/mesh/createPatch/multiRegionHeater_autoPatch/Allrun.pre
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
for region in $(foamListRegions)
|
||||||
|
do
|
||||||
|
runApplication -s $region blockMesh -region $region
|
||||||
|
done
|
||||||
|
|
||||||
|
#- createPatch creates patchFields out of dictionary only but only then
|
||||||
|
# moves faces to it. Hence most of its state (refValue, valueFraction etc)
|
||||||
|
# will not be sized. Make sure to not to fail construction so disable
|
||||||
|
# floating point error checking
|
||||||
|
#unset FOAM_SIGFPE
|
||||||
|
runApplication createPatch -allRegions -overwrite
|
||||||
|
|
||||||
|
restore0Dir
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Use paraFoam -touch-all to create files for paraview post-processing"
|
||||||
|
echo
|
||||||
|
echo "End"
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
2022-02-24: Testcase for:
|
||||||
|
- createPatch with autoPatch functionality
|
||||||
|
- AMIMethod limiting the search distance
|
||||||
|
- use of patch groups to ease set-up
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object radiationProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
radiation off;
|
||||||
|
|
||||||
|
radiationModel none;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object thermophysicalProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
thermoType
|
||||||
|
{
|
||||||
|
type heSolidThermo;
|
||||||
|
mixture pureMixture;
|
||||||
|
transport constIso;
|
||||||
|
thermo hConst;
|
||||||
|
equationOfState rhoConst;
|
||||||
|
specie specie;
|
||||||
|
energy sensibleEnthalpy;
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
specie
|
||||||
|
{
|
||||||
|
molWeight 50;
|
||||||
|
}
|
||||||
|
transport
|
||||||
|
{
|
||||||
|
kappa 80;
|
||||||
|
}
|
||||||
|
thermodynamics
|
||||||
|
{
|
||||||
|
Hf 0;
|
||||||
|
Cp 450;
|
||||||
|
}
|
||||||
|
equationOfState
|
||||||
|
{
|
||||||
|
rho 8000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class uniformDimensionedVectorField;
|
||||||
|
object g;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 -2 0 0 0 0];
|
||||||
|
value (0 -9.81 0);
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../bottomSolid/radiationProperties
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../bottomSolid/thermophysicalProperties
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object regionProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
regions
|
||||||
|
(
|
||||||
|
fluid (topAir)
|
||||||
|
solid (bottomSolid leftSolid rightSolid)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../bottomSolid/radiationProperties
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../bottomSolid/thermophysicalProperties
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object radiationProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
radiation off;
|
||||||
|
|
||||||
|
radiationModel none;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object thermophysicalProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
thermoType
|
||||||
|
{
|
||||||
|
type heRhoThermo;
|
||||||
|
mixture pureMixture;
|
||||||
|
transport const;
|
||||||
|
thermo hConst;
|
||||||
|
equationOfState perfectGas;
|
||||||
|
specie specie;
|
||||||
|
energy sensibleEnthalpy;
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
specie
|
||||||
|
{
|
||||||
|
molWeight 28.9;
|
||||||
|
}
|
||||||
|
thermodynamics
|
||||||
|
{
|
||||||
|
Cp 1000;
|
||||||
|
Hf 0;
|
||||||
|
}
|
||||||
|
transport
|
||||||
|
{
|
||||||
|
mu 1.8e-05;
|
||||||
|
Pr 0.7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object turbulenceProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
simulationType laminar;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
- fvSolution is used for outer correctors specification.
|
||||||
|
- fvSchemes is only so that pre-processing activities can proceed
|
||||||
@ -0,0 +1,93 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object blockMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
scale 1;
|
||||||
|
|
||||||
|
vertices
|
||||||
|
(
|
||||||
|
(-0.1 -0.04 -0.05)
|
||||||
|
( 0.1 -0.04 -0.05)
|
||||||
|
( 0.1 0.00 -0.05)
|
||||||
|
(-0.1 0.00 -0.05)
|
||||||
|
(-0.1 -0.04 0.05)
|
||||||
|
( 0.1 -0.04 0.05)
|
||||||
|
( 0.1 0.00 0.05)
|
||||||
|
(-0.1 0.00 0.05)
|
||||||
|
);
|
||||||
|
|
||||||
|
blocks
|
||||||
|
(
|
||||||
|
hex (0 1 2 3 4 5 6 7) (10 4 1) simpleGrading (1 1 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
edges
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
|
boundary
|
||||||
|
(
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 4 7 3)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(2 6 5 1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(1 5 4 0)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
inGroups (group_solid);
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(3 7 6 2)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
minZ
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 3 2 1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(4 5 6 7)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,163 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2106 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object createPatchDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
// This application/dictionary controls:
|
||||||
|
// - optional: create new patches from boundary faces (either given as
|
||||||
|
// a set of patches or as a faceSet)
|
||||||
|
// - always: order faces on coupled patches such that they are opposite. This
|
||||||
|
// is done for all coupled faces, not just for any patches created.
|
||||||
|
// - optional: synchronise points on coupled patches.
|
||||||
|
// - always: remove zero-sized (non-coupled) patches (that were not added)
|
||||||
|
|
||||||
|
// 1. Create cyclic:
|
||||||
|
// - specify where the faces should come from
|
||||||
|
// - specify the type of cyclic. If a rotational specify the rotationAxis
|
||||||
|
// and centre to make matching easier
|
||||||
|
// - always create both halves in one invocation with correct 'neighbourPatch'
|
||||||
|
// setting.
|
||||||
|
// - optionally pointSync true to guarantee points to line up.
|
||||||
|
|
||||||
|
// 2. Correct incorrect cyclic:
|
||||||
|
// This will usually fail upon loading:
|
||||||
|
// "face 0 area does not match neighbour 2 by 0.0100005%"
|
||||||
|
// " -- possible face ordering problem."
|
||||||
|
// - in polyMesh/boundary file:
|
||||||
|
// - loosen matchTolerance of all cyclics to get case to load
|
||||||
|
// - or change patch type from 'cyclic' to 'patch'
|
||||||
|
// and regenerate cyclic as above
|
||||||
|
|
||||||
|
// Do a synchronisation of coupled points after creation of any patches.
|
||||||
|
// Note: this does not work with points that are on multiple coupled patches
|
||||||
|
// with transformations (i.e. cyclics).
|
||||||
|
pointSync false;
|
||||||
|
|
||||||
|
// Patches to create.
|
||||||
|
patches
|
||||||
|
(
|
||||||
|
// Patches to couple to solids
|
||||||
|
{
|
||||||
|
// Dictionary to construct new patch from
|
||||||
|
patchInfo
|
||||||
|
{
|
||||||
|
type mappedPatch;
|
||||||
|
inGroups (group_solid);
|
||||||
|
sampleMode nearestPatchFaceAMI;
|
||||||
|
|
||||||
|
AMIMethod faceAreaWeightAMI;
|
||||||
|
maxDistance2 1e-6; // max (square) distance
|
||||||
|
minCosAngle 0.5; // min alignment
|
||||||
|
|
||||||
|
// Overwritten
|
||||||
|
//sampleRegion otherRegion;
|
||||||
|
//samplePatch otherPatch;
|
||||||
|
|
||||||
|
//- Optional override of added patchfields. If not specified
|
||||||
|
// any added patchfields are of type calculated.
|
||||||
|
patchFields
|
||||||
|
{
|
||||||
|
////- Problem is with patch fields that need additional
|
||||||
|
//// state. Patches get created with 0 faces and
|
||||||
|
//// then mapped to the correct size. The autoMap generally
|
||||||
|
//// does not know value to give the new faces.
|
||||||
|
//T
|
||||||
|
//{
|
||||||
|
// type compressible::turbulentTemperatureRadCoupledMixed;
|
||||||
|
// Tnbr T;
|
||||||
|
// kappaMethod solidThermo;
|
||||||
|
// value uniform 300;
|
||||||
|
// refValue uniform 300;
|
||||||
|
// valueFraction uniform 1;
|
||||||
|
// refGradient uniform 0;
|
||||||
|
//}
|
||||||
|
//p
|
||||||
|
//{
|
||||||
|
// type calculated;
|
||||||
|
// value uniform 100000;
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// How to select the faces:
|
||||||
|
// - set : specify faceSet in 'set'
|
||||||
|
// - patches : specify names in 'patches'
|
||||||
|
// - autoPatch : attempts automatic patching of the specified
|
||||||
|
// candidates in 'patches'.
|
||||||
|
// - single region : match in the region itself
|
||||||
|
// - multi regions : match in between regions only
|
||||||
|
constructFrom autoPatch;
|
||||||
|
|
||||||
|
// If constructFrom = patches or autoPatch: names of patches.
|
||||||
|
// Wildcards&patchGroups allowed.
|
||||||
|
patches (group_solid);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Patches to couple to fluids
|
||||||
|
{
|
||||||
|
// Dictionary to construct new patch from
|
||||||
|
patchInfo
|
||||||
|
{
|
||||||
|
type mappedPatch;
|
||||||
|
inGroups (group_fluid);
|
||||||
|
sampleMode nearestPatchFaceAMI;
|
||||||
|
|
||||||
|
AMIMethod faceAreaWeightAMI;
|
||||||
|
maxDistance2 1e-6; // max (square) distance
|
||||||
|
minCosAngle 0.5; // min alignment
|
||||||
|
|
||||||
|
// Overwritten
|
||||||
|
//sampleRegion otherRegion;
|
||||||
|
//samplePatch otherPatch;
|
||||||
|
|
||||||
|
//- Optional override of added patchfields. If not specified
|
||||||
|
// any added patchfields are of type calculated.
|
||||||
|
patchFields
|
||||||
|
{
|
||||||
|
//- Problem is with patch fields that need additional
|
||||||
|
// state. Patches get created with 0 faces and
|
||||||
|
// then mapped to the correct size. The autoMap genrally
|
||||||
|
// does not know value to give the new faces.
|
||||||
|
//T
|
||||||
|
//{
|
||||||
|
// type compressible::turbulentTemperatureRadCoupledMixed;
|
||||||
|
// Tnbr T;
|
||||||
|
// kappaMethod solidThermo;
|
||||||
|
// value uniform 300;
|
||||||
|
//}
|
||||||
|
//p
|
||||||
|
//{
|
||||||
|
// type calculated;
|
||||||
|
// value uniform 100000;
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// How to select the faces:
|
||||||
|
// - set : specify faceSet in 'set'
|
||||||
|
// - patches : specify names in 'patches'
|
||||||
|
// - autoPatch : attempts automatic patching of the specified
|
||||||
|
// candidates in 'patches'.
|
||||||
|
// - single region : match in the region itself
|
||||||
|
// - multi regions : match in between regions only
|
||||||
|
constructFrom autoPatch;
|
||||||
|
|
||||||
|
// If constructFrom = patches or autoPatch: names of patches.
|
||||||
|
// Wildcards&patchGroups allowed.
|
||||||
|
patches (group_fluid);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvSchemes;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
ddtSchemes
|
||||||
|
{
|
||||||
|
default Euler;
|
||||||
|
}
|
||||||
|
|
||||||
|
gradSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
divSchemes
|
||||||
|
{
|
||||||
|
default none;
|
||||||
|
}
|
||||||
|
|
||||||
|
laplacianSchemes
|
||||||
|
{
|
||||||
|
default none;
|
||||||
|
laplacian(alpha,h) Gauss linear corrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
interpolationSchemes
|
||||||
|
{
|
||||||
|
default linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
snGradSchemes
|
||||||
|
{
|
||||||
|
default corrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvSolution;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
solvers
|
||||||
|
{
|
||||||
|
h
|
||||||
|
{
|
||||||
|
solver PCG;
|
||||||
|
preconditioner DIC;
|
||||||
|
tolerance 1e-06;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
hFinal
|
||||||
|
{
|
||||||
|
$h;
|
||||||
|
tolerance 1e-06;
|
||||||
|
relTol 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PIMPLE
|
||||||
|
{
|
||||||
|
nNonOrthogonalCorrectors 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object controlDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
application chtMultiRegionFoam;
|
||||||
|
|
||||||
|
startFrom startTime;
|
||||||
|
|
||||||
|
startTime 0;
|
||||||
|
|
||||||
|
stopAt endTime;
|
||||||
|
|
||||||
|
endTime 100;
|
||||||
|
|
||||||
|
deltaT 0.001;
|
||||||
|
|
||||||
|
writeControl adjustable;
|
||||||
|
|
||||||
|
writeInterval 10;
|
||||||
|
|
||||||
|
purgeWrite 0;
|
||||||
|
|
||||||
|
writeFormat ascii;
|
||||||
|
|
||||||
|
writePrecision 8;
|
||||||
|
|
||||||
|
writeCompression off;
|
||||||
|
|
||||||
|
timeFormat general;
|
||||||
|
|
||||||
|
timePrecision 6;
|
||||||
|
|
||||||
|
runTimeModifiable yes;
|
||||||
|
|
||||||
|
maxCo 0.6;
|
||||||
|
|
||||||
|
// Maximum diffusion number
|
||||||
|
maxDi 10.0;
|
||||||
|
|
||||||
|
adjustTimeStep yes;
|
||||||
|
|
||||||
|
functions
|
||||||
|
{
|
||||||
|
#include "vtkWrite"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvSchemes;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
ddtSchemes
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
gradSchemes
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
divSchemes
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
laplacianSchemes
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
interpolationSchemes
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
snGradSchemes
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvSolution;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
PIMPLE
|
||||||
|
{
|
||||||
|
nOuterCorrectors 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,95 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object blockMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
scale 1;
|
||||||
|
|
||||||
|
vertices
|
||||||
|
(
|
||||||
|
(-0.1 0.00 -0.05)
|
||||||
|
( 0.0 0.00 -0.05)
|
||||||
|
( 0.0 0.01 -0.05)
|
||||||
|
(-0.1 0.01 -0.05)
|
||||||
|
(-0.1 0.00 0.05)
|
||||||
|
( 0.0 0.00 0.05)
|
||||||
|
( 0.0 0.01 0.05)
|
||||||
|
(-0.1 0.01 0.05)
|
||||||
|
);
|
||||||
|
|
||||||
|
blocks
|
||||||
|
(
|
||||||
|
hex (0 1 2 3 4 5 6 7) (10 4 1) simpleGrading (1 1 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
edges
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
|
boundary
|
||||||
|
(
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 4 7 3)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
inGroups (group_solid);
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(2 6 5 1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
inGroups (group_solid);
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(1 5 4 0)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
inGroups (group_fluid);
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(3 7 6 2)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
minZ
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 3 2 1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(4 5 6 7)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../bottomSolid/createPatchDict
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../bottomSolid/fvSchemes
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../bottomSolid/fvSolution
|
||||||
@ -0,0 +1,95 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object blockMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
scale 1;
|
||||||
|
|
||||||
|
vertices
|
||||||
|
(
|
||||||
|
(-0.0 0.00 -0.05)
|
||||||
|
( 0.1 0.00 -0.05)
|
||||||
|
( 0.1 0.01 -0.05)
|
||||||
|
(-0.0 0.01 -0.05)
|
||||||
|
(-0.0 0.00 0.05)
|
||||||
|
( 0.1 0.00 0.05)
|
||||||
|
( 0.1 0.01 0.05)
|
||||||
|
(-0.0 0.01 0.05)
|
||||||
|
);
|
||||||
|
|
||||||
|
blocks
|
||||||
|
(
|
||||||
|
hex (0 1 2 3 4 5 6 7) (10 4 1) simpleGrading (1 1 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
edges
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
|
boundary
|
||||||
|
(
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
inGroups (group_solid);
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 4 7 3)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(2 6 5 1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
inGroups (group_solid);
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(1 5 4 0)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
inGroups (group_fluid);
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(3 7 6 2)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
minZ
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 3 2 1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(4 5 6 7)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../bottomSolid/createPatchDict
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../bottomSolid/fvSchemes
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../bottomSolid/fvSolution
|
||||||
@ -0,0 +1,93 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object blockMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
scale 1;
|
||||||
|
|
||||||
|
vertices
|
||||||
|
(
|
||||||
|
(-0.1 0.01 -0.05)
|
||||||
|
( 0.1 0.01 -0.05)
|
||||||
|
( 0.1 0.04 -0.05)
|
||||||
|
(-0.1 0.04 -0.05)
|
||||||
|
(-0.1 0.01 0.05)
|
||||||
|
( 0.1 0.01 0.05)
|
||||||
|
( 0.1 0.04 0.05)
|
||||||
|
(-0.1 0.04 0.05)
|
||||||
|
);
|
||||||
|
|
||||||
|
blocks
|
||||||
|
(
|
||||||
|
hex (0 1 2 3 4 5 6 7) (20 4 10) simpleGrading (1 1 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
edges
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
|
boundary
|
||||||
|
(
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 4 7 3)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(2 6 5 1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
inGroups (group_fluid);
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(1 5 4 0)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(3 7 6 2)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
minZ
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 3 2 1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(4 5 6 7)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,99 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2106 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object createPatchDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
// This application/dictionary controls:
|
||||||
|
// - optional: create new patches from boundary faces (either given as
|
||||||
|
// a set of patches or as a faceSet)
|
||||||
|
// - always: order faces on coupled patches such that they are opposite. This
|
||||||
|
// is done for all coupled faces, not just for any patches created.
|
||||||
|
// - optional: synchronise points on coupled patches.
|
||||||
|
// - always: remove zero-sized (non-coupled) patches (that were not added)
|
||||||
|
|
||||||
|
// 1. Create cyclic:
|
||||||
|
// - specify where the faces should come from
|
||||||
|
// - specify the type of cyclic. If a rotational specify the rotationAxis
|
||||||
|
// and centre to make matching easier
|
||||||
|
// - always create both halves in one invocation with correct 'neighbourPatch'
|
||||||
|
// setting.
|
||||||
|
// - optionally pointSync true to guarantee points to line up.
|
||||||
|
|
||||||
|
// 2. Correct incorrect cyclic:
|
||||||
|
// This will usually fail upon loading:
|
||||||
|
// "face 0 area does not match neighbour 2 by 0.0100005%"
|
||||||
|
// " -- possible face ordering problem."
|
||||||
|
// - in polyMesh/boundary file:
|
||||||
|
// - loosen matchTolerance of all cyclics to get case to load
|
||||||
|
// - or change patch type from 'cyclic' to 'patch'
|
||||||
|
// and regenerate cyclic as above
|
||||||
|
|
||||||
|
// Do a synchronisation of coupled points after creation of any patches.
|
||||||
|
// Note: this does not work with points that are on multiple coupled patches
|
||||||
|
// with transformations (i.e. cyclics).
|
||||||
|
pointSync false;
|
||||||
|
|
||||||
|
// Patches to create.
|
||||||
|
patches
|
||||||
|
(
|
||||||
|
{
|
||||||
|
// Dictionary to construct new patch from
|
||||||
|
patchInfo
|
||||||
|
{
|
||||||
|
type mappedPatch;
|
||||||
|
inGroups (group_fluid);
|
||||||
|
sampleMode nearestPatchFaceAMI;
|
||||||
|
|
||||||
|
AMIMethod faceAreaWeightAMI;
|
||||||
|
maxDistance2 1e-6; // max (square) distance
|
||||||
|
minCosAngle 0.5; // min alignment
|
||||||
|
|
||||||
|
// Overwritten
|
||||||
|
//sampleRegion otherRegion;
|
||||||
|
//samplePatch otherPatch;
|
||||||
|
|
||||||
|
//- Optional override of added patchfields. If not specified
|
||||||
|
// any added patchfields are of type calculated.
|
||||||
|
patchFields
|
||||||
|
{
|
||||||
|
//- Problem is with patch fields that need additional
|
||||||
|
// state. Patches get created with 0 faces and
|
||||||
|
// then mapped to the correct size. The autoMap genrally
|
||||||
|
// does not know value to give the new faces.
|
||||||
|
//T
|
||||||
|
//{
|
||||||
|
// type compressible::turbulentTemperatureRadCoupledMixed;
|
||||||
|
// Tnbr T;
|
||||||
|
// kappaMethod solidThermo;
|
||||||
|
// value uniform 300;
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// How to select the faces:
|
||||||
|
// - set : specify faceSet in 'set'
|
||||||
|
// - patches : specify names in 'patches'
|
||||||
|
// - autoPatch : attempts automatic patching of the specified
|
||||||
|
// candidates in 'patches'.
|
||||||
|
// - single region : match in the region itself
|
||||||
|
// - multi regions : match in between regions only
|
||||||
|
constructFrom autoPatch;
|
||||||
|
|
||||||
|
// If constructFrom = patches or autoPatch: names of patches.
|
||||||
|
// Wildcards&patchGroups allowed.
|
||||||
|
patches (group_fluid);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvSchemes;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
ddtSchemes
|
||||||
|
{
|
||||||
|
default Euler;
|
||||||
|
}
|
||||||
|
|
||||||
|
gradSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
divSchemes
|
||||||
|
{
|
||||||
|
default none;
|
||||||
|
|
||||||
|
div(phi,U) Gauss upwind;
|
||||||
|
|
||||||
|
div(phi,K) Gauss linear;
|
||||||
|
div(phi,h) Gauss upwind;
|
||||||
|
|
||||||
|
turbulence Gauss upwind;
|
||||||
|
div(phi,k) $turbulence;
|
||||||
|
div(phi,epsilon) $turbulence;
|
||||||
|
div(phi,R) $turbulence;
|
||||||
|
div(R) Gauss linear;
|
||||||
|
|
||||||
|
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
laplacianSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear corrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
interpolationSchemes
|
||||||
|
{
|
||||||
|
default linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
snGradSchemes
|
||||||
|
{
|
||||||
|
default corrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,82 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvSolution;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
solvers
|
||||||
|
{
|
||||||
|
rho
|
||||||
|
{
|
||||||
|
solver PCG;
|
||||||
|
preconditioner DIC;
|
||||||
|
tolerance 1e-7;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
rhoFinal
|
||||||
|
{
|
||||||
|
$rho;
|
||||||
|
tolerance 1e-7;
|
||||||
|
relTol 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p_rgh
|
||||||
|
{
|
||||||
|
solver GAMG;
|
||||||
|
tolerance 1e-7;
|
||||||
|
relTol 0.01;
|
||||||
|
smoother GaussSeidel;
|
||||||
|
}
|
||||||
|
|
||||||
|
p_rghFinal
|
||||||
|
{
|
||||||
|
$p_rgh;
|
||||||
|
tolerance 1e-7;
|
||||||
|
relTol 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
"(U|h|k|epsilon|R)"
|
||||||
|
{
|
||||||
|
solver PBiCGStab;
|
||||||
|
preconditioner DILU;
|
||||||
|
tolerance 1e-7;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
"(U|h|k|epsilon|R)Final"
|
||||||
|
{
|
||||||
|
$U;
|
||||||
|
tolerance 1e-7;
|
||||||
|
relTol 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PIMPLE
|
||||||
|
{
|
||||||
|
momentumPredictor yes;
|
||||||
|
nCorrectors 2;
|
||||||
|
nNonOrthogonalCorrectors 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
relaxationFactors
|
||||||
|
{
|
||||||
|
equations
|
||||||
|
{
|
||||||
|
"h.*" 1;
|
||||||
|
"U.*" 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
// -*- C++ -*-
|
||||||
|
// Use the vtkWrite function object
|
||||||
|
|
||||||
|
vtkWrite
|
||||||
|
{
|
||||||
|
type vtkWrite;
|
||||||
|
libs (utilityFunctionObjects);
|
||||||
|
log true;
|
||||||
|
|
||||||
|
writeControl writeTime;
|
||||||
|
writeInterval 1;
|
||||||
|
|
||||||
|
regions (".*");
|
||||||
|
|
||||||
|
internal true;
|
||||||
|
|
||||||
|
boundary true;
|
||||||
|
|
||||||
|
single false;
|
||||||
|
|
||||||
|
interpolate true;
|
||||||
|
|
||||||
|
// Fields to output (words or regex)
|
||||||
|
fields (".*");
|
||||||
|
|
||||||
|
//- Output format (ascii | binary) - Default=binary
|
||||||
|
// format binary;
|
||||||
|
|
||||||
|
//- Use legacy output format - Default=false
|
||||||
|
// legacy false;
|
||||||
|
|
||||||
|
//- Output directory name - Default="postProcessing/<name>"
|
||||||
|
// directory "VTK";
|
||||||
|
|
||||||
|
//- Write cell ids as field - Default=true
|
||||||
|
writeIds false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Solid walls only
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type vtkWrite;
|
||||||
|
libs (utilityFunctionObjects);
|
||||||
|
log true;
|
||||||
|
|
||||||
|
writeControl writeTime;
|
||||||
|
writeInterval 1;
|
||||||
|
|
||||||
|
internal false;
|
||||||
|
|
||||||
|
// single true;
|
||||||
|
|
||||||
|
regions ( heater "(?i).*solid" );
|
||||||
|
patches ( "(?i).*solid_to.*" "heater.*(Air|Water)" );
|
||||||
|
|
||||||
|
fields (T);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user