ENH: Multiple commits - lumped due to git index file corruption

- Re-located mapped point patches
- Updated mapped patch write
- deprecated directMapped in favour of mapped
- updated resulting dependancies - apps/libs/tuts
This commit is contained in:
andy
2011-09-09 12:05:12 +01:00
parent 531b721d4b
commit 8ae9569085
106 changed files with 558 additions and 5444 deletions

View File

@ -3,8 +3,8 @@ cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso phaseModel
wmake libso interfacialModels
wmake libso multiphaseSystem
wmake libso interfacialModels
wmake libso kineticTheoryModels
wmake

View File

@ -1,4 +1,4 @@
EXE_INC = \
EXE_INC = -ggdb3 \
-IphaseModel/lnInclude \
-ImultiphaseSystem/lnInclude \
/*-IkineticTheoryModels/lnInclude*/ \

View File

@ -33,7 +33,7 @@ forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
+ (alpha/phase.rho())*fluid.Svm(phase)
)
);
mrfZones.addCoriolis(alpha, UEqns[phasei]);
mrfZones.addCoriolis(UEqns[phasei]);
UEqns[phasei].relax();
phasei++;

View File

@ -1,4 +1,4 @@
EXE_INC = \
EXE_INC = -ggdb3 \
-I../phaseModel/lnInclude \
-I../interfacialModels/lnInclude \
-IalphaContactAngle \

View File

@ -56,6 +56,9 @@ void Foam::multiphaseSystem::calcAlphas()
void Foam::multiphaseSystem::solveAlphas()
{
word alphaScheme("div(phi,alpha)");
word alpharScheme("div(phirb,alpha)");
surfaceScalarField phic(mag(phi_/mesh_.magSf()));
PtrList<surfaceScalarField> phiAlphaCorrs(phases_.size());
@ -64,7 +67,6 @@ void Foam::multiphaseSystem::solveAlphas()
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
{
phaseModel& phase1 = iter();
volScalarField& alpha1 = phase1;
phase1.phiAlpha() =
dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0);
@ -78,7 +80,7 @@ void Foam::multiphaseSystem::solveAlphas()
(
phi_,
phase1,
"div(phi," + alpha1.name() + ')'
alphaScheme
)
)
);
@ -88,7 +90,6 @@ void Foam::multiphaseSystem::solveAlphas()
forAllIter(PtrDictionary<phaseModel>, phases_, iter2)
{
phaseModel& phase2 = iter2();
volScalarField& alpha2 = phase2;
if (&phase2 == &phase1) continue;
@ -99,16 +100,11 @@ void Foam::multiphaseSystem::solveAlphas()
*nHatf(phase1, phase2)
);
word phirScheme
(
"div(phir," + alpha2.name() + ',' + alpha1.name() + ')'
);
phiAlphaCorr += fvc::flux
(
-fvc::flux(-phir, phase2, phirScheme),
-fvc::flux(-phir, phase2, alpharScheme),
phase1,
phirScheme
alpharScheme
);
}

View File

@ -1,3 +0,0 @@
Test-DirectMappedPatch.C
EXE = $(FOAM_USER_APPBIN)/Test-DirectMappedPatch

View File

@ -0,0 +1,3 @@
Test-MappedPatch.C
EXE = $(FOAM_USER_APPBIN)/Test-MappedPatch

View File

