Commit 2f00aece authored by Henry's avatar Henry
Browse files

cvMesh: updated tutorials

parent 425d51a9
......@@ -9,7 +9,7 @@ wmake snappyHexMesh
if [ -d "$CGAL_ARCH_PATH" ]
then
wmake cvMesh
cd cvMesh && ./Allwmake
fi
# ----------------------------------------------------------------- end-of-file
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
# ----------------------------------------------------------------- end-of-file
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
runApplication cvMesh $nProc
runApplication checkMesh $nProc -constant -allGeometry -allTopology
# ----------------------------------------------------------------- end-of-file
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions
. $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"/`
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
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
# ----------------------------------------------------------------- end-of-file
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1.0;
xmin -1.3;
xmax 0.65;
ymin -1.1;
ymax 0.8;
zmin -1.4;
zmax 0.55;
vertices
(
($xmin $ymin $zmin)
($xmax $ymin $zmin)
($xmax $ymax $zmin)
($xmin $ymax $zmin)
($xmin $ymin $zmax)
($xmax $ymin $zmax)
($xmax $ymax $zmax)
($xmin $ymax $zmax)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (11 11 9) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
walls
{
type wall;
faces
(
(3 7 6 2)
(0 4 7 3)
(2 6 5 1)
(1 5 4 0)
(0 3 2 1)
(4 5 6 7)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //
......@@ -8,34 +8,27 @@
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
format binary;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"(D|Dcorr)"
2
(
blob.stl_patch1
{
solver GAMG;
tolerance 1e-06;
relTol 0.99;
smoother GaussSeidel;
cacheAgglomeration true;
nCellsInCoarsestLevel 6;
agglomerator faceAreaPair;
mergeLevels 1;
type wall;
nFaces 64564;
startFace 459986;
}
}
stressAnalysis
{
nCorrectors 1;
D 1e-10;
accelerationFactor 2;
}
cvMesh_defaultPatch
{
type wall;
nFaces 0;
startFace 524550;
}
)
// ************************************************************************* //
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
......@@ -28,19 +28,19 @@ startTime 0;
stopAt endTime;
endTime 0;
endTime 80;
deltaT 1;
writeControl timeStep;
writeInterval 1000; //10 to see the meshing steps
writeInterval 1000;
purgeWrite 0;
writeFormat ascii;
writeFormat binary;//ascii;
writePrecision 10;
writePrecision 12;
writeCompression uncompressed;
......@@ -50,5 +50,4 @@ timePrecision 6;
runTimeModifiable yes;
// ************************************************************************* //
......@@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
......@@ -27,16 +27,54 @@ FoamFile
geometry
{
flange.obj
blob.stl
{
type triSurfaceMesh;
}
refinementBox
{
type searchableBox;
min (-0.2 -0.6 -0.2);
max ( 0.4 0.2 0.35);
}
}
backgroundMeshDecomposition
{
minLevels 0;
sampleResolution 4;
spanScale 20;
maxCellWeightCoeff 20;
}
initialPoints
{
minimumSurfaceDistanceCoeff 0.55;
initialPointsMethod autoDensity;
// initialPointsMethod pointFile;
autoDensityCoeffs
{
minLevels 0;
maxSizeRatio 5.0;
sampleResolution 5;
surfaceSampleResolution 5;
}
pointFileCoeffs
{
pointFile "constant/internalDelaunayVertices";
}
}
surfaceConformation
{
locationInMesh (0 0 0);
locationInMesh (0.1 0.1 0.2);
pointPairDistanceCoeff 0.1;
......@@ -70,7 +108,8 @@ surfaceConformation
maxIterations 15;
iterationToInitialHitRatioLimit 0.001;
iterationToIntialHitRatioLimit 0.01;
iterationToInitialHitRatioLimit 0.01;
}
fineConformationControls
......@@ -89,44 +128,44 @@ surfaceConformation
maxIterations 15;
iterationToInitialHitRatioLimit 0.001;
iterationToInitialHitRatioLimit 0.002;
iterationToIntialHitRatioLimit 0.002;
}
geometryToConformTo
{
flange.obj
blob.stl
{
featureMethod extendedFeatureEdgeMesh;
extendedFeatureEdgeMesh "flange.extendedFeatureEdgeMesh";
featureMethod none;
}
}
additionalFeatures {}
}
initialPoints
{
minimumSurfaceDistanceCoeff 0.55;
initialPointsMethod pointFile;
pointFileCoeffs
additionalFeatures
{
pointFile "constant/internalDelaunayVertices";
}
}
motionControl
{
defaultCellSize 0.00075;
defaultCellSize 0.04;
// Assign a priority to all requests for cell sizes, the highest overrules.
defaultPriority 0;
cellSizeControlGeometry
{
blob.stl
{
priority 1;
mode bothSides;
cellSizeFunction uniformDistance;
uniformDistanceCoeffs
{
cellSize 0.02;
distance 0.1;
}
}
}
relaxationModel adaptiveLinear;
......@@ -139,13 +178,15 @@ motionControl
objOutput no;
timeChecks yes;
timeChecks no;
maxLoadUnbalance 0.05;
alignmentSearchSpokes 36;
alignmentSearchSpokes 24;
alignmentAcceptanceAngle 48;
sizeAndAlignmentRebuildFrequency 20;
sizeAndAlignmentRebuildFrequency 40;
pointInsertionCriteria
{
......@@ -171,37 +212,33 @@ motionControl
polyMeshFiltering
{
// Write the underlying Delaunay tet mesh at output time
writeTetDualMesh true;
writeTetDualMesh false;
filterSizeCoeff 0.2;
mergeClosenessCoeff 1e-4;
mergeClosenessCoeff 1e-9;
continueFilteringOnBadInitialPolyMesh true;
filterErrorReductionCoeff 0.5;
filterCountSkipThreshold 4;
surfaceStepFaceAngle 80;
maxCollapseIterations 25;
maxConsecutiveEqualFaceSets 5;
surfaceStepFaceAngle 80;
edgeCollapseGuardFraction 0.3;
maxCollapseFaceToPointSideLengthCoeff 0.35;
}
meshQualityControls
{
maxNonOrtho 65;
maxBoundarySkewness 50;
maxInternalSkewness 10;
maxConcave 80;
minVol 1e-20;
minTetQuality 1e-30;
minVol 0;
minArea -1;
minTwist 0.02;
minTwist 0.0;
minDeterminant 0.001;
minFaceWeight 0.02;
minVolRatio 0.01;
minTriangleTwist -1;
}
// ************************************************************************* //
......@@ -11,45 +11,37 @@ FoamFile
format ascii;
class dictionary;
location "system";
object fvSchemes;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
d2dt2Schemes
{
default steadyState;
}
numberOfSubdomains 64;
gradSchemes
{
default Gauss cubic;
}
method scotch;
// method ptscotch;
// method hierarchical;
divSchemes
simpleCoeffs
{
default Gauss cubic;
n ( 2 2 1 );
delta 0.001;
}
laplacianSchemes
hierarchicalCoeffs
{
default Gauss linear uncorrected;
n ( 2 2 2 );
delta 0.001;
order xyz;
}
interpolationSchemes
manualCoeffs
{
default cubic;
dataFile "";
}
snGradSchemes
{
default uncorrected;
}
distributed no;
fluxRequired
{
default no;
D ;
}
roots ( );
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
......@@ -15,40 +15,39 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
d2dt2Schemes
ddtSchemes
{
default steadyState;
default none;
}
gradSchemes
{
default Gauss cubic;
default none;
}
divSchemes
{
default Gauss cubic;
default none;
}
laplacianSchemes
{
default Gauss linear uncorrected;
default none;
}
interpolationSchemes
{
default cubic;
default none;
}
snGradSchemes
{
default uncorrected;
default none;
}
fluxRequired
{
default no;
D ;
}
......
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
......@@ -24,7 +24,7 @@ actions
source boxToCell;
sourceInfo
{
box (-100 -100 -0.01)(100 100 100);
box (-100 -100 -0.2)(100 100 100);
}
}
......@@ -61,42 +61,42 @@ actions
// ~~~~~~~~~~~~~~~~ //
{
name y;
name x;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 0 -100)(100 100 100);
box (-0.32 -100 -100)(100 100 100);
}
}
{
name yf;
name xf;
type faceSet;
action new;
source cellToFace;
sourceInfo
{
set y;
set x;
option all;
}
}
{
name y;
name x;
type cellSet;
action invert;
}
{
name yf;
name xf;
type faceSet;
action subset;
source cellToFace;
sourceInfo