BUG: atm wall functions: fix double "value" entry issue (#1900)

STYLE: atm wall functions: use auto and bool types wherever possible
  TUT: atmosphericModels: changes for style consistency
This commit is contained in:
Kutalmis Bercin
2020-11-03 10:25:02 +00:00
committed by Andrew Heather
parent 14e86437ae
commit 1bc2ffad99
80 changed files with 323 additions and 311 deletions

View File

@ -18,4 +18,6 @@ runParallel renumberMesh -overwrite
runParallel $(getApplication)
runParallel redistributePar -reconstruct -latestTime
#------------------------------------------------------------------------------

View File

@ -1,117 +0,0 @@
#------------------------------------------------------------------------------
Overview
"By setting appropriate profiles for wind velocity and the turbulence
quantities at the inlet, it is often assumed that the boundary layer will
be maintained up to the buildings or obstructions in the flow." (HW:p. 355).
However, it was quantified by (HW:p. 355) that "even in the absence of
obstructions, ..., the velocity and turbulence profiles decay along the
fetch" (HW:p. 355). It was shown by (HW:p. 355) that a set of modifications
were required to maintain a neutral atmospheric boundary layer throughout
an empty and long computational domain of a RANS computation.
Aim:
Verification of the following boundary conditions in terms of the
maintenance of inlet quantities downstream within a RANS computation:
- atmBoundaryLayerInletVelocity
- atmBoundaryLayerInletK
- atmBoundaryLayerInletEpsilon
- atmBoundaryLayerInletOmega
Benchmark (Physical phenomenon):
The benchmark is an empty fetch computational domain, steady-state
RANS simulation involving the following traits:
- External flow
- The surface layer portion of the neutral-stratified equilibrium
atmospheric boundary layer (no Ekman layer)
- Dry air
- Homogeneous, smooth terrain
- Spatiotemporal-invariant aerodynamic roughness length
- No displacement height
- Newtonian, single-phase, incompressible, non-reacting
Benchmark scenario:
- Computational domain: (HW:Fig. 1)
- Benchmark dataset: (HW:Fig. 6) (Obtained by the WebPlotDigitizer-4.2
(Rohatgi, 2019))
Resources:
Computational study (tag:HW):
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
Wind profile (tag:RQP):
Richards, P. J., Quinn, A. D., & Parker, S. (2002).
A 6 m cube in an atmospheric boundary layer flow-Part 2.
Computational solutions. Wind and structures, 5(2_3_4), 177-192.
DOI:10.12989/was.2002.5.2_3_4.177
Physical modelling:
- The governing equations for:
- Steady-state, Newtonian, single-phase, incompressible fluid flows,
excluding any thermal chemical, electromagnetic and scalar
interactions
- Mathematical approach for the turbulence modelling:
- Reynolds-averaged Navier-Stokes simulation (RANS)
- Turbulence closure model:
- kEpsilon and kOmegaSST linear eddy viscosity closure models
- The sets of input (HW:Table 1):
- Reference height, Zref = 6 [m]
- Aerodynamic roughness height, z0 = 0.01 [m]
- Displacement height, d = 0 [m]
- Reference mean wind speed, Uref = 10 [m/s]
Computational domain modelling:
- Rectangular prism
- (x1, x2, x3)
= (5000, 100, 500) [m]
= (streamwise, spanwise, ground-normal) directions
Computational domain discretisation:
- Spatial resolution:
- (x1, x2, x3) = (500, 5, 50) [cells]
- Refer to the `system/blockMeshDict` for the grading details
- Temporal resolution: Steady state
Equation discretisation:
- Spatial derivatives and variables:
- Convection: Second order
- Others: Second order with various limiters
- Temporal derivatives and variables: First order
Numerical boundary/initial conditions:
- Refer to `0.orig`
Pressure-velocity coupling algorithm:
- SIMPLEC
Linear solvers:
- Refer to `system/fvSolution`
Initialisation and sampling:
- No initialisation/averaging
- Sampling at the end of the simulation via `system/sampleDict`
- Refer to `system/controlDict` for further details
#------------------------------------------------------------------------------

View File

@ -0,0 +1,112 @@
<!------------------------------------------------------------------------- -->
# Overview
"By setting appropriate profiles for wind velocity and the turbulence
quantities at the inlet, it is often assumed that the boundary layer will
be maintained up to the buildings or obstructions in the flow." (HW:p. 355).
However, it was quantified by (HW:p. 355) that "even in the absence of
obstructions, ..., the velocity and turbulence profiles decay along the
fetch" (HW:p. 355). It was shown by (HW:p. 355) that a set of modifications
were required to maintain a neutral atmospheric boundary layer throughout
an empty and long computational domain of a RANS computation.
## Aim
- Verification of the atmospheric boundary-layer boundary conditions in terms
of the maintenance of inlet quantities downstream within a RANS computation:
- atmBoundaryLayerInletVelocity
- atmBoundaryLayerInletK
- atmBoundaryLayerInletEpsilon
- atmBoundaryLayerInletOmega
## Benchmark (Physical phenomenon)
- The benchmark is an empty fetch computational
domain, steady-state RANS simulation.
- Flow characteristics:
- External flow
- The surface layer portion of the neutral-stratified
equilibrium atmospheric boundary layer (no Ekman layer)
- Dry air
- Homogeneous, smooth terrain
- Spatiotemporal-invariant aerodynamic roughness length
- No displacement height
- Newtonian, single-phase, incompressible, non-reacting
- Benchmark scenario:
- Computational domain: (HW:Fig. 1)
- Benchmark dataset: (HW:Fig. 6)
(Obtained by the WebPlotDigitizer-4.2 (Rohatgi, 2019))
## Resources
Computational study (tag:HW):
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
Wind profile (tag:RQP):
Richards, P. J., Quinn, A. D., & Parker, S. (2002).
A 6 m cube in an atmospheric boundary layer flow-Part 2.
Computational solutions. Wind and structures, 5(2_3_4), 177-192.
DOI:10.12989/was.2002.5.2_3_4.177
# Numerics
## Physical modelling:
- The governing equations for:
- Steady-state, Newtonian, single-phase, incompressible fluid flows,
excluding any thermal chemical, electromagnetic and scalar interactions
- Mathematical approach for the turbulence modelling:
- Reynolds-averaged Navier-Stokes simulation (RANS)
- Turbulence closure model:
- kEpsilon and kOmegaSST linear eddy viscosity closure models
- The sets of input (HW:Table 1):
- Reference height, Zref = 6 [m]
- Aerodynamic roughness height, z0 = 0.01 [m]
- Displacement height, d = 0 [m]
- Reference mean wind speed, Uref = 10 [m/s]
## Computational domain modelling:
- Rectangular prism
- (x1, x2, x3) = (5000, 100, 500) [m] = (streamwise, spanwise, ground-normal) directions
## Computational domain discretisation:
- Spatial resolution:
- (x1, x2, x3) = (500, 5, 50) [cells]
- Refer to the `system/blockMeshDict` for the grading details
- Temporal resolution: Steady state
## Equation discretisation:
- Spatial derivatives and variables:
- Convection: Second order
- Others: Second order with various limiters
- Temporal derivatives and variables: First order
## Numerical boundary/initial conditions:
- Refer to `0.orig`
## Pressure-velocity coupling algorithm:
- SIMPLEC
## Linear solvers:
- Refer to `system/fvSolution`
## Initialisation and sampling:
- No initialisation/averaging
- Sampling at the end of the simulation via `system/sampleDict`
- Refer to `system/controlDict` for further details
<!------------------------------------------------------------------------- -->

View File

@ -47,7 +47,6 @@ timePrecision 6;
runTimeModifiable yes;
functions
{
#include "sampleDict"

View File

@ -16,11 +16,12 @@ FoamFile
numberOfSubdomains 8;
method hierarchical;
method hierarchical;
coeffs
{
n (8 1 1);
n (8 1 1);
}
// ************************************************************************* //

View File

@ -27,10 +27,14 @@ gradSchemes
divSchemes
{
default none;
div(phi,U) bounded Gauss linear;
div(phi,epsilon) bounded Gauss limitedLinear 1;
div(phi,omega) bounded Gauss limitedLinear 1;
div(phi,k) bounded Gauss limitedLinear 1;
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;
}

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
location system;
object sampleDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -36,7 +36,7 @@ boundaryField
value uniform 300;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -31,7 +31,7 @@ boundaryField
type slip;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -37,7 +37,7 @@ boundaryField
value uniform 0;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -34,7 +34,7 @@ boundaryField
type slip;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -31,7 +31,7 @@ boundaryField
type slip;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -20,13 +20,13 @@ internalField uniform 0.0;
boundaryField
{
"bottom|top"
"(bottom|top)"
{
type fixedValue;
value uniform 0;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -35,7 +35,7 @@ boundaryField
value uniform 0;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -34,7 +34,7 @@ boundaryField
type slip;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -27,7 +27,7 @@ boundaryField
value uniform 0;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -20,13 +20,13 @@ internalField uniform 0.0;
boundaryField
{
"bottom|top"
"(bottom|top)"
{
type fixedValue;
value uniform 0;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -20,13 +20,13 @@ internalField uniform Q_PLANT;
boundaryField
{
"bottom|top"
"(bottom|top)"
{
type fixedValue;
value uniform 0;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
location "constant";
object fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0;
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -18,4 +17,5 @@ FoamFile
dimensions [0 1 -2 0 0 0 0];
value (0 0 -9.81);
// ************************************************************************* //

View File

@ -14,7 +14,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
simulationType RAS;
RAS
{
@ -33,4 +33,5 @@ RAS
}
}
// ************************************************************************* //

View File

@ -47,10 +47,10 @@ timePrecision 6;
runTimeModifiable false;
functions
{
#includeFunc "samples"
}
// ************************************************************************* //

View File

@ -28,11 +28,14 @@ gradSchemes
divSchemes
{
default none;
div(phi,T) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,k) bounded Gauss upwind;
div(phi,epsilon) bounded Gauss upwind;
div(phi,omega) bounded Gauss upwind;
turbulence bounded Gauss upwind;
div(phi,k) $turbulence;
div(phi,epsilon) $turbulence;
div(phi,omega) $turbulence;
div(phi,T) bounded Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

View File

@ -69,7 +69,6 @@ relaxationFactors
cache
{
grad(U);
grad(T);
}

View File

@ -1,4 +1,4 @@
/*--------------------------------*- C++ -*----------------------------------*/
// -*- C++ -*-
type sets;
libs (sampling);

View File

@ -49,7 +49,7 @@ boundaryField
type slip;
}
"upperInterface|lowerInterface"
"(upperInterface|lowerInterface)"
{
type cyclicAMI;
value $internalField;

View File

@ -45,7 +45,7 @@ boundaryField
type slip;
}
"upperInterface|lowerInterface"
"(upperInterface|lowerInterface)"
{
type cyclicAMI;
value $internalField;

View File

@ -50,7 +50,7 @@ boundaryField
type slip;
}
"upperInterface|lowerInterface"
"(upperInterface|lowerInterface)"
{
type cyclicAMI;
value $internalField;

View File

@ -48,7 +48,7 @@ boundaryField
type slip;
}
"upperInterface|lowerInterface"
"(upperInterface|lowerInterface)"
{
type cyclicAMI;
value $internalField;

View File

@ -45,7 +45,7 @@ boundaryField
type slip;
}
"upperInterface|lowerInterface"
"(upperInterface|lowerInterface)"
{
type cyclicAMI;
value $internalField;

View File

@ -48,7 +48,7 @@ boundaryField
type slip;
}
"upperInterface|lowerInterface"
"(upperInterface|lowerInterface)"
{
type cyclicAMI;
value $internalField;

View File

@ -40,7 +40,7 @@ boundaryField
type slip;
}
"upperInterface|lowerInterface"
"(upperInterface|lowerInterface)"
{
type cyclicAMI;
value $internalField;

View File

@ -38,7 +38,7 @@ boundaryField
value uniform 10.123;
}
"upperInterface|lowerInterface"
"(upperInterface|lowerInterface)"
{
type cyclicAMI;
value $internalField;

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
location "constant";
object fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0;
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -47,7 +47,6 @@ timePrecision 6;
runTimeModifiable false;
functions
{
fieldAverage1

View File

@ -28,11 +28,14 @@ gradSchemes
divSchemes
{
default none;
div(phi,T) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,k) bounded Gauss upwind;
div(phi,epsilon) bounded Gauss upwind;
div(phi,omega) bounded Gauss upwind;
turbulence bounded Gauss upwind;
div(phi,k) $turbulence;
div(phi,epsilon) $turbulence;
div(phi,omega) $turbulence;
div(phi,T) bounded Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

View File

@ -70,7 +70,6 @@ relaxationFactors
cache
{
grad(U);
grad(T);
}

View File

@ -21,4 +21,5 @@ cuttingPatches
terrain top
);
// ************************************************************************* //

View File

@ -1,4 +1,4 @@
/*--------------------------------*- C++ -*----------------------------------*/
// -*- C++ -*-
type sets;
libs (sampling);

View File

@ -36,7 +36,7 @@ boundaryField
value uniform 300;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -31,7 +31,7 @@ boundaryField
type slip;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -37,7 +37,7 @@ boundaryField
value uniform 0;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -34,7 +34,7 @@ boundaryField
type slip;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -31,7 +31,7 @@ boundaryField
type slip;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -32,7 +32,7 @@ boundaryField
value uniform 0;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -36,7 +36,7 @@ boundaryField
value uniform 0;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -34,7 +34,7 @@ boundaryField
type slip;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -20,18 +20,17 @@ internalField uniform 0.0;
boundaryField
{
"bottom|top"
"(bottom|top)"
{
type fixedFluxPressure;
rho rhok;
value uniform 0;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}
}

View File

@ -20,13 +20,13 @@ internalField uniform 0.2;
boundaryField
{
"bottom|top"
"(bottom|top)"
{
type fixedValue;
value uniform 0;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -20,13 +20,13 @@ internalField uniform Q_PLANT;
boundaryField
{
"bottom|top"
"(bottom|top)"
{
type fixedValue;
value uniform 0;
}
"inlet|outlet|left|right"
"(inlet|outlet|left|right)"
{
type cyclic;
}

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
location "constant";
object fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -26,6 +25,7 @@ pressureGradient
}
}
atmCoriolisUSource1
{
type atmCoriolisUSource;
@ -36,6 +36,7 @@ atmCoriolisUSource1
}
}
atmAmbientTurbSource1
{
type atmAmbientTurbSource;
@ -47,6 +48,7 @@ atmAmbientTurbSource1
}
}
atmBuoyancyTurbSource1
{
type atmBuoyancyTurbSource;
@ -59,6 +61,7 @@ atmBuoyancyTurbSource1
}
}
atmLengthScaleTurbSource1
{
type atmLengthScaleTurbSource;

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0;
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -14,7 +14,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
simulationType RAS;
RAS
{

View File

@ -47,7 +47,6 @@ timePrecision 6;
runTimeModifiable false;
functions
{
ObukhovLength1

View File

@ -28,11 +28,14 @@ gradSchemes
divSchemes
{
default none;
div(phi,T) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,k) bounded Gauss upwind;
div(phi,epsilon) bounded Gauss upwind;
div(phi,omega) bounded Gauss upwind;
turbulence bounded Gauss upwind;
div(phi,k) $turbulence;
div(phi,epsilon) $turbulence;
div(phi,omega) $turbulence;
div(phi,T) bounded Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

View File

@ -69,7 +69,6 @@ relaxationFactors
cache
{
grad(U);
grad(T);
}

View File

@ -1,4 +1,4 @@
/*--------------------------------*- C++ -*----------------------------------*/
// -*- C++ -*-
type sets;
libs (sampling);

View File

@ -1,4 +1,4 @@
/*--------------------------------*- C++ -*----------------------------------*/
// -*- C++ -*-
type turbulenceFields;
libs (fieldFunctionObjects);