mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: handle partially attached master/slave faces (issue #608)
- addresses problems if faces are already partly attached (eg, on a single vertex or along an edge).
This commit is contained in:
132
tutorials/mesh/stitchMesh/simple-cube1/system/blockMeshDict
Normal file
132
tutorials/mesh/stitchMesh/simple-cube1/system/blockMeshDict
Normal file
@ -0,0 +1,132 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
scale 1;
|
||||
|
||||
// Dimensions for outer box
|
||||
lo 0; // outer lower corner
|
||||
uo 1; // outer upper corner
|
||||
|
||||
// Dimensions for inner box
|
||||
li -0.1; // inner lower corner
|
||||
|
||||
ui 0.497; // inner upper corner
|
||||
// ^^^^^ very poorly handled gaps
|
||||
|
||||
ui 0.498; // inner upper corner
|
||||
// ^^^^^ slave patch probably does not project onto master
|
||||
|
||||
ui 0.499; // inner upper corner
|
||||
// ^^^^^ OK
|
||||
|
||||
|
||||
vertices
|
||||
(
|
||||
( $lo $lo $lo )
|
||||
( $uo $lo $lo )
|
||||
( $uo $uo $lo )
|
||||
( $lo $uo $lo )
|
||||
( $lo $lo $uo )
|
||||
( $uo $lo $uo )
|
||||
( $uo $uo $uo )
|
||||
( $lo $uo $uo )
|
||||
|
||||
( $li $li $li )
|
||||
( $ui $li $li )
|
||||
( $ui $ui $li )
|
||||
( $li $ui $li )
|
||||
( $li $li $ui )
|
||||
( $ui $li $ui )
|
||||
( $ui $ui $ui )
|
||||
( $li $ui $ui )
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (6 6 6) simpleGrading (1 1 1)
|
||||
hex (8 9 10 11 12 13 14 15) (10 10 10) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
wallso
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
// Walls of the outside block
|
||||
(0 4 7 3)
|
||||
(1 2 6 5)
|
||||
(0 1 5 4)
|
||||
(3 7 6 2)
|
||||
(0 3 2 1)
|
||||
(4 5 6 7)
|
||||
);
|
||||
}
|
||||
wallsi
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
// Walls of the inside block
|
||||
(8 12 15 11)
|
||||
(8 9 13 12)
|
||||
(8 11 10 9)
|
||||
);
|
||||
}
|
||||
|
||||
// Outer faces populated by subsetMesh
|
||||
outer
|
||||
{
|
||||
type patch;
|
||||
faces ();
|
||||
}
|
||||
|
||||
innerx
|
||||
{
|
||||
type patch;
|
||||
inGroups (inner);
|
||||
faces
|
||||
(
|
||||
(9 10 14 13)
|
||||
);
|
||||
}
|
||||
innery
|
||||
{
|
||||
type patch;
|
||||
inGroups (inner);
|
||||
faces
|
||||
(
|
||||
(11 15 14 10)
|
||||
);
|
||||
}
|
||||
innerz
|
||||
{
|
||||
type patch;
|
||||
inGroups (inner);
|
||||
faces
|
||||
(
|
||||
(12 13 14 15)
|
||||
);
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
45
tutorials/mesh/stitchMesh/simple-cube1/system/controlDict
Normal file
45
tutorials/mesh/stitchMesh/simple-cube1/system/controlDict
Normal file
@ -0,0 +1,45 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application simpleFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 10;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl runTime;
|
||||
|
||||
writeInterval 1;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,53 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object createPatchDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
pointSync false;
|
||||
|
||||
outerSet
|
||||
{
|
||||
patchInfo
|
||||
{
|
||||
type patch;
|
||||
inGroups (outer);
|
||||
}
|
||||
|
||||
constructFrom set;
|
||||
}
|
||||
|
||||
|
||||
// Patches to create.
|
||||
patches
|
||||
(
|
||||
{
|
||||
name outerx;
|
||||
set outerx;
|
||||
$outerSet;
|
||||
}
|
||||
|
||||
{
|
||||
name outery;
|
||||
set outery;
|
||||
$outerSet;
|
||||
}
|
||||
|
||||
{
|
||||
name outerz;
|
||||
set outerz;
|
||||
$outerSet;
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
55
tutorials/mesh/stitchMesh/simple-cube1/system/fvSchemes
Normal file
55
tutorials/mesh/stitchMesh/simple-cube1/system/fvSchemes
Normal file
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: 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 cubic;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p ;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
43
tutorials/mesh/stitchMesh/simple-cube1/system/fvSolution
Normal file
43
tutorials/mesh/stitchMesh/simple-cube1/system/fvSolution
Normal file
@ -0,0 +1,43 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
p
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
U
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
tolerance 1e-05;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PISO
|
||||
{
|
||||
nCorrectors 2;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
106
tutorials/mesh/stitchMesh/simple-cube1/system/topoSetDict
Normal file
106
tutorials/mesh/stitchMesh/simple-cube1/system/topoSetDict
Normal file
@ -0,0 +1,106 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
// Outer cube
|
||||
{
|
||||
name outer;
|
||||
type cellSet;
|
||||
action new;
|
||||
source regionToCell;
|
||||
sourceInfo
|
||||
{
|
||||
insidePoints
|
||||
(
|
||||
(0.99 0.99 0.99)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name corner;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-1 -1 -1)(0.5 0.5 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name inner;
|
||||
type cellSet;
|
||||
action new;
|
||||
source cellToCell;
|
||||
sourceInfo
|
||||
{
|
||||
set corner;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name inner;
|
||||
type cellSet;
|
||||
action delete;
|
||||
source cellToCell;
|
||||
sourceInfo
|
||||
{
|
||||
set outer;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name outer;
|
||||
type cellSet;
|
||||
action delete;
|
||||
source cellToCell;
|
||||
sourceInfo
|
||||
{
|
||||
set corner;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name corner;
|
||||
type cellSet;
|
||||
action clear;
|
||||
}
|
||||
|
||||
{
|
||||
name final;
|
||||
type cellSet;
|
||||
action new;
|
||||
source cellToCell;
|
||||
sourceInfo
|
||||
{
|
||||
set outer;
|
||||
}
|
||||
}
|
||||
{
|
||||
name final;
|
||||
type cellSet;
|
||||
action add;
|
||||
source cellToCell;
|
||||
sourceInfo
|
||||
{
|
||||
set inner;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,88 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
newFromPatch
|
||||
{
|
||||
type faceSet;
|
||||
action new;
|
||||
source patchToFace;
|
||||
sourceInfo
|
||||
{
|
||||
name outer;
|
||||
}
|
||||
}
|
||||
|
||||
subsetNormal
|
||||
{
|
||||
type faceSet;
|
||||
action subset;
|
||||
source normalToFace;
|
||||
sourceInfo
|
||||
{
|
||||
cos 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
actions
|
||||
(
|
||||
// outerx
|
||||
{
|
||||
name outerx;
|
||||
$newFromPatch
|
||||
}
|
||||
|
||||
{
|
||||
name outerx;
|
||||
$subsetNormal;
|
||||
sourceInfo
|
||||
{
|
||||
normal (-1 0 0);
|
||||
}
|
||||
}
|
||||
|
||||
// outery
|
||||
{
|
||||
name outery;
|
||||
$newFromPatch
|
||||
}
|
||||
|
||||
{
|
||||
name outery;
|
||||
$subsetNormal;
|
||||
sourceInfo
|
||||
{
|
||||
normal (0 -1 0);
|
||||
}
|
||||
}
|
||||
|
||||
// outerz
|
||||
{
|
||||
name outerz;
|
||||
$newFromPatch
|
||||
}
|
||||
|
||||
{
|
||||
name outerz;
|
||||
$subsetNormal;
|
||||
sourceInfo
|
||||
{
|
||||
normal (0 0 -1);
|
||||
}
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user