ENH: filter: convert to createBafflesDict

This commit is contained in:
mattijs
2012-12-04 13:01:19 +00:00
parent 31325d51f7
commit 2fc299be89
4 changed files with 83 additions and 124 deletions

View File

@ -10,23 +10,10 @@ application=`getApplication`
runApplication blockMesh
# create sets
#setSet -batch system/sets.setSet > log.setSet1 2>&1
runApplication topoSet
# create the first cyclic - lhs of porous zone
# Note that we don't know what value to give these patches-out-of-nothing so
# - use binary writing to avoid 'nan'
# - use setFields to set values
unset FOAM_SIGFPE
runApplication createBaffles cycLeft '(cycLeft_half0 cycLeft_half1)' -overwrite
mv log.createBaffles log.createBaffles1
# create the second cyclic - rhs of porous zone
runApplication createBaffles cycRight '(cycRight_half0 cycRight_half1)' -overwrite
mv log.createBaffles log.createBaffles2
# Initialise newly created patchFields to 0
runApplication changeDictionary
# create baffles and fields
createBaffles -overwrite
runApplication $application

View File

@ -100,32 +100,6 @@ boundary
);
}
cycLeft_half0
{
type cyclic;
faces ();
neighbourPatch cycLeft_half1;
}
cycLeft_half1
{
type cyclic;
faces ();
neighbourPatch cycLeft_half0;
}
cycRight_half0
{
type cyclic;
faces ();
neighbourPatch cycRight_half1;
}
cycRight_half1
{
type cyclic;
faces ();
neighbourPatch cycRight_half0;
}
frontAndBack
{
type empty;

View File

@ -1,83 +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 binary;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
8
(
walls
{
type wall;
nFaces 172;
startFace 3294;
}
inlet
{
type patch;
nFaces 20;
startFace 3466;
}
outlet
{
type patch;
nFaces 20;
startFace 3486;
}
cycLeft_half0
{
type cyclic;
inGroups 1(cyclic);
nFaces 20;
startFace 3506;
matchTolerance 0.0001;
neighbourPatch cycLeft_half1;
}
cycLeft_half1
{
type cyclic;
inGroups 1(cyclic);
nFaces 20;
startFace 3526;
matchTolerance 0.0001;
neighbourPatch cycLeft_half0;
}
cycRight_half0
{
type cyclic;
inGroups 1(cyclic);
nFaces 20;
startFace 3546;
matchTolerance 0.0001;
neighbourPatch cycRight_half1;
}
cycRight_half1
{
type cyclic;
inGroups 1(cyclic);
nFaces 20;
startFace 3566;
matchTolerance 0.0001;
neighbourPatch cycRight_half0;
}
frontAndBack
{
type empty;
inGroups 1(empty);
nFaces 3440;
startFace 3586;
}
)
// ************************************************************************* //

View File

@ -0,0 +1,81 @@
/*--------------------------------*- 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 createBafflesDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Whether to convert internal faces only (so leave boundary faces intact).
// This is only relevant if your face selection type can pick up boundary
// faces.
internalFacesOnly true;
// Baffles to create.
baffles
{
cycLeft
{
//- Use predefined faceZone to select faces and orientation.
type faceZone;
zoneName cycLeft;
patches
{
master
{
//- Master side patch
name cycLeft_half0;
type cyclic;
neighbourPatch cycLeft_half1;
}
slave
{
//- Slave side patch
name cycLeft_half1;
type cyclic;
neighbourPatch cycLeft_half0;
}
}
}
cycRight
{
//- Use predefined faceZone to select faces and orientation.
type faceZone;
zoneName cycRight;
patches
{
master
{
//- Master side patch
name cycRight_half0;
type cyclic;
neighbourPatch cycRight_half1;
}
slave
{
//- Slave side patch
name cycRight_half1;
type cyclic;
neighbourPatch cycRight_half0;
}
}
}
}
// ************************************************************************* //