tutorials: Updated to use surfaceFeatures rather than the deprecated surfaceFeatureExtract

This commit is contained in:
Henry Weller
2018-05-29 19:18:53 +01:00
parent 48c79c0bf5
commit aea8dc0516
62 changed files with 394 additions and 18229 deletions

View File

@ -7,7 +7,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# copy DTC hull surface from resources folder
cp $FOAM_TUTORIALS/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
runApplication surfaceFeatureExtract
runApplication surfaceFeatures
runApplication blockMesh

View File

@ -10,50 +10,22 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
object surfaceFeatureExtractDict;
object surfaceFeaturesDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//innerCylinder.obj
//{
// #include "surfaceFeatureExtractDictDefaults"
//}
surfaces ("DTC-scaled.stl");
// Identify a feature when angle between faces < includedAngle
includedAngle 150;
innerCylinderSmall.obj
subsetFeatures
{
#include "surfaceFeatureExtractDictDefaults"
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;
// Keep open edges (edges with 1 connected face)
openEdges yes;
}
outerCylinder.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
propellerStem1.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
propellerStem2.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
propellerStem3.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
propellerTip.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
// ************************************************************************* //

View File

@ -7,7 +7,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# copy DTC hull surface from resources folder
cp $FOAM_TUTORIALS/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
runApplication surfaceFeatureExtract
runApplication surfaceFeatures
runApplication blockMesh

View File

@ -10,39 +10,22 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
object surfaceFeatureExtractDict;
object surfaceFeaturesDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
DTC-scaled.stl
surfaces ("DTC-scaled.stl");
// Identify a feature when angle between faces < includedAngle
includedAngle 150;
subsetFeatures
{
// How to obtain raw features (extractFromFile || extractFromSurface)
extractionMethod extractFromSurface;
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;
extractFromSurfaceCoeffs
{
// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;
}
subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;
// Keep open edges (edges with 1 connected face)
openEdges yes;
}
// Write options
// Write features to obj format for postprocessing
writeObj yes;
// Keep open edges (edges with 1 connected face)
openEdges yes;
}
// ************************************************************************* //

View File

@ -8,7 +8,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# copy DTC hull surface from resources folder
cp $FOAM_TUTORIALS/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
runApplication surfaceFeatureExtract
runApplication surfaceFeatures
runApplication blockMesh

View File

@ -10,39 +10,22 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
object surfaceFeatureExtractDict;
object surfaceFeaturesDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
DTC-scaled.stl
surfaces ("DTC-scaled.stl");
// Identify a feature when angle between faces < includedAngle
includedAngle 150;
subsetFeatures
{
// How to obtain raw features (extractFromFile || extractFromSurface)
extractionMethod extractFromSurface;
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;
extractFromSurfaceCoeffs
{
// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;
}
subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;
// Keep open edges (edges with 1 connected face)
openEdges yes;
}
// Write options
// Write features to obj format for postprocessing
writeObj yes;
// Keep open edges (edges with 1 connected face)
openEdges yes;
}
// ************************************************************************* //

View File

@ -9,7 +9,7 @@ application=$(getApplication)
# Meshing
runApplication blockMesh
runApplication surfaceFeatureExtract
runApplication surfaceFeatures
runApplication snappyHexMesh -overwrite
runApplication createBaffles -overwrite
runApplication mergeOrSplitBaffles -split -overwrite

View File

@ -1,113 +0,0 @@
/*--------------------------------*- 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 surfaceFeatureExtractDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
vessel.stl
{
// How to obtain raw features (extractFromFile || extractFromSurface)
extractionMethod extractFromSurface;
extractFromSurfaceCoeffs
{
// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 120;
}
// Write options
// Write features to obj format for postprocessing
writeObj no;
}
gasInlet.stl
{
extractionMethod extractFromSurface;
extractFromSurfaceCoeffs
{
includedAngle 120;
}
writeObj no;
}
stirrer.stl
{
extractionMethod extractFromSurface;
extractFromSurfaceCoeffs
{
includedAngle 120;
}
writeObj no;
}
outlet.stl
{
extractionMethod extractFromSurface;
extractFromSurfaceCoeffs
{
includedAngle 120;
}
writeObj no;
}
/*
baffles.stl
{
extractionMethod extractFromSurface;
extractFromSurfaceCoeffs
{
includedAngle 120;
}
writeObj no;
}
rotating.stl
{
extractionMethod extractFromSurface;
extractFromSurfaceCoeffs
{
includedAngle 120;
}
writeObj no;
}
sparger.stl
{
extractionMethod extractFromSurface;
extractFromSurfaceCoeffs
{
includedAngle 120;
}
writeObj no;
}
*/
// ************************************************************************* //

View File

@ -0,0 +1,28 @@
/*--------------------------------*- 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 surfaceFeaturesDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
surfaces
(
"vessel.stl"
"gasInlet.stl"
"stirrer.stl"
"outlet.stl"
);
// Identify a feature when angle between faces < includedAngle
includedAngle 120;
// ************************************************************************* //

View File

@ -8,7 +8,7 @@ cd ${0%/*} || exit 1 # Run from this directory
cp $FOAM_TUTORIALS/resources/geometry/propellerTip.obj.gz constant/triSurface/
runApplication blockMesh
runApplication surfaceFeatureExtract
runApplication surfaceFeatures
runApplication snappyHexMesh -overwrite
# Generate face/cell sets and zones

View File

@ -1,17 +0,0 @@
// How to obtain raw features (extractFromFile || extractFromSurface)
extractionMethod extractFromSurface;
extractFromSurfaceCoeffs
{
// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;
}
trimFeatures
{
// Remove features with fewer than the specified number of edges
minElem 10;
}

View File

@ -10,40 +10,27 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
location "system";
object surfaceFeatureExtractDict;
object surfaceFeaturesDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
DTC-scaled.stl
surfaces
(
"innerCylinderSmall.obj"
"outerCylinder.obj"
"propellerStem1.obj"
"propellerStem2.obj"
"propellerStem3.obj"
"propellerTip.obj"
);
// Identify a feature when angle between faces < includedAngle
includedAngle 150;
trimFeatures
{
// How to obtain raw features (extractFromFile || extractFromSurface)
extractionMethod extractFromSurface;
extractFromSurfaceCoeffs
{
// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;
}
subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;
// Keep open edges (edges with 1 connected face)
openEdges yes;
}
// Write options
// Write features to obj format for postprocessing
writeObj yes;
// Remove features with fewer than the specified number of edges
minElem 10;
}
// ************************************************************************* //