mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: new PDRblockMesh mesh generation utility (issue #1216)
- While a rectilinear mesh can be created with blockMesh, not every mesh
created with blockMesh will satisfy the requirements for being a
rectilinear mesh.
This alternative to blockMesh uses a single block that is aligned
with the xy-z directions and specifications of the control points,
mesh divisions and expansion ratios. For example,
x
{
points ( -13.28 -0.10 6.0 19.19 );
nCells ( 10 12 10 );
ratios ( 0.2 1 5 );
}
y { ... }
z { ... }
With only one block, the boundary patch definition is simple and the
canonical face number is used directly. For example,
inlet
{
type patch;
faces ( 0 );
}
outlet
{
type patch;
faces ( 1 );
}
sides
{
type patch;
faces ( 2 3 );
}
...
- After a mesh is defined, it is trivial to retrieve mesh-related
information such as cell-volume, cell-centres for any i-j-k location
without an actual polyMesh.
STYLE: remove -noFunctionObjects from blockMesh
- no time loop, so function objects cannot be triggered anyhow.
This commit is contained in:
committed by
Andrew Heather
parent
94a3d0249b
commit
84270ed667
8
tutorials/mesh/PDRblockMesh/box0/Allrun
Executable file
8
tutorials/mesh/PDRblockMesh/box0/Allrun
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
||||
|
||||
runApplication PDRblockMesh
|
||||
runApplication checkMesh
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
78
tutorials/mesh/PDRblockMesh/box0/system/PDRblockMeshDict
Normal file
78
tutorials/mesh/PDRblockMesh/box0/system/PDRblockMeshDict
Normal file
@ -0,0 +1,78 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object PDRblockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
//- Point scaling (optional)
|
||||
scale 1.0;
|
||||
|
||||
x
|
||||
{
|
||||
points ( -13.28 -0.10 6.0 19.19 );
|
||||
nCells ( 10 12 10 );
|
||||
ratios ( -5.16 1 5.16 );
|
||||
}
|
||||
|
||||
y
|
||||
{
|
||||
points ( -12.98 0 5.50 18.48 );
|
||||
nCells ( 10 11 10 );
|
||||
ratios ( -5.16 1 5.16 );
|
||||
}
|
||||
|
||||
z
|
||||
{
|
||||
points ( 0.00 4.80 17.26 );
|
||||
nCells ( 10 10 );
|
||||
ratios ( 1 5.16 );
|
||||
}
|
||||
|
||||
|
||||
defaultPatch
|
||||
{
|
||||
name walls;
|
||||
type wall;
|
||||
}
|
||||
|
||||
|
||||
// Faces: 0=x-min, 1=x-max, 2=y-min, 3=y-max, 4=z-min, 5=z-max
|
||||
|
||||
boundary
|
||||
(
|
||||
outer
|
||||
{
|
||||
type patch;
|
||||
faces ( 0 1 2 3 5 );
|
||||
}
|
||||
|
||||
mergingFaces
|
||||
{
|
||||
type wall;
|
||||
faces ();
|
||||
}
|
||||
|
||||
blockedFaces
|
||||
{
|
||||
type wall;
|
||||
faces ();
|
||||
}
|
||||
|
||||
ground
|
||||
{
|
||||
type wall;
|
||||
faces ( 4 );
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
51
tutorials/mesh/PDRblockMesh/box0/system/controlDict
Normal file
51
tutorials/mesh/PDRblockMesh/box0/system/controlDict
Normal file
@ -0,0 +1,51 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
libs ("libblockMesh.so");
|
||||
|
||||
application PDRblockMesh;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0;
|
||||
|
||||
deltaT 0;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 1;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 8;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
37
tutorials/mesh/PDRblockMesh/box0/system/fvSchemes
Normal file
37
tutorials/mesh/PDRblockMesh/box0/system/fvSchemes
Normal file
@ -0,0 +1,37 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{}
|
||||
|
||||
gradSchemes
|
||||
{}
|
||||
|
||||
divSchemes
|
||||
{}
|
||||
|
||||
laplacianSchemes
|
||||
{}
|
||||
|
||||
interpolationSchemes
|
||||
{}
|
||||
|
||||
snGradSchemes
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
18
tutorials/mesh/PDRblockMesh/box0/system/fvSolution
Normal file
18
tutorials/mesh/PDRblockMesh/box0/system/fvSolution
Normal file
@ -0,0 +1,18 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user