From 68e6cd79d797bfd33b1ce07ea18be5b3f196caaa Mon Sep 17 00:00:00 2001 From: sergio Date: Fri, 14 Dec 2018 16:39:40 -0800 Subject: [PATCH] ENH: Setting up boatPropeller tutorial --- .../boatAndPropeller/Allrun.pre | 16 +++++++- .../boatAndPropeller/constant/dynamicMeshDict | 6 +-- .../boatAndPropeller/system/blockMeshDict | 22 +++++------ .../boatAndPropeller/system/controlDict | 10 ++--- .../boatAndPropeller/system/decomposeParDict | 4 +- .../boatAndPropeller/system/fvSchemes | 13 ++++--- .../boatAndPropeller/system/fvSolution | 4 +- .../boatAndPropeller/system/refineMeshDict.2 | 37 ++++++++++++++++++ .../boatAndPropeller/system/topoSetDictHull | 2 +- .../system/topoSetDictPropeller | 2 +- .../boatAndPropeller/system/topoSetDictRefine | 11 +++++- .../system/topoSetDictRefine.2 | 38 +++++++++++++++++++ .../system/topoSetDictRefine.3 | 38 +++++++++++++++++++ .../system/topoSetDictRefine.4 | 38 +++++++++++++++++++ .../boatAndPropeller/system/topoSetDictRudder | 2 +- 15 files changed, 207 insertions(+), 36 deletions(-) create mode 100644 tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/refineMeshDict.2 create mode 100644 tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine.2 create mode 100644 tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine.3 create mode 100644 tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine.4 diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allrun.pre b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allrun.pre index 2ee78f494a..f74b4f341c 100755 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allrun.pre +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allrun.pre @@ -7,10 +7,22 @@ runApplication blockMesh #runApplication -s 1 topoSet -dict system/topoSetDictRefine #runApplication -s 1 refineMesh -overwrite -dict system/refineMeshDict runApplication -s 1 topoSet -dict system/topoSetDictRefine -runApplication -s 1 refineMesh -overwrite -dict system/refineMeshDict +runApplication -s 1 refineMesh -overwrite -dict system/refineMeshDict.2 runApplication -s 2 topoSet -dict system/topoSetDictRefine -runApplication -s 2 refineMesh -overwrite -dict system/refineMeshDict +runApplication -s 2 refineMesh -overwrite -dict system/refineMeshDict.2 + +runApplication -s 0 topoSet -dict system/topoSetDictRefine.2 +runApplication -s 0 refineMesh -overwrite -dict system/refineMeshDict.2 + +runApplication -s 6 topoSet -dict system/topoSetDictRefine.2 +runApplication -s 6 refineMesh -overwrite -dict system/refineMeshDict.2 + +runApplication -s 7 topoSet -dict system/topoSetDictRefine.3 +runApplication -s 7 refineMesh -overwrite -dict system/refineMeshDict.2 + +runApplication -s 8 topoSet -dict system/topoSetDictRefine.4 +runApplication -s 8 refineMesh -overwrite -dict system/refineMeshDict.2 # Select cellSets runApplication -s 3 topoSet -dict system/topoSetDictHull diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/constant/dynamicMeshDict b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/constant/dynamicMeshDict index bcc1748cdd..c0055b92a0 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/constant/dynamicMeshDict +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/constant/dynamicMeshDict @@ -28,11 +28,11 @@ motionSolver rigidBodyMotion; solver { type Newmark; - gamma 0.1; // Velocity integration coefficient - beta 0.1; // Position integration coefficient + //gamma 0.1; // Velocity integration coefficient + //beta 0.1; // Position integration coefficient } - accelerationRelaxation 1.0; + accelerationRelaxation 0.9; //- prescribedRotation requires some sub-iterations to converge faster // to desired value. diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/blockMeshDict b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/blockMeshDict index fb4c66bd84..e92512dbda 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/blockMeshDict +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/blockMeshDict @@ -29,14 +29,14 @@ vertices ( -1.00 1.0 1) // hullBox - ( 0.0 -0.20 -0.2) // 8 + ( -0.03 -0.20 -0.2) // 8 ( 0.80 -0.20 -0.2) ( 0.80 0.20 -0.2) // 10 - ( 0.0 0.20 -0.2) - ( 0.0 -0.20 0.2) // 12 + ( -0.03 0.20 -0.2) + ( -0.03 -0.20 0.2) // 12 ( 0.80 -0.20 0.2) ( 0.80 0.20 0.2) // 14 - ( 0.0 0.20 0.2) + ( -0.03 0.20 0.2) // propeller ( -0.03 -0.08 -0.08) // 16 @@ -50,24 +50,24 @@ vertices // rudder ( -0.15 -0.1 -0.05) // 24 - ( -0.028 -0.1 -0.05) - ( -0.028 0.1 -0.05) // 26 + ( -0.04 -0.1 -0.05) + ( -0.04 0.1 -0.05) // 26 ( -0.15 0.1 -0.05) ( -0.15 -0.1 0.05) // 28 - ( -0.028 -0.1 0.05) - ( -0.028 0.1 0.05) // 30 + ( -0.04 -0.1 0.05) + ( -0.04 0.1 0.05) // 30 ( -0.15 0.1 0.05) ); blocks ( - hex (0 1 2 3 4 5 6 7) background (80 80 40) simpleGrading (1 1 1) + hex (0 1 2 3 4 5 6 7) background (80 80 80) simpleGrading (1 1 1) - hex (8 9 10 11 12 13 14 15) hullBox (20 20 20) simpleGrading (1 1 1) + hex (8 9 10 11 12 13 14 15) hullBox (32 16 16) simpleGrading (1 1 1) hex (16 17 18 19 20 21 22 23) propeller (10 20 20) simpleGrading (1 1 1) - hex (24 25 26 27 28 29 30 31) rudder (20 20 20) simpleGrading (1 1 1) + hex (24 25 26 27 28 29 30 31) rudder (20 22 11) simpleGrading (1 1 1) ); edges diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/controlDict b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/controlDict index fd188acbb5..d8d31ea468 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/controlDict +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/controlDict @@ -19,19 +19,19 @@ libs ("liboverset.so" "librigidBodyDynamics.so"); application overInterDyMFoam; -startFrom startTime; +startFrom latestTime; startTime 0; stopAt endTime; -endTime 0.5; +endTime 1; -deltaT 0.0001; +deltaT 0.001; writeControl adjustableRunTime; -writeInterval 0.005; +writeInterval 0.1; purgeWrite 0; @@ -50,7 +50,7 @@ runTimeModifiable true; adjustTimeStep yes; //maxCo 1; -maxCo 5.0; +maxCo 2.0; maxAlphaCo 5.0; maxDeltaT 1; diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/decomposeParDict b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/decomposeParDict index 9b4e631654..e55adaaea9 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/decomposeParDict +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/decomposeParDict @@ -15,14 +15,14 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -numberOfSubdomains 4; +numberOfSubdomains 8; method hierarchical; coeffs { - n (2 2 1); + n (2 2 2); // delta 0.001; // order xyz; } diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/fvSchemes b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/fvSchemes index 2edf2c400e..e373253e57 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/fvSchemes +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/fvSchemes @@ -27,7 +27,7 @@ gradSchemes divSchemes { div(rhoPhi,U) Gauss upwind ;//limitedLinearV 1; - div(U) Gauss upwind;//linear; + div(U) Gauss linear; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss linear; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; @@ -39,7 +39,7 @@ divSchemes laplacianSchemes { - default Gauss linear corrected; + default Gauss linear uncorrected; } interpolationSchemes @@ -49,17 +49,18 @@ interpolationSchemes snGradSchemes { - default corrected; + default uncorrected; } oversetInterpolation { - method inverseDistance; + method inverseDistance;//cellVolumeWeight; } -oversetInterpolationRequired +oversetInterpolationSuppressed { - alpha.water; + grad(p_rgh); + surfaceIntegrate(phiHbyA); } fluxRequired diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/fvSolution b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/fvSolution index 7115b4630f..91f8b02c11 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/fvSolution +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/fvSolution @@ -24,7 +24,7 @@ solvers tolerance 1e-06; relTol 0; - maxIter 100; + maxIter 300; } "alpha.water.*" @@ -83,7 +83,7 @@ solvers PIMPLE { - momentumPredictor no;//yes; + momentumPredictor yes; nOuterCorrectors 2; nCorrectors 2; nNonOrthogonalCorrectors 0; diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/refineMeshDict.2 b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/refineMeshDict.2 new file mode 100644 index 0000000000..c4a3ee3b1a --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/refineMeshDict.2 @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object refineMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +set refineSet; + +coordinateSystem global; + +globalCoeffs +{ + tan1 (1 0 0); + tan2 (0 1 0); +} + +directions ( tan1 tan2 normal); + +useHexTopology no; + +geometricCut yes; + +writeMesh no; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictHull b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictHull index 692065dfd8..3f991676c9 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictHull +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictHull @@ -60,7 +60,7 @@ actions source boxToCell; boxes ( - (0.05 -0.082 -0.1)(0.52 0.052 0.1) //hullBox + (0.06 -0.082 -0.1)(0.52 0.052 0.1) //hullBox ); } diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictPropeller b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictPropeller index 7121b53baa..7bac9d34ab 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictPropeller +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictPropeller @@ -61,7 +61,7 @@ actions source boxToCell; boxes ( - (-0.0199 -0.0499 -0.0499)( -0.00998 0.0499 0.0499) //propeller + (-0.0 -0.0499 -0.0499)( 0.02 0.0499 0.0499) //propeller ); } diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine index 0a7d6aea76..c1ea242c23 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine @@ -17,13 +17,20 @@ FoamFile actions ( { - name refineSet; + name refineSet; // all around bgr type cellSet; action new; + source zoneToCell; + zone background; + } + { + name refineSet; + type cellSet; + action subset; source boxToCell; boxes ( - (-0.2 -0.2 -0.2)(0.0 0.2 0.2) //hullBox + (-0.2 -0.2 -0.2)(0.05 0.2 0.2) //hullBox ); } ); diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine.2 b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine.2 new file mode 100644 index 0000000000..299a31f0de --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine.2 @@ -0,0 +1,38 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name refineSet; // all around hullBox + type cellSet; + action new; + source zoneToCell; + zone hullBox; + } + { + name refineSet; + type cellSet; + action subset; + source boxToCell; + boxes + ( + (0 -0.2 -0.2)(0.04 0.2 0.2) + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine.3 b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine.3 new file mode 100644 index 0000000000..d043fe74cd --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine.3 @@ -0,0 +1,38 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name refineSet; // all around hullBox + type cellSet; + action new; + source zoneToCell; + zone hullBox; + } + { + name refineSet; + type cellSet; + action subset; + source boxToCell; + boxes + ( + (0.05 -0.2 -0.2)(0.8 0.2 0.2) + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine.4 b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine.4 new file mode 100644 index 0000000000..92591d4d0e --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine.4 @@ -0,0 +1,38 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name refineSet; // background around hullBox + type cellSet; + action new; + source zoneToCell; + zone background; + } + { + name refineSet; + type cellSet; + action subset; + source boxToCell; + boxes + ( + (0.05 -0.2 -0.2)(0.8 0.2 0.2) + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRudder b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRudder index c88acea18c..96463e8711 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRudder +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRudder @@ -61,7 +61,7 @@ actions source boxToCell; boxes ( - (-0.10 -0.0749 -0.00499)(-0.050 0.0749 0.00499) //rudder + (-0.12 -0.0749 -0.00499)(-0.070 0.0749 0.00499) //rudder ); }