mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: heatTransfer tutorials: use topoSet
This commit is contained in:
@ -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
|
||||||
|
|||||||
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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
|
||||||
|
|||||||
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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)
|
||||||
|
|||||||
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user