The "<type>Coeffs" sub-dictionary is now optional for most model parameters

except turbulence and lagrangian which will also be updated shortly.

For example in the nonNewtonianIcoFoam offsetCylinder tutorial the viscosity
model coefficients may be specified in the corresponding "<type>Coeffs"
sub-dictionary:

transportModel  CrossPowerLaw;

CrossPowerLawCoeffs
{
    nu0         [0 2 -1 0 0 0 0]  0.01;
    nuInf       [0 2 -1 0 0 0 0]  10;
    m           [0 0 1 0 0 0 0]   0.4;
    n           [0 0 0 0 0 0 0]   3;
}

BirdCarreauCoeffs
{
    nu0         [0 2 -1 0 0 0 0]  1e-06;
    nuInf       [0 2 -1 0 0 0 0]  1e-06;
    k           [0 0 1 0 0 0 0]   0;
    n           [0 0 0 0 0 0 0]   1;
}

which allows a quick change between models, or using the simpler

transportModel  CrossPowerLaw;

nu0         [0 2 -1 0 0 0 0]  0.01;
nuInf       [0 2 -1 0 0 0 0]  10;
m           [0 0 1 0 0 0 0]   0.4;
n           [0 0 0 0 0 0 0]   3;

if quick switching between models is not required.

To support this more convenient parameter specification the inconsistent
specification of seedSampleSet in the streamLine and wallBoundedStreamLine
functionObjects had to be corrected from

    // Seeding method.
    seedSampleSet   uniform;  //cloud; //triSurfaceMeshPointSet;

    uniformCoeffs
    {
        type        uniform;
        axis        x;  //distance;

        // Note: tracks slightly offset so as not to be on a face
        start       (-1.001 -0.05 0.0011);
        end         (-1.001 -0.05 1.0011);
        nPoints     20;
    }

to the simpler

    // Seeding method.
    seedSampleSet
    {
        type        uniform;
        axis        x;  //distance;

        // Note: tracks slightly offset so as not to be on a face
        start       (-1.001 -0.05 0.0011);
        end         (-1.001 -0.05 1.0011);
        nPoints     20;
    }

which also support the "<type>Coeffs" form

    // Seeding method.
    seedSampleSet
    {
        type        uniform;

        uniformCoeffs
        {
            axis        x;  //distance;

            // Note: tracks slightly offset so as not to be on a face
            start       (-1.001 -0.05 0.0011);
            end         (-1.001 -0.05 1.0011);
            nPoints     20;
        }
    }
