mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: foamyHexMesh: Update blob and simpleShapes tutorials
This commit is contained in:
@ -4,8 +4,12 @@ cd ${0%/*} || exit 1 # run from this directory
|
|||||||
# Source tutorial run functions
|
# Source tutorial run functions
|
||||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
|
# copy flange surface from resources folder
|
||||||
|
cp $FOAM_TUTORIALS/resources/geometry/blob.stl.gz constant/triSurface/
|
||||||
|
|
||||||
runApplication foamyHexMesh
|
runApplication foamyHexMesh
|
||||||
runApplication collapseEdges -latestTime -collapseFaces
|
runApplication collapseEdges -latestTime -collapseFaces
|
||||||
runApplication checkMesh -latestTime -allGeometry -allTopology
|
runApplication checkMesh -latestTime -allGeometry -allTopology
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -7,6 +7,9 @@ cd ${0%/*} || exit 1 # run from this directory
|
|||||||
# Get the number of processors to run on from system/decomposeParDict
|
# Get the number of processors to run on from system/decomposeParDict
|
||||||
nProc=$(getNumberOfProcessors)
|
nProc=$(getNumberOfProcessors)
|
||||||
|
|
||||||
|
# copy flange surface from resources folder
|
||||||
|
cp $FOAM_TUTORIALS/resources/geometry/blob.stl.gz constant/triSurface/
|
||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
runApplication decomposePar
|
runApplication decomposePar
|
||||||
|
|
||||||
@ -16,4 +19,5 @@ runParallel checkMesh $nProc -latestTime -allTopology -allGeometry
|
|||||||
|
|
||||||
runApplication reconstructParMesh -latestTime
|
runApplication reconstructParMesh -latestTime
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -1,18 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
cd ${0%/*} || exit 1 # run from this directory
|
|
||||||
|
|
||||||
# Source tutorial run functions
|
|
||||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
|
||||||
|
|
||||||
runApplication foamyHexMesh
|
|
||||||
|
|
||||||
# Change collapseEdges to only do one iteration
|
|
||||||
cp system/collapseDict system/collapseDict.org
|
|
||||||
|
|
||||||
sed -e s/"\(maximumIterations[ \t]*\)\([0-9]*\);"/"\1 1;"/g \
|
|
||||||
system/collapseDict.org > system/collapseDict
|
|
||||||
|
|
||||||
runApplication collapseEdges -latestTime -collapseFaces
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
|
||||||
@ -1,28 +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 polyBoundaryMesh;
|
|
||||||
location "constant/polyMesh";
|
|
||||||
object boundary;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
1
|
|
||||||
(
|
|
||||||
walls
|
|
||||||
{
|
|
||||||
type wall;
|
|
||||||
nFaces 638;
|
|
||||||
startFace 2948;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
Folder to house tri-surfaces
|
||||||
|
|
||||||
|
The Allrun script copies the surface from the $FOAM_TUTORIALS/resources/geometry
|
||||||
|
folder
|
||||||
File diff suppressed because it is too large
Load Diff
@ -4,24 +4,22 @@ cd ${0%/*} || exit 1 # run from this directory
|
|||||||
# Source tutorial run functions
|
# Source tutorial run functions
|
||||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
# Remove any small triangles (edges < 1e-4, sliver with Q < 1e-6) from surface
|
|
||||||
# (cvMesh will try to conform to every feature).
|
|
||||||
runApplication surfaceClean \
|
|
||||||
constant/triSurface/coneAndSphere.obj \
|
|
||||||
1e-4 1e-6 \
|
|
||||||
constant/triSurface/coneAndSphere_clean.obj
|
|
||||||
mv log.surfaceClean log.surfaceClean.coneAndSphere
|
|
||||||
# Orient so point to be meshed is inside surface
|
|
||||||
runApplication surfaceOrient \
|
runApplication surfaceOrient \
|
||||||
constant/triSurface/coneAndSphere_clean.obj \
|
constant/triSurface/cone.stl \
|
||||||
-inside '(0 -0.5 0)' \
|
-inside '(0 -0.5 0)' \
|
||||||
constant/triSurface/coneAndSphere_clean_orient.obj
|
constant/triSurface/cone_orient.stl
|
||||||
mv log.surfaceOrient log.surfaceOrient.coneAndSphere
|
mv log.surfaceOrient log.surfaceOrient.cone
|
||||||
|
|
||||||
unset FOAM_SIGFPE
|
runApplication surfaceOrient \
|
||||||
|
constant/triSurface/sphere.stl \
|
||||||
|
-inside '(0 -0.5 0)' \
|
||||||
|
constant/triSurface/sphere_orient.stl
|
||||||
|
mv log.surfaceOrient log.surfaceOrient.sphere
|
||||||
|
|
||||||
|
runApplication surfaceBooleanFeatures intersection \
|
||||||
|
constant/triSurface/cone_orient.stl \
|
||||||
|
constant/triSurface/sphere_orient.stl
|
||||||
|
|
||||||
# Generate aligned points (in constant/internalDelaunayVertices) and a
|
|
||||||
# mesh from that.
|
|
||||||
runApplication foamyHexMesh
|
runApplication foamyHexMesh
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -19,10 +19,15 @@ FoamFile
|
|||||||
|
|
||||||
geometry
|
geometry
|
||||||
{
|
{
|
||||||
// Internal shape
|
sphere_orient.stl
|
||||||
coneAndSphere_clean_orient.obj
|
|
||||||
{
|
{
|
||||||
name coneAndSphere;
|
name sphere;
|
||||||
|
type triSurfaceMesh;
|
||||||
|
}
|
||||||
|
|
||||||
|
cone_orient.stl
|
||||||
|
{
|
||||||
|
name cone;
|
||||||
type triSurfaceMesh;
|
type triSurfaceMesh;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,20 +48,37 @@ surfaceConformation
|
|||||||
|
|
||||||
featurePointControls
|
featurePointControls
|
||||||
{
|
{
|
||||||
specialiseFeaturePoints on;
|
specialiseFeaturePoints off;
|
||||||
edgeAiming on;
|
edgeAiming off;
|
||||||
guardFeaturePoints off;
|
guardFeaturePoints off;
|
||||||
snapFeaturePoints on;
|
snapFeaturePoints off;
|
||||||
circulateEdges off;
|
circulateEdges off;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Geometry to mesh to
|
// Geometry to mesh to
|
||||||
geometryToConformTo
|
geometryToConformTo
|
||||||
{
|
{
|
||||||
coneAndSphere
|
cone
|
||||||
{
|
{
|
||||||
featureMethod extractFeatures;
|
featureMethod extractFeatures;
|
||||||
includedAngle 140;
|
includedAngle 140;
|
||||||
|
|
||||||
|
patchInfo
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
inGroups (groupConeAndSphere);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sphere
|
||||||
|
{
|
||||||
|
featureMethod none;
|
||||||
|
|
||||||
|
patchInfo
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
inGroups (groupConeAndSphere);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
domain
|
domain
|
||||||
@ -66,6 +88,15 @@ surfaceConformation
|
|||||||
mode outside;
|
mode outside;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
additionalFeatures
|
||||||
|
{
|
||||||
|
coneSphereIntersection
|
||||||
|
{
|
||||||
|
featureMethod extendedFeatureEdgeMesh;
|
||||||
|
extendedFeatureEdgeMesh "cone_orient_sphere_orient_intersection.extendedFeatureEdgeMesh";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -97,7 +128,24 @@ motionControl
|
|||||||
|
|
||||||
shapeControlFunctions
|
shapeControlFunctions
|
||||||
{
|
{
|
||||||
coneAndSphere
|
sphere
|
||||||
|
{
|
||||||
|
type searchableSurfaceControl;
|
||||||
|
priority 1;
|
||||||
|
mode bothSides;
|
||||||
|
|
||||||
|
surfaceCellSizeFunction uniformValue;
|
||||||
|
uniformValueCoeffs
|
||||||
|
{
|
||||||
|
surfaceCellSizeCoeff 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
cellSizeFunction uniform;
|
||||||
|
uniformCoeffs
|
||||||
|
{}
|
||||||
|
}
|
||||||
|
|
||||||
|
cone
|
||||||
{
|
{
|
||||||
type searchableSurfaceControl;
|
type searchableSurfaceControl;
|
||||||
priority 1;
|
priority 1;
|
||||||
|
|||||||
BIN
tutorials/resources/geometry/blob.stl.gz
Normal file
BIN
tutorials/resources/geometry/blob.stl.gz
Normal file
Binary file not shown.
Reference in New Issue
Block a user