BUG: tutorials: fix tutorials for 1812. See #1059.

This commit is contained in:
mattijs
2018-10-31 12:08:55 +00:00
parent 5f91007d4a
commit 192e2eeb9d
7 changed files with 36 additions and 432 deletions

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2015-2018 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -185,7 +185,7 @@ Foam::refinementSurfaces::refinementSurfaces
const word& geomName = allGeometry_.names()[geomI]; const word& geomName = allGeometry_.names()[geomI];
const entry* ePtr = const entry* ePtr =
surfacesDict.findEntry(geomName, keyType::LITERAL); surfacesDict.findEntry(geomName, keyType::REGEX);
if (ePtr) if (ePtr)
{ {

View File

@ -613,7 +613,7 @@ Foam::shellSurfaces::shellSurfaces
{ {
const word& geomName = allGeometry_.names()[geomI]; const word& geomName = allGeometry_.names()[geomI];
const entry* eptr = shellsDict.findEntry(geomName, keyType::LITERAL); const entry* eptr = shellsDict.findEntry(geomName, keyType::REGEX);
if (eptr) if (eptr)
{ {

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -193,16 +193,31 @@ Foam::searchableSurfaceCollection::searchableSurfaceCollection
{ {
instance_[surfI] = dEntry.keyword(); instance_[surfI] = dEntry.keyword();
const dictionary& subDict = dEntry.dict(); const dictionary& sDict = dEntry.dict();
subDict.readEntry("scale", scale_[surfI]); sDict.readEntry("scale", scale_[surfI]);
const dictionary& coordDict = sDict.subDict("transform");
if (coordDict.found("coordinateSystem"))
{
// Backwards compatibility: use coordinateSystem subdictionary
transform_.set transform_.set
( (
surfI, surfI,
new coordSystem::cartesian(subDict, "transform") new coordSystem::cartesian(coordDict, "coordinateSystem")
); );
}
else
{
// New form: directly set from dictionary
transform_.set
(
surfI,
new coordSystem::cartesian(sDict, "transform")
);
}
const word subGeomName(subDict.get<word>("surface")); const word subGeomName(sDict.get<word>("surface"));
//Pout<< "Trying to find " << subGeomName << endl; //Pout<< "Trying to find " << subGeomName << endl;
searchableSurface& s = searchableSurface& s =

View File

@ -17,148 +17,6 @@ FoamFile
numberOfSubdomains 2; numberOfSubdomains 2;
//- Use the volScalarField named here as a weight for each cell in the
// decomposition. For example, use a particle population field to decompose
// for a balanced number of particles in a lagrangian simulation.
// weightField dsmcRhoNMean;
method scotch; method scotch;
// method kahip;
// method metis;
// method hierarchical;
// method simple;
// method manual;
// method multiLevel;
// method structured; // does 2D decomposition of structured mesh
multiLevelCoeffs
{
// Decomposition methods to apply in turn. This is like hierarchical but
// fully general - every method can be used at every level.
level0
{
numberOfSubdomains 64;
//method simple;
//simpleCoeffs
//{
// n (2 1 1);
// delta 0.001;
//}
method scotch;
}
level1
{
numberOfSubdomains 4;
method scotch;
}
}
// Desired output
simpleCoeffs
{
n (2 1 1);
}
hierarchicalCoeffs
{
n (1 2 1);
}
metisCoeffs
{
/*
processorWeights
(
1
1
1
1
);
*/
}
scotchCoeffs
{
//processorWeights
//(
// 1
// 1
// 1
// 1
//);
//writeGraph true;
//strategy "b";
}
manualCoeffs
{
dataFile "decompositionData";
}
structuredCoeffs
{
// Patches to do 2D decomposition on. Structured mesh only; cells have
// to be in 'columns' on top of patches.
patches (movingWall);
// Method to use on the 2D subset
method scotch;
}
/*
constraints
{
//- Keep owner and neighbour on same processor for faces in zones:
zones
{
type preserveFaceZones;
zones (heater solid1 solid3);
enabled false;
}
//- Keep owner and neighbour on same processor for faces in patches:
// (makes sense only for cyclic patches)
patches
{
type preservePatches;
patches (cyclic_half0 cyclic_half1);
enabled false;
}
//- Keep all of faceSet on a single processor. This puts all cells
// connected with a point, edge or face on the same processor.
// (just having face connected cells might not guarantee a balanced
// decomposition)
// The processor can be -1 (the decompositionMethod chooses the processor
// for a good load balance) or explicitly provided (upsets balance).
processors
{
type singleProcessorFaceSets;
sets ((f0 -1));
enabled false;
}
//- Keep owner and neighbour of baffles on same processor
// (i.e. keep it detectable as a baffle).
// Baffles are two boundary face sharing the same points.
baffles
{
type preserveBaffles;
enabled false;
}
}
*/
//// Is the case distributed? Note: command-line argument -roots takes
//// precedence
//distributed yes;
//// Per slave (so nProcs-1 entries) the directory above the case.
//roots
//(
// "/tmp"
// "/tmp"
//);
// ************************************************************************* // // ************************************************************************* //

View File

@ -17,147 +17,6 @@ FoamFile
numberOfSubdomains 5; numberOfSubdomains 5;
//- Use the volScalarField named here as a weight for each cell in the
// decomposition. For example, use a particle population field to decompose
// for a balanced number of particles in a lagrangian simulation.
// weightField dsmcRhoNMean;
method scotch; method scotch;
// method kahip;
// method metis;
// method hierarchical;
// method simple;
// method manual;
// method multiLevel;
// method structured; // does 2D decomposition of structured mesh
multiLevelCoeffs
{
// Decomposition methods to apply in turn. This is like hierarchical but
// fully general - every method can be used at every level.
level0
{
numberOfSubdomains 64;
//method simple;
//simpleCoeffs
//{
// n (2 1 1);
// delta 0.001;
//}
method scotch;
}
level1
{
numberOfSubdomains 4;
method scotch;
}
}
// Desired output
simpleCoeffs
{
n (2 1 1);
}
hierarchicalCoeffs
{
n (1 2 1);
}
metisCoeffs
{
/*
processorWeights
(
1
1
1
1
);
*/
}
scotchCoeffs
{
//processorWeights
//(
// 1
// 1
// 1
// 1
//);
//writeGraph true;
//strategy "b";
}
manualCoeffs
{
dataFile "decompositionData";
}
structuredCoeffs
{
// Method to use on the 2D subset
method scotch;
// Patches to do 2D decomposition on. Structured mesh only; cells have
// to be in 'columns' on top of patches.
patches (movingWall);
}
constraints
{
//- Keep owner and neighbour on same processor for faces in zones:
zones
{
type preserveFaceZones;
zones (heater solid1 solid3);
enabled false;
}
//- Keep owner and neighbour on same processor for faces in patches:
// (makes sense only for cyclic patches)
patches
{
type preservePatches;
patches (cyclic_half0 cyclic_half1);
enabled false;
}
//- Keep all of faceSet on a single processor. This puts all cells
// connected with a point, edge or face on the same processor.
// (just having face connected cells might not guarantee a balanced
// decomposition)
// The processor can be -1 (the decompositionMethod chooses the processor
// for a good load balance) or explicitly provided (upsets balance).
processors
{
type singleProcessorFaceSets;
sets ((f0 -1));
enabled false;
}
//- Keep owner and neighbour of baffles on same processor
// (i.e. keep it detectable as a baffle).
// Baffles are two boundary face sharing the same points.
baffles
{
type preserveBaffles;
enabled false;
}
}
//// Is the case distributed? Note: command-line argument -roots takes
//// precedence
//distributed yes;
//// Per slave (so nProcs-1 entries) the directory above the case.
//roots
//(
// "/tmp"
// "/tmp"
//);
// ************************************************************************* // // ************************************************************************* //

View File

@ -23,141 +23,17 @@ numberOfSubdomains 2;
// weightField dsmcRhoNMean; // weightField dsmcRhoNMean;
method scotch; method scotch;
//method hierarchical;
// method simple;
// method metis;
// method manual;
// method multiLevel;
// method structured; // does 2D decomposition of structured mesh
multiLevelCoeffs
{
// Decomposition methods to apply in turn. This is like hierarchical but
// fully general - every method can be used at every level.
level0
{
numberOfSubdomains 64;
//method simple;
//simpleCoeffs
//{
// n (2 1 1);
// delta 0.001;
//}
method scotch;
}
level1
{
numberOfSubdomains 4;
method scotch;
}
}
// Desired output
simpleCoeffs
{
n (2 1 1);
}
hierarchicalCoeffs
{
n (1 2 1);
}
metisCoeffs
{
/*
processorWeights
(
1
1
1
1
);
*/
}
scotchCoeffs
{
//processorWeights
//(
// 1
// 1
// 1
// 1
//);
//writeGraph true;
//strategy "b";
}
manualCoeffs
{
dataFile "decompositionData";
}
structuredCoeffs
{
// Method to use on the 2D subset
method scotch;
// Patches to do 2D decomposition on. Structured mesh only; cells have
// to be in 'columns' on top of patches.
patches (movingWall);
}
constraints constraints
{ {
//- Keep owner and neighbour on same processor for faces in zones:
zones
{
type preserveFaceZones;
zones (heater solid1 solid3);
enabled false;
}
//- Keep owner and neighbour on same processor for faces in patches:
// (makes sense only for cyclic patches)
patches
{
type preservePatches;
patches (cyclic_half0 cyclic_half1);
enabled false;
}
//- Keep all of faceSet on a single processor. This puts all cells
// connected with a point, edge or face on the same processor.
// (just having face connected cells might not guarantee a balanced
// decomposition)
// The processor can be -1 (the decompositionMethod chooses the processor
// for a good load balance) or explicitly provided (upsets balance).
singleProcessorFaceSets
{
type singleProcessorFaceSets;
sets ((f0 -1));
enabled false;
}
//- Keep owner and neighbour of baffles on same processor //- Keep owner and neighbour of baffles on same processor
// (i.e. keep it detectable as a baffle). // (i.e. keep it detectable as a baffle).
// Baffles are two boundary face sharing the same points. // Baffles are two boundary face sharing the same points.
baffles baffles
{ {
type preserveBaffles; type preserveBaffles;
enabled false;
} }
} }
//// Is the case distributed? Note: command-line argument -roots takes
//// precedence
//distributed yes;
//// Per slave (so nProcs-1 entries) the directory above the case.
//roots
//(
// "/tmp"
// "/tmp"
//);
// ************************************************************************* // // ************************************************************************* //

View File

@ -52,6 +52,8 @@ geometry
{ {
surface box1; surface box1;
scale (1.0 1.0 2.1); scale (1.0 1.0 2.1);
// Old syntax
transform transform
{ {
coordinateSystem coordinateSystem
@ -71,22 +73,16 @@ geometry
{ {
surface box1; surface box1;
scale (1.0 1.0 2.1); scale (1.0 1.0 2.1);
// Simplified syntax
transform transform
{ {
coordinateSystem
{
type cartesian;
origin (3.5 3 0); origin (3.5 3 0);
coordinateRotation
{
type axesRotation;
e1 (1 0 0); e1 (1 0 0);
e3 (0 0 1); e3 (0 0 1);
} }
} }
} }
}
}
// For directional refinement // For directional refinement
dirRefineBox1 dirRefineBox1