diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun.pre b/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun.pre index 917bec1fac..472c03a6f7 100755 --- a/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun.pre +++ b/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun.pre @@ -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 diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/system/surfaceFeatureExtractDict b/tutorials/incompressible/pimpleDyMFoam/propeller/system/surfaceFeatureExtractDict new file mode 100644 index 0000000000..b6333ec29b --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/propeller/system/surfaceFeatureExtractDict @@ -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" +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/cvMesh/flange/Allrun b/tutorials/mesh/cvMesh/flange/Allrun index d4e853bb3f..dcbbfb47d4 100755 --- a/tutorials/mesh/cvMesh/flange/Allrun +++ b/tutorials/mesh/cvMesh/flange/Allrun @@ -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 diff --git a/tutorials/mesh/cvMesh/flange/system/surfaceFeatureExtractDict b/tutorials/mesh/cvMesh/flange/system/surfaceFeatureExtractDict index a4c24aa610..ca6dfb9e7c 100644 --- a/tutorials/mesh/cvMesh/flange/system/surfaceFeatureExtractDict +++ b/tutorials/mesh/cvMesh/flange/system/surfaceFeatureExtractDict @@ -30,9 +30,6 @@ flange.obj // Write options - // Write .eMesh file (for snappyHexMesh) - writeFeatureEdgeMesh no; - // Write features to obj format for postprocessing writeObj yes; } diff --git a/tutorials/mesh/cvMesh/simpleShapes/Allrun b/tutorials/mesh/cvMesh/simpleShapes/Allrun index 5de37ba569..f1259d32d2 100755 --- a/tutorials/mesh/cvMesh/simpleShapes/Allrun +++ b/tutorials/mesh/cvMesh/simpleShapes/Allrun @@ -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 diff --git a/tutorials/mesh/cvMesh/simpleShapes/system/surfaceFeatureExtractDict b/tutorials/mesh/cvMesh/simpleShapes/system/surfaceFeatureExtractDict new file mode 100644 index 0000000000..850a4ea41f --- /dev/null +++ b/tutorials/mesh/cvMesh/simpleShapes/system/surfaceFeatureExtractDict @@ -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; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/flange/Allrun b/tutorials/mesh/snappyHexMesh/flange/Allrun index 5d808c1f55..365020d19d 100755 --- a/tutorials/mesh/snappyHexMesh/flange/Allrun +++ b/tutorials/mesh/snappyHexMesh/flange/Allrun @@ -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 diff --git a/tutorials/mesh/snappyHexMesh/flange/system/surfaceFeatureExtractDict b/tutorials/mesh/snappyHexMesh/flange/system/surfaceFeatureExtractDict new file mode 100644 index 0000000000..21384ba40c --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/flange/system/surfaceFeatureExtractDict @@ -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; +} + + +// ************************************************************************* //