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
{
// (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),
C1_(Zero),
C2_(Zero),
plantCd_
Cd_
(
IOobject
(
"plantCd",
"Cd",
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
@ -82,11 +82,11 @@ Foam::fv::atmPlantCanopyTurbSource::atmPlantCanopyTurbSource
),
mesh
),
leafAreaDensity_
LAD_
(
IOobject
(
"leafAreaDensity",
"LAD",
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,

View File

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

View File

@ -54,11 +54,11 @@ Foam::fv::atmPlantCanopyUSource::atmPlantCanopyUSource
:
fv::cellSetOption(sourceName, modelType, dict, mesh),
rhoName_(coeffs_.getOrDefault<word>("rho", "rho")),
plantCd_
Cd_
(
IOobject
(
"plantCd",
"Cd",
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
@ -66,11 +66,11 @@ Foam::fv::atmPlantCanopyUSource::atmPlantCanopyUSource
),
mesh
),
leafAreaDensity_
LAD_
(
IOobject
(
"leafAreaDensity",
"LAD",
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
@ -100,7 +100,7 @@ void Foam::fv::atmPlantCanopyUSource::addSup
if (V_ > VSMALL)
{
// (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)
{
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)
{
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:
\verbatim
U | Velocity [m/s]
plantCd | Plant canopy drag coefficient [-]
leafAreaDensity | Leaf area density [1/m]
Cd | Plant canopy drag coefficient [-]
LAD | Leaf area density [1/m]
\endverbatim
References:
@ -124,10 +124,10 @@ class atmPlantCanopyUSource
// Fields
//- Plant canopy drag coefficient field [-]
volScalarField plantCd_;
volScalarField Cd_;
//- Leaf area density field [1/m]
volScalarField leafAreaDensity_;
volScalarField LAD_;
public:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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