mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
template cases: added pre-commented external patches to blockMeshDict
Uncommenting the patches provides a convenient way to use the patches in the background mesh to define the external boundary of the final mesh. Replaces previous setup with a separate blockMeshDict.extPatches file.
This commit is contained in:
@ -12,19 +12,13 @@ Background Mesh
|
|||||||
===============
|
===============
|
||||||
+ The user should establish the bounds of their CAD.obj file
|
+ The user should establish the bounds of their CAD.obj file
|
||||||
+ The blockMeshDict file contains a backgroundMesh subditionary
|
+ The blockMeshDict file contains a backgroundMesh subditionary
|
||||||
+ Set xMin, xMax, etc to be beyond the CAD.obj bounds
|
+ For internal flows, where CAD.obj describes the external boundary, set xMin,
|
||||||
|
xMax, etc to be beyond the CAD.obj bounds
|
||||||
|
+ For external flows, the background mesh can define the external boundary by
|
||||||
|
uncommenting entries, e.g. inlet, in the boundary section of blockMeshDict
|
||||||
+ Set background mesh density with xCells, yCells, zCells
|
+ Set background mesh density with xCells, yCells, zCells
|
||||||
+ Run blockMesh
|
+ Run blockMesh
|
||||||
|
|
||||||
Background Mesh (alternative)
|
|
||||||
=============================
|
|
||||||
+ The user can adopt the background mesh patches in the mesh
|
|
||||||
+ For example, the background mesh can provide external patches of an external
|
|
||||||
flow
|
|
||||||
+ An alternative blockMeshDict file is set up for this: blockMeshDict.extPatches
|
|
||||||
+ Simply copy blockMeshDict.extPatches to blockMeshDict and edit inlet, outlet
|
|
||||||
patches accordingly
|
|
||||||
|
|
||||||
Castellated Mesh
|
Castellated Mesh
|
||||||
================
|
================
|
||||||
+ In the snappyHexMeshDict file, replace <inletPatch> with the name of the inlet
|
+ In the snappyHexMeshDict file, replace <inletPatch> with the name of the inlet
|
||||||
|
|||||||
@ -59,6 +59,61 @@ edges
|
|||||||
|
|
||||||
boundary
|
boundary
|
||||||
(
|
(
|
||||||
|
/*
|
||||||
|
left
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 3 7 4)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
right
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(1 5 6 2)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
bottom
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 1 2 3)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
top
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(4 7 6 5)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
back
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 4 5 1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(3 2 6 7)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
*/
|
||||||
);
|
);
|
||||||
|
|
||||||
mergePatchPairs
|
mergePatchPairs
|
||||||
|
|||||||
@ -1,121 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object blockMeshDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
backgroundMesh
|
|
||||||
{
|
|
||||||
xMin -1;
|
|
||||||
xMax 1;
|
|
||||||
yMin -1;
|
|
||||||
yMax 1;
|
|
||||||
zMin -1;
|
|
||||||
zMax 1;
|
|
||||||
xCells 20;
|
|
||||||
yCells 20;
|
|
||||||
zCells 20;
|
|
||||||
}
|
|
||||||
|
|
||||||
convertToMeters 1;
|
|
||||||
|
|
||||||
vertices
|
|
||||||
(
|
|
||||||
($:backgroundMesh.xMin $:backgroundMesh.yMin $:backgroundMesh.zMin)
|
|
||||||
($:backgroundMesh.xMax $:backgroundMesh.yMin $:backgroundMesh.zMin)
|
|
||||||
($:backgroundMesh.xMax $:backgroundMesh.yMax $:backgroundMesh.zMin)
|
|
||||||
($:backgroundMesh.xMin $:backgroundMesh.yMax $:backgroundMesh.zMin)
|
|
||||||
|
|
||||||
($:backgroundMesh.xMin $:backgroundMesh.yMin $:backgroundMesh.zMax)
|
|
||||||
($:backgroundMesh.xMax $:backgroundMesh.yMin $:backgroundMesh.zMax)
|
|
||||||
($:backgroundMesh.xMax $:backgroundMesh.yMax $:backgroundMesh.zMax)
|
|
||||||
($:backgroundMesh.xMin $:backgroundMesh.yMax $:backgroundMesh.zMax)
|
|
||||||
);
|
|
||||||
|
|
||||||
blocks
|
|
||||||
(
|
|
||||||
hex (0 1 2 3 4 5 6 7)
|
|
||||||
(
|
|
||||||
$:backgroundMesh.xCells
|
|
||||||
$:backgroundMesh.yCells
|
|
||||||
$:backgroundMesh.zCells
|
|
||||||
)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
);
|
|
||||||
|
|
||||||
edges
|
|
||||||
(
|
|
||||||
);
|
|
||||||
|
|
||||||
boundary
|
|
||||||
(
|
|
||||||
left
|
|
||||||
{
|
|
||||||
type patch;
|
|
||||||
faces
|
|
||||||
(
|
|
||||||
(0 3 7 4)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
right
|
|
||||||
{
|
|
||||||
type patch;
|
|
||||||
faces
|
|
||||||
(
|
|
||||||
(1 5 6 2)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
bottom
|
|
||||||
{
|
|
||||||
type patch;
|
|
||||||
faces
|
|
||||||
(
|
|
||||||
(0 1 2 3)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
top
|
|
||||||
{
|
|
||||||
type patch;
|
|
||||||
faces
|
|
||||||
(
|
|
||||||
(4 7 6 5)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
back
|
|
||||||
{
|
|
||||||
type patch;
|
|
||||||
faces
|
|
||||||
(
|
|
||||||
(0 4 5 1)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
front
|
|
||||||
{
|
|
||||||
type patch;
|
|
||||||
faces
|
|
||||||
(
|
|
||||||
(3 2 6 7)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
mergePatchPairs
|
|
||||||
(
|
|
||||||
);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -12,19 +12,13 @@ Background Mesh
|
|||||||
===============
|
===============
|
||||||
+ The user should establish the bounds of their CAD.obj file
|
+ The user should establish the bounds of their CAD.obj file
|
||||||
+ The blockMeshDict file contains a backgroundMesh subditionary
|
+ The blockMeshDict file contains a backgroundMesh subditionary
|
||||||
+ Set xMin, xMax, etc to be beyond the CAD.obj bounds
|
+ For internal flows, where CAD.obj describes the external boundary, set xMin,
|
||||||
|
xMax, etc to be beyond the CAD.obj bounds
|
||||||
|
+ For external flows, the background mesh can define the external boundary by
|
||||||
|
uncommenting entries, e.g. inlet, in the boundary section of blockMeshDict
|
||||||
+ Set background mesh density with xCells, yCells, zCells
|
+ Set background mesh density with xCells, yCells, zCells
|
||||||
+ Run blockMesh
|
+ Run blockMesh
|
||||||
|
|
||||||
Background Mesh (alternative)
|
|
||||||
=============================
|
|
||||||
+ The user can adopt the background mesh patches in the mesh
|
|
||||||
+ For example, the background mesh can provide external patches of an external
|
|
||||||
flow
|
|
||||||
+ An alternative blockMeshDict file is set up for this: blockMeshDict.extPatches
|
|
||||||
+ Simply copy blockMeshDict.extPatches to blockMeshDict and edit inlet, outlet
|
|
||||||
patches accordingly
|
|
||||||
|
|
||||||
Castellated Mesh
|
Castellated Mesh
|
||||||
================
|
================
|
||||||
+ In the snappyHexMeshDict file, replace <inletPatch> with the name of the inlet
|
+ In the snappyHexMeshDict file, replace <inletPatch> with the name of the inlet
|
||||||
|
|||||||
@ -59,6 +59,61 @@ edges
|
|||||||
|
|
||||||
boundary
|
boundary
|
||||||
(
|
(
|
||||||
|
/*
|
||||||
|
left
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 3 7 4)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
right
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(1 5 6 2)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
bottom
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 1 2 3)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
top
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(4 7 6 5)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
back
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 4 5 1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(3 2 6 7)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
*/
|
||||||
);
|
);
|
||||||
|
|
||||||
mergePatchPairs
|
mergePatchPairs
|
||||||
|
|||||||
@ -1,121 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object blockMeshDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
backgroundMesh
|
|
||||||
{
|
|
||||||
xMin -1;
|
|
||||||
xMax 1;
|
|
||||||
yMin -1;
|
|
||||||
yMax 1;
|
|
||||||
zMin -1;
|
|
||||||
zMax 1;
|
|
||||||
xCells 20;
|
|
||||||
yCells 20;
|
|
||||||
zCells 20;
|
|
||||||
}
|
|
||||||
|
|
||||||
convertToMeters 1;
|
|
||||||
|
|
||||||
vertices
|
|
||||||
(
|
|
||||||
($:backgroundMesh.xMin $:backgroundMesh.yMin $:backgroundMesh.zMin)
|
|
||||||
($:backgroundMesh.xMax $:backgroundMesh.yMin $:backgroundMesh.zMin)
|
|
||||||
($:backgroundMesh.xMax $:backgroundMesh.yMax $:backgroundMesh.zMin)
|
|
||||||
($:backgroundMesh.xMin $:backgroundMesh.yMax $:backgroundMesh.zMin)
|
|
||||||
|
|
||||||
($:backgroundMesh.xMin $:backgroundMesh.yMin $:backgroundMesh.zMax)
|
|
||||||
($:backgroundMesh.xMax $:backgroundMesh.yMin $:backgroundMesh.zMax)
|
|
||||||
($:backgroundMesh.xMax $:backgroundMesh.yMax $:backgroundMesh.zMax)
|
|
||||||
($:backgroundMesh.xMin $:backgroundMesh.yMax $:backgroundMesh.zMax)
|
|
||||||
);
|
|
||||||
|
|
||||||
blocks
|
|
||||||
(
|
|
||||||
hex (0 1 2 3 4 5 6 7)
|
|
||||||
(
|
|
||||||
$:backgroundMesh.xCells
|
|
||||||
$:backgroundMesh.yCells
|
|
||||||
$:backgroundMesh.zCells
|
|
||||||
)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
);
|
|
||||||
|
|
||||||
edges
|
|
||||||
(
|
|
||||||
);
|
|
||||||
|
|
||||||
boundary
|
|
||||||
(
|
|
||||||
left
|
|
||||||
{
|
|
||||||
type patch;
|
|
||||||
faces
|
|
||||||
(
|
|
||||||
(0 3 7 4)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
right
|
|
||||||
{
|
|
||||||
type patch;
|
|
||||||
faces
|
|
||||||
(
|
|
||||||
(1 5 6 2)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
bottom
|
|
||||||
{
|
|
||||||
type patch;
|
|
||||||
faces
|
|
||||||
(
|
|
||||||
(0 1 2 3)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
top
|
|
||||||
{
|
|
||||||
type patch;
|
|
||||||
faces
|
|
||||||
(
|
|
||||||
(4 7 6 5)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
back
|
|
||||||
{
|
|
||||||
type patch;
|
|
||||||
faces
|
|
||||||
(
|
|
||||||
(0 4 5 1)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
front
|
|
||||||
{
|
|
||||||
type patch;
|
|
||||||
faces
|
|
||||||
(
|
|
||||||
(3 2 6 7)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
mergePatchPairs
|
|
||||||
(
|
|
||||||
);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
Reference in New Issue
Block a user