This commit is contained in:
Henry Weller
2017-04-20 09:14:48 +01:00
parent e2ccbbbbe5
commit 9801c25788
127 changed files with 713 additions and 847 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -79,7 +79,7 @@ Foam::PDRDragModel::~PDRDragModel()
bool Foam::PDRDragModel::read(const dictionary& PDRProperties)
{
PDRDragModelCoeffs_ = PDRProperties.subDict(type() + "Coeffs");
PDRDragModelCoeffs_ = PDRProperties.optionalSubDict(type() + "Coeffs");
PDRDragModelCoeffs_.lookup("drag") >> on_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,7 +67,7 @@ Foam::XiEqModel::~XiEqModel()
bool Foam::XiEqModel::read(const dictionary& XiEqProperties)
{
XiEqModelCoeffs_ = XiEqProperties.subDict(type() + "Coeffs");
XiEqModelCoeffs_ = XiEqProperties.optionalSubDict(type() + "Coeffs");
return true;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,7 +67,7 @@ Foam::XiGModel::~XiGModel()
bool Foam::XiGModel::read(const dictionary& XiGProperties)
{
XiGModelCoeffs_ = XiGProperties.subDict(type() + "Coeffs");
XiGModelCoeffs_ = XiGProperties.optionalSubDict(type() + "Coeffs");
return true;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -85,7 +85,7 @@ Foam::XiModel::~XiModel()
bool Foam::XiModel::read(const dictionary& XiProperties)
{
XiModelCoeffs_ = XiProperties.subDict(type() + "Coeffs");
XiModelCoeffs_ = XiProperties.optionalSubDict(type() + "Coeffs");
return true;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -80,7 +80,7 @@ Foam::laminarFlameSpeedModels::SCOPE::SCOPE
dict.lookup("fuelFile")
)
)()
).subDict(typeName + "Coeffs")
).optionalSubDict(typeName + "Coeffs")
),
LFL_(readScalar(coeffsDict_.lookup("lowerFlamabilityLimit"))),
UFL_(readScalar(coeffsDict_.lookup("upperFlamabilityLimit"))),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,7 +56,7 @@ Foam::mixtureViscosityModels::plastic::plastic
)
:
mixtureViscosityModel(name, viscosityProperties, U, phi),
plasticCoeffs_(viscosityProperties.subDict(modelName + "Coeffs")),
plasticCoeffs_(viscosityProperties.optionalSubDict(modelName + "Coeffs")),
plasticViscosityCoeff_
(
"coeff",
@ -117,7 +117,7 @@ bool Foam::mixtureViscosityModels::plastic::read
{
mixtureViscosityModel::read(viscosityProperties);
plasticCoeffs_ = viscosityProperties.subDict(typeName + "Coeffs");
plasticCoeffs_ = viscosityProperties.optionalSubDict(typeName + "Coeffs");
plasticCoeffs_.lookup("k") >> plasticViscosityCoeff_;
plasticCoeffs_.lookup("n") >> plasticViscosityExponent_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -126,7 +126,7 @@ Foam::autoPtr<Foam::relativeVelocityModel> Foam::relativeVelocityModel::New
(
cstrIter()
(
dict.subDict(modelType + "Coeffs"),
dict.optionalSubDict(modelType + "Coeffs"),
mixture
)
);

View File

@ -102,7 +102,7 @@ bool Foam::phaseChangeTwoPhaseMixtures::Kunz::read()
{
if (phaseChangeTwoPhaseMixture::read())
{
phaseChangeTwoPhaseMixtureCoeffs_ = subDict(type() + "Coeffs");
phaseChangeTwoPhaseMixtureCoeffs_ = optionalSubDict(type() + "Coeffs");
phaseChangeTwoPhaseMixtureCoeffs_.lookup("UInf") >> UInf_;
phaseChangeTwoPhaseMixtureCoeffs_.lookup("tInf") >> tInf_;

View File

@ -97,7 +97,7 @@ bool Foam::phaseChangeTwoPhaseMixtures::Merkle::read()
{
if (phaseChangeTwoPhaseMixture::read())
{
phaseChangeTwoPhaseMixtureCoeffs_ = subDict(type() + "Coeffs");
phaseChangeTwoPhaseMixtureCoeffs_ = optionalSubDict(type() + "Coeffs");
phaseChangeTwoPhaseMixtureCoeffs_.lookup("UInf") >> UInf_;
phaseChangeTwoPhaseMixtureCoeffs_.lookup("tInf") >> tInf_;

View File

@ -151,7 +151,7 @@ bool Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::read()
{
if (phaseChangeTwoPhaseMixture::read())
{
phaseChangeTwoPhaseMixtureCoeffs_ = subDict(type() + "Coeffs");
phaseChangeTwoPhaseMixtureCoeffs_ = optionalSubDict(type() + "Coeffs");
phaseChangeTwoPhaseMixtureCoeffs_.lookup("n") >> n_;
phaseChangeTwoPhaseMixtureCoeffs_.lookup("dNuc") >> dNuc_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -43,7 +43,7 @@ Foam::phaseChangeTwoPhaseMixture::phaseChangeTwoPhaseMixture
)
:
incompressibleTwoPhaseMixture(U, phi),
phaseChangeTwoPhaseMixtureCoeffs_(subDict(type + "Coeffs")),
phaseChangeTwoPhaseMixtureCoeffs_(optionalSubDict(type + "Coeffs")),
pSat_("pSat", dimPressure, lookup("pSat"))
{}
@ -77,7 +77,7 @@ bool Foam::phaseChangeTwoPhaseMixture::read()
{
if (incompressibleTwoPhaseMixture::read())
{
phaseChangeTwoPhaseMixtureCoeffs_ = subDict(type() + "Coeffs");
phaseChangeTwoPhaseMixtureCoeffs_ = optionalSubDict(type() + "Coeffs");
lookup("pSat") >> pSat_;
return true;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,7 +56,11 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
<< exit(FatalError);
}
return cstrIter()(dict.subDict(diameterModelType + "Coeffs"), phase);
return cstrIter()
(
dict.optionalSubDict(diameterModelType + "Coeffs"),
phase
);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -61,7 +61,7 @@ void Foam::diameterModel::correct()
bool Foam::diameterModel::read(const dictionary& phaseProperties)
{
diameterProperties_ = phaseProperties.subDict(type() + "Coeffs");
diameterProperties_ = phaseProperties.optionalSubDict(type() + "Coeffs");
return true;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,7 +56,11 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
<< exit(FatalError);
}
return cstrIter()(dict.subDict(diameterModelType + "Coeffs"), phase);
return cstrIter()
(
dict.optionalSubDict(diameterModelType + "Coeffs"),
phase
);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,7 +56,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::HrenyaSinclair
)
:
conductivityModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_)
{}
@ -103,7 +103,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::kappa
bool Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::read()
{
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
L_.readIfPresent(coeffDict_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -57,7 +57,7 @@ JohnsonJackson
)
:
frictionalStressModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_),
eta_("eta", dimless, coeffDict_),
p_("p", dimless, coeffDict_),
@ -130,7 +130,7 @@ Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::nu
bool Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::read()
{
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
Fr_.read(coeffDict_);
eta_.read(coeffDict_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -57,7 +57,7 @@ JohnsonJacksonSchaeffer::JohnsonJacksonSchaeffer
)
:
frictionalStressModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_),
eta_("eta", dimless, coeffDict_),
p_("p", dimless, coeffDict_),
@ -190,7 +190,7 @@ JohnsonJacksonSchaeffer::nu
bool Foam::kineticTheoryModels::frictionalStressModels::
JohnsonJacksonSchaeffer::read()
{
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
Fr_.read(coeffDict_);
eta_.read(coeffDict_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,7 +55,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::Schaeffer
)
:
frictionalStressModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
phi_("phi", dimless, coeffDict_)
{
phi_ *= constant::mathematical::pi/180.0;
@ -178,7 +178,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu
bool Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::read()
{
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
phi_.read(coeffDict_);
phi_ *= constant::mathematical::pi/180.0;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,7 +56,7 @@ Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::HrenyaSinclair
)
:
viscosityModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_)
{}
@ -100,7 +100,7 @@ Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::nu
bool Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::read()
{
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
L_.readIfPresent(coeffDict_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,7 +56,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::HrenyaSinclair
)
:
conductivityModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_)
{}
@ -103,7 +103,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::kappa
bool Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::read()
{
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
L_.readIfPresent(coeffDict_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -57,7 +57,7 @@ JohnsonJackson
)
:
frictionalStressModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_),
eta_("eta", dimless, coeffDict_),
p_("p", dimless, coeffDict_),
@ -130,7 +130,7 @@ Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::nu
bool Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::read()
{
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
Fr_.read(coeffDict_);
eta_.read(coeffDict_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -57,7 +57,7 @@ JohnsonJacksonSchaeffer::JohnsonJacksonSchaeffer
)
:
frictionalStressModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_),
eta_("eta", dimless, coeffDict_),
p_("p", dimless, coeffDict_),
@ -190,7 +190,7 @@ JohnsonJacksonSchaeffer::nu
bool Foam::kineticTheoryModels::frictionalStressModels::
JohnsonJacksonSchaeffer::read()
{
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
Fr_.read(coeffDict_);
eta_.read(coeffDict_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,7 +55,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::Schaeffer
)
:
frictionalStressModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
phi_("phi", dimless, coeffDict_)
{
phi_ *= constant::mathematical::pi/180.0;
@ -178,7 +178,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu
bool Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::read()
{
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
phi_.read(coeffDict_);
phi_ *= constant::mathematical::pi/180.0;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,7 +56,7 @@ Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::HrenyaSinclair
)
:
viscosityModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_)
{}
@ -100,7 +100,7 @@ Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::nu
bool Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::read()
{
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
L_.readIfPresent(coeffDict_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -61,7 +61,7 @@ void Foam::diameterModel::correct()
bool Foam::diameterModel::read(const dictionary& phaseProperties)
{
diameterProperties_ = phaseProperties.subDict(type() + "Coeffs");
diameterProperties_ = phaseProperties.optionalSubDict(type() + "Coeffs");
return true;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,7 +56,11 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
<< exit(FatalError);
}
return cstrIter()(dict.subDict(diameterModelType + "Coeffs"), phase);
return cstrIter()
(
dict.optionalSubDict(diameterModelType + "Coeffs"),
phase
);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -58,7 +58,7 @@ Foam::cellSizeFunction::cellSizeFunction
defaultCellSize
)
),
coeffsDict_(subDict(type + "Coeffs")),
coeffsDict_(optionalSubDict(type + "Coeffs")),
defaultCellSize_(defaultCellSize),
regionIndices_(regionIndices),
sideMode_(),

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 |
-------------------------------------------------------------------------------
License
@ -107,7 +107,7 @@ Foam::automatic::automatic
surface,
defaultCellSize
),
coeffsDict_(cellSizeCalcTypeDict.subDict(typeName + "Coeffs")),
coeffsDict_(cellSizeCalcTypeDict.optionalSubDict(typeName + "Coeffs")),
surfaceName_(surface.searchableSurface::name()),
readCurvature_(Switch(coeffsDict_.lookup("curvature"))),
curvatureFile_(coeffsDict_.lookup("curvatureFile")),

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 |
-------------------------------------------------------------------------------
License
@ -58,10 +58,13 @@ Foam::fieldFromFile::fieldFromFile
surface,
defaultCellSize
),
coeffsDict_(cellSizeCalcTypeDict.subDict(typeName + "Coeffs")),
coeffsDict_(cellSizeCalcTypeDict.optionalSubDict(typeName + "Coeffs")),
fileName_
(
cellSizeCalcTypeDict.subDict(typeName + "Coeffs").lookup("fieldFile")
cellSizeCalcTypeDict.optionalSubDict
(
typeName + "Coeffs"
).lookup("fieldFile")
),
cellSizeMultipleCoeff_
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -46,7 +46,7 @@ Foam::surfaceCellSizeFunction::surfaceCellSizeFunction
:
dictionary(surfaceCellSizeFunctionDict),
surface_(surface),
coeffsDict_(subDict(type + "Coeffs")),
coeffsDict_(optionalSubDict(type + "Coeffs")),
defaultCellSize_(defaultCellSize),
refinementFactor_
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -46,7 +46,7 @@ faceAreaWeightModel::faceAreaWeightModel
)
:
dictionary(relaxationDict),
coeffDict_(subDict(type + "Coeffs"))
coeffDict_(optionalSubDict(type + "Coeffs"))
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,7 +56,7 @@ initialPointsMethod::initialPointsMethod
geometryToConformTo_(geometryToConformTo),
cellShapeControls_(cellShapeControls),
decomposition_(decomposition),
detailsDict_(subDict(type + "Coeffs")),
detailsDict_(optionalSubDict(type + "Coeffs")),
minimumSurfaceDistanceCoeffSqr_
(
sqr

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,7 +48,7 @@ relaxationModel::relaxationModel
:
dictionary(relaxationDict),
runTime_(runTime),
coeffDict_(subDict(type + "Coeffs"))
coeffDict_(optionalSubDict(type + "Coeffs"))
{}

View File

@ -138,7 +138,7 @@ autoPtr<refinementSurfaces> createRefinementSurfaces
const word scsFuncName =
shapeDict.lookup("surfaceCellSizeFunction");
const dictionary& scsDict =
shapeDict.subDict(scsFuncName + "Coeffs");
shapeDict.optionalSubDict(scsFuncName + "Coeffs");
const scalar surfaceCellSize =
readScalar(scsDict.lookup("surfaceCellSizeCoeff"));

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,7 +49,7 @@ Foam::tabulatedWallFunctions::tabulatedWallFunction::tabulatedWallFunction
:
dict_(dict),
mesh_(mesh),
coeffDict_(dict.subDict(name + "Coeffs")),
coeffDict_(dict.optionalSubDict(name + "Coeffs")),
invertedTableName_(dict.lookup("invertedTableName")),
invertedTable_(invertedTableName_, mesh_, dict, true)
{}

View File

@ -19,8 +19,8 @@ lifeTime 10000;
nSubCycle 5;
cloudName particleTracks;
seedSampleSet uniform;
uniformCoeffs
seedSampleSet
{
type uniform;
axis x;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -755,6 +755,24 @@ Foam::dictionary Foam::dictionary::subOrEmptyDict
}
const Foam::dictionary& Foam::dictionary::optionalSubDict
(
const word& keyword
) const
{
const entry* entryPtr = lookupEntryPtr(keyword, false, true);
if (entryPtr)
{
return entryPtr->dict();
}
else
{
return *this;
}
}
Foam::wordList Foam::dictionary::toc() const
{
wordList keys(size());

View File

@ -419,6 +419,10 @@ public:
const bool mustRead = false
) const;
//- Find and return a sub-dictionary if found
// otherwise return this dictionary
const dictionary& optionalSubDict(const word&) const;
//- Return the table of contents
wordList toc() const;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -44,7 +44,7 @@ Foam::reactionRateFlameArea::reactionRateFlameArea
const combustionModel& combModel
)
:
coeffDict_(dict.subDict(modelType + "Coeffs")),
coeffDict_(dict.optionalSubDict(modelType + "Coeffs")),
mesh_(mesh),
combModel_(combModel),
fuel_(dict.lookup("fuel")),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,9 +56,12 @@ Foam::reactionRateFlameAreaModels::relaxation::relaxation
)
:
reactionRateFlameArea(modelType, dict, mesh, combModel),
correlation_(dict.subDict(typeName + "Coeffs").subDict(fuel_)),
C_(readScalar(dict.subDict(typeName + "Coeffs").lookup("C"))),
alpha_(readScalar(dict.subDict(typeName + "Coeffs").lookup("alpha")))
correlation_(dict.optionalSubDict(typeName + "Coeffs").subDict(fuel_)),
C_(readScalar(dict.optionalSubDict(typeName + "Coeffs").lookup("C"))),
alpha_
(
readScalar(dict.optionalSubDict(typeName + "Coeffs").lookup("alpha"))
)
{}
@ -148,7 +151,7 @@ bool Foam::reactionRateFlameAreaModels::relaxation::read
{
if (reactionRateFlameArea::read(dict))
{
coeffDict_ = dict.subDict(typeName + "Coeffs");
coeffDict_ = dict.optionalSubDict(typeName + "Coeffs");
coeffDict_.lookup("C") >> C_;
coeffDict_.lookup("alpha") >> alpha_;
correlation_.read

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -62,7 +62,7 @@ Foam::combustionModel::combustionModel
turbulencePtr_(),
mesh_(mesh),
active_(lookupOrDefault<Switch>("active", true)),
coeffs_(subDict(modelType + "Coeffs")),
coeffs_(optionalSubDict(modelType + "Coeffs")),
modelType_(modelType),
phaseName_(phaseName)
{}
@ -86,7 +86,7 @@ bool Foam::combustionModel::read()
if (regIOobject::read())
{
this->lookup("active") >> active_;
coeffs_ = subDict(modelType_ + "Coeffs");
coeffs_ = optionalSubDict(modelType_ + "Coeffs");
return true;
}
else

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,7 +55,7 @@ Foam::dynamicInkJetFvMesh::dynamicInkJetFvMesh(const IOobject& io)
IOobject::NO_WRITE,
false
)
).subDict(typeName + "Coeffs")
).optionalSubDict(typeName + "Coeffs")
),
amplitude_(readScalar(dynamicMeshCoeffs_.lookup("amplitude"))),
frequency_(readScalar(dynamicMeshCoeffs_.lookup("frequency"))),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -191,7 +191,7 @@ void Foam::dynamicRefineFvMesh::readDict()
IOobject::NO_WRITE,
false
)
).subDict(typeName + "Coeffs")
).optionalSubDict(typeName + "Coeffs")
);
List<Pair<word>> fluxVelocities = List<Pair<word>>
@ -1202,7 +1202,7 @@ bool Foam::dynamicRefineFvMesh::update()
IOobject::NO_WRITE,
false
)
).subDict(typeName + "Coeffs")
).optionalSubDict(typeName + "Coeffs")
);
label refineInterval = readLabel(refineDict.lookup("refineInterval"));

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -44,7 +44,7 @@ Foam::solidBodyMotionFunction::solidBodyMotionFunction
:
SBMFCoeffs_
(
SBMFCoeffs.subDict
SBMFCoeffs.optionalSubDict
(
word(SBMFCoeffs.lookup("solidBodyMotionFunction")) + "Coeffs"
)
@ -63,7 +63,7 @@ Foam::solidBodyMotionFunction::~solidBodyMotionFunction()
bool Foam::solidBodyMotionFunction::read(const dictionary& SBMFCoeffs)
{
SBMFCoeffs_ = SBMFCoeffs.subDict(type() + "Coeffs");
SBMFCoeffs_ = SBMFCoeffs.optionalSubDict(type() + "Coeffs");
return true;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -85,7 +85,7 @@ Foam::motionSolver::motionSolver
:
IOdictionary(stealRegistration(dict), dict),
mesh_(mesh),
coeffDict_(dict.subDict(type + "Coeffs"))
coeffDict_(dict.optionalSubDict(type + "Coeffs"))
{}
@ -104,7 +104,7 @@ Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New
const IOdictionary& solverDict
)
{
const word solverTypeName(solverDict.lookup("solver"));
const word solverTypeName(solverDict.lookup("motionSolver"));
Info<< "Selecting motion solver: " << solverTypeName << endl;
@ -227,7 +227,7 @@ bool Foam::motionSolver::read()
{
if (regIOobject::read())
{
coeffDict_ = subDict(type() + "Coeffs");
coeffDict_ = optionalSubDict(type() + "Coeffs");
return true;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -61,7 +61,7 @@ Foam::SRF::SRFModel::SRFModel
mesh_(Urel_.mesh()),
origin_("origin", dimLength, lookup("origin")),
axis_(lookup("axis")),
SRFModelCoeffs_(subDict(type + "Coeffs")),
SRFModelCoeffs_(optionalSubDict(type + "Coeffs")),
omega_(dimensionedVector("omega", dimless/dimTime, Zero))
{
// Normalise the axis
@ -89,7 +89,7 @@ bool Foam::SRF::SRFModel::read()
axis_ /= mag(axis_);
// Re-read sub-model coeffs
SRFModelCoeffs_ = subDict(type() + "Coeffs");
SRFModelCoeffs_ = optionalSubDict(type() + "Coeffs");
return true;
}

View File

@ -52,12 +52,7 @@ Foam::fv::option::option
modelType_(modelType),
mesh_(mesh),
dict_(dict),
coeffs_
(
dict.found(modelType + "Coeffs")
? dict.subDict(modelType + "Coeffs")
: dict
),
coeffs_(dict.optionalSubDict(modelType + "Coeffs")),
active_(dict_.lookupOrDefault<Switch>("active", true)),
fieldNames_(),
applied_()

View File

@ -54,14 +54,7 @@ bool Foam::fv::option::read(const dictionary& dict)
{
dict.readIfPresent("active", active_);
if (dict.found(modelType_ + "Coeffs"))
{
coeffs_ = dict.subDict(modelType_ + "Coeffs");
}
else
{
coeffs_ = dict;
}
coeffs_ = dict.optionalSubDict(modelType_ + "Coeffs");
return true;
}

View File

@ -97,12 +97,7 @@ Foam::porosityModel::porosityModel
name_(name),
mesh_(mesh),
dict_(dict),
coeffs_
(
dict.found(modelType + "Coeffs")
? dict.subDict(modelType + "Coeffs")
: dict
),
coeffs_(dict.optionalSubDict(modelType + "Coeffs")),
active_(true),
zoneName_(cellZoneName),
cellZoneIDs_(),
@ -234,14 +229,7 @@ bool Foam::porosityModel::read(const dictionary& dict)
{
dict.readIfPresent("active", active_);
if (dict.found(type() + "Coeffs"))
{
coeffs_ = dict.subDict(type() + "Coeffs");
}
else
{
coeffs_ = dict;
}
coeffs_ = dict.optionalSubDict(type() + "Coeffs");
dict.lookup("cellZone") >> zoneName_;
cellZoneIDs_ = mesh_.cellZones().findIndices(zoneName_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,7 +56,7 @@ Foam::patchDistMethods::advectionDiffusion::advectionDiffusion
)
:
patchDistMethod(mesh, patchIDs),
coeffs_(dict.subDict(type() + "Coeffs")),
coeffs_(dict.optionalSubDict(type() + "Coeffs")),
pdmPredictor_
(
patchDistMethod::New

View File

@ -372,19 +372,17 @@ bool Foam::functionObjects::streamLine::read(const dictionary& dict)
);
cloudName_ = dict.lookupOrDefault<word>("cloudName", "streamLine");
dict.lookup("seedSampleSet") >> seedSet_;
meshSearchPtr_.reset(new meshSearch(mesh_));
const dictionary& coeffsDict = dict.subDict(seedSet_ + "Coeffs");
sampledSetPtr_ = sampledSet::New
(
seedSet_,
"seedSampleSet",
mesh_,
meshSearchPtr_(),
coeffsDict
dict.subDict("seedSampleSet")
);
coeffsDict.lookup("axis") >> sampledSetAxis_;
sampledSetAxis_ = sampledSetPtr_->axis();
scalarFormatterPtr_ = writer<scalar>::New(dict.lookup("setFormat"));
vectorFormatterPtr_ = writer<vector>::New(dict.lookup("setFormat"));

View File

@ -55,8 +55,7 @@ Description
nSubCycle 5;
cloudName particleTracks;
seedSampleSet uniform;
uniformCoeffs
seedSampleSet
{
type uniform;
axis x; //distance;
@ -81,7 +80,7 @@ Usage
seedSampleSet| Seeding method (see below)| yes |
\endtable
Where \c seedSampleSet is typically one of
Where \c seedSampleSet \c type is typically one of
\plaintable
uniform | uniform particle seeding
cloud | cloud of points

View File

@ -469,18 +469,15 @@ bool Foam::functionObjects::wallBoundedStreamLine::read(const dictionary& dict)
"cloudName",
"wallBoundedStreamLine"
);
dict.lookup("seedSampleSet") >> seedSet_;
const dictionary& coeffsDict = dict.subDict(seedSet_ + "Coeffs");
sampledSetPtr_ = sampledSet::New
(
seedSet_,
"seedSampleSet",
mesh_,
meshSearchMeshObject::New(mesh_),
coeffsDict
dict.subDict("seedSampleSet")
);
coeffsDict.lookup("axis") >> sampledSetAxis_;
sampledSetAxis_ = sampledSetPtr_->axis();
scalarFormatterPtr_ = writer<scalar>::New(dict.lookup("setFormat"));
vectorFormatterPtr_ = writer<vector>::New(dict.lookup("setFormat"));

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,8 +56,7 @@ Description
nSubCycle 5;
cloudName particleTracks;
seedSampleSet patchSeed;
patchSeedCoeffs
seedSampleSet
{
type patchSeed;
patches (wall);
@ -81,7 +80,7 @@ Usage
seedSampleSet| Seeding method (see below)| yes |
\endtable
Where \c seedSampleSet is typically one of
Where \c seedSampleSet \c type is typically one of
\plaintable
uniform | uniform particle seeding
cloud | cloud of points

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -57,7 +57,7 @@ Foam::displacementSBRStressFvMotionSolver::displacementSBRStressFvMotionSolver
const IOdictionary& dict
)
:
displacementMotionSolver(mesh, dict, dict.lookup("solver")),
displacementMotionSolver(mesh, dict, typeName),
fvMotionSolver(mesh),
cellDisplacement_
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -60,7 +60,7 @@ Foam::trimModel::~trimModel()
void Foam::trimModel::read(const dictionary& dict)
{
coeffs_ = dict.subDict(name_ + "Coeffs");
coeffs_ = dict.optionalSubDict(name_ + "Coeffs");
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -44,7 +44,7 @@ Foam::extrudeModel::extrudeModel
nLayers_(dict.lookupOrDefault<label>("nLayers", 1)),
expansionRatio_(dict.lookupOrDefault<scalar>("expansionRatio", 1)),
dict_(dict),
coeffDict_(dict.subDict(modelType + "Coeffs"))
coeffDict_(dict.optionalSubDict(modelType + "Coeffs"))
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -77,7 +77,7 @@ Foam::displacementMeshMoverMotionSolver::meshMover() const
meshMoverPtr_ = externalDisplacementMeshMover::New
(
moverType,
coeffDict().subDict(moverType + "Coeffs"),
coeffDict().optionalSubDict(moverType + "Coeffs"),
localPointRegion::findDuplicateFacePairs(mesh()),
pointDisplacement_
);
@ -108,7 +108,7 @@ void Foam::displacementMeshMoverMotionSolver::solve()
labelList checkFaces(identity(mesh().nFaces()));
meshMover().move
(
coeffDict().subDict(meshMover().type() + "Coeffs"),
coeffDict().optionalSubDict(meshMover().type() + "Coeffs"),
nAllowableErrors,
checkFaces
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -41,7 +41,6 @@ Foam::decompositionConstraint::decompositionConstraint
const word& type
)
:
//coeffDict_(constraintsDict.subOrEmptyDict(type + "Coeffs"))
coeffDict_(constraintsDict)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -34,7 +34,7 @@ Foam::geomDecomp::geomDecomp
)
:
decompositionMethod(decompositionDict),
geomDecomDict_(decompositionDict.subDict(derivedType + "Coeffs")),
geomDecomDict_(decompositionDict.optionalSubDict(derivedType + "Coeffs")),
n_(geomDecomDict_.lookup("n")),
delta_(readScalar(geomDecomDict_.lookup("delta"))),
rotDelta_(I)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,8 +53,10 @@ Foam::manualDecomp::manualDecomp(const dictionary& decompositionDict)
decompositionMethod(decompositionDict),
decompDataFile_
(
decompositionDict.subDict(word(decompositionDict.lookup("method"))
+ "Coeffs").lookup("dataFile")
decompositionDict.optionalSubDict
(
word(decompositionDict.lookup("method")) + "Coeffs"
).lookup("dataFile")
)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -243,7 +243,7 @@ void Foam::multiLevelDecomp::decompose
// Retrieve original level0 dictionary and modify number of domains
dictionary::const_iterator iter =
decompositionDict_.subDict(typeName + "Coeffs").begin();
decompositionDict_.optionalSubDict(typeName + "Coeffs").begin();
dictionary myDict = iter().dict();
myDict.set("numberOfSubdomains", nTotal);
@ -330,7 +330,7 @@ void Foam::multiLevelDecomp::decompose
Foam::multiLevelDecomp::multiLevelDecomp(const dictionary& decompositionDict)
:
decompositionMethod(decompositionDict),
methodsDict_(decompositionDict_.subDict(typeName + "Coeffs"))
methodsDict_(decompositionDict_.optionalSubDict(typeName + "Coeffs"))
{
methods_.setSize(methodsDict_.size());
label i = 0;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,7 +49,7 @@ namespace Foam
Foam::structuredDecomp::structuredDecomp(const dictionary& decompositionDict)
:
decompositionMethod(decompositionDict),
methodDict_(decompositionDict_.subDict(typeName + "Coeffs")),
methodDict_(decompositionDict_.optionalSubDict(typeName + "Coeffs")),
patches_(methodDict_.lookup("patches"))
{
methodDict_.set("numberOfSubdomains", nDomains());

View File

@ -94,7 +94,7 @@ void liquidFilmThermo::initLiquid(const dictionary& dict)
ownLiquid_ = true;
liquidPtr_ =
liquidProperties::New(dict.subDict(name_ + "Coeffs")).ptr();
liquidProperties::New(dict.optionalSubDict(name_ + "Coeffs")).ptr();
}
}

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 |
-------------------------------------------------------------------------------
License
@ -92,9 +92,10 @@ Foam::SloanRenumber::SloanRenumber(const dictionary& renumberDict)
renumberMethod(renumberDict),
reverse_
(
renumberDict.found(typeName + "Coeffs")
? Switch(renumberDict.subDict(typeName + "Coeffs").lookup("reverse"))
: Switch(false)
renumberDict.optionalSubDict
(
typeName + "Coeffs"
).lookupOrDefault<Switch>("reverse", false)
)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,9 +50,10 @@ Foam::CuthillMcKeeRenumber::CuthillMcKeeRenumber(const dictionary& renumberDict)
renumberMethod(renumberDict),
reverse_
(
renumberDict.found(typeName + "Coeffs")
? Switch(renumberDict.subDict(typeName + "Coeffs").lookup("reverse"))
: Switch(false)
renumberDict.optionalSubDict
(
typeName + "Coeffs"
).lookupOrDefault<Switch>("reverse", false)
)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,7 +50,7 @@ Foam::manualRenumber::manualRenumber(const dictionary& renumberDict)
renumberMethod(renumberDict),
dataFile_
(
renumberDict.subDict(typeName+"Coeffs").lookup("dataFile")
renumberDict.optionalSubDict(typeName+"Coeffs").lookup("dataFile")
)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -47,7 +47,7 @@ namespace Foam
Foam::springRenumber::springRenumber(const dictionary& renumberDict)
:
renumberMethod(renumberDict),
dict_(renumberDict.subDict(typeName+"Coeffs")),
dict_(renumberDict.optionalSubDict(typeName+"Coeffs")),
maxCo_(readScalar(dict_.lookup("maxCo"))),
maxIter_(readLabel(dict_.lookup("maxIter"))),
freezeFraction_(readScalar(dict_.lookup("freezeFraction")))

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 |
-------------------------------------------------------------------------------
License
@ -52,7 +52,7 @@ Foam::structuredRenumber::structuredRenumber
)
:
renumberMethod(renumberDict),
methodDict_(renumberDict.subDict(typeName + "Coeffs")),
methodDict_(renumberDict.optionalSubDict(typeName + "Coeffs")),
patches_(methodDict_.lookup("patches")),
nLayers_(methodDict_.lookupOrDefault<label>("nLayers", labelMax)),
depthFirst_(methodDict_.lookup("depthFirst")),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -261,7 +261,7 @@ static void get_geom_list
Foam::zoltanRenumber::zoltanRenumber(const dictionary& renumberDict)
:
renumberMethod(renumberDict),
coeffsDict_(renumberDict.subDict(typeName+"Coeffs"))
coeffsDict_(renumberDict.optionalSubDict(typeName+"Coeffs"))
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -468,7 +468,7 @@ Foam::autoPtr<Foam::sampledSet> Foam::sampledSet::New
name,
mesh,
searchEngine,
dict
dict.optionalSubDict(sampleType + "Coeffs")
)
);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -54,7 +54,7 @@ Foam::laminarFlameSpeedModels::Gulders::Gulders
:
laminarFlameSpeed(dict, ct),
coeffsDict_(dict.subDict(typeName + "Coeffs").subDict(fuel_)),
coeffsDict_(dict.optionalSubDict(typeName + "Coeffs").subDict(fuel_)),
W_(readScalar(coeffsDict_.lookup("W"))),
eta_(readScalar(coeffsDict_.lookup("eta"))),
xi_(readScalar(coeffsDict_.lookup("xi"))),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,7 +53,7 @@ Foam::laminarFlameSpeedModels::GuldersEGR::GuldersEGR
:
laminarFlameSpeed(dict, ct),
coeffsDict_(dict.subDict(typeName + "Coeffs").subDict(fuel_)),
coeffsDict_(dict.optionalSubDict(typeName + "Coeffs").subDict(fuel_)),
W_(readScalar(coeffsDict_.lookup("W"))),
eta_(readScalar(coeffsDict_.lookup("eta"))),
xi_(readScalar(coeffsDict_.lookup("xi"))),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,7 +53,7 @@ Foam::laminarFlameSpeedModels::RaviPetersen::RaviPetersen
)
:
laminarFlameSpeed(dict, ct),
coeffsDict_(dict.subDict(typeName + "Coeffs").subDict(fuel_)),
coeffsDict_(dict.optionalSubDict(typeName + "Coeffs").subDict(fuel_)),
pPoints_(coeffsDict_.lookup("pPoints")),
EqRPoints_(coeffsDict_.lookup("EqRPoints")),
alpha_(coeffsDict_.lookup("alpha")),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,7 +53,7 @@ Foam::radiation::binaryAbsorptionEmission::binaryAbsorptionEmission
)
:
absorptionEmissionModel(dict, mesh),
coeffsDict_(dict.subDict(typeName + "Coeffs")),
coeffsDict_(dict.optionalSubDict(typeName + "Coeffs")),
model1_
(
absorptionEmissionModel::New(coeffsDict_.subDict("model1"), mesh)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,7 +53,7 @@ Foam::radiation::constantAbsorptionEmission::constantAbsorptionEmission
)
:
absorptionEmissionModel(dict, mesh),
coeffsDict_(dict.subDict(typeName + "Coeffs")),
coeffsDict_(dict.optionalSubDict(typeName + "Coeffs")),
a_(coeffsDict_.lookup("absorptivity")),
e_(coeffsDict_.lookup("emissivity")),
E_(coeffsDict_.lookup("E"))

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,7 +56,7 @@ Foam::radiation::greyMeanAbsorptionEmission::greyMeanAbsorptionEmission
)
:
absorptionEmissionModel(dict, mesh),
coeffsDict_((dict.subDict(typeName + "Coeffs"))),
coeffsDict_((dict.optionalSubDict(typeName + "Coeffs"))),
speciesNames_(0),
specieIndex_(label(0)),
lookUpTablePtr_(),
@ -73,7 +73,7 @@ Foam::radiation::greyMeanAbsorptionEmission::greyMeanAbsorptionEmission
label nFunc = 0;
const dictionary& functionDicts = dict.subDict(typeName + "Coeffs");
const dictionary& functionDicts = dict.optionalSubDict(typeName + "Coeffs");
forAllConstIter(dictionary, functionDicts, iter)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -90,7 +90,7 @@ greyMeanSolidAbsorptionEmission
)
:
absorptionEmissionModel(dict, mesh),
coeffsDict_((dict.subDict(typeName + "Coeffs"))),
coeffsDict_((dict.optionalSubDict(typeName + "Coeffs"))),
thermo_(mesh.lookupObject<solidThermo>(basicThermo::dictName)),
speciesNames_(0),
mixture_(dynamic_cast<const basicSpecieMixture&>(thermo_)),
@ -104,7 +104,7 @@ greyMeanSolidAbsorptionEmission
}
label nFunc = 0;
const dictionary& functionDicts = dict.subDict(typeName + "Coeffs");
const dictionary& functionDicts = dict.optionalSubDict(typeName + "Coeffs");
forAllConstIter(dictionary, functionDicts, iter)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,7 +53,7 @@ Foam::radiation::wideBandAbsorptionEmission::wideBandAbsorptionEmission
)
:
absorptionEmissionModel(dict, mesh),
coeffsDict_((dict.subDict(typeName + "Coeffs"))),
coeffsDict_((dict.optionalSubDict(typeName + "Coeffs"))),
speciesNames_(0),
specieIndex_(label(0)),
lookUpTable_
@ -67,7 +67,7 @@ Foam::radiation::wideBandAbsorptionEmission::wideBandAbsorptionEmission
totalWaveLength_(0)
{
label nBand = 0;
const dictionary& functionDicts = dict.subDict(typeName +"Coeffs");
const dictionary& functionDicts = dict.optionalSubDict(typeName +"Coeffs");
forAllConstIter(dictionary, functionDicts, iter)
{
// safety:

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,7 +53,7 @@ Foam::radiation::constantScatter::constantScatter
)
:
scatterModel(dict, mesh),
coeffsDict_(dict.subDict(typeName + "Coeffs")),
coeffsDict_(dict.optionalSubDict(typeName + "Coeffs")),
sigma_(coeffsDict_.lookup("sigma")),
C_(coeffsDict_.lookup("C"))
{}

View File

@ -148,7 +148,10 @@ Foam::autoPtr<Foam::liquidProperties> Foam::liquidProperties::New
return autoPtr<liquidProperties>
(
cstrIter()(dict.subDict(liquidPropertiesTypeName + "Coeffs"))
cstrIter()
(
dict.optionalSubDict(liquidPropertiesTypeName + "Coeffs")
)
);
}
}

