extrudeToRegionMesh: Added option to extrude patches

This greatly simplifies most setups in which it is a patch (or patches)
of the original mesh which are extruded. It prevents the need for a
topoSet configuration to convert the patch into a zone or set.
This commit is contained in:
Will Bainbridge
2022-08-30 09:49:55 +01:00
parent 94cf816b9d
commit b07feb9858
43 changed files with 378 additions and 559 deletions

View File

@ -22,7 +22,7 @@ boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
"(sides|frontAndBack|wallFilmFaces_top|cylinderFilmFaces_top)"
"(sides|frontAndBack|walls_top|cylinder_top)"
{
type zeroGradient;
}

View File

@ -22,7 +22,7 @@ boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
"(wallFilmFaces_top|cylinderFilmFaces_top)"
"(walls_top|cylinder_top)"
{
type slip;
}

View File

@ -22,7 +22,7 @@ boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
"(sides|frontAndBack|wallFilmFaces_top|cylinderFilmFaces_top)"
"(sides|frontAndBack|walls_top|cylinder_top)"
{
type zeroGradient;
}

View File

@ -4,7 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
runApplication topoSet
runApplication extrudeToRegionMesh -overwrite
runApplication $(getApplication)

View File

@ -5,7 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
runApplication blockMesh
runApplication decomposePar -noFields
runParallel topoSet
runParallel extrudeToRegionMesh -overwrite
runApplication -s fields decomposePar -fields -copyZero

View File

@ -15,7 +15,7 @@ FoamFile
region wallFilm;
faceZones (wallFilmFaces cylinderFilmFaces);
patches (walls cylinder);
extrudeModel linearNormal;

View File

@ -1,49 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name wallFilmFaceSet;
type faceSet;
action new;
source patchToFace;
patch walls;
}
{
name wallFilmFaces;
type faceZoneSet;
action new;
source setToFaceZone;
faceSet wallFilmFaceSet;
}
{
name cylinderFilmFaceSet;
type faceSet;
action new;
source patchToFace;
patch cylinder;
}
{
name cylinderFilmFaces;
type faceZoneSet;
action new;
source setToFaceZone;
faceSet cylinderFilmFaceSet;
}
);
// ************************************************************************* //

View File

@ -14,9 +14,6 @@ runParallel topoSet
# Create the boxes and add their surfaces to the boxes patch
runParallel subsetMesh notBoxes -patch boxes -overwrite -noFields
# Create zones from the floor and the boxes
runParallel -s wallFilm topoSet -dict topoSetDict.wallFilm
# Create the film mesh
runParallel extrudeToRegionMesh -overwrite

View File

@ -15,7 +15,7 @@ FoamFile
region wallFilm;
faceZones (floorFilmFaces boxesFilmFaces);
patches (floor boxes);
extrudeModel linearNormal;

View File

@ -1,49 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name floorFilmFaceSet;
type faceSet;
action new;
source patchToFace;
patch floor;
}
{
name floorFilmFaces;
type faceZoneSet;
action new;
source setToFaceZone;
faceSet floorFilmFaceSet;
}
{
name boxesFilmFaceSet;
type faceSet;
action new;
source patchToFace;
patch boxes;
}
{
name boxesFilmFaces;
type faceZoneSet;
action new;
source setToFaceZone;
faceSet boxesFilmFaceSet;
}
);
// ************************************************************************* //

View File

@ -39,7 +39,7 @@ boundaryField
type zeroGradient;
}
region0_to_wallFilm_wallFilmFaces
region0_to_wallFilm_walls
{
type zeroGradient;
}

View File

@ -39,7 +39,7 @@ boundaryField
type zeroGradient;
}
region0_to_wallFilm_wallFilmFaces
region0_to_wallFilm_walls
{
type zeroGradient;
}

View File

@ -39,7 +39,7 @@ boundaryField
type zeroGradient;
}
region0_to_wallFilm_wallFilmFaces
region0_to_wallFilm_walls
{
type zeroGradient;
}

View File

@ -40,7 +40,7 @@ boundaryField
value $internalField;
}
region0_to_wallFilm_wallFilmFaces
region0_to_wallFilm_walls
{
type fixedValue;
value $internalField;

View File

@ -37,7 +37,7 @@ boundaryField
type noSlip;
}
region0_to_wallFilm_wallFilmFaces
region0_to_wallFilm_walls
{
type noSlip;
}

View File

@ -38,7 +38,7 @@ boundaryField
value $internalField;
}
region0_to_wallFilm_wallFilmFaces
region0_to_wallFilm_walls
{
type calculated;
value $internalField;

View File

@ -37,7 +37,7 @@ boundaryField
type fixedFluxPressure;
}
region0_to_wallFilm_wallFilmFaces
region0_to_wallFilm_walls
{
type fixedFluxPressure;
}

View File

@ -36,12 +36,12 @@ boundaryField
type zeroGradient;
}
wallFilmFaces_top
walls_top
{
type zeroGradient;
}
wallFilm_to_region0_wallFilmFaces
wallFilm_to_region0_walls
{
type zeroGradient;
}

View File

@ -36,12 +36,12 @@ boundaryField
type noSlip;
}
wallFilmFaces_top
walls_top
{
type slip;
}
wallFilm_to_region0_wallFilmFaces
wallFilm_to_region0_walls
{
type noSlip;
}

View File

@ -36,12 +36,12 @@ boundaryField
type zeroGradient;
}
wallFilmFaces_top
walls_top
{
type zeroGradient;
}
wallFilm_to_region0_wallFilmFaces
wallFilm_to_region0_walls
{
type zeroGradient;
}

View File

@ -4,7 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
runApplication topoSet
runApplication extrudeToRegionMesh -overwrite
paraFoam -touchAll

View File

@ -82,7 +82,7 @@ boundary
);
}
filmWalls
walls
{
type wall;
faces

View File

@ -15,7 +15,7 @@ FoamFile
region wallFilm;
faceZones (wallFilmFaces);
patches (walls);
extrudeModel linearNormal;

View File

@ -1,35 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name wallFilmFaceSet;
type faceSet;
action new;
source patchToFace;
patch filmWalls;
}
{
name wallFilmFaces;
type faceZoneSet;
action new;
source setToFaceZone;
faceSet wallFilmFaceSet;
}
);
// ************************************************************************* //

View File

@ -4,7 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
runApplication topoSet
runApplication extrudeToRegionMesh -overwrite
paraFoam -touchAll

View File

@ -15,7 +15,7 @@ FoamFile
region wallFilm;
faceZones (walls);
patches (walls);
extrudeModel linearNormal;

View File

@ -1,35 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name walls;
type faceSet;
action new;
source patchToFace;
patch walls;
}
{
name walls;
type faceZoneSet;
action new;
source setToFaceZone;
faceSet walls;
}
);
// ************************************************************************* //