@ -22,10 +22,10 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
testDirectMappedPatch
testMappedPatch
Description
Test direct mapped b.c. by mapping face centres (mesh.C().boundaryField()).
Test mapped b.c. by mapping face centres (mesh.C().boundaryField()).
\*---------------------------------------------------------------------------*/
@ -37,7 +37,8 @@ Description
#include "Time.H"
#include "OFstream.H"
#include "volFields.H"
#include "directMappedFixedValueFvPatchFields.H"
#include "mappedPolyPatch.H"
#include "mappedFixedValueFvPatchFields.H"
using namespace Foam;
@ -48,10 +49,10 @@ using namespace Foam;
int main(int argc, char *argv[])
{
# include "addTimeOptions.H"
# include "setRootCase.H"
# include "createTime.H"
# include "createMesh.H"
#include "addTimeOptions.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
wordList patchFieldTypes
(
@ -61,10 +62,10 @@ int main(int argc, char *argv[])
forAll(mesh.boundaryMesh(), patchI)
{
if (isA<directMappedPolyPatch>(mesh.boundaryMesh()[patchI]))
if (isA<mappedPolyPatch>(mesh.boundaryMesh()[patchI]))
{
patchFieldTypes[patchI] =
directMappedFixedValueFvPatchVectorField::typeName;
mappedFixedValueFvPatchVectorField::typeName;
}
}
@ -92,13 +93,13 @@ int main(int argc, char *argv[])
{
if
(
isA<directMappedFixedValueFvPatchVectorField>
isA<mappedFixedValueFvPatchVectorField>
(
cc.boundaryField()[patchI]
)
)
{
Pout<< "Detected a directMapped patch:" << patchI << endl;
Pout<< "Detected a mapped patch:" << patchI << endl;
OFstream str(mesh.boundaryMesh()[patchI].name() + ".obj");
Pout<< "Writing mapped values to " << str.name() << endl;

View File

@ -27,9 +27,9 @@ Description
- used to e.g. extrude baffles (extrude internal faces) or create
liquid film regions.
- if extruding internal faces:
- create baffles in original mesh with directMappedWall patches
- create baffles in original mesh with mappedWall patches
- if extruding boundary faces:
- convert boundary faces to directMappedWall patches
- convert boundary faces to mappedWall patches
- extrude edges of faceZone as a \<zone\>_sidePatch
- extrude edges inbetween different faceZones as a
(nonuniformTransform)cyclic \<zoneA\>_\<zoneB\>
@ -68,9 +68,9 @@ into the space of the neighbour:
| |
+-------------+
BBB=directMapped between owner on original mesh and new extrusion.
BBB=mapped between owner on original mesh and new extrusion.
(zero offset)
CCC=directMapped between neighbour on original mesh and new extrusion
CCC=mapped between neighbour on original mesh and new extrusion
(offset due to the thickness of the extruded mesh)
For the case of flipMap the extrusion is the other way around: from the
@ -98,7 +98,7 @@ becomes
| |
+-----------+
BBB=directMapped between original mesh and new extrusion
BBB=mapped between original mesh and new extrusion
CCC=polypatch
@ -126,7 +126,7 @@ Usage
#include "patchPointEdgeCirculator.H"
#include "OFstream.H"
#include "meshTools.H"
#include "directMappedWallPolyPatch.H"
#include "mappedWallPolyPatch.H"
#include "createShellMesh.H"
#include "volFields.H"
#include "surfaceFields.H"
@ -1122,7 +1122,7 @@ int main(int argc, char *argv[])
// Check whether the zone is internal or external faces to determine
// what patch type to insert. Cannot be mixed
// since then how to couple? - directMapped only valid for a whole patch.
// since then how to couple? - mapped only valid for a whole patch.
boolList isInternal(zoneIDs.size(), false);
forAll(zoneIDs, i)
{
@ -1174,7 +1174,7 @@ int main(int argc, char *argv[])
if (isInternal[i])
{
interRegionTopPatch[i] = addPatch<directMappedWallPolyPatch>
interRegionTopPatch[i] = addPatch<mappedWallPolyPatch>
(
mesh,
interName + "_top"
@ -1185,7 +1185,7 @@ int main(int argc, char *argv[])
<< '\t' << patches[interRegionTopPatch[i]].type()
<< nl;
interRegionBottomPatch[i] = addPatch<directMappedWallPolyPatch>
interRegionBottomPatch[i] = addPatch<mappedWallPolyPatch>
(
mesh,
interName + "_bottom"
@ -1209,7 +1209,7 @@ int main(int argc, char *argv[])
<< '\t' << patches[interRegionTopPatch[i]].type()
<< nl;
interRegionBottomPatch[i] = addPatch<directMappedWallPolyPatch>
interRegionBottomPatch[i] = addPatch<mappedWallPolyPatch>
(
mesh,
interName
@ -1222,7 +1222,7 @@ int main(int argc, char *argv[])
}
else if (zoneShadowNames.size() > 0) //patch using shadow face zones.
{
interRegionTopPatch[i] = addPatch<directMappedWallPolyPatch>
interRegionTopPatch[i] = addPatch<mappedWallPolyPatch>
(
mesh,
zoneShadowNames[i] + "_top"
@ -1233,7 +1233,7 @@ int main(int argc, char *argv[])
<< '\t' << patches[interRegionTopPatch[i]].type()
<< nl;
interRegionBottomPatch[i] = addPatch<directMappedWallPolyPatch>
interRegionBottomPatch[i] = addPatch<mappedWallPolyPatch>
(
mesh,
interName
@ -1661,7 +1661,7 @@ int main(int argc, char *argv[])
if
(
isA<directMappedWallPolyPatch>(pp)
isA<mappedWallPolyPatch>(pp)
&& (findIndex(interRegionTopPatch, patchI) != -1)
)
{
@ -1669,14 +1669,14 @@ int main(int argc, char *argv[])
topOffsets[index] = calcOffset(extrudePatch, extruder, pp);
newPatches[patchI] = new directMappedWallPolyPatch
newPatches[patchI] = new mappedWallPolyPatch
(
pp.name(),
pp.size(),
pp.start(),
patchI,
regionName, // sampleRegion
directMappedPatchBase::NEARESTPATCHFACE,// sampleMode
mappedPatchBase::NEARESTPATCHFACE,// sampleMode
pp.name(), // samplePatch
topOffsets[index], // offset
patches
@ -1684,7 +1684,7 @@ int main(int argc, char *argv[])
}
else if
(
isA<directMappedWallPolyPatch>(pp)
isA<mappedWallPolyPatch>(pp)
&& (findIndex(interRegionBottomPatch, patchI) != -1)
)
{
@ -1692,14 +1692,14 @@ int main(int argc, char *argv[])
bottomOffsets[index] = calcOffset(extrudePatch, extruder, pp);
newPatches[patchI] = new directMappedWallPolyPatch
newPatches[patchI] = new mappedWallPolyPatch
(
pp.name(),
pp.size(),
pp.start(),
patchI,
regionName, // sampleRegion
directMappedPatchBase::NEARESTPATCHFACE,// sampleMode
mappedPatchBase::NEARESTPATCHFACE,// sampleMode
pp.name(), // samplePatch
bottomOffsets[index], // offset
patches
@ -1985,19 +1985,19 @@ int main(int argc, char *argv[])
if
(
isA<directMappedWallPolyPatch>(pp)
isA<mappedWallPolyPatch>(pp)
&& (findIndex(interRegionTopPatch, patchI) != -1)
)
{
label index = findIndex(interRegionTopPatch, patchI);
newPatches[patchI] = new directMappedWallPolyPatch
newPatches[patchI] = new mappedWallPolyPatch
(
pp.name(),
pp.size(),
pp.start(),
patchI,
shellRegionName, // sampleRegion
directMappedPatchBase::NEARESTPATCHFACE,// sampleMode
mappedPatchBase::NEARESTPATCHFACE,// sampleMode
pp.name(), // samplePatch
-topOffsets[index], // offset
patches
@ -2005,20 +2005,20 @@ int main(int argc, char *argv[])
}
else if
(
isA<directMappedWallPolyPatch>(pp)
isA<mappedWallPolyPatch>(pp)
&& (findIndex(interRegionBottomPatch, patchI) != -1)
)
{
label index = findIndex(interRegionBottomPatch, patchI);
newPatches[patchI] = new directMappedWallPolyPatch
newPatches[patchI] = new mappedWallPolyPatch
(
pp.name(),
pp.size(),
pp.start(),
patchI,
shellRegionName, // sampleRegion
directMappedPatchBase::NEARESTPATCHFACE,// sampleMode
mappedPatchBase::NEARESTPATCHFACE,// sampleMode
pp.name(), // samplePatch
-bottomOffsets[index], // offset
patches

View File

@ -23,13 +23,13 @@ faceZones (f0);
// FaceZone shadow
//faceZonesShadow (fBaffleShadow);
// Adapt the original mesh to have directMapped patches at where the
// Adapt the original mesh to have mapped patches at where the
// faceZones are?
// If true:
// - extruding internal faces: become baffles on directMapped patches
// - extruding boundary faces: repatched to be on directMapped patches
// - extruding internal faces: become baffles on mapped patches
// - extruding boundary faces: repatched to be on mapped patches
// If false: leave original mesh intact. Extruded mesh will still have
// directMapped patch which might need to be adapted.
// mapped patch which might need to be adapted.
adaptMesh true;
// Extrude 1D-columns of cells?

View File

@ -36,7 +36,7 @@ Description
Output is:
- volScalarField with regions as different scalars (-detectOnly)
or
- mesh with multiple regions and directMapped patches. These patches
- mesh with multiple regions and mapped patches. These patches
either cover the whole interface between two region (default) or
only part according to faceZones (-useFaceZones)
or
@ -57,7 +57,7 @@ Description
- Should work in parallel.
cellZones can differ on either side of processor boundaries in which case
the faces get moved from processor patch to directMapped patch. Not
the faces get moved from processor patch to mapped patch. Not
very well tested.
- If a cell zone gets split into more than one region it can detect
@ -94,7 +94,7 @@ Description
#include "EdgeMap.H"
#include "syncTools.H"
#include "ReadFields.H"
#include "directMappedWallPolyPatch.H"
#include "mappedWallPolyPatch.H"
#include "zeroGradientFvPatchFields.H"
using namespace Foam;
@ -1260,14 +1260,14 @@ labelList addRegionPatches
// << " trying to add patches " << names << endl;
directMappedWallPolyPatch patch1
mappedWallPolyPatch patch1
(
names[0],
0, // overridden
0, // overridden
0, // overridden
regionNames[e[1]], // sampleRegion
directMappedPatchBase::NEARESTPATCHFACE,
mappedPatchBase::NEARESTPATCHFACE,
names[1], // samplePatch
point::zero, // offset
mesh.boundaryMesh()
@ -1275,14 +1275,14 @@ labelList addRegionPatches
interfacePatches[interI] = addPatch(mesh, patch1);
directMappedWallPolyPatch patch2
mappedWallPolyPatch patch2
(
names[1],
0,
0,
0,
regionNames[e[0]], // sampleRegion
directMappedPatchBase::NEARESTPATCHFACE,
mappedPatchBase::NEARESTPATCHFACE,
names[0],
point::zero, // offset
mesh.boundaryMesh()

View File

@ -20,7 +20,7 @@ dictionaryReplacement
{
".*"
{
type directMappedPatch;
type mappedPatch;
}
}