BUG: Add surfaceFeatureExtract dictionaries to the tutorials

This commit is contained in:
laurence
2012-04-19 14:37:31 +01:00
parent 76f0eb0253
commit 12d560aa03
8 changed files with 159 additions and 26 deletions

View File

@ -12,21 +12,7 @@ cp $FOAM_TUTORIALS/resources/geometry/propellerTip.obj.gz constant/triSurface/
runApplication blockMesh
surfaces="
innerCylinder
innerCylinderSmall
outerCylinder
propellerTip
propellerStem1
propellerStem2
propellerStem3
"
for s in $surfaces; do
runApplication surfaceFeatureExtract -includedAngle 150 -minElem 10 \
constant/triSurface/$s.obj $s
mv log.surfaceFeatureExtract log.surfaceFeatureExtract.$s
done
runApplication surfaceFeatureExtract
runApplication snappyHexMesh -overwrite
# force removal of fields generated by snappy

View File

@ -0,0 +1,59 @@
/*--------------------------------*- 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;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
innerCylinder.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
innerCylinderSmall.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
outerCylinder.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
propellerStem1.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
propellerStem2.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
propellerStem3.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
propellerTip.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
// ************************************************************************* //

View File

@ -8,7 +8,7 @@ cd ${0%/*} || exit 1 # run from this directory
nProc=`grep numberOfSubdomains system/decomposeParDict \
| sed s/"numberOfSubdomains *\(.*\);"/"\1"/`
runApplication surfaceFeatureExtract constant/triSurface/flange.obj flange -includedAngle 155
runApplication surfaceFeatureExtract
# Create tight-fitting background mesh
runApplication blockMesh

View File

@ -30,9 +30,6 @@ flange.obj
// Write options
// Write .eMesh file (for snappyHexMesh)
writeFeatureEdgeMesh no;
// Write features to obj format for postprocessing
writeObj yes;
}

View File

@ -30,15 +30,11 @@ surfaceOrient \
constant/triSurface/domain_clean_orient.stl
> log.surfaceOrient.domain 2>&1
runApplication surfaceFeatureExtract \
constant/triSurface/coneAndSphere_clean_orient.obj \
coneAndSphere -includedAngle 125
runApplication surfaceFeatureExtract
mv log.surfaceFeatureExtract log.surfaceFeatureExtract.coneAndSphere_clean
unset FOAM_SIGFPE
runApplication surfaceFeatureExtract \
constant/triSurface/domain_clean_orient.stl \
domain -includedAngle 125
runApplication surfaceFeatureExtract
mv log.surfaceFeatureExtract log.surfaceFeatureExtract.domain
# Generate aligned points (in constant/internalDelaunayVertices) and a

View File

@ -0,0 +1,57 @@
/*--------------------------------*- 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;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
coneAndSphere_clean_orient.obj
{
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 125;
}
// Write options
// Write features to obj format for postprocessing
writeObj no;
}
domain_clean_orient.stl
{
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 125;
}
// Write options
// Write features to obj format for postprocessing
writeObj no;
}
// ************************************************************************* //

View File

@ -6,5 +6,5 @@
cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/
runApplication blockMesh
runApplication surfaceFeatureExtract -includedAngle 150 -writeObj constant/triSurface/flange.stl flange
runApplication surfaceFeatureExtract
runApplication snappyHexMesh -overwrite

View File

@ -0,0 +1,38 @@
/*--------------------------------*- 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;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
flange.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 150;
}
// Write options
// Write features to obj format for postprocessing
writeObj yes;
}
// ************************************************************************* //