TUT: basic, IO, preProcessing, VV: clean up tutorials

- TUT: mesh: add missing SnakeRiverCanyon files
- TUT: mesh: add missing cp source in a foamyHexMesh tutorial
This commit is contained in:
Kutalmis Bercin
2021-06-02 12:44:21 +01:00
parent 48cdf5523b
commit 3384d37a9a
840 changed files with 14574 additions and 41272 deletions

View File

@ -0,0 +1,66 @@
/*--------------------------------*- 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 (0 0 0);
boundaryField
{
inlet
{
type atmBoundaryLayerInletVelocity;
#include "include/ABLConditions"
value uniform (0 0 0);
}
ground
{
type noSlip;
}
top
{
// (HW:p. 365):
// "In addition, as suggested by RH and often ignored by others, a"
// "constant shear stress of rho*(u^*)^2 was applied at the top boundary."
//
// u^* ~ Uref*kappa/ln((Zref+z0)/z0)
// (HW:Table 1):
// Uref = 10 m/s
// Zref = 6 m
// z0 = 0.01 m
// tau = rho*(u^*)^2 = 0.390796574
type fixedShearStress;
tau (0.390796574 0 0);
value uniform (0 0 0);
}
sides
{
type symmetry;
}
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,19 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
kappa 0.40; // (HW:p. 358)
Cmu 0.09; // (HW:p. 358)
flowDir (1 0 0); // (HW:Fig. 1)
zDir (0 0 1); // (HW:Fig. 1)
Uref 10.0; // (HW:Table 1)
Zref 6.0; // (HW:Table 1)
z0 uniform 0.01; // (HW:Table 1)
d uniform 0.0;
// ************************************************************************* //

View File

@ -0,0 +1,55 @@
/*--------------------------------*- 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 volScalarField;
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 1.3; // (HW:Eq. 6)
boundaryField
{
inlet
{
type atmBoundaryLayerInletK;
#include "include/ABLConditions"
value uniform 0;
}
ground
{
type kqRWallFunction;
value uniform 0.0;
}
top
{
type zeroGradient;
}
sides
{
type symmetry;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,59 @@
/*--------------------------------*- 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 volScalarField;
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
#include "include/ABLConditions"
inlet
{
type calculated;
value uniform 0;
}
ground
{
type atmNutkWallFunction;
kappa $kappa;
Cmu $Cmu;
z0 $z0;
value uniform 0.0;
}
top
{
type calculated;
value uniform 0;
}
sides
{
type symmetry;
}
outlet
{
type calculated;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,51 @@
/*--------------------------------*- 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 volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type zeroGradient;
}
ground
{
type zeroGradient;
}
top
{
type zeroGradient;
}
sides
{
type symmetry;
}
outlet
{
type uniformFixedValue;
uniformValue constant 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
/*--------------------------------*- 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 transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
nu 1.5e-05;
// ************************************************************************* //

View File

@ -0,0 +1,111 @@
/*--------------------------------*- 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 blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
scale 1;
// x = streamwise
// y = spanwise
// z = wall-normal
nx 500;
ny 5;
nz 50;
xMin 0;
xMax 5000.0;
yMin 0;
yMax 100.0;
zMin 0.0;
zMax 500.0;
// blockMesh calculator input:
// width of start cell = 1.0 (HW:p. 359)
// number of cells = 50
// total length = 500
// blockMesh calculator output:
// cell-to-cell expansion ratio = 1.076030437 (consistent with 1.076 (HW:Fig.1))
zTotalExpansion 36.25795062;
vertices
(
($xMin $yMin $zMin)
($xMax $yMin $zMin)
($xMax $yMax $zMin)
($xMin $yMax $zMin)
($xMin $yMin $zMax)
($xMax $yMin $zMax)
($xMax $yMax $zMax)
($xMin $yMax $zMax)
);
blocks
(
hex (0 1 2 3 4 5 6 7) ($nx $ny $nz) simpleGrading (1 1 $zTotalExpansion)
);
edges
(
);
boundary
(
inlet
{
type patch;
faces
(
(0 4 7 3)
);
}
ground
{
type wall;
faces
(
(0 3 2 1)
);
}
top
{
type patch;
faces
(
(4 5 6 7)
);
}
sides
{
type symmetry;
faces
(
(1 5 4 0)
(3 7 6 2)
);
}
outlet
{
type patch;
faces
(
(2 6 5 1)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //

View File

@ -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 dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Make sure all utilities know specialised models
libs (atmosphericModels);
application simpleFoam;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 5000;
deltaT 1;
writeControl timeStep;
writeInterval 500;
purgeWrite 0;
writeFormat ascii;
writePrecision 12;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
functions
{
#include "sampleLines"
#include "sampleIso"
#include "samplePlanes"
minMax
{
type fieldMinMax;
libs (fieldFunctionObjects);
writeControl writeTime;
fields (U);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,27 @@
/*--------------------------------*- 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 decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 8;
method hierarchical;
coeffs
{
n (8 1 1);
}
// ************************************************************************* //

View File

@ -0,0 +1,62 @@
/*--------------------------------*- 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 fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default steadyState;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) bounded Gauss linear;
turbulence bounded Gauss limitedLinear 1;
div(phi,epsilon) $turbulence;
div(phi,omega) $turbulence;
div(phi,k) $turbulence;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear uncorrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default uncorrected;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -0,0 +1,59 @@
/*--------------------------------*- 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 fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver GAMG;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.01;
}
"(U|k|epsilon|omega)"
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.01;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 0;
consistent true;
pRefCell 0;
pRefValue 0;
}
relaxationFactors
{
equations
{
U 0.9;
"(k|epsilon|omega)" 0.7;
}
}
cache
{
grad(U);
}
// ************************************************************************* //

View File

@ -0,0 +1,25 @@
// -*- C++ -*-
sampleIso
{
type surfaces;
libs (sampling);
writeControl writeTime;
surfaceFormat vtk;
fields (U k epsilon nut);
surfaces
{
envelope
{
type isoSurface;
isoMethod topo;
isoField k;
isoValues (1.28 1.29 1.30 1.31 1.32 1.33);
}
}
}
// *********************************************************************** //

View File

@ -0,0 +1,99 @@
// -*- C++ -*-
// The locations of the sample profiles correspond to:
// Hargreaves-Wright (2007), Fig.6
// DOI:10.1016/j.jweia.2006.08.002
_sampler
{
type sets;
libs (sampling);
setFormat raw;
interpolationScheme cell;
writeControl writeTime;
enabled false;
sets
(
x_0mPatch // inlet patch face centres
{
type face;
axis z;
start (0 50 0);
end (0 50 500);
}
x_0mCell // inlet-first cell centres
{
type midPoint;
axis z;
start (5.0 50 0);
end (5.0 50 500);
}
x_2500m
{
type face;
axis z;
start (2500 50 0);
end (2500 50 500);
}
x_4000m
{
type face;
axis z;
start (4000 50 0);
end (4000 50 500);
}
x_5000mCell // outlet patch face centres
{
type face;
axis z;
start (4995 50 0);
end (4995 50 500);
}
x_5000mPatch // outlet-first cell centres
{
type face;
axis z;
start (5000 50 0);
end (5000 50 500);
}
);
}
samples_u
{
${_sampler}
fields (U);
enabled true;
}
samples_k
{
${_sampler}
fields (k);
enabled true;
}
samples_epsilon
{
${_sampler}
fields (epsilon);
enabled true;
}
samples_omega
{
${_sampler}
fields (omega);
enabled true;
}
samples_nut
{
${_sampler}
fields (nut);
enabled true;
}
// *********************************************************************** //

View File

@ -0,0 +1,30 @@
// -*- C++ -*-
samplePlanes
{
type surfaces;
libs (sampling);
writeControl writeTime;
surfaceFormat vtk;
fields (U k epsilon nut);
surfaces
{
planes
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (1e-8 0 0); // slightly inside the domain
normal (1 0 0);
}
offsets ( 500 1000 1500 2000 2500 3000 3500 4000 4500 );
}
}
}
// *********************************************************************** //

View File

@ -0,0 +1,59 @@
/*--------------------------------*- 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 volScalarField;
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 0.01;
boundaryField
{
#include "include/ABLConditions"
inlet
{
type atmBoundaryLayerInletEpsilon;
#include "include/ABLConditions"
value uniform 0;
}
ground
{
type epsilonWallFunction;
Cmu $Cmu;
kappa $kappa;
value $internalField;
}
top
{
type zeroGradient;
}
sides
{
type symmetry;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- 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 turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
RASModel kEpsilon;
turbulence on;
printCoeffs on;
kEpsilonCoeffs // Valid only for epsilon-based models
{
Cmu 0.09;
C1 1.44;
C2 1.92;
sigmaEps 1.11; //Original value:1.44
// See p. 358:
// Hargreaves, D. M., & Wright, N. G. (2007).
// On the use of the kε model in commercial CFD software
// to model the neutral atmospheric boundary layer.
// Journal of wind engineering and
// industrial aerodynamics, 95(5), 355-369.
// DOI:10.1016/j.jweia.2006.08.002
}
}
// ************************************************************************* //

View File

@ -0,0 +1,59 @@
/*--------------------------------*- 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 volScalarField;
object omega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 -1 0 0 0 0];
internalField uniform 0.0007;
boundaryField
{
#include "include/ABLConditions"
inlet
{
type atmBoundaryLayerInletOmega;
#include "include/ABLConditions"
value uniform 0;
}
ground
{
type omegaWallFunction;
Cmu $Cmu;
kappa $kappa;
value $internalField;
}
top
{
type zeroGradient;
}
sides
{
type symmetry;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,29 @@
/*--------------------------------*- 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 turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
RASModel kOmegaSST;
turbulence on;
printCoeffs on;
}
// ************************************************************************* //