mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Update cvMesh tutorials.
This commit is contained in:
@ -6,4 +6,9 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
cleanCase
|
||||
|
||||
rm -rf constant/cellAlignments > /dev/null 2>&1
|
||||
rm -rf constant/targetCellSize > /dev/null 2>&1
|
||||
rm -rf constant/internalDelaunayVertices > /dev/null 2>&1
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -4,10 +4,8 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication cvMesh
|
||||
#runApplication collapseEdges 1e-10 180 -overwrite
|
||||
runApplication snappyHexMesh -overwrite
|
||||
runApplication checkMesh -constant -allGeometry -allTopology
|
||||
runApplication collapseEdges -latestTime -collapseFaces
|
||||
runApplication checkMesh -latestTime -allGeometry -allTopology
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -5,30 +5,15 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get the number of processors to run on from system/decomposeParDict
|
||||
nProc=`grep numberOfSubdomains system/decomposeParDict \
|
||||
| sed s/"numberOfSubdomains *\(.*\);"/"\1"/`
|
||||
nProc=$(getNumberOfProcessors)
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication decomposePar
|
||||
|
||||
for dir in processor*
|
||||
do
|
||||
if [[ -d $dir ]]
|
||||
then
|
||||
cp -r $dir/constant/polyMesh $dir/constant/polyMesh_background
|
||||
fi
|
||||
done
|
||||
|
||||
runParallel cvMesh $nProc
|
||||
runParallel collapseEdges $nProc -latestTime -collapseFaces
|
||||
runParallel checkMesh $nProc -latestTime -allTopology -allGeometry
|
||||
|
||||
runApplication reconstructParMesh -constant -mergeTol 1e-10
|
||||
runParallel checkMesh $nProc -constant -allGeometry -allTopology
|
||||
|
||||
# To run from the same background mesh as before
|
||||
# for dir in processor*;
|
||||
# do
|
||||
# rm -r $dir/constant/polyMesh
|
||||
# cp -r $dir/constant/polyMesh_background $dir/constant/polyMesh
|
||||
# done
|
||||
runApplication reconstructParMesh -latestTime
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format binary;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
|
||||
54
tutorials/mesh/cvMesh/blob/system/collapseDict
Normal file
54
tutorials/mesh/cvMesh/blob/system/collapseDict
Normal file
@ -0,0 +1,54 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object collapseDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
collapseEdgesCoeffs
|
||||
{
|
||||
minimumEdgeLength 1e-4;
|
||||
maximumMergeAngle 180;
|
||||
reductionFactor 0.5;
|
||||
}
|
||||
|
||||
|
||||
collapseFacesCoeffs
|
||||
{
|
||||
initialFaceLengthFactor 0.5;
|
||||
reductionFactor 0.5;
|
||||
|
||||
allowEarlyCollapseToPoint on;
|
||||
allowEarlyCollapseCoeff 0.2;
|
||||
guardFraction 0.1;
|
||||
maxCollapseFaceToPointSideLengthCoeff 0.3;
|
||||
}
|
||||
|
||||
|
||||
meshQualityCoeffs
|
||||
{
|
||||
#include "meshQualityDict";
|
||||
maximumIterations 30;
|
||||
maximumSmoothingIterations 1;
|
||||
maxPointErrorCount 5;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -34,11 +34,11 @@ deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 1000;
|
||||
writeInterval 80;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat binary;//ascii;
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 12;
|
||||
|
||||
|
||||
@ -86,7 +86,9 @@ surfaceConformation
|
||||
|
||||
surfaceSearchDistanceCoeff 5;
|
||||
|
||||
maxSurfaceProtrusionCoeff 0.1;
|
||||
nearBoundaryDistanceCoeff 5;
|
||||
|
||||
maxSurfaceProtrusionCoeff 0.001;
|
||||
|
||||
maxQuadAngle 125;
|
||||
|
||||
@ -96,34 +98,15 @@ surfaceConformation
|
||||
|
||||
conformationControls
|
||||
{
|
||||
initial
|
||||
{
|
||||
edgeSearchDistCoeff 5;
|
||||
surfacePtReplaceDistCoeff 0.5;
|
||||
surfacePtExclusionDistanceCoeff 0.5;
|
||||
}
|
||||
|
||||
iteration
|
||||
{
|
||||
edgeSearchDistCoeff 1.5;
|
||||
surfacePtReplaceDistCoeff 0.7;
|
||||
}
|
||||
edgeSearchDistCoeff 5;
|
||||
surfacePtReplaceDistCoeff 0.5;
|
||||
surfacePtExclusionDistanceCoeff 0.5;
|
||||
|
||||
maxIterations 15;
|
||||
|
||||
iterationToInitialHitRatioLimit 0.0001;
|
||||
}
|
||||
|
||||
coarseConformationControls
|
||||
{
|
||||
$conformationControls;
|
||||
}
|
||||
|
||||
fineConformationControls
|
||||
{
|
||||
$conformationControls;
|
||||
}
|
||||
|
||||
geometryToConformTo
|
||||
{
|
||||
blob.stl
|
||||
@ -140,12 +123,26 @@ surfaceConformation
|
||||
|
||||
motionControl
|
||||
{
|
||||
defaultCellSize 0.04;
|
||||
defaultCellSize 0.1;
|
||||
|
||||
// Assign a priority to all requests for cell sizes, the highest overrules.
|
||||
defaultPriority 0;
|
||||
//cellShapeControl constantControl;
|
||||
//cellShapeControl fileControl;
|
||||
cellShapeControl surfaceControl;
|
||||
|
||||
cellSizeControlGeometry
|
||||
constantControlCoeffs
|
||||
{
|
||||
cellSize $defaultCellSize;
|
||||
cellAlignment (1 1 0 0 1 0 0 1 1);
|
||||
}
|
||||
|
||||
fileControlCoeffs
|
||||
{
|
||||
pointFile "alignmentPoints";
|
||||
sizesFile "alignmentSizes";
|
||||
alignmentsFile "alignmentTensors";
|
||||
}
|
||||
|
||||
surfaceControlCoeffs
|
||||
{
|
||||
blob.stl
|
||||
{
|
||||
@ -155,22 +152,23 @@ motionControl
|
||||
surfaceCellSizeFunction uniformValue;
|
||||
uniformValueCoeffs
|
||||
{
|
||||
surfaceCellSize 0.04;
|
||||
surfaceCellSize 0.1;
|
||||
}
|
||||
|
||||
cellSizeFunction uniformDistance;
|
||||
uniformDistanceCoeffs
|
||||
{
|
||||
distance 0.1;
|
||||
}
|
||||
linearDistanceCoeffs
|
||||
{
|
||||
distanceCellSize $defaultCellSize;
|
||||
distance 0.1;
|
||||
}
|
||||
cellSizeFunction uniform;
|
||||
uniformCoeffs
|
||||
{}
|
||||
}
|
||||
}
|
||||
|
||||
maxRefinementIterations 1;
|
||||
|
||||
cellAspectRatioControl
|
||||
{
|
||||
aspectRatio 1.0;
|
||||
aspectRatioDirection (1 0 0);
|
||||
}
|
||||
|
||||
relaxationModel adaptiveLinear;
|
||||
|
||||
adaptiveLinearCoeffs
|
||||
@ -183,7 +181,7 @@ motionControl
|
||||
|
||||
timeChecks no;
|
||||
|
||||
maxLoadUnbalance 0.05;
|
||||
maxLoadUnbalance 0.5;
|
||||
|
||||
alignmentSearchSpokes 24;
|
||||
|
||||
@ -215,18 +213,9 @@ motionControl
|
||||
|
||||
polyMeshFiltering
|
||||
{
|
||||
writeTetDualMesh false;
|
||||
filterSizeCoeff 0.2;
|
||||
mergeClosenessCoeff 1e-3;
|
||||
edgeMergeAngle 45;
|
||||
continueFilteringOnBadInitialPolyMesh true;
|
||||
filterErrorReductionCoeff 0.5;
|
||||
filterCountSkipThreshold 4;
|
||||
surfaceStepFaceAngle 80;
|
||||
maxCollapseIterations 25;
|
||||
maxConsecutiveEqualFaceSets 5;
|
||||
edgeCollapseGuardFraction 0.1;
|
||||
maxCollapseFaceToPointSideLengthCoeff 0.35;
|
||||
filterEdges on;
|
||||
filterFaces off;
|
||||
writeTetDualMesh false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -15,10 +15,10 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 8;
|
||||
numberOfSubdomains 2;
|
||||
|
||||
//method scotch;
|
||||
method ptscotch;
|
||||
method scotch;
|
||||
//method ptscotch;
|
||||
// method hierarchical;
|
||||
|
||||
simpleCoeffs
|
||||
@ -29,7 +29,7 @@ simpleCoeffs
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n ( 2 2 2 );
|
||||
n ( 2 1 1 );
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user