From b9d8f99bc203254eca3aab3e6573f93a63808c48 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 8 Sep 2025 13:31:58 +0100 Subject: [PATCH] ENH: tutorials: demoing mesh alignment before shm. Fixes #3409 --- .../rotorDisk_inclined/.DS_Store | Bin 0 -> 6148 bytes .../rotorDisk_inclined/0.orig/U | 46 ++++++ .../rotorDisk_inclined/0.orig/k | 47 ++++++ .../rotorDisk_inclined/0.orig/nut | 44 ++++++ .../rotorDisk_inclined/0.orig/omega | 47 ++++++ .../rotorDisk_inclined/0.orig/p | 43 ++++++ .../0.orig/pointDisplacement | 68 +++++++++ .../rotorDisk_inclined/Allclean | 12 ++ .../moveDynamicMesh/rotorDisk_inclined/Allrun | 40 ++++++ .../rotorDisk_inclined/README.txt | 4 + .../constant/dynamicMeshDict | 31 ++++ .../constant/transportProperties | 22 +++ .../constant/turbulenceProperties | 29 ++++ .../rotorDisk_inclined/system/blockMeshDict | 77 ++++++++++ .../rotorDisk_inclined/system/controlDict | 48 +++++++ .../rotorDisk_inclined/system/fvOptions | 103 +++++++++++++ .../rotorDisk_inclined/system/fvSchemes | 68 +++++++++ .../rotorDisk_inclined/system/fvSolution | 59 ++++++++ .../rotorDisk_inclined/system/meshQualityDict | 20 +++ .../system/snappyHexMeshDict | 135 ++++++++++++++++++ .../system/surfaceFeatureExtractDict | 28 ++++ .../rotorDisk_inclined/system/topoSetDict | 37 +++++ 22 files changed, 1008 insertions(+) create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/.DS_Store create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/U create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/k create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/nut create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/omega create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/p create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/pointDisplacement create mode 100755 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/Allclean create mode 100755 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/Allrun create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/README.txt create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/constant/dynamicMeshDict create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/constant/transportProperties create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/constant/turbulenceProperties create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/blockMeshDict create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/controlDict create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/fvOptions create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/fvSchemes create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/fvSolution create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/meshQualityDict create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/snappyHexMeshDict create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/surfaceFeatureExtractDict create mode 100644 tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/topoSetDict diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/.DS_Store b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..c7f175f42326c4f01a07f5d1e40f837a2f64205f GIT binary patch literal 6148 zcmeHKISv9b4733uBpOP}e1RWC2wuPk5Jv~101CRTco$D&d=#LC4hqm%awc&+i894{ zEh0KSZzdum5gEV@w=YMzz)z2S+n`Ya zDnJFO02QDDA6Fnt>|prulX)N&paQ?HfPEhd+^{A#f&S^h;4J{Khp-#w-b(G z{r@wGD=I(*{z?Ju%@(sMo|Lt<^*F1w1-^t^&JAvcxl=HBIR<(;#=^?+*pni!*c|&c Vu?ciK;!X$hXTWr!QGstOa0e=g6|evR literal 0 HcmV?d00001 diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/U b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/U new file mode 100644 index 0000000000..6d4659ae39 --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/U @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2506 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Uinlet (0 1 0); + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform $Uinlet; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform $Uinlet; + } + + outlet + { + type pressureInletOutletVelocity; + value uniform $Uinlet; + } + + "slip.*" + { + type slip; + } + + #includeEtc "caseDicts/setConstraintTypes" +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/k b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/k new file mode 100644 index 0000000000..7d85237ff5 --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/k @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2506 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +kInlet 0.02; + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform $kInlet; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform $kInlet; + } + + outlet + { + type inletOutlet; + inletValue uniform $kInlet; + value uniform $kInlet; + } + + "slip.*" + { + type slip; + } + + #includeEtc "caseDicts/setConstraintTypes" +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/nut b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/nut new file mode 100644 index 0000000000..3086c65983 --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/nut @@ -0,0 +1,44 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2506 | +| \\ / 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 +{ + inlet + { + type calculated; + value uniform 0; + } + + outlet + { + type calculated; + value uniform 0; + } + + "slip.*" + { + type slip; + } + + #includeEtc "caseDicts/setConstraintTypes" +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/omega b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/omega new file mode 100644 index 0000000000..69d16ddded --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/omega @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2506 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object omega; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +omegaInlet 10.0; + +dimensions [0 0 -1 0 0 0 0]; + +internalField uniform $omegaInlet; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform $omegaInlet; + } + + outlet + { + type inletOutlet; + inletValue uniform $omegaInlet; + value uniform $omegaInlet; + } + + "slip.*" + { + type slip; + } + + #includeEtc "caseDicts/setConstraintTypes" +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/p b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/p new file mode 100644 index 0000000000..b80417408d --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/p @@ -0,0 +1,43 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2506 | +| \\ / 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 +{ + inlet + { + type zeroGradient; + } + + outlet + { + type fixedValue; + value uniform 0; + } + + "slip.*" + { + type slip; + } + + #includeEtc "caseDicts/setConstraintTypes" +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/pointDisplacement b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/pointDisplacement new file mode 100644 index 0000000000..000b043df9 --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/0.orig/pointDisplacement @@ -0,0 +1,68 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2506 | +| \\ / 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 +{ + walls + { + type fixedValue; + value $internalField; + } + + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type fixedValue; + value $internalField; + } + + "slip.*" + { + type fixedValue; + value $internalField; + } + + #includeEtc "caseDicts/setConstraintTypes" + + movingZone + { + type solidBodyMotionDisplacement; + solidBodyMotionFunction rotatingMotion; + rotatingMotionCoeffs + { + origin (0 0 0); + axis (1 0 0); + omega #eval {degToRad(5)}; //theta*Time, 1s, 5deg in rad + } + } + + movingZoneEdges + { + type slip; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/Allclean b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/Allclean new file mode 100755 index 0000000000..8c3e272cb9 --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/Allclean @@ -0,0 +1,12 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions +#------------------------------------------------------------------------------ + +cleanCase0 + +# Remove surface and features +rm -rf constant/extendedFeatureEdgeMesh +rm -rf constant/triSurface + +#------------------------------------------------------------------------------ diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/Allrun b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/Allrun new file mode 100755 index 0000000000..a2b64af8fe --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/Allrun @@ -0,0 +1,40 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +cp -rf \ + "$FOAM_TUTORIALS"/resources/geometry/rotorDisk \ + constant/triSurface + +runApplication surfaceTransformPoints -rotate-angle '((1 0 0) 5)' \ + "$FOAM_TUTORIALS"/resources/geometry/rotorDisk/rotatingZone.obj \ + constant/triSurface/rotatingZone.obj + +restore0Dir + +runApplication blockMesh + +runApplication surfaceFeatureExtract + +runApplication topoSet + +runApplication surfaceMeshExtract -featureAngle 45 -patches '(ZZZZZZ)' \ + -faceZones '(movingZone)' -extractZonePoints constant/triSurface/dummy.obj + +foamDictionary constant/dynamicMeshDict -entry dynamicFvMesh \ + -set dynamicMotionSolverFvMesh +foamDictionary system/controlDict -entry stopAt -set writeNow + +runApplication moveDynamicMesh -overwrite + +rm -rf constant/polyMesh/{sets,faceZones,pointMesh} 1 + +foamDictionary constant/dynamicMeshDict -entry dynamicFvMesh -set staticFvMesh +foamDictionary system/controlDict -entry stopAt -set endTime + +runApplication snappyHexMesh -overwrite + +runApplication $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/README.txt b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/README.txt new file mode 100644 index 0000000000..ccbabcdfad --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/README.txt @@ -0,0 +1,4 @@ +Variant of incompressible/simpleFoam/rotorDisk that +aligns the mesh (generted by blockMesh) before running +snappyHexMesh. This gives better surface +conformance. diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/constant/dynamicMeshDict b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/constant/dynamicMeshDict new file mode 100644 index 0000000000..252ec08ad8 --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/constant/dynamicMeshDict @@ -0,0 +1,31 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2506 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +FoamFile +{ + version 2; + format ascii; + class dictionary; + object dynamicMeshDict; +} + +dynamicFvMesh staticFvMesh; + +motionSolverLibs ( fvMotionSolvers ); + +motionSolver displacementPointSmoothing; + +displacementPointSmoothingCoeffs +{ + pointSmoother geometricElementTransform; + transformationParameter 0.667; + nPointSmootherIter 10; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/constant/transportProperties b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/constant/transportProperties new file mode 100644 index 0000000000..b7cd6134fe --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/constant/transportProperties @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2506 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +nu 1.5e-05; + + +// ************************************************************************* // diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/constant/turbulenceProperties b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/constant/turbulenceProperties new file mode 100644 index 0000000000..4069a95b01 --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/constant/turbulenceProperties @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2506 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kOmegaSST; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/blockMeshDict b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/blockMeshDict new file mode 100644 index 0000000000..8edafd01a2 --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/blockMeshDict @@ -0,0 +1,77 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2506 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +domain +{ + xMin -1.26; + xMax 1.26; + yMin -2.01; + yMax 2.01; + zMin -1.26; + zMax 1.26; + xCells 12; + yCells 22; + zCells 12; +} + +scale 1; + +vertices +( + ($/domain/xMin $/domain/yMin $/domain/zMin) + ($/domain/xMax $/domain/yMin $/domain/zMin) + ($/domain/xMax $/domain/yMax $/domain/zMin) + ($/domain/xMin $/domain/yMax $/domain/zMin) + + ($/domain/xMin $/domain/yMin $/domain/zMax) + ($/domain/xMax $/domain/yMin $/domain/zMax) + ($/domain/xMax $/domain/yMax $/domain/zMax) + ($/domain/xMin $/domain/yMax $/domain/zMax) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) + ( + $/domain/xCells + $/domain/yCells + $/domain/zCells + ) + simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( +); + +mergePatchPairs +( +); + +defaultPatch +{ + type wall; + name walls; +} + +// Cleanup +#remove ( domain ) + +// ************************************************************************* // diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/controlDict b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/controlDict new file mode 100644 index 0000000000..52b246d68f --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/controlDict @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2506 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +FoamFile +{ + version 2; + format ascii; + class dictionary; + object controlDict; +} + +application simpleFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 1000; + +deltaT 1; + +writeControl timeStep; + +writeInterval 50; + +purgeWrite 0; + +writeFormat binary; + +writePrecision 8; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + + +// ************************************************************************* // diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/fvOptions b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/fvOptions new file mode 100644 index 0000000000..9f6cf9c30e --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/fvOptions @@ -0,0 +1,103 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2506 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvOptions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +disk +{ + type rotorDisk; + + selectionMode cellZone; + cellZone rotatingZone; + + fields (U); // Names of fields on which to apply source + nBlades 3; // Number of blades + tipEffect 0.96; // Normalised radius above which lift = 0 + + inletFlowType local; // Inlet flow type specification + inletVelocity (0 1 0); + + geometryMode specified; + + origin (0 0 0); + axis (0 1 0); + + refDirection (0 0 1); // Reference direction + // - used as reference for psi angle + rpm 1000; + //pointAbove (0 0 0.25); + + trimModel fixedTrim; // fixed || targetForce + + rhoRef 1000; + rhoInf 1; + + fixedTrimCoeffs + { + theta0 0; + theta1c 0; + theta1s 0; + } + + flapCoeffs + { + beta0 0; // Coning angle [deg] + beta1c 0; // Lateral flapping coeff (cos coeff) + beta2s 0; // Longitudinal flapping coeff (sin coeff) + } + + blade + { + data + ( + (profile1 (0.1 -6 0.02)) + (profile1 (0.25 -6 0.02)) + ); + } + + profiles + { + profile1 + { + type lookup; + data + ( + (-90 0.21 1.45) + (-18 0.21 1.45) + (-16 0.165 1.3) + (-14 0.125 1.1) + (-12 0.092 0.95) + (-10 0.07 0.8) + (-8 0.05 0.64) + (-6 0.04 0.5) + (-4 0.028 0.32) + (-2 0.022 0.18) + (0 0.02 0) + (2 0.022 0.18) + (4 0.028 0.32) + (6 0.04 0.5) + (8 0.05 0.64) + (10 0.07 0.8) + (12 0.092 0.95) + (14 0.125 1.1) + (16 0.165 1.3) + (18 0.21 1.45) + (90 0.21 1.45) + ); + } + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/fvSchemes b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/fvSchemes new file mode 100644 index 0000000000..4b2de2d29c --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/fvSchemes @@ -0,0 +1,68 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2506 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default steadyState; +} + +gradSchemes +{ + default Gauss linear; + + limited cellLimited Gauss linear 1; + grad(U) $limited; + grad(k) $limited; + grad(omega) $limited; +} + +divSchemes +{ + default none; + + div(phi,U) bounded Gauss linearUpwind unlimited; + + turbulence bounded Gauss linearUpwind limited; + div(phi,k) $turbulence; + div(phi,omega) $turbulence; + div(phi,epsilon) $turbulence; + + div((nuEff*dev(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +wallDist +{ + method meshWave; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/fvSolution b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/fvSolution new file mode 100644 index 0000000000..fbe87cb4f3 --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/fvSolution @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2506 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver GAMG; + smoother GaussSeidel; + tolerance 1e-6; + relTol 0.1; + } + + "(U|k|omega|epsilon)" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-6; + relTol 0.1; + } +} + +SIMPLE +{ + nNonOrthogonalCorrectors 0; + consistent yes; + + residualControl + { + U 1e-4; + p 1e-3; + "(k|epsilon|omega)" 1e-3; + } +} + +relaxationFactors +{ + equations + { + U 0.95; + "(k|omega|epsilon)" 0.95; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/meshQualityDict b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/meshQualityDict new file mode 100644 index 0000000000..e22deb93d2 --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/meshQualityDict @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2506 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object meshQualityDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/mesh/generation/meshQualityDict.cfg" + + +// ************************************************************************* // diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/snappyHexMeshDict b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/snappyHexMeshDict new file mode 100644 index 0000000000..d861f92134 --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/snappyHexMeshDict @@ -0,0 +1,135 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2506 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object snappyHexMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#includeEtc "caseDicts/mesh/generation/snappyHexMeshDict.cfg" + +castellatedMesh on; +snap on; +addLayers off; + +geometry +{ + fixed.obj + { + type triSurfaceMesh; + name fixed; + regions + { + patch0 { name slipWall; } + patch1 { name outlet; } + patch2 { name inlet; } + } + } + rotatingZone.obj + { + type triSurfaceMesh; + name rotatingZone; + } +} + +castellatedMeshControls +{ + features + ( + { file "fixed.eMesh"; level 2; } + { file "rotatingZone.eMesh"; level 4; } + ); + + refinementSurfaces + { + fixed + { + level (2 2); + patchInfo { type wall; } + inGroups (fixed); + + regions + { + patch0 + { + level (2 2); + patchInfo { type patch; } + } + + patch1 + { + level (2 2); + patchInfo { type patch; } + } + + patch2 + { + level (2 2); + patchInfo { type patch; } + } + } + } + rotatingZone + { + level (4 4); + faceZone rotatingZone; + cellZone rotatingZone; + cellZoneInside inside; + } + + } + + refinementRegions + { + fixed + { + mode inside; + levels ((1e-5 1)); + } + rotatingZone + { + mode inside; + levels ((1e-5 4)); + } + } + + locationInMesh (1e-5 -1e-2 1e-5);// Offset from (0 0 0) to avoid + // coinciding with face or edge and keep + // away from disk itself +} + +snapControls +{ + explicitFeatureSnap true; +} + +addLayersControls +{ + layers + { + } + + relativeSizes true; // false, usually with firstLayerThickness + expansionRatio 1.2; + finalLayerThickness 0.5; + minThickness 1e-3; +} + +meshQualityControls +{ +// minTetQuality -1e+30; +} + + +mergeTolerance 1e-6; + + +// ************************************************************************* // diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/surfaceFeatureExtractDict b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/surfaceFeatureExtractDict new file mode 100644 index 0000000000..5e0f3b2480 --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/surfaceFeatureExtractDict @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2506 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object surfaceFeatureExtractDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +fixed.obj +{ + #includeEtc "caseDicts/surface/surfaceFeatureExtractDict.cfg" +} + +rotatingZone.obj +{ + #includeEtc "caseDicts/surface/surfaceFeatureExtractDict.cfg" +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/topoSetDict b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/topoSetDict new file mode 100644 index 0000000000..fa174ed07a --- /dev/null +++ b/tutorials/mesh/moveDynamicMesh/rotorDisk_inclined/system/topoSetDict @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2506 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name movingZoneFaces; + type faceSet; + action new; + source cylinderToFace; + point1 (0 -0.06 0); // start point on cylinder axis + point2 (0 0.06 0); // end point on cylinder axis + radius 0.5; + } + { + name movingZone; + type faceZoneSet; + action new; + source setToFaceZone; + faceSet movingZoneFaces; + } +); + +// ************************************************************************* //