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

@ -61,7 +61,7 @@ atmBoundaryLayer::atmBoundaryLayer
const dictionary& dict const dictionary& dict
) )
: :
initABL_(dict.getOrDefault<Switch>("initABL", true)), initABL_(dict.getOrDefault<bool>("initABL", true)),
kappa_ kappa_
( (
dict.getCheckOrDefault<scalar>("kappa", 0.41, scalarMinMax::ge(SMALL)) dict.getCheckOrDefault<scalar>("kappa", 0.41, scalarMinMax::ge(SMALL))

View File

@ -156,7 +156,7 @@ Usage
where the entries mean: where the entries mean:
\table \table
Property | Description | Type | Req'd | Deflt Property | Description | Type | Reqd | Deflt
flowDir | Flow direction | TimeFunction1<vector> | yes | - flowDir | Flow direction | TimeFunction1<vector> | yes | -
zDir | Ground-normal direction | TimeFunction1<vector> | yes | - zDir | Ground-normal direction | TimeFunction1<vector> | yes | -
Uref | Reference mean streamwise flow speed being used in <!-- Uref | Reference mean streamwise flow speed being used in <!--
@ -237,7 +237,7 @@ protected:
//- Flag to initialise profiles with the theoretical ABL expressions, //- Flag to initialise profiles with the theoretical ABL expressions,
//- otherwise initialises by using "value" entry content //- otherwise initialises by using "value" entry content
Switch initABL_; bool initABL_;
private: private:
@ -325,7 +325,7 @@ public:
tmp<scalarField> Ustar(const scalarField& z0) const; tmp<scalarField> Ustar(const scalarField& z0) const;
// Mapping functions // Mapping
//- Map (and resize as needed) from self given a mapping object //- Map (and resize as needed) from self given a mapping object
void autoMap(const fvPatchFieldMapper&); void autoMap(const fvPatchFieldMapper&);
@ -334,7 +334,7 @@ public:
void rmap(const atmBoundaryLayer&, const labelList&); void rmap(const atmBoundaryLayer&, const labelList&);
// Evaluate functions // Evaluation
//- Return the velocity distribution for the ATM //- Return the velocity distribution for the ATM
tmp<vectorField> U(const vectorField& pCf) const; tmp<vectorField> U(const vectorField& pCf) const;
@ -348,6 +348,7 @@ public:
//- Return the specific dissipation rate distribution for the ATM //- Return the specific dissipation rate distribution for the ATM
tmp<scalarField> omega(const vectorField& pCf) const; tmp<scalarField> omega(const vectorField& pCf) const;
//- Write //- Write
void write(Ostream&) const; void write(Ostream&) const;
}; };

View File

@ -32,8 +32,8 @@ Group
Description Description
This boundary condition provides a log-law type ground-normal inlet This boundary condition provides a log-law type ground-normal inlet
boundary condition for the turbulent kinetic energy dissipation rate, boundary condition for the turbulent kinetic energy dissipation rate
i.e. \c epsilon, for homogeneous, two-dimensional, dry-air, equilibrium (i.e. \c epsilon) for homogeneous, two-dimensional, dry-air, equilibrium
and neutral atmospheric boundary layer modelling. and neutral atmospheric boundary layer modelling.
The ground-normal \c epsilon profile expression: The ground-normal \c epsilon profile expression:
@ -75,7 +75,7 @@ Usage
where the entries mean: where the entries mean:
\table \table
Property | Description | Type | Req'd | Deflt Property | Description | Type | Reqd | Deflt
type | Type name: atmBoundaryLayerInletEpsilon | word | yes | - type | Type name: atmBoundaryLayerInletEpsilon | word | yes | -
\endtable \endtable
@ -183,7 +183,7 @@ public:
//- Update the coefficients associated with the patch field //- Update the coefficients associated with the patch field
virtual void updateCoeffs(); virtual void updateCoeffs();
// Mapping functions // Mapping
//- Map (and resize as needed) from self given a mapping object //- Map (and resize as needed) from self given a mapping object
virtual void autoMap virtual void autoMap

View File

