From 50f92cad4c495f2800650938e62829a5016d61dd Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 24 Nov 2011 16:11:05 +0000 Subject: [PATCH] STYLE: heatTransfer tutorials: use topoSet --- .../multiRegionLiquidHeater/Allrun | 7 +- .../system/topoSetDict | 182 ++++++++++++++++++ .../multiRegionHeater/Allrun | 7 +- .../multiRegionHeater/system/topoSetDict | 182 ++++++++++++++++++ .../multiRegionHeaterRadiation/Allrun | 2 +- .../system/topoSetDict | 182 ++++++++++++++++++ 6 files changed, 551 insertions(+), 11 deletions(-) create mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/topoSetDict create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topoSetDict create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topoSetDict diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/Allrun index db414bf592..6e1c645ec0 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/Allrun @@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions runApplication blockMesh -runApplication setSet -batch makeCellSets.setSet +runApplication topoSet runApplication splitMeshRegions -cellZones -overwrite # remove fluid fields from solid regions (important for post-processing) @@ -49,9 +49,6 @@ done echo echo "creating files for paraview post-processing" echo -for i in bottomWater topAir heater leftSolid rightSolid -do - paraFoam -touch -region $i -done +paraFoam -touchAll # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/topoSetDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/topoSetDict new file mode 100644 index 0000000000..8f65cab102 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/topoSetDict @@ -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; + } + } +); + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/Allrun index f473e787d0..c9a51acef4 100755 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/Allrun @@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions runApplication blockMesh -runApplication setSet -batch makeCellSets.setSet +runApplication topoSet runApplication splitMeshRegions -cellZones -overwrite # remove fluid fields from solid regions (important for post-processing) @@ -49,9 +49,6 @@ runApplication `getApplication` echo echo "creating files for paraview post-processing" echo -for i in bottomAir topAir heater leftSolid rightSolid -do - paraFoam -touch -region $i -done +paraFoam -touchAll # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topoSetDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topoSetDict new file mode 100644 index 0000000000..bd14f41a44 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topoSetDict @@ -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; + } + } +); + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun index 1b0ffb01e9..97cb8e3733 100755 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun @@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions runApplication blockMesh -runApplication setSet -batch makeCellSets.setSet +runApplication topoSet runApplication splitMeshRegions -cellZones -overwrite # remove fluid fields from solid regions (important for post-processing) diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topoSetDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topoSetDict new file mode 100644 index 0000000000..bd14f41a44 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topoSetDict @@ -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; + } + } +); + +// ************************************************************************* //