diff --git a/src/turbulenceModels/incompressible/RAS/Make/files b/src/turbulenceModels/incompressible/RAS/Make/files
index cd9a9bfd..a434c65c 100644
--- a/src/turbulenceModels/incompressible/RAS/Make/files
+++ b/src/turbulenceModels/incompressible/RAS/Make/files
@@ -58,6 +58,11 @@ $(v2WallFunctions)/v2WallFunction/v2WallFunctionFvPatchScalarField.C
/* Patch fields */
derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
+
+/* Atmospheric boundary layer */
+derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C
+derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C
+derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.C
derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C
backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C
new file mode 100644
index 00000000..1c6ff3fc
--- /dev/null
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C
@@ -0,0 +1,182 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+\*---------------------------------------------------------------------------*/
+
+#include "atmBoundaryLayer.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace incompressible
+{
+
+// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
+
+atmBoundaryLayer::atmBoundaryLayer()
+:
+ flowDir_(pTraits::zero),
+ zDir_(pTraits::zero),
+ kappa_(0.41),
+ Cmu_(0.09),
+ Uref_(0),
+ Zref_(0),
+ z0_(0),
+ zGround_(0),
+ Ustar_(0)
+{}
+
+
+atmBoundaryLayer::atmBoundaryLayer(const vectorField& p, const dictionary& dict)
+:
+ flowDir_(dict.lookup("flowDir")),
+ zDir_(dict.lookup("zDir")),
+ kappa_(dict.lookupOrDefault("kappa", 0.41)),
+ Cmu_(dict.lookupOrDefault("Cmu", 0.09)),
+ Uref_(readScalar(dict.lookup("Uref"))),
+ Zref_(readScalar(dict.lookup("Zref"))),
+ z0_("z0", dict, p.size()),
+ zGround_("zGround", dict, p.size()),
+ Ustar_(p.size())
+{
+ if (mag(flowDir_) < SMALL || mag(zDir_) < SMALL)
+ {
+ FatalErrorIn
+ (
+ "atmBoundaryLayer(const dictionary&)"
+ ) << "magnitude of n or z must be greater than zero"
+ << abort(FatalError);
+ }
+
+ // Ensure direction vectors are normalized
+ flowDir_ /= mag(flowDir_);
+ zDir_ /= mag(zDir_);
+
+ Ustar_ = kappa_*Uref_/(log((Zref_ + z0_)/max(z0_, 0.001)));
+}
+
+
+atmBoundaryLayer::atmBoundaryLayer
+(
+ const atmBoundaryLayer& ptf,
+ const fvPatchFieldMapper& mapper
+)
+:
+ flowDir_(ptf.flowDir_),
+ zDir_(ptf.zDir_),
+ kappa_(ptf.kappa_),
+ Cmu_(ptf.Cmu_),
+ Uref_(ptf.Uref_),
+ Zref_(ptf.Zref_),
+ z0_(ptf.z0_, mapper),
+ zGround_(ptf.zGround_, mapper),
+ Ustar_(ptf.Ustar_, mapper)
+{}
+
+
+atmBoundaryLayer::atmBoundaryLayer(const atmBoundaryLayer& blpvf)
+:
+ flowDir_(blpvf.flowDir_),
+ zDir_(blpvf.zDir_),
+ kappa_(blpvf.kappa_),
+ Cmu_(blpvf.Cmu_),
+ Uref_(blpvf.Uref_),
+ Zref_(blpvf.Zref_),
+ z0_(blpvf.z0_),
+ zGround_(blpvf.zGround_),
+ Ustar_(blpvf.Ustar_)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
+
+void atmBoundaryLayer::autoMap(const fvPatchFieldMapper& m)
+{
+ z0_.autoMap(m);
+ zGround_.autoMap(m);
+ Ustar_.autoMap(m);
+}
+
+
+void atmBoundaryLayer::rmap
+(
+ const atmBoundaryLayer& blptf,
+ const labelList& addr
+)
+{
+ z0_.rmap(blptf.z0_, addr);
+ zGround_.rmap(blptf.zGround_, addr);
+ Ustar_.rmap(blptf.Ustar_, addr);
+}
+
+
+tmp atmBoundaryLayer::U(const vectorField& p) const
+{
+ scalarField Un
+ (
+ (Ustar_/kappa_)
+ *log(((zDir_ & p) - zGround_ + z0_)/max(z0_, 0.001))
+ );
+
+ return flowDir_*Un;
+}
+
+
+tmp atmBoundaryLayer::k(const vectorField& p) const
+{
+ return sqr(Ustar_)/sqrt(Cmu_);
+}
+
+
+tmp atmBoundaryLayer::epsilon(const vectorField& p) const
+{
+ return pow3(Ustar_)/(kappa_*((zDir_ & p) - zGround_ + z0_));
+}
+
+
+void atmBoundaryLayer::write(Ostream& os) const
+{
+ z0_.writeEntry("z0", os) ;
+ os.writeKeyword("flowDir")
+ << flowDir_ << token::END_STATEMENT << nl;
+ os.writeKeyword("zDir")
+ << zDir_ << token::END_STATEMENT << nl;
+ os.writeKeyword("kappa")
+ << kappa_ << token::END_STATEMENT << nl;
+ os.writeKeyword("Cmu")
+ << Cmu_ << token::END_STATEMENT << nl;
+ os.writeKeyword("Uref")
+ << Uref_ << token::END_STATEMENT << nl;
+ os.writeKeyword("Zref")
+ << Zref_ << token::END_STATEMENT << nl;
+ zGround_.writeEntry("zGround", os) ;
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace incompressible
+} // End namespace Foam
+
+// ************************************************************************* //
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.H
new file mode 100644
index 00000000..50641ee0
--- /dev/null
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.H
@@ -0,0 +1,244 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+Class
+ Foam::incompressible::atmBoundaryLayer
+
+Group
+ grpIcoRASBoundaryConditions grpInletBoundaryConditions
+
+Description
+ This class provides functions to evaluate the velocity and turbulence
+ distributions appropriate for atmospheric boundary layers (ABL).
+
+ The profile is derived from the friction velocity, flow direction and
+ "vertical" direction:
+
+ \f[
+ U = \frac{U^*}{\kappa} ln\left(\frac{z - z_g + z_0}{z_0}\right)
+ \f]
+
+ \f[
+ k = \frac{(U^*)^2}{\sqrt{C_mu}}
+ \f]
+
+ \f[
+ \epsilon = \frac{(U^*)^3}{\kappa(z - z_g + z_0)}
+ \f]
+
+ where
+ \vartable
+ U^* | Friction velocity
+ \kappa | von Karman's constant
+ C_mu | Turbulence viscosity coefficient
+ z | Vertical coordinate
+ z_0 | Surface roughness height [m]
+ z_g | Minimum z-coordinate [m]
+ \endvartable
+ and
+ \f[
+ U^* = \kappa\frac{U_{ref}}{ln\left(\frac{Z_{ref} + z_0}{z_0}\right)}
+ \f]
+ where
+ \vartable
+ U_{ref} | Reference velocity at \f$Z_{ref}\f$ [m/s]
+ Z_{ref} | Reference height [m]
+ \endvartable
+
+ Use in the atmBoundaryLayerInletVelocity, atmBoundaryLayerInletK and
+ atmBoundaryLayerInletEpsilon boundary conditions.
+
+ Reference:
+ D.M. Hargreaves and N.G. Wright, "On the use of the k-epsilon model
+ in commercial CFD software to model the neutral atmospheric boundary
+ layer", Journal of Wind Engineering and Industrial Aerodynamics
+ 95(2007), pp 355-369.
+
+ \heading Patch usage
+
+ \table
+ Property | Description | Required | Default
+ flowDir | Flow direction | yes |
+ zDir | Vertical direction | yes |
+ kappa | von Karman's constant | no | 0.41
+ Cmu | Turbulence viscosity coefficient | no | 0.09
+ Uref | Reference velocity [m/s] | yes |
+ Zref | Reference height [m] | yes |
+ z0 | Surface roughness height [m] | yes |
+ zGround | Minimum z-coordinate [m] | yes |
+ \endtable
+
+ Example of the boundary condition specification:
+ \verbatim
+ ground
+ {
+ type atmBoundaryLayerInletVelocity;
+ flowDir (1 0 0);
+ zDir (0 0 1);
+ Uref 10.0;
+ Zref 20.0;
+ z0 uniform 0.1;
+ zGround uniform 0.0;
+ }
+ \endverbatim
+
+Note
+ D.M. Hargreaves and N.G. Wright recommend Gamma epsilon in the
+ k-epsilon model should be changed from 1.3 to 1.11 for consistency.
+ The roughness height (Er) is given by Er = 20 z0 following the same
+ reference.
+
+SourceFiles
+ atmBoundaryLayer.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef atmBoundaryLayer_H
+#define atmBoundaryLayer_H
+
+#include "fvPatchFields.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace incompressible
+{
+
+/*---------------------------------------------------------------------------*\
+ Class atmBoundaryLayer Declaration
+\*---------------------------------------------------------------------------*/
+
+class atmBoundaryLayer
+{
+ // Private data
+
+ //- Flow direction
+ vector flowDir_;
+
+ //- Direction of the z-coordinate
+ vector zDir_;
+
+ //- von Karman constant
+ const scalar kappa_;
+
+ //- Turbulent viscosity coefficient
+ const scalar Cmu_;
+
+ //- Reference velocity
+ const scalar Uref_;
+
+ //- Reference height
+ const scalar Zref_;
+
+ //- Surface roughness height
+ scalarField z0_;
+
+ //- Minimum coordinate value in z direction
+ scalarField zGround_;
+
+ //- Friction velocity
+ scalarField Ustar_;
+
+
+public:
+
+ // Constructors
+
+ //- Construct null
+ atmBoundaryLayer();
+
+ //- Construct from the coordinates field and dictionary
+ atmBoundaryLayer(const vectorField& p, const dictionary&);
+
+ //- Construct by mapping given
+ // atmBoundaryLayer onto a new patch
+ atmBoundaryLayer
+ (
+ const atmBoundaryLayer&,
+ const fvPatchFieldMapper&
+ );
+
+ //- Construct as copy
+ atmBoundaryLayer(const atmBoundaryLayer&);
+
+
+ // Member functions
+
+ // Access
+
+ //- Return flow direction
+ const vector& flowDir() const
+ {
+ return flowDir_;
+ }
+
+ //- Return z-direction
+ const vector& zDir() const
+ {
+ return zDir_;
+ }
+
+ //- Return friction velocity
+ const scalarField& Ustar() const
+ {
+ return Ustar_;
+ }
+
+
+ // Mapping functions
+
+ //- Map (and resize as needed) from self given a mapping object
+ void autoMap(const fvPatchFieldMapper&);
+
+ //- Reverse map the given fvPatchField onto this fvPatchField
+ void rmap(const atmBoundaryLayer&, const labelList&);
+
+
+ // Evaluate functions
+
+ //- Return the velocity distribution for the ATM
+ tmp U(const vectorField& p) const;
+
+ //- Return the turbulent kinetic energy distribution for the ATM
+ tmp k(const vectorField& p) const;
+
+ //- Return the turbulent dissipation rate distribution for the ATM
+ tmp epsilon(const vectorField& p) const;
+
+
+ //- Write
+ void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace incompressible
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C
index 1db2e79f..a1bf04e9 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -46,33 +46,7 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField
)
:
fixedValueFvPatchScalarField(p, iF),
- z_(vector::zero),
- kappa_(0.41),
- Uref_(0),
- Zref_(0),
- z0_(0),
- zGround_(0),
- Ustar_(0)
-{}
-
-
-atmBoundaryLayerInletEpsilonFvPatchScalarField::
-atmBoundaryLayerInletEpsilonFvPatchScalarField
-(
- const atmBoundaryLayerInletEpsilonFvPatchScalarField& ptf,
- const fvPatch& p,
- const DimensionedField& iF,
- const fvPatchFieldMapper& mapper
-)
-:
- fixedValueFvPatchScalarField(ptf, p, iF, mapper),
- z_(ptf.z_),
- kappa_(ptf.kappa_),
- Uref_(ptf.Uref_),
- Zref_(ptf.Zref_),
- z0_(ptf.z0_, mapper),
- zGround_(ptf.zGround_, mapper),
- Ustar_(ptf.Ustar_, mapper)
+ atmBoundaryLayer()
{}
@@ -85,56 +59,35 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField
)
:
fixedValueFvPatchScalarField(p, iF),
- z_(dict.lookup("z")),
- kappa_(dict.lookupOrDefault("kappa", 0.41)),
- Uref_(readScalar(dict.lookup("Uref"))),
- Zref_(readScalar(dict.lookup("Zref"))),
- z0_("z0", dict, p.size()),
- zGround_("zGround", dict, p.size()),
- Ustar_(p.size())
+ atmBoundaryLayer(patch().Cf(), dict)
{
- if (mag(z_) < SMALL)
- {
- FatalErrorIn
- (
- "atmBoundaryLayerInletEpsilonFvPatchScalarField"
- "("
- "const fvPatch&, "
- "const DimensionedField&, "
- "const dictionary&"
- ")"
- )
- << "magnitude of z vector must be greater than zero"
- << abort(FatalError);
- }
-
- // Ensure direction vectors are normalized
- z_ /= mag(z_);
-
- Ustar_ = kappa_*Uref_/(log((Zref_ + z0_)/max(z0_, scalar(0.001))));
-
- scalarField::operator=
- (
- pow3(Ustar_)/(kappa_*((z_ & patch().Cf()) - zGround_ + z0_))
- );
+ scalarField::operator=(epsilon(patch().Cf()));
}
atmBoundaryLayerInletEpsilonFvPatchScalarField::
atmBoundaryLayerInletEpsilonFvPatchScalarField
(
- const atmBoundaryLayerInletEpsilonFvPatchScalarField& blpsf,
+ const atmBoundaryLayerInletEpsilonFvPatchScalarField& psf,
+ const fvPatch& p,
+ const DimensionedField& iF,
+ const fvPatchFieldMapper& mapper
+)
+:
+ fixedValueFvPatchScalarField(psf, p, iF, mapper),
+ atmBoundaryLayer(psf, mapper)
+{}
+
+
+atmBoundaryLayerInletEpsilonFvPatchScalarField::
+atmBoundaryLayerInletEpsilonFvPatchScalarField
+(
+ const atmBoundaryLayerInletEpsilonFvPatchScalarField& psf,
const DimensionedField& iF
)
:
- fixedValueFvPatchScalarField(blpsf, iF),
- z_(blpsf.z_),
- kappa_(blpsf.kappa_),
- Uref_(blpsf.Uref_),
- Zref_(blpsf.Zref_),
- z0_(blpsf.z0_),
- zGround_(blpsf.zGround_),
- Ustar_(blpsf.Ustar_)
+ fixedValueFvPatchScalarField(psf, iF),
+ atmBoundaryLayer(psf)
{}
@@ -146,42 +99,29 @@ void atmBoundaryLayerInletEpsilonFvPatchScalarField::autoMap
)
{
fixedValueFvPatchScalarField::autoMap(m);
- z0_.autoMap(m);
- zGround_.autoMap(m);
- Ustar_.autoMap(m);
+ atmBoundaryLayer::autoMap(m);
}
void atmBoundaryLayerInletEpsilonFvPatchScalarField::rmap
(
- const fvPatchScalarField& ptf,
+ const fvPatchScalarField& psf,
const labelList& addr
)
{
- fixedValueFvPatchScalarField::rmap(ptf, addr);
+ fixedValueFvPatchScalarField::rmap(psf, addr);
- const atmBoundaryLayerInletEpsilonFvPatchScalarField& blptf =
- refCast(ptf);
+ const atmBoundaryLayerInletEpsilonFvPatchScalarField& blpsf =
+ refCast(psf);
- z0_.rmap(blptf.z0_, addr);
- zGround_.rmap(blptf.zGround_, addr);
- Ustar_.rmap(blptf.Ustar_, addr);
+ atmBoundaryLayer::rmap(blpsf, addr);
}
void atmBoundaryLayerInletEpsilonFvPatchScalarField::write(Ostream& os) const
{
fvPatchScalarField::write(os);
- os.writeKeyword("z")
- << z_ << token::END_STATEMENT << nl;
- os.writeKeyword("kappa")
- << kappa_ << token::END_STATEMENT << nl;
- os.writeKeyword("Uref")
- << Uref_ << token::END_STATEMENT << nl;
- os.writeKeyword("Zref")
- << Zref_ << token::END_STATEMENT << nl;
- z0_.writeEntry("z0", os);
- zGround_.writeEntry("zGround", os);
+ atmBoundaryLayer::write(os);
writeEntry("value", os);
}
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H
index 34a9966b..4cbda74c 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H
@@ -29,46 +29,9 @@ Group
Description
This boundary condition specifies an inlet value for the turbulence
- dissipation, \f$\epsilon\f$, appropriate for atmospheric boundary layers
- (ABL), and designed to be used in conjunction with the
- atmBoundaryLayerInletVelocity inlet velocity boundary condition.
+ dissipation, \f$\epsilon\f$, appropriate for atmospheric boundary layers.
- \f[
- \epsilon = \frac{(U^*)^3}{\kappa(z - z_g + z_0)}
- \f]
-
- where
- \vartable
- U^* | Friction velocity
- \kappa | von Karman's constant
- z | Vertical coordinate
- z_0 | Surface roughness height [m]
- z_g | Minimum z-coordinate [m]
- \endvartable
-
- and:
-
- \f[
- U^* = \kappa\frac{U_{ref}}{ln\left(\frac{Z_{ref} + z_0}{z_0}\right)}
- \f]
-
- where:
- \vartable
- U_{ref} | Reference velocity at \f$Z_{ref}\f$ [m/s]
- Z_{ref} | Reference height [m]
- \endvartable
-
- \heading Patch usage
-
- \table
- Property | Description | Required | Default value
- z | Vertical direction | yes |
- kappa | von Karman's constant | no | 0.41
- Uref | Reference velocity [m/s] | yes |
- Zref | Reference height [m] | yes |
- z0 | Surface roughness height [m] | yes |
- zGround | Minimum z coordinate [m] | yes |
- \endtable
+ See Foam::incompressible::atmBoundaryLayer for details.
Example of the boundary condition specification:
\verbatim
@@ -83,11 +46,10 @@ Description
}
\endverbatim
- Reference:
- D.M. Hargreaves and N.G. Wright, "On the use of the k-epsilon model
- in commercial CFD software to model the neutral atmospheric boundary
- layer", Journal of Wind Engineering and Industrial Aerodynamics
- 95(2007), pp 355-369.
+SeeAlso
+ Foam::incompressible::atmBoundaryLayer,
+ Foam::incompressible::atmBoundaryLayerInletVelocityFvPatchVectorField,
+ Foam::incompressible::atmBoundaryLayerInletKFvPatchScalarField
SourceFiles
atmBoundaryLayerInletEpsilonFvPatchScalarField.C
@@ -99,6 +61,7 @@ SourceFiles
#include "fvPatchFields.H"
#include "fixedValueFvPatchFields.H"
+#include "atmBoundaryLayer.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -113,31 +76,9 @@ namespace incompressible
class atmBoundaryLayerInletEpsilonFvPatchScalarField
:
- public fixedValueFvPatchScalarField
+ public fixedValueFvPatchScalarField,
+ public atmBoundaryLayer
{
- // Private data
-
- //- Direction of the z-coordinate
- vector z_;
-
- //- von Karman constant
- const scalar kappa_;
-
- //- Reference velocity
- const scalar Uref_;
-
- //- Reference height
- const scalar Zref_;
-
- //- Surface roughness height
- scalarField z0_;
-
- //- Minimum coordinate value in z direction
- scalarField zGround_;
-
- //- Friction velocity
- scalarField Ustar_;
-
public:
@@ -203,21 +144,6 @@ public:
// Member functions
- // Access
-
- //- Return friction velocity
- const scalarField& Ustar() const
- {
- return Ustar_;
- }
-
- //- Return z-direction
- const vector& z() const
- {
- return z_;
- }
-
-
// Mapping functions
//- Map (and resize as needed) from self given a mapping object
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.C
new file mode 100644
index 00000000..3980ad27
--- /dev/null
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.C
@@ -0,0 +1,142 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+\*---------------------------------------------------------------------------*/
+
+#include "atmBoundaryLayerInletKFvPatchScalarField.H"
+#include "addToRunTimeSelectionTable.H"
+#include "fvPatchFieldMapper.H"
+#include "volFields.H"
+#include "surfaceFields.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace incompressible
+{
+
+// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
+
+atmBoundaryLayerInletKFvPatchScalarField::
+atmBoundaryLayerInletKFvPatchScalarField
+(
+ const fvPatch& p,
+ const DimensionedField& iF
+)
+:
+ fixedValueFvPatchScalarField(p, iF),
+ atmBoundaryLayer()
+{}
+
+
+atmBoundaryLayerInletKFvPatchScalarField::
+atmBoundaryLayerInletKFvPatchScalarField
+(
+ const fvPatch& p,
+ const DimensionedField& iF,
+ const dictionary& dict
+)
+:
+ fixedValueFvPatchScalarField(p, iF),
+ atmBoundaryLayer(patch().Cf(), dict)
+{
+ scalarField::operator=(k(patch().Cf()));
+}
+
+
+atmBoundaryLayerInletKFvPatchScalarField::
+atmBoundaryLayerInletKFvPatchScalarField
+(
+ const atmBoundaryLayerInletKFvPatchScalarField& psf,
+ const fvPatch& p,
+ const DimensionedField& iF,
+ const fvPatchFieldMapper& mapper
+)
+:
+ fixedValueFvPatchScalarField(psf, p, iF, mapper),
+ atmBoundaryLayer(psf, mapper)
+{}
+
+
+atmBoundaryLayerInletKFvPatchScalarField::
+atmBoundaryLayerInletKFvPatchScalarField
+(
+ const atmBoundaryLayerInletKFvPatchScalarField& psf,
+ const DimensionedField& iF
+)
+:
+ fixedValueFvPatchScalarField(psf, iF),
+ atmBoundaryLayer(psf)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
+
+void atmBoundaryLayerInletKFvPatchScalarField::autoMap
+(
+ const fvPatchFieldMapper& m
+)
+{
+ fixedValueFvPatchScalarField::autoMap(m);
+ atmBoundaryLayer::autoMap(m);
+}
+
+
+void atmBoundaryLayerInletKFvPatchScalarField::rmap
+(
+ const fvPatchScalarField& psf,
+ const labelList& addr
+)
+{
+ fixedValueFvPatchScalarField::rmap(psf, addr);
+
+ const atmBoundaryLayerInletKFvPatchScalarField& blpsf =
+ refCast(psf);
+
+ atmBoundaryLayer::rmap(blpsf, addr);
+}
+
+
+void atmBoundaryLayerInletKFvPatchScalarField::write(Ostream& os) const
+{
+ fvPatchScalarField::write(os);
+ atmBoundaryLayer::write(os);
+ writeEntry("value", os);
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+makePatchTypeField
+(
+ fvPatchScalarField,
+ atmBoundaryLayerInletKFvPatchScalarField
+);
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace incompressible
+} // End namespace Foam
+
+// ************************************************************************* //
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.H
new file mode 100644
index 00000000..7463fce1
--- /dev/null
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.H
@@ -0,0 +1,177 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+Class
+ Foam::incompressible::atmBoundaryLayerInletKFvPatchScalarField
+
+Group
+ grpIcoRASBoundaryConditions grpInletBoundaryConditions
+
+Description
+ This boundary condition specifies an inlet value for the turbulence
+ kinetic energy, \f$k\f$, appropriate for atmospheric boundary layers.
+
+ See Foam::incompressible::atmBoundaryLayer for details.
+
+ Example of the boundary condition specification:
+ \verbatim
+ ground
+ {
+ type atmBoundaryLayerInletK;
+ z (0 0 1);
+ Uref 10.0;
+ Zref 20.0;
+ z0 uniform 0.1;
+ zGround uniform 0.0;
+ }
+ \endverbatim
+
+SeeAlso
+ Foam::incompressible::atmBoundaryLayer,
+ Foam::incompressible::atmBoundaryLayerInletVelocityFvPatchVectorField,
+ Foam::incompressible::atmBoundaryLayerInletEpsilonFvPatchScalarField
+
+SourceFiles
+ atmBoundaryLayerInletKFvPatchScalarField.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef atmBoundaryLayerInletKFvPatchScalarField_H
+#define atmBoundaryLayerInletKFvPatchScalarField_H
+
+#include "fvPatchFields.H"
+#include "fixedValueFvPatchFields.H"
+#include "atmBoundaryLayer.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace incompressible
+{
+
+/*---------------------------------------------------------------------------*\
+ Class atmBoundaryLayerInletKFvPatchScalarField Declaration
+\*---------------------------------------------------------------------------*/
+
+class atmBoundaryLayerInletKFvPatchScalarField
+:
+ public fixedValueFvPatchScalarField,
+ public atmBoundaryLayer
+{
+
+public:
+
+ //- Runtime type information
+ TypeName("atmBoundaryLayerInletK");
+
+
+ // Constructors
+
+ //- Construct from patch and internal field
+ atmBoundaryLayerInletKFvPatchScalarField
+ (
+ const fvPatch&,
+ const DimensionedField&
+ );
+
+ //- Construct from patch, internal field and dictionary
+ atmBoundaryLayerInletKFvPatchScalarField
+ (
+ const fvPatch&,
+ const DimensionedField&,
+ const dictionary&
+ );
+
+ //- Construct by mapping given
+ // atmBoundaryLayerInletKFvPatchScalarField onto a new patch
+ atmBoundaryLayerInletKFvPatchScalarField
+ (
+ const atmBoundaryLayerInletKFvPatchScalarField&,
+ const fvPatch&,
+ const DimensionedField&,
+ const fvPatchFieldMapper&
+ );
+
+ //- Construct and return a clone
+ virtual tmp clone() const
+ {
+ return tmp
+ (
+ new atmBoundaryLayerInletKFvPatchScalarField(*this)
+ );
+ }
+
+ //- Construct as copy setting internal field reference
+ atmBoundaryLayerInletKFvPatchScalarField
+ (
+ const atmBoundaryLayerInletKFvPatchScalarField&,
+ const DimensionedField&
+ );
+
+ //- Construct and return a clone setting internal field reference
+ virtual tmp clone
+ (
+ const DimensionedField& iF
+ ) const
+ {
+ return tmp
+ (
+ new atmBoundaryLayerInletKFvPatchScalarField(*this, iF)
+ );
+ }
+
+
+ // Member functions
+
+ // Mapping functions
+
+ //- Map (and resize as needed) from self given a mapping object
+ virtual void autoMap
+ (
+ const fvPatchFieldMapper&
+ );
+
+ //- Reverse map the given fvPatchField onto this fvPatchField
+ virtual void rmap
+ (
+ const fvPatchScalarField&,
+ const labelList&
+ );
+
+
+ //- Write
+ virtual void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace incompressible
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C
similarity index 56%
rename from src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C
rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C
index 8f244fde..9c8e5e42 100644
--- a/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -46,35 +46,7 @@ atmBoundaryLayerInletVelocityFvPatchVectorField
)
:
fixedValueFvPatchVectorField(p, iF),
- n_(pTraits::zero),
- z_(pTraits::zero),
- kappa_(0.41),
- Uref_(0),
- Zref_(0),
- z0_(0),
- zGround_(0),
- Ustar_(0)
-{}
-
-
-atmBoundaryLayerInletVelocityFvPatchVectorField::
-atmBoundaryLayerInletVelocityFvPatchVectorField
-(
- const atmBoundaryLayerInletVelocityFvPatchVectorField& ptf,
- const fvPatch& p,
- const DimensionedField& iF,
- const fvPatchFieldMapper& mapper
-)
-:
- fixedValueFvPatchVectorField(ptf, p, iF, mapper),
- n_(ptf.n_),
- z_(ptf.z_),
- kappa_(ptf.kappa_),
- Uref_(ptf.Uref_),
- Zref_(ptf.Zref_),
- z0_(ptf.z0_, mapper),
- zGround_(ptf.zGround_, mapper),
- Ustar_(ptf.Ustar_, mapper)
+ atmBoundaryLayer()
{}
@@ -87,61 +59,35 @@ atmBoundaryLayerInletVelocityFvPatchVectorField
)
:
fixedValueFvPatchVectorField(p, iF),
- n_(dict.lookup("n")),
- z_(dict.lookup("z")),
- kappa_(dict.lookupOrDefault("kappa", 0.41)),
- Uref_(readScalar(dict.lookup("Uref"))),
- Zref_(readScalar(dict.lookup("Zref"))),
- z0_("z0", dict, p.size()),
- zGround_("zGround", dict, p.size()),
- Ustar_(p.size())
+ atmBoundaryLayer(patch().Cf(), dict)
{
- if (mag(n_) < SMALL || mag(z_) < SMALL)
- {
- FatalErrorIn
- (
- "atmBoundaryLayerInletVelocityFvPatchVectorField"
- "("
- "const fvPatch&, "
- "const DimensionedField&, "
- "onst dictionary&"
- ")"
- )
- << "magnitude of n or z must be greater than zero"
- << abort(FatalError);
- }
-
- // Ensure direction vectors are normalized
- n_ /= mag(n_);
- z_ /= mag(z_);
-
- Ustar_ = kappa_*Uref_/(log((Zref_ + z0_)/max(z0_, scalar(0.001))));
- scalarField Un
- (
- (Ustar_/kappa_)
- *log(((z_ & patch().Cf()) - zGround_ + z0_)/max(z0_, scalar(0.001)))
- );
-
- vectorField::operator=(n_*Un);
+ vectorField::operator=(U(patch().Cf()));
}
atmBoundaryLayerInletVelocityFvPatchVectorField::
atmBoundaryLayerInletVelocityFvPatchVectorField
(
- const atmBoundaryLayerInletVelocityFvPatchVectorField& blpvf,
+ const atmBoundaryLayerInletVelocityFvPatchVectorField& pvf,
+ const fvPatch& p,
+ const DimensionedField& iF,
+ const fvPatchFieldMapper& mapper
+)
+:
+ fixedValueFvPatchVectorField(pvf, p, iF, mapper),
+ atmBoundaryLayer(pvf, mapper)
+{}
+
+
+atmBoundaryLayerInletVelocityFvPatchVectorField::
+atmBoundaryLayerInletVelocityFvPatchVectorField
+(
+ const atmBoundaryLayerInletVelocityFvPatchVectorField& pvf,
const DimensionedField& iF
)
:
- fixedValueFvPatchVectorField(blpvf, iF),
- n_(blpvf.n_),
- z_(blpvf.z_),
- kappa_(blpvf.kappa_),
- Uref_(blpvf.Uref_),
- Zref_(blpvf.Zref_),
- z0_(blpvf.z0_),
- zGround_(blpvf.zGround_),
- Ustar_(blpvf.Ustar_)
+ fixedValueFvPatchVectorField(pvf, iF),
+ atmBoundaryLayer(pvf)
{}
@@ -153,44 +99,29 @@ void atmBoundaryLayerInletVelocityFvPatchVectorField::autoMap
)
{
fixedValueFvPatchVectorField::autoMap(m);
- z0_.autoMap(m);
- zGround_.autoMap(m);
- Ustar_.autoMap(m);
+ atmBoundaryLayer::autoMap(m);
}
void atmBoundaryLayerInletVelocityFvPatchVectorField::rmap
(
- const fvPatchVectorField& ptf,
+ const fvPatchVectorField& pvf,
const labelList& addr
)
{
- fixedValueFvPatchVectorField::rmap(ptf, addr);
+ fixedValueFvPatchVectorField::rmap(pvf, addr);
- const atmBoundaryLayerInletVelocityFvPatchVectorField& blptf =
- refCast(ptf);
+ const atmBoundaryLayerInletVelocityFvPatchVectorField& blpvf =
+ refCast(pvf);
- z0_.rmap(blptf.z0_, addr);
- zGround_.rmap(blptf.zGround_, addr);
- Ustar_.rmap(blptf.Ustar_, addr);
+ atmBoundaryLayer::rmap(blpvf, addr);
}
void atmBoundaryLayerInletVelocityFvPatchVectorField::write(Ostream& os) const
{
fvPatchVectorField::write(os);
- z0_.writeEntry("z0", os) ;
- os.writeKeyword("n")
- << n_ << token::END_STATEMENT << nl;
- os.writeKeyword("z")
- << z_ << token::END_STATEMENT << nl;
- os.writeKeyword("kappa")
- << kappa_ << token::END_STATEMENT << nl;
- os.writeKeyword("Uref")
- << Uref_ << token::END_STATEMENT << nl;
- os.writeKeyword("Zref")
- << Zref_ << token::END_STATEMENT << nl;
- zGround_.writeEntry("zGround", os) ;
+ atmBoundaryLayer::write(os);
writeEntry("value", os);
}
diff --git a/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H
similarity index 63%
rename from src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H
rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H
index 39262b25..87022836 100644
--- a/src/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H
@@ -29,52 +29,9 @@ Group
Description
This boundary condition specifies a velocity inlet profile appropriate
- for atmospheric boundary layers (ABL). The profile is derived from the
- friction velocity, flow direction and "vertical" direction.
+ for atmospheric boundary layers (ABL).
- \f[
- U = \frac{U^*}{\kappa} ln\left(\frac{z - z_g + z_0}{z_0}\right)
- \f]
-
- where
- \vartable
- U^* | Friction velocity
- \kappa | von Karman's constant
- z | Vertical coordinate
- z_0 | Surface roughness height [m]
- z_g | Minimum z-coordinate [m]
- \endvartable
- and
- \f[
- U^* = \kappa\frac{U_{ref}}{ln\left(\frac{Z_{ref} + z_0}{z_0}\right)}
- \f]
- where
- \vartable
- U_{ref} | Reference velocity at \f$Z_{ref}\f$ [m/s]
- Z_{ref} | Reference height [m]
- \endvartable
-
- Use in conjunction with the atmBoundaryLayerInletEpsilon boundary
- condition if using an \f$\epsilon\f$ based turbulence model.
-
- Reference:
- D.M. Hargreaves and N.G. Wright, "On the use of the k-epsilon model
- in commercial CFD software to model the neutral atmospheric boundary
- layer", Journal of Wind Engineering and Industrial Aerodynamics
- 95(2007), pp 355-369.
-
- \heading Patch usage
-
- \table
- Property | Description | Required | Default value
- n | Flow direction | yes |
- z | Vertical direction | yes |
- kappa | von Karman's constant | no | 0.41
- Uref | Reference velocity [m/s] | yes |
- Zref | Reference height [m] | yes |
- z0 | Surface roughness height [m] | yes |
- zGround | Minimum z-coordinate [m] | yes |
- \endtable
+ See Foam::incompressible::atmBoundaryLayer for details.
Example of the boundary condition specification:
\verbatim
@@ -90,11 +47,10 @@ Description
}
\endverbatim
-Note
- D.M. Hargreaves and N.G. Wright recommend Gamma epsilon in the
- k-epsilon model should be changed from 1.3 to 1.11 for consistency.
- The roughness height (Er) is given by Er = 20 z0 following the same
- reference.
+SeeAlso
+ Foam::incompressible::atmBoundaryLayer,
+ Foam::incompressible::atmBoundaryLayerInletKFvPatchScalarField,
+ Foam::incompressible::atmBoundaryLayerInletEpsilonFvPatchScalarField
SourceFiles
atmBoundaryLayerInletVelocityFvPatchVectorField.C
@@ -106,6 +62,7 @@ SourceFiles
#include "fvPatchFields.H"
#include "fixedValueFvPatchFields.H"
+#include "atmBoundaryLayer.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -120,34 +77,9 @@ namespace incompressible
class atmBoundaryLayerInletVelocityFvPatchVectorField
:
- public fixedValueFvPatchVectorField
+ public fixedValueFvPatchVectorField,
+ public atmBoundaryLayer
{
- // Private data
-
- //- Flow direction
- vector n_;
-
- //- Direction of the z-coordinate
- vector z_;
-
- //- von Karman constant
- const scalar kappa_;
-
- //- Reference velocity
- const scalar Uref_;
-
- //- Reference height
- const scalar Zref_;
-
- //- Surface roughness height
- scalarField z0_;
-
- //- Minimum coordinate value in z direction
- scalarField zGround_;
-
- //- Friction velocity
- scalarField Ustar_;
-
public:
@@ -213,27 +145,6 @@ public:
// Member functions
- // Access
-
- //- Return friction velocity
- const scalarField& Ustar() const
- {
- return Ustar_;
- }
-
- //- Return flow direction
- const vector& n() const
- {
- return n_;
- }
-
- //- Return z-direction
- const vector& z() const
- {
- return z_;
- }
-
-
// Mapping functions
//- Map (and resize as needed) from self given a mapping object
diff --git a/src/turbulenceModels/incompressible/turbulenceModel/Make/files b/src/turbulenceModels/incompressible/turbulenceModel/Make/files
index c83a939f..a44faf22 100644
--- a/src/turbulenceModels/incompressible/turbulenceModel/Make/files
+++ b/src/turbulenceModels/incompressible/turbulenceModel/Make/files
@@ -1,6 +1,5 @@
turbulenceModel.C
laminar/laminar.C
derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C
-derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C
LIB = $(FOAM_LIBBIN)/libincompressibleTurbulenceModel
diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/U b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/U
index d9393aac..8aa9427e 100644
--- a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/U
+++ b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/U
@@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
-| \\ / O peration | Version: 2.3.0 |
+| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@@ -23,8 +23,6 @@ internalField uniform $flowVelocity;
boundaryField
{
- #include "include/ABLConditions"
-
outlet
{
type inletOutlet;
@@ -35,13 +33,7 @@ boundaryField
inlet
{
type atmBoundaryLayerInletVelocity;
- Uref $Uref;
- Zref $Zref;
- n $windDirection;
- z $zDirection;
- z0 $z0;
- value $internalField;
- zGround $zGround;
+ #include "include/ABLConditions"
}
terrain
diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/epsilon b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/epsilon
index 796a19f1..fdfa0cad 100644
--- a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/epsilon
+++ b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/epsilon
@@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
-| \\ / O peration | Version: 2.3.0 |
+| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@@ -23,8 +23,6 @@ internalField uniform $turbulentEpsilon;
boundaryField
{
- #include "include/ABLConditions"
-
terrain
{
type epsilonWallFunction;
@@ -44,12 +42,7 @@ boundaryField
inlet
{
type atmBoundaryLayerInletEpsilon;
- Uref $Uref;
- Zref $Zref;
- z $zDirection;
- z0 $z0;
- value $internalField;
- zGround $zGround;
+ #include "include/ABLConditions"
}
ground
diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/include/ABLConditions b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/include/ABLConditions
index 33cd9e41..c40c87b6 100644
--- a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/include/ABLConditions
+++ b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/include/ABLConditions
@@ -1,16 +1,17 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
-| \\ / O peration | Version: 2.3.0 |
+| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Uref 10.0;
Zref 20;
+zDir (0 0 1);
+flowDir (1 0 0);
z0 uniform 0.1;
-turbulentKE 1.3;
-windDirection (1 0 0);
-zDirection (0 0 1);
zGround uniform 935.0;
+value $internalField;
+
// ************************************************************************* //
diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/include/fixedInlet b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/include/fixedInlet
index 424f38bd..f88cacb6 100644
--- a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/include/fixedInlet
+++ b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/include/fixedInlet
@@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
-| \\ / O peration | Version: 2.3.0 |
+| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/include/initialConditions b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/include/initialConditions
index 7667464f..9eaeecaa 100644
--- a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/include/initialConditions
+++ b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/include/initialConditions
@@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
-| \\ / O peration | Version: 2.3.0 |
+| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/include/sideAndTopPatches b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/include/sideAndTopPatches
index 7b91ed9b..bddc1712 100644
--- a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/include/sideAndTopPatches
+++ b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/include/sideAndTopPatches
@@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
-| \\ / O peration | Version: 2.3.0 |
+| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/k b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/k
index d66328c7..4708c794 100644
--- a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/k
+++ b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/k
@@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
-| \\ / O peration | Version: 2.3.0 |
+| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@@ -22,8 +22,6 @@ internalField uniform $turbulentKE;
boundaryField
{
- #include "include/ABLConditions"
-
outlet
{
type inletOutlet;
@@ -33,8 +31,8 @@ boundaryField
inlet
{
- type uniformFixedValue;
- uniformValue constant $turbulentKE;
+ type atmBoundaryLayerInletK;
+ #include "include/ABLConditions"
}
terrain
diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/nut b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/nut
index e822f75d..c6e19a24 100644
--- a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/nut
+++ b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/nut
@@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
-| \\ / O peration | Version: 2.3.0 |
+| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/p b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/p
index 4a3dda00..6433d777 100644
--- a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/p
+++ b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/p
@@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
-| \\ / O peration | Version: 2.3.0 |
+| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/