diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/Allrun b/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/Allrun deleted file mode 100755 index 044ebd3709..0000000000 --- a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/Allrun +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -cd "${0%/*}" || exit # Run from this directory -. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions -#------------------------------------------------------------------------------ - -runApplication blockMesh - -#- Run serial -#runApplication $(getApplication) - -#- Run parallel -runApplication decomposePar -cellDist -runParallel $(getApplication) -#runApplication reconstructPar -latestTime - -#------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/README b/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/README deleted file mode 100644 index 5763359c07..0000000000 --- a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/README +++ /dev/null @@ -1,18 +0,0 @@ -Channel test case for ReTau=395,based on the reference: - - Poletto, R., Craft, T., and Revell, A., - "A New Divergence Free Synthetic Eddy Method for the - Reproduction of Inlet Flow Conditions for LES", - Flow Turbulence Combust (2013) 91:519-539 - - -Inlet patch Reynolds stress, velocity and turbulence length scale data has been -extracted from DNS data of: - - Moser, Kim & Mansour - "DNS of Turbulent Channel Flow up to Re_tau=590", - Physics of Fluids (1999) vol 11, 943-945. - -Data available from (last checked 28 June 2016) - - http://turbulence.ices.utexas.edu/MKM_1999.html diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/boundaryData/inlet/0/L b/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/boundaryData/inlet/0/L deleted file mode 100644 index 9c6e3ab67d..0000000000 --- a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/boundaryData/inlet/0/L +++ /dev/null @@ -1,259 +0,0 @@ -( -0 -1.76693e-06 -1.06447e-07 -2.85582e-08 -1.73393e-08 -3.56243e-08 -3.79499e-08 -1.50479e-07 -1.55614e-07 -1.93408e-07 -4.50118e-08 -2.6295e-10 -6.18128e-08 -4.4709e-08 -5.98657e-07 -2.25711e-06 -4.20946e-06 -6.292e-06 -7.5414e-06 -9.02814e-06 -1.04737e-05 -1.25187e-05 -1.37559e-05 -1.40338e-05 -1.24681e-05 -1.08272e-05 -9.10144e-06 -7.81661e-06 -6.08627e-06 -4.68729e-06 -3.01241e-06 -1.93855e-06 -1.03945e-06 -2.49601e-07 -2.33919e-07 -3.47823e-08 -3.05604e-06 -8.25413e-06 -1.04748e-05 -1.36651e-05 -2.35252e-05 -3.87371e-05 -5.21582e-05 -6.71737e-05 -6.89399e-05 -4.57512e-05 -1.94891e-05 -9.7778e-06 -1.47858e-05 -3.40409e-05 -6.06823e-05 -8.59513e-05 -8.29571e-05 -5.42278e-05 -3.46015e-05 -2.20432e-05 -1.73878e-05 -1.05749e-05 -4.67814e-06 -8.66793e-06 -1.79361e-05 -1.22464e-05 -3.93103e-06 -1.00778e-06 -1.81983e-06 -2.70815e-05 -9.56468e-05 -0.000139304 -0.00012493 -9.50459e-05 -4.78307e-05 -8.71962e-06 -1.24275e-05 -4.91383e-05 -8.77264e-05 -0.000114449 -0.00014567 -0.000201758 -0.000251863 -0.000272594 -0.000213599 -0.000145126 -0.000115603 -0.000122779 -0.000116865 -8.36843e-05 -4.06009e-05 -3.49149e-05 -5.22978e-05 -5.07525e-05 -2.5995e-05 -2.6683e-06 -9.29144e-06 -1.14821e-05 -9.41939e-06 -1.01946e-05 -6.64024e-06 -1.1913e-06 -3.25066e-06 -8.47834e-06 -1.42023e-06 -4.30742e-05 -0.000106228 -0.000115468 -9.07632e-05 -7.04511e-05 -9.21776e-05 -0.000104486 -0.000111678 -0.000109852 -0.000111867 -9.10747e-05 -6.82206e-05 -4.09085e-05 -2.3961e-05 -2.0467e-06 -7.74345e-06 -1.66716e-05 -1.54967e-05 -2.95089e-05 -4.82299e-05 -6.99781e-05 -7.16947e-05 -7.33475e-05 -7.40551e-05 -9.45846e-05 -0.000107202 -0.000120068 -0.000122517 -0.000120068 -0.000107202 -9.45846e-05 -7.40551e-05 -7.33475e-05 -7.16947e-05 -6.99781e-05 -4.82299e-05 -2.95089e-05 -1.54967e-05 -1.66716e-05 -7.74345e-06 -2.0467e-06 -2.3961e-05 -4.09085e-05 -6.82206e-05 -9.10747e-05 -0.000111867 -0.000109852 -0.000111678 -0.000104486 -9.21776e-05 -7.04511e-05 -9.07632e-05 -0.000115468 -0.000106228 -4.30742e-05 -1.42023e-06 -8.47834e-06 -3.25066e-06 -1.1913e-06 -6.64024e-06 -1.01946e-05 -9.41939e-06 -1.14821e-05 -9.29144e-06 -2.6683e-06 -2.5995e-05 -5.07525e-05 -5.22978e-05 -3.49149e-05 -4.06009e-05 -8.36843e-05 -0.000116865 -0.000122779 -0.000115603 -0.000145126 -0.000213599 -0.000272594 -0.000251863 -0.000201758 -0.00014567 -0.000114449 -8.77264e-05 -4.91383e-05 -1.24275e-05 -8.71962e-06 -4.78307e-05 -9.50459e-05 -0.00012493 -0.000139304 -9.56468e-05 -2.70815e-05 -1.81983e-06 -1.00778e-06 -3.93103e-06 -1.22464e-05 -1.79361e-05 -8.66793e-06 -4.67814e-06 -1.05749e-05 -1.73878e-05 -2.20432e-05 -3.46015e-05 -5.42278e-05 -8.29571e-05 -8.59513e-05 -6.06823e-05 -3.40409e-05 -1.47858e-05 -9.7778e-06 -1.94891e-05 -4.57512e-05 -6.89399e-05 -6.71737e-05 -5.21582e-05 -3.87371e-05 -2.35252e-05 -1.36651e-05 -1.04748e-05 -8.25413e-06 -3.05604e-06 -3.47823e-08 -2.33919e-07 -2.49601e-07 -1.03945e-06 -1.93855e-06 -3.01241e-06 -4.68729e-06 -6.08627e-06 -7.81661e-06 -9.10144e-06 -1.08272e-05 -1.24681e-05 -1.40338e-05 -1.37559e-05 -1.25187e-05 -1.04737e-05 -9.02814e-06 -7.5414e-06 -6.292e-06 -4.20946e-06 -2.25711e-06 -5.98657e-07 -4.4709e-08 -6.18128e-08 -2.6295e-10 -4.50118e-08 -1.93408e-07 -1.55614e-07 -1.50479e-07 -3.79499e-08 -3.56243e-08 -1.73393e-08 -2.85582e-08 -1.06447e-07 -1.76693e-06 -0 -) diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/transportProperties b/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/transportProperties deleted file mode 100644 index 59b97fc4a8..0000000000 --- a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/transportProperties +++ /dev/null @@ -1,31 +0,0 @@ -/*--------------------------------*- 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; - location "constant"; - object transportProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -transportModel Newtonian; - -// Re_tau = u_tau L / nu -// Re_tau = 395 -// L = half channel height = 1 -// Ubulk/u_tau = 17.55 -// U_bulk = 17.55 -> u_tau = 1 -// -> nu = 1*1/395 = 2.532e-3 - -nu 2.532e-3; - - - -// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/system/controlDict b/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/system/controlDict deleted file mode 100644 index 2e0e3f8c4e..0000000000 --- a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/system/controlDict +++ /dev/null @@ -1,127 +0,0 @@ -/*--------------------------------*- 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; - location "system"; - object controlDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -application pimpleFoam; - -startFrom startTime; - -startTime 0; - -stopAt endTime; - -endTime 85; - -deltaT 4e-3; - -writeControl timeStep; - -writeInterval 25; - -purgeWrite 10; - -writeFormat ascii; - -writePrecision 6; - -writeCompression off; - -timeFormat general; - -timePrecision 6; - -runTimeModifiable true; - -// Allow 10% run-up before calculating mean -timeStart #eval{ 0.1 * ${/endTime} }; - - -functions -{ - Q1 - { - type Q; - libs (fieldFunctionObjects); - writeControl writeTime; - } - vorticity1 - { - type vorticity; - libs (fieldFunctionObjects); - writeControl writeTime; - } - yPlus - { - type yPlus; - libs (fieldFunctionObjects); - writeControl writeTime; - } - LambVector1 - { - type LambVector; - libs (fieldFunctionObjects); - writeControl writeTime; - field U; - } - div1 - { - type div; - libs (fieldFunctionObjects); - writeControl writeTime; - field LambVector; - } - fieldAverage1 - { - type fieldAverage; - libs (fieldFunctionObjects); - writeControl writeTime; - timeStart ${/timeStart}; - - fields - ( - U - { - mean on; - prime2Mean on; - base time; - } - - p - { - mean on; - prime2Mean on; - base time; - } - - LambVector - { - mean on; - prime2Mean off; - base time; - } - - div(LambVector) - { - mean on; - prime2Mean off; - base time; - } - ); - } -} - - -// ************************************************************************* // diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/Allclean b/tutorials/incompressible/pimpleFoam/LES/planeChannel/Allclean similarity index 76% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/Allclean rename to tutorials/incompressible/pimpleFoam/LES/planeChannel/Allclean index 3d330958d1..eeacff1e29 100755 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/Allclean +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/Allclean @@ -5,10 +5,10 @@ cd "${0%/*}" || exit # Run from this directory cleanCase0 -rm -f system/controlDict -rm -rf constant/boundaryData/inlet +rm -rf 0.orig +rm -rf constant +rm -rf system rm -rf results -rm -f *.png -rm -f constant/{R*,points*,UMean*} +rm -rf plots #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/LES/planeChannel/Allrun b/tutorials/incompressible/pimpleFoam/LES/planeChannel/Allrun new file mode 100755 index 0000000000..362ed042d5 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/Allrun @@ -0,0 +1,121 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions +#------------------------------------------------------------------------------ + +# settings + + # operand setups + setups=" + DFSEM + " + + # flag to enable computations in parallel mode + parallel=true + + +#------------------------------------------------------------------------------ + +####################################### +# Collect results into a given path +# and clean the case for the next run +# Arguments: +# $1 = Path to move results +# Outputs: +# Writes info to stdout +####################################### +collect() { + + [ $# -eq 0 ] && { echo "Usage: $0 dir-model"; exit 1; } + + collection="$1" + + dirResult=results/"$collection" + dirSettings="$dirResult"/settings + + if [ ! -d "$dirResult" ] + then + + echo " # Collecting results and settings into $dirResult" + + mkdir -p "$dirResult" + mkdir -p "$dirSettings" + + mv -f $(foamListTimes) "$dirResult" + [ -d postProcessing ] && mv -f postProcessing "$dirResult" + [ -d processor0 ] && mv -f processor* "$dirResult" + mv -f log.* "$dirResult" + cp -f system/{fv*,controlDict} constant/*Properties "$dirSettings" + mv -f 0/ "$dirSettings" + + echo " # Cleaning up the case" + + cleanTimeDirectories + cleanPostProcessing + + else + + echo " # Directory $dirResult already exists" + echo " # Skipping the computation" + + fi +} + + +#------------------------------------------------------------------------------ + +for setup in $setups +do + + echo "" + echo "# Computations for the setup: $setup" + echo "" + + dirSetup="setups.orig/$setup" + cp -rfL "$dirSetup/0.orig" . + cp -rfL "$dirSetup/constant" . + cp -rfL "$dirSetup/system" . + cp -rf 0.orig/ 0/ + + if [ ! -d constant/polyMesh ] + then + + runApplication blockMesh + + runApplication renumberMesh -overwrite -constant + + runApplication checkMesh -allTopology -allGeometry -constant + + fi + + if [ "$parallel" = true ] + then + + runApplication decomposePar + + runParallel $(getApplication) + + runApplication reconstructPar + + else + + runApplication $(getApplication) + + fi + + runApplication -s columnAverage \ + postProcess -func columnAverage -latestTime + + runApplication -s sample \ + postProcess -func sample -latestTime + + runApplication -s skinFriction \ + postProcess -func sampleCf -latestTime + + collect "$setup" + +done + + +#------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/LES/planeChannel/plot b/tutorials/incompressible/pimpleFoam/LES/planeChannel/plot new file mode 100755 index 0000000000..285e04a8a9 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/plot @@ -0,0 +1,607 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +#------------------------------------------------------------------------------ + +# settings + + # operand setups + setups=" + DFSEM + " + + +#------------------------------------------------------------------------------ + +plot_R_vs_y() { + + setup="$1" + endTime="$2" + + # benchmarkFile="ReTau-395/dataset/chan395.reystress" + + n=0 + m=0 + for l in {1..11} + do + m=$(($m+5)) + sampleFiles[$n]="results/$setup/postProcessing/sample/$endTime/l${m}_columnAverage:columnAverage(UPrime2Mean).xy" + n=$(($n+1)) + done + + image="plots/$setup/Ruu_vs_y.png" + + gnuplot< [m^2/s^2]" + set offset .05, .05 + set output "$image" + set title "Reynolds stresses on patch" + + # Benchmark - DNS + # benchmark = "$benchmarkFile" + + # Samples - OpenFOAM + samples="$sampleFile" + + plot \ + samples u 1:2 t "" w l lw 2 lc rgb "#009E73", \ + samples u 1:5 t "" w l lw 2 lc rgb "#F0E440", \ + samples u 1:7 t "" w l lw 2 lc rgb "#0072B2", \ + samples u 1:3 t "" w l lw 2 lc rgb "#D55E00" + #benchmark u 1:3 t "_{DNS}" w l lw 2 dt 2 lc rgb "#009E73", \ + #benchmark u 1:4 t "_{DNS}" w l lw 2 dt 2 lc rgb "#F0E440", \ + #benchmark u 1:5 t "_{DNS}" w l lw 2 dt 2 lc rgb "#0072B2", \ + #benchmark u 1:6 t "_{DNS}" w l lw 2 dt 2 lc rgb "#D55E00" +PLT_R_PATCH +} + + +plot_R_cell() { + + setup="$1" + endTime="$2" + + # benchmarkFile="ReTau-395/dataset/chan395.reystress" + sampleFile="results/$setup/postProcessing/sample/$endTime/inletCell_columnAverage:columnAverage(UPrime2Mean).xy" + image="plots/$setup/R_cell.png" + + gnuplot< [m^2/s^2]" + set offset .05, .05 + set output "$image" + set title "Reynolds stresses on cell" + + # Benchmark - DNS + # benchmark = "$benchmarkFile" + + # Samples - OpenFOAM + samples="$sampleFile" + + plot \ + samples u 1:2 t "" w l lw 2 lc rgb "#009E73", \ + samples u 1:5 t "" w l lw 2 lc rgb "#F0E440", \ + samples u 1:7 t "" w l lw 2 lc rgb "#0072B2", \ + samples u 1:3 t "" w l lw 2 lc rgb "#D55E00" + #benchmark u 1:3 t "_{DNS}" w l lw 2 dt 2 lc rgb "#009E73", \ + #benchmark u 1:4 t "_{DNS}" w l lw 2 dt 2 lc rgb "#F0E440", \ + #benchmark u 1:5 t "_{DNS}" w l lw 2 dt 2 lc rgb "#0072B2", \ + #benchmark u 1:6 t "_{DNS}" w l lw 2 dt 2 lc rgb "#D55E00" +PLT_R_CELL +} + + +#------------------------------------------------------------------------------ + +# Require gnuplot +command -v gnuplot >/dev/null || { + echo "gnuplot not found - skipping graph creation" 1>&2 + exit 1 +} + +# Check directory: "results" +[ -d "results" ] || { + echo "No results directory found - skipping graph creation" 1>&2 + exit 1 +} + + +#------------------------------------------------------------------------------ + +for setup in $setups +do + + echo "" + echo "# Plots for the setup: $setup" + echo "" + + dirPlots="plots/$setup" + [ -d "$dirPlots" ] || mkdir -p "$dirPlots" + + # few manipulations + endTime=$(foamDictionary results/$setup/settings/controlDict -entry endTime -value) + nu=$(foamDictionary results/$setup/settings/transportProperties -entry nu | sed 's|^.*\s\(.*\);|\1|g') + + plot_yPlus_vs_u "$setup" "$endTime" "$nu" + + plot_yPlus_vs_R_patch "$setup" "$endTime" "$nu" + + plot_yPlus_vs_R_cell "$setup" "$endTime" "$nu" + + plot_R_patch "$setup" "$endTime" + + plot_R_cell "$setup" "$endTime" + + plot_R_vs_y "$setup" "$endTime" + + plot_U_vs_y "$setup" "$endTime" + + plot_x_vs_cf "$setup" "$endTime" + +done + + +#------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/0.orig/U b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/0.orig/U new file mode 100644 index 0000000000..8813ac716b --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/0.orig/U @@ -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 volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (17.55 0 0); + +boundaryField +{ + inlet + { + type turbulentDFSEMInlet; + delta 1; + U + { + type mappedFile; + mapMethod nearest; + } + R + { + type mappedFile; + mapMethod nearest; + } + L + { + type mappedFile; + mapMethod nearest; + } + + d 1; + nCellPerEddy 1; + scale 1; + value $internalField; + } + + outlet + { + type advective; + value $internalField; + } + + "(bottom|top)" + { + type noSlip; + } + + "(left|right)" + { + type cyclic; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/0.orig/nut b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/0.orig/nut new file mode 120000 index 0000000000..8186897dc1 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/0.orig/nut @@ -0,0 +1 @@ +../../common/0.orig/nut \ No newline at end of file diff --git a/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/0.orig/p b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/0.orig/p new file mode 120000 index 0000000000..d1e1225671 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/0.orig/p @@ -0,0 +1 @@ +../../common/0.orig/p \ No newline at end of file diff --git a/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/constant/boundaryData/inlet/0/L b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/constant/boundaryData/inlet/0/L new file mode 100644 index 0000000000..629a2101b3 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/constant/boundaryData/inlet/0/L @@ -0,0 +1,259 @@ +( +1.6760001447599677e-43 +1.0868009617044407e-08 +6.96632299316915e-07 +7.964006730807538e-06 +4.4886053894517664e-05 +0.00017142819717599743 +0.0005109590309958684 +0.001282137130408118 +0.0028356245991423275 +0.0056945923004052415 +0.010583536322306776 +0.018389090000706376 +0.029956201643692996 +0.04567240383684011 +0.06499017109073807 +0.0863645775310708 +0.10780875116479441 +0.12771755696515344 +0.1453567712304755 +0.16062365567853595 +0.17380736699507915 +0.18524165214197616 +0.19522234333586158 +0.20396794244081784 +0.21161151098126862 +0.2182925640222298 +0.22425210908087323 +0.22980954591037686 +0.2352612116306475 +0.24076016447211382 +0.24635042180862582 +0.25215417623227027 +0.2581319159366946 +0.2642162232341277 +0.2705976827635888 +0.2775262136577681 +0.2851339428170316 +0.29320770439789223 +0.30169588718043017 +0.3104960794811366 +0.3194954534280035 +0.3286450052926366 +0.3378100136077759 +0.3471174687143672 +0.3562151631412292 +0.36527552859716594 +0.37494504798108247 +0.38502865612338205 +0.3952322027438534 +0.40553467840927804 +0.41578800746270134 +0.4264058548357003 +0.43712919288926017 +0.44842576293128633 +0.46008767937618383 +0.4714866924807228 +0.4827246039731494 +0.49330673743341724 +0.5036846762826384 +0.5140216569857357 +0.5243625990429793 +0.5348735169176119 +0.5446788615067326 +0.5535535437038963 +0.5615373928208507 +0.5689987179058951 +0.5773301273285831 +0.5862857780666765 +0.5953526108855274 +0.6049390063729172 +0.6143870357093343 +0.6221292179475515 +0.6288137731042791 +0.6356831550607555 +0.6428919658813926 +0.6494740048271094 +0.6558426649799869 +0.6615093242166988 +0.6667263216815766 +0.6713265835399524 +0.6760870855398617 +0.6817697212117945 +0.6868490918716819 +0.6901331296539219 +0.6934577171362739 +0.6979552723619237 +0.7038154195965829 +0.7108862054012115 +0.7172470897092121 +0.7224010326710795 +0.727453975349662 +0.731494652619959 +0.7349775398199252 +0.7370734048228417 +0.737434256293814 +0.7365824697737319 +0.7350609217033188 +0.7329836659249739 +0.730256405839164 +0.7283242805479961 +0.726231012899943 +0.7235685746646292 +0.7213160623172862 +0.7194814238726635 +0.7166228475003421 +0.7120932098489855 +0.7068169772751501 +0.702036389755952 +0.697518544808241 +0.6937121394109932 +0.6904454421400188 +0.6866438800820893 +0.6818576320301258 +0.6766627824128105 +0.6727179770747246 +0.6689431320803964 +0.6631717982054145 +0.6561721428602678 +0.6481600843658191 +0.6405213608738373 +0.6341476825999275 +0.6280008937349648 +0.6214551987295783 +0.6145563256095296 +0.6071697457595765 +0.6005761440226519 +0.5951460432382282 +0.5923426315298634 +0.5915671133699071 +0.5923426315298634 +0.5951460432382282 +0.6005761440226519 +0.6071697457595765 +0.6145563256095296 +0.6214551987295783 +0.6280008937349648 +0.6341476825999275 +0.6405213608738373 +0.6481600843658191 +0.6561721428602678 +0.6631717982054145 +0.6689431320803964 +0.6727179770747246 +0.6766627824128105 +0.6818576320301258 +0.6866438800820893 +0.6904454421400188 +0.6937121394109932 +0.697518544808241 +0.702036389755952 +0.7068169772751501 +0.7120932098489855 +0.7166228475003421 +0.7194814238726635 +0.7213160623172862 +0.7235685746646292 +0.726231012899943 +0.7283242805479961 +0.730256405839164 +0.7329836659249739 +0.7350609217033188 +0.7365824697737319 +0.737434256293814 +0.7370734048228417 +0.7349775398199252 +0.731494652619959 +0.727453975349662 +0.7224010326710795 +0.7172470897092121 +0.7108862054012115 +0.7038154195965829 +0.6979552723619237 +0.6934577171362739 +0.6901331296539219 +0.6868490918716819 +0.6817697212117945 +0.6760870855398617 +0.6713265835399524 +0.6667263216815766 +0.6615093242166988 +0.6558426649799869 +0.6494740048271094 +0.6428919658813926 +0.6356831550607555 +0.6288137731042791 +0.6221292179475515 +0.6143870357093343 +0.6049390063729172 +0.5953526108855274 +0.5862857780666765 +0.5773301273285831 +0.5689987179058951 +0.5615373928208507 +0.5535535437038963 +0.5446788615067326 +0.5348735169176119 +0.5243625990429793 +0.5140216569857357 +0.5036846762826384 +0.49330673743341724 +0.4827246039731494 +0.4714866924807228 +0.46008767937618383 +0.44842576293128633 +0.43712919288926017 +0.4264058548357003 +0.41578800746270134 +0.40553467840927804 +0.3952322027438534 +0.38502865612338205 +0.37494504798108247 +0.36527552859716594 +0.3562151631412292 +0.3471174687143672 +0.3378100136077759 +0.3286450052926366 +0.3194954534280035 +0.3104960794811366 +0.30169588718043017 +0.29320770439789223 +0.2851339428170316 +0.2775262136577681 +0.2705976827635888 +0.2642162232341277 +0.2581319159366946 +0.25215417623227027 +0.24635042180862582 +0.24076016447211382 +0.2352612116306475 +0.22980954591037686 +0.22425210908087323 +0.2182925640222298 +0.21161151098126862 +0.20396794244081784 +0.19522234333586158 +0.18524165214197616 +0.17380736699507915 +0.16062365567853595 +0.1453567712304755 +0.12771755696515344 +0.10780875116479441 +0.0863645775310708 +0.06499017109073807 +0.04567240383684011 +0.029956201643692996 +0.018389090000706376 +0.010583536322306776 +0.0056945923004052415 +0.0028356245991423275 +0.001282137130408118 +0.0005109590309958684 +0.00017142819717599743 +4.4886053894517664e-05 +7.964006730807538e-06 +6.96632299316915e-07 +1.0868009617044407e-08 +1.6760001447599677e-43 +) diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/boundaryData/inlet/0/R b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/constant/boundaryData/inlet/0/R similarity index 100% rename from tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/boundaryData/inlet/0/R rename to tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/constant/boundaryData/inlet/0/R diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/boundaryData/inlet/0/U b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/constant/boundaryData/inlet/0/U similarity index 100% rename from tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/boundaryData/inlet/0/U rename to tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/constant/boundaryData/inlet/0/U diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/boundaryData/inlet/points b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/constant/boundaryData/inlet/points similarity index 100% rename from tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/boundaryData/inlet/points rename to tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/constant/boundaryData/inlet/points diff --git a/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/constant/transportProperties b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/constant/transportProperties new file mode 120000 index 0000000000..e6a4e4f7fc --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/constant/transportProperties @@ -0,0 +1 @@ +../../common/constant/transportProperties \ No newline at end of file diff --git a/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/constant/turbulenceProperties b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/constant/turbulenceProperties new file mode 120000 index 0000000000..f9d514a2f3 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/constant/turbulenceProperties @@ -0,0 +1 @@ +../../common/constant/turbulenceProperties \ No newline at end of file diff --git a/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/system b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/system new file mode 120000 index 0000000000..8ed134fc8c --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/DFSEM/system @@ -0,0 +1 @@ +../common/system/ \ No newline at end of file diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/0.orig/nut b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/0.orig/nut similarity index 94% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/0.orig/nut rename to tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/0.orig/nut index 86ae3bf1ce..c373efb05d 100644 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/0.orig/nut +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/0.orig/nut @@ -20,21 +20,21 @@ internalField uniform 0; boundaryField { - "bottomWall|topWall" + "(inlet|outlet)" + { + type calculated; + value uniform 1e-08; + } + + "(bottom|top)" { type zeroGradient; } - "left|right" + "(left|right)" { type cyclic; } - - "inlet|outlet" - { - type calculated; - value uniform 1e-08; - } } diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/0.orig/p b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/0.orig/p similarity index 91% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/0.orig/p rename to tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/0.orig/p index 567150c189..e0e385c84a 100644 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/0.orig/p +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/0.orig/p @@ -20,14 +20,14 @@ internalField uniform 0; boundaryField { - "bottomWall|topWall|inlet" + inlet { type zeroGradient; } - "left|right" + "(bottom|top)" { - type cyclic; + type zeroGradient; } outlet @@ -35,6 +35,11 @@ boundaryField type fixedValue; value $internalField; } + + "(left|right)" + { + type cyclic; + } } diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/constant/transportProperties b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/constant/transportProperties similarity index 82% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/constant/transportProperties rename to tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/constant/transportProperties index 51c4183ab5..02df114946 100644 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/constant/transportProperties +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/constant/transportProperties @@ -10,19 +10,13 @@ FoamFile version 2.0; format ascii; class dictionary; - location "constant"; object transportProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // transportModel Newtonian; -// ReTau = uTau delta / nuFluid -// ReTau = 395 [-] -// delta = half channel height = 1 [m] -// -> nuFluid = 1*1/395 = 2.532e-3 [m2/s] - -nu 2.532e-3; +nu 2.5494595145829e-3; // ************************************************************************* // diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/constant/turbulenceProperties b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/constant/turbulenceProperties similarity index 89% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/constant/turbulenceProperties rename to tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/constant/turbulenceProperties index ca87141c3f..2675f2d568 100644 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/constant/turbulenceProperties +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/constant/turbulenceProperties @@ -10,12 +10,11 @@ FoamFile version 2.0; format ascii; class dictionary; - location "constant"; object turbulenceProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType LES; +simulationType LES; LES { @@ -23,7 +22,7 @@ LES SmagorinskyCoeffs { Ce 1.048; - Ck 0.02654; // Updated to give Cs = 0.065 + Ck 0.0265463553; // Updated to give Cs = 0.065 } delta vanDriest; @@ -32,7 +31,7 @@ LES delta cubeRootVol; cubeRootVolCoeffs { - deltaCoeff 2; + deltaCoeff 1; } Aplus 26; Cdelta 0.158; diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/system/blockMeshDict b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/blockMeshDict similarity index 73% rename from tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/system/blockMeshDict rename to tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/blockMeshDict index f74c17951f..c83f74ccd0 100644 --- a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/system/blockMeshDict +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/blockMeshDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2012 | -| \\ / A nd | Website: www.openfoam.com | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -14,14 +14,13 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -mergeType topology; // Point merging is very slow - scale 1; -L #eval{ 20*pi() }; -H 1.0; -H2 #eval{ 2*$H }; -W #eval{ pi() }; +// L:length, H:height, W:width +L 60.0; +H 1.0; +H2 #eval{ 2*$H }; +W #eval{ pi() }; vertices ( @@ -42,40 +41,34 @@ vertices blocks ( - hex ( 0 1 2 5 6 7 8 11) (500 23 82) simpleGrading (1 25 1) - hex ( 5 2 3 4 11 8 9 10) (500 23 82) simpleGrading (1 -25 1) -); - -edges -( + hex ( 0 1 2 5 6 7 8 11) (600 32 70) simpleGrading (1 10.7028 1) + hex ( 5 2 3 4 11 8 9 10) (600 32 70) simpleGrading (1 -10.7028 1) ); boundary ( - bottomWall + bottom { type wall; faces ((0 6 7 1)); } - topWall + top { type wall; faces ((4 3 9 10)); } - - sides_half0 + left { type cyclic; - neighbourPatch sides_half1; + neighbourPatch right; faces ((1 2 5 0)(2 3 4 5)); } - sides_half1 + right { type cyclic; - neighbourPatch sides_half0; + neighbourPatch left; faces ((6 11 8 7)(11 10 9 8)); } - inlet { type patch; @@ -88,8 +81,5 @@ boundary } ); -mergePatchPairs -( -); // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/columnAverage b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/columnAverage new file mode 100644 index 0000000000..7a61f2956a --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/columnAverage @@ -0,0 +1,13 @@ +// -*- C++ -*- + +type columnAverage; +libs (fieldFunctionObjects); + +patches ( left ); +fields ( UPrime2Mean UMean ); + +executeControl onEnd; +writeControl onEnd; + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/controlDict b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/controlDict new file mode 100644 index 0000000000..1e04bedb54 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/controlDict @@ -0,0 +1,164 @@ +/*--------------------------------*- 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; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application pisoFoam; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 10; // 180; + +deltaT 2e-3; + +writeControl timeStep; + +writeInterval 1000; + +purgeWrite 3; + +writeFormat binary; + +writePrecision 8; + +writeCompression off; + +timeFormat general; + +timePrecision 8; + +runTimeModifiable false; + +adjustTimeStep false; + +// Allow one-third of time for initialisation before sampling +timeStart #eval #{ 1.0/3.0 * ${/endTime} #}; + +functions +{ + wallShearStress + { + type wallShearStress; + libs (fieldFunctionObjects); + patches ( bottom top ); + writePrecision 10; + writeToFile yes; + log yes; + executeControl timeStep; + executeInterval 1; + writeControl writeTime; + timeStart $/timeStart; + } + + Cf + { + type coded; + libs (utilityFunctionObjects); + name Cf; + writeControl writeTime; + + codeExecute + #{ + static autoPtr Cf; + if + ( + mesh().time().timeIndex() == 1 + || + mesh().time().startTimeIndex() == mesh().time().timeIndex() - 1 + ) + { + Info<< "Create skin-friction coefficient field" << nl; + Cf.set + ( + new volScalarField + ( + IOobject + ( + "Cf", + mesh().time().timeName(), + mesh(), + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh(), + dimless + ) + ); + } + + if + ( + mesh().time().timeIndex() != 1 + && mesh().time().timeIndex() > 3 // 60 // = timeStart + ) + { + Info<< "Computing skin-friction coefficient field" << endl; + + const auto& tau = + mesh().lookupObject("wallShearStress"); + auto& Cf = mesh().lookupObjectRef("Cf"); + + const dimensionedScalar Ubulk(dimVelocity, 17.55); + + Cf = mag(tau.component(0))/(0.5*sqr(Ubulk)); + } + #}; + } + + fieldAverage1 + { + type fieldAverage; + libs (fieldFunctionObjects); + timeStart $/timeStart; + writeControl writeTime; + + fields + ( + U + { + mean on; + prime2Mean on; + base time; + } + + p + { + mean on; + prime2Mean on; + base time; + } + + wallShearStress + { + mean on; + prime2Mean off; + base time; + } + + Cf + { + mean on; + prime2Mean off; + base time; + } + ); + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/system/decomposeParDict b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/decomposeParDict similarity index 90% rename from tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/system/decomposeParDict rename to tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/decomposeParDict index 1e12212b78..e1eba4e011 100644 --- a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/system/decomposeParDict +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/decomposeParDict @@ -14,14 +14,9 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -numberOfSubdomains 8; +numberOfSubdomains 36; -method hierarchical; - -coeffs -{ - n (4 2 1); -} +method scotch; // ************************************************************************* // diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/system/fvSchemes b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/fvSchemes similarity index 78% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/system/fvSchemes rename to tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/fvSchemes index a777dae924..2e1a721683 100644 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/system/fvSchemes +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/fvSchemes @@ -10,7 +10,6 @@ FoamFile version 2.0; format ascii; class dictionary; - location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -22,23 +21,21 @@ ddtSchemes gradSchemes { - default leastSquares; + default Gauss linear; } divSchemes { default none; + div(phi,U) Gauss linear; - div(phi,k) Gauss limitedLinear 0.1; - div(phi,B) Gauss limitedLinear 0.1; - div(B) Gauss linear; - div(phi,nuTilda) Gauss limitedLinear 0.1; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { - default Gauss linear corrected; + default Gauss linear orthogonal; } interpolationSchemes @@ -48,7 +45,7 @@ interpolationSchemes snGradSchemes { - default corrected; + default orthogonal; } diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/system/fvSolution b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/fvSolution similarity index 83% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/system/fvSolution rename to tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/fvSolution index c12dd6a214..44a6f6f6a7 100644 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/system/fvSolution +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/fvSolution @@ -10,7 +10,6 @@ FoamFile version 2.0; format ascii; class dictionary; - location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -20,13 +19,13 @@ solvers p { solver GAMG; - tolerance 0; - relTol 0.01; smoother DICGaussSeidel; + tolerance 1e-06; + relTol 0.001; nPreSweeps 0; nPostSweeps 2; cacheAgglomeration true; - nCellsInCoarsestLevel 10; + nCellsInCoarsestLevel 1000; agglomerator faceAreaPair; mergeLevels 1; } @@ -34,32 +33,32 @@ solvers pFinal { $p; - smoother DICGaussSeidel; tolerance 1e-06; relTol 0; } - "(U|k)" + U { solver PBiCG; preconditioner DILU; - tolerance 1e-05; + tolerance 1e-08; relTol 0.1; } - "(U|k)Final" + UFinal { $U; - tolerance 1e-06; + tolerance 1e-08; relTol 0; } } -PIMPLE +PISO { - nOuterCorrectors 2; - nCorrectors 1; + nCorrectors 3; nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; } diff --git a/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/sample b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/sample new file mode 100644 index 0000000000..1b802ae489 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/sample @@ -0,0 +1,214 @@ +// -*- C++ -*- + +type sets; +libs (sampling); +interpolationScheme cellPatchConstrained; +setFormat raw; + +fields +( + columnAverage:columnAverage(UMean) + columnAverage:columnAverage(UPrime2Mean) +); + +sets +( + inletPatch + { + type face; + axis y; + start (0.0 0 1.57); + end (0.0 2 1.57); + } + + inletCell + { + type midPoint; + axis y; + start (0.062832 0 1.57); + end (0.062832 2 1.57); + } + + l1 // 1, 5, 10, ... delta + { + type uniform; + axis distance; + start (0.1 0.0 1.57); + end (0.1 2.0 1.57); + nPoints 200; + } + + l5 + { + type uniform; + axis distance; + start (5.0 0.0 1.57); + end (5.0 2.0 1.57); + nPoints 200; + } + + l10 + { + type uniform; + axis distance; + start (10.0 0.0 1.57); + end (10.0 2.0 1.57); + nPoints 200; + } + + l15 + { + type uniform; + axis distance; + start (15.0 0.0 1.57); + end (15.0 2.0 1.57); + nPoints 200; + } + + l20 + { + type uniform; + axis distance; + start (20.0 0.0 1.57); + end (20.0 2.0 1.57); + nPoints 200; + } + + l25 + { + type uniform; + axis distance; + start (25.0 0.0 1.57); + end (25.0 2.0 1.57); + nPoints 200; + } + + l30 + { + type uniform; + axis distance; + start (30.0 0.0 1.57); + end (30.0 2.0 1.57); + nPoints 200; + } + + l35 + { + type uniform; + axis distance; + start (35.0 0.0 1.57); + end (35.0 2.0 1.57); + nPoints 200; + } + + l40 + { + type uniform; + axis distance; + start (40.0 0.0 1.57); + end (40.0 2.0 1.57); + nPoints 200; + } + + l45 + { + type uniform; + axis distance; + start (45.0 0.0 1.57); + end (45.0 2.0 1.57); + nPoints 200; + } + + l50 + { + type uniform; + axis distance; + start (50.0 0.0 1.57); + end (50.0 2.0 1.57); + nPoints 200; + } + + l55 + { + type uniform; + axis distance; + start (55.0 0.0 1.57); + end (55.0 2.0 1.57); + nPoints 200; + } + + Poletto0 // Poletto et al. + { + type uniform; + axis distance; + start (0.1 0.0 1.57); + end (0.1 2.0 1.57); + nPoints 200; + } + + Poletto36 + { + type uniform; + axis distance; + start (3.6 0.0 1.57); + end (3.6 2.0 1.57); + nPoints 200; + } + + Poletto75 + { + type uniform; + axis distance; + start (7.5 0.0 1.57); + end (7.5 2.0 1.57); + nPoints 200; + } + + Poletto113 + { + type uniform; + axis distance; + start (11.3 0.0 1.57); + end (11.3 2.0 1.57); + nPoints 200; + } + + Poletto151 + { + type uniform; + axis distance; + start (15.1 0.0 1.57); + end (15.1 2.0 1.57); + nPoints 200; + } + + Poletto226 + { + type uniform; + axis distance; + start (22.6 0.0 1.57); + end (22.6 2.0 1.57); + nPoints 200; + } + + Poletto302 + { + type uniform; + axis distance; + start (30.2 0.0 1.57); + end (30.2 2.0 1.57); + nPoints 200; + } + + Poletto377 + { + type uniform; + axis distance; + start (37.7 0.0 1.57); + end (37.7 2.0 1.57); + nPoints 200; + } +); + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/sampleCf b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/sampleCf new file mode 100644 index 0000000000..02cabfc87f --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/LES/planeChannel/setups.orig/common/system/sampleCf @@ -0,0 +1,34 @@ +// -*- C++ -*- + +type sets; +libs (sampling); +interpolationScheme cellPatchConstrained; +setFormat raw; +fields ( CfMean ); + +_planes +{ + type patchEdge; + axis xyz; + patches ( bottom ); + surfaceType searchablePlane; + planeType pointAndNormal; + origin ( 0 0 1.57079632679 ); +} + +sets +( + // Intersections of patches with plane + planeAA + { + ${_planes} + pointAndNormalDict + { + point ( 0 0 1.57079632679 ); + normal ( 0 0 1 ); + } + } +); + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0.orig/U b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0.orig/U index 0d69b23ef9..6148dba3d1 100644 --- a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0.orig/U +++ b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/0.orig/U @@ -29,7 +29,21 @@ boundaryField type turbulentDFSEMInlet; delta 1; nCellPerEddy 3; - mapMethod nearestCell; + U + { + type mappedFile; + mapMethod nearest; + } + R + { + type mappedFile; + mapMethod nearest; + } + L + { + type mappedFile; + mapMethod nearest; + } value $internalField; } diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/0.orig/inlet.DFM/U b/tutorials/verificationAndValidation/turbulentInflow/PCF/0.orig/inlet.DFM/U deleted file mode 100644 index 552ae22f86..0000000000 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/0.orig/inlet.DFM/U +++ /dev/null @@ -1,30 +0,0 @@ -/*--------------------------------*- 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; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -inlet -{ - type turbulentDigitalFilterInlet; - n ( 64 70 ); - L - ( - 0.78035508 0.31085352 0.342261 0.1728125 0.171875 - 0.22459375 0.172787596 0.171889998 0.224578995 - ); - Ubulk 20.133; -} - - -// ************************************************************************* // diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/0.orig/inlet.FSM/U b/tutorials/verificationAndValidation/turbulentInflow/PCF/0.orig/inlet.FSM/U deleted file mode 100644 index 3312d3d5f1..0000000000 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/0.orig/inlet.FSM/U +++ /dev/null @@ -1,31 +0,0 @@ -/*--------------------------------*- 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; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -inlet -{ - type turbulentDigitalFilterInlet; - fsm true; - n ( 64 70 ); - L - ( - 0.78035508 0.31085352 0.342261 0.1728125 0.171875 - 0.22459375 0.172787596 0.171889998 0.224578995 - ); - Ubulk 20.133; -} - - -// ************************************************************************* // diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/Allrun b/tutorials/verificationAndValidation/turbulentInflow/PCF/Allrun deleted file mode 100755 index 432954f07b..0000000000 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/Allrun +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh -cd "${0%/*}" || exit # Run from this directory -. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions -. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions -#------------------------------------------------------------------------------ - -# Collect data into the 'results' directory, -# and clean the case for the next run -# -# $1 = model -# ---- -collectData(){ - model=$1 - runType=$2 - echo " Moving results into 'results/$model.$runType'" - results="results/$model.$runType" - mkdir -p "$results" - timeDir=$(foamListTimes -latestTime) - mv -f log* *.png postProcessing "$timeDir" "$results" 2>/dev/null - - cleanTimeDirectories - rm -rf processor* > /dev/null 2>&1 -} - - -# Compute the case in 'serial' mode, -# and collect the data -# -# $* = models -# ---- -serialRun(){ - models=$* - for model in $models - do - echo " Running with the synthetic turbulence model: $model" - (cd 0 && ln -snf "inlet.$model" inlet) - (cd constant/boundaryData && ln -snf "inlet.$model" inlet) - - runApplication -s "$model" $(getApplication) - ./plot - collectData $model "serial" - done -} - - -# Compute the case in 'parallel' mode, -# and collect the data -# -# $* = models -# ---- -parallelRun(){ - models=$* - for model in $models - do - echo " Running with the synthetic turbulence model: $model" - (cd 0 && ln -snf "inlet.$model" inlet) - (cd constant/boundaryData && ln -snf "inlet.$model" inlet) - - runApplication -s "$model" decomposePar -force - runParallel -s "$model" $(getApplication) - runApplication -s "$model" reconstructPar -latestTime - ./plot - collectData $model "parallel" - done -} - - -#------------------------------------------------------------------------------ - -# Prepare the numerical setup -./Allrun.pre - -# Run with the synthetic turbulence models -models=" -FSM -DFM -DFSEM -" - -parallelRun $models - -serialRun $models - -#------------------------------------------------------------------------------ diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/README b/tutorials/verificationAndValidation/turbulentInflow/PCF/README deleted file mode 100644 index 7534555086..0000000000 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/README +++ /dev/null @@ -1,32 +0,0 @@ -#------------------------------------------------------------------------------ - -The following three synthetic turbulence inflow boundary conditions are -examined through a single-cell-domain smooth-wall plane channel flow setup: - -- turbulentDFSEMInlet (DFSEM) -- turbulentDigitalFilterInlet (DFM) -- turbulentDigitalFilterInlet with the forward-stepwise method (FSM) - -The input statistics are obtained from: - - Moser, R. D., Kim, J., & Mansour, N. N. (1999). - Direct numerical simulation of turbulent channel flow up to Reτ=590. - Physics of fluids, 11(4), 943-945. - DOI:10.1063/1.869966 - -from which the input first-/second-order turbulence statistics data for the -smooth-wall plane channel flow at ReTau=395 were used. - -The data is available online from (Retrieved: 21-06-2019): - - https://turbulence.oden.utexas.edu/data/MKM/chan395/ - -Executing: - -./Allrun - -The script will run the test case, and collect the plots and samples into -the 'results' directory. - - -#------------------------------------------------------------------------------ diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.DFSEM/0/L b/tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.DFSEM/0/L deleted file mode 100644 index 9c6e3ab67d..0000000000 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.DFSEM/0/L +++ /dev/null @@ -1,259 +0,0 @@ -( -0 -1.76693e-06 -1.06447e-07 -2.85582e-08 -1.73393e-08 -3.56243e-08 -3.79499e-08 -1.50479e-07 -1.55614e-07 -1.93408e-07 -4.50118e-08 -2.6295e-10 -6.18128e-08 -4.4709e-08 -5.98657e-07 -2.25711e-06 -4.20946e-06 -6.292e-06 -7.5414e-06 -9.02814e-06 -1.04737e-05 -1.25187e-05 -1.37559e-05 -1.40338e-05 -1.24681e-05 -1.08272e-05 -9.10144e-06 -7.81661e-06 -6.08627e-06 -4.68729e-06 -3.01241e-06 -1.93855e-06 -1.03945e-06 -2.49601e-07 -2.33919e-07 -3.47823e-08 -3.05604e-06 -8.25413e-06 -1.04748e-05 -1.36651e-05 -2.35252e-05 -3.87371e-05 -5.21582e-05 -6.71737e-05 -6.89399e-05 -4.57512e-05 -1.94891e-05 -9.7778e-06 -1.47858e-05 -3.40409e-05 -6.06823e-05 -8.59513e-05 -8.29571e-05 -5.42278e-05 -3.46015e-05 -2.20432e-05 -1.73878e-05 -1.05749e-05 -4.67814e-06 -8.66793e-06 -1.79361e-05 -1.22464e-05 -3.93103e-06 -1.00778e-06 -1.81983e-06 -2.70815e-05 -9.56468e-05 -0.000139304 -0.00012493 -9.50459e-05 -4.78307e-05 -8.71962e-06 -1.24275e-05 -4.91383e-05 -8.77264e-05 -0.000114449 -0.00014567 -0.000201758 -0.000251863 -0.000272594 -0.000213599 -0.000145126 -0.000115603 -0.000122779 -0.000116865 -8.36843e-05 -4.06009e-05 -3.49149e-05 -5.22978e-05 -5.07525e-05 -2.5995e-05 -2.6683e-06 -9.29144e-06 -1.14821e-05 -9.41939e-06 -1.01946e-05 -6.64024e-06 -1.1913e-06 -3.25066e-06 -8.47834e-06 -1.42023e-06 -4.30742e-05 -0.000106228 -0.000115468 -9.07632e-05 -7.04511e-05 -9.21776e-05 -0.000104486 -0.000111678 -0.000109852 -0.000111867 -9.10747e-05 -6.82206e-05 -4.09085e-05 -2.3961e-05 -2.0467e-06 -7.74345e-06 -1.66716e-05 -1.54967e-05 -2.95089e-05 -4.82299e-05 -6.99781e-05 -7.16947e-05 -7.33475e-05 -7.40551e-05 -9.45846e-05 -0.000107202 -0.000120068 -0.000122517 -0.000120068 -0.000107202 -9.45846e-05 -7.40551e-05 -7.33475e-05 -7.16947e-05 -6.99781e-05 -4.82299e-05 -2.95089e-05 -1.54967e-05 -1.66716e-05 -7.74345e-06 -2.0467e-06 -2.3961e-05 -4.09085e-05 -6.82206e-05 -9.10747e-05 -0.000111867 -0.000109852 -0.000111678 -0.000104486 -9.21776e-05 -7.04511e-05 -9.07632e-05 -0.000115468 -0.000106228 -4.30742e-05 -1.42023e-06 -8.47834e-06 -3.25066e-06 -1.1913e-06 -6.64024e-06 -1.01946e-05 -9.41939e-06 -1.14821e-05 -9.29144e-06 -2.6683e-06 -2.5995e-05 -5.07525e-05 -5.22978e-05 -3.49149e-05 -4.06009e-05 -8.36843e-05 -0.000116865 -0.000122779 -0.000115603 -0.000145126 -0.000213599 -0.000272594 -0.000251863 -0.000201758 -0.00014567 -0.000114449 -8.77264e-05 -4.91383e-05 -1.24275e-05 -8.71962e-06 -4.78307e-05 -9.50459e-05 -0.00012493 -0.000139304 -9.56468e-05 -2.70815e-05 -1.81983e-06 -1.00778e-06 -3.93103e-06 -1.22464e-05 -1.79361e-05 -8.66793e-06 -4.67814e-06 -1.05749e-05 -1.73878e-05 -2.20432e-05 -3.46015e-05 -5.42278e-05 -8.29571e-05 -8.59513e-05 -6.06823e-05 -3.40409e-05 -1.47858e-05 -9.7778e-06 -1.94891e-05 -4.57512e-05 -6.89399e-05 -6.71737e-05 -5.21582e-05 -3.87371e-05 -2.35252e-05 -1.36651e-05 -1.04748e-05 -8.25413e-06 -3.05604e-06 -3.47823e-08 -2.33919e-07 -2.49601e-07 -1.03945e-06 -1.93855e-06 -3.01241e-06 -4.68729e-06 -6.08627e-06 -7.81661e-06 -9.10144e-06 -1.08272e-05 -1.24681e-05 -1.40338e-05 -1.37559e-05 -1.25187e-05 -1.04737e-05 -9.02814e-06 -7.5414e-06 -6.292e-06 -4.20946e-06 -2.25711e-06 -5.98657e-07 -4.4709e-08 -6.18128e-08 -2.6295e-10 -4.50118e-08 -1.93408e-07 -1.55614e-07 -1.50479e-07 -3.79499e-08 -3.56243e-08 -1.73393e-08 -2.85582e-08 -1.06447e-07 -1.76693e-06 -0 -) diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/plot b/tutorials/verificationAndValidation/turbulentInflow/PCF/plot deleted file mode 100755 index adf477bce3..0000000000 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/plot +++ /dev/null @@ -1,135 +0,0 @@ -#!/bin/sh -cd "${0%/*}" || exit # Run from this directory -#------------------------------------------------------------------------------ - -plotCellR() { - timeDir=$1 - echo " Plotting the normal and Reynolds stresses on cell." - - outName="stress-cell.png" - gnuplot< [m2/s2]" - set offset .05, .05 - set output "$outName" - set title "Normal and Reynolds stresses on cell" - - input = "$timeDir/inletCell_UPrime2Mean.xy" - bench = "constant/pointsRdata" - - plot \ - input u 1:2 t "" w l lw 2 lc rgb "#009E73", \ - input u 1:5 t "" w l lw 2 lc rgb "#F0E440", \ - input u 1:7 t "" w l lw 2 lc rgb "#0072B2", \ - input u 1:3 t "" w l lw 2 lc rgb "#D55E00", \ - bench u 2:4 t "_{DNS}" w l lw 2 dt 2 lc rgb "#009E73", \ - bench u 2:7 t "_{DNS}" w l lw 2 dt 2 lc rgb "#F0E440", \ - bench u 2:9 t "_{DNS}" w l lw 2 dt 2 lc rgb "#0072B2", \ - bench u 2:5 t "_{DNS}" w l lw 2 dt 2 lc rgb "#D55E00" -PLT_CELL_R -} - - -plotPatchR() { - timeDir=$1 - echo " Plotting the normal and Reynolds stresses on inlet patch faces." - - outName="stress-patch.png" - gnuplot< [m2/s2]" - set offset .05, .05 - set output "$outName" - set title "Normal and Reynolds stresses on patch" - - input = "$timeDir/inletPatch_UPrime2Mean.xy" - bench = "constant/pointsRdata" - - plot \ - input u 1:2 t "" w l lw 2 lc rgb "#009E73", \ - input u 1:5 t "" w l lw 2 lc rgb "#F0E440", \ - input u 1:7 t "" w l lw 2 lc rgb "#0072B2", \ - input u 1:3 t "" w l lw 2 lc rgb "#D55E00", \ - bench u 2:4 t "_{DNS}" w l lw 2 dt 2 lc rgb "#009E73", \ - bench u 2:7 t "_{DNS}" w l lw 2 dt 2 lc rgb "#F0E440", \ - bench u 2:9 t "_{DNS}" w l lw 2 dt 2 lc rgb "#0072B2", \ - bench u 2:5 t "_{DNS}" w l lw 2 dt 2 lc rgb "#D55E00" -PLT_PATCH_R -} - - -plotPatchUMean() { - timeDir=$1 - echo " Plotting the streamwise mean flow speed on inlet patch faces." - - outName="u-patch.png" - gnuplot</dev/null || { - echo "gnuplot not found - skipping graph creation" 1>&2 - exit 1 -} - -# Prepare the benchmark data -cp -f constant/boundaryData/inlet/0/R constant/R -cp -f constant/boundaryData/inlet/points constant/points -cp -f constant/boundaryData/inlet.DFM/0/UMean constant/UMean -cat constant/R | tr -d '()' > constant/Rdata -cat constant/points | tr -d '()' > constant/pointsData -cat constant/UMean | tr -d '()' > constant/UMeanData -paste constant/pointsData constant/Rdata > constant/pointsRdata -paste constant/pointsData constant/UMeanData > constant/pointsUMeanData - -# The latestTime in postProcessing/sampling1 -timeDir=$(foamListTimes -case postProcessing/sampling1 -latestTime 2>/dev/null) -[ -n "$timeDir" ] || { - echo "No postProcessing/sampling1 found - skipping graph creation" 1>&2 - exit 1 -} - -timeDir="postProcessing/sampling1/$timeDir" - -plotCellR "$timeDir" -plotPatchR "$timeDir" -plotPatchUMean "$timeDir" - - -#------------------------------------------------------------------------------ diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/Allrun.pre b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/Allclean similarity index 52% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/Allrun.pre rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/Allclean index 87148fa7a5..e570da4052 100755 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/Allrun.pre +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/Allclean @@ -1,20 +1,14 @@ #!/bin/sh cd "${0%/*}" || exit # Run from this directory -. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions #------------------------------------------------------------------------------ -endTime=10 -if notTest "$@" -then - endTime=85 -fi - -sed "s|END_TIME|$endTime|g" system/controlDict.template > system/controlDict - -restore0Dir - -runApplication blockMesh +cleanCase0 +rm -rf 0.orig +rm -rf system +rm -rf constant rm -rf results +rm -rf plots #------------------------------------------------------------------------------ diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/Allrun b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/Allrun new file mode 100755 index 0000000000..460931c8e7 --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/Allrun @@ -0,0 +1,123 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions +#------------------------------------------------------------------------------ + +# setups + + # operand setups + setups=" + DFSEM + DFM + FSM + " + + # flag to enable computations in parallel mode + parallel=true + + +#------------------------------------------------------------------------------ + +####################################### +# Collect results into a given path +# and clean the case for the next run +# Arguments: +# $1 = Path to move results +# Outputs: +# Writes info to stdout +####################################### +collect() { + + [ $# -eq 0 ] && { echo "Usage: $0 dir-model"; exit 1; } + + collection="$1" + + dirResult=results/"$collection" + dirSettings="$dirResult"/settings + + if [ ! -d "$dirResult" ] + then + + echo " # Collecting results and settings into $dirResult" + + mkdir -p "$dirResult" + mkdir -p "$dirSettings" + + mv -f $(foamListTimes) "$dirResult" + [ -d postProcessing ] && mv -f postProcessing "$dirResult" + [ -d processor0 ] && mv -f processor* "$dirResult" + mv -f log.* "$dirResult" + cp -f system/{fv*,controlDict} constant/*Properties "$dirSettings" + mv -f 0/ "$dirSettings" + + echo " # Cleaning up the case" + + cleanTimeDirectories + cleanPostProcessing + + else + + echo " # Directory $dirResult already exists" + echo " # Skipping the computation" + + fi +} + + +#------------------------------------------------------------------------------ + +for setup in $setups +do + + echo "" + echo "# Computations for the setup: $setup" + echo "" + + dirSetup="setups.orig/$setup" + cp -rfL "$dirSetup/0.orig" . + cp -rfL "$dirSetup/constant" . + cp -rfL "$dirSetup/system" . + cp -rf 0.orig/ 0/ + + if [ ! -d constant/polyMesh ] + then + + runApplication blockMesh + + runApplication renumberMesh -overwrite -constant + + runApplication checkMesh -allTopology -allGeometry -constant + + fi + + if [ "$parallel" = true ] + then + + runApplication decomposePar + + runParallel $(getApplication) + + runApplication reconstructPar + + else + + runApplication $(getApplication) + + fi + + runApplication -s columnAverage \ + postProcess -func columnAverage -latestTime + + runApplication -s sampleCellPatchConstrained \ + postProcess -func sampleCellPatchConstrained -latestTime + + runApplication -s sampleCellPoint \ + postProcess -func sampleCellPoint -latestTime + + collect "$setup" + +done + + +#------------------------------------------------------------------------------ diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/plot b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/plot new file mode 100755 index 0000000000..66483f05b8 --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/plot @@ -0,0 +1,176 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +#------------------------------------------------------------------------------ + +# settings + + # operand setups + setups=" + DFSEM + DFM + FSM + " + + +#------------------------------------------------------------------------------ + +plot_R_patch() { + + setup="$1" + + endTime=$(foamDictionary results/$setup/settings/controlDict -entry endTime -value) + # benchmarkFile="ReTau-395/dataset/chan395.reystress" + sampleFile="results/$setup/postProcessing/sampleCellPoint/$endTime/inletPatch_columnAverage:columnAverage(UPrime2Mean).xy" + image="plots/$setup/R_patch.png" + + gnuplot< [m^2/s^2]" + set offset .05, .05 + set output "$image" + set title "Reynolds stresses on patch" + + # Benchmark - DNS + # benchmark = "$benchmarkFile" + + # Samples - OpenFOAM + samples="$sampleFile" + + plot \ + samples u 1:2 t "" w l lw 2 lc rgb "#009E73", \ + samples u 1:5 t "" w l lw 2 lc rgb "#F0E440", \ + samples u 1:7 t "" w l lw 2 lc rgb "#0072B2", \ + samples u 1:3 t "" w l lw 2 lc rgb "#D55E00" + + # benchmark u 1:3 t "_{DNS}" w l lw 2 dt 2 lc rgb "#009E73", \ + # benchmark u 1:4 t "_{DNS}" w l lw 2 dt 2 lc rgb "#F0E440", \ + # benchmark u 1:5 t "_{DNS}" w l lw 2 dt 2 lc rgb "#0072B2", \ + # benchmark u 1:6 t "_{DNS}" w l lw 2 dt 2 lc rgb "#D55E00" +PLT_R_PATCH +} + + +plot_R_cell() { + + setup="$1" + + endTime=$(foamDictionary results/$setup/settings/controlDict -entry endTime -value) + # benchmarkFile="ReTau-395/dataset/chan395.reystress" + sampleFile="results/$setup/postProcessing/sampleCellPoint/$endTime/inletCell_columnAverage:columnAverage(UPrime2Mean).xy" + image="plots/$setup/R_cell.png" + + gnuplot< [m^2/s^2]" + set offset .05, .05 + set output "$image" + set title "Reynolds stresses on cell" + + # Benchmark - DNS + # benchmark= "$benchmarkFile" + + # Samples - OpenFOAM + samples="$sampleFile" + + plot \ + samples u 1:2 t "" w l lw 2 lc rgb "#009E73", \ + samples u 1:5 t "" w l lw 2 lc rgb "#F0E440", \ + samples u 1:7 t "" w l lw 2 lc rgb "#0072B2", \ + samples u 1:3 t "" w l lw 2 lc rgb "#D55E00" + + # benchmark u 1:3 t "_{DNS}" w l lw 2 dt 2 lc rgb "#009E73", \ + # benchmark u 1:4 t "_{DNS}" w l lw 2 dt 2 lc rgb "#F0E440", \ + # benchmark u 1:5 t "_{DNS}" w l lw 2 dt 2 lc rgb "#0072B2", \ + # benchmark u 1:6 t "_{DNS}" w l lw 2 dt 2 lc rgb "#D55E00" +PLT_R_CELL +} + + +plot_UMean_patch() { + + setup="$1" + + endTime=$(foamDictionary results/$setup/settings/controlDict -entry endTime -value) + benchmarkFile="../../resources/incompressible/oneCellThickPlaneChannelFlow/ReTau-395/dataset/chan395.means" + sampleFile="results/$setup/postProcessing/sampleCellPoint/$endTime/inletPatch_columnAverage:columnAverage(UMean).xy" + image="plots/$setup/UMean_patch.png" + + gnuplot</dev/null || { + echo "gnuplot not found - skipping graph creation" 1>&2 + exit 1 +} + +# Check directory: "results" +[ -d "results" ] || { + echo "No results directory found - skipping graph creation" 1>&2 + exit 1 +} + + +#------------------------------------------------------------------------------ + +for setup in $setups +do + + echo "" + echo "# Plots for the setup: $setup" + echo "" + + dirPlots="plots/$setup" + [ -d "$dirPlots" ] || mkdir -p "$dirPlots" + + plot_R_patch "$setup" + + plot_R_cell "$setup" + + plot_UMean_patch "$setup" + +done + + +#------------------------------------------------------------------------------ diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/0.orig/U b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/0.orig/U similarity index 74% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/0.orig/U rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/0.orig/U index a42193bbe6..e3c5546c3e 100644 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/0.orig/U +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/0.orig/U @@ -20,29 +20,34 @@ internalField uniform (0 0 0); boundaryField { - "bottomWall|topWall" - { - type fixedValue; - value $internalField; - } - - "left|right" - { - type cyclic; - } - inlet { + type turbulentDigitalFilterInlet; + n ( 64 70 ); + L + ( + 0.78035508 0.31085352 0.342261 0.1728125 0.171875 + 0.22459375 0.172787596 0.171889998 0.224578995 + ); + Ubulk 17.55; value $internalField; } - #include "inlet/U" outlet { - type inletOutlet; - inletValue $internalField; + type advective; value $internalField; } + + "(bottom|top)" + { + type noSlip; + } + + "(left|right)" + { + type cyclic; + } } diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/0.orig/nut b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/0.orig/nut new file mode 120000 index 0000000000..8186897dc1 --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/0.orig/nut @@ -0,0 +1 @@ +../../common/0.orig/nut \ No newline at end of file diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/0.orig/p b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/0.orig/p new file mode 120000 index 0000000000..d1e1225671 --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/0.orig/p @@ -0,0 +1 @@ +../../common/0.orig/p \ No newline at end of file diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.DFM/0/R b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/constant/boundaryData/inlet/0/R similarity index 100% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.DFM/0/R rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/constant/boundaryData/inlet/0/R diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.DFM/0/UMean b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/constant/boundaryData/inlet/0/UMean similarity index 100% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.DFM/0/UMean rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/constant/boundaryData/inlet/0/UMean diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.DFM/points b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/constant/boundaryData/inlet/points similarity index 100% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.DFM/points rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/constant/boundaryData/inlet/points diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/constant/transportProperties b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/constant/transportProperties new file mode 120000 index 0000000000..e6a4e4f7fc --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/constant/transportProperties @@ -0,0 +1 @@ +../../common/constant/transportProperties \ No newline at end of file diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/constant/turbulenceProperties b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/constant/turbulenceProperties new file mode 120000 index 0000000000..f9d514a2f3 --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/constant/turbulenceProperties @@ -0,0 +1 @@ +../../common/constant/turbulenceProperties \ No newline at end of file diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/system b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/system new file mode 120000 index 0000000000..86c0ebd6e7 --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFM/system @@ -0,0 +1 @@ +../common/system \ No newline at end of file diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/0/U b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/0.orig/U similarity index 64% rename from tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/0/U rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/0.orig/U index 4960761ab1..2c0907c164 100644 --- a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/0/U +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/0.orig/U @@ -10,49 +10,56 @@ FoamFile version 2.0; format ascii; class volVectorField; - location "1"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 0 1 -1 0 0 0 0 ]; +dimensions [0 1 -1 0 0 0 0]; -// Ub/utau = 17.55 -internalField uniform ( 17.55 0 0 ); +internalField uniform (0 0 0); boundaryField { - bottomWall - { - type fixedValue; - value uniform ( 0 0 0 ); - } - topWall - { - type fixedValue; - value uniform ( 0 0 0 ); - } - sides_half0 - { - type cyclic; - } - sides_half1 - { - type cyclic; - } inlet { type turbulentDFSEMInlet; - delta 2; + delta 1; + U + { + type mappedFile; + mapMethod nearest; + } + R + { + type mappedFile; + mapMethod nearest; + } + L + { + type mappedFile; + mapMethod nearest; + } + + d 1; nCellPerEddy 1; - mapMethod nearestCell; + scale 1; value $internalField; } + outlet { - type inletOutlet; - inletValue uniform (0 0 0); - value uniform (0 0 0); + type advective; + value $internalField; + } + + "(bottom|top)" + { + type noSlip; + } + + "(left|right)" + { + type cyclic; } } diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/0.orig/nut b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/0.orig/nut new file mode 120000 index 0000000000..8186897dc1 --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/0.orig/nut @@ -0,0 +1 @@ +../../common/0.orig/nut \ No newline at end of file diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/0.orig/p b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/0.orig/p new file mode 120000 index 0000000000..d1e1225671 --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/0.orig/p @@ -0,0 +1 @@ +../../common/0.orig/p \ No newline at end of file diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/constant/boundaryData/inlet/0/L b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/constant/boundaryData/inlet/0/L new file mode 100644 index 0000000000..629a2101b3 --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/constant/boundaryData/inlet/0/L @@ -0,0 +1,259 @@ +( +1.6760001447599677e-43 +1.0868009617044407e-08 +6.96632299316915e-07 +7.964006730807538e-06 +4.4886053894517664e-05 +0.00017142819717599743 +0.0005109590309958684 +0.001282137130408118 +0.0028356245991423275 +0.0056945923004052415 +0.010583536322306776 +0.018389090000706376 +0.029956201643692996 +0.04567240383684011 +0.06499017109073807 +0.0863645775310708 +0.10780875116479441 +0.12771755696515344 +0.1453567712304755 +0.16062365567853595 +0.17380736699507915 +0.18524165214197616 +0.19522234333586158 +0.20396794244081784 +0.21161151098126862 +0.2182925640222298 +0.22425210908087323 +0.22980954591037686 +0.2352612116306475 +0.24076016447211382 +0.24635042180862582 +0.25215417623227027 +0.2581319159366946 +0.2642162232341277 +0.2705976827635888 +0.2775262136577681 +0.2851339428170316 +0.29320770439789223 +0.30169588718043017 +0.3104960794811366 +0.3194954534280035 +0.3286450052926366 +0.3378100136077759 +0.3471174687143672 +0.3562151631412292 +0.36527552859716594 +0.37494504798108247 +0.38502865612338205 +0.3952322027438534 +0.40553467840927804 +0.41578800746270134 +0.4264058548357003 +0.43712919288926017 +0.44842576293128633 +0.46008767937618383 +0.4714866924807228 +0.4827246039731494 +0.49330673743341724 +0.5036846762826384 +0.5140216569857357 +0.5243625990429793 +0.5348735169176119 +0.5446788615067326 +0.5535535437038963 +0.5615373928208507 +0.5689987179058951 +0.5773301273285831 +0.5862857780666765 +0.5953526108855274 +0.6049390063729172 +0.6143870357093343 +0.6221292179475515 +0.6288137731042791 +0.6356831550607555 +0.6428919658813926 +0.6494740048271094 +0.6558426649799869 +0.6615093242166988 +0.6667263216815766 +0.6713265835399524 +0.6760870855398617 +0.6817697212117945 +0.6868490918716819 +0.6901331296539219 +0.6934577171362739 +0.6979552723619237 +0.7038154195965829 +0.7108862054012115 +0.7172470897092121 +0.7224010326710795 +0.727453975349662 +0.731494652619959 +0.7349775398199252 +0.7370734048228417 +0.737434256293814 +0.7365824697737319 +0.7350609217033188 +0.7329836659249739 +0.730256405839164 +0.7283242805479961 +0.726231012899943 +0.7235685746646292 +0.7213160623172862 +0.7194814238726635 +0.7166228475003421 +0.7120932098489855 +0.7068169772751501 +0.702036389755952 +0.697518544808241 +0.6937121394109932 +0.6904454421400188 +0.6866438800820893 +0.6818576320301258 +0.6766627824128105 +0.6727179770747246 +0.6689431320803964 +0.6631717982054145 +0.6561721428602678 +0.6481600843658191 +0.6405213608738373 +0.6341476825999275 +0.6280008937349648 +0.6214551987295783 +0.6145563256095296 +0.6071697457595765 +0.6005761440226519 +0.5951460432382282 +0.5923426315298634 +0.5915671133699071 +0.5923426315298634 +0.5951460432382282 +0.6005761440226519 +0.6071697457595765 +0.6145563256095296 +0.6214551987295783 +0.6280008937349648 +0.6341476825999275 +0.6405213608738373 +0.6481600843658191 +0.6561721428602678 +0.6631717982054145 +0.6689431320803964 +0.6727179770747246 +0.6766627824128105 +0.6818576320301258 +0.6866438800820893 +0.6904454421400188 +0.6937121394109932 +0.697518544808241 +0.702036389755952 +0.7068169772751501 +0.7120932098489855 +0.7166228475003421 +0.7194814238726635 +0.7213160623172862 +0.7235685746646292 +0.726231012899943 +0.7283242805479961 +0.730256405839164 +0.7329836659249739 +0.7350609217033188 +0.7365824697737319 +0.737434256293814 +0.7370734048228417 +0.7349775398199252 +0.731494652619959 +0.727453975349662 +0.7224010326710795 +0.7172470897092121 +0.7108862054012115 +0.7038154195965829 +0.6979552723619237 +0.6934577171362739 +0.6901331296539219 +0.6868490918716819 +0.6817697212117945 +0.6760870855398617 +0.6713265835399524 +0.6667263216815766 +0.6615093242166988 +0.6558426649799869 +0.6494740048271094 +0.6428919658813926 +0.6356831550607555 +0.6288137731042791 +0.6221292179475515 +0.6143870357093343 +0.6049390063729172 +0.5953526108855274 +0.5862857780666765 +0.5773301273285831 +0.5689987179058951 +0.5615373928208507 +0.5535535437038963 +0.5446788615067326 +0.5348735169176119 +0.5243625990429793 +0.5140216569857357 +0.5036846762826384 +0.49330673743341724 +0.4827246039731494 +0.4714866924807228 +0.46008767937618383 +0.44842576293128633 +0.43712919288926017 +0.4264058548357003 +0.41578800746270134 +0.40553467840927804 +0.3952322027438534 +0.38502865612338205 +0.37494504798108247 +0.36527552859716594 +0.3562151631412292 +0.3471174687143672 +0.3378100136077759 +0.3286450052926366 +0.3194954534280035 +0.3104960794811366 +0.30169588718043017 +0.29320770439789223 +0.2851339428170316 +0.2775262136577681 +0.2705976827635888 +0.2642162232341277 +0.2581319159366946 +0.25215417623227027 +0.24635042180862582 +0.24076016447211382 +0.2352612116306475 +0.22980954591037686 +0.22425210908087323 +0.2182925640222298 +0.21161151098126862 +0.20396794244081784 +0.19522234333586158 +0.18524165214197616 +0.17380736699507915 +0.16062365567853595 +0.1453567712304755 +0.12771755696515344 +0.10780875116479441 +0.0863645775310708 +0.06499017109073807 +0.04567240383684011 +0.029956201643692996 +0.018389090000706376 +0.010583536322306776 +0.0056945923004052415 +0.0028356245991423275 +0.001282137130408118 +0.0005109590309958684 +0.00017142819717599743 +4.4886053894517664e-05 +7.964006730807538e-06 +6.96632299316915e-07 +1.0868009617044407e-08 +1.6760001447599677e-43 +) diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.DFSEM/0/R b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/constant/boundaryData/inlet/0/R similarity index 100% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.DFSEM/0/R rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/constant/boundaryData/inlet/0/R diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.DFSEM/0/U b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/constant/boundaryData/inlet/0/U similarity index 100% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.DFSEM/0/U rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/constant/boundaryData/inlet/0/U diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.DFSEM/points b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/constant/boundaryData/inlet/points similarity index 100% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.DFSEM/points rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/constant/boundaryData/inlet/points diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/constant/transportProperties b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/constant/transportProperties new file mode 120000 index 0000000000..e6a4e4f7fc --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/constant/transportProperties @@ -0,0 +1 @@ +../../common/constant/transportProperties \ No newline at end of file diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/constant/turbulenceProperties b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/constant/turbulenceProperties new file mode 120000 index 0000000000..f9d514a2f3 --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/constant/turbulenceProperties @@ -0,0 +1 @@ +../../common/constant/turbulenceProperties \ No newline at end of file diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/system b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/system new file mode 120000 index 0000000000..86c0ebd6e7 --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/DFSEM/system @@ -0,0 +1 @@ +../common/system \ No newline at end of file diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/0/k b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/0.orig/U similarity index 65% rename from tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/0/k rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/0.orig/U index 04a743406e..c40be233ae 100644 --- a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/0/k +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/0.orig/U @@ -9,46 +9,46 @@ FoamFile { version 2.0; format ascii; - class volScalarField; - location "1"; - object k; + class volVectorField; + object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 0 2 -2 0 0 0 0 ]; +dimensions [0 1 -1 0 0 0 0]; -internalField uniform 1e-5; +internalField uniform (0 0 0); boundaryField { - bottomWall - { - type fixedValue; - value uniform 0; - } - topWall - { - type fixedValue; - value uniform 0; - } - sides_half0 - { - type cyclic; - } - sides_half1 - { - type cyclic; - } inlet { - type fixedValue; + type turbulentDigitalFilterInlet; + fsm true; + n ( 64 70 ); + L + ( + 0.78035508 0.31085352 0.342261 0.1728125 0.171875 + 0.22459375 0.172787596 0.171889998 0.224578995 + ); + Ubulk 17.55; value $internalField; } + outlet { - type fixedValue; + type advective; value $internalField; } + + "(bottom|top)" + { + type noSlip; + } + + "(left|right)" + { + type cyclic; + } } diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/0.orig/nut b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/0.orig/nut new file mode 120000 index 0000000000..8186897dc1 --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/0.orig/nut @@ -0,0 +1 @@ +../../common/0.orig/nut \ No newline at end of file diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/0.orig/p b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/0.orig/p new file mode 120000 index 0000000000..d1e1225671 --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/0.orig/p @@ -0,0 +1 @@ +../../common/0.orig/p \ No newline at end of file diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.FSM/0/R b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/constant/boundaryData/inlet/0/R similarity index 100% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.FSM/0/R rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/constant/boundaryData/inlet/0/R diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.FSM/0/UMean b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/constant/boundaryData/inlet/0/UMean similarity index 100% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.FSM/0/UMean rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/constant/boundaryData/inlet/0/UMean diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.FSM/points b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/constant/boundaryData/inlet/points similarity index 100% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/constant/boundaryData/inlet.FSM/points rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/constant/boundaryData/inlet/points diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/constant/transportProperties b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/constant/transportProperties new file mode 120000 index 0000000000..e6a4e4f7fc --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/constant/transportProperties @@ -0,0 +1 @@ +../../common/constant/transportProperties \ No newline at end of file diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/constant/turbulenceProperties b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/constant/turbulenceProperties new file mode 120000 index 0000000000..f9d514a2f3 --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/constant/turbulenceProperties @@ -0,0 +1 @@ +../../common/constant/turbulenceProperties \ No newline at end of file diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/system b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/system new file mode 120000 index 0000000000..86c0ebd6e7 --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/FSM/system @@ -0,0 +1 @@ +../common/system \ No newline at end of file diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/0/nut b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/0.orig/nut similarity index 74% rename from tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/0/nut rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/0.orig/nut index cbc9635d1e..c373efb05d 100644 --- a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/0/nut +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/0.orig/nut @@ -10,43 +10,31 @@ FoamFile version 2.0; format ascii; class volScalarField; - location "1"; object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 0 2 -1 0 0 0 0 ]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; boundaryField { - bottomWall + "(inlet|outlet)" + { + type calculated; + value uniform 1e-08; + } + + "(bottom|top)" { type zeroGradient; } - topWall - { - type zeroGradient; - } - sides_half0 + + "(left|right)" { type cyclic; } - sides_half1 - { - type cyclic; - } - inlet - { - type calculated; - value uniform 1e-8; - } - outlet - { - type calculated; - value uniform 1e-8; - } } diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/0/p b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/0.orig/p similarity index 81% rename from tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/0/p rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/0.orig/p index ab5e9178f4..e0e385c84a 100644 --- a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/0/p +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/0.orig/p @@ -10,41 +10,35 @@ FoamFile version 2.0; format ascii; class volScalarField; - location "1"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 0 2 -2 0 0 0 0 ]; +dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { - bottomWall - { - type zeroGradient; - } - topWall - { - type zeroGradient; - } - sides_half0 - { - type cyclic; - } - sides_half1 - { - type cyclic; - } inlet { type zeroGradient; } + + "(bottom|top)" + { + type zeroGradient; + } + outlet { type fixedValue; - value uniform 0; + value $internalField; + } + + "(left|right)" + { + type cyclic; } } diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/0.orig/inlet.DFSEM/U b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/constant/transportProperties similarity index 81% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/0.orig/inlet.DFSEM/U rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/constant/transportProperties index 5602f3c3fa..02df114946 100644 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/0.orig/inlet.DFSEM/U +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/constant/transportProperties @@ -9,18 +9,14 @@ FoamFile { version 2.0; format ascii; - class volVectorField; - object U; + class dictionary; + object transportProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -inlet -{ - type turbulentDFSEMInlet; - delta 1; - nCellPerEddy 1; - mapMethod nearestCell; -} +transportModel Newtonian; + +nu 2.5494595145829e-3; // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/turbulenceProperties b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/constant/turbulenceProperties similarity index 88% rename from tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/turbulenceProperties rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/constant/turbulenceProperties index 1970c8e00f..2675f2d568 100644 --- a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/turbulenceProperties +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/constant/turbulenceProperties @@ -10,26 +10,21 @@ FoamFile version 2.0; format ascii; class dictionary; - location "constant"; object turbulenceProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType LES; +simulationType LES; LES { - turbulence on; - - LESModel kEqn; - kEqnCoeffs + LESModel Smagorinsky; + SmagorinskyCoeffs { Ce 1.048; - Ck 0.02654; // set to approximate a Cs of 0.065 + Ck 0.0265463553; // Updated to give Cs = 0.065 } - printCoeffs on; - delta vanDriest; vanDriestCoeffs { @@ -41,6 +36,9 @@ LES Aplus 26; Cdelta 0.158; } + + printCoeffs on; + turbulence on; } diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/system/blockMeshDict b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/blockMeshDict similarity index 86% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/system/blockMeshDict rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/blockMeshDict index 65a68bbfbf..918a61fadd 100644 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/system/blockMeshDict +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/blockMeshDict @@ -16,10 +16,11 @@ FoamFile scale 1; -L 0.125664; -H 1.0; -H2 #eval{ 2*$H }; -W #eval{ pi() }; +// L:length, H:height, W:width +L 0.125664; +H 1.0; +H2 #eval{ 2*$H }; +W #eval{ pi() }; vertices ( @@ -40,22 +41,18 @@ vertices blocks ( - hex ( 0 1 2 5 6 7 8 11) (1 23 82) simpleGrading (1 15 1) - hex ( 5 2 3 4 11 8 9 10) (1 23 82) simpleGrading (1 -15 1) -); - -edges -( + hex ( 0 1 2 5 6 7 8 11) (1 23 82) simpleGrading (1 10.7028 1) + hex ( 5 2 3 4 11 8 9 10) (1 23 82) simpleGrading (1 -10.7028 1) ); boundary ( - bottomWall + bottom { type wall; faces ((0 6 7 1)); } - topWall + top { type wall; faces ((4 3 9 10)); @@ -84,9 +81,5 @@ boundary } ); -mergePatchPairs -( -); - // ************************************************************************* // diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/columnAverage b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/columnAverage new file mode 100644 index 0000000000..7a61f2956a --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/columnAverage @@ -0,0 +1,13 @@ +// -*- C++ -*- + +type columnAverage; +libs (fieldFunctionObjects); + +patches ( left ); +fields ( UPrime2Mean UMean ); + +executeControl onEnd; +writeControl onEnd; + + +// ************************************************************************* // diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/system/controlDict.template b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/controlDict similarity index 66% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/system/controlDict.template rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/controlDict index 9361a6ac61..d51a9509fa 100644 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/system/controlDict.template +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/controlDict @@ -10,12 +10,11 @@ FoamFile version 2.0; format ascii; class dictionary; - location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application pimpleFoam; +application pisoFoam; startFrom latestTime; @@ -23,9 +22,9 @@ startTime 0; stopAt endTime; -endTime END_TIME; +endTime 30.0; -deltaT 4e-3; +deltaT 2e-3; writeControl timeStep; @@ -47,7 +46,6 @@ runTimeModifiable false; adjustTimeStep false; - // Allow 10% of time for initialisation before sampling timeStart #eval{ 0.1 * ${/endTime} }; @@ -70,35 +68,6 @@ functions } ); } - - sampling1 - { - type sets; - libs (sampling); - interpolationScheme cellPoint; - setFormat raw; - writeControl onEnd; - fields (UPrime2Mean UMean); - - sets - ( - inletPatch - { - type face; - axis y; - start (0.0 0 1.57); - end (0.0 2 1.57); - } - - inletCell - { - type midPoint; - axis y; - start (0.062832 0 1.57); - end (0.062832 2 1.57); - } - ); - } } diff --git a/tutorials/verificationAndValidation/turbulentInflow/PCF/system/decomposeParDict b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/decomposeParDict similarity index 93% rename from tutorials/verificationAndValidation/turbulentInflow/PCF/system/decomposeParDict rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/decomposeParDict index 79b5aced9f..4c8d7733d3 100644 --- a/tutorials/verificationAndValidation/turbulentInflow/PCF/system/decomposeParDict +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/decomposeParDict @@ -16,11 +16,7 @@ FoamFile numberOfSubdomains 4; -method hierarchical; +method random; -coeffs -{ - n (1 2 2); -} // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/system/fvSchemes b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/fvSchemes similarity index 76% rename from tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/system/fvSchemes rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/fvSchemes index b1fc3f3b70..2e1a721683 100644 --- a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/system/fvSchemes +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/fvSchemes @@ -10,7 +10,6 @@ FoamFile version 2.0; format ascii; class dictionary; - location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -22,24 +21,21 @@ ddtSchemes gradSchemes { - default leastSquares; + default Gauss linear; } divSchemes { default none; + div(phi,U) Gauss linear; - div(phi,k) Gauss limitedLinear 0.1; - div(phi,B) Gauss limitedLinear 0.1; - div(B) Gauss linear; - div(phi,nuTilda) Gauss limitedLinear 0.1; - div(LambVector) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { - default Gauss linear uncorrected; + default Gauss linear orthogonal; } interpolationSchemes @@ -49,7 +45,7 @@ interpolationSchemes snGradSchemes { - default uncorrected; + default orthogonal; } diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/system/fvSolution b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/fvSolution similarity index 78% rename from tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/system/fvSolution rename to tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/fvSolution index 0f8e6c5157..44a6f6f6a7 100644 --- a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/system/fvSolution +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/fvSolution @@ -10,7 +10,6 @@ FoamFile version 2.0; format ascii; class dictionary; - location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -20,13 +19,13 @@ solvers p { solver GAMG; - tolerance 0; - relTol 0.01; smoother DICGaussSeidel; + tolerance 1e-06; + relTol 0.001; nPreSweeps 0; nPostSweeps 2; cacheAgglomeration true; - nCellsInCoarsestLevel 10; + nCellsInCoarsestLevel 1000; agglomerator faceAreaPair; mergeLevels 1; } @@ -34,33 +33,32 @@ solvers pFinal { $p; - smoother DICGaussSeidel; tolerance 1e-06; relTol 0; } - "(U|k)" + U { - solver smoothSolver; - smoother symGaussSeidel; - tolerance 1e-05; + solver PBiCG; + preconditioner DILU; + tolerance 1e-08; relTol 0.1; - minIter 1; } - "(U|k)Final" + UFinal { $U; - tolerance 1e-06; + tolerance 1e-08; relTol 0; } } -PIMPLE +PISO { - nOuterCorrectors 3; - nCorrectors 1; + nCorrectors 3; nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; } diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/sampleCellPatchConstrained b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/sampleCellPatchConstrained new file mode 100644 index 0000000000..ad7ff9cf25 --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/sampleCellPatchConstrained @@ -0,0 +1,35 @@ +// -*- C++ -*- + +type sets; +libs (sampling); +interpolationScheme cellPatchConstrained; +setFormat raw; +writeControl onEnd; + +fields +( + columnAverage:columnAverage(UMean) + columnAverage:columnAverage(UPrime2Mean) +); + +sets +( + inletPatch + { + type face; + axis y; + start (0.0 0 1.57); + end (0.0 2 1.57); + } + + inletCell + { + type midPoint; + axis y; + start (0.062832 0 1.57); + end (0.062832 2 1.57); + } +); + + +// ************************************************************************* // diff --git a/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/sampleCellPoint b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/sampleCellPoint new file mode 100644 index 0000000000..6bbbf5ceee --- /dev/null +++ b/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel/setups.orig/common/system/sampleCellPoint @@ -0,0 +1,35 @@ +// -*- C++ -*- + +type sets; +libs (sampling); +interpolationScheme cellPoint; +setFormat raw; +writeControl onEnd; + +fields +( + columnAverage:columnAverage(UMean) + columnAverage:columnAverage(UPrime2Mean) +); + +sets +( + inletPatch + { + type face; + axis y; + start (0.0 0 1.57); + end (0.0 2 1.57); + } + + inletCell + { + type midPoint; + axis y; + start (0.062832 0 1.57); + end (0.062832 2 1.57); + } +); + + +// ************************************************************************* //