functionObjects::scalarTransport: diffusion -> diffusivity
It in more logical to name the diffusivity entry, types and variables "diffusivity" rather than "diffusion".
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -66,7 +66,7 @@ namespace functionObjects
|
||||
template<>
|
||||
const char* Foam::NamedEnum
|
||||
<
|
||||
Foam::functionObjects::scalarTransport::diffusionType,
|
||||
Foam::functionObjects::scalarTransport::diffusivityType,
|
||||
3
|
||||
>::names[] =
|
||||
{
|
||||
@ -77,9 +77,9 @@ const char* Foam::NamedEnum
|
||||
|
||||
const Foam::NamedEnum
|
||||
<
|
||||
Foam::functionObjects::scalarTransport::diffusionType,
|
||||
Foam::functionObjects::scalarTransport::diffusivityType,
|
||||
3
|
||||
> Foam::functionObjects::scalarTransport::diffusionTypeNames_;
|
||||
> Foam::functionObjects::scalarTransport::diffusivityTypeNames_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
@ -89,7 +89,7 @@ Foam::functionObjects::scalarTransport::D() const
|
||||
{
|
||||
const word Dname("D" + fieldName_);
|
||||
|
||||
if (diffusion_ == diffusionType::constant)
|
||||
if (diffusivity_ == diffusivityType::constant)
|
||||
{
|
||||
return volScalarField::New
|
||||
(
|
||||
@ -119,7 +119,7 @@ Foam::functionObjects::scalarTransport::scalarTransport
|
||||
:
|
||||
fvMeshFunctionObject(name, runTime, dict),
|
||||
fieldName_(dict.lookupOrDefault<word>("field", "s")),
|
||||
diffusion_(diffusionType::none),
|
||||
diffusivity_(diffusivityType::none),
|
||||
D_(0),
|
||||
nCorr_(0),
|
||||
s_
|
||||
@ -203,18 +203,18 @@ bool Foam::functionObjects::scalarTransport::read(const dictionary& dict)
|
||||
rhoName_ = dict.lookupOrDefault<word>("rho", "rho");
|
||||
schemesField_ = dict.lookupOrDefault<word>("schemesField", fieldName_);
|
||||
|
||||
diffusion_ = diffusionTypeNames_.read(dict.lookup("diffusion"));
|
||||
diffusivity_ = diffusivityTypeNames_.read(dict.lookup("diffusivity"));
|
||||
|
||||
switch(diffusion_)
|
||||
switch(diffusivity_)
|
||||
{
|
||||
case diffusionType::none:
|
||||
case diffusivityType::none:
|
||||
break;
|
||||
|
||||
case diffusionType::constant:
|
||||
case diffusivityType::constant:
|
||||
dict.lookup("D") >> D_;
|
||||
break;
|
||||
|
||||
case diffusionType::viscosity:
|
||||
case diffusivityType::viscosity:
|
||||
dict.lookup("alphal") >> alphal_;
|
||||
dict.lookup("alphat") >> alphat_;
|
||||
break;
|
||||
@ -274,7 +274,7 @@ bool Foam::functionObjects::scalarTransport::execute()
|
||||
fvModels.source(s_)
|
||||
);
|
||||
|
||||
if (diffusion_ != diffusionType::none)
|
||||
if (diffusivity_ != diffusivityType::none)
|
||||
{
|
||||
sEqn -= fvm::laplacian(D(), s_);
|
||||
}
|
||||
@ -304,7 +304,7 @@ bool Foam::functionObjects::scalarTransport::execute()
|
||||
fvModels.source(rho, s_)
|
||||
);
|
||||
|
||||
if (diffusion_ != diffusionType::none)
|
||||
if (diffusivity_ != diffusivityType::none)
|
||||
{
|
||||
sEqn -= fvm::laplacian(rho*D(), s_);
|
||||
}
|
||||
@ -363,9 +363,9 @@ void Foam::functionObjects::scalarTransport::subCycleMULES()
|
||||
}
|
||||
|
||||
|
||||
// Apply the diffusion term separately to allow implicit solution
|
||||
// Apply the diffusivity term separately to allow implicit solution
|
||||
// and boundedness of the explicit advection
|
||||
if (diffusion_ != diffusionType::none)
|
||||
if (diffusivity_ != diffusivityType::none)
|
||||
{
|
||||
fvScalarMatrix sEqn
|
||||
(
|
||||
@ -373,7 +373,7 @@ void Foam::functionObjects::scalarTransport::subCycleMULES()
|
||||
- fvm::laplacian(D(), s_)
|
||||
);
|
||||
|
||||
sEqn.solve(controls.subDict("diffusion"));
|
||||
sEqn.solve(controls.subDict("diffusivity"));
|
||||
|
||||
Info<< fieldName_ << " volume fraction = "
|
||||
<< s_.weightedAverage(mesh_.V()).value()
|
||||
|
||||
@ -30,10 +30,10 @@ Description
|
||||
- To specify the field name set the \c field entry
|
||||
- To employ the same numerical schemes as another field set
|
||||
the \c schemesField entry,
|
||||
- The \c diffusion entry can be set to \c none, \c constant, \c viscosity
|
||||
- The \c diffusivity entry can be set to \c none, \c constant, \c viscosity
|
||||
- A constant diffusivity is specified with the \c D entry,
|
||||
- If a momentum transport model is available and the \c viscosity
|
||||
diffusion option specified an effective diffusivity may be constructed
|
||||
diffusivity option specified an effective diffusivity may be constructed
|
||||
from the laminar and turbulent viscosities using the diffusivity
|
||||
coefficients \c alphal and \c alphat:
|
||||
\verbatim
|
||||
@ -52,7 +52,7 @@ Description
|
||||
|
||||
Example:
|
||||
\verbatim
|
||||
#includeFunc scalarTransport(tracer, diffusion=none)
|
||||
#includeFunc scalarTransport(tracer, diffusivity=none)
|
||||
|
||||
with scheme specification:
|
||||
div(phi,tracer) Gauss interfaceCompression vanLeer 1;
|
||||
@ -72,7 +72,7 @@ Description
|
||||
tolerance 1e-8;
|
||||
relTol 0;
|
||||
|
||||
diffusion
|
||||
diffusivity
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
@ -113,8 +113,8 @@ class scalarTransport
|
||||
{
|
||||
public:
|
||||
|
||||
//- Enumeration defining the type of the diffusion
|
||||
enum class diffusionType
|
||||
//- Enumeration defining the type of the diffusivity
|
||||
enum class diffusivityType
|
||||
{
|
||||
none,
|
||||
constant,
|
||||
@ -135,19 +135,19 @@ private:
|
||||
//- Name of density field (optional)
|
||||
word rhoName_;
|
||||
|
||||
//- Diffusion type names
|
||||
static const NamedEnum<diffusionType, 3> diffusionTypeNames_;
|
||||
//- diffusivity type names
|
||||
static const NamedEnum<diffusivityType, 3> diffusivityTypeNames_;
|
||||
|
||||
//- The type of diffusion
|
||||
diffusionType diffusion_;
|
||||
//- The type of diffusivity
|
||||
diffusivityType diffusivity_;
|
||||
|
||||
//- Constant diffusion coefficient (optional)
|
||||
//- Constant diffusivity coefficient (optional)
|
||||
scalar D_;
|
||||
|
||||
//- Laminar diffusion coefficient (optional)
|
||||
//- Laminar diffusivity coefficient (optional)
|
||||
scalar alphal_;
|
||||
|
||||
//- Turbulent diffusion coefficient (optional)
|
||||
//- Turbulent diffusivity coefficient (optional)
|
||||
scalar alphat_;
|
||||
|
||||
//- Number of corrector iterations (optional)
|
||||
|
||||
Reference in New Issue
Block a user