View File

@ -78,7 +78,7 @@ Foam::autoPtr<Foam::solidProperties> Foam::solidProperties::New
{
return autoPtr<solidProperties>
(
new solidProperties(dict.subDict(solidType + "Coeffs"))
new solidProperties(dict.optionalSubDict(solidType + "Coeffs"))
);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -277,7 +277,7 @@ Foam::linearValveFvMesh::linearValveFvMesh(const IOobject& io)
IOobject::NO_WRITE,
false
)
).subDict(typeName + "Coeffs")
).optionalSubDict(typeName + "Coeffs")
),
msPtr_(motionSolver::New(*this))
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -356,7 +356,7 @@ Foam::linearValveLayersFvMesh::linearValveLayersFvMesh(const IOobject& io)
IOobject::NO_WRITE,
false
)
).subDict(typeName + "Coeffs")
).optionalSubDict(typeName + "Coeffs")
)
{
addZonesAndModifiers();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -293,7 +293,7 @@ Foam::mixerFvMesh::mixerFvMesh
IOobject::NO_WRITE,
false
)
).subDict(typeName + "Coeffs")
).optionalSubDict(typeName + "Coeffs")
),
csPtr_
(

View File

@ -263,7 +263,7 @@ Foam::movingConeTopoFvMesh::movingConeTopoFvMesh(const IOobject& io)
IOobject::NO_WRITE,
false
)
).subDict(typeName + "Coeffs")
).optionalSubDict(typeName + "Coeffs")
),
motionVelAmplitude_(motionDict_.lookup("motionVelAmplitude")),
motionVelPeriod_(readScalar(motionDict_.lookup("motionVelPeriod"))),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,7 +67,10 @@ Foam::viscosityModels::BirdCarreau::BirdCarreau
)
:
viscosityModel(name, viscosityProperties, U, phi),
BirdCarreauCoeffs_(viscosityProperties.subDict(typeName + "Coeffs")),
BirdCarreauCoeffs_
(
viscosityProperties.optionalSubDict(typeName + "Coeffs")
),
nu0_("nu0", dimViscosity, BirdCarreauCoeffs_),
nuInf_("nuInf", dimViscosity, BirdCarreauCoeffs_),
k_("k", dimTime, BirdCarreauCoeffs_),
@ -104,7 +107,8 @@ bool Foam::viscosityModels::BirdCarreau::read
{
viscosityModel::read(viscosityProperties);
BirdCarreauCoeffs_ = viscosityProperties.subDict(typeName + "Coeffs");
BirdCarreauCoeffs_ =
viscosityProperties.optionalSubDict(typeName + "Coeffs");
BirdCarreauCoeffs_.lookup("nu0") >> nu0_;
BirdCarreauCoeffs_.lookup("nuInf") >> nuInf_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -83,7 +83,7 @@ Foam::viscosityModels::Casson::Casson
)
:
viscosityModel(name, viscosityProperties, U, phi),
CassonCoeffs_(viscosityProperties.subDict(typeName + "Coeffs")),
CassonCoeffs_(viscosityProperties.optionalSubDict(typeName + "Coeffs")),
m_("m", dimViscosity, CassonCoeffs_),
tau0_("tau0", dimViscosity/dimTime, CassonCoeffs_),
nuMin_("nuMin", dimViscosity, CassonCoeffs_),
@ -112,7 +112,7 @@ bool Foam::viscosityModels::Casson::read
{
viscosityModel::read(viscosityProperties);
CassonCoeffs_ = viscosityProperties.subDict(typeName + "Coeffs");
CassonCoeffs_ = viscosityProperties.optionalSubDict(typeName + "Coeffs");
CassonCoeffs_.lookup("m") >> m_;
CassonCoeffs_.lookup("tau0") >> tau0_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -65,7 +65,10 @@ Foam::viscosityModels::CrossPowerLaw::CrossPowerLaw
)
:
viscosityModel(name, viscosityProperties, U, phi),
CrossPowerLawCoeffs_(viscosityProperties.subDict(typeName + "Coeffs")),
CrossPowerLawCoeffs_
(
viscosityProperties.optionalSubDict(typeName + "Coeffs")
),
nu0_("nu0", dimViscosity, CrossPowerLawCoeffs_),
nuInf_("nuInf", dimViscosity, CrossPowerLawCoeffs_),
m_("m", dimTime, CrossPowerLawCoeffs_),
@ -94,7 +97,8 @@ bool Foam::viscosityModels::CrossPowerLaw::read
{
viscosityModel::read(viscosityProperties);
CrossPowerLawCoeffs_ = viscosityProperties.subDict(typeName + "Coeffs");
CrossPowerLawCoeffs_ =
viscosityProperties.optionalSubDict(typeName + "Coeffs");
CrossPowerLawCoeffs_.lookup("nu0") >> nu0_;
CrossPowerLawCoeffs_.lookup("nuInf") >> nuInf_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -78,7 +78,10 @@ Foam::viscosityModels::HerschelBulkley::HerschelBulkley
)
:
viscosityModel(name, viscosityProperties, U, phi),
HerschelBulkleyCoeffs_(viscosityProperties.subDict(typeName + "Coeffs")),
HerschelBulkleyCoeffs_
(
viscosityProperties.optionalSubDict(typeName + "Coeffs")
),
k_("k", dimViscosity, HerschelBulkleyCoeffs_),
n_("n", dimless, HerschelBulkleyCoeffs_),
tau0_("tau0", dimViscosity/dimTime, HerschelBulkleyCoeffs_),
@ -107,7 +110,8 @@ bool Foam::viscosityModels::HerschelBulkley::read
{
viscosityModel::read(viscosityProperties);
HerschelBulkleyCoeffs_ = viscosityProperties.subDict(typeName + "Coeffs");
HerschelBulkleyCoeffs_ =
viscosityProperties.optionalSubDict(typeName + "Coeffs");
HerschelBulkleyCoeffs_.lookup("k") >> k_;
HerschelBulkleyCoeffs_.lookup("n") >> n_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -81,7 +81,7 @@ Foam::viscosityModels::powerLaw::powerLaw
)
:
viscosityModel(name, viscosityProperties, U, phi),
powerLawCoeffs_(viscosityProperties.subDict(typeName + "Coeffs")),
powerLawCoeffs_(viscosityProperties.optionalSubDict(typeName + "Coeffs")),
k_("k", dimViscosity, powerLawCoeffs_),
n_("n", dimless, powerLawCoeffs_),
nuMin_("nuMin", dimViscosity, powerLawCoeffs_),
@ -110,7 +110,7 @@ bool Foam::viscosityModels::powerLaw::read
{
viscosityModel::read(viscosityProperties);
powerLawCoeffs_ = viscosityProperties.subDict(typeName + "Coeffs");
powerLawCoeffs_ = viscosityProperties.optionalSubDict(typeName + "Coeffs");
powerLawCoeffs_.lookup("k") >> k_;
powerLawCoeffs_.lookup("n") >> n_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,7 +56,10 @@ Foam::viscosityModels::strainRateFunction::strainRateFunction
)
:
viscosityModel(name, viscosityProperties, U, phi),
strainRateFunctionCoeffs_(viscosityProperties.subDict(typeName + "Coeffs")),
strainRateFunctionCoeffs_
(
viscosityProperties.optionalSubDict(typeName + "Coeffs")
),
strainRateFunction_
(
Function1<scalar>::New("function", strainRateFunctionCoeffs_)
@ -119,7 +122,7 @@ bool Foam::viscosityModels::strainRateFunction::read
{
viscosityModel::read(viscosityProperties);
strainRateFunctionCoeffs_ = viscosityProperties.subDict
strainRateFunctionCoeffs_ = viscosityProperties.optionalSubDict
(
typeName + "Coeffs"
);

View File

@ -16,10 +16,6 @@ FoamFile
dynamicFvMesh dynamicRefineFvMesh;
dynamicRefineFvMeshCoeffs
{
// Refine every refineInterval timesteps
refineInterval 1;
@ -53,6 +49,5 @@ dynamicRefineFvMeshCoeffs
// First is name of the flux to adapt, second is velocity that will
// be interpolated and inner-producted with the face area vector.
correctFluxes ((phi rhoU) (phi_0 none));
}
// ************************************************************************* //

View File

@ -19,13 +19,10 @@ dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libfvMotionSolvers.so");
solver velocityComponentLaplacian;
motionSolver velocityComponentLaplacian;
velocityComponentLaplacianCoeffs
{
component x;
diffusivity directional (1 200 0);
}
// ************************************************************************* //

View File

@ -19,19 +19,14 @@ FoamFile
dynamicFvMesh dynamicMotionSolverFvMesh;
solver solidBody;
motionSolver solidBody;
solidBodyCoeffs
{
cellZone rotatingZone;
solidBodyMotionFunction rotatingMotion;
rotatingMotionCoeffs
{
origin (0 0 0);
axis (0 0 1);
omega $:meshMotionProperties.omega;
}
}
// ************************************************************************* //

View File

@ -19,13 +19,10 @@ dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libfvMotionSolvers.so");
solver velocityComponentLaplacian;
motionSolver velocityComponentLaplacian;
velocityComponentLaplacianCoeffs
{
component x;
diffusivity directional (1 200 0);
}
// ************************************************************************* //

View File

@ -17,19 +17,14 @@ FoamFile
dynamicFvMesh dynamicMotionSolverFvMesh;
solver solidBody;
motionSolver solidBody;
solidBodyCoeffs
{
cellZone rotor;
solidBodyMotionFunction rotatingMotion;
rotatingMotionCoeffs
{
origin (0 0 0);
axis (0 0 1);
omega 6.2832; // rad/s
}
}
// ************************************************************************* //

View File

@ -19,13 +19,10 @@ dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libfvMotionSolvers.so");
solver velocityComponentLaplacian;
motionSolver velocityComponentLaplacian;
velocityComponentLaplacianCoeffs
{
component x;
diffusivity directional (1 200 0);
}
// ************************************************************************* //

View File

@ -19,20 +19,14 @@ dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libfvMotionSolvers.so");
solver solidBody;
motionSolver solidBody;
solidBodyCoeffs
{
cellZone inletChannel;
solidBodyMotionFunction oscillatingLinearMotion;
oscillatingLinearMotionCoeffs
{
amplitude (0 0.5 0);
omega 3.14; // rad/s (.5 rps)
}
}
// ************************************************************************* //

View File

@ -19,20 +19,14 @@ dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libfvMotionSolvers.so");
solver solidBody;
motionSolver solidBody;
solidBodyCoeffs
{
cellZone innerCylinderSmall;
solidBodyMotionFunction rotatingMotion;
rotatingMotionCoeffs
{
origin (0 0 0);
axis (0 1 0);
omega 158; // rad/s
}
}
// ************************************************************************* //

Some files were not shown because too many files have changed in this diff Show More