turbulenceModels/laminar::Maxwell: Updated handling of single mode

A single mode may now be specified either with the 'modes' list containing a
single entry:

        // Example 1-mode specification
        modes
        (
            {
                lambda          0.01;
            }
        );

or by specifying the 'lambda' entry without 'modes'

        // Single mode coefficient
        lambda          0.03;

If both are provided the 'modes' entry will be used and a warning about the
unused 'lambda' entry printed.
This commit is contained in:
Henry Weller
2020-03-12 08:21:12 +00:00
parent a7eb350536
commit 57f924feef

View File

@ -46,12 +46,12 @@ Maxwell<BasicTurbulenceModel>::readModeCoefficients
{
PtrList<dimensionedScalar> modeCoeffs(nModes_);
if (nModes_ > 1)
if (modeCoefficients_.size())
{
if (this->coeffDict().found(name))
{
IOWarningInFunction(this->coeffDict())
<< "For multi-mode entry '" << name << "' will be ignored."
<< "Using 'modes' list, '" << name << "' entry will be ignored."
<< endl;
}
@ -71,12 +71,6 @@ Maxwell<BasicTurbulenceModel>::readModeCoefficients
}
else
{
if (modeCoefficients_.size() == 1)
{
IOWarningInFunction(this->coeffDict())
<< "For single mode 'modes' entry will be ignored." << endl;
}
modeCoeffs.set
(
0,