From 79f9c3bb7dbdea70e6dd84b30344adbec7604fdc Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Tue, 18 Dec 2018 19:08:03 +0000 Subject: [PATCH] TUT: Added new bump2D case --- .../incompressible/simpleFoam/bump2D/0/U | 57 ++++++ .../simpleFoam/bump2D/0/nuTilda | 59 ++++++ .../incompressible/simpleFoam/bump2D/0/nut | 58 ++++++ .../incompressible/simpleFoam/bump2D/0/omega | 60 ++++++ .../incompressible/simpleFoam/bump2D/0/p | 56 +++++ .../incompressible/simpleFoam/bump2D/Allrun | 9 + .../bump2D/constant/transportProperties | 22 ++ .../bump2D/constant/turbulenceProperties | 31 +++ .../simpleFoam/bump2D/createPlots | 104 ++++++++++ .../simpleFoam/bump2D/system/blockMeshDict | 191 ++++++++++++++++++ .../simpleFoam/bump2D/system/controlDict | 113 +++++++++++ .../simpleFoam/bump2D/system/decomposeParDict | 28 +++ .../simpleFoam/bump2D/system/fvSchemes | 60 ++++++ .../simpleFoam/bump2D/system/fvSolution | 64 ++++++ 14 files changed, 912 insertions(+) create mode 100644 tutorials/incompressible/simpleFoam/bump2D/0/U create mode 100644 tutorials/incompressible/simpleFoam/bump2D/0/nuTilda create mode 100644 tutorials/incompressible/simpleFoam/bump2D/0/nut create mode 100644 tutorials/incompressible/simpleFoam/bump2D/0/omega create mode 100644 tutorials/incompressible/simpleFoam/bump2D/0/p create mode 100755 tutorials/incompressible/simpleFoam/bump2D/Allrun create mode 100644 tutorials/incompressible/simpleFoam/bump2D/constant/transportProperties create mode 100644 tutorials/incompressible/simpleFoam/bump2D/constant/turbulenceProperties create mode 100755 tutorials/incompressible/simpleFoam/bump2D/createPlots create mode 100644 tutorials/incompressible/simpleFoam/bump2D/system/blockMeshDict create mode 100644 tutorials/incompressible/simpleFoam/bump2D/system/controlDict create mode 100644 tutorials/incompressible/simpleFoam/bump2D/system/decomposeParDict create mode 100644 tutorials/incompressible/simpleFoam/bump2D/system/fvSchemes create mode 100644 tutorials/incompressible/simpleFoam/bump2D/system/fvSolution diff --git a/tutorials/incompressible/simpleFoam/bump2D/0/U b/tutorials/incompressible/simpleFoam/bump2D/0/U new file mode 100644 index 00000000000..a6414f374f0 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/bump2D/0/U @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: 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 (69.44 0 0); + +boundaryField +{ + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type inletOutlet; + inletValue uniform (0 0 0); + value $internalField; + } + + top + { + type symmetryPlane; + } + + "(symUp|symDown)" + { + type symmetryPlane; + } + + bump + { + type noSlip; + } + + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/bump2D/0/nuTilda b/tutorials/incompressible/simpleFoam/bump2D/0/nuTilda new file mode 100644 index 00000000000..9385c4901a3 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/bump2D/0/nuTilda @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object nuTilda; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 6.93e-5; // 3*nu_inf + +boundaryField +{ + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + top + { + type symmetryPlane; + } + + "(symUp|symDown)" + { + type symmetryPlane; + } + + bump + { + type fixedValue; + value uniform 0; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/bump2D/0/nut b/tutorials/incompressible/simpleFoam/bump2D/0/nut new file mode 100644 index 00000000000..1216ad6c46a --- /dev/null +++ b/tutorials/incompressible/simpleFoam/bump2D/0/nut @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 4.86e-6; + +boundaryField +{ + inlet + { + type calculated; + value $internalField; + } + + outlet + { + type calculated; + value $internalField; + } + + top + { + type symmetryPlane; + } + + "(symUp|symDown)" + { + type symmetryPlane; + } + + bump + { + type fixedValue; + value uniform 0; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/bump2D/0/omega b/tutorials/incompressible/simpleFoam/bump2D/0/omega new file mode 100644 index 00000000000..951fb007417 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/bump2D/0/omega @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object omega; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 0 -1 0 0 0 0 ]; + +internalField uniform 5220.8; + +boundaryField +{ + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + top + { + type symmetryPlane; + } + + "(symUp|symDown)" + { + type symmetryPlane; + } + + bump + { + type omegaWallFunction; + value $internalField; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/bump2D/0/p b/tutorials/incompressible/simpleFoam/bump2D/0/p new file mode 100644 index 00000000000..f7be992968e --- /dev/null +++ b/tutorials/incompressible/simpleFoam/bump2D/0/p @@ -0,0 +1,56 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type zeroGradient; + } + + outlet + { + type fixedValue; + value $internalField; + } + + top + { + type symmetryPlane; + } + + "(symUp|symDown)" + { + type symmetryPlane; + } + + bump + { + type zeroGradient; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/bump2D/Allrun b/tutorials/incompressible/simpleFoam/bump2D/Allrun new file mode 100755 index 00000000000..61f1172ce8e --- /dev/null +++ b/tutorials/incompressible/simpleFoam/bump2D/Allrun @@ -0,0 +1,9 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +runApplication blockMesh +runApplication $(getApplication) + + +#------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/simpleFoam/bump2D/constant/transportProperties b/tutorials/incompressible/simpleFoam/bump2D/constant/transportProperties new file mode 100644 index 00000000000..d7e52ee1f77 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/bump2D/constant/transportProperties @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +nu 2.31e-5; + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/bump2D/constant/turbulenceProperties b/tutorials/incompressible/simpleFoam/bump2D/constant/turbulenceProperties new file mode 100644 index 00000000000..2bf170f3e2d --- /dev/null +++ b/tutorials/incompressible/simpleFoam/bump2D/constant/turbulenceProperties @@ -0,0 +1,31 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ +// RASModel kOmegaSST; + RASModel SpalartAllmaras; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/bump2D/createPlots b/tutorials/incompressible/simpleFoam/bump2D/createPlots new file mode 100755 index 00000000000..9ae5e39bb52 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/bump2D/createPlots @@ -0,0 +1,104 @@ +#!/bin/sh +# Note: CFL3D data available from: +# https://turbmodels.larc.nasa.gov/bump_sa.html +cd ${0%/*} || exit 1 # run from this directory + +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +#set -x + +plotTau() { + graphNameTau="hill2D_tau.png" + echo "Creating wallshear stress graph to $graphNameTau" + gnuplot<<PLT_TAU + set terminal pngcairo font "helvetica,20" size 1000, 1000 + set xrange [0:1.5] + set yrange [0:0.008] + set grid + set key bottom right + set xlabel "x" + set ylabel "c_f" + set output "$graphNameTau" + + Uref = 69.44 + + set lmargin 10 + set rmargin 1.5 + set bmargin 3.2 + +# plot \ +# "profiles.dat" u 1:(sqrt(\$2*\$2+\$3*\$3+\$4*\$4)/(0.5*Uref*Uref)) \ +# t "simpleFoam" w l lw 2 lc rgb "black", \ +# "cf_bump_cfl3d_sa.dat" every 10 u 1:2 \ +# t "CFL3D" w p ps 3 pt 6 lw 2 lc rgb "red" + + plot \ + "profiles.dat" u 1:(sqrt(\$2*\$2+\$3*\$3+\$4*\$4)/(0.5*Uref*Uref)) \ + t "simpleFoam" w l lw 2 lc rgb "black" +PLT_TAU +} + +plotCp() { + graphNameCp="hill2D_cp.png" + echo "Creating pressure coefficient graph to $graphNameCp" + gnuplot<<PLT_CP + set terminal pngcairo font "helvetica,20" size 1000, 1000 + set xrange [0:1.5] + set yrange [0.4:-0.8] + set grid + set key bottom right + set xlabel "x" + set ylabel "c_p" + set output "$graphNameCp" + + Uref = 69.44 + + set lmargin 10 + set rmargin 1.5 + set bmargin 3.2 + +# plot \ +# "profiles.dat" u 1:5 \ +# t "simpleFoam" w l lw 2 lc rgb "black", \ +# "cp_bump_cfl3d_sa.dat" every 10 u 1:2 \ +# t "CFL3D" w p ps 3 pt 6 lw 2 lc rgb "red" + + plot \ + "profiles.dat" u 1:5 \ + t "simpleFoam" w l lw 2 lc rgb "black" +PLT_CP +} + + +if notTest $@ +then + # Create validation plots + + # Test if gnuplot exists on the system + command -v gnuplot >/dev/null 2>&1 || { + echo "gnuplot not found - skipping graph creation" 1>&2 + exit 1 + } + + # Test if awk exists on the system + command -v awk >/dev/null 2>&1 || { + echo "awk not found - skipping graph creation" 1>&2 + exit 1 + } + + timeDir=$(foamListTimes -latestTime) + + echo "# ccx tau_xx tau_yy tau_zz cp" > profiles.dat + foamDictionary -entry boundaryField.bump.value -value $timeDir/Cx | \ + sed -n '/(/,/)/p' | sed -e 's/[()]//g;/^\s*$/d' > Cx.$$ + foamDictionary -entry boundaryField.bump.value -value $timeDir/wallShearStress | \ + sed -n '/(/,/)/p' | sed -e 's/[()]//g;/^\s*$/d' > tau.$$ + foamDictionary -entry boundaryField.bump.value -value $timeDir/Cp | \ + sed -n '/(/,/)/p' | sed -e 's/[()]//g;/^\s*$/d' > cp.$$ + paste -d ' ' Cx.$$ tau.$$ cp.$$ >> profiles.dat + + plotTau + plotCp + + \rm -f Cx.$$ tau.$$ cp.$$ profiles.dat +fi diff --git a/tutorials/incompressible/simpleFoam/bump2D/system/blockMeshDict b/tutorials/incompressible/simpleFoam/bump2D/system/blockMeshDict new file mode 100644 index 00000000000..cd630e1e3a4 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/bump2D/system/blockMeshDict @@ -0,0 +1,191 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 1; + +vertices +( + ( -25.0 0 1 ) // 0 + ( 0 0 1 ) // 1 + ( 0.3 0 1 ) // 2 + ( 1.2 0 1 ) // 3 + ( 1.5 0 1 ) // 4 + ( 26.5 0 1 ) // 5 + + ( 26.5 5 1 ) // 6 + ( 1.5 5 1 ) // 7 + ( 1.2 5 1 ) // 8 + ( 0.3 5 1 ) // 9 + ( 0 5 1 ) // 10 + ( -25.0 5 1 ) // 11 + + ( -25.0 0 -1 ) // 12 + ( 0 0 -1 ) // 13 + ( 0.3 0 -1 ) // 14 + ( 1.2 0 -1 ) // 15 + ( 1.5 0 -1 ) // 16 + ( 26.5 0 -1 ) // 17 + + ( 26.5 5 -1 ) // 18 + ( 1.5 5 -1 ) // 19 + ( 1.2 5 -1 ) // 20 + ( 0.3 5 -1 ) // 21 + ( 0 5 -1 ) // 22 + ( -25.0 5 -1 ) // 23 +); + +blocks +( + // Medium level for tutorial + hex ( 0 1 13 12 11 10 22 23) (30 1 81) simpleGrading (0.002 1 20000) + hex ( 1 2 14 13 10 9 21 22) (25 1 81) simpleGrading (2 1 20000) + hex ( 2 3 15 14 9 8 20 21) (60 1 81) simpleGrading (1 1 20000) + hex ( 3 4 16 15 8 7 19 20) (25 1 81) simpleGrading (0.5 1 20000) + hex ( 4 5 17 16 7 6 18 19) (30 1 81) simpleGrading (500 1 20000) + + // Fine + //hex ( 0 1 13 12 11 10 22 23) (240 1 648) simpleGrading (0.002 1 20000) + //hex ( 1 2 14 13 10 9 21 22) (200 1 648) simpleGrading (2 1 20000) + //hex ( 2 3 15 14 9 8 20 21) (480 1 648) simpleGrading (1 1 20000) + //hex ( 3 4 16 15 8 7 19 20) (200 1 648) simpleGrading (0.5 1 20000) + //hex ( 4 5 17 16 7 6 18 19) (240 1 648) simpleGrading (500 1 20000) +); + +edges #codeStream +{ + codeInclude + #{ + #include "pointField.H" + #include "mathematicalConstants.H" + #}; + + code + #{ + const scalar xMin = 0.3; + const scalar xMax = 1.2; + const label nPoints = 100; + const scalar dx = (xMax - xMin)/scalar(nPoints - 1); + + os << "(" << nl << "spline 2 3" << nl; + pointField profile(nPoints); + const scalar pi = constant::mathematical::pi; + + for (label i = 0; i < nPoints; ++i) + { + scalar x = xMin + i*dx; + profile[i].x() = x; + profile[i].y() = 0.05*pow4(sin(pi*x/0.9 - (pi/3))); + profile[i].z() = 1; + } + os << profile << nl; + + os << "spline 14 15" << nl; + profile.replace(2, -1); + os << profile << nl; + + os << ");" << nl; + #}; +}; + + +boundary +( + inlet + { + type patch; + faces + ( + (0 11 23 12) + ); + } + + outlet + { + type patch; + faces + ( + (17 18 6 5) + ); + } + + top + { + type symmetryPlane; + faces + ( + (11 10 22 23) + (10 9 21 22) + ( 9 8 20 21) + ( 8 7 19 20) + ( 7 6 18 19) + ); + } + + symUp + { + type symmetryPlane; + faces + ( + ( 0 12 13 1) + ); + } + + bump + { + type wall; + faces + ( + ( 1 13 14 2) + ( 2 14 15 3) + ( 3 15 16 4) + ); + } + + symDown + { + type symmetryPlane; + faces + ( + ( 4 16 17 5) + ); + } + + frontAndBack + { + type empty; + faces + ( + (12 23 22 13) + (13 22 21 14) + (14 21 20 15) + (15 20 19 16) + (16 19 18 17) + + ( 0 11 10 1) + ( 1 10 9 2) + ( 2 9 8 3) + ( 3 8 7 4) + ( 4 7 6 5) + ); + } + +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/bump2D/system/controlDict b/tutorials/incompressible/simpleFoam/bump2D/system/controlDict new file mode 100644 index 00000000000..e53528c11f9 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/bump2D/system/controlDict @@ -0,0 +1,113 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application simpleFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 10000; + +deltaT 1; + +writeControl timeStep; + +writeInterval 100; + +purgeWrite 3; + +writeFormat ascii; + +writePrecision 8; + +writeCompression off; + +timeFormat general; + +timePrecision 8; + +runTimeModifiable true; + +functions +{ + pressure + { + type pressure; + libs ("libfieldFunctionObjects.so"); + writeControl writeTime; + result Cp; + calcTotal no; + calcCoeff yes; + rho rhoInf; + rhoInf 1; + U UInf; + UInf (69.44 0 0); + pInf 0; + } + + forceCoeffs + { + libs ("libforces.so"); + type forceCoeffs; + writeControl writeTime; + rho rhoInf; + rhoInf 1; + liftDir (0 1 0); + dragDir (1 0 0); + CofR (0.75 0 0); // bump midpoint + pitchAxis (0 0 1); + magUInf 69.44; + lRef 0.9; // length of bump + Aref 0.1; // mesh span = 2, bump height = 0.05; 2*0.05=0.1 + patches (bump); + } + + wallShearStress + { + type wallShearStress; + libs ("libfieldFunctionObjects.so"); + writeControl writeTime; + patches (bump); + } + + yPlus + { + type yPlus; + libs ("libfieldFunctionObjects.so"); + writeControl writeTime; + patches (bump); + } + + cellCentres + { + type writeCellCentres; + libs ("libfieldFunctionObjects.so"); + writeControl writeTime; + } + + residuals + { + type residuals; + libs ("libutilityFunctionObjects.so"); + fields (".*"); + } +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/bump2D/system/decomposeParDict b/tutorials/incompressible/simpleFoam/bump2D/system/decomposeParDict new file mode 100644 index 00000000000..268d7687b05 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/bump2D/system/decomposeParDict @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 8; + +method hierarchical; + +hierarchicalCoeffs +{ + n (8 1 1); + // delta 0.001; //< default value = 0.001 + // order xyz; //< default order = xyz +} + diff --git a/tutorials/incompressible/simpleFoam/bump2D/system/fvSchemes b/tutorials/incompressible/simpleFoam/bump2D/system/fvSchemes new file mode 100644 index 00000000000..f2678678acb --- /dev/null +++ b/tutorials/incompressible/simpleFoam/bump2D/system/fvSchemes @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default steadyState; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) bounded Gauss linearUpwind grad(U); + div(phi,epsilon) bounded Gauss upwind; + div(phi,omega) bounded Gauss upwind; + div(phi,k) bounded Gauss upwind; + div(phi,nuTilda) bounded Gauss upwind; + div((nuEff*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +wallDist +{ + method meshWave; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/bump2D/system/fvSolution b/tutorials/incompressible/simpleFoam/bump2D/system/fvSolution new file mode 100644 index 00000000000..9cdf5833aa8 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/bump2D/system/fvSolution @@ -0,0 +1,64 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1806 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver GAMG; + smoother DICGaussSeidel; + tolerance 1e-08; + relTol 0.1; + } + + "(U|k|epsilon|omega|nuTilda)" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-8; + relTol 0; + } +} + +SIMPLE +{ + nNonOrthogonalCorrectors 0; + consistent yes; + residualControl + { + p 1e-5; + U 1e-5; + "(k|epsilon|omega|nuTilda)" 1e-5; + } +} + +relaxationFactors +{ + equations + { + U 0.9; + "(k|epsilon|omega|nuTilda)" 0.7; + } +} + + +cache +{ + grad(U); +} + +// ************************************************************************* // -- GitLab