From c03c6bdea27e478c5ac6ee441bd60ca772ad3a54 Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Thu, 20 Dec 2018 09:05:02 +0000 Subject: [PATCH] TUT: Corrections --- .../transient/system/decomposeParDict | 4 +- .../boatAndPropeller/0.orig/U | 1 + .../boatAndPropeller/0.orig/p_rgh | 7 +- .../boatAndPropeller/Allrun.pre | 20 ++---- .../boatAndPropeller/constant/dynamicMeshDict | 53 ++++++++------- .../boatAndPropeller/constant/g | 2 +- .../constant/turbulenceProperties | 10 ++- .../boatAndPropeller/system/blockMeshDict | 67 ++++++++++--------- .../boatAndPropeller/system/controlDict | 16 ++++- .../boatAndPropeller/system/fvSchemes | 6 +- .../boatAndPropeller/system/fvSolution | 4 +- .../boatAndPropeller/system/topoSetDictHull | 2 +- .../system/topoSetDictPropeller | 2 +- .../boatAndPropeller/system/topoSetDictRefine | 2 +- .../boatAndPropeller/system/topoSetDictRudder | 2 +- 15 files changed, 106 insertions(+), 92 deletions(-) diff --git a/tutorials/incompressible/pimpleFoam/LES/periodicHill/transient/system/decomposeParDict b/tutorials/incompressible/pimpleFoam/LES/periodicHill/transient/system/decomposeParDict index d4e6e0822a3..c52a1417394 100644 --- a/tutorials/incompressible/pimpleFoam/LES/periodicHill/transient/system/decomposeParDict +++ b/tutorials/incompressible/pimpleFoam/LES/periodicHill/transient/system/decomposeParDict @@ -15,13 +15,13 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -numberOfSubdomains 8; +numberOfSubdomains 16; method simple; simpleCoeffs { - n (2 2 2); + n (4 2 2); } diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/0.orig/U b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/0.orig/U index 2395abab0db..7807ee99b2b 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/0.orig/U +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/0.orig/U @@ -45,6 +45,7 @@ boundaryField "overset.*" { type overset; + patchType overset; value uniform (0 0 0); } } diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/0.orig/p_rgh b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/0.orig/p_rgh index 21aa33fb2ae..be9bb544e38 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/0.orig/p_rgh +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/0.orig/p_rgh @@ -42,12 +42,7 @@ boundaryField { type fixedFluxPressure; } -// -// right1 -// { -// type fixedValue; //calculated; -// value $internalField; -// } + "overset.*" { diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allrun.pre b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allrun.pre index f74b4f341c4..5190fe6b9c2 100755 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allrun.pre +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allrun.pre @@ -12,12 +12,6 @@ runApplication -s 1 refineMesh -overwrite -dict system/refineMeshDict.2 runApplication -s 2 topoSet -dict system/topoSetDictRefine 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 @@ -25,16 +19,16 @@ 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 -runApplication -s 3 subsetMesh keepBox -patch hullWall -overwrite +runApplication -s hull topoSet -dict system/topoSetDictHull +runApplication -s hull subsetMesh keepBox -patch hullWall -overwrite # Select cellSets -runApplication -s 4 topoSet -dict system/topoSetDictPropeller -runApplication -s 4 subsetMesh keepBox -patch propellerWall -overwrite +runApplication -s propeller topoSet -dict system/topoSetDictPropeller +runApplication -s propeller subsetMesh keepBox -patch propellerWall -overwrite # Select cellSets -runApplication -s 5 topoSet -dict system/topoSetDictRudder -runApplication -s 5 subsetMesh keepBox -patch rudderWall -overwrite +runApplication -s rudder topoSet -dict system/topoSetDictRudder +runApplication -s rudder subsetMesh keepBox -patch rudderWall -overwrite restore0Dir @@ -42,6 +36,6 @@ restore0Dir runApplication -s 1 setFields -dict system/setFieldsDict runApplication -s 2 setFields -dict system/setFieldsDictWaterLevel -touch rbm.foam +touch boatAndPropeller.foam #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/constant/dynamicMeshDict b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/constant/dynamicMeshDict index c0055b92a0c..512d36ad45a 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/constant/dynamicMeshDict +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/constant/dynamicMeshDict @@ -32,10 +32,10 @@ motionSolver rigidBodyMotion; //beta 0.1; // Position integration coefficient } - accelerationRelaxation 0.9; + accelerationRelaxation 0.4; //- prescribedRotation requires some sub-iterations to converge faster - // to desired value. + // to desired value of omega. nIter 3; bodies @@ -45,28 +45,32 @@ motionSolver rigidBodyMotion; type rigidBody; parent root; - // Cuboid mass -- very simple setup. For more complicated shapes - // see utility surfaceInertia - mass 9; - rho 1; - inertia (0.05 0 0 0.05 0 0.05); - centreOfMass (0.21 -0.07 0); // relative to the centreOfMass + // To get Tensor of Inertia (symmetrical) use surfaceInertia + // here hull is empty shell + + mass 0.552; + inertia (0.0033 0 0 0.01 0 0.0095); + centreOfMass (0.2857 -0.07 0); // relative to the centreOfMass // of parent body // (here root = global coord system) - // Transformation tensor and centre of rotation - transform (1 0 0 0 1 0 0 0 1) (0.21 0 0); + // Transformation tensor and centre of rotation (CoR) + transform (1 0 0 0 1 0 0 0 1) (0.2857 -0.07 0); joint { + // These constrains are applied only to body hull, + // other bodies need to have their own set + // Constraints used for faster run + type composite; joints ( { - type Pxyz; // Allow movement in any direction + type Px; // Allow translation in X - } { - type Rxyz; // Allow rotation along any axis + type Ry; // Allow rotation along Y axis // (local - body CS) } ); @@ -84,11 +88,11 @@ motionSolver rigidBodyMotion; type rigidBody; parent hull; - centreOfMass (-0.228 0.0 0); - mass 1; - rho 1; - inertia (0.001 0 0 0.001 0 0.001); - transform (1 0 0 0 1 0 0 0 1) (-0.228 0 0); + centreOfMass (-0.2847 0.03 0); // Relative to parent CoM + mass 0.0288; + inertia (7.6e-6 0 0 4.2e-6 0 4.2e-6); + // transform and CoR - relative to parent CoR + transform (1 0 0 0 1 0 0 0 1) (-0.2757 0.03 0); patches (propellerWall); innerDistance 100; outerDistance 200; @@ -101,12 +105,12 @@ motionSolver rigidBodyMotion; rudder { type rigidBody; - parent hull;//root; - centreOfMass (-0.265 0 0); - mass 1; - rho 1; - inertia (0.001 0 0 0.001 0 0.001); - transform (1 0 0 0 1 0 0 0 1) (-0.265 0 0); + parent hull; + centreOfMass (-0.3602 -0.0055 0); + mass 0.0746; + inertia (3.3e-5 0 0 4.7e-6 0 3.4e-5); + // transform and CoR - relative to parent CoR + transform (1 0 0 0 1 0 0 0 1) (-0.3487 -0.04 0); patches (rudderWall); innerDistance 100; outerDistance 200; @@ -114,11 +118,12 @@ motionSolver rigidBodyMotion; { type Ry; } - } + } //end rudder } restraints { + rudderRotation { type prescribedRotation; diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/constant/g b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/constant/g index cef9f0e7e12..d94e996a4e6 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/constant/g +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/constant/g @@ -15,6 +15,6 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -2 0 0 0 0]; -value (0 -9 0);//( 0 -9.81 0 ); +value (0 -9.81 0);//( 0 -9.81 0 ); // ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/constant/turbulenceProperties b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/constant/turbulenceProperties index 58d6084c081..63090899bfa 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/constant/turbulenceProperties +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/constant/turbulenceProperties @@ -14,6 +14,14 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType laminar; +simulationType RAS; +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} // ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/blockMeshDict b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/blockMeshDict index c5556f0a063..05b12fbed57 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/blockMeshDict +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/blockMeshDict @@ -19,49 +19,50 @@ scale 1; vertices ( // backgroundMesh - ( -1.00 -1 -1) // 0 - ( 1.00 -1 -1) - ( 1.00 1.0 -1) - ( -1.00 1.0 -1) - ( -1.00 -1 1) // 4 - ( 1.00 -1 1) - ( 1.00 1.0 1) - ( -1.00 1.0 1) + ( -0.50 -0.5 -0.7) // 0 + ( 1.00 -0.5 -0.7) + ( 1.00 0.5 -0.7) + ( -0.50 0.5 -0.7) + ( -0.50 -0.5 0.7) // 4 + ( 1.00 -0.5 0.7) + ( 1.00 0.5 0.7) + ( -0.50 0.5 0.7) // hullBox - ( 0.04 -0.20 -0.2) // 8 - ( 0.80 -0.20 -0.2) - ( 0.80 0.20 -0.2) // 10 - ( 0.04 0.20 -0.2) - ( 0.04 -0.20 0.2) // 12 - ( 0.80 -0.20 0.2) - ( 0.80 0.20 0.2) // 14 - ( 0.04 0.20 0.2) + ( 0.045 -0.14 -0.15) // 8 + ( 0.60 -0.14 -0.15) + ( 0.60 0.10 -0.15) // 10 + ( 0.045 0.10 -0.15) + ( 0.045 -0.14 0.15) // 12 + ( 0.60 -0.14 0.15) + ( 0.60 0.10 0.15) // 14 + ( 0.045 0.10 0.15) // propeller - ( -0.03 -0.08 -0.08) // 16 - ( 0.04 -0.08 -0.08) - ( 0.04 0.08 -0.08) // 18 - ( -0.03 0.08 -0.08) - ( -0.03 -0.08 0.08) // 20 - ( 0.04 -0.08 0.08) - ( 0.04 0.08 0.08) // 22 - ( -0.03 0.08 0.08) + ( -0.02 -0.08 -0.04) // 16 + ( 0.04 -0.08 -0.04) + ( 0.04 0.00 -0.04) // 18 + ( -0.02 0.00 -0.04) + ( -0.02 -0.08 0.04) // 20 + ( 0.04 -0.08 0.04) + ( 0.04 0.00 0.04) // 22 + ( -0.02 0.00 0.04) // rudder - ( -0.15 -0.1 -0.05) // 24 - ( -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.04 -0.1 0.05) - ( -0.04 0.1 0.05) // 30 - ( -0.15 0.1 0.05) + ( -0.10 -0.14 -0.02) // 24 + ( -0.04 -0.14 -0.02) + ( -0.04 -0.02 -0.02) // 26 + ( -0.10 -0.02 -0.02) + ( -0.10 -0.14 0.02) // 28 + ( -0.04 -0.14 0.02) + ( -0.04 -0.02 0.02) // 30 + ( -0.10 -0.02 0.02) ); blocks ( - hex (0 1 2 3 4 5 6 7) background (80 80 80) simpleGrading (1 1 1) + // hex (0 1 2 3 4 5 6 7) background (60 40 56) simpleGrading (1 1 1) // coarser mesh cell size 0.025 m + hex (0 1 2 3 4 5 6 7) background (75 50 70) simpleGrading (1 1 1) // cell size 0.02 m hex (8 9 10 11 12 13 14 15) hullBox (32 16 16) simpleGrading (1 1 1) diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/controlDict b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/controlDict index 7d4d6fce329..fbcedc6ca19 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/controlDict +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/controlDict @@ -19,13 +19,13 @@ libs ("liboverset.so" "librigidBodyDynamics.so"); application overInterDyMFoam; -startFrom latestTime; +startFrom startTime; startTime 0; stopAt endTime; -endTime 5; +endTime 1.5; deltaT 0.001; @@ -49,10 +49,20 @@ runTimeModifiable true; adjustTimeStep yes; -//maxCo 1; + maxCo 4.0; maxAlphaCo 5.0; maxDeltaT 1; +functions +{ + + minMax + { + type fieldMinMax; + libs ("libfieldFunctionObjects.so"); + fields (U); + } +} // ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/fvSchemes b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/fvSchemes index e373253e57e..700574796af 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/fvSchemes +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/fvSchemes @@ -39,7 +39,7 @@ divSchemes laplacianSchemes { - default Gauss linear uncorrected; + default Gauss linear uncorrected;//uncorrected; } interpolationSchemes @@ -49,12 +49,12 @@ interpolationSchemes snGradSchemes { - default uncorrected; + default uncorrected;//uncorrected; } oversetInterpolation { - method inverseDistance;//cellVolumeWeight; + method inverseDistance; } oversetInterpolationSuppressed diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/fvSolution b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/fvSolution index 91f8b02c11f..14f9da800ca 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/fvSolution +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/fvSolution @@ -83,7 +83,7 @@ solvers PIMPLE { - momentumPredictor yes; + momentumPredictor no; nOuterCorrectors 2; nCorrectors 2; nNonOrthogonalCorrectors 0; @@ -93,7 +93,7 @@ PIMPLE massFluxInterpolation no; moveMeshOuterCorrectors no; - turbOnFinalIterOnly no; + turbOnFinalIterOnly yes; oversetAdjustPhi no; diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictHull b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictHull index 4d2bdcd22cc..6f3cd98ae35 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictHull +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictHull @@ -60,7 +60,7 @@ actions source boxToCell; boxes ( - (0.07 -0.082 -0.1)(0.52 0.052 0.1) //hullBox + (0.12 -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 7bac9d34ab4..43bef8a105c 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictPropeller +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictPropeller @@ -61,7 +61,7 @@ actions source boxToCell; boxes ( - (-0.0 -0.0499 -0.0499)( 0.02 0.0499 0.0499) //propeller + (0.005 -0.061 -0.0199)( 0.018 -0.0199 0.0199) //propeller ); } diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine index c1ea242c236..9c19f88870c 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRefine @@ -30,7 +30,7 @@ actions source boxToCell; boxes ( - (-0.2 -0.2 -0.2)(0.05 0.2 0.2) //hullBox + (-0.2 -0.2 -0.2)(0.04 0.2 0.2) //hullBox ); } ); diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRudder b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRudder index 96463e8711f..b8e52dcfb1e 100644 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRudder +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/system/topoSetDictRudder @@ -61,7 +61,7 @@ actions source boxToCell; boxes ( - (-0.12 -0.0749 -0.00499)(-0.070 0.0749 0.00499) //rudder + (-0.09 -0.12 -0.00499)(-0.059 -0.03 0.00499) //rudder ); } -- GitLab