diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C index aea12f5987478d915a152099084af7789fbac690..f15503f0a231a758742d74df4fd3fa9272abb64e 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C @@ -742,16 +742,21 @@ labelList dynamicRefineFvMesh::selectRefineCells } } - Info<< "Selected " << returnReduce(candidates.size(), sumOp<label>()) + // Guarantee 2:1 refinement after refinement + labelList consistentSet + ( + meshCutter_.consistentRefinement + ( + candidates.shrink(), + true // Add to set to guarantee 2:1 + ) + ); + + Info<< "Selected " << returnReduce(consistentSet.size(), sumOp<label>()) << " cells for refinement out of " << globalData().nTotalCells() << "." << endl; - // Guarantee 2:1 refinement across processor patches. - return meshCutter_.consistentRefinement - ( - candidates.shrink(), - true // Add to set to guarantee 2:1 - ); + return consistentSet; } @@ -795,18 +800,23 @@ labelList dynamicRefineFvMesh::selectUnrefinePoints } - Info<< "Selected " << returnReduce(newSplitPoints.size(), sumOp<label>()) - << " split points out of a possible " - << returnReduce(splitPoints.size(), sumOp<label>()) - << "." << endl; - newSplitPoints.shrink(); - return meshCutter_.consistentUnrefinement + // Guarantee 2:1 refinement after unrefinement + labelList consistentSet ( - newSplitPoints, - false + meshCutter_.consistentUnrefinement + ( + newSplitPoints, + false + ) ); + Info<< "Selected " << returnReduce(consistentSet.size(), sumOp<label>()) + << " split points out of a possible " + << returnReduce(splitPoints.size(), sumOp<label>()) + << "." << endl; + + return consistentSet; } diff --git a/tutorials/interDyMFoam/damBreakWithObstacle/0/U b/tutorials/interDyMFoam/damBreakWithObstacle/0/U index dcfa645e62ef50da0e8aa3008603f078b1323dbd..ee7d7034b300da44f68d5edeef43adbc4b4aec76 100644 --- a/tutorials/interDyMFoam/damBreakWithObstacle/0/U +++ b/tutorials/interDyMFoam/damBreakWithObstacle/0/U @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.4.2 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: http://www.openfoam.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/interDyMFoam/damBreakWithObstacle/0/gamma b/tutorials/interDyMFoam/damBreakWithObstacle/0/gamma index 0836ad8cb18e990a636a2f314f90de2c869a7867..6c15d6e3d52c9d549cd5276a1cc35758f43c4539 100644 --- a/tutorials/interDyMFoam/damBreakWithObstacle/0/gamma +++ b/tutorials/interDyMFoam/damBreakWithObstacle/0/gamma @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.4.2 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: http://www.openfoam.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -18,7 +18,7 @@ FoamFile dimensions [0 0 0 0 0 0 0]; internalField nonuniform List<scalar> -32256 +32768 ( 1 1 @@ -980,6 +980,70 @@ internalField nonuniform List<scalar> 0 0 0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 1 1 1 @@ -1940,6 +2004,70 @@ internalField nonuniform List<scalar> 0 0 0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 1 1 1 @@ -2900,6 +3028,70 @@ internalField nonuniform List<scalar> 0 0 0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 1 1 1 @@ -3860,6 +4052,70 @@ internalField nonuniform List<scalar> 0 0 0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 1 1 1 @@ -4820,6 +5076,70 @@ internalField nonuniform List<scalar> 0 0 0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 1 1 1 @@ -5780,6 +6100,70 @@ internalField nonuniform List<scalar> 0 0 0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 1 1 1 @@ -6740,6 +7124,70 @@ internalField nonuniform List<scalar> 0 0 0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 1 1 1 @@ -7700,6 +8148,70 @@ internalField nonuniform List<scalar> 0 0 0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 1 1 1 diff --git a/tutorials/interDyMFoam/damBreakWithObstacle/0/gamma.org b/tutorials/interDyMFoam/damBreakWithObstacle/0/gamma.org index d464dc7f1eef78ec5c25db43d5fb93bf8f5da81e..eb2019aa850a3a7fcbef6e5bd76da7ab92117edd 100644 --- a/tutorials/interDyMFoam/damBreakWithObstacle/0/gamma.org +++ b/tutorials/interDyMFoam/damBreakWithObstacle/0/gamma.org @@ -1,36 +1,50 @@ -/*--------------------------------*- C++ -*----------------------------------*\ +/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.4.2 | +| \\ / O peration | Version: 1.4 | | \\ / A nd | Web: http://www.openfoam.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ + FoamFile { - version 2.0; - format ascii; - class volScalarField; - object gamma.org; - location "0.001"; + version 2.0; + format ascii; + + root ""; + case ""; + instance ""; + local ""; + + class volScalarField; + object gamma; } + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { - atmosphere + walls { - type inletOutlet; - inletValue uniform 0; - value uniform 0; + type zeroGradient; } - walls + + obstacle { type zeroGradient; } + + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } } diff --git a/tutorials/interDyMFoam/damBreakWithObstacle/0/pd b/tutorials/interDyMFoam/damBreakWithObstacle/0/pd index cbdcfe68426b10bbe790e85dfa82c5dc57a512bb..dd2a141b7426977f46f4865835664f3726a1893c 100644 --- a/tutorials/interDyMFoam/damBreakWithObstacle/0/pd +++ b/tutorials/interDyMFoam/damBreakWithObstacle/0/pd @@ -1,41 +1,55 @@ -/*--------------------------------*- C++ -*----------------------------------*\ +/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.4.2 | +| \\ / O peration | Version: 1.4 | | \\ / A nd | Web: http://www.openfoam.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ + FoamFile { - version 2.0; - format ascii; - class volScalarField; - object pd; - location "0.001"; + version 2.0; + format ascii; + + root ""; + case ""; + instance ""; + local ""; + + class volScalarField; + object pd; } + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0; boundaryField { - atmosphere + walls + { + type zeroGradient; + } + + obstacle + { + type zeroGradient; + } + + atmosphere { type totalPressure; + p0 uniform 0; U U; phi phi; rho none; psi none; gamma 1; - p0 uniform 0; value uniform 0; } - walls - { - type zeroGradient; - } } diff --git a/tutorials/interDyMFoam/damBreakWithObstacle/pRefProbe/0.162094/pd b/tutorials/interDyMFoam/damBreakWithObstacle/pRefProbe/0.162094/pd deleted file mode 100644 index a152eccd3b2a9bcd18fcef59b93f98b8a197cd2b..0000000000000000000000000000000000000000 --- a/tutorials/interDyMFoam/damBreakWithObstacle/pRefProbe/0.162094/pd +++ /dev/null @@ -1 +0,0 @@ -# Time (0.51 0.51 0.51) diff --git a/tutorials/interDyMFoam/damBreakWithObstacle/pRefProbe/0.215403/pd b/tutorials/interDyMFoam/damBreakWithObstacle/pRefProbe/0.215403/pd deleted file mode 100644 index a152eccd3b2a9bcd18fcef59b93f98b8a197cd2b..0000000000000000000000000000000000000000 --- a/tutorials/interDyMFoam/damBreakWithObstacle/pRefProbe/0.215403/pd +++ /dev/null @@ -1 +0,0 @@ -# Time (0.51 0.51 0.51) diff --git a/tutorials/interDyMFoam/damBreakWithObstacle/pRefProbe/0/pd b/tutorials/interDyMFoam/damBreakWithObstacle/pRefProbe/0/pd deleted file mode 100644 index a152eccd3b2a9bcd18fcef59b93f98b8a197cd2b..0000000000000000000000000000000000000000 --- a/tutorials/interDyMFoam/damBreakWithObstacle/pRefProbe/0/pd +++ /dev/null @@ -1 +0,0 @@ -# Time (0.51 0.51 0.51) diff --git a/tutorials/interDyMFoam/damBreakWithObstacle/system/controlDict b/tutorials/interDyMFoam/damBreakWithObstacle/system/controlDict index e1313279fd06ada2dc4e74653240c75f6369b65e..7e5d9001346942946746b62edb98d15a538d3fdd 100644 --- a/tutorials/interDyMFoam/damBreakWithObstacle/system/controlDict +++ b/tutorials/interDyMFoam/damBreakWithObstacle/system/controlDict @@ -54,7 +54,7 @@ runTimeModifiable yes; adjustTimeStep yes; -maxCo 0.5; +maxCo 0.1; maxDeltaT 1; diff --git a/tutorials/interDyMFoam/damBreakWithObstacle/system/decomposeParDict b/tutorials/interDyMFoam/damBreakWithObstacle/system/decomposeParDict index 88569a8784a662dafabbb241f24831ae9ff34028..3843cd93db7e98b70d08b1e20e096a0d4f993cbf 100644 --- a/tutorials/interDyMFoam/damBreakWithObstacle/system/decomposeParDict +++ b/tutorials/interDyMFoam/damBreakWithObstacle/system/decomposeParDict @@ -23,10 +23,10 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -numberOfSubdomains 4; +numberOfSubdomains 6; -//method metis; -method hierarchical; +method metis; +//method hierarchical; simpleCoeffs {