mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
TUT: Added new tutorial cases
This commit is contained in:
6
tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/Allclean
Executable file
6
tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/Allclean
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
(cd initChannel && ./Allclean)
|
||||
(cd fullCase && ./Allclean)
|
||||
|
||||
11
tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/Allrun
Executable file
11
tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/Allrun
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Run a precursor channel flow to create a fully developed flow profile for the
|
||||
# main case
|
||||
(cd initChannel && ./Allrun)
|
||||
|
||||
# Run the main case
|
||||
(cd fullCase && ./Allrun)
|
||||
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
Unsteady flow over a surface mounted cube
|
||||
|
||||
The set-up is based on the description given by Martinuzzi and Tropea:
|
||||
|
||||
R. Martinuzzi and C. Tropea. The Flow Around Surface-Mounted, Prismatic
|
||||
Obstacles Placed in a Fully Developed Channel Flow. Journal of Fluids
|
||||
Engineering, 115(1):85-92, 1993.
|
||||
|
||||
where the Reynolds number based on the cube height is Re_h 40000.
|
||||
|
||||
Turbulence is modelled using the Spalart-Allmaras Improved Delayed Detached
|
||||
Eddy Simulation (IDDES) model
|
||||
|
||||
For further details please visit:
|
||||
|
||||
openfoam.com/documentation/cpp-guide/html/verification-validation-turbulent-surface-mounted-cube.html
|
||||
|
||||
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
// type timeVaryingMappedFixedValue;
|
||||
// offset (0 0 0);
|
||||
// setAverage off;
|
||||
type turbulentDFSEMInlet;
|
||||
delta 1;
|
||||
nCellPerEddy 3;
|
||||
mapMethod nearestCell;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform (0 0 0);
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
|
||||
"(cube|topAndBottom)"
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,52 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1e-5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type timeVaryingMappedFixedValue;
|
||||
offset 0;
|
||||
setAverage off;
|
||||
mapMethod nearest;
|
||||
// type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
"(cube|topAndBottom)"
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,52 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object nuTilda;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 7.5e-5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type timeVaryingMappedFixedValue;
|
||||
offset 0;
|
||||
setAverage off;
|
||||
mapMethod nearest;
|
||||
// type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
"(cube|topAndBottom)"
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object nut;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
"(cube|topAndBottom)"
|
||||
{
|
||||
type nutUSpaldingWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
"(cube|topAndBottom)"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
\rm -rf constant/boundaryData *.png
|
||||
|
||||
29
tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allrun
Executable file
29
tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allrun
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
channelCase=../initChannel
|
||||
channelDataDir=$channelCase/postProcessing/surfaces/inlet
|
||||
|
||||
[ -d $channelDataDir ] || {
|
||||
echo "Unable to locate precursor channel case - exiting"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Copy the channel data
|
||||
# Note: this is mapped using a timeVaryingMapped condition on the inlet patch
|
||||
mkdir -p constant/boundaryData/inlet/0
|
||||
channelTimeDir=$(foamListTimes -case $channelCase -latestTime)
|
||||
|
||||
\cp -rf $channelDataDir/points constant/boundaryData/inlet
|
||||
\cp -rf $channelDataDir/$channelTimeDir/turbulenceProperties:R constant/boundaryData/inlet/0/R
|
||||
\cp -rf $channelDataDir/$channelTimeDir/turbulenceProperties:L constant/boundaryData/inlet/0/L
|
||||
\cp -rf $channelDataDir/$channelTimeDir/turbulenceProperties:nuTilda constant/boundaryData/inlet/0/nuTilda
|
||||
\cp -rf $channelDataDir/$channelTimeDir/U constant/boundaryData/inlet/0/U
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication decomposePar
|
||||
runParallel $(getApplication)
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
transportModel Newtonian;
|
||||
|
||||
nu 2.5e-05;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,40 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType LES;
|
||||
|
||||
LES
|
||||
{
|
||||
turbulence on;
|
||||
|
||||
LESModel SpalartAllmarasIDDES;
|
||||
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
delta IDDESDelta;
|
||||
|
||||
IDDESDeltaCoeffs
|
||||
{
|
||||
hmax maxDeltaxyzCubeRoot;
|
||||
maxDeltaxyzCubeRootCoeffs
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
52
tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/plot
Executable file
52
tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/plot
Executable file
@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
time=$1
|
||||
gnuplot<<EOF
|
||||
set terminal pngcairo font "arial,16" size 600,600
|
||||
set xlabel "U/U_b"
|
||||
set ylabel "y/H"
|
||||
set grid
|
||||
set key right top
|
||||
set xrange [-0.5:1.5]
|
||||
set yrange [0:2]
|
||||
Ub=1.10763
|
||||
set output "U_at_x_by_hm10.png"
|
||||
plot \
|
||||
"postProcessing/sample/$time/xm10_U_UMean.xy" u (\$5/Ub):1 title "X/h = -1" w lines lc "black" lw 2
|
||||
set output "U_at_x_by_hm05.png"
|
||||
plot \
|
||||
"postProcessing/sample/$time/xm05_U_UMean.xy" u (\$5/Ub):1 title "X/h = -0.5" w lines lc "black" lw 2
|
||||
set output "U_at_x_by_00.png"
|
||||
plot \
|
||||
"postProcessing/sample/$time/x00_U_UMean.xy" u (\$5/Ub):1 title "X/h = 0" w lines lc "black" lw 2
|
||||
set output "U_at_x_by_05.png"
|
||||
plot \
|
||||
"postProcessing/sample/$time/x05_U_UMean.xy" u (\$5/Ub):1 title "X/h = 0.5" w lines lc "black" lw 2
|
||||
set output "U_at_x_by_10.png"
|
||||
plot \
|
||||
"postProcessing/sample/$time/x10_U_UMean.xy" u (\$5/Ub):1 title "X/h = 1" w lines lc "black" lw 2
|
||||
set output "U_at_x_by_15.png"
|
||||
plot \
|
||||
"postProcessing/sample/$time/x15_U_UMean.xy" u (\$5/Ub):1 title "X/h = 1.5" w lines lc "black" lw 2
|
||||
set output "U_at_x_by_20.png"
|
||||
plot \
|
||||
"postProcessing/sample/$time/x20_U_UMean.xy" u (\$5/Ub):1 title "X/h = 2" w lines lc "black" lw 2
|
||||
|
||||
set output "U_at_x_by_25.png"
|
||||
plot \
|
||||
"postProcessing/sample/$time/x25_U_UMean.xy" u (\$5/Ub):1 title "X/h = 2.5" w lines lc "black" lw 2
|
||||
|
||||
set output "U_at_x_by_30.png"
|
||||
plot \
|
||||
"postProcessing/sample/$time/x30_U_UMean.xy" u (\$5/Ub):1 title "X/h = 3" w lines lc "black" lw 2
|
||||
|
||||
set output "U_at_x_by_35.png"
|
||||
plot \
|
||||
"postProcessing/sample/$time/x35_U_UMean.xy" u (\$5/Ub):1 title "X/h = 3.5" w lines lc "black" lw 2
|
||||
|
||||
set output "U_at_x_by_40.png"
|
||||
plot \
|
||||
"postProcessing/sample/$time/x40_U_UMean.xy" u (\$5/Ub):1 title "X/h = 4" w lines lc "black" lw 2
|
||||
|
||||
EOF
|
||||
@ -0,0 +1,240 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
scale 1;
|
||||
|
||||
x_up 3.5;
|
||||
x_down 10;
|
||||
y_pad 4;
|
||||
z_pad 1;
|
||||
|
||||
x0 0;
|
||||
x1 $x_up;
|
||||
x2 #calc "$x1 + 1";
|
||||
x3 #calc "$x2 + $x_down";
|
||||
|
||||
y0 0;
|
||||
y1 $y_pad;
|
||||
y2 #calc "$y1 + 1";
|
||||
y3 #calc "$y2 + $y_pad";
|
||||
|
||||
z0 0;
|
||||
z1 1;
|
||||
z2 #calc "$z1 + $z_pad";
|
||||
|
||||
nx1 40;
|
||||
nx2 40;
|
||||
nx3 80;
|
||||
ny1 30;
|
||||
ny2 $nx2;
|
||||
ny3 $ny1;
|
||||
nz1 $nx2;
|
||||
nz2 40;
|
||||
|
||||
vertices
|
||||
(
|
||||
($x0 $y0 $z0) // 0
|
||||
($x1 $y0 $z0) // 1
|
||||
($x2 $y0 $z0) // 2
|
||||
($x3 $y0 $z0) // 3
|
||||
($x0 $y0 $z1) // 4
|
||||
($x1 $y0 $z1) // 5
|
||||
($x2 $y0 $z1) // 6
|
||||
($x3 $y0 $z1) // 7
|
||||
($x0 $y0 $z2) // 8
|
||||
($x1 $y0 $z2) // 9
|
||||
($x2 $y0 $z2) // 10
|
||||
($x3 $y0 $z2) // 11
|
||||
|
||||
($x0 $y1 $z0) // 12
|
||||
($x1 $y1 $z0) // 13
|
||||
($x2 $y1 $z0) // 14
|
||||
($x3 $y1 $z0) // 15
|
||||
($x0 $y1 $z1) // 16
|
||||
($x1 $y1 $z1) // 17
|
||||
($x2 $y1 $z1) // 18
|
||||
($x3 $y1 $z1) // 19
|
||||
($x0 $y1 $z2) // 20
|
||||
($x1 $y1 $z2) // 21
|
||||
($x2 $y1 $z2) // 22
|
||||
($x3 $y1 $z2) // 23
|
||||
|
||||
($x0 $y2 $z0) // 24
|
||||
($x1 $y2 $z0) // 25
|
||||
($x2 $y2 $z0) // 26
|
||||
($x3 $y2 $z0) // 27
|
||||
($x0 $y2 $z1) // 28
|
||||
($x1 $y2 $z1) // 29
|
||||
($x2 $y2 $z1) // 30
|
||||
($x3 $y2 $z1) // 31
|
||||
($x0 $y2 $z2) // 32
|
||||
($x1 $y2 $z2) // 33
|
||||
($x2 $y2 $z2) // 34
|
||||
($x3 $y2 $z2) // 35
|
||||
|
||||
($x0 $y3 $z0) // 36
|
||||
($x1 $y3 $z0) // 37
|
||||
($x2 $y3 $z0) // 38
|
||||
($x3 $y3 $z0) // 39
|
||||
($x0 $y3 $z1) // 40
|
||||
($x1 $y3 $z1) // 41
|
||||
($x2 $y3 $z1) // 42
|
||||
($x3 $y3 $z1) // 43
|
||||
($x0 $y3 $z2) // 44
|
||||
($x1 $y3 $z2) // 45
|
||||
($x2 $y3 $z2) // 46
|
||||
($x3 $y3 $z2) // 47
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
//x_up ((0.4 0.3 0.5)(0.6 0.7 1));
|
||||
//x_down ((0.4 0.75 1)(0.6 0.25 10));
|
||||
//z_top ((0.3 0.4 1)(0.7 0.6 2));
|
||||
//y_side1 ((0.6 0.4 0.25)(0.4 0.6 1));
|
||||
//y_side2 ((0.4 0.6 1)(0.6 0.4 4));
|
||||
|
||||
x_up ((0.4 0.25 0.5)(0.3 0.25 0.75)(0.3 0.5 0.2));
|
||||
x_down ((0.15 0.45 3)(0.25 0.35 1.5)(0.6 0.2 5));
|
||||
z_top ((0.2 0.25 4)(0.6 0.5 1)(0.2 0.25 0.25));
|
||||
z_bottom ((0.2 0.25 4)(0.6 0.5 1)(0.2 0.25 0.25));
|
||||
y_side1 ((0.4 0.1 0.5)(0.4 0.2 0.5)(0.3 0.7 0.1));
|
||||
y_side2 ((0.3 0.7 10)(0.4 0.2 2)(0.4 0.1 2));
|
||||
|
||||
blocks
|
||||
(
|
||||
hex ( 0 1 13 12 4 5 17 16) ($nx1 $ny1 $nz1) simpleGrading ( $x_up $y_side1 $z_bottom)
|
||||
hex ( 1 2 14 13 5 6 18 17) ($nx2 $ny1 $nz1) simpleGrading ( 1 $y_side1 $z_bottom)
|
||||
hex ( 2 3 15 14 6 7 19 18) ($nx3 $ny1 $nz1) simpleGrading ($x_down $y_side1 $z_bottom)
|
||||
hex ( 4 5 17 16 8 9 21 20) ($nx1 $ny1 $nz2) simpleGrading ( $x_up $y_side1 $z_top)
|
||||
hex ( 5 6 18 17 9 10 22 21) ($nx2 $ny1 $nz2) simpleGrading ( 1 $y_side1 $z_top)
|
||||
hex ( 6 7 19 18 10 11 23 22) ($nx3 $ny1 $nz2) simpleGrading ($x_down $y_side1 $z_top)
|
||||
|
||||
hex (12 13 25 24 16 17 29 28) ($nx1 $ny2 $nz1) simpleGrading ($x_up 1 $z_bottom)
|
||||
//hex (13 14 26 25 17 18 30 29) ($nx2 $ny2 $nz1) simpleGrading (1 1 $z_bottom)
|
||||
hex (14 15 27 26 18 19 31 30) ($nx3 $ny2 $nz1) simpleGrading ($x_down 1 $z_bottom)
|
||||
hex (16 17 29 28 20 21 33 32) ($nx1 $ny2 $nz2) simpleGrading ($x_up 1 $z_top)
|
||||
hex (17 18 30 29 21 22 34 33) ($nx2 $ny2 $nz2) simpleGrading (1 1 $z_top)
|
||||
hex (18 19 31 30 22 23 35 34) ($nx3 $ny2 $nz2) simpleGrading ($x_down 1 $z_top)
|
||||
|
||||
hex (24 25 37 36 28 29 41 40) ($nx1 $ny3 $nz1) simpleGrading ($x_up $y_side2 $z_bottom)
|
||||
hex (25 26 38 37 29 30 42 41) ($nx2 $ny3 $nz1) simpleGrading (1 $y_side2 $z_bottom)
|
||||
hex (26 27 39 38 30 31 43 42) ($nx3 $ny3 $nz1) simpleGrading ($x_down $y_side2 $z_bottom)
|
||||
hex (28 29 41 40 32 33 45 44) ($nx1 $ny3 $nz2) simpleGrading ($x_up $y_side2 $z_top)
|
||||
hex (29 30 42 41 33 34 46 45) ($nx2 $ny3 $nz2) simpleGrading (1 $y_side2 $z_top)
|
||||
hex (30 31 43 42 34 35 47 46) ($nx3 $ny3 $nz2) simpleGrading ($x_down $y_side2 $z_top)
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
cube
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(13 17 18 14)
|
||||
(14 18 30 26)
|
||||
(25 29 30 26)
|
||||
(13 25 29 17)
|
||||
(17 29 30 18)
|
||||
);
|
||||
}
|
||||
topAndBottom
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
// floor
|
||||
( 0 12 13 1)
|
||||
( 1 13 14 2)
|
||||
( 2 14 15 3)
|
||||
(12 24 25 13)
|
||||
(14 26 27 15)
|
||||
(24 36 37 25)
|
||||
(25 37 38 26)
|
||||
(26 38 39 27)
|
||||
|
||||
// top
|
||||
( 8 9 21 20)
|
||||
( 9 10 22 21)
|
||||
(10 11 23 22)
|
||||
(20 21 33 32)
|
||||
(21 22 34 33)
|
||||
(22 23 35 34)
|
||||
(32 33 45 44)
|
||||
(33 34 46 45)
|
||||
(34 35 47 46)
|
||||
);
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
// minY
|
||||
( 0 1 5 4)
|
||||
( 1 2 6 5)
|
||||
( 2 3 7 6)
|
||||
( 4 5 9 8)
|
||||
( 5 6 10 9)
|
||||
( 6 7 11 10)
|
||||
|
||||
// maxY
|
||||
(36 40 41 37)
|
||||
(37 41 42 38)
|
||||
(38 42 43 39)
|
||||
(40 44 45 41)
|
||||
(41 45 46 42)
|
||||
(42 46 47 43)
|
||||
);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
( 0 4 16 12)
|
||||
(12 16 28 24)
|
||||
(24 28 40 36)
|
||||
( 4 8 20 16)
|
||||
(16 20 32 28)
|
||||
(28 32 44 40)
|
||||
);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
( 3 15 19 7)
|
||||
(15 27 31 19)
|
||||
(27 39 43 31)
|
||||
( 7 19 23 11)
|
||||
(19 31 35 23)
|
||||
(31 43 47 35)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
@ -0,0 +1,115 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
libs ("libturbulenceModelSchemes.so");
|
||||
|
||||
application pimpleFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 100;
|
||||
|
||||
deltaT 0.002;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 100;
|
||||
|
||||
purgeWrite 3;
|
||||
|
||||
writeFormat binary;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
functions
|
||||
{
|
||||
minMax
|
||||
{
|
||||
type fieldMinMax;
|
||||
libs ("libfieldFunctionObjects.so");
|
||||
fields (U p);
|
||||
}
|
||||
DESField
|
||||
{
|
||||
type DESModelRegions;
|
||||
libs ("libfieldFunctionObjects.so");
|
||||
//region "region0";
|
||||
writeControl writeTime;
|
||||
}
|
||||
Q1
|
||||
{
|
||||
type Q;
|
||||
libs ("libfieldFunctionObjects.so");
|
||||
writeControl writeTime;
|
||||
}
|
||||
vorticity1
|
||||
{
|
||||
type vorticity;
|
||||
libs ("libfieldFunctionObjects.so");
|
||||
writeControl writeTime;
|
||||
}
|
||||
yPlus
|
||||
{
|
||||
type yPlus;
|
||||
libs ("libfieldFunctionObjects.so");
|
||||
writeControl writeTime;
|
||||
}
|
||||
fieldAverage1
|
||||
{
|
||||
type fieldAverage;
|
||||
libs ("libfieldFunctionObjects.so");
|
||||
writeControl writeTime;
|
||||
timeStart 10;
|
||||
|
||||
fields
|
||||
(
|
||||
U
|
||||
{
|
||||
mean on;
|
||||
prime2Mean on;
|
||||
base time;
|
||||
}
|
||||
|
||||
p
|
||||
{
|
||||
mean on;
|
||||
prime2Mean on;
|
||||
base time;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
sample1
|
||||
{
|
||||
#include "sample"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,31 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,70 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default backward;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default leastSquares; // Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss DEShybrid
|
||||
linear // scheme 1
|
||||
linearUpwind grad(U) // scheme 2
|
||||
hmax
|
||||
0.65 // DES coefficient, typically = 0.65
|
||||
1 // Reference velocity scale
|
||||
1 // Reference length scale
|
||||
0 // Minimum sigma limit (0-1)
|
||||
1 // Maximum sigma limit (0-1)
|
||||
1; // 1.0e-03; // Limiter of B function, typically 1e-03
|
||||
// div(phi,U) Gauss LUST grad(U);// 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 orthogonal;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default orthogonal;
|
||||
}
|
||||
|
||||
wallDist
|
||||
{
|
||||
method meshWave;
|
||||
nRequired yes;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,61 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
p
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 0;
|
||||
relTol 0.01;
|
||||
|
||||
smoother DICGaussSeidel;
|
||||
|
||||
}
|
||||
|
||||
pFinal
|
||||
{
|
||||
$p;
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(U|k|nuTilda)"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-8;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
"(U|k|nuTilda)Final"
|
||||
{
|
||||
$U;
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
nOuterCorrectors 3;
|
||||
nCOrrectors 1;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,125 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object sample;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
type sets;
|
||||
libs ("libsampling.so");
|
||||
writeControl writeTime;
|
||||
|
||||
interpolationScheme cellPoint;
|
||||
|
||||
setFormat raw;
|
||||
|
||||
sets
|
||||
(
|
||||
xm10
|
||||
{
|
||||
type face;
|
||||
axis z;
|
||||
start (2.5 4.5 0);
|
||||
end (2.5 4.5 2);
|
||||
}
|
||||
xm05
|
||||
{
|
||||
type face;
|
||||
axis z;
|
||||
start (3 4.5 0);
|
||||
end (3 4.5 2);
|
||||
}
|
||||
x00
|
||||
{
|
||||
type face;
|
||||
axis z;
|
||||
start (3.5 4.5 1);
|
||||
end (3.5 4.5 2);
|
||||
}
|
||||
x05
|
||||
{
|
||||
type face;
|
||||
axis z;
|
||||
start (4 4.5 1);
|
||||
end (4 4.5 2);
|
||||
}
|
||||
x10
|
||||
{
|
||||
type face;
|
||||
axis z;
|
||||
start (4.5 4.5 1);
|
||||
end (4.5 4.5 2);
|
||||
}
|
||||
x15
|
||||
{
|
||||
type face;
|
||||
axis z;
|
||||
start (5 4.5 0);
|
||||
end (5 4.5 2);
|
||||
}
|
||||
x20
|
||||
{
|
||||
type face;
|
||||
axis z;
|
||||
start (5.5 4.5 0);
|
||||
end (5.5 4.5 2);
|
||||
}
|
||||
x25
|
||||
{
|
||||
type face;
|
||||
axis z;
|
||||
start (6 4.5 0);
|
||||
end (6 4.5 2);
|
||||
}
|
||||
x30
|
||||
{
|
||||
type face;
|
||||
axis z;
|
||||
start (6.5 4.5 0);
|
||||
end (6.5 4.5 2);
|
||||
}
|
||||
x35
|
||||
{
|
||||
type face;
|
||||
axis z;
|
||||
start (7 4.5 0);
|
||||
end (7 4.5 2);
|
||||
}
|
||||
x40
|
||||
{
|
||||
type face;
|
||||
axis z;
|
||||
start (7.5 4.5 0);
|
||||
end (7.5 4.5 2);
|
||||
}
|
||||
x45
|
||||
{
|
||||
type face;
|
||||
axis z;
|
||||
start (8 4.5 0);
|
||||
end (8 4.5 2);
|
||||
}
|
||||
x50
|
||||
{
|
||||
type face;
|
||||
axis z;
|
||||
start (8.5 4.5 0);
|
||||
end (8.5 4.5 2);
|
||||
}
|
||||
);
|
||||
|
||||
fields (U UMean);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (1 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
lowerWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object epsilon;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -3 0 0 0 0];
|
||||
|
||||
internalField uniform 180.18; // 10;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
lowerWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1e-08;
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1e-08;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 18.06; // 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
lowerWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1e-10;
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1e-10;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object nuTilda;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
lowerWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object nut;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
lowerWall
|
||||
{
|
||||
type nutLowReWallFunction;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0;
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type nutLowReWallFunction;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication $(getApplication)
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Ubar (1 0 0);
|
||||
|
||||
transportModel Newtonian;
|
||||
|
||||
nu 2.5e-05;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,30 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType RAS;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel LaunderSharmaKE;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,104 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
scale 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0)
|
||||
(1 0 0)
|
||||
(1 1 0)
|
||||
(0 1 0)
|
||||
(0 0 1)
|
||||
(1 0 1)
|
||||
(1 1 1)
|
||||
(0 1 1)
|
||||
(0 0 2)
|
||||
(1 0 2)
|
||||
(1 1 2)
|
||||
(0 1 2)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (1 1 50) simpleGrading (1 1 100)
|
||||
hex (4 5 6 7 8 9 10 11) (1 1 50) simpleGrading (1 1 0.01)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
lowerWall
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 3 2 1)
|
||||
);
|
||||
}
|
||||
|
||||
upperWall
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(8 9 10 11)
|
||||
);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type cyclic;
|
||||
neighbourPatch outlet;
|
||||
faces
|
||||
(
|
||||
(0 4 7 3)
|
||||
(4 8 11 7)
|
||||
);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type cyclic;
|
||||
neighbourPatch inlet;
|
||||
faces
|
||||
(
|
||||
(1 2 6 5)
|
||||
(5 6 10 9)
|
||||
);
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(0 1 5 4)
|
||||
(4 5 9 8)
|
||||
(3 7 6 2)
|
||||
(7 11 10 6)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,85 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application boundaryFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 2000;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 200;
|
||||
|
||||
purgeWrite 1;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
graphFormat raw;
|
||||
|
||||
functions
|
||||
{
|
||||
turbulenceFields
|
||||
{
|
||||
type turbulenceFields;
|
||||
libs ("libfieldFunctionObjects.so");
|
||||
writeControl writeTime;
|
||||
fields (R nuTilda k epsilon omega L);
|
||||
}
|
||||
|
||||
surfaces
|
||||
{
|
||||
type surfaces;
|
||||
surfaceFormat boundaryData;
|
||||
writeControl writeTime;
|
||||
interpolationScheme cell;
|
||||
fields
|
||||
(
|
||||
U
|
||||
turbulenceProperties:R
|
||||
turbulenceProperties:nuTilda
|
||||
turbulenceProperties:L
|
||||
);
|
||||
surfaces
|
||||
(
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
patches (inlet);
|
||||
interpolate false;
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,59 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,k) bounded Gauss linear;
|
||||
div(phi,epsilon) bounded Gauss linear;
|
||||
div(phi,R) bounded Gauss linear;
|
||||
div(phi,nuTilda) bounded Gauss linear;
|
||||
div((nuEff*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(nuEff,U) Gauss linear corrected;
|
||||
laplacian(DkEff,k) Gauss linear corrected;
|
||||
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
|
||||
laplacian(DREff,R) Gauss linear corrected;
|
||||
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,56 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
U
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(k|epsilon|R|nuTilda)"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PISO
|
||||
{
|
||||
nCorrectors 2;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
equations
|
||||
{
|
||||
U 0.5;
|
||||
k 0.7;
|
||||
epsilon 0.7;
|
||||
R 0.7;
|
||||
nuTilda 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user