mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Converted all cellSet/faceSet to topoSet.
This commit is contained in:
@ -167,6 +167,7 @@ int main(int argc, char *argv[])
|
||||
case topoSetSource::INVERT:
|
||||
Info<< " Inverting set" << endl;
|
||||
currentSet().invert(currentSet().maxSize(mesh));
|
||||
currentSet().write();
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object faceSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name rotor;
|
||||
|
||||
action delete;
|
||||
|
||||
topoSetSources ( boundaryToFace { } );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object faceSetDict_noBoundaryFaces;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name rotor;
|
||||
|
||||
action delete;
|
||||
|
||||
topoSetSources ( boundaryToFace { } );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object faceSetDict_rotorFaces;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name rotor;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources ( cellToFace { set rotor ; option all ; } );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object faceSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name rotor;
|
||||
|
||||
action delete;
|
||||
|
||||
topoSetSources ( boundaryToFace { } );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object faceSetDict_noBoundaryFaces;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name rotor;
|
||||
|
||||
action delete;
|
||||
|
||||
topoSetSources ( boundaryToFace { } );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object faceSetDict_rotorFaces;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name rotor;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources ( cellToFace { set rotor ; option all ; } );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -10,7 +10,7 @@ application=`getApplication`
|
||||
runApplication blockMesh
|
||||
|
||||
# create ignition cells cellSet
|
||||
runApplication cellSet
|
||||
runApplication topoSet
|
||||
|
||||
runApplication $application
|
||||
|
||||
|
||||
@ -10,21 +10,24 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object cellSetDict;
|
||||
object topoSetDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name ignitionCells;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources
|
||||
actions
|
||||
(
|
||||
sphereToCell
|
||||
{
|
||||
centre ( 0.125 0.375 0.05 );
|
||||
radius 0.005;
|
||||
name ignitionCells;
|
||||
type cellSet;
|
||||
action new;
|
||||
|
||||
source sphereToCell;
|
||||
sourceDict
|
||||
{
|
||||
centre ( 0.125 0.375 0.05 );
|
||||
radius 0.005;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@ -9,7 +9,7 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
rm -rf constant/polyMesh/sets > /dev/null 2>&1
|
||||
rm -rf 0/polyMesh > /dev/null 2>&1
|
||||
rm system/cellSetDict > /dev/null 2>&1
|
||||
rm system/topoSetDict > /dev/null 2>&1
|
||||
|
||||
cleanCase
|
||||
)
|
||||
@ -21,7 +21,7 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
rm -rf constant/polyMesh/sets > /dev/null 2>&1
|
||||
rm -rf 0 > /dev/null 2>&1
|
||||
cp -r 0.org 0
|
||||
rm system/cellSetDict > /dev/null 2>&1
|
||||
rm system/topoSetDict > /dev/null 2>&1
|
||||
rm -rf processor[0-9] > /dev/null 2>&1
|
||||
|
||||
cleanCase
|
||||
|
||||
@ -12,8 +12,8 @@ refineMeshByCellSet()
|
||||
while [ $# -ge 1 ]
|
||||
do
|
||||
echo "creating cell set for primary zone - $1"
|
||||
cp system/cellSetDict.$1 system/cellSetDict
|
||||
cellSet > log.cellSet.$1 2>&1
|
||||
cp system/topoSetDict.$1 system/topoSetDict
|
||||
topoSet > log.topoSet.$1 2>&1
|
||||
|
||||
echo "refining primary zone - $1"
|
||||
refineMesh -dict -overwrite > log.refineMesh.$1 2>&1
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object topoSetDict.1;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
{
|
||||
box (0.004 -0.001 -1) (0.012 0.001 1);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,33 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object topoSetDict.2;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
{
|
||||
box (0.0045 -0.00075 -1) (0.0095 0.00075 1);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,33 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object topoSetDict.3;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
{
|
||||
box (0.00475 -0.000375 -1) (0.009 0.000375 1);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,31 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict.1;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box ( 0.004 -0.001 -1 ) ( 0.012 0.001 1 );
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,31 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict.2;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box ( 0.0045 -0.00075 -1 ) ( 0.0095 0.00075 1 );
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,31 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict.3;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box ( 0.00475 -0.000375 -1 ) ( 0.009 0.000375 1 );
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,33 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object topoSetDict.1;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
{
|
||||
box ( 0.004 -0.001 -1 ) ( 0.012 0.001 1 );
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,33 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object topoSetDict.2;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
{
|
||||
box ( 0.0045 -0.00075 -1 ) ( 0.0095 0.00075 1 );
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,33 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object topoSetDict.3;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
{
|
||||
box ( 0.00475 -0.000375 -1 ) ( 0.009 0.000375 1 );
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
rm -rf constant/polyMesh/sets > /dev/null 2>&1
|
||||
rm -rf 0/polyMesh > /dev/null 2>&1
|
||||
rm system/cellSetDict > /dev/null 2>&1
|
||||
rm system/topoDict > /dev/null 2>&1
|
||||
cleanCase
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -11,8 +11,8 @@ refineMeshByCellSet()
|
||||
while [ $# -ge 1 ]
|
||||
do
|
||||
echo "creating cell set for primary zone - $1"
|
||||
cp system/cellSetDict.$1 system/cellSetDict
|
||||
cellSet > log.cellSet.$1 2>&1
|
||||
cp system/topoSetDict.$1 system/topoSetDict
|
||||
topoSet > log.topoSet.$1 2>&1
|
||||
|
||||
echo "refining primary zone - $1"
|
||||
refineMesh -dict -overwrite > log.refineMesh.$1 2>&1
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict.1;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources ( boxToCell { box ( 0.004 -0.001 -1 ) ( 0.012 0.001 1 ) ; } );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict.2;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources ( boxToCell { box ( 0.0045 -0.00075 -1 ) ( 0.0095 0.00075 1 ) ; } );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict.3;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources ( boxToCell { box ( 0.00475 -0.000375 -1 ) ( 0.009 0.000375 1 ) ; } );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,33 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object topoSetDict.3;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
{
|
||||
box ( 0.00475 -0.000375 -1 ) ( 0.009 0.000375 1 ) ;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -11,20 +11,21 @@ FoamFile
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict;
|
||||
object topoSetDict.1;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name filter;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources
|
||||
actions
|
||||
(
|
||||
// Cells with cell centre within box
|
||||
boxToCell
|
||||
{
|
||||
box (1.5 -1 -1) (2 1 1);
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
{
|
||||
box ( 0.004 -0.001 -1 ) ( 0.012 0.001 1 ) ;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object topoSetDict.2;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
{
|
||||
box ( 0.0045 -0.00075 -1 ) ( 0.0095 0.00075 1 ) ;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,33 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object topoSetDict.3;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
{
|
||||
box ( 0.00475 -0.000375 -1 ) ( 0.009 0.000375 1 ) ;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -4,7 +4,6 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
rm system/cellSetDict > /dev/null 2>&1
|
||||
rm -rf 0 > /dev/null 2>&1
|
||||
|
||||
cleanCase
|
||||
|
||||
@ -7,19 +7,8 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
# Set application name
|
||||
application="interDyMFoam"
|
||||
|
||||
makeMeshByCellSet()
|
||||
{
|
||||
while [ $# -ge 1 ]
|
||||
do
|
||||
echo "Running cellSet operation $1"
|
||||
cp system/cellSetDict.$1 system/cellSetDict
|
||||
cellSet > log.cellSet.$1 2>&1
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
runApplication blockMesh
|
||||
makeMeshByCellSet 1 2
|
||||
runApplication topoSet
|
||||
runApplication subsetMesh -overwrite c0 -patch floatingObject
|
||||
cp -r 0.org 0 > /dev/null 2>&1
|
||||
runApplication setFields
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object cellSetDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name c0;
|
||||
|
||||
action invert;
|
||||
|
||||
topoSetSources ();
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -10,20 +10,28 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object cellSetDict;
|
||||
object topoSetDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources
|
||||
actions
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box (0.35 0.35 0.44) (0.65 0.65 0.56);
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
{
|
||||
box (0.35 0.35 0.44) (0.65 0.65 0.56);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
);
|
||||
|
||||
@ -2,10 +2,5 @@
|
||||
|
||||
m4 < constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict
|
||||
blockMesh
|
||||
cellSet
|
||||
#- MRF determines its own faceZone if not supplied
|
||||
#cp system/faceSetDict_rotorFaces system/faceSetDict
|
||||
#faceSet
|
||||
#cp system/faceSetDict_noBoundaryFaces system/faceSetDict
|
||||
#faceSet
|
||||
topoSet
|
||||
setsToZones -noFlipMap
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name rotor;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources ( zoneToCell { name rotor ; } );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object faceSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name rotor;
|
||||
|
||||
action delete;
|
||||
|
||||
topoSetSources ( boundaryToFace { } );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object faceSetDict_noBoundaryFaces;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name rotor;
|
||||
|
||||
action delete;
|
||||
|
||||
topoSetSources ( boundaryToFace { } );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object faceSetDict_rotorFaces;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name rotor;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources ( cellToFace { set rotor ; option all ; } );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,34 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name rotor;
|
||||
type cellSet;
|
||||
action new;
|
||||
source zoneToCell;
|
||||
sourceDict
|
||||
{
|
||||
name rotor;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -17,19 +17,19 @@ runRefineMesh()
|
||||
runApplication blockMesh
|
||||
|
||||
i=1
|
||||
if [ -f log.cellSet ]
|
||||
if [ -f log.topoSet ]
|
||||
then
|
||||
i=3
|
||||
fi
|
||||
|
||||
while [ "$i" -lt 3 ]
|
||||
do
|
||||
if [ -f log.cellSet ]
|
||||
if [ -f log.topoSet ]
|
||||
then
|
||||
mv log.cellSet log.cellSet.1
|
||||
mv log.topoSet log.topoSet.1
|
||||
fi
|
||||
cp system/cellSetDict.${i} system/cellSetDict
|
||||
runApplication cellSet
|
||||
cp system/topoSetDict.${i} system/topoSetDict
|
||||
runApplication topoSet
|
||||
runRefineMesh
|
||||
cp -r 1e-08/polyMesh/* constant/polyMesh
|
||||
rm -rf 1e-08
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict.2;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources ( boxToCell { box ( 0 0 -2e-05 ) ( 0.0036 0.0003 2e-05 ) ; } );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict.1;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources ( boxToCell { box ( 0 0 -2e-05 ) ( 0.0036 0.0008 4e-05 ) ; } );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict.2;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources ( boxToCell { box ( 0 0 -2e-05 ) ( 0.0036 0.0003 2e-05 ) ; } );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -11,19 +11,21 @@ FoamFile
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict.1;
|
||||
object topoSetDict.2;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources
|
||||
actions
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box (0.004 -0.001 -1) (0.012 0.001 1);
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
{
|
||||
box ( 0 0 -2e-05 ) ( 0.0036 0.0003 2e-05 );
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@ -11,21 +11,22 @@ FoamFile
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict.3;
|
||||
object topoSetDict.1;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources
|
||||
actions
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box (0.00475 -0.000375 -1) (0.009 0.000375 1);
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
{
|
||||
box ( 0 0 -2e-05 ) ( 0.0036 0.0008 4e-05 ) ;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -11,19 +11,21 @@ FoamFile
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict.2;
|
||||
object topoSetDict.2;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources
|
||||
actions
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box (0.0045 -0.00075 -1) (0.0095 0.00075 1);
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceDict
|
||||
{
|
||||
box ( 0 0 -2e-05 ) ( 0.0036 0.0003 2e-05 );
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user