@ -32,7 +32,7 @@ Group
Description Description
This boundary condition provides a log-law type ground-normal inlet This boundary condition provides a log-law type ground-normal inlet
boundary condition for the turbulent kinetic energy, i.e. \c k, boundary condition for the turbulent kinetic energy (i.e. \c k)
for homogeneous, two-dimensional, dry-air, equilibrium and neutral for homogeneous, two-dimensional, dry-air, equilibrium and neutral
atmospheric boundary layer modelling. atmospheric boundary layer modelling.
@ -74,7 +74,7 @@ Usage
where the entries mean: where the entries mean:
\table \table
Property | Description | Type | Req'd | Deflt Property | Description | Type | Reqd | Deflt
type | Type name: atmBoundaryLayerInletK | word | yes | - type | Type name: atmBoundaryLayerInletK | word | yes | -
\endtable \endtable
@ -183,7 +183,7 @@ public:
virtual void updateCoeffs(); virtual void updateCoeffs();
// Mapping functions // Mapping
//- Map (and resize as needed) from self given a mapping object //- Map (and resize as needed) from self given a mapping object
virtual void autoMap virtual void autoMap

View File

@ -30,7 +30,7 @@ Group
Description Description
This boundary condition provides a log-law type ground-normal inlet This boundary condition provides a log-law type ground-normal inlet
boundary condition for the specific dissipation rate, i.e. \c omega, boundary condition for the specific dissipation rate (i.e. \c omega)
for homogeneous, two-dimensional, dry-air, equilibrium and neutral for homogeneous, two-dimensional, dry-air, equilibrium and neutral
atmospheric boundary layer modelling. atmospheric boundary layer modelling.
@ -71,7 +71,7 @@ Usage
where the entries mean: where the entries mean:
\table \table
Property | Description | Type | Req'd | Deflt Property | Description | Type | Reqd | Deflt
type | Type name: atmBoundaryLayerInletOmega | word | yes | - type | Type name: atmBoundaryLayerInletOmega | word | yes | -
\endtable \endtable
@ -180,7 +180,7 @@ public:
virtual void updateCoeffs(); virtual void updateCoeffs();
// Mapping functions // Mapping
//- Map (and resize as needed) from self given a mapping object //- Map (and resize as needed) from self given a mapping object
virtual void autoMap virtual void autoMap

View File

@ -32,8 +32,8 @@ Group
Description Description
This boundary condition provides a log-law type ground-normal inlet This boundary condition provides a log-law type ground-normal inlet
boundary condition for the streamwise component of wind velocity, boundary condition for the streamwise component of wind velocity
i.e. \c u, for homogeneous, two-dimensional, dry-air, equilibrium (i.e. \c u) for homogeneous, two-dimensional, dry-air, equilibrium
and neutral atmospheric boundary layer modelling. and neutral atmospheric boundary layer modelling.
The ground-normal streamwise flow speed profile expression: The ground-normal streamwise flow speed profile expression:
@ -78,7 +78,7 @@ Usage
where the entries mean: where the entries mean:
\table \table
Property | Description | Type | Req'd | Deflt Property | Description | Type | Reqd | Deflt
type | Type name: atmBoundaryLayerInletVelocity | word | yes | - type | Type name: atmBoundaryLayerInletVelocity | word | yes | -
\endtable \endtable
@ -186,7 +186,8 @@ public:
//- Update the coefficients associated with the patch field //- Update the coefficients associated with the patch field
virtual void updateCoeffs(); virtual void updateCoeffs();
// Mapping functions
// Mapping
//- Map (and resize as needed) from self given a mapping object //- Map (and resize as needed) from self given a mapping object
virtual void autoMap virtual void autoMap

View File

@ -195,7 +195,7 @@ void atmTurbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Cp0 = " << Cp0 << " must be positive." << "Cp0 = " << Cp0 << " must be positive."
<< exit(FatalIOError); << exit(FatalError);
} }
const scalarField q(q_->value(t)); const scalarField q(q_->value(t));
@ -220,7 +220,7 @@ void atmTurbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
FatalErrorInFunction FatalErrorInFunction
<< "Unknown heat source type. Valid types are: " << "Unknown heat source type. Valid types are: "
<< heatSourceTypeNames << nl << heatSourceTypeNames << nl
<< exit(FatalIOError); << exit(FatalError);
} }
} }

View File

@ -31,8 +31,8 @@ Group
grpAtmWallFunctions grpAtmWallFunctions
Description Description
This boundary condition provides a fixed heat constraint on temperature, This boundary condition provides a fixed heat constraint on temperature
i.e. \c T, to specify temperature gradient through an input heat source (i.e. \c T) to specify temperature gradient through an input heat source
which can either be specified as absolute power [W], or as flux [W/m2]. which can either be specified as absolute power [W], or as flux [W/m2].
Required fields: Required fields:
@ -62,7 +62,7 @@ Usage
where the entries mean: where the entries mean:
\table \table
Property | Description | Type | Req'd | Dflt Property | Description | Type | Reqd | Dflt
heatSource | Heat source type | word | yes | - heatSource | Heat source type | word | yes | -
alphaEff | Name of turbulent thermal diff. field [kg/m/s] <!-- alphaEff | Name of turbulent thermal diff. field [kg/m/s] <!--
--> | word | yes | - --> | word | yes | -
@ -212,7 +212,7 @@ public:
// Member Functions // Member Functions
// Mapping functions // Mapping
//- Map (and resize as needed) from self given a mapping object //- Map (and resize as needed) from self given a mapping object
virtual void autoMap(const fvPatchFieldMapper&); virtual void autoMap(const fvPatchFieldMapper&);
@ -225,7 +225,7 @@ public:
); );
// Evaluation functions // Evaluation
//- Update the coefficients associated with the patch field //- Update the coefficients associated with the patch field
virtual void updateCoeffs(); virtual void updateCoeffs();

View File

@ -116,7 +116,7 @@ atmAlphatkWallFunctionFvPatchScalarField
( (
"Cmu", "Cmu",
0.09, 0.09,
scalarMinMax::ge(0) scalarMinMax::ge(SMALL)
) )
), ),
kappa_ kappa_
@ -125,7 +125,7 @@ atmAlphatkWallFunctionFvPatchScalarField
( (
"kappa", "kappa",
0.41, 0.41,
scalarMinMax::ge(0) scalarMinMax::ge(SMALL)
) )
), ),
Pr_(TimeFunction1<scalar>(db().time(), "Pr", dict)), Pr_(TimeFunction1<scalar>(db().time(), "Pr", dict)),
@ -183,7 +183,8 @@ void atmAlphatkWallFunctionFvPatchScalarField::updateCoeffs()
const label patchi = patch().index(); const label patchi = patch().index();
// Retrieve turbulence properties from model // Retrieve turbulence properties from model
const turbulenceModel& turbModel = db().lookupObject<turbulenceModel> const auto& turbModel =
db().lookupObject<turbulenceModel>
( (
IOobject::groupName IOobject::groupName
( (
@ -211,7 +212,7 @@ void atmAlphatkWallFunctionFvPatchScalarField::updateCoeffs()
FatalErrorInFunction FatalErrorInFunction
<< "Pr cannot be negative or zero. " << "Pr cannot be negative or zero. "
<< "Please check input Pr = " << Pr << "Please check input Pr = " << Pr
<< exit(FatalIOError); << exit(FatalError);
} }
#endif #endif
@ -226,7 +227,7 @@ void atmAlphatkWallFunctionFvPatchScalarField::updateCoeffs()
FatalErrorInFunction FatalErrorInFunction
<< "Elements of input surface fields can only be positive. " << "Elements of input surface fields can only be positive. "
<< "Please check input fields z0 and Prt." << "Please check input fields z0 and Prt."
<< exit(FatalIOError); << exit(FatalError);
} }
} }
#endif #endif

View File

@ -32,7 +32,7 @@ Group
Description Description
This boundary condition provides a wall constraint on the kinematic This boundary condition provides a wall constraint on the kinematic
turbulent thermal conductivity, i.e. \c alphat, for atmospheric boundary turbulent thermal conductivity (i.e. \c alphat) for atmospheric boundary
layer modelling. It assumes a logarithmic distribution of the potential layer modelling. It assumes a logarithmic distribution of the potential
temperature within the first cell. temperature within the first cell.
@ -65,7 +65,7 @@ Usage
where the entries mean: where the entries mean:
\table \table
Property | Description | Type | Req'd | Dflt Property | Description | Type | Reqd | Dflt
type | Type name: atmAlphatkWallFunction | word | yes | - type | Type name: atmAlphatkWallFunction | word | yes | -
Pr | Molecular Prandtl number | TimeFunction1<scalar> | yes | - Pr | Molecular Prandtl number | TimeFunction1<scalar> | yes | -
Prt | Turbulent Prandtl number | PatchFunction1<scalar> | yes | - Prt | Turbulent Prandtl number | PatchFunction1<scalar> | yes | -
@ -212,13 +212,13 @@ public:
// Member Functions // Member Functions
// Evaluation functions // Evaluation
//- Update the coefficients associated with the patch field //- Update the coefficients associated with the patch field
virtual void updateCoeffs(); virtual void updateCoeffs();
// Mapping functions // Mapping
//- Map (and resize as needed) from self given a mapping object //- Map (and resize as needed) from self given a mapping object
virtual void autoMap(const fvPatchFieldMapper&); virtual void autoMap(const fvPatchFieldMapper&);

View File

@ -74,7 +74,7 @@ void Foam::atmEpsilonWallFunctionFvPatchScalarField::calculate
FatalErrorInFunction FatalErrorInFunction
<< "z0 field can only contain positive values. " << "z0 field can only contain positive values. "
<< "Please check input field z0." << "Please check input field z0."
<< exit(FatalIOError); << exit(FatalError);
} }
} }
#endif #endif

View File

@ -32,8 +32,8 @@ Group
Description Description
This boundary condition provides a wall constraint on the turbulent kinetic This boundary condition provides a wall constraint on the turbulent kinetic
energy dissipation rate, i.e. \c epsilon, and the turbulent kinetic energy energy dissipation rate (i.e. \c epsilon) and the turbulent kinetic energy
production contribution, i.e. \c G, for atmospheric boundary layer production contribution (i.e. \c G) for atmospheric boundary layer
modelling. modelling.
References: References:
@ -75,7 +75,7 @@ Usage
where the entries mean: where the entries mean:
\table \table
Property | Description | Type | Req'd | Dflt Property | Description | Type | Reqd | Dflt
type | Type name: atmEpsilonWallFunction | word | yes | - type | Type name: atmEpsilonWallFunction | word | yes | -
z0 | Surface roughness length [m] | PatchFunction1<scalar> | yes | - z0 | Surface roughness length [m] | PatchFunction1<scalar> | yes | -
\endtable \endtable
@ -206,7 +206,7 @@ public:
// Member Functions // Member Functions
// Mapping functions // Mapping
//- Map (and resize as needed) from self given a mapping object //- Map (and resize as needed) from self given a mapping object
virtual void autoMap(const fvPatchFieldMapper&); virtual void autoMap(const fvPatchFieldMapper&);

View File

@ -43,7 +43,8 @@ tmp<scalarField> atmNutUWallFunctionFvPatchScalarField::calcNut() const
{ {
const label patchi = patch().index(); const label patchi = patch().index();
const turbulenceModel& turbModel = db().lookupObject<turbulenceModel> const auto& turbModel =
db().lookupObject<turbulenceModel>
( (
IOobject::groupName IOobject::groupName
( (
@ -65,20 +66,20 @@ tmp<scalarField> atmNutUWallFunctionFvPatchScalarField::calcNut() const
const scalarField z0(z0_->value(t)); const scalarField z0(z0_->value(t));
#ifdef FULLDEBUG #ifdef FULLDEBUG
for (const auto& z : z0) for (const scalar z : z0)
{ {
if (z < VSMALL) if (z < VSMALL)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "z0 field can only contain positive values. " << "z0 field can only contain positive values. "
<< "Please check input field z0." << "Please check input field z0."
<< exit(FatalIOError); << exit(FatalError);
} }
} }
#endif #endif
tmp<scalarField> tnutw(new scalarField(*this)); auto tnutw = tmp<scalarField>::New(*this);
scalarField& nutw = tnutw.ref(); auto& nutw = tnutw.ref();
forAll(nutw, facei) forAll(nutw, facei)
{ {
@ -90,7 +91,7 @@ tmp<scalarField> atmNutUWallFunctionFvPatchScalarField::calcNut() const
if (boundNut_) if (boundNut_)
{ {
nutw = max(nutw, scalar(0.0)); nutw = max(nutw, scalar(0));
} }
return tnutw; return tnutw;
@ -133,7 +134,7 @@ atmNutUWallFunctionFvPatchScalarField::atmNutUWallFunctionFvPatchScalarField
) )
: :
nutUWallFunctionFvPatchScalarField(p, iF, dict), nutUWallFunctionFvPatchScalarField(p, iF, dict),
boundNut_(dict.getOrDefault<Switch>("boundNut", true)), boundNut_(dict.getOrDefault<bool>("boundNut", true)),
z0_(PatchFunction1<scalar>::New(p.patch(), "z0", dict)) z0_(PatchFunction1<scalar>::New(p.patch(), "z0", dict))
{} {}
@ -190,7 +191,8 @@ void atmNutUWallFunctionFvPatchScalarField::rmap
void atmNutUWallFunctionFvPatchScalarField::write(Ostream& os) const void atmNutUWallFunctionFvPatchScalarField::write(Ostream& os) const
{ {
nutUWallFunctionFvPatchScalarField::write(os); fvPatchField<scalar>::write(os);
nutWallFunctionFvPatchScalarField::writeLocalEntries(os);
os.writeEntry("boundNut", boundNut_); os.writeEntry("boundNut", boundNut_);
z0_->writeData(os); z0_->writeData(os);
writeEntry("value", os); writeEntry("value", os);

View File

@ -32,7 +32,7 @@ Group
Description Description
This boundary condition provides a wall constraint on the turbulent This boundary condition provides a wall constraint on the turbulent
viscosity, i.e. \c nut, based on velocity, i.e. \c U, for atmospheric viscosity (i.e. \c nut) based on velocity (i.e. \c U) for atmospheric
boundary layer modelling. It is designed to be used in conjunction boundary layer modelling. It is designed to be used in conjunction
with the \c atmBoundaryLayerInletVelocity boundary condition. with the \c atmBoundaryLayerInletVelocity boundary condition.
@ -77,7 +77,7 @@ Usage
where the entries mean: where the entries mean:
\table \table
Property | Description | Type | Req'd | Dflt Property | Description | Type | Reqd | Dflt
type | Type name: atmNutUWallFunction | word | yes | - type | Type name: atmNutUWallFunction | word | yes | -
z0 | Surface roughness length [m] | PatchFunction1<scalar> | yes | - z0 | Surface roughness length [m] | PatchFunction1<scalar> | yes | -
boundNut | Flag: zero-bound nut near wall | bool | no | true boundNut | Flag: zero-bound nut near wall | bool | no | true
@ -119,7 +119,7 @@ class atmNutUWallFunctionFvPatchScalarField
//- Flag to zero-bound nut to prevent negative nut //- Flag to zero-bound nut to prevent negative nut
//- at the wall arising from negative heat fluxes //- at the wall arising from negative heat fluxes
const Switch boundNut_; const bool boundNut_;
//- Surface roughness length field [m] //- Surface roughness length field [m]
autoPtr<PatchFunction1<scalar>> z0_; autoPtr<PatchFunction1<scalar>> z0_;
@ -204,7 +204,7 @@ public:
// Member Functions // Member Functions
// Mapping functions // Mapping
//- Map (and resize as needed) from self given a mapping object //- Map (and resize as needed) from self given a mapping object
virtual void autoMap(const fvPatchFieldMapper&); virtual void autoMap(const fvPatchFieldMapper&);

View File

@ -44,7 +44,8 @@ tmp<scalarField> atmNutWallFunctionFvPatchScalarField::calcNut() const
{ {
const label patchi = patch().index(); const label patchi = patch().index();
const turbulenceModel& turbModel = db().lookupObject<turbulenceModel> const auto& turbModel =
db().lookupObject<turbulenceModel>
( (
IOobject::groupName IOobject::groupName
( (
@ -60,8 +61,8 @@ tmp<scalarField> atmNutWallFunctionFvPatchScalarField::calcNut() const
const tmp<scalarField> tnuw = turbModel.nu(patchi); const tmp<scalarField> tnuw = turbModel.nu(patchi);
const scalarField& nuw = tnuw(); const scalarField& nuw = tnuw();
tmp<scalarField> tnutw(new scalarField(*this)); auto tnutw = tmp<scalarField>::New(*this);
scalarField& nutw = tnutw.ref(); auto& nutw = tnutw.ref();
const scalar Cmu25 = pow025(Cmu_); const scalar Cmu25 = pow025(Cmu_);
@ -72,14 +73,14 @@ tmp<scalarField> atmNutWallFunctionFvPatchScalarField::calcNut() const
const scalarField z0(z0_->value(t)); const scalarField z0(z0_->value(t));
#ifdef FULLDEBUG #ifdef FULLDEBUG
for (const auto& z : z0) for (const scalar z : z0)
{ {
if (z < VSMALL) if (z < VSMALL)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "z0 field can only contain positive values. " << "z0 field can only contain positive values. "
<< "Please check input field z0." << "Please check input field z0."
<< exit(FatalIOError); << exit(FatalError);
} }
} }
#endif #endif
@ -211,7 +212,8 @@ void atmNutWallFunctionFvPatchScalarField::rmap
void atmNutWallFunctionFvPatchScalarField::write(Ostream& os) const void atmNutWallFunctionFvPatchScalarField::write(Ostream& os) const
{ {
nutkWallFunctionFvPatchScalarField::write(os); fvPatchField<scalar>::write(os);
nutWallFunctionFvPatchScalarField::writeLocalEntries(os);
os.writeEntry("z0Min", z0Min_); os.writeEntry("z0Min", z0Min_);
z0_->writeData(os); z0_->writeData(os);
writeEntry("value", os); writeEntry("value", os);

View File

@ -32,8 +32,8 @@ Group
Description Description
This boundary condition provides a wall constraint on the turbulent This boundary condition provides a wall constraint on the turbulent
viscosity, i.e. \c nut, based on the turbulent kinetic energy, \c k, viscosity (i.e. \c nut) based on the turbulent kinetic energy (i.e. \c k)
and velocity, i.e. \c U, for atmospheric boundary layer modelling. and velocity (i.e. \c U) for atmospheric boundary layer modelling.
The governing equation of the boundary condition: The governing equation of the boundary condition:
@ -114,7 +114,7 @@ Usage
where the entries mean: where the entries mean:
\table \table
Property | Description | Type | Req'd | Dflt Property | Description | Type | Reqd | Dflt
type | Type name: nutAtmWallFunction | word | yes | - type | Type name: nutAtmWallFunction | word | yes | -
z0Min | Minimum surface roughness length [m] | scalar | yes | - z0Min | Minimum surface roughness length [m] | scalar | yes | -
z0 | Surface roughness length [m] | PatchFunction1<scalar> | yes | - z0 | Surface roughness length [m] | PatchFunction1<scalar> | yes | -
@ -242,7 +242,7 @@ public:
// Member Functions // Member Functions
// Mapping functions // Mapping
//- Map (and resize as needed) from self given a mapping object //- Map (and resize as needed) from self given a mapping object
virtual void autoMap(const fvPatchFieldMapper&); virtual void autoMap(const fvPatchFieldMapper&);

View File

@ -45,7 +45,8 @@ tmp<scalarField> atmNutkWallFunctionFvPatchScalarField::calcNut() const
{ {
const label patchi = patch().index(); const label patchi = patch().index();
const turbulenceModel& turbModel = db().lookupObject<turbulenceModel> const auto& turbModel =
db().lookupObject<turbulenceModel>
( (
IOobject::groupName IOobject::groupName
( (
@ -61,8 +62,8 @@ tmp<scalarField> atmNutkWallFunctionFvPatchScalarField::calcNut() const
const tmp<scalarField> tnuw = turbModel.nu(patchi); const tmp<scalarField> tnuw = turbModel.nu(patchi);
const scalarField& nuw = tnuw(); const scalarField& nuw = tnuw();
tmp<scalarField> tnutw(new scalarField(*this)); auto tnutw = tmp<scalarField>::New(*this);
scalarField& nutw = tnutw.ref(); auto& nutw = tnutw.ref();
const scalar Cmu25 = pow025(Cmu_); const scalar Cmu25 = pow025(Cmu_);
@ -70,14 +71,14 @@ tmp<scalarField> atmNutkWallFunctionFvPatchScalarField::calcNut() const
const scalarField z0(z0_->value(t)); const scalarField z0(z0_->value(t));
#ifdef FULLDEBUG #ifdef FULLDEBUG
for (const auto& z : z0) for (const scalar z : z0)
{ {
if (z < VSMALL) if (z < VSMALL)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "z0 field can only contain positive values. " << "z0 field can only contain positive values. "
<< "Please check input field z0." << "Please check input field z0."
<< exit(FatalIOError); << exit(FatalError);
} }
} }
#endif #endif
@ -98,7 +99,7 @@ tmp<scalarField> atmNutkWallFunctionFvPatchScalarField::calcNut() const
if (boundNut_) if (boundNut_)
{ {
nutw = max(nutw, scalar(0.0)); nutw = max(nutw, scalar(0));
} }
return tnutw; return tnutw;
@ -141,7 +142,7 @@ atmNutkWallFunctionFvPatchScalarField::atmNutkWallFunctionFvPatchScalarField
) )
: :
nutkWallFunctionFvPatchScalarField(p, iF, dict), nutkWallFunctionFvPatchScalarField(p, iF, dict),
boundNut_(dict.getOrDefault<Switch>("boundNut", false)), boundNut_(dict.getOrDefault<bool>("boundNut", false)),
z0_(PatchFunction1<scalar>::New(p.patch(), "z0", dict)) z0_(PatchFunction1<scalar>::New(p.patch(), "z0", dict))
{} {}
@ -198,7 +199,8 @@ void atmNutkWallFunctionFvPatchScalarField::rmap
void atmNutkWallFunctionFvPatchScalarField::write(Ostream& os) const void atmNutkWallFunctionFvPatchScalarField::write(Ostream& os) const
{ {
nutkWallFunctionFvPatchScalarField::write(os); fvPatchField<scalar>::write(os);
nutWallFunctionFvPatchScalarField::writeLocalEntries(os);
os.writeEntry("boundNut", boundNut_); os.writeEntry("boundNut", boundNut_);
z0_->writeData(os); z0_->writeData(os);
writeEntry("value", os); writeEntry("value", os);

View File

@ -33,7 +33,7 @@ Group
Description Description
This boundary condition provides a wall constraint on the turbulent This boundary condition provides a wall constraint on the turbulent
viscosity, i.e. \c nut, based on the turbulent kinetic energy, i.e. \c k, viscosity (i.e. \c nut) based on the turbulent kinetic energy (i.e. \c k)
for atmospheric boundary layer modelling. It is designed to be used in for atmospheric boundary layer modelling. It is designed to be used in
conjunction with the \c atmBoundaryLayerInletVelocity boundary condition. conjunction with the \c atmBoundaryLayerInletVelocity boundary condition.
@ -94,10 +94,10 @@ Usage
where the entries mean: where the entries mean:
\table \table
Property | Description | Type | Req'd | Dflt Property | Description | Type | Reqd | Dflt
type | Type name: atmNutkWallFunction | word | yes | - type | Type name: atmNutkWallFunction | word | yes | -
z0 | Surface roughness length [m] | PatchFunction1<scalar> | yes | - z0 | Surface roughness length [m] | PatchFunction1<scalar> | yes | -
boundNut | Flag: zero-bound nut near wall | bool | no | false boundNut | Flag to zero-bound nut near wall | bool | no | false
\endtable \endtable
The inherited entries are elaborated in: The inherited entries are elaborated in:
@ -139,7 +139,7 @@ class atmNutkWallFunctionFvPatchScalarField
//- Flag to zero-bound nut to prevent negative nut //- Flag to zero-bound nut to prevent negative nut
//- at the wall arising from negative heat fluxes //- at the wall arising from negative heat fluxes
const Switch boundNut_; const bool boundNut_;
//- Surface roughness length field [m] //- Surface roughness length field [m]
autoPtr<PatchFunction1<scalar>> z0_; autoPtr<PatchFunction1<scalar>> z0_;
@ -224,7 +224,7 @@ public:
// Member Functions // Member Functions
// Mapping functions // Mapping
//- Map (and resize as needed) from self given a mapping object //- Map (and resize as needed) from self given a mapping object
virtual void autoMap(const fvPatchFieldMapper&); virtual void autoMap(const fvPatchFieldMapper&);

View File

@ -66,14 +66,14 @@ void Foam::atmOmegaWallFunctionFvPatchScalarField::calculate
const scalarField z0(z0_->value(t)); const scalarField z0(z0_->value(t));
#ifdef FULLDEBUG #ifdef FULLDEBUG
for (const auto& z : z0) for (const scalar z : z0)
{ {
if (z < VSMALL) if (z < VSMALL)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "z0 field can only contain positive values. " << "z0 field can only contain positive values. "
<< "Please check input field z0." << "Please check input field z0."
<< exit(FatalIOError); << exit(FatalError);
} }
} }
#endif #endif
@ -198,7 +198,6 @@ void Foam::atmOmegaWallFunctionFvPatchScalarField::write
{ {
omegaWallFunctionFvPatchScalarField::write(os); omegaWallFunctionFvPatchScalarField::write(os);
z0_->writeData(os); z0_->writeData(os);
writeEntry("value", os);
} }

View File

@ -32,8 +32,8 @@ Group
Description Description
This boundary condition provides a wall constraint on the specific This boundary condition provides a wall constraint on the specific
dissipation rate, i.e. \c omega, and the turbulent kinetic energy dissipation rate (i.e. \c omega) and the turbulent kinetic energy
production contribution, i.e. \c G, for atmospheric boundary production contribution (i.e. \c G) for atmospheric boundary
layer modelling. layer modelling.
References: References:
@ -74,7 +74,7 @@ Usage
where the entries mean: where the entries mean:
\table \table
Property | Description | Type | Req'd | Dflt Property | Description | Type | Reqd | Dflt
type | Type name: atmOmegaWallFunction | word | yes | - type | Type name: atmOmegaWallFunction | word | yes | -
z0 | Surface roughness length [m] | PatchFunction1<scalar> | yes | - z0 | Surface roughness length [m] | PatchFunction1<scalar> | yes | -
\endtable \endtable
@ -206,7 +206,7 @@ public:
// Member Functions // Member Functions
// Mapping functions // Mapping
//- Map (and resize as needed) from self given a mapping object //- Map (and resize as needed) from self given a mapping object
virtual void autoMap(const fvPatchFieldMapper&); virtual void autoMap(const fvPatchFieldMapper&);

View File

@ -18,4 +18,6 @@ runParallel renumberMesh -overwrite
runParallel $(getApplication) 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; runTimeModifiable yes;
functions functions
{ {
#include "sampleDict" #include "sampleDict"

View File

@ -23,4 +23,5 @@ coeffs
n (8 1 1); n (8 1 1);
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -27,10 +27,14 @@ gradSchemes
divSchemes divSchemes
{ {
default none; default none;
div(phi,U) bounded Gauss linear; div(phi,U) bounded Gauss linear;
div(phi,epsilon) bounded Gauss limitedLinear 1;
div(phi,omega) bounded Gauss limitedLinear 1; turbulence bounded Gauss limitedLinear 1;
div(phi,k) bounded Gauss limitedLinear 1; div(phi,epsilon) $turbulence;
div(phi,omega) $turbulence;
div(phi,k) $turbulence;
div((nuEff*dev2(T(grad(U))))) Gauss linear; div((nuEff*dev2(T(grad(U))))) Gauss linear;
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -33,4 +33,5 @@ RAS
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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