From 598c49fe8ada201aa8e423632d2cc19480e897e6 Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Fri, 22 Jun 2018 15:25:06 +0100 Subject: [PATCH] TUT: Added new tutorial cases --- .../LES/surfaceMountedCube/Allclean | 6 + .../pimpleFoam/LES/surfaceMountedCube/Allrun | 11 + .../pimpleFoam/LES/surfaceMountedCube/README | 17 ++ .../LES/surfaceMountedCube/fullCase/0/U | 55 ++++ .../LES/surfaceMountedCube/fullCase/0/k | 52 ++++ .../LES/surfaceMountedCube/fullCase/0/nuTilda | 52 ++++ .../LES/surfaceMountedCube/fullCase/0/nut | 49 ++++ .../LES/surfaceMountedCube/fullCase/0/p | 47 ++++ .../LES/surfaceMountedCube/fullCase/Allclean | 9 + .../LES/surfaceMountedCube/fullCase/Allrun | 29 +++ .../fullCase/constant/transportProperties | 23 ++ .../fullCase/constant/turbulenceProperties | 40 +++ .../LES/surfaceMountedCube/fullCase/plot | 52 ++++ .../fullCase/system/blockMeshDict | 240 ++++++++++++++++++ .../fullCase/system/controlDict | 115 +++++++++ .../fullCase/system/decomposeParDict | 31 +++ .../fullCase/system/fvSchemes | 70 +++++ .../fullCase/system/fvSolution | 61 +++++ .../surfaceMountedCube/fullCase/system/sample | 125 +++++++++ .../LES/surfaceMountedCube/initChannel/0/U | 47 ++++ .../surfaceMountedCube/initChannel/0/epsilon | 49 ++++ .../LES/surfaceMountedCube/initChannel/0/k | 49 ++++ .../surfaceMountedCube/initChannel/0/nuTilda | 49 ++++ .../LES/surfaceMountedCube/initChannel/0/nut | 55 ++++ .../surfaceMountedCube/initChannel/Allclean | 8 + .../LES/surfaceMountedCube/initChannel/Allrun | 9 + .../initChannel/constant/transportProperties | 25 ++ .../initChannel/constant/turbulenceProperties | 30 +++ .../initChannel/system/blockMeshDict | 104 ++++++++ .../initChannel/system/controlDict | 85 +++++++ .../initChannel/system/fvSchemes | 59 +++++ .../initChannel/system/fvSolution | 56 ++++ .../simpleFoam/backwardFacingStep2D/0/U | 50 ++++ .../simpleFoam/backwardFacingStep2D/0/epsilon | 53 ++++ .../simpleFoam/backwardFacingStep2D/0/k | 53 ++++ .../simpleFoam/backwardFacingStep2D/0/nuTilda | 50 ++++ .../simpleFoam/backwardFacingStep2D/0/nut | 54 ++++ .../simpleFoam/backwardFacingStep2D/0/omega | 53 ++++ .../simpleFoam/backwardFacingStep2D/0/p | 50 ++++ .../simpleFoam/backwardFacingStep2D/Allclean | 10 + .../simpleFoam/backwardFacingStep2D/Allrun | 100 ++++++++ .../simpleFoam/backwardFacingStep2D/README | 22 ++ .../constant/transportProperties | 22 ++ .../constant/turbulenceProperties | 30 +++ .../backwardFacingStep2D/system/blockMeshDict | 202 +++++++++++++++ .../backwardFacingStep2D/system/controlDict | 58 +++++ .../backwardFacingStep2D/system/fvSchemes | 59 +++++ .../backwardFacingStep2D/system/fvSolution | 60 +++++ .../system/pressureCoefficient | 14 + .../backwardFacingStep2D/system/sample | 61 +++++ .../backwardFacingStep2D/system/sampleCp | 7 + .../system/stressComponents | 6 + .../turbulentFlatPlate/0.kEpsilon/U | 56 ++++ .../turbulentFlatPlate/0.kEpsilon/epsilon | 57 +++++ .../turbulentFlatPlate/0.kEpsilon/k | 59 +++++ .../turbulentFlatPlate/0.kEpsilon/nut | 60 +++++ .../turbulentFlatPlate/0.kEpsilon/p | 66 +++++ .../turbulentFlatPlate/0.kOmegaSST/U | 56 ++++ .../turbulentFlatPlate/0.kOmegaSST/k | 59 +++++ .../turbulentFlatPlate/0.kOmegaSST/nut | 60 +++++ .../turbulentFlatPlate/0.kOmegaSST/omega | 60 +++++ .../turbulentFlatPlate/0.kOmegaSST/p | 66 +++++ .../simpleFoam/turbulentFlatPlate/Allclean | 11 + .../simpleFoam/turbulentFlatPlate/Allrun | 85 +++++++ .../simpleFoam/turbulentFlatPlate/README | 17 ++ .../constant/transportProperties | 22 ++ .../constant/turbulenceProperties-kEpsilon | 30 +++ .../constant/turbulenceProperties-kOmegaSST | 30 +++ .../constant/turbulenceProperties.orig | 28 ++ .../simpleFoam/turbulentFlatPlate/plot | 26 ++ .../turbulentFlatPlate/system/blockMeshDict | 133 ++++++++++ .../system/blockMeshDict.template | 133 ++++++++++ .../turbulentFlatPlate/system/controlDict | 68 +++++ .../system/decomposeParDict | 51 ++++ .../turbulentFlatPlate/system/fvSchemes | 60 +++++ .../turbulentFlatPlate/system/fvSolution | 84 ++++++ 76 files changed, 4100 insertions(+) create mode 100755 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/Allclean create mode 100755 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/Allrun create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/README create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/U create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/k create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/nuTilda create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/nut create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/p create mode 100755 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allclean create mode 100755 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allrun create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/constant/transportProperties create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/constant/turbulenceProperties create mode 100755 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/plot create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/system/blockMeshDict create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/system/controlDict create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/system/decomposeParDict create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/system/fvSchemes create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/system/fvSolution create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/system/sample create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/initChannel/0/U create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/initChannel/0/epsilon create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/initChannel/0/k create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/initChannel/0/nuTilda create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/initChannel/0/nut create mode 100755 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/initChannel/Allclean create mode 100755 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/initChannel/Allrun create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/initChannel/constant/transportProperties create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/initChannel/constant/turbulenceProperties create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/initChannel/system/blockMeshDict create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/initChannel/system/controlDict create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/initChannel/system/fvSchemes create mode 100644 tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/initChannel/system/fvSolution create mode 100644 tutorials/incompressible/simpleFoam/backwardFacingStep2D/0/U create mode 100644 tutorials/incompressible/simpleFoam/backwardFacingStep2D/0/epsilon create mode 100644 tutorials/incompressible/simpleFoam/backwardFacingStep2D/0/k create mode 100644 tutorials/incompressible/simpleFoam/backwardFacingStep2D/0/nuTilda create mode 100644 tutorials/incompressible/simpleFoam/backwardFacingStep2D/0/nut create mode 100644 tutorials/incompressible/simpleFoam/backwardFacingStep2D/0/omega create mode 100644 tutorials/incompressible/simpleFoam/backwardFacingStep2D/0/p create mode 100755 tutorials/incompressible/simpleFoam/backwardFacingStep2D/Allclean create mode 100755 tutorials/incompressible/simpleFoam/backwardFacingStep2D/Allrun create mode 100644 tutorials/incompressible/simpleFoam/backwardFacingStep2D/README create mode 100644 tutorials/incompressible/simpleFoam/backwardFacingStep2D/constant/transportProperties create mode 100644 tutorials/incompressible/simpleFoam/backwardFacingStep2D/constant/turbulenceProperties create mode 100644 tutorials/incompressible/simpleFoam/backwardFacingStep2D/system/blockMeshDict create mode 100644 tutorials/incompressible/simpleFoam/backwardFacingStep2D/system/controlDict create mode 100644 tutorials/incompressible/simpleFoam/backwardFacingStep2D/system/fvSchemes create mode 100644 tutorials/incompressible/simpleFoam/backwardFacingStep2D/system/fvSolution create mode 100644 tutorials/incompressible/simpleFoam/backwardFacingStep2D/system/pressureCoefficient create mode 100644 tutorials/incompressible/simpleFoam/backwardFacingStep2D/system/sample create mode 100644 tutorials/incompressible/simpleFoam/backwardFacingStep2D/system/sampleCp create mode 100644 tutorials/incompressible/simpleFoam/backwardFacingStep2D/system/stressComponents create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/0.kEpsilon/U create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/0.kEpsilon/epsilon create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/0.kEpsilon/k create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/0.kEpsilon/nut create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/0.kEpsilon/p create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/0.kOmegaSST/U create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/0.kOmegaSST/k create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/0.kOmegaSST/nut create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/0.kOmegaSST/omega create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/0.kOmegaSST/p create mode 100755 tutorials/incompressible/simpleFoam/turbulentFlatPlate/Allclean create mode 100755 tutorials/incompressible/simpleFoam/turbulentFlatPlate/Allrun create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/README create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/constant/transportProperties create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/constant/turbulenceProperties-kEpsilon create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/constant/turbulenceProperties-kOmegaSST create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/constant/turbulenceProperties.orig create mode 100755 tutorials/incompressible/simpleFoam/turbulentFlatPlate/plot create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/system/blockMeshDict create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/system/blockMeshDict.template create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/system/controlDict create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/system/decomposeParDict create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/system/fvSchemes create mode 100644 tutorials/incompressible/simpleFoam/turbulentFlatPlate/system/fvSolution diff --git a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/Allclean b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/Allclean new file mode 100755 index 0000000000..77dcff4e4c --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/Allclean @@ -0,0 +1,6 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +(cd initChannel && ./Allclean) +(cd fullCase && ./Allclean) + diff --git a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/Allrun b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/Allrun new file mode 100755 index 0000000000..915160a56a --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/Allrun @@ -0,0 +1,11 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Run a precursor channel flow to create a fully developed flow profile for the +# main case +(cd initChannel && ./Allrun) + +# Run the main case +(cd fullCase && ./Allrun) + + diff --git a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/README b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/README new file mode 100644 index 0000000000..f2d6bff7c5 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/README @@ -0,0 +1,17 @@ +Unsteady flow over a surface mounted cube + +The set-up is based on the description given by Martinuzzi and Tropea: + + R. Martinuzzi and C. Tropea. The Flow Around Surface-Mounted, Prismatic + Obstacles Placed in a Fully Developed Channel Flow. Journal of Fluids + Engineering, 115(1):85-92, 1993. + +where the Reynolds number based on the cube height is Re_h 40000. + +Turbulence is modelled using the Spalart-Allmaras Improved Delayed Detached +Eddy Simulation (IDDES) model + +For further details please visit: + + openfoam.com/documentation/cpp-guide/html/verification-validation-turbulent-surface-mounted-cube.html + diff --git a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/U b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/U new file mode 100644 index 0000000000..34b401fcb8 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/U @@ -0,0 +1,55 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + inlet + { +// type timeVaryingMappedFixedValue; +// offset (0 0 0); +// setAverage off; + type turbulentDFSEMInlet; + delta 1; + nCellPerEddy 3; + mapMethod nearestCell; + value $internalField; + } + + outlet + { + type inletOutlet; + inletValue uniform (0 0 0); + value uniform (0 0 0); + } + + sides + { + type slip; + } + + "(cube|topAndBottom)" + { + type noSlip; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/k b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/k new file mode 100644 index 0000000000..b0fd21471d --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/k @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 1e-5; + +boundaryField +{ + inlet + { + type timeVaryingMappedFixedValue; + offset 0; + setAverage off; + mapMethod nearest; +// type fixedValue; + value $internalField; + } + + outlet + { + type zeroGradient; + } + + sides + { + type zeroGradient; + } + + "(cube|topAndBottom)" + { + type fixedValue; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/nuTilda b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/nuTilda new file mode 100644 index 0000000000..5b78f737aa --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/nuTilda @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nuTilda; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 7.5e-5; + +boundaryField +{ + inlet + { + type timeVaryingMappedFixedValue; + offset 0; + setAverage off; + mapMethod nearest; +// type fixedValue; + value $internalField; + } + + outlet + { + type zeroGradient; + } + + sides + { + type zeroGradient; + } + + "(cube|topAndBottom)" + { + type fixedValue; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/nut b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/nut new file mode 100644 index 0000000000..3e2ffcc311 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/nut @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type calculated; + value $internalField; + } + + outlet + { + type calculated; + value $internalField; + } + + sides + { + type zeroGradient; + } + + "(cube|topAndBottom)" + { + type nutUSpaldingWallFunction; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/p b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/p new file mode 100644 index 0000000000..71430cf237 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0/p @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type zeroGradient; + } + + outlet + { + type fixedValue; + value uniform 0; + } + + sides + { + type zeroGradient; + } + + "(cube|topAndBottom)" + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allclean b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allclean new file mode 100755 index 0000000000..34abc6a364 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allclean @@ -0,0 +1,9 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase +\rm -rf constant/boundaryData *.png + diff --git a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allrun b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allrun new file mode 100755 index 0000000000..3f0efd4886 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allrun @@ -0,0 +1,29 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +channelCase=../initChannel +channelDataDir=$channelCase/postProcessing/surfaces/inlet + +[ -d $channelDataDir ] || { + echo "Unable to locate precursor channel case - exiting" + exit 1 +} + +# Copy the channel data +# Note: this is mapped using a timeVaryingMapped condition on the inlet patch +mkdir -p constant/boundaryData/inlet/0 +channelTimeDir=$(foamListTimes -case $channelCase -latestTime) + +\cp -rf $channelDataDir/points constant/boundaryData/inlet +\cp -rf $channelDataDir/$channelTimeDir/turbulenceProperties:R constant/boundaryData/inlet/0/R +\cp -rf $channelDataDir/$channelTimeDir/turbulenceProperties:L constant/boundaryData/inlet/0/L +\cp -rf $channelDataDir/$channelTimeDir/turbulenceProperties:nuTilda constant/boundaryData/inlet/0/nuTilda +\cp -rf $channelDataDir/$channelTimeDir/U constant/boundaryData/inlet/0/U + +runApplication blockMesh +runApplication decomposePar +runParallel $(getApplication) + diff --git a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/constant/transportProperties b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/constant/transportProperties new file mode 100644 index 0000000000..a5d64f2d65 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/constant/transportProperties @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +nu 2.5e-05; + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/constant/turbulenceProperties b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/constant/turbulenceProperties new file mode 100644 index 0000000000..152018ed95 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/constant/turbulenceProperties @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object RASProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType LES; + +LES +{ + turbulence on; + + LESModel SpalartAllmarasIDDES; + + + printCoeffs on; + + delta IDDESDelta; + + IDDESDeltaCoeffs + { + hmax maxDeltaxyzCubeRoot; + maxDeltaxyzCubeRootCoeffs + { + } + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/plot b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/plot new file mode 100755 index 0000000000..63f008e3c1 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/plot @@ -0,0 +1,52 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +time=$1 +gnuplot</dev/null 2>&1 || { + echo "gnuplot not found - skipping graph creation" 1>&2 + exit 1 + } + + # Copy results to the validation directory + timeDir=$(foamListTimes -latestTime) + sampleDir=postProcessing/sample/$timeDir + + [ -d $sampleDir ] || { + echo "results directory not found - skipping graph creation" 1>&2 + exit 1 + } + + # Test if awk exists on the system + command -v awk >/dev/null 2>&1 || { + echo "awk not found - skipping graph creation" 1>&2 + exit 1 + } + + Uref=$(awk '{print $2}' $sampleDir/Uref_U.xy) + + graphNameU="backwardStep2D_U.png" + + echo "Creating U profiles graph to $graphNameU" + gnuplot< tauw.dat + foamDictionary -entry boundaryField.lowerWall.value -value $timeDir/Cx | \ + sed -n '/(/,/)/p' | sed -e 's/[()]//g;/^\s*$/d' > Cx.$$ + foamDictionary -entry boundaryField.lowerWall.value -value $timeDir/wallShearStress | \ + sed -n '/(/,/)/p' | sed -e 's/[()]//g;/^\s*$/d' > tau.$$ + paste -d ' ' Cx.$$ tau.$$ >> tauw.dat + \rm -f Cx.$$ tau.$$ + + graphNameTau="backwardStep2D_tau.png" + echo "Creating wallshear stress graph to $graphNameTau" + gnuplot< system/blockMeshDict + + runApplication -s ${model}_${yp} blockMesh + + runApplication -s ${model}_${yp} simpleFoam + + UInf=$(foamDictionary -entry internalField 0/U | sed 's/^.*(\s*\([^ ]*\).*/\1/g') + nuInf=$(foamDictionary -entry nu constant/transportProperties | sed 's/^.*\s\(.*\);/\1/g') + + timeDir=$(foamListTimes -latestTime) + + echo "UInf = $UInf" + + foamDictionary -entry boundaryField.bottomWall.value -value $timeDir/Cx | \ + sed -n '/(/,/)/p' | sed -e 's/[()]//g;/^\s*$/d' > Cx.$$ + foamDictionary -entry boundaryField.bottomWall.value -value $timeDir/wallShearStress | \ + sed -n '/(/,/)/p' | sed -e 's/[()]//g;/^\s*$/d' > tau.$$ + foamDictionary -entry boundaryField.bottomWall.value -value $timeDir/yPlus | \ + sed -n '/(/,/)/p' | sed -e 's/[()]//g;/^\s*$/d' > yp.$$ + + echo "# ccx tau_xx tau_yy tau_zz" > tauw_${model}_${yp}.dat + paste -d ' ' Cx.$$ tau.$$ >> tauw_${model}_${yp}.dat + echo "# ccx y+" > yplus_${model}_${yp}.dat + paste -d ' ' Cx.$$ yp.$$ >> yplus_${model}_${yp}.dat + \rm -f Cx.$$ tau.$$ yp.$$ + + ./plot $UInf $nuInf $model $yp + + # Optionally store the results + #mv $timeDir ${model}_${yp}.${timeDir} + done + mv postProcessing postProcessing-${model} + done +fi diff --git a/tutorials/incompressible/simpleFoam/turbulentFlatPlate/README b/tutorials/incompressible/simpleFoam/turbulentFlatPlate/README new file mode 100644 index 0000000000..2d89236ab3 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/turbulentFlatPlate/README @@ -0,0 +1,17 @@ +Steady flow over a 2D flat plate + +This case is based on the zero pressure gradient flat plate test described +by the Langley Research Center Turbulence Modeling Resource provided at: + + https://turbmodels.larc.nasa.gov/flatplate.html + +The Reynolds number based on the plate length is of Re_L = 5×10^6 + +The Allrun script applies a selection of tubulence models to a range of y+ +meshes which for which graphs are created that compare the predictions +against the data from Weighardt. + +For further information please visit: + + openfoam.com/documentation/cpp-guide/html/verification-validation-turbulent-flat-plate-zpg.html + diff --git a/tutorials/incompressible/simpleFoam/turbulentFlatPlate/constant/transportProperties b/tutorials/incompressible/simpleFoam/turbulentFlatPlate/constant/transportProperties new file mode 100644 index 0000000000..73759f9481 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/turbulentFlatPlate/constant/transportProperties @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +nu 1.388e-05; + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/turbulentFlatPlate/constant/turbulenceProperties-kEpsilon b/tutorials/incompressible/simpleFoam/turbulentFlatPlate/constant/turbulenceProperties-kEpsilon new file mode 100644 index 0000000000..8fe9b5ed38 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/turbulentFlatPlate/constant/turbulenceProperties-kEpsilon @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/turbulentFlatPlate/constant/turbulenceProperties-kOmegaSST b/tutorials/incompressible/simpleFoam/turbulentFlatPlate/constant/turbulenceProperties-kOmegaSST new file mode 100644 index 0000000000..8b2ee153c1 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/turbulentFlatPlate/constant/turbulenceProperties-kOmegaSST @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kOmegaSST; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/turbulentFlatPlate/constant/turbulenceProperties.orig b/tutorials/incompressible/simpleFoam/turbulentFlatPlate/constant/turbulenceProperties.orig new file mode 100644 index 0000000000..6558e655e6 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/turbulentFlatPlate/constant/turbulenceProperties.orig @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel xxx; + turbulence on; + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/turbulentFlatPlate/plot b/tutorials/incompressible/simpleFoam/turbulentFlatPlate/plot new file mode 100755 index 0000000000..63e451a6d9 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/turbulentFlatPlate/plot @@ -0,0 +1,26 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +Uinf=$1 +nuInf=$2 +model=$3 +yp=$4 +gnuplot<