mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
turbulenceModels: The "<type>Coeffs" sub-dictionary is now optional
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,7 +32,7 @@ void Foam::LESModel<BasicTurbulenceModel>::printCoeffs(const word& type)
|
|||||||
{
|
{
|
||||||
if (printCoeffs_)
|
if (printCoeffs_)
|
||||||
{
|
{
|
||||||
Info<< type << "Coeffs" << coeffDict_ << endl;
|
Info<< coeffDict_.dictName() << coeffDict_ << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ Foam::LESModel<BasicTurbulenceModel>::LESModel
|
|||||||
LESDict_(this->subOrEmptyDict("LES")),
|
LESDict_(this->subOrEmptyDict("LES")),
|
||||||
turbulence_(LESDict_.lookup("turbulence")),
|
turbulence_(LESDict_.lookup("turbulence")),
|
||||||
printCoeffs_(LESDict_.lookupOrDefault<Switch>("printCoeffs", false)),
|
printCoeffs_(LESDict_.lookupOrDefault<Switch>("printCoeffs", false)),
|
||||||
coeffDict_(LESDict_.subOrEmptyDict(type + "Coeffs")),
|
coeffDict_(LESDict_.optionalSubDict(type + "Coeffs")),
|
||||||
|
|
||||||
kMin_
|
kMin_
|
||||||
(
|
(
|
||||||
@ -183,10 +183,7 @@ bool Foam::LESModel<BasicTurbulenceModel>::read()
|
|||||||
LESDict_ <<= this->subDict("LES");
|
LESDict_ <<= this->subDict("LES");
|
||||||
LESDict_.lookup("turbulence") >> turbulence_;
|
LESDict_.lookup("turbulence") >> turbulence_;
|
||||||
|
|
||||||
if (const dictionary* dictPtr = LESDict_.subDictPtr(type() + "Coeffs"))
|
coeffDict_ <<= LESDict_.optionalSubDict(type() + "Coeffs");
|
||||||
{
|
|
||||||
coeffDict_ <<= *dictPtr;
|
|
||||||
}
|
|
||||||
|
|
||||||
delta_().read(LESDict_);
|
delta_().read(LESDict_);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -148,7 +148,11 @@ Foam::LESModels::IDDESDelta::IDDESDelta
|
|||||||
),
|
),
|
||||||
Cw_
|
Cw_
|
||||||
(
|
(
|
||||||
dict.subDict(type() + "Coeffs").lookupOrDefault<scalar>("Cw", 0.15)
|
dict.optionalSubDict(type() + "Coeffs").lookupOrDefault<scalar>
|
||||||
|
(
|
||||||
|
"Cw",
|
||||||
|
0.15
|
||||||
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
calcDelta();
|
calcDelta();
|
||||||
@ -159,7 +163,7 @@ Foam::LESModels::IDDESDelta::IDDESDelta
|
|||||||
|
|
||||||
void Foam::LESModels::IDDESDelta::read(const dictionary& dict)
|
void Foam::LESModels::IDDESDelta::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
const dictionary& coeffsDict(dict.subDict(type() + "Coeffs"));
|
const dictionary& coeffsDict(dict.optionalSubDict(type() + "Coeffs"));
|
||||||
|
|
||||||
coeffsDict.readIfPresent<scalar>("Cw", Cw_);
|
coeffsDict.readIfPresent<scalar>("Cw", Cw_);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -67,13 +67,17 @@ Foam::LESModels::PrandtlDelta::PrandtlDelta
|
|||||||
(
|
(
|
||||||
name,
|
name,
|
||||||
turbulence,
|
turbulence,
|
||||||
dict.subDict(type() + "Coeffs")
|
dict.optionalSubDict(type() + "Coeffs")
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
||||||
Cdelta_
|
Cdelta_
|
||||||
(
|
(
|
||||||
dict.subDict(type() + "Coeffs").lookupOrDefault<scalar>("Cdelta", 0.158)
|
dict.optionalSubDict(type() + "Coeffs").lookupOrDefault<scalar>
|
||||||
|
(
|
||||||
|
"Cdelta",
|
||||||
|
0.158
|
||||||
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
calcDelta();
|
calcDelta();
|
||||||
@ -84,7 +88,7 @@ Foam::LESModels::PrandtlDelta::PrandtlDelta
|
|||||||
|
|
||||||
void Foam::LESModels::PrandtlDelta::read(const dictionary& dict)
|
void Foam::LESModels::PrandtlDelta::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
const dictionary& coeffDict(dict.subDict(type() + "Coeffs"));
|
const dictionary& coeffDict(dict.optionalSubDict(type() + "Coeffs"));
|
||||||
|
|
||||||
geometricDelta_().read(coeffDict);
|
geometricDelta_().read(coeffDict);
|
||||||
dict.readIfPresent<scalar>("kappa", kappa_);
|
dict.readIfPresent<scalar>("kappa", kappa_);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -91,7 +91,11 @@ Foam::LESModels::cubeRootVolDelta::cubeRootVolDelta
|
|||||||
LESdelta(name, turbulence),
|
LESdelta(name, turbulence),
|
||||||
deltaCoeff_
|
deltaCoeff_
|
||||||
(
|
(
|
||||||
dict.subDict(type() + "Coeffs").lookupOrDefault<scalar>("deltaCoeff", 1)
|
dict.optionalSubDict(type() + "Coeffs").lookupOrDefault<scalar>
|
||||||
|
(
|
||||||
|
"deltaCoeff",
|
||||||
|
1
|
||||||
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
calcDelta();
|
calcDelta();
|
||||||
@ -102,7 +106,7 @@ Foam::LESModels::cubeRootVolDelta::cubeRootVolDelta
|
|||||||
|
|
||||||
void Foam::LESModels::cubeRootVolDelta::read(const dictionary& dict)
|
void Foam::LESModels::cubeRootVolDelta::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
dict.subDict(type() + "Coeffs").readIfPresent<scalar>
|
dict.optionalSubDict(type() + "Coeffs").readIfPresent<scalar>
|
||||||
(
|
(
|
||||||
"deltaCoeff",
|
"deltaCoeff",
|
||||||
deltaCoeff_
|
deltaCoeff_
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -102,7 +102,11 @@ Foam::LESModels::maxDeltaxyz::maxDeltaxyz
|
|||||||
LESdelta(name, turbulence),
|
LESdelta(name, turbulence),
|
||||||
deltaCoeff_
|
deltaCoeff_
|
||||||
(
|
(
|
||||||
dict.subDict(type() + "Coeffs").lookupOrDefault<scalar>("deltaCoeff", 1)
|
dict.optionalSubDict(type() + "Coeffs").lookupOrDefault<scalar>
|
||||||
|
(
|
||||||
|
"deltaCoeff",
|
||||||
|
1
|
||||||
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
calcDelta();
|
calcDelta();
|
||||||
@ -113,7 +117,7 @@ Foam::LESModels::maxDeltaxyz::maxDeltaxyz
|
|||||||
|
|
||||||
void Foam::LESModels::maxDeltaxyz::read(const dictionary& dict)
|
void Foam::LESModels::maxDeltaxyz::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
const dictionary& coeffsDict(dict.subDict(type() + "Coeffs"));
|
const dictionary& coeffsDict(dict.optionalSubDict(type() + "Coeffs"));
|
||||||
|
|
||||||
coeffsDict.readIfPresent<scalar>("deltaCoeff", deltaCoeff_);
|
coeffsDict.readIfPresent<scalar>("deltaCoeff", deltaCoeff_);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -153,12 +153,15 @@ Foam::LESModels::smoothDelta::smoothDelta
|
|||||||
(
|
(
|
||||||
"geometricDelta",
|
"geometricDelta",
|
||||||
turbulence,
|
turbulence,
|
||||||
dict.subDict(type() + "Coeffs")
|
dict.optionalSubDict(type() + "Coeffs")
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
maxDeltaRatio_
|
maxDeltaRatio_
|
||||||
(
|
(
|
||||||
readScalar(dict.subDict(type() + "Coeffs").lookup("maxDeltaRatio"))
|
readScalar
|
||||||
|
(
|
||||||
|
dict.optionalSubDict(type() + "Coeffs").lookup("maxDeltaRatio")
|
||||||
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
calcDelta();
|
calcDelta();
|
||||||
@ -169,7 +172,7 @@ Foam::LESModels::smoothDelta::smoothDelta
|
|||||||
|
|
||||||
void Foam::LESModels::smoothDelta::read(const dictionary& dict)
|
void Foam::LESModels::smoothDelta::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
const dictionary& coeffsDict(dict.subDict(type() + "Coeffs"));
|
const dictionary& coeffsDict(dict.optionalSubDict(type() + "Coeffs"));
|
||||||
|
|
||||||
geometricDelta_().read(coeffsDict);
|
geometricDelta_().read(coeffsDict);
|
||||||
coeffsDict.lookup("maxDeltaRatio") >> maxDeltaRatio_;
|
coeffsDict.lookup("maxDeltaRatio") >> maxDeltaRatio_;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -108,21 +108,29 @@ Foam::LESModels::vanDriestDelta::vanDriestDelta
|
|||||||
(
|
(
|
||||||
IOobject::groupName("geometricDelta", turbulence.U().group()),
|
IOobject::groupName("geometricDelta", turbulence.U().group()),
|
||||||
turbulence,
|
turbulence,
|
||||||
dict.subDict(type() + "Coeffs")
|
dict.optionalSubDict(type() + "Coeffs")
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
||||||
Aplus_
|
Aplus_
|
||||||
(
|
(
|
||||||
dict.subDict(type() + "Coeffs").lookupOrDefault<scalar>("Aplus", 26.0)
|
dict.optionalSubDict(type() + "Coeffs").lookupOrDefault<scalar>
|
||||||
|
(
|
||||||
|
"Aplus",
|
||||||
|
26.0
|
||||||
|
)
|
||||||
),
|
),
|
||||||
Cdelta_
|
Cdelta_
|
||||||
(
|
(
|
||||||
dict.subDict(type() + "Coeffs").lookupOrDefault<scalar>("Cdelta", 0.158)
|
dict.optionalSubDict(type() + "Coeffs").lookupOrDefault<scalar>
|
||||||
|
(
|
||||||
|
"Cdelta",
|
||||||
|
0.158
|
||||||
|
)
|
||||||
),
|
),
|
||||||
calcInterval_
|
calcInterval_
|
||||||
(
|
(
|
||||||
dict.subDict(type() + "Coeffs").lookupOrDefault<label>
|
dict.optionalSubDict(type() + "Coeffs").lookupOrDefault<label>
|
||||||
(
|
(
|
||||||
"calcInterval",
|
"calcInterval",
|
||||||
1
|
1
|
||||||
@ -137,7 +145,7 @@ Foam::LESModels::vanDriestDelta::vanDriestDelta
|
|||||||
|
|
||||||
void Foam::LESModels::vanDriestDelta::read(const dictionary& dict)
|
void Foam::LESModels::vanDriestDelta::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
const dictionary& coeffsDict(dict.subDict(type() + "Coeffs"));
|
const dictionary& coeffsDict(dict.optionalSubDict(type() + "Coeffs"));
|
||||||
|
|
||||||
geometricDelta_().read(coeffsDict);
|
geometricDelta_().read(coeffsDict);
|
||||||
dict.readIfPresent<scalar>("kappa", kappa_);
|
dict.readIfPresent<scalar>("kappa", kappa_);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -84,7 +84,10 @@ Foam::anisotropicFilter::anisotropicFilter
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
LESfilter(mesh),
|
LESfilter(mesh),
|
||||||
widthCoeff_(readScalar(bd.subDict(type() + "Coeffs").lookup("widthCoeff"))),
|
widthCoeff_
|
||||||
|
(
|
||||||
|
readScalar(bd.optionalSubDict(type() + "Coeffs").lookup("widthCoeff"))
|
||||||
|
),
|
||||||
coeff_
|
coeff_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -118,7 +121,7 @@ Foam::anisotropicFilter::anisotropicFilter
|
|||||||
|
|
||||||
void Foam::anisotropicFilter::read(const dictionary& bd)
|
void Foam::anisotropicFilter::read(const dictionary& bd)
|
||||||
{
|
{
|
||||||
bd.subDict(type() + "Coeffs").lookup("widthCoeff") >> widthCoeff_;
|
bd.optionalSubDict(type() + "Coeffs").lookup("widthCoeff") >> widthCoeff_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -64,7 +64,10 @@ Foam::laplaceFilter::laplaceFilter(const fvMesh& mesh, scalar widthCoeff)
|
|||||||
Foam::laplaceFilter::laplaceFilter(const fvMesh& mesh, const dictionary& bd)
|
Foam::laplaceFilter::laplaceFilter(const fvMesh& mesh, const dictionary& bd)
|
||||||
:
|
:
|
||||||
LESfilter(mesh),
|
LESfilter(mesh),
|
||||||
widthCoeff_(readScalar(bd.subDict(type() + "Coeffs").lookup("widthCoeff"))),
|
widthCoeff_
|
||||||
|
(
|
||||||
|
readScalar(bd.optionalSubDict(type() + "Coeffs").lookup("widthCoeff"))
|
||||||
|
),
|
||||||
coeff_
|
coeff_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -86,7 +89,7 @@ Foam::laplaceFilter::laplaceFilter(const fvMesh& mesh, const dictionary& bd)
|
|||||||
|
|
||||||
void Foam::laplaceFilter::read(const dictionary& bd)
|
void Foam::laplaceFilter::read(const dictionary& bd)
|
||||||
{
|
{
|
||||||
bd.subDict(type() + "Coeffs").lookup("widthCoeff") >> widthCoeff_;
|
bd.optionalSubDict(type() + "Coeffs").lookup("widthCoeff") >> widthCoeff_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,7 +32,7 @@ void Foam::RASModel<BasicTurbulenceModel>::printCoeffs(const word& type)
|
|||||||
{
|
{
|
||||||
if (printCoeffs_)
|
if (printCoeffs_)
|
||||||
{
|
{
|
||||||
Info<< type << "Coeffs" << coeffDict_ << endl;
|
Info<< coeffDict_.dictName() << coeffDict_ << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ Foam::RASModel<BasicTurbulenceModel>::RASModel
|
|||||||
RASDict_(this->subOrEmptyDict("RAS")),
|
RASDict_(this->subOrEmptyDict("RAS")),
|
||||||
turbulence_(RASDict_.lookup("turbulence")),
|
turbulence_(RASDict_.lookup("turbulence")),
|
||||||
printCoeffs_(RASDict_.lookupOrDefault<Switch>("printCoeffs", false)),
|
printCoeffs_(RASDict_.lookupOrDefault<Switch>("printCoeffs", false)),
|
||||||
coeffDict_(RASDict_.subOrEmptyDict(type + "Coeffs")),
|
coeffDict_(RASDict_.optionalSubDict(type + "Coeffs")),
|
||||||
|
|
||||||
kMin_
|
kMin_
|
||||||
(
|
(
|
||||||
@ -173,10 +173,7 @@ bool Foam::RASModel<BasicTurbulenceModel>::read()
|
|||||||
RASDict_ <<= this->subDict("RAS");
|
RASDict_ <<= this->subDict("RAS");
|
||||||
RASDict_.lookup("turbulence") >> turbulence_;
|
RASDict_.lookup("turbulence") >> turbulence_;
|
||||||
|
|
||||||
if (const dictionary* dictPtr = RASDict_.subDictPtr(type() + "Coeffs"))
|
coeffDict_ <<= RASDict_.optionalSubDict(type() + "Coeffs");
|
||||||
{
|
|
||||||
coeffDict_ <<= *dictPtr;
|
|
||||||
}
|
|
||||||
|
|
||||||
kMin_.readIfPresent(RASDict_);
|
kMin_.readIfPresent(RASDict_);
|
||||||
epsilonMin_.readIfPresent(RASDict_);
|
epsilonMin_.readIfPresent(RASDict_);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -33,7 +33,7 @@ void Foam::laminarModel<BasicTurbulenceModel>::printCoeffs(const word& type)
|
|||||||
{
|
{
|
||||||
if (printCoeffs_)
|
if (printCoeffs_)
|
||||||
{
|
{
|
||||||
Info<< type << "Coeffs" << coeffDict_ << endl;
|
Info<< coeffDict_.dictName() << coeffDict_ << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ Foam::laminarModel<BasicTurbulenceModel>::laminarModel
|
|||||||
|
|
||||||
laminarDict_(this->subOrEmptyDict("laminar")),
|
laminarDict_(this->subOrEmptyDict("laminar")),
|
||||||
printCoeffs_(laminarDict_.lookupOrDefault<Switch>("printCoeffs", false)),
|
printCoeffs_(laminarDict_.lookupOrDefault<Switch>("printCoeffs", false)),
|
||||||
coeffDict_(laminarDict_.subOrEmptyDict(type + "Coeffs"))
|
coeffDict_(laminarDict_.optionalSubDict(type + "Coeffs"))
|
||||||
{
|
{
|
||||||
// Force the construction of the mesh deltaCoeffs which may be needed
|
// Force the construction of the mesh deltaCoeffs which may be needed
|
||||||
// for the construction of the derived models and BCs
|
// for the construction of the derived models and BCs
|
||||||
@ -170,14 +170,7 @@ bool Foam::laminarModel<BasicTurbulenceModel>::read()
|
|||||||
{
|
{
|
||||||
laminarDict_ <<= this->subDict("laminar");
|
laminarDict_ <<= this->subDict("laminar");
|
||||||
|
|
||||||
if
|
coeffDict_ <<= laminarDict_.optionalSubDict(type() + "Coeffs");
|
||||||
(
|
|
||||||
const dictionary* dictPtr =
|
|
||||||
laminarDict_.subDictPtr(type() + "Coeffs")
|
|
||||||
)
|
|
||||||
{
|
|
||||||
coeffDict_ <<= *dictPtr;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user