MRG: Integrated Foundation code to commit 7d6845d

This commit is contained in:
Andrew Heather
2017-03-23 14:33:33 +00:00
595 changed files with 7175 additions and 11727 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -139,7 +139,11 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::scalarTransport::D
return tmp<volScalarField>
(
new volScalarField(Dname, model.nuEff())
new volScalarField
(
Dname,
alphaD_*model.nu() + alphaDt_*model.nut()
)
);
}
else if (foundObject<cmpModel>(turbulenceModel::propertiesName))
@ -151,7 +155,11 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::scalarTransport::D
return tmp<volScalarField>
(
new volScalarField(Dname, model.muEff())
new volScalarField
(
Dname,
alphaD_*model.mu() + alphaDt_*model.mut()
)
);
}
else
@ -236,6 +244,8 @@ bool Foam::functionObjects::scalarTransport::read(const dictionary& dict)
schemesField_ = dict.lookupOrDefault("schemesField", fieldName_);
constantD_ = dict.readIfPresent("D", D_);
alphaD_ = dict.lookupOrDefault("alphaD", 1.0);
alphaDt_ = dict.lookupOrDefault("alphaDt", 1.0);
dict.readIfPresent("nCorr", nCorr_);
dict.readIfPresent("resetOnStartUp", resetOnStartUp_);
@ -358,7 +368,7 @@ bool Foam::functionObjects::scalarTransport::execute()
FatalErrorInFunction
<< "Incompatible dimensions for phi: " << phi.dimensions() << nl
<< "Dimensions should be " << dimMass/dimTime << " or "
<< dimVolume/dimTime << endl;
<< dimVolume/dimTime << exit(FatalError);
}
Log << endl;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -30,18 +30,24 @@ Group
Description
Evolves a passive scalar transport equation.
- To specify the field name set the 'field' entry
- To specify the field name set the \c field entry
- To employ the same numerical schemes as another field set
the 'schemesField' entry,
the \c schemesField entry,
- The diffusivity can be set manually using the 'D' entry, retrieved
from the turbulence model or specified nut
- Alternatively if a turbulence model is available a turbulent diffusivity
may be constructed from the laminar and turbulent viscosities using the
optional diffusivity coefficients \c alphaD and \c alphaDt (which default
to 1):
\verbatim
D = alphaD*nu + alphaDt*nut
\endverbatim
- To specify a transport quantity within a phase enter phase.
- bounded01 bounds the transported scalar within 0 and 1.
Usage
Example of function object specification to solve a scalar transport
equation:
\verbatim
functions
{
scalar1
@ -181,6 +187,12 @@ class scalarTransport
//- Flag to indicate whether a constant, uniform D_ is specified
bool constantD_;
//- Laminar diffusion coefficient (optional)
scalar alphaD_;
//- Turbulent diffusion coefficient (optional)
scalar alphaDt_;
//- Number of corrector iterations (optional)
label nCorr_;