STYLE: rename atmospheric-field names, plantCd->Cd and leafAreaDensity->LAD

This commit is contained in:
Kutalmis Bercin
2022-09-15 09:33:46 +01:00
committed by Andrew Heather
parent ce10cc54c2
commit b50591166e
16 changed files with 64 additions and 66 deletions

View File

@ -50,7 +50,7 @@ Foam::fv::atmPlantCanopyTurbSource::calcPlantCanopyTerm
) const ) const
{ {
// (SP:Eq. 42) // (SP:Eq. 42)
return 12.0*Foam::sqrt(Cmu_)*plantCd_()*leafAreaDensity_()*mag(U); return 12.0*Foam::sqrt(Cmu_)*Cd_()*LAD_()*mag(U);
} }
@ -70,11 +70,11 @@ Foam::fv::atmPlantCanopyTurbSource::atmPlantCanopyTurbSource
Cmu_(Zero), Cmu_(Zero),
C1_(Zero), C1_(Zero),
C2_(Zero), C2_(Zero),
plantCd_ Cd_
( (
IOobject IOobject
( (
"plantCd", "Cd",
mesh.time().timeName(), mesh.time().timeName(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
@ -82,11 +82,11 @@ Foam::fv::atmPlantCanopyTurbSource::atmPlantCanopyTurbSource
), ),
mesh mesh
), ),
leafAreaDensity_ LAD_
( (
IOobject IOobject
( (
"leafAreaDensity", "LAD",
mesh.time().timeName(), mesh.time().timeName(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ,

View File

@ -43,8 +43,8 @@ Description
Required fields: Required fields:
\verbatim \verbatim
epsilon/omega | Dissipation rate OR Spec. dissipation rate [m2/s3]/[1/s] epsilon/omega | Dissipation rate OR Spec. dissipation rate [m2/s3]/[1/s]
plantCd | Plant canopy drag coefficient [-] Cd | Plant canopy drag coefficient [-]
leafAreaDensity | Leaf area density [1/m] LAD | Leaf area density [1/m]
\endverbatim \endverbatim
References: References:
@ -133,10 +133,10 @@ class atmPlantCanopyTurbSource
// Fields // Fields
//- Plant canopy drag coefficient field [-] //- Plant canopy drag coefficient field [-]
volScalarField plantCd_; volScalarField Cd_;
//- Leaf area density field [1/m] //- Leaf area density field [1/m]
volScalarField leafAreaDensity_; volScalarField LAD_;
// Private Member Functions // Private Member Functions

View File

@ -54,11 +54,11 @@ Foam::fv::atmPlantCanopyUSource::atmPlantCanopyUSource
: :
fv::cellSetOption(sourceName, modelType, dict, mesh), fv::cellSetOption(sourceName, modelType, dict, mesh),
rhoName_(coeffs_.getOrDefault<word>("rho", "rho")), rhoName_(coeffs_.getOrDefault<word>("rho", "rho")),
plantCd_ Cd_
( (
IOobject IOobject
( (
"plantCd", "Cd",
mesh.time().timeName(), mesh.time().timeName(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
@ -66,11 +66,11 @@ Foam::fv::atmPlantCanopyUSource::atmPlantCanopyUSource
), ),
mesh mesh
), ),
leafAreaDensity_ LAD_
( (
IOobject IOobject
( (
"leafAreaDensity", "LAD",
mesh.time().timeName(), mesh.time().timeName(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
@ -100,7 +100,7 @@ void Foam::fv::atmPlantCanopyUSource::addSup
if (V_ > VSMALL) if (V_ > VSMALL)
{ {
// (SP:Eq. 42) // (SP:Eq. 42)
eqn -= fvm::Sp(plantCd_*leafAreaDensity_*mag(U), U); eqn -= fvm::Sp(Cd_*LAD_*mag(U), U);
} }
} }
@ -116,7 +116,7 @@ void Foam::fv::atmPlantCanopyUSource::addSup
if (V_ > VSMALL) if (V_ > VSMALL)
{ {
eqn -= fvm::Sp(rho*plantCd_*leafAreaDensity_*mag(U), U); eqn -= fvm::Sp(rho*Cd_*LAD_*mag(U), U);
} }
} }
@ -133,7 +133,7 @@ void Foam::fv::atmPlantCanopyUSource::addSup
if (V_ > VSMALL) if (V_ > VSMALL)
{ {
eqn -= fvm::Sp(alpha*rho*plantCd_*leafAreaDensity_*mag(U), U); eqn -= fvm::Sp(alpha*rho*Cd_*LAD_*mag(U), U);
} }
} }

View File

@ -42,8 +42,8 @@ Description
Required fields: Required fields:
\verbatim \verbatim
U | Velocity [m/s] U | Velocity [m/s]
plantCd | Plant canopy drag coefficient [-] Cd | Plant canopy drag coefficient [-]
leafAreaDensity | Leaf area density [1/m] LAD | Leaf area density [1/m]
\endverbatim \endverbatim
References: References:
@ -124,10 +124,10 @@ class atmPlantCanopyUSource
// Fields // Fields
//- Plant canopy drag coefficient field [-] //- Plant canopy drag coefficient field [-]
volScalarField plantCd_; volScalarField Cd_;
//- Leaf area density field [1/m] //- Leaf area density field [1/m]
volScalarField leafAreaDensity_; volScalarField LAD_;
public: public:

View File

@ -67,10 +67,8 @@ tmp<volScalarField> kL<BasicTurbulenceModel>::nutPrime() const
template<class BasicTurbulenceModel> template<class BasicTurbulenceModel>
tmp<volScalarField> kL<BasicTurbulenceModel>::epsilonCanopy() const tmp<volScalarField> kL<BasicTurbulenceModel>::epsilonCanopy() const
{ {
const auto* CdPtr = const auto* CdPtr = this->mesh_.template findObject<volScalarField>("Cd");
this->mesh_.template findObject<volScalarField>("plantCd"); const auto* LADPtr = this->mesh_.template findObject<volScalarField>("LAD");
const auto* LADPtr =
this->mesh_.template findObject<volScalarField>("leafAreaDensity");
const volVectorField& U = this->U_; const volVectorField& U = this->U_;
if (CdPtr && LADPtr) if (CdPtr && LADPtr)

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2021 OpenCFD Ltd. Copyright (C) 2021-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -104,8 +104,8 @@ Usage
\heading Input fields (optional) \heading Input fields (optional)
\plaintable \plaintable
canopyHeight | Canopy height [m] canopyHeight | Canopy height [m]
plantCd | Plant canopy drag coefficient [-] Cd | Plant canopy drag coefficient [-]
leafAreaDensity | Leaf area density [1/m] LAD | Leaf area density [1/m]
Rt | Turbulent Richardson number [-] Rt | Turbulent Richardson number [-]
L | Characteristic length scale [m] L | Characteristic length scale [m]
\endplaintable \endplaintable

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
object plantCd; object Cd;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
object leafAreaDensity; object LAD;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
object leafAreaDensity; object LAD;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -17,8 +17,8 @@ FoamFile
defaultFieldValues defaultFieldValues
( (
volScalarFieldValue qPlant 0 volScalarFieldValue qPlant 0
volScalarFieldValue plantCd 0 volScalarFieldValue Cd 0
volScalarFieldValue leafAreaDensity 0 volScalarFieldValue LAD 0
); );
regions regions
@ -37,8 +37,8 @@ regions
box (0 0 0) (200 200 18.2192); box (0 0 0) (200 200 18.2192);
fieldValues fieldValues
( (
volScalarFieldValue plantCd 0.2 volScalarFieldValue Cd 0.2
volScalarFieldValue leafAreaDensity 0.14 volScalarFieldValue LAD 0.14
); );
} }
@ -47,8 +47,8 @@ regions
patch bottom; patch bottom;
fieldValues fieldValues
( (
volScalarFieldValue plantCd 0.2 volScalarFieldValue Cd 0.2
volScalarFieldValue leafAreaDensity 0.14 volScalarFieldValue LAD 0.14
); );
} }
); );

View File

@ -17,8 +17,8 @@ FoamFile
defaultFieldValues defaultFieldValues
( (
volScalarFieldValue qPlant 0 volScalarFieldValue qPlant 0
volScalarFieldValue plantCd 0 volScalarFieldValue Cd 0
volScalarFieldValue leafAreaDensity 0 volScalarFieldValue LAD 0
); );
regions regions
@ -37,8 +37,8 @@ regions
box (0 0 0) (200 200 18.2192); box (0 0 0) (200 200 18.2192);
fieldValues fieldValues
( (
volScalarFieldValue plantCd 0.2 volScalarFieldValue Cd 0.2
volScalarFieldValue leafAreaDensity 0.14 volScalarFieldValue LAD 0.14
); );
} }
@ -47,8 +47,8 @@ regions
patch bottom; patch bottom;
fieldValues fieldValues
( (
volScalarFieldValue plantCd 0.2 volScalarFieldValue Cd 0.2
volScalarFieldValue leafAreaDensity 0.14 volScalarFieldValue LAD 0.14
); );
} }
); );

