mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'surfaceFeatureExtract-Tutorials'
This commit is contained in:
@ -30,9 +30,6 @@ surface1.stl
|
||||
|
||||
// Write options
|
||||
|
||||
// Write .eMesh file (for snappyHexMesh)
|
||||
writeFeatureEdgeMesh yes;
|
||||
|
||||
// Write features to obj format for postprocessing
|
||||
writeObj yes;
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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"
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
|
||||
@ -30,9 +30,6 @@ flange.obj
|
||||
|
||||
// Write options
|
||||
|
||||
// Write .eMesh file (for snappyHexMesh)
|
||||
writeFeatureEdgeMesh no;
|
||||
|
||||
// Write features to obj format for postprocessing
|
||||
writeObj yes;
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user