mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +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:
9
tutorials/mesh/blockMesh/pipe/Allrun
Executable file
9
tutorials/mesh/blockMesh/pipe/Allrun
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -0,0 +1,9 @@
|
||||
v -5 0.4 0
|
||||
v -4 0.4 0
|
||||
v -3 0.4 0.7
|
||||
v -2.5 0.4 2
|
||||
v -2 0.4 2
|
||||
v -1 0.4 0.7
|
||||
v -0.6 0.4 0
|
||||
v 10 0.4 0
|
||||
l 1 2 3 4 5 6 7 8
|
||||
13
tutorials/mesh/blockMesh/pipe/constant/triSurface/curve2.vtk
Normal file
13
tutorials/mesh/blockMesh/pipe/constant/triSurface/curve2.vtk
Normal file
@ -0,0 +1,13 @@
|
||||
# vtk DataFile Version 4.0
|
||||
vtk output
|
||||
ASCII
|
||||
DATASET POLYDATA
|
||||
POINTS 17 double
|
||||
-5.0437 0.4 -0.0159845 -4.54848 0.4 0.00946291 -4.30524 0.4 0.0219617
|
||||
-4.11475 0.4 0.0317502 -3.65463 0.4 0.0664504 -3.42509 0.4 0.242198
|
||||
-3.26981 0.4 0.570689 -3.04354 0.4 0.986036 -2.80622 0.4 1.28924
|
||||
-2.45212 0.4 1.43367 -2.10187 0.4 1.42911 -1.8115 0.4 1.2018
|
||||
-1.52708 0.4 0.866397 -1.30229 0.4 0.49514 -1.04633 0.4 0.189424
|
||||
-0.5819 0.4 -5.75752e-05 4 0.4 0
|
||||
LINES 1 18
|
||||
17 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
||||
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