View File

@ -17,8 +17,8 @@ FoamFile
defaultFieldValues defaultFieldValues
( (
volScalarFieldValue qPlant 0 volScalarFieldValue qPlant 0
volScalarFieldValue plantCd 0 volScalarFieldValue Cd 0
volScalarFieldValue leafAreaDensity 0 volScalarFieldValue LAD 0
); );
regions regions
@ -37,8 +37,8 @@ regions
box (0 0 0) (200 200 18.2192); box (0 0 0) (200 200 18.2192);
fieldValues fieldValues
( (
volScalarFieldValue plantCd 0.2 volScalarFieldValue Cd 0.2
volScalarFieldValue leafAreaDensity 0.14 volScalarFieldValue LAD 0.14
); );
} }
@ -47,8 +47,8 @@ regions
patch bottom; patch bottom;
fieldValues fieldValues
( (
volScalarFieldValue plantCd 0.2 volScalarFieldValue Cd 0.2
volScalarFieldValue leafAreaDensity 0.14 volScalarFieldValue LAD 0.14
); );
} }
); );

View File

@ -17,8 +17,8 @@ FoamFile
defaultFieldValues defaultFieldValues
( (
volScalarFieldValue qPlant 0 volScalarFieldValue qPlant 0
volScalarFieldValue plantCd 0 volScalarFieldValue Cd 0
volScalarFieldValue leafAreaDensity 0 volScalarFieldValue LAD 0
); );
regions regions
@ -37,8 +37,8 @@ regions
box (0 0 0) (200 200 18.2192); box (0 0 0) (200 200 18.2192);
fieldValues fieldValues
( (
volScalarFieldValue plantCd 0.2 volScalarFieldValue Cd 0.2
volScalarFieldValue leafAreaDensity 0.14 volScalarFieldValue LAD 0.14
); );
} }
@ -47,8 +47,8 @@ regions
patch bottom; patch bottom;
fieldValues fieldValues
( (
volScalarFieldValue plantCd 0.2 volScalarFieldValue Cd 0.2
volScalarFieldValue leafAreaDensity 0.14 volScalarFieldValue LAD 0.14
); );
} }
); );

View File

@ -17,8 +17,8 @@ FoamFile
defaultFieldValues defaultFieldValues
( (
volScalarFieldValue qPlant 0 volScalarFieldValue qPlant 0
volScalarFieldValue plantCd 0 volScalarFieldValue Cd 0
volScalarFieldValue leafAreaDensity 0 volScalarFieldValue LAD 0
); );
regions regions
@ -37,8 +37,8 @@ regions
box (0 0 0) (200 200 18.2192); box (0 0 0) (200 200 18.2192);
fieldValues fieldValues
( (
volScalarFieldValue plantCd 0.2 volScalarFieldValue Cd 0.2
volScalarFieldValue leafAreaDensity 0.14 volScalarFieldValue LAD 0.14
); );
} }
@ -47,8 +47,8 @@ regions
patch bottom; patch bottom;
fieldValues fieldValues
( (
volScalarFieldValue plantCd 0.2 volScalarFieldValue Cd 0.2
volScalarFieldValue leafAreaDensity 0.14 volScalarFieldValue LAD 0.14
); );
} }
); );

View File

@ -17,8 +17,8 @@ FoamFile
defaultFieldValues defaultFieldValues
( (
volScalarFieldValue qPlant 0 volScalarFieldValue qPlant 0
volScalarFieldValue plantCd 0 volScalarFieldValue Cd 0
volScalarFieldValue leafAreaDensity 0 volScalarFieldValue LAD 0
); );
regions regions
@ -37,8 +37,8 @@ regions
box (0 0 0) (200 200 18.2192); box (0 0 0) (200 200 18.2192);
fieldValues fieldValues
( (
volScalarFieldValue plantCd 0.2 volScalarFieldValue Cd 0.2
volScalarFieldValue leafAreaDensity 0.14 volScalarFieldValue LAD 0.14
); );
} }
@ -47,8 +47,8 @@ regions
patch bottom; patch bottom;
fieldValues fieldValues
( (
volScalarFieldValue plantCd 0.2 volScalarFieldValue Cd 0.2
volScalarFieldValue leafAreaDensity 0.14 volScalarFieldValue LAD 0.14
); );
} }
); );