diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/T b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/T new file mode 100644 index 0000000000..73ab09eedd --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/T @@ -0,0 +1,43 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 265; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + wall + { + type fixedValue; + value uniform 265; + } + + twoFridgeFreezers_seal_0 + { + type fixedValue; + value uniform 303; + } + + twoFridgeFreezers_herring_1 + { + $twoFridgeFreezers_seal_0; + } +} + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/U b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/U new file mode 100644 index 0000000000..8921aa58a9 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/U @@ -0,0 +1,31 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + wall + { + type noSlip; + } +} + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/alphat b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/alphat new file mode 100644 index 0000000000..2afacd9bcd --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/alphat @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + wall + { + type alphatJayatillekeWallFunction; + Prt 0.85; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/epsilon b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/epsilon new file mode 100644 index 0000000000..038283f682 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/epsilon @@ -0,0 +1,34 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 0.01; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + wall + { + type epsilonWallFunction; + value uniform 0.01; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/k b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/k new file mode 100644 index 0000000000..4a47dfb718 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/k @@ -0,0 +1,34 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + wall + { + type kqRWallFunction; + value uniform 0.1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/nut b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/nut new file mode 100644 index 0000000000..481dd7a40f --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/nut @@ -0,0 +1,34 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + wall + { + type nutkWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/p b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/p new file mode 100644 index 0000000000..849e28cc0c --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/p @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + wall + { + type calculated; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/p_rgh b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/p_rgh new file mode 100644 index 0000000000..1331225169 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/0/p_rgh @@ -0,0 +1,33 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + wall + { + type fixedFluxPressure; + rho rhok; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/Allrun b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/Allrun new file mode 100755 index 0000000000..d0102481da --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/Allrun @@ -0,0 +1,25 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +runApplication blockMesh + +# Serial +runApplication snappyHexMesh -overwrite +runApplication $(getApplication) + +## Parallel +#runApplication decomposePar -fileHandler collated +#runParallel snappyHexMesh -overwrite -fileHandler collated +## Remove any include files from the field dictionaries +#( mkdir -p processors/0 && \ +# cd 0 && \ +# for f in *; do [ -f "$f" ] && \ +# foamDictionary "$f" > "../processors/0/$f"; done \ +#) +# +#runParallel $(getApplication) -fileHandler collated +#runApplication reconstructParMesh -constant -mergeTol 1e-6 +#runApplication reconstructPar + +#------------------------------------------------------------------------------ diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/constant/g b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/constant/g new file mode 100644 index 0000000000..3402aabaa7 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/constant/g @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 0 -9.81); + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/constant/transportProperties b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/constant/transportProperties new file mode 100644 index 0000000000..ae4727d615 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/constant/transportProperties @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transportProperties; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +// Laminar viscosity +nu 1e-05; + +// Thermal expansion coefficient +beta 3e-03; + +// Reference temperature +TRef 300; + +// Laminar Prandtl number +Pr 0.7; + +// Turbulent Prandtl number +Prt 0.85; + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/constant/triSurface/fridgeA.eMesh b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/constant/triSurface/fridgeA.eMesh new file mode 100644 index 0000000000..b971b520c4 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/constant/triSurface/fridgeA.eMesh @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class featureEdgeMesh; + object points; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Points +( +(1.99 1.99 0.01) //0 +(3.01 1.99 0.01) //1 +(3.01 3.01 0.01) //2 +(1.99 3.01 0.01) //3 + +(1.99 1.99 2.01) //4 +(3.01 1.99 2.01) //5 +(3.01 3.01 2.01) //6 +(1.99 3.01 2.01) //7 +) + +// Edges +( +(0 1) +(1 2) +(2 3) +(3 0) + +(4 5) +(5 6) +(6 7) +(7 4) + +(0 4) +(1 5) +(2 6) +(3 7) +) + + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/constant/turbulenceProperties b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/constant/turbulenceProperties new file mode 100644 index 0000000000..2be0cd1037 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/constant/turbulenceProperties @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/blockMeshDict b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/blockMeshDict new file mode 100644 index 0000000000..98f4f94479 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/blockMeshDict @@ -0,0 +1,102 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 1; + +vertices +( + (-2.03 -2.0 0) + ( 8.03 -2.0 0) + ( 8.03 8.0 0) + (-2.03 8.0 0) + (-2.03 -2.0 5) + ( 8.03 -2.0 5) + ( 8.03 8.0 5) + (-2.03 8.0 5) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (20 20 10) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + maxY + { + type symmetryPlane; + faces + ( + (3 7 6 2) + ); + } + + minX + { + type symmetryPlane; + faces + ( + (0 4 7 3) + ); + } + + maxX + { + type symmetryPlane; + faces + ( + (2 6 5 1) + ); + } + + minY + { + type symmetryPlane; + faces + ( + (1 5 4 0) + ); + } + + ground + { + type wall; + faces + ( + (0 3 2 1) + ); + } + + maxZ + { + type symmetryPlane; + faces + ( + (4 5 6 7) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/controlDict b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/controlDict new file mode 100644 index 0000000000..f80b7666e3 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/controlDict @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application buoyantBoussinesqSimpleFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 2000; + +deltaT 1; + +writeControl timeStep; + +writeInterval 100; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/decomposeParDict b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/decomposeParDict new file mode 100644 index 0000000000..079c197467 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/decomposeParDict @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 2; + +method scotch; + +//coeffs +//{ +// n (3 2 1); +// delta 0.001; +// order xyz; +// dataFile "cellDecomposition"; +//} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/fvSchemes b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/fvSchemes new file mode 100644 index 0000000000..57ca67977a --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/fvSchemes @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default steadyState; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + + div(phi,U) bounded Gauss upwind; + div(phi,T) bounded Gauss upwind; + div(phi,k) bounded Gauss upwind; + div(phi,epsilon) bounded Gauss upwind; + div(phi,R) bounded Gauss upwind; + div(R) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear limited corrected 0.33; + laplacian(diffusivity,cellDisplacement) Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default limited corrected 0.33; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/fvSolution b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/fvSolution new file mode 100644 index 0000000000..6a79d0f74e --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/fvSolution @@ -0,0 +1,75 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p_rgh + { + solver PCG; + preconditioner DIC; + tolerance 1e-08; + relTol 0.01; + } + + "(U|T|k|epsilon)" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-07; + relTol 0.1; + } + + cellDisplacement + { + $p_rgh; + relTol 0; + } +} + +SIMPLE +{ + nNonOrthogonalCorrectors 2; + pRefCell 0; + pRefValue 0; + + residualControl + { + p_rgh 1e-2; + U 1e-4; + T 1e-3; + + // possibly check turbulence fields + "(k|epsilon|omega)" 1e-3; + } +} + +relaxationFactors +{ + fields + { + p_rgh 0.7; + } + equations + { + U 0.2; + T 0.5; + "(k|epsilon)" 0.7; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/meshQualityDict b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/meshQualityDict new file mode 100644 index 0000000000..3d43ee3a28 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/meshQualityDict @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object meshQualityDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Include defaults parameters from master dictionary +#includeEtc "caseDicts/meshQualityDict" + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/snappyHexMeshDict b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/snappyHexMeshDict new file mode 100644 index 0000000000..b6eafcc816 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridgesDirectionalRefinement/system/snappyHexMeshDict @@ -0,0 +1,420 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object snappyHexMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Which of the steps to run +castellatedMesh true; +snap true; +addLayers true; + + +// Geometry. Definition of all surfaces. All surfaces are of class +// searchableSurface. +// Surfaces are used +// - to specify refinement for any mesh cell intersecting it +// - to specify refinement for any mesh cell inside/outside/near +// - to 'snap' the mesh boundary to the surface +geometry +{ + igloo + { + type searchableSphere; + centre (3 3 0); + radius 4; + } + + box1 + { + type searchableBox; + min (0 0 0); + max (1 1 1); + } + + twoFridgeFreezers + { + type searchableSurfaceCollection; + + mergeSubRegions true; + + seal + { + surface box1; + scale (1.0 1.0 2.1); + transform + { + coordinateSystem + { + type cartesian; + origin (2 2 0); + coordinateRotation + { + type axesRotation; + e1 (1 0 0); + e3 (0 0 1); + } + } + } + } + herring + { + surface box1; + scale (1.0 1.0 2.1); + transform + { + coordinateSystem + { + type cartesian; + origin (3.5 3 0); + coordinateRotation + { + type axesRotation; + e1 (1 0 0); + e3 (0 0 1); + } + } + } + } + } + + // For directional refinement + dirRefineBox1 + { + type searchableBox; + min (-10 -10 -10); + max ( 10 10 0.5); + } + dirRefineBox2 + { + type searchableBox; + min (-10 -10 -10); + max ( 10 10 0.25); + } +}; + + + +// Settings for the castellatedMesh generation. +castellatedMeshControls +{ + + // Refinement parameters + // ~~~~~~~~~~~~~~~~~~~~~ + + // If local number of cells is >= maxLocalCells on any processor + // switches from from refinement followed by balancing + // (current method) to (weighted) balancing before refinement. + maxLocalCells 100000; + + // Overall cell limit (approximately). Refinement will stop immediately + // upon reaching this number so a refinement level might not complete. + // Note that this is the number of cells before removing the part which + // is not 'visible' from the keepPoint. The final number of cells might + // actually be a lot less. + maxGlobalCells 2000000; + + // The surface refinement loop might spend lots of iterations refining just a + // few cells. This setting will cause refinement to stop if <= minimumRefine + // are selected for refinement. Note: it will at least do one iteration + // (unless the number of cells to refine is 0) + minRefinementCells 100; + + // Number of buffer layers between different levels. + // 1 means normal 2:1 refinement restriction, larger means slower + // refinement. + nCellsBetweenLevels 1; + + + + // Explicit feature edge refinement + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + // Specifies a level for any cell intersected by its edges. + // This is a featureEdgeMesh, read from constant/triSurface for now. + features + ( + { + file "fridgeA.eMesh"; + levels ((0.01 3)); + } + ); + + + + // Surface based refinement + // ~~~~~~~~~~~~~~~~~~~~~~~~ + + // Specifies two levels for every surface. The first is the minimum level, + // every cell intersecting a surface gets refined up to the minimum level. + // The second level is the maximum level. Cells that 'see' multiple + // intersections where the intersections make an + // angle > resolveFeatureAngle get refined up to the maximum level. + + refinementSurfaces + { + twoFridgeFreezers + { + // Surface-wise min and max refinement level + level (2 2); + + regions + { + // Region-wise override + "cook.*" + { + level (3 3); + } + } + + // Optional specification of patch type (default is wall). No + // constraint types (cyclic, symmetry) etc. are allowed. + patchInfo + { + type wall; + } + } + + "iglo.*" + { + // Surface-wise min and max refinement level + level (1 1); + + // Optional specification of patch type (default is wall). No + // constraint types (cyclic, symmetry) etc. are allowed. + patchInfo + { + type wall; + } + } + } + + // Resolve sharp angles on fridges + resolveFeatureAngle 60; + + + // Region-wise refinement + // ~~~~~~~~~~~~~~~~~~~~~~ + + // Specifies refinement level for cells in relation to a surface. One of + // three modes + // - distance. 'levels' specifies per distance to the surface the + // wanted refinement level. The distances need to be specified in + // descending order. + // - inside. 'levels' is only one entry and only the level is used. All + // cells inside the surface get refined up to the level. The surface + // needs to be closed for this to be possible. + // - outside. Same but cells outside. + + refinementRegions + { + dirRefineBox1 + { + mode inside; + + // Disable uniform refinement + levels ((10000 0)); + + // Optional: directional refinement + // (after all other refinement). Directional refinement + // for all cells according to 'mode' ('inside' or 'outside'; + // 'distance' not supported) and within certain range. E.g. + // - for all cells with level 0-100 + // - do two splits in z direction. The resulting mesh is + // no longer compatible with e.g. dynamic refinement/unrefinement. + levelIncrement (0 0 (0 0 1)); + } + dirRefineBox2 + { + mode inside; + + // Disable uniform refinement + levels ((10000 0)); + + // Optional: directional refinement + // (after all other refinement). Directional refinement + // for all cells according to 'mode' ('inside' or 'outside'; + // 'distance' not supported) and within certain range. E.g. + // - for all cells with level 0-100 + // - do two splits in z direction. The resulting mesh is + // no longer compatible with e.g. dynamic refinement/unrefinement. + levelIncrement (0 1 (0 0 2)); + } + } + + + // Mesh selection + // ~~~~~~~~~~~~~~ + + // After refinement patches get added for all refinementSurfaces and + // all cells intersecting the surfaces get put into these patches. The + // section reachable from the locationInMesh is kept. + // NOTE: This point should never be on a face, always inside a cell, even + // after refinement. + locationInMesh (3 0.28 0.43); + + + // Whether any faceZones (as specified in the refinementSurfaces) + // are only on the boundary of corresponding cellZones or also allow + // free-standing zone faces. Not used if there are no faceZones. + allowFreeStandingZoneFaces true; +} + + + +// Settings for the snapping. +snapControls +{ + //- Number of patch smoothing iterations before finding correspondence + // to surface + nSmoothPatch 3; + + //- Relative distance for points to be attracted by surface feature point + // or edge. True distance is this factor times local + // maximum edge length. + tolerance 2.0; + + //- Number of mesh displacement relaxation iterations. + nSolveIter 30; + + //- Maximum number of snapping relaxation iterations. Should stop + // before upon reaching a correct mesh. + nRelaxIter 5; + + + // Feature snapping + + //- Number of feature edge snapping iterations. + // Leave out altogether to disable. + nFeatureSnapIter 10; + + //- Detect (geometric) features by sampling the surface (default=false) + implicitFeatureSnap true; + + //- Use castellatedMeshControls::features (default = true) + explicitFeatureSnap false; +} + + + +// Settings for the layer addition. +addLayersControls +{ + // Are the thickness parameters below relative to the undistorted + // size of the refined cell outside layer (true) or absolute sizes (false). + relativeSizes true; + + // Per final patch (so not geometry!) the layer information + layers + { + "two.*" + { + nSurfaceLayers 3; + } + ground + { + nSurfaceLayers 3; + } + igloo + { + nSurfaceLayers 1; + } + } + + // Expansion factor for layer mesh + expansionRatio 1.0; + + // Wanted thickness of final added cell layer. If multiple layers + // is the thickness of the layer furthest away from the wall. + // Relative to undistorted size of cell outside layer. + // See relativeSizes parameter. + finalLayerThickness 0.5; + + // Minimum thickness of cell layer. If for any reason layer + // cannot be above minThickness do not add layer. + // Relative to undistorted size of cell outside layer. + // See relativeSizes parameter. + minThickness 0.05; + + // If points get not extruded do nGrow layers of connected faces that are + // also not grown. This helps convergence of the layer addition process + // close to features. + // Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x) + nGrow 0; + + + // Advanced settings + + // When not to extrude surface. 0 is flat surface, 90 is when two faces + // are perpendicular + featureAngle 60; + + // Maximum number of snapping relaxation iterations. Should stop + // before upon reaching a correct mesh. + nRelaxIter 5; + + // Stop layer growth on highly warped cells + maxFaceThicknessRatio 0.5; + + // Smooth layer thickness over surface patches + nSmoothThickness 10; + + + + //- Use displacementMotionSolver to shrink mesh + meshShrinker displacementMotionSolver; + + //- Use laplacian for shrinking + solver displacementLaplacian; + + displacementLaplacianCoeffs + { + diffusivity quadratic inverseDistance ("two.*" igloo); + } + + + // Create buffer region for new layer terminations + 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; +} + + + +// Generic mesh quality settings. At any undoable phase these determine +// where to undo. +meshQualityControls +{ + #include "meshQualityDict" + + // Advanced + + //- Number of error distribution iterations + nSmoothScale 4; + //- Amount to scale back displacement at error points + errorReduction 0.75; +} + + +// Advanced + +// Merge tolerance. Is fraction of overall bounding box of initial mesh. +// Note: the write tolerance needs to be higher than this. +mergeTolerance 1e-6; + +writeFlags (scalarLevels); + +// ************************************************************************* //