STYLE: tutorials: use topoSet

This commit is contained in:
mattijs
2011-11-24 16:11:05 +00:00
parent e314d4dc59
commit 0043cf6d3a
15 changed files with 837 additions and 33 deletions

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh runApplication blockMesh
runApplication setSet -batch makeCellSets.setSet runApplication topoSet
runApplication splitMeshRegions -cellZones -overwrite runApplication splitMeshRegions -cellZones -overwrite
# remove fluid fields from solid regions (important for post-processing) # remove fluid fields from solid regions (important for post-processing)
@ -49,9 +49,6 @@ done
echo echo
echo "creating files for paraview post-processing" echo "creating files for paraview post-processing"
echo echo
for i in bottomWater topAir heater leftSolid rightSolid paraFoam -touchAll
do
paraFoam -touch -region $i
done
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,182 @@
/*--------------------------------*- 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 topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
// Heater
{
name heater;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-0.01001 0 -100 )(0.01001 0.00999 100);
}
}
{
name heater;
type cellSet;
action add;
source boxToCell;
sourceInfo
{
box (-0.01001 -100 -0.01001)(0.01001 0.00999 0.01001);
}
}
{
name heater;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set heater; // name of cellSet
}
}
// leftSolid
{
name leftSolid;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 0 -100 )(-0.01001 0.00999 100);
}
}
{
name leftSolid;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set leftSolid;
}
}
// rightSolid
{
name rightSolid;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (0.01001 0 -100 )(100 0.00999 100);
}
}
{
name rightSolid;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set rightSolid;
}
}
// topAir
{
name topAir;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 0.00999 -100 )(100 100 100);
}
}
{
name topAir;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set topAir;
}
}
// bottomWater is all the other cells
{
name bottomWater;
type cellZoneSet;
action clear;
}
{
name bottomWater;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set heater;
}
}
{
name bottomWater;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set leftSolid;
}
}
{
name bottomWater;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set rightSolid;
}
}
{
name bottomWater;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set topAir;
}
}
{
name bottomWater;
type cellSet;
action invert;
}
{
name bottomWater;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set bottomWater;
}
}
);
// ************************************************************************* //

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh runApplication blockMesh
runApplication setSet -batch makeCellSets.setSet runApplication topoSet
runApplication splitMeshRegions -cellZones -overwrite runApplication splitMeshRegions -cellZones -overwrite
# remove fluid fields from solid regions (important for post-processing) # remove fluid fields from solid regions (important for post-processing)
@ -49,9 +49,6 @@ runApplication `getApplication`
echo echo
echo "creating files for paraview post-processing" echo "creating files for paraview post-processing"
echo echo
for i in bottomAir topAir heater leftSolid rightSolid paraFoam -touchAll
do
paraFoam -touch -region $i
done
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,182 @@
/*--------------------------------*- 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 topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
// Heater
{
name heater;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-0.01001 0 -100 )(0.01001 0.00999 100);
}
}
{
name heater;
type cellSet;
action add;
source boxToCell;
sourceInfo
{
box (-0.01001 -100 -0.01001)(0.01001 0.00999 0.01001);
}
}
{
name heater;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set heater; // name of cellSet
}
}
// leftSolid
{
name leftSolid;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 0 -100 )(-0.01001 0.00999 100);
}
}
{
name leftSolid;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set leftSolid;
}
}
// rightSolid
{
name rightSolid;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (0.01001 0 -100 )(100 0.00999 100);
}
}
{
name rightSolid;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set rightSolid;
}
}
// topAir
{
name topAir;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 0.00999 -100 )(100 100 100);
}
}
{
name topAir;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set topAir;
}
}
// bottomAir is all the other cells
{
name bottomAir;
type cellZoneSet;
action clear;
}
{
name bottomAir;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set heater;
}
}
{
name bottomAir;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set leftSolid;
}
}
{
name bottomAir;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set rightSolid;
}
}
{
name bottomAir;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set topAir;
}
}
{
name bottomAir;
type cellSet;
action invert;
}
{
name bottomAir;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set bottomAir;
}
}
);
// ************************************************************************* //

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh runApplication blockMesh
runApplication setSet -batch makeCellSets.setSet runApplication topoSet
runApplication splitMeshRegions -cellZones -overwrite runApplication splitMeshRegions -cellZones -overwrite
# remove fluid fields from solid regions (important for post-processing) # remove fluid fields from solid regions (important for post-processing)

View File

@ -0,0 +1,182 @@
/*--------------------------------*- 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 topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
// Heater
{
name heater;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-0.01001 0 -100 )(0.01001 0.00999 100);
}
}
{
name heater;
type cellSet;
action add;
source boxToCell;
sourceInfo
{
box (-0.01001 -100 -0.01001)(0.01001 0.00999 0.01001);
}
}
{
name heater;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set heater; // name of cellSet
}
}
// leftSolid
{
name leftSolid;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 0 -100 )(-0.01001 0.00999 100);
}
}
{
name leftSolid;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set leftSolid;
}
}
// rightSolid
{
name rightSolid;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (0.01001 0 -100 )(100 0.00999 100);
}
}
{
name rightSolid;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set rightSolid;
}
}
// topAir
{
name topAir;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 0.00999 -100 )(100 100 100);
}
}
{
name topAir;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set topAir;
}
}
// bottomAir is all the other cells
{
name bottomAir;
type cellZoneSet;
action clear;
}
{
name bottomAir;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set heater;
}
}
{
name bottomAir;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set leftSolid;
}
}
{
name bottomAir;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set rightSolid;
}
}
{
name bottomAir;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set topAir;
}
}
{
name bottomAir;
type cellSet;
action invert;
}
{
name bottomAir;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set bottomAir;
}
}
);
// ************************************************************************* //

View File

@ -29,14 +29,20 @@ runApplication snappyHexMesh -overwrite
# - generate face/cell sets and zones # - generate face/cell sets and zones
runApplication setSet -batch removeRedundantZones.setSet #runApplication setSet -batch removeRedundantZones.setSet
mv log.setSet log.removeRedundantZones.setSet #mv log.setSet log.removeRedundantZones.setSet
runApplication topoSet -dict system/removeRedundantZones.topoSetDict
mv log.topoSet log.removeRedundantZones.topoSet
runApplication setSet -batch createInletOutletSets.setSet #runApplication setSet -batch createInletOutletSets.setSet
mv log.setSet log.createInletOutletSets.setSet #mv log.setSet log.createInletOutletSets.setSet
runApplication topoSet -dict system/createInletOutletSets.topoSetDict
mv log.topoSet log.createInletOutletSets.topoSet
runApplication setSet -batch createAMIFaces.setSet #runApplication setSet -batch createAMIFaces.setSet
mv log.setSet log.createAMIFaces.setSet #mv log.setSet log.createAMIFaces.setSet
runApplication topoSet -dict system/createAMIFaces.topoSetDict
mv log.topoSet log.createAMIFaces.topoSet
# - create the inlet/outlet patches # - create the inlet/outlet patches

View File

@ -1,8 +0,0 @@
cellSet innerCylinderSmall new cylinderToCell (0 -0.08 0) (0 0.06 0) 0.12
cellSet outerCells new cellToCell innerCylinderSmall
cellSet outerCells invert
cellZoneSet innerCylinderSmall new setToCellZone innerCylinderSmall
faceSet innerCylinderSmallFace new cellToFace innerCylinderSmall all
faceSet innerCylinderSmallFace subset cellToFace outerCells all
faceZoneSet innerCylinderSmall new setsToFaceZone innerCylinderSmallFace innerCylinderSmall

View File

@ -1,5 +0,0 @@
faceSet boundaryFaces new patchToFace outerCylinder
faceSet outletFaces new faceToFace boundaryFaces
faceSet inletFaces new faceToFace boundaryFaces
faceSet outletFaces subset normalToFace (0 -1 0) 0.3
faceSet inletFaces subset normalToFace (0 1 0) 0.3

View File

@ -1,2 +0,0 @@
cellZoneSet innerCylinder remove
faceZoneSet innerCylinderSmall remove

View File

@ -0,0 +1,96 @@
/*--------------------------------*- 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 topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name innerCylinderSmall;
type cellSet;
action new;
source cylinderToCell;
sourceInfo
{
p1 (0 -0.08 0);
p2 (0 0.06 0);
radius 0.12;
}
}
{
name outerCells;
type cellSet;
action new;
source cellToCell;
sourceInfo
{
set innerCylinderSmall;
}
}
{
name outerCells;
type cellSet;
action invert;
}
{
name innerCylinderSmall;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set innerCylinderSmall;
}
}
{
name innerCylinderSmallFace;
type faceSet;
action new;
source cellToFace;
sourceInfo
{
set innerCylinderSmall;
option all;
}
}
{
name innerCylinderSmallFace;
type faceSet;
action subset;
source cellToFace;
sourceInfo
{
set outerCells;
option all;
}
}
{
name innerCylinderSmall;
type faceZoneSet;
action new;
source setsToFaceZone;
sourceInfo
{
faceSet innerCylinderSmallFace;
cellSet innerCylinderSmall;
}
}
);
// ************************************************************************* //

View File

@ -0,0 +1,78 @@
/*--------------------------------*- 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 topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name boundaryFaces;
type faceSet;
action new;
source patchToFace;
sourceInfo
{
name outerCylinder;
}
}
{
name outletFaces;
type faceSet;
action new;
source faceToFace;
sourceInfo
{
set boundaryFaces;
}
}
{
name inletFaces;
type faceSet;
action new;
source faceToFace;
sourceInfo
{
set boundaryFaces;
}
}
{
name outletFaces;
type faceSet;
action subset;
source normalToFace;
sourceInfo
{
normal (0 -1 0); // Vector
cos 0.3; // Tolerance (max cos of angle)
}
}
{
name inletFaces;
type faceSet;
action subset;
source normalToFace;
sourceInfo
{
normal (0 1 0); // Vector
cos 0.3; // Tolerance (max cos of angle)
}
}
);
// ************************************************************************* //

View File

@ -0,0 +1,32 @@
/*--------------------------------*- 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 topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name innerCylinder;
type cellZoneSet;
action remove;
}
{
name innerCylinderSmall;
type cellZoneSet;
action remove;
}
);
// ************************************************************************* //

View File

@ -33,7 +33,8 @@ runParallel renumberMesh 4 -overwrite
# without evaluation. # without evaluation.
#runParallel changeDictionary 4 -literalRE #runParallel changeDictionary 4 -literalRE
runParallel setSet 4 -batch makeZones #runParallel setSet 4 -batch makeZones
runParallel topoSet 4
runParallel `getApplication` 4 runParallel `getApplication` 4
runApplication reconstructParMesh -constant runApplication reconstructParMesh -constant

View File

@ -0,0 +1,66 @@
/*--------------------------------*- 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 topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
// actuationDisk1
{
name actuationDisk1;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (581850.5 4785805 1061) (581850.8 4785815 1071);
}
}
{
name actuationDisk1;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set actuationDisk1;
}
}
// actuationDisk2
{
name actuationDisk2;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (581754 4785658 1065) (581754.4 4785668 1075);
}
}
{
name actuationDisk2;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set actuationDisk2;
}
}
);
// ************************************************************************* //