From 95fe43b079abd32463dd63f1bccedb466786d989 Mon Sep 17 00:00:00 2001 From: sergio <s.ferraris@opencfd.co.uk> Date: Mon, 23 Aug 2021 19:31:22 -0700 Subject: [PATCH] TUT: Add and update overset tutorials --- .../constant/turbulenceProperties | 2 +- .../system/controlDict | 18 --- .../system/fvSolution | 1 - .../twoSquaresOutDomain/0.orig/U | 55 +++++++ .../twoSquaresOutDomain/0.orig/alpha.water | 36 +++++ .../twoSquaresOutDomain/0.orig/epsilon | 37 +++++ .../twoSquaresOutDomain/0.orig/k | 37 +++++ .../twoSquaresOutDomain/0.orig/nut | 37 +++++ .../twoSquaresOutDomain/0.orig/p | 37 +++++ .../twoSquaresOutDomain/0.orig/p_rgh | 36 +++++ .../0.orig/pointDisplacement | 41 +++++ .../twoSquaresOutDomain/0.orig/zoneID | 36 +++++ .../twoSquaresOutDomain/Allclean | 10 ++ .../twoSquaresOutDomain/Allrun | 18 +++ .../twoSquaresOutDomain/Allrun.pre | 21 +++ .../constant/dynamicMeshDict | 86 ++++++++++ .../twoSquaresOutDomain/constant/fvOptions | 25 +++ .../twoSquaresOutDomain/constant/g | 20 +++ .../constant/transportProperties | 35 +++++ .../constant/turbulenceProperties | 31 ++++ .../twoSquaresOutDomain/system/blockMeshDict | 148 ++++++++++++++++++ .../twoSquaresOutDomain/system/controlDict | 116 ++++++++++++++ .../system/decomposeParDict | 26 +++ .../twoSquaresOutDomain/system/fvSchemes | 82 ++++++++++ .../twoSquaresOutDomain/system/fvSolution | 115 ++++++++++++++ .../twoSquaresOutDomain/system/setFieldsDict | 67 ++++++++ .../twoSquaresOutDomain/system/topoSetDict | 94 +++++++++++ .../twoSimpleRotors/system/controlDict | 20 +-- .../twoSimpleRotors/system/fvSolution | 8 +- 29 files changed, 1251 insertions(+), 44 deletions(-) create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/U create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/alpha.water create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/epsilon create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/k create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/nut create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/p create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/p_rgh create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/pointDisplacement create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/zoneID create mode 100755 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/Allclean create mode 100755 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/Allrun create mode 100755 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/Allrun.pre create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/dynamicMeshDict create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/fvOptions create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/g create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/transportProperties create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/turbulenceProperties create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/blockMeshDict create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/controlDict create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/decomposeParDict create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/fvSchemes create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/fvSolution create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/setFieldsDict create mode 100644 tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/topoSetDict diff --git a/tutorials/multiphase/overCompressibleInterDyMFoam/compressibleTwoSimpleRotors/constant/turbulenceProperties b/tutorials/multiphase/overCompressibleInterDyMFoam/compressibleTwoSimpleRotors/constant/turbulenceProperties index b44888cadc7..65fea2ab8d6 100644 --- a/tutorials/multiphase/overCompressibleInterDyMFoam/compressibleTwoSimpleRotors/constant/turbulenceProperties +++ b/tutorials/multiphase/overCompressibleInterDyMFoam/compressibleTwoSimpleRotors/constant/turbulenceProperties @@ -15,7 +15,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // simulationType RAS; - +density variable; RAS { RASModel kEpsilon; diff --git a/tutorials/multiphase/overCompressibleInterDyMFoam/compressibleTwoSimpleRotors/system/controlDict b/tutorials/multiphase/overCompressibleInterDyMFoam/compressibleTwoSimpleRotors/system/controlDict index c93fd524911..c31bf7d68ba 100644 --- a/tutorials/multiphase/overCompressibleInterDyMFoam/compressibleTwoSimpleRotors/system/controlDict +++ b/tutorials/multiphase/overCompressibleInterDyMFoam/compressibleTwoSimpleRotors/system/controlDict @@ -87,24 +87,6 @@ functions (0.0009999 0.0015 0.003) ); } - - alphaVol - { - libs (utilityFunctionObjects); - type coded; - name alphaVolume; - writeControl timeStep; - writeInterval 10; - - codeWrite - #{ - const auto& alpha = - mesh().lookupObject<volScalarField>("alpha.water"); - - Info<< "Alpha volume = " << alpha.weightedAverage(mesh().Vsc()) - << endl; - #}; - } } diff --git a/tutorials/multiphase/overCompressibleInterDyMFoam/compressibleTwoSimpleRotors/system/fvSolution b/tutorials/multiphase/overCompressibleInterDyMFoam/compressibleTwoSimpleRotors/system/fvSolution index eb9aadc206b..10534744c33 100644 --- a/tutorials/multiphase/overCompressibleInterDyMFoam/compressibleTwoSimpleRotors/system/fvSolution +++ b/tutorials/multiphase/overCompressibleInterDyMFoam/compressibleTwoSimpleRotors/system/fvSolution @@ -96,7 +96,6 @@ PIMPLE nOuterCorrectors 2; nCorrectors 3; nNonOrthogonalCorrectors 0; - ddtCorr false; } relaxationFactors diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/U b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/U new file mode 100644 index 00000000000..e63b03c08f7 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/U @@ -0,0 +1,55 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: 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" + + walls + { + type uniformFixedValue; + uniformValue (0 0 0); + } + + hole + { + type movingWallVelocity; + value uniform (0 0 0); + } + + outlet + { + type uniformFixedValue; + uniformValue (0 0 0); + } + + inlet + { + type uniformFixedValue; + uniformValue (0 0 0); + } + + overset + { + type overset; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/alpha.water b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/alpha.water new file mode 100644 index 00000000000..e3d444f61e3 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/alpha.water @@ -0,0 +1,36 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object alpha.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + "(walls|hole|inlet|outlet)" + { + type zeroGradient; + } + + overset + { + type overset; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/epsilon b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/epsilon new file mode 100644 index 00000000000..6986ac976c0 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/epsilon @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 2 -3 0 0 0 0 ]; + +internalField uniform 0.1; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + overset + { + type overset; + } + + "(walls|hole|inlet|outlet)" + { + type epsilonWallFunction; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/k b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/k new file mode 100644 index 00000000000..fbcbb648a09 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/k @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 2 -2 0 0 0 0 ]; + +internalField uniform 0.01; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + overset + { + type overset; + } + + "(walls|hole|inlet|outlet)" + { + type kqRWallFunction; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/nut b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/nut new file mode 100644 index 00000000000..dcd3a6fd79c --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/nut @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 2 -1 0 0 0 0 ]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + overset + { + type overset; + } + + "(walls|hole|inlet|outlet)" + { + type nutkWallFunction; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/p b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/p new file mode 100644 index 00000000000..65181dea321 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/p @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: 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" + + "(walls|hole|outlet|inlet)" + { + type calculated; + value $internalField; + } + + overset + { + type overset; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/p_rgh b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/p_rgh new file mode 100644 index 00000000000..4350b4fc0e5 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/p_rgh @@ -0,0 +1,36 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + oversetPatch + { + type overset; + } + + "(walls|hole|outlet|inlet)" + { + type fixedFluxPressure; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/pointDisplacement b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/pointDisplacement new file mode 100644 index 00000000000..7afb2fbb5b8 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/pointDisplacement @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class pointVectorField; + object pointDisplacement; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 0 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + ".*" + { + type uniformFixedValue; + uniformValue (0 0 0); + } + + hole + { + type zeroGradient; + } + + overset + { + patchType overset; + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/zoneID b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/zoneID new file mode 100644 index 00000000000..db2217a7d88 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/0.orig/zoneID @@ -0,0 +1,36 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object zoneID; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + overset + { + type overset; + } + + ".*" + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/Allclean b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/Allclean new file mode 100755 index 00000000000..8f13a5fccda --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/Allclean @@ -0,0 +1,10 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions +#------------------------------------------------------------------------------ + +cleanCase0 + +rm -f constant/cellInterpolationWeight + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/Allrun b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/Allrun new file mode 100755 index 00000000000..f30506755f1 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/Allrun @@ -0,0 +1,18 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +canCompile || exit 0 # Dynamic code + +./Allrun.pre + +# Serial +#runApplication $(getApplication) + +# Parallel +runApplication decomposePar -cellDist +runParallel $(getApplication) +runApplication reconstructPar + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/Allrun.pre b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/Allrun.pre new file mode 100755 index 00000000000..c0a6663fb91 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/Allrun.pre @@ -0,0 +1,21 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +runApplication blockMesh + +# Select cellSets +runApplication -s 1 topoSet + +runApplication subsetMesh box -patch hole -overwrite + +# Select cellSets +runApplication -s 2 topoSet + +restore0Dir + +# Use cellSets to write zoneID +runApplication setFields + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/dynamicMeshDict b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/dynamicMeshDict new file mode 100644 index 00000000000..cd7138ec4a9 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/dynamicMeshDict @@ -0,0 +1,86 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object dynamicMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dynamicFvMesh dynamicOversetFvMesh; + +solver multiSolidBodyMotionSolver; + +multiSolidBodyMotionSolverCoeffs +{ + movingZone1 + { + solidBodyMotionFunction multiMotion;//linearMotio; + multiMotionCoeffs + { + one + { + solidBodyMotionFunction linearMotion; + origin (0.005 0.005 0.005); + axis (0 0 1); + omega 0;//100.0; + velocity (-0.1 -0.1 0); + } + two + { + solidBodyMotionFunction rotatingMotion; + origin (0.005 0.005 0.005); + axis (0 0 1); + omega 20.0; + velocity (-0.1 0 0); + } + } + } + + movingZone2 + { + solidBodyMotionFunction linearMotion; + linearMotionCoeffs + { + velocity (0.1 0 0); + origin (0.009 0.005 0.005); + axis (0 0 1); + omega -100.0; + } + } +} + + +// multiSolidBodyMotionSolverCoeffs +// { +// movingZone1 +// { +// solidBodyMotionFunction rotatingMotion; +// rotatingMotionCoeffs +// { +// origin (0.005 0.005 0.005); +// axis (0 0 1); +// omega 20.0; +// } +// } +// +// movingZone2 +// { +// solidBodyMotionFunction rotatingMotion; +// rotatingMotionCoeffs +// { +// origin (0.013 0.005 0.005); +// axis (0 0 1); +// omega -20.0; +// } +// } +// } + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/fvOptions b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/fvOptions new file mode 100644 index 00000000000..9bf54393245 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/fvOptions @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*---------------------------------*\ +| //\\ A | | +| // \\ X | Axion: GM's End-2-End CFD Solution | +| // \\ I | Version: 0.2 | +| // \\ O | Web: axion.gm.com | +| ============== N | | +\*--------------------------------------------------------------------------*/ + +FoamFile +{ + object fvOptions; + class dictionary; + format ascii; + version 2.0; + location "system"; +} + +limitU +{ + type velocityDampingConstraint; + active true; + selectionMode cellType; + UMax 0; + C 4; +} diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/g b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/g new file mode 100644 index 00000000000..a1465941a85 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/g @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value ( 0 -9.81 0); + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/transportProperties b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/transportProperties new file mode 100644 index 00000000000..7178bc2c930 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/transportProperties @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +phases (water air); + +water +{ + transportModel Newtonian; + nu 1e-06; + rho 998.2; +} + +air +{ + transportModel Newtonian; + nu 1.48e-05; + rho 1; +} + +sigma 0.0; + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/turbulenceProperties b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/turbulenceProperties new file mode 100644 index 00000000000..9a4ec0d8063 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/constant/turbulenceProperties @@ -0,0 +1,31 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +density variable; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/blockMeshDict b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/blockMeshDict new file mode 100644 index 00000000000..6384752412d --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/blockMeshDict @@ -0,0 +1,148 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 0.01; + +vertices +( + ( 0.00 0.0 0) + ( 2.00 0.0 0) + ( 2.00 1.0 0) + ( 0.00 1.0 0) + ( 0.00 0.0 1) + ( 2.00 0.0 1) + ( 2.00 1.0 1) + ( 0.00 1.0 1) + + // movingZone1 + ( 0.15 0.35 0) + ( 0.85 0.35 0) + ( 0.85 0.65 0) + ( 0.15 0.65 0) + ( 0.15 0.35 1) + ( 0.85 0.35 1) + ( 0.85 0.65 1) + ( 0.15 0.65 1) + + // movingZone2 + ( 1.15 0.15 0) + ( 1.45 0.15 0) + ( 1.45 0.85 0) + ( 1.15 0.85 0) + ( 1.15 0.15 1) + ( 1.45 0.15 1) + ( 1.45 0.85 1) + ( 1.15 0.85 1) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (140 70 1) simpleGrading (1 1 1) + + hex (8 9 10 11 12 13 14 15) movingZone1 (60 24 1) simpleGrading (1 1 1) + + hex (16 17 18 19 20 21 22 23) movingZone2 (24 60 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + overset1 + { + type overset; + faces + ( + ( 8 12 15 11) + (10 14 13 9) + (11 15 14 10) + ( 9 13 12 8) + ); + } + overset2 + { + type overset; + faces + ( + (16 20 23 19) + (18 22 21 17) + (19 23 22 18) + (17 21 20 16) + ); + } + walls + { + type wall; + faces + ( + (3 7 6 2) + (1 5 4 0) + ); + } + inlet + { + type wall; + faces + ( + (0 4 7 3) + ); + } + outlet + { + type wall; + faces + ( + (2 6 5 1) + ); + } + // Populated by subsetMesh + hole + { + type wall; + faces (); + } + frontAndBack + { + type empty; + faces + ( + (0 3 2 1) + (4 5 6 7) + ); + } + frontAndBack1 + { + type empty; + faces + ( + ( 8 11 10 9) + (12 13 14 15) + ); + } + frontAndBack2 + { + type empty; + faces + ( + (16 19 18 17) + (20 21 22 23) + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/controlDict b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/controlDict new file mode 100644 index 00000000000..b226c7d97a3 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/controlDict @@ -0,0 +1,116 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +libs (overset fvMotionSolvers); + +DebugSwitches +{ + overset 0; + dynamicOversetFvMesh 0; + cellVolumeWeight 0; +} + +application overInterDyMFoam; + +startFrom startTime; + +startTime 0.0; + +stopAt endTime; + +endTime 0.08; + +deltaT 0.001; + +writeControl adjustable; + +writeInterval 0.01; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 12; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 1.5; + +maxAlphaCo 2.0; + +maxDeltaT 1; + + +functions +{ + probes + { + type probes; + libs (sampling); + + // Name of the directory for probe data + name probes; + + // Write at same frequency as fields + writeControl timeStep; + writeInterval 1; + + // Fields to be probed + fields (p U); + + // Optional: interpolation scheme to use (default is cell) + interpolationScheme cell; + + probeLocations + ( + (0.0009999 0.0015 0.003) + ); + } + + alphaVol + { + // Mandatory entries (unmodifiable) + type volFieldValue; + libs (fieldFunctionObjects); + + // Mandatory entries (runtime modifiable) + fields (alpha.water); + operation volIntegrate; + regionType all; + + // Optional entries (runtime modifiable) + postOperation none; + //weightField alpha1; + + // Optional (inherited) entries + // Write at same frequency as fields + writeControl timeStep; + writeInterval 1; + writeFields false; + log true; + + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/decomposeParDict b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/decomposeParDict new file mode 100644 index 00000000000..05a9daf95f1 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/decomposeParDict @@ -0,0 +1,26 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 3; + +method hierarchical; + +coeffs +{ + n (3 1 1); +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/fvSchemes b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/fvSchemes new file mode 100644 index 00000000000..ffbdddd5cfe --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/fvSchemes @@ -0,0 +1,82 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + + div(rhoPhi,U) Gauss upwind; + div(U) Gauss linear; + + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss linear; + + div(phi,alpha.water) Gauss upwind; + + div(phi,epsilon) Gauss upwind; + div(phi,k) Gauss upwind; + + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +oversetInterpolation +{ + method trackingInverseDistance; + searchBox (-0.01 -0.01 0)(0.03 0.02 0.01); + searchBoxDivisions 3{(264 264 1)};//(264 264 1);// + allowInterpolatedDonors false; +} + +fluxRequired +{ + default no; + pcorr ; + p ; +} + +oversetInterpolationSuppressed +{ + grad(p_rgh); + surfaceIntegrate(phiHbyA); +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/fvSolution b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/fvSolution new file mode 100644 index 00000000000..dd6b270018f --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/fvSolution @@ -0,0 +1,115 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + cellDisplacement + { + solver PCG; + preconditioner DIC; + + tolerance 1e-06; + relTol 0; + maxIter 100; + } + + "alpha.water.*" + { + nAlphaCorr 3; + nAlphaSubCycles 2; + cAlpha 1; + icAlpha 0; + scAlpha 0; + + MULESCorr yes; + nLimiterIter 5; + alphaApplyPrevCorr no; + + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-8; + relTol 0; + } + + p_rgh + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-12; + relTol 0.01; + maxIter 500; + } + + p_rghFinal + { + $p_rgh; + relTol 0; + } + + pcorr + { + $p; + solver PCG; + preconditioner DIC; + } + + pcorrFinal + { + $pcorr; + relTol 0; + } + + "(U|k|epsilon)" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-6; + relTol 0.01; + maxIter 200; + minIter 1; + } + + "(U|k|epsilon)Final" + { + $U; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor no; + correctPhi no; + nOuterCorrectors 2; + nCorrectors 3; + nNonOrthogonalCorrectors 0; + + pRefPoint (0.0002 0.0099 0.001); + pRefValue 0.0; +} + +relaxationFactors +{ + fields + { + } + equations + { + ".*" 1; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/setFieldsDict b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/setFieldsDict new file mode 100644 index 00000000000..5d00ff1f5cd --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/setFieldsDict @@ -0,0 +1,67 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue zoneID 123 + volScalarFieldValue alpha.water 0 +); + +regions +( + // Set cell values + // (does zerogradient on boundaries) + cellToCell + { + set c0; + + fieldValues + ( + volScalarFieldValue zoneID 0 + ); + } + + cellToCell + { + set c1; + + fieldValues + ( + volScalarFieldValue zoneID 1 + ); + } + + cellToCell + { + set c2; + + fieldValues + ( + volScalarFieldValue zoneID 2 + ); + } + + boxToCell + { + box ( -100 -100 -100 ) ( 100 0.005 100 ); + fieldValues + ( + volScalarFieldValue alpha.water 1 + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/topoSetDict b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/topoSetDict new file mode 100644 index 00000000000..3930dde0a92 --- /dev/null +++ b/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/system/topoSetDict @@ -0,0 +1,94 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source regionsToCell; + insidePoints ((0.001 0.001 0.001)); + } + + { + name c1; + type cellSet; + action new; + source cellToCell; + set c0; + } + + { + name c1; + type cellSet; + action invert; + } + + { + name c2; + type cellSet; + action new; + source regionsToCell; + insidePoints ((0.0116 0.00151 0.001)); + set c1; + } + + { + name c1; + type cellSet; + action subtract; + source cellToCell; + set c2; + } + + // Select box to remove from region 1 and 2 + { + name box; + type cellSet; + action new; + source cellToCell; + set c1; + } + + { + name box; + type cellSet; + action add; + source cellToCell; + set c2; + } + + { + name box; + type cellSet; + action subset; + source boxToCell; + boxes + ( + (0.0025 0.0045 -100)(0.0075 0.0055 100) + (0.0125 0.0025 -100)(0.0135 0.0075 100) + ); + } + + { + name box; + type cellSet; + action invert; + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/overInterPhaseChangeDyMFoam/twoSimpleRotors/system/controlDict b/tutorials/multiphase/overInterPhaseChangeDyMFoam/twoSimpleRotors/system/controlDict index 76d1ed68dd5..47f8d66fb41 100644 --- a/tutorials/multiphase/overInterPhaseChangeDyMFoam/twoSimpleRotors/system/controlDict +++ b/tutorials/multiphase/overInterPhaseChangeDyMFoam/twoSimpleRotors/system/controlDict @@ -31,7 +31,7 @@ startTime 0.0; stopAt endTime; -endTime 0.2; +endTime 0.1; deltaT 0.00001; @@ -87,24 +87,6 @@ functions (0.0009999 0.0015 0.003) ); } - - alphaVol - { - libs (utilityFunctionObjects); - type coded; - name alphaVolume; - writeControl timeStep; - writeInterval 10; - - codeWrite - #{ - const auto& alpha = - mesh().lookupObject<volScalarField>("alpha.water"); - - Info<< "Alpha volume = " << alpha.weightedAverage(mesh().Vsc()) - << endl; - #}; - } } // ************************************************************************* // diff --git a/tutorials/multiphase/overInterPhaseChangeDyMFoam/twoSimpleRotors/system/fvSolution b/tutorials/multiphase/overInterPhaseChangeDyMFoam/twoSimpleRotors/system/fvSolution index 1b76f1a3710..ba5a1f0a0c5 100644 --- a/tutorials/multiphase/overInterPhaseChangeDyMFoam/twoSimpleRotors/system/fvSolution +++ b/tutorials/multiphase/overInterPhaseChangeDyMFoam/twoSimpleRotors/system/fvSolution @@ -63,8 +63,8 @@ solvers pcorr { $p; - solver PCG; - preconditioner DIC; + solver PBiCGStab; + preconditioner DILU; } pcorrFinal @@ -98,10 +98,8 @@ PIMPLE nCorrectors 3; nNonOrthogonalCorrectors 0; - ddtCorr false; - pRefPoint (0.0002 0.0099 0.001); - pRefValue 1e5; //Not used + pRefValue 1e5; } relaxationFactors -- GitLab