Skip to content
Snippets Groups Projects
Commit 09ae0fae authored by mattijs's avatar mattijs
Browse files

ENH: snappyMultiRegionHeater: feature edge support

parent 1432a89c
Branches
Tags
No related merge requests found
...@@ -4,6 +4,10 @@ cd ${0%/*} || exit 1 # run from this directory ...@@ -4,6 +4,10 @@ cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -f constant/triSurface/*.eMesh > /dev/null 2>&1
rm -f constant/polyMesh/boundary
cleanCase cleanCase
rm -rf VTK rm -rf VTK
rm -rf constant/cellToRegion constant/polyMesh/sets rm -rf constant/cellToRegion constant/polyMesh/sets
......
...@@ -8,6 +8,11 @@ cd ${0%/*} || exit 1 # run from this directory ...@@ -8,6 +8,11 @@ cd ${0%/*} || exit 1 # run from this directory
rm -rf constant/polyMesh/sets rm -rf constant/polyMesh/sets
runApplication blockMesh runApplication blockMesh
runApplication surfaceFeatureExtract -includedAngle 150 constant/triSurface/bottomAir.stl bottomAir
runApplication surfaceFeatureExtract -includedAngle 150 constant/triSurface/heater.stl heater
runApplication surfaceFeatureExtract -includedAngle 150 constant/triSurface/leftSolid.stl leftSolid
runApplication surfaceFeatureExtract -includedAngle 150 constant/triSurface/rightSolid.stl rightSolid
runApplication surfaceFeatureExtract -includedAngle 150 constant/triSurface/topAir.stl topAir
runApplication snappyHexMesh -overwrite runApplication snappyHexMesh -overwrite
runApplication splitMeshRegions -cellZones -overwrite runApplication splitMeshRegions -cellZones -overwrite
......
...@@ -109,6 +109,26 @@ castellatedMeshControls ...@@ -109,6 +109,26 @@ castellatedMeshControls
// This is a featureEdgeMesh, read from constant/triSurface for now. // This is a featureEdgeMesh, read from constant/triSurface for now.
features features
( (
{
file "bottomAir.eMesh";
level 1;
}
{
file "heater.eMesh";
level 1;
}
{
file "leftSolid.eMesh";
level 1;
}
{
file "rightSolid.eMesh";
level 1;
}
{
file "topAir.eMesh";
level 1;
}
); );
...@@ -231,7 +251,7 @@ snapControls ...@@ -231,7 +251,7 @@ snapControls
//- Relative distance for points to be attracted by surface feature point //- Relative distance for points to be attracted by surface feature point
// or edge. True distance is this factor times local // or edge. True distance is this factor times local
// maximum edge length. // maximum edge length.
tolerance 4.0; tolerance 1.0;
//- Number of mesh displacement relaxation iterations. //- Number of mesh displacement relaxation iterations.
nSolveIter 30; nSolveIter 30;
...@@ -239,6 +259,11 @@ snapControls ...@@ -239,6 +259,11 @@ snapControls
//- Maximum number of snapping relaxation iterations. Should stop //- Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh. // before upon reaching a correct mesh.
nRelaxIter 5; nRelaxIter 5;
//- Highly experimental and wip: number of feature edge snapping
// iterations. Leave out altogether to disable.
// Of limited use in this case since faceZone faces not handled.
nFeatureSnapIter 10;
} }
...@@ -251,28 +276,20 @@ addLayersControls ...@@ -251,28 +276,20 @@ addLayersControls
// Per final patch (so not geometry!) the layer information // Per final patch (so not geometry!) the layer information
layers layers
{ {
//flowAirDuctReagent_flowAirDuctReagent maxY
//{ {
// nSurfaceLayers 1; nSurfaceLayers 3;
//} }
//flowAirDuctReagent_inlet1
//{
// nSurfaceLayers 1;
//}
//flowAirDuctReagent_inlet2
//{
// nSurfaceLayers 1;
//}
} }
// Expansion factor for layer mesh // Expansion factor for layer mesh
expansionRatio 1.0; expansionRatio 1.3;
//- Wanted thickness of final added cell layer. If multiple layers //- Wanted thickness of final added cell layer. If multiple layers
// is the // is the
// thickness of the layer furthest away from the wall. // thickness of the layer furthest away from the wall.
// Relative to undistorted size of cell outside layer. // Relative to undistorted size of cell outside layer.
finalLayerThickness 0.3; finalLayerThickness 1;
//- Minimum thickness of cell layer. If for any reason layer //- Minimum thickness of cell layer. If for any reason layer
// cannot be above minThickness do not add layer. // cannot be above minThickness do not add layer.
...@@ -302,14 +319,14 @@ addLayersControls ...@@ -302,14 +319,14 @@ addLayersControls
nSmoothNormals 3; nSmoothNormals 3;
// Smooth layer thickness over surface patches // Smooth layer thickness over surface patches
nSmoothThickness 10; nSmoothThickness 2;
// Stop layer growth on highly warped cells // Stop layer growth on highly warped cells
maxFaceThicknessRatio 0.5; maxFaceThicknessRatio 0.5;
// Reduce layer growth where ratio thickness to medial // Reduce layer growth where ratio thickness to medial
// distance is large // distance is large
maxThicknessToMedialRatio 0.3; maxThicknessToMedialRatio 1;
// Angle used to pick up medial axis points // Angle used to pick up medial axis points
// Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x. // Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x.
...@@ -317,6 +334,11 @@ addLayersControls ...@@ -317,6 +334,11 @@ addLayersControls
// Create buffer region for new layer terminations // Create buffer region for new layer terminations
nBufferCellsNoExtrude 0; nBufferCellsNoExtrude 0;
// Overall max number of layer addition iterations. The mesher will exit
// if it reaches this number of iterations; possibly with an illegal
// mesh.
nLayerIter 50;
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment