mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: tutorials: fix tutorials for 1812. See #1059.
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2018 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -185,7 +185,7 @@ Foam::refinementSurfaces::refinementSurfaces
|
||||
const word& geomName = allGeometry_.names()[geomI];
|
||||
|
||||
const entry* ePtr =
|
||||
surfacesDict.findEntry(geomName, keyType::LITERAL);
|
||||
surfacesDict.findEntry(geomName, keyType::REGEX);
|
||||
|
||||
if (ePtr)
|
||||
{
|
||||
|
||||
@ -613,7 +613,7 @@ Foam::shellSurfaces::shellSurfaces
|
||||
{
|
||||
const word& geomName = allGeometry_.names()[geomI];
|
||||
|
||||
const entry* eptr = shellsDict.findEntry(geomName, keyType::LITERAL);
|
||||
const entry* eptr = shellsDict.findEntry(geomName, keyType::REGEX);
|
||||
|
||||
if (eptr)
|
||||
{
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / 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
|
||||
This file is part of OpenFOAM.
|
||||
@ -193,16 +193,31 @@ Foam::searchableSurfaceCollection::searchableSurfaceCollection
|
||||
{
|
||||
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
|
||||
(
|
||||
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;
|
||||
|
||||
searchableSurface& s =
|
||||
|
||||
@ -17,148 +17,6 @@ FoamFile
|
||||
|
||||
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 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"
|
||||
//);
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -17,147 +17,6 @@ FoamFile
|
||||
|
||||
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 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"
|
||||
//);
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -23,141 +23,17 @@ numberOfSubdomains 2;
|
||||
// weightField dsmcRhoNMean;
|
||||
|
||||
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
|
||||
{
|
||||
//- 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
|
||||
// (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"
|
||||
//);
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -52,6 +52,8 @@ geometry
|
||||
{
|
||||
surface box1;
|
||||
scale (1.0 1.0 2.1);
|
||||
|
||||
// Old syntax
|
||||
transform
|
||||
{
|
||||
coordinateSystem
|
||||
@ -71,22 +73,16 @@ geometry
|
||||
{
|
||||
surface box1;
|
||||
scale (1.0 1.0 2.1);
|
||||
|
||||
// Simplified syntax
|
||||
transform
|
||||
{
|
||||
coordinateSystem
|
||||
{
|
||||
type cartesian;
|
||||
origin (3.5 3 0);
|
||||
coordinateRotation
|
||||
{
|
||||
type axesRotation;
|
||||
e1 (1 0 0);
|
||||
e3 (0 0 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// For directional refinement
|
||||
dirRefineBox1
|
||||
|
||||
Reference in New Issue
Block a user