mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
blockMesh: Added edge projection
New functionality contributed by Mattijs Janssens:
- new edge projection: projectCurve for use with new geometry
'searchableCurve'
- new tutorial 'pipe'
- naming of vertices and blocks (see pipe tutorial). Including back
substitution for error messages.
This commit is contained in:
177
tutorials/mesh/blockMesh/pipe/system/blockMeshDict
Normal file
177
tutorials/mesh/blockMesh/pipe/system/blockMeshDict
Normal file
@ -0,0 +1,177 @@
|
||||
/*--------------------------------*- 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;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
geometry
|
||||
{
|
||||
cylinder
|
||||
{
|
||||
type searchableCylinder;
|
||||
point1 (0 -4 0);
|
||||
point2 (0 4 0);
|
||||
radius 0.7;
|
||||
}
|
||||
cylinder3
|
||||
{
|
||||
type searchableCylinder;
|
||||
point1 (-10 0.4 0);
|
||||
point2 (10 0.4 0);
|
||||
radius 0.5;
|
||||
}
|
||||
cylinder2
|
||||
{
|
||||
type searchableCurve;
|
||||
file "curve2.vtk";
|
||||
radius 0.5;
|
||||
}
|
||||
inletPlane
|
||||
{
|
||||
type searchablePlate;
|
||||
origin (-4 -50 -50);
|
||||
span (0 100 100);
|
||||
}
|
||||
}
|
||||
|
||||
vertices
|
||||
(
|
||||
// Vertical cylinder
|
||||
named v0 project (-1 -0.1 -1) (cylinder cylinder2)
|
||||
named v1 project ( 1 -0.1 -1) (cylinder)
|
||||
named v2 project ( 1 0.9 -1) (cylinder)
|
||||
named v3 project (-1 0.9 -1) (cylinder cylinder2)
|
||||
named v4 project (-1 -0.1 1) (cylinder cylinder2)
|
||||
named v5 project ( 1 -0.1 1) (cylinder)
|
||||
named v6 project ( 1 0.9 1) (cylinder)
|
||||
named v7 project (-1 0.9 1) (cylinder cylinder2)
|
||||
|
||||
|
||||
// Horizontal cylinder
|
||||
named v8 project (-4 0 -0.5) (cylinder2 inletPlane)
|
||||
named v9 project (-4 1 -0.5) (cylinder2 inletPlane)
|
||||
named v10 project (-4 0 0.5) (cylinder2 inletPlane)
|
||||
named v11 project (-4 1 0.5) (cylinder2 inletPlane)
|
||||
|
||||
|
||||
// On top of vertical cylinder
|
||||
named v12 project (-1 2 -1) (cylinder)
|
||||
named v13 project ( 1 2 -1) (cylinder)
|
||||
named v14 project ( 1 2 1) (cylinder)
|
||||
named v15 project (-1 2 1) (cylinder)
|
||||
|
||||
// Below vertical cylinder
|
||||
named v16 project (-1 -1 -1) (cylinder)
|
||||
named v17 project ( 1 -1 -1) (cylinder)
|
||||
named v18 project ( 1 -1 1) (cylinder)
|
||||
named v19 project (-1 -1 1) (cylinder)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (v0 v1 v2 v3 v4 v5 v6 v7) (8 8 8) simpleGrading (1 1 1)
|
||||
named sideBlock hex (v0 v3 v9 v8 v4 v7 v11 v10) (8 20 8)
|
||||
simpleGrading (1 1 1)
|
||||
|
||||
hex ( v7 v6 v2 v3 v15 v14 v13 v12) (8 8 8) simpleGrading (1 1 1)
|
||||
hex (v16 v19 v18 v17 v0 v4 v5 v1) (8 8 8) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
project v0 v1 (cylinder)
|
||||
project v1 v2 (cylinder)
|
||||
project v2 v3 (cylinder)
|
||||
|
||||
project v1 v5 (cylinder)
|
||||
project v2 v6 (cylinder)
|
||||
|
||||
project v4 v5 (cylinder)
|
||||
project v5 v6 (cylinder)
|
||||
project v6 v7 (cylinder)
|
||||
|
||||
// Common face
|
||||
project v3 v0 (cylinder cylinder2)
|
||||
project v3 v7 (cylinder cylinder2)
|
||||
project v7 v4 (cylinder cylinder2)
|
||||
project v0 v4 (cylinder cylinder2)
|
||||
|
||||
// Inlet
|
||||
project v8 v10 (cylinder2 inletPlane)
|
||||
project v10 v11 (cylinder2 inletPlane)
|
||||
project v11 v9 (cylinder2 inletPlane)
|
||||
project v9 v8 (cylinder2 inletPlane)
|
||||
|
||||
// Sides of horizontal cylinder. Use projectCurve to do interpolation
|
||||
// for radial direction to keep points along edges at constant radial
|
||||
// direction.
|
||||
projectCurve v8 v0 (cylinder2)
|
||||
projectCurve v9 v3 (cylinder2)
|
||||
projectCurve v11 v7 (cylinder2)
|
||||
projectCurve v10 v4 (cylinder2)
|
||||
|
||||
|
||||
|
||||
// Top cylinder
|
||||
project v12 v15 (cylinder)
|
||||
project v15 v14 (cylinder)
|
||||
project v14 v13 (cylinder)
|
||||
project v13 v12 (cylinder)
|
||||
|
||||
// Bottom cylinder
|
||||
project v16 v17 (cylinder)
|
||||
project v17 v18 (cylinder)
|
||||
project v18 v19 (cylinder)
|
||||
project v19 v16 (cylinder)
|
||||
);
|
||||
|
||||
faces
|
||||
(
|
||||
// Common face
|
||||
project (v0 v4 v7 v3) cylinder
|
||||
|
||||
project (v8 v0 v4 v10) cylinder2
|
||||
project (v10 v4 v7 v11) cylinder2
|
||||
project (v11 v7 v3 v9) cylinder2
|
||||
project (v8 v9 v3 v0) cylinder2
|
||||
);
|
||||
|
||||
|
||||
defaultPatch
|
||||
{
|
||||
name walls;
|
||||
type wall;
|
||||
}
|
||||
|
||||
boundary
|
||||
(
|
||||
side
|
||||
{
|
||||
type patch;
|
||||
faces ((sideBlock 3)); //((v8 v10 v11 v9));
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
faces ((v17 v18 v19 v16));
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
faces ((v12 v15 v14 v13));
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
58
tutorials/mesh/blockMesh/pipe/system/controlDict
Normal file
58
tutorials/mesh/blockMesh/pipe/system/controlDict
Normal file
@ -0,0 +1,58 @@
|
||||
/*--------------------------------*- 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;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
libs ("libblockMesh.so");
|
||||
|
||||
DebugSwitches
|
||||
{
|
||||
// project 1;
|
||||
// searchableCurve 1;
|
||||
// projectCurve 1;
|
||||
}
|
||||
|
||||
application blockMesh;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0;
|
||||
|
||||
deltaT 0;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 1;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
37
tutorials/mesh/blockMesh/pipe/system/fvSchemes
Normal file
37
tutorials/mesh/blockMesh/pipe/system/fvSchemes
Normal file
@ -0,0 +1,37 @@
|
||||
/*--------------------------------*- 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;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{}
|
||||
|
||||
gradSchemes
|
||||
{}
|
||||
|
||||
divSchemes
|
||||
{}
|
||||
|
||||
laplacianSchemes
|
||||
{}
|
||||
|
||||
interpolationSchemes
|
||||
{}
|
||||
|
||||
snGradSchemes
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
18
tutorials/mesh/blockMesh/pipe/system/fvSolution
Normal file
18
tutorials/mesh/blockMesh/pipe/system/fvSolution
Normal file
@ -0,0 +1,18 @@
|
||||
/*--------------------------------*- 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;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user