mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
minor cleanup of turbulence models
- added constructor dictionary(const dictionary*) that also handles NULL
pointers and makes it convenient to construct from a possibly nonexistent
sub-dictionary:
eg,
dictionary dict2(dict1.subDictPtr("someDict"));
- make some of the turbulence Coeffs sub-dictionary optional.
Their contents are all 'lookupOrAddDefault' anyhow.
- in turbulentMixingLength BCs, skip namespace qualifier in template
(eg, <RASModel> vs. <compressible::RASModel>)
- change comments from 'turbulenceProperties' to RASProperties/LESProperties
- consistency between compressible/incompressible - no separate file for
'New' selector etc
- consistency in accessing the model coefficients.
Use method coeffDict() for const access.
Use protected data member coeffDict_ for read/write access.
- document model coefficients in etc/constant/RASProperties.
Need the same for LESProperties before we can prune these from the
tutorials.
This commit is contained in:
@ -52,10 +52,17 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "dict1.toc(): " << dict1.name() << " " << dict1.toc() << nl
|
||||
<< "dict2.toc(): " << dict2.name() << " " << dict2.toc() << endl;
|
||||
|
||||
|
||||
// copy back
|
||||
dict1 = dict2;
|
||||
Info<< "dict1.toc(): " << dict1.name() << " " << dict1.toc() << endl;
|
||||
|
||||
dictionary dict3(dict2.subDictPtr("boundaryField"));
|
||||
dictionary dict4(dict2.subDictPtr("NONEXISTENT"));
|
||||
|
||||
Info<< "dictionary construct from pointer" << nl
|
||||
<< "ok = " << dict3.name() << " " << dict3.toc() << nl
|
||||
<< "no = " << dict4.name() << " " << dict4.toc() << endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
235
etc/constant/RASProperties
Normal file
235
etc/constant/RASProperties
Normal file
@ -0,0 +1,235 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
note "default coefficients for RAS models";
|
||||
location "constant";
|
||||
object RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
wallFunctionCoeffs
|
||||
{
|
||||
kappa 0.4187;
|
||||
E 9;
|
||||
}
|
||||
|
||||
|
||||
kEpsilonCoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
C3 -0.33; // only for compressible
|
||||
alphak 1.0; // only for compressible
|
||||
alphaEps 0.76923;
|
||||
alphah 1.0; // only for compressible
|
||||
}
|
||||
|
||||
|
||||
RNGkEpsilonCoeffs
|
||||
{
|
||||
Cmu 0.0845;
|
||||
C1 1.42;
|
||||
C2 1.68;
|
||||
C3 -0.33; // only for compressible
|
||||
alphak 1.39;
|
||||
alphaEps 1.39;
|
||||
alphah 1.0; // only for compressible
|
||||
eta0 4.38;
|
||||
beta 0.012;
|
||||
}
|
||||
|
||||
|
||||
realizableKECoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
A0 4.0;
|
||||
C2 1.9;
|
||||
alphak 1.0;
|
||||
alphaEps 0.833333;
|
||||
alphah 1.0; // only for compressible
|
||||
}
|
||||
|
||||
|
||||
kOmegaSSTCoeffs
|
||||
{
|
||||
alphaK1 0.85034;
|
||||
alphaK2 1.0;
|
||||
alphaOmega1 0.5;
|
||||
alphaOmega2 0.85616;
|
||||
alphah 1.0; // only for compressible
|
||||
beta1 0.075;
|
||||
beta2 0.0828;
|
||||
betaStar 0.09;
|
||||
gamma1 0.5532;
|
||||
gamma2 0.4403;
|
||||
a1 0.31;
|
||||
c1 10.0;
|
||||
}
|
||||
|
||||
|
||||
LaunderGibsonRSTMCoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
Clg1 1.8;
|
||||
Clg2 0.6;
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
C1Ref 0.5;
|
||||
C2Ref 0.3;
|
||||
Cs 0.25;
|
||||
Ceps 0.15;
|
||||
alphah 1.0; // only for compressible
|
||||
alphaEps 0.76923;
|
||||
alphaR 1.22;
|
||||
couplingFactor 0.0;
|
||||
}
|
||||
|
||||
|
||||
LaunderSharmaKECoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
C3 -0.33;
|
||||
alphah 1.0; // only for compressible
|
||||
alphahk 1.0; // only for compressible
|
||||
alphaEps 0.76923;
|
||||
}
|
||||
|
||||
|
||||
LRRCoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
Clrr1 1.8;
|
||||
Clrr2 0.6;
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
Cs 0.25;
|
||||
Ceps 0.15;
|
||||
alphah 1.0; // only for compressible
|
||||
alphaEps 0.76923;
|
||||
alphaR 1.22; // only for compressible
|
||||
couplingFactor 0.0; // only for incompressible
|
||||
}
|
||||
|
||||
|
||||
SpalartAllmarasCoeffs
|
||||
{
|
||||
Cb1 0.1355;
|
||||
Cb2 0.622;
|
||||
Cw2 0.3;
|
||||
Cw3 2.0;
|
||||
Cv1 7.1;
|
||||
Cv2 5.0;
|
||||
alphaNut 1.5;
|
||||
alphah 1.0; // only for compressible
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// incompressible only:
|
||||
|
||||
kOmegaCoeffs
|
||||
{
|
||||
betaStar 0.09;
|
||||
alpha 0.52;
|
||||
beta 0.072;
|
||||
alphak 0.5;
|
||||
alphaOmega 0.5;
|
||||
Cmu $betaStar; // equivalent to betaStar
|
||||
}
|
||||
|
||||
|
||||
LamBremhorstKECoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
alphaEps 0.76923;
|
||||
}
|
||||
|
||||
|
||||
LienCubicKECoeffs
|
||||
{
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
alphak 1;
|
||||
alphaEps 0.76923;
|
||||
A1 1.25;
|
||||
A2 1000;
|
||||
Ctau1 -4;
|
||||
Ctau2 13;
|
||||
Ctau3 -2;
|
||||
alphaKsi 0.9;
|
||||
}
|
||||
|
||||
|
||||
LienCubicKELowReCoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
alphak 1;
|
||||
alphaEps 0.76923;
|
||||
A1 1.25;
|
||||
A2 1000;
|
||||
Ctau1 -4;
|
||||
Ctau2 13;
|
||||
Ctau3 -2;
|
||||
alphaKsi 0.9;
|
||||
Am 0.016;
|
||||
Aepsilon 0.263;
|
||||
Amu 0.00222;
|
||||
}
|
||||
|
||||
|
||||
LienLeschzinerLowReCoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
alphak 1;
|
||||
alphaEps 0.76923;
|
||||
Am 0.016;
|
||||
Aepsilon 0.263;
|
||||
Amu 0.00222;
|
||||
}
|
||||
|
||||
|
||||
NonlinearKEShihCoeffs
|
||||
{
|
||||
Cmu 0.09; // only for boundary conditions?
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
alphak 1;
|
||||
alphaEps 0.76932;
|
||||
A1 1.25;
|
||||
A2 1000;
|
||||
Ctau1 -4;
|
||||
Ctau2 13;
|
||||
Ctau3 -2;
|
||||
alphaKsi 0.9;
|
||||
}
|
||||
|
||||
QZetaCoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
alphaZeta 0.76923;
|
||||
anisotropic false;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -160,6 +160,20 @@ Foam::dictionary::dictionary
|
||||
}
|
||||
|
||||
|
||||
Foam::dictionary::dictionary
|
||||
(
|
||||
const dictionary* dictPtr
|
||||
)
|
||||
:
|
||||
parent_(dictionary::null)
|
||||
{
|
||||
if (dictPtr)
|
||||
{
|
||||
operator=(*dictPtr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::dictionary::dictionary
|
||||
(
|
||||
const dictionary& parentDict,
|
||||
|
||||
@ -168,6 +168,10 @@ public:
|
||||
//- Construct top-level dictionary as copy
|
||||
dictionary(const dictionary&);
|
||||
|
||||
//- Construct top-level dictionary as copy from pointer to dictionary.
|
||||
// A null pointer is treated like an empty dictionary.
|
||||
dictionary(const dictionary*);
|
||||
|
||||
//- Construct by transferring parameter contents given parent dictionary
|
||||
dictionary(const dictionary& parentDict, const Xfer<dictionary>&);
|
||||
|
||||
|
||||
@ -59,6 +59,35 @@ LESdelta::LESdelta(const word& name, const fvMesh& mesh)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<LESdelta> LESdelta::New
|
||||
(
|
||||
const word& name,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word deltaType(dict.lookup("delta"));
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(deltaType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"LESdelta::New(const fvMesh&, const dictionary&)"
|
||||
) << "Unknown LESdelta type " << deltaType << endl << endl
|
||||
<< "Valid LESdelta types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<LESdelta>(cstrIter()(name, mesh, dict));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -50,7 +50,7 @@ namespace Foam
|
||||
class fvMesh;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class LESdelta Declaration
|
||||
Class LESdelta Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class LESdelta
|
||||
@ -99,7 +99,7 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct from name and mesh
|
||||
LESdelta(const word& name, const fvMesh& mesh);
|
||||
LESdelta(const word& name, const fvMesh&);
|
||||
|
||||
|
||||
// Selectors
|
||||
@ -108,8 +108,8 @@ public:
|
||||
static autoPtr<LESdelta> New
|
||||
(
|
||||
const word& name,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& LESdeltaDict
|
||||
const fvMesh&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -1,70 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "LESdelta.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<LESdelta> LESdelta::New
|
||||
(
|
||||
const word& name,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& LESdeltaDict
|
||||
)
|
||||
{
|
||||
word LESdeltaType
|
||||
(
|
||||
LESdeltaDict.lookup("delta")
|
||||
);
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(LESdeltaType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"LESdelta::New(const fvMesh& mesh, dictionary LESdeltaDict)"
|
||||
) << "Unknown LESdelta type " << LESdeltaType << endl << endl
|
||||
<< "Valid LESdelta types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<LESdelta>(cstrIter()(name, mesh, LESdeltaDict));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,5 +1,4 @@
|
||||
LESdelta/LESdelta.C
|
||||
LESdelta/newDelta.C
|
||||
cubeRootVolDelta/cubeRootVolDelta.C
|
||||
PrandtlDelta/PrandtlDelta.C
|
||||
smoothDelta/smoothDelta.C
|
||||
|
||||
@ -38,8 +38,37 @@ namespace Foam
|
||||
defineTypeNameAndDebug(LESfilter, 0);
|
||||
defineRunTimeSelectionTable(LESfilter, dictionary);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<LESfilter> LESfilter::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word filterType(dict.lookup("filter"));
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(filterType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"LESfilter::New(const fvMesh&, const dictionary&)"
|
||||
) << "Unknown LESfilter type " << filterType << endl << endl
|
||||
<< "Valid LESfilter types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<LESfilter>(cstrIter()(mesh, dict));
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -102,8 +102,8 @@ public:
|
||||
//- Return a reference to the selected LES filter
|
||||
static autoPtr<LESfilter> New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const dictionary& LESfilterDict
|
||||
const fvMesh&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -1,69 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "LESfilter.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<LESfilter> LESfilter::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const dictionary& LESfilterDict
|
||||
)
|
||||
{
|
||||
word LESfilterType
|
||||
(
|
||||
LESfilterDict.lookup("filter")
|
||||
);
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(LESfilterType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"LESfilter::New(const fvMesh& mesh, dictionary LESfilterDict)"
|
||||
) << "Unknown LESfilter type " << LESfilterType << endl << endl
|
||||
<< "Valid LESfilter types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<LESfilter>(cstrIter()(mesh, LESfilterDict));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,7 +1,6 @@
|
||||
LESfilter/LESfilter.C
|
||||
LESfilter/newFilter.C
|
||||
simpleFilter/simpleFilter.C
|
||||
laplaceFilter/laplaceFilter.C
|
||||
anisotropicFilter/anisotropicFilter.C
|
||||
anisotropicFilter/anisotropicFilter.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libLESfilters
|
||||
|
||||
@ -69,7 +69,7 @@ DeardorffDiffStress::DeardorffDiffStress
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"ck",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.094
|
||||
)
|
||||
),
|
||||
@ -78,7 +78,7 @@ DeardorffDiffStress::DeardorffDiffStress
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"cm",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
4.13
|
||||
)
|
||||
)
|
||||
|
||||
@ -125,7 +125,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ GenEddyVisc::GenEddyVisc
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"ce",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
1.048
|
||||
)
|
||||
),
|
||||
|
||||
@ -136,7 +136,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ GenSGSStress::GenSGSStress
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"ce",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
1.048
|
||||
)
|
||||
),
|
||||
|
||||
@ -141,7 +141,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ LESModel::LESModel
|
||||
),
|
||||
|
||||
printCoeffs_(lookupOrDefault<Switch>("printCoeffs", false)),
|
||||
coeffDict_(subDict(type + "Coeffs")),
|
||||
coeffDict_(subDictPtr(type + "Coeffs")),
|
||||
|
||||
k0_("k0", dimVelocity*dimVelocity, SMALL),
|
||||
|
||||
@ -87,6 +87,59 @@ LESModel::LESModel
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<LESModel> LESModel::New
|
||||
(
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const basicThermo& thermoPhysicalModel
|
||||
)
|
||||
{
|
||||
word modelName;
|
||||
|
||||
// Enclose the creation of the dictionary to ensure it is deleted
|
||||
// before the turbulenceModel is created otherwise the dictionary is
|
||||
// entered in the database twice
|
||||
{
|
||||
IOdictionary dict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"LESProperties",
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
dict.lookup("LESModel") >> modelName;
|
||||
}
|
||||
|
||||
Info<< "Selecting LES turbulence model " << modelName << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(modelName);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"LESModel::New(const volVectorField& U, const "
|
||||
"surfaceScalarField& phi, const basicThermo&)"
|
||||
) << "Unknown LESModel type " << modelName
|
||||
<< endl << endl
|
||||
<< "Valid LESModel types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<LESModel>(cstrIter()(rho, U, phi, thermoPhysicalModel));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void LESModel::correct(const tmp<volTensorField>&)
|
||||
@ -105,7 +158,10 @@ bool LESModel::read()
|
||||
{
|
||||
if (regIOobject::read())
|
||||
{
|
||||
coeffDict_ = subDict(type() + "Coeffs");
|
||||
if (const dictionary* dictPtr = subDictPtr(type() + "Coeffs"))
|
||||
{
|
||||
coeffDict_ <<= *dictPtr;
|
||||
}
|
||||
|
||||
delta_().read(*this);
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ Description
|
||||
This class defines the basic interface for a compressible flow SGS model,
|
||||
and encapsulates data of value to all possible models. In particular
|
||||
this includes references to all the dependent fields (rho, U, phi),
|
||||
the physical viscosity mu, and the turbulenceProperties dictionary
|
||||
the physical viscosity mu, and the LESProperties dictionary,
|
||||
which contains the model selection and model coefficients.
|
||||
|
||||
SourceFiles
|
||||
@ -160,9 +160,10 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Access the dictionary which provides info. about choice of
|
||||
// models, and all related data (particularly model coefficients).
|
||||
inline dictionary& coeffDict()
|
||||
//- Const access to the coefficients dictionary,
|
||||
// which provides info. about choice of models,
|
||||
// and all related data (particularly model coefficients).
|
||||
inline const dictionary& coeffDict() const
|
||||
{
|
||||
return coeffDict_;
|
||||
}
|
||||
@ -254,7 +255,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read() = 0;
|
||||
};
|
||||
|
||||
|
||||
@ -1,94 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "LESModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressible
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<LESModel> LESModel::New
|
||||
(
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const basicThermo& thermoPhysicalModel
|
||||
)
|
||||
{
|
||||
word LESModelTypeName;
|
||||
|
||||
// Enclose the creation of the turbulencePropertiesDict to ensure it is
|
||||
// deleted before the turbulenceModel is created otherwise the dictionary
|
||||
// is entered in the database twice
|
||||
{
|
||||
IOdictionary turbulencePropertiesDict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"LESProperties",
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
turbulencePropertiesDict.lookup("LESModel") >> LESModelTypeName;
|
||||
}
|
||||
|
||||
Info<< "Selecting LES turbulence model " << LESModelTypeName << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(LESModelTypeName);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"LESModel::New(const volVectorField& U, const "
|
||||
"surfaceScalarField& phi, const basicThermo&)"
|
||||
) << "Unknown LESModel type " << LESModelTypeName
|
||||
<< endl << endl
|
||||
<< "Valid LESModel types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<LESModel>(cstrIter()(rho, U, phi, thermoPhysicalModel));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressible
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,5 +1,4 @@
|
||||
LESModel/LESModel.C
|
||||
LESModel/newLESModel.C
|
||||
GenEddyVisc/GenEddyVisc.C
|
||||
GenSGSStress/GenSGSStress.C
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ Smagorinsky::Smagorinsky
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"ck",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.02
|
||||
)
|
||||
)
|
||||
|
||||
@ -111,7 +111,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -114,7 +114,7 @@ SpalartAllmaras::SpalartAllmaras
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"alphaNut",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
1.5
|
||||
)
|
||||
),
|
||||
@ -124,7 +124,7 @@ SpalartAllmaras::SpalartAllmaras
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"Cb1",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.1355
|
||||
)
|
||||
),
|
||||
@ -133,7 +133,7 @@ SpalartAllmaras::SpalartAllmaras
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"Cb2",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.622
|
||||
)
|
||||
),
|
||||
@ -142,7 +142,7 @@ SpalartAllmaras::SpalartAllmaras
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"Cv1",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
7.1
|
||||
)
|
||||
),
|
||||
@ -151,7 +151,7 @@ SpalartAllmaras::SpalartAllmaras
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"Cv2",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
5.0
|
||||
)
|
||||
),
|
||||
@ -160,7 +160,7 @@ SpalartAllmaras::SpalartAllmaras
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"CDES",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.65
|
||||
)
|
||||
),
|
||||
@ -169,7 +169,7 @@ SpalartAllmaras::SpalartAllmaras
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"ck",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.07
|
||||
)
|
||||
),
|
||||
@ -188,7 +188,7 @@ SpalartAllmaras::SpalartAllmaras
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"Cw2",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.3
|
||||
)
|
||||
),
|
||||
@ -197,7 +197,7 @@ SpalartAllmaras::SpalartAllmaras
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"Cw3",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
2.0
|
||||
)
|
||||
),
|
||||
|
||||
@ -159,7 +159,7 @@ public:
|
||||
//- Correct nuTilda and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -117,12 +117,14 @@ void muSgsWallFunctionFvPatchScalarField::evaluate
|
||||
const Pstream::commsTypes
|
||||
)
|
||||
{
|
||||
const LESModel& sgsModel
|
||||
= db().lookupObject<LESModel>("LESProperties");
|
||||
const LESModel& lesModel = db().lookupObject<LESModel>("LESProperties");
|
||||
|
||||
scalar kappa = readScalar(sgsModel.lookup("kappa"));
|
||||
|
||||
scalar E = readScalar(sgsModel.subDict("wallFunctionCoeffs").lookup("E"));
|
||||
// TODO: make these lookups optional (or more robust)?
|
||||
const scalar kappa = readScalar(lesModel.lookup("kappa"));
|
||||
const scalar E = readScalar
|
||||
(
|
||||
lesModel.subDict("wallFunctionCoeffs").lookup("E")
|
||||
);
|
||||
|
||||
const scalarField& ry = patch().deltaCoeffs();
|
||||
|
||||
|
||||
@ -131,7 +131,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ lowReOneEqEddy::lowReOneEqEddy
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"ck",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.07
|
||||
)
|
||||
),
|
||||
@ -81,7 +81,7 @@ lowReOneEqEddy::lowReOneEqEddy
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"beta",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.01
|
||||
)
|
||||
)
|
||||
|
||||
@ -122,7 +122,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ oneEqEddy::oneEqEddy
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"ck",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.094
|
||||
)
|
||||
)
|
||||
|
||||
@ -125,7 +125,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -290,17 +290,17 @@ bool LRR::read()
|
||||
{
|
||||
if (RASModel::read())
|
||||
{
|
||||
Cmu_.readIfPresent(coeffDict_);
|
||||
Clrr1_.readIfPresent(coeffDict_);
|
||||
Clrr2_.readIfPresent(coeffDict_);
|
||||
C1_.readIfPresent(coeffDict_);
|
||||
C2_.readIfPresent(coeffDict_);
|
||||
Cs_.readIfPresent(coeffDict_);
|
||||
Ceps_.readIfPresent(coeffDict_);
|
||||
alphaR_.readIfPresent(coeffDict_);
|
||||
alphaEps_.readIfPresent(coeffDict_);
|
||||
alphah_.readIfPresent(coeffDict_);
|
||||
couplingFactor_.readIfPresent(coeffDict_);
|
||||
Cmu_.readIfPresent(coeffDict());
|
||||
Clrr1_.readIfPresent(coeffDict());
|
||||
Clrr2_.readIfPresent(coeffDict());
|
||||
C1_.readIfPresent(coeffDict());
|
||||
C2_.readIfPresent(coeffDict());
|
||||
Cs_.readIfPresent(coeffDict());
|
||||
Ceps_.readIfPresent(coeffDict());
|
||||
alphaR_.readIfPresent(coeffDict());
|
||||
alphaEps_.readIfPresent(coeffDict());
|
||||
alphah_.readIfPresent(coeffDict());
|
||||
couplingFactor_.readIfPresent(coeffDict());
|
||||
|
||||
if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0)
|
||||
{
|
||||
|
||||
@ -184,7 +184,7 @@ public:
|
||||
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||
virtual void correct();
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read RASProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -312,20 +312,20 @@ bool LaunderGibsonRSTM::read()
|
||||
{
|
||||
if (RASModel::read())
|
||||
{
|
||||
Cmu_.readIfPresent(coeffDict_);
|
||||
Clg1_.readIfPresent(coeffDict_);
|
||||
Clg2_.readIfPresent(coeffDict_);
|
||||
C1_.readIfPresent(coeffDict_);
|
||||
C2_.readIfPresent(coeffDict_);
|
||||
Cs_.readIfPresent(coeffDict_);
|
||||
Ceps_.readIfPresent(coeffDict_);
|
||||
C1Ref_.readIfPresent(coeffDict_);
|
||||
C2Ref_.readIfPresent(coeffDict_);
|
||||
alphaR_.readIfPresent(coeffDict_);
|
||||
alphaEps_.readIfPresent(coeffDict_);
|
||||
alphah_.readIfPresent(coeffDict_);
|
||||
Cmu_.readIfPresent(coeffDict());
|
||||
Clg1_.readIfPresent(coeffDict());
|
||||
Clg2_.readIfPresent(coeffDict());
|
||||
C1_.readIfPresent(coeffDict());
|
||||
C2_.readIfPresent(coeffDict());
|
||||
Cs_.readIfPresent(coeffDict());
|
||||
Ceps_.readIfPresent(coeffDict());
|
||||
C1Ref_.readIfPresent(coeffDict());
|
||||
C2Ref_.readIfPresent(coeffDict());
|
||||
alphaR_.readIfPresent(coeffDict());
|
||||
alphaEps_.readIfPresent(coeffDict());
|
||||
alphah_.readIfPresent(coeffDict());
|
||||
|
||||
couplingFactor_.readIfPresent(coeffDict_);
|
||||
couplingFactor_.readIfPresent(coeffDict());
|
||||
|
||||
if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0)
|
||||
{
|
||||
|
||||
@ -191,7 +191,7 @@ public:
|
||||
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||
virtual void correct();
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read RASProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -233,13 +233,13 @@ bool LaunderSharmaKE::read()
|
||||
{
|
||||
if (RASModel::read())
|
||||
{
|
||||
Cmu_.readIfPresent(coeffDict_);
|
||||
C1_.readIfPresent(coeffDict_);
|
||||
C2_.readIfPresent(coeffDict_);
|
||||
C3_.readIfPresent(coeffDict_);
|
||||
alphak_.readIfPresent(coeffDict_);
|
||||
alphaEps_.readIfPresent(coeffDict_);
|
||||
alphah_.readIfPresent(coeffDict_);
|
||||
Cmu_.readIfPresent(coeffDict());
|
||||
C1_.readIfPresent(coeffDict());
|
||||
C2_.readIfPresent(coeffDict());
|
||||
C3_.readIfPresent(coeffDict());
|
||||
alphak_.readIfPresent(coeffDict());
|
||||
alphaEps_.readIfPresent(coeffDict());
|
||||
alphah_.readIfPresent(coeffDict());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ public:
|
||||
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||
virtual void correct();
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read RASProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
/* RAS turbulence models */
|
||||
RASModel/RASModel.C
|
||||
RASModel/newRASModel.C
|
||||
laminar/laminar.C
|
||||
kEpsilon/kEpsilon.C
|
||||
RNGkEpsilon/RNGkEpsilon.C
|
||||
|
||||
@ -80,9 +80,9 @@ RASModel::RASModel
|
||||
|
||||
turbulence_(lookup("turbulence")),
|
||||
printCoeffs_(lookupOrDefault<Switch>("printCoeffs", false)),
|
||||
coeffDict_(subDict(type + "Coeffs")),
|
||||
coeffDict_(subDictPtr(type + "Coeffs")),
|
||||
|
||||
wallFunctionDict_(subDict("wallFunctionCoeffs")),
|
||||
wallFunctionDict_(subDictPtr("wallFunctionCoeffs")),
|
||||
kappa_
|
||||
(
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
@ -132,6 +132,63 @@ RASModel::RASModel
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<RASModel> RASModel::New
|
||||
(
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const basicThermo& thermophysicalModel
|
||||
)
|
||||
{
|
||||
word modelName;
|
||||
|
||||
// Enclose the creation of the dictionary to ensure it is deleted
|
||||
// before the turbulenceModel is created otherwise the dictionary is
|
||||
// entered in the database twice
|
||||
{
|
||||
IOdictionary dict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"RASProperties",
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
dict.lookup("RASModel") >> modelName;
|
||||
}
|
||||
|
||||
Info<< "Selecting RAS turbulence model " << modelName << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(modelName);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"RASModel::New(const volScalarField&, "
|
||||
"const volVectorField&, const surfaceScalarField&, "
|
||||
"basicThermo&)"
|
||||
) << "Unknown RASModel type " << modelName
|
||||
<< endl << endl
|
||||
<< "Valid RASModel types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<RASModel>
|
||||
(
|
||||
cstrIter()(rho, U, phi, thermophysicalModel)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const
|
||||
@ -193,9 +250,17 @@ bool RASModel::read()
|
||||
if (regIOobject::read())
|
||||
{
|
||||
lookup("turbulence") >> turbulence_;
|
||||
coeffDict_ = subDict(type() + "Coeffs");
|
||||
|
||||
wallFunctionDict_ = subDict("wallFunctionCoeffs");
|
||||
if (const dictionary* dictPtr = subDictPtr(type() + "Coeffs"))
|
||||
{
|
||||
coeffDict_ <<= *dictPtr;
|
||||
}
|
||||
|
||||
if (const dictionary* dictPtr = subDictPtr("wallFunctionCoeffs"))
|
||||
{
|
||||
wallFunctionDict_ <<= *dictPtr;
|
||||
}
|
||||
|
||||
kappa_.readIfPresent(wallFunctionDict_);
|
||||
E_.readIfPresent(wallFunctionDict_);
|
||||
Cmu_.readIfPresent(wallFunctionDict_);
|
||||
|
||||
@ -351,7 +351,7 @@ public:
|
||||
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||
virtual void correct() = 0;
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read RASProperties dictionary
|
||||
virtual bool read() = 0;
|
||||
};
|
||||
|
||||
|
||||
@ -1,99 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "RASModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressible
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<RASModel> RASModel::New
|
||||
(
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const basicThermo& thermophysicalModel
|
||||
)
|
||||
{
|
||||
word RASModelTypeName;
|
||||
|
||||
// Enclose the creation of the turbulencePropertiesDict to ensure it is
|
||||
// deleted before the RASModel is created otherwise the dictionary
|
||||
// is entered in the database twice
|
||||
{
|
||||
IOdictionary turbulencePropertiesDict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"RASProperties",
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
turbulencePropertiesDict.lookup("RASModel")
|
||||
>> RASModelTypeName;
|
||||
}
|
||||
|
||||
Info<< "Selecting RAS turbulence model " << RASModelTypeName << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(RASModelTypeName);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"RASModel::New(const volScalarField&, "
|
||||
"const volVectorField&, const surfaceScalarField&, "
|
||||
"basicThermo&)"
|
||||
) << "Unknown RASModel type " << RASModelTypeName
|
||||
<< endl << endl
|
||||
<< "Valid RASModel types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<RASModel>
|
||||
(
|
||||
cstrIter()(rho, U, phi, thermophysicalModel)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressible
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -253,15 +253,15 @@ bool RNGkEpsilon::read()
|
||||
{
|
||||
if (RASModel::read())
|
||||
{
|
||||
Cmu_.readIfPresent(coeffDict_);
|
||||
C1_.readIfPresent(coeffDict_);
|
||||
C2_.readIfPresent(coeffDict_);
|
||||
C3_.readIfPresent(coeffDict_);
|
||||
alphak_.readIfPresent(coeffDict_);
|
||||
alphaEps_.readIfPresent(coeffDict_);
|
||||
alphah_.readIfPresent(coeffDict_);
|
||||
eta0_.readIfPresent(coeffDict_);
|
||||
beta_.readIfPresent(coeffDict_);
|
||||
Cmu_.readIfPresent(coeffDict());
|
||||
C1_.readIfPresent(coeffDict());
|
||||
C2_.readIfPresent(coeffDict());
|
||||
C3_.readIfPresent(coeffDict());
|
||||
alphak_.readIfPresent(coeffDict());
|
||||
alphaEps_.readIfPresent(coeffDict());
|
||||
alphah_.readIfPresent(coeffDict());
|
||||
eta0_.readIfPresent(coeffDict());
|
||||
beta_.readIfPresent(coeffDict());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -171,7 +171,7 @@ public:
|
||||
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||
virtual void correct();
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read RASProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -279,16 +279,16 @@ bool SpalartAllmaras::read()
|
||||
{
|
||||
if (RASModel::read())
|
||||
{
|
||||
alphaNut_.readIfPresent(coeffDict_);
|
||||
alphah_.readIfPresent(coeffDict_);
|
||||
alphaNut_.readIfPresent(coeffDict());
|
||||
alphah_.readIfPresent(coeffDict());
|
||||
|
||||
Cb1_.readIfPresent(coeffDict_);
|
||||
Cb2_.readIfPresent(coeffDict_);
|
||||
Cb1_.readIfPresent(coeffDict());
|
||||
Cb2_.readIfPresent(coeffDict());
|
||||
Cw1_ = Cb1_/sqr(kappa_) + alphaNut_*(1.0 + Cb2_);
|
||||
Cw2_.readIfPresent(coeffDict_);
|
||||
Cw3_.readIfPresent(coeffDict_);
|
||||
Cv1_.readIfPresent(coeffDict_);
|
||||
Cv2_.readIfPresent(coeffDict_);
|
||||
Cw2_.readIfPresent(coeffDict());
|
||||
Cw3_.readIfPresent(coeffDict());
|
||||
Cv1_.readIfPresent(coeffDict());
|
||||
Cv2_.readIfPresent(coeffDict());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ public:
|
||||
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||
virtual void correct();
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read RASProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -148,9 +148,9 @@ void turbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
||||
|
||||
const label patchI = patch().index();
|
||||
|
||||
const RASModel& ras = db().lookupObject<RASModel>("RASProperties");
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
|
||||
const scalarField alphaEffp = ras.alphaEff()().boundaryField()[patchI];
|
||||
const scalarField alphaEffp = rasModel.alphaEff()().boundaryField()[patchI];
|
||||
|
||||
const basicThermo& thermo =
|
||||
db().lookupObject<basicThermo>("thermophysicalProperties");
|
||||
|
||||
@ -108,16 +108,15 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs()
|
||||
}
|
||||
|
||||
// Lookup Cmu corresponding to the turbulence model selected
|
||||
const compressible::RASModel& RAS =
|
||||
db().lookupObject<compressible::RASModel>("RASProperties");
|
||||
scalar Cmu = readScalar(RAS.coeffDict().lookup("Cmu"));
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
|
||||
scalar Cmu75 = pow(Cmu, 0.75);
|
||||
const scalar Cmu = readScalar(rasModel.coeffDict().lookup("Cmu"));
|
||||
const scalar Cmu75 = pow(Cmu, 0.75);
|
||||
|
||||
const fvPatchField<scalar>& k =
|
||||
const fvPatchField<scalar>& kp =
|
||||
patch().lookupPatchField<volScalarField, scalar>("k");
|
||||
|
||||
operator==(Cmu75*k*sqrt(k)/mixingLength_);
|
||||
operator==(Cmu75*kp*sqrt(kp)/mixingLength_);
|
||||
|
||||
fixedValueFvPatchField<scalar>::updateCoeffs();
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
|
||||
:
|
||||
fixedValueFvPatchField<scalar>(p, iF, dict),
|
||||
mixingLength_(readScalar(dict.lookup("mixingLength"))),
|
||||
kName_(dict.lookup("k"))
|
||||
kName_(dict.lookupOrDefault<word>("k", "k"))
|
||||
{}
|
||||
|
||||
turbulentMixingLengthFrequencyInletFvPatchScalarField::
|
||||
@ -113,11 +113,10 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs()
|
||||
}
|
||||
|
||||
// Lookup Cmu corresponding to the turbulence model selected
|
||||
const compressible::RASModel& RAS =
|
||||
db().lookupObject<compressible::RASModel>("RASProperties");
|
||||
scalar Cmu = readScalar(RAS.coeffDict().lookup("Cmu"));
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
|
||||
scalar Cmu25 = pow(Cmu, 0.25);
|
||||
const scalar Cmu = readScalar(rasModel.coeffDict().lookup("Cmu"));
|
||||
const scalar Cmu25 = pow(Cmu, 0.25);
|
||||
|
||||
const fvPatchField<scalar>& kp =
|
||||
patch().lookupPatchField<volScalarField, scalar>(kName_);
|
||||
|
||||
@ -107,8 +107,8 @@ alphatWallFunctionFvPatchScalarField
|
||||
|
||||
void alphatWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
const RASModel& ras = db().lookupObject<RASModel>("RASProperties");
|
||||
const scalar Prt = ras.Prt().value();
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
const scalar Prt = rasModel.Prt().value();
|
||||
|
||||
const scalarField& mutw =
|
||||
patch().lookupPatchField<volScalarField, scalar>(mutName_);
|
||||
|
||||
@ -154,15 +154,15 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField
|
||||
|
||||
void epsilonWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
const RASModel& ras = db().lookupObject<RASModel>("RASProperties");
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
|
||||
const scalar Cmu = ras.Cmu().value();
|
||||
const scalar Cmu = rasModel.Cmu().value();
|
||||
const scalar Cmu25 = pow(Cmu, 0.25);
|
||||
const scalar Cmu75 = pow(Cmu, 0.75);
|
||||
const scalar kappa = ras.kappa().value();
|
||||
const scalar yPlusLam = ras.yPlusLam();
|
||||
const scalar kappa = rasModel.kappa().value();
|
||||
const scalar yPlusLam = rasModel.yPlusLam();
|
||||
|
||||
const scalarField& y = ras.y()[patch().index()];
|
||||
const scalarField& y = rasModel.y()[patch().index()];
|
||||
|
||||
volScalarField& G = const_cast<volScalarField&>
|
||||
(db().lookupObject<volScalarField>(GName_));
|
||||
|
||||
@ -182,15 +182,15 @@ void mutRoughWallFunctionFvPatchScalarField::rmap
|
||||
|
||||
void mutRoughWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
const RASModel& ras = db().lookupObject<RASModel>("RASProperties");
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
|
||||
const scalar Cmu = ras.Cmu().value();
|
||||
const scalar Cmu = rasModel.Cmu().value();
|
||||
const scalar Cmu25 = pow(Cmu, 0.25);
|
||||
const scalar kappa = ras.kappa().value();
|
||||
const scalar E = ras.E().value();
|
||||
scalar yPlusLam = ras.yPlusLam();
|
||||
const scalar kappa = rasModel.kappa().value();
|
||||
const scalar E = rasModel.E().value();
|
||||
scalar yPlusLam = rasModel.yPlusLam();
|
||||
|
||||
const scalarField& y = ras.y()[patch().index()];
|
||||
const scalarField& y = rasModel.y()[patch().index()];
|
||||
|
||||
const scalarField& rhow =
|
||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||
@ -217,7 +217,7 @@ void mutRoughWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
if (KsPlus > 2.25)
|
||||
{
|
||||
Edash = E/fnRough(KsPlus, Cs_[faceI], kappa);
|
||||
yPlusLam = ras.yPlusLam(kappa, Edash);
|
||||
yPlusLam = rasModel.yPlusLam(kappa, Edash);
|
||||
}
|
||||
|
||||
if (debug)
|
||||
|
||||
@ -135,8 +135,7 @@ void mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::evaluate
|
||||
const Pstream::commsTypes
|
||||
)
|
||||
{
|
||||
const RASModel& rasModel
|
||||
= db().lookupObject<RASModel>("RASProperties");
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
|
||||
const scalar kappa = rasModel.kappa().value();
|
||||
const scalar E = rasModel.E().value();
|
||||
@ -160,7 +159,7 @@ void mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::evaluate
|
||||
|
||||
scalarField magFaceGradU = mag(U.snGrad());
|
||||
|
||||
if(roughnessHeight_ > 0.0)
|
||||
if (roughnessHeight_ > 0.0)
|
||||
{
|
||||
// Rough Walls.
|
||||
const scalar c_1 = 1/(90 - 2.25) + roughnessConstant_;
|
||||
|
||||
@ -120,11 +120,11 @@ void mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::evaluate
|
||||
const Pstream::commsTypes
|
||||
)
|
||||
{
|
||||
const RASModel& ras = db().lookupObject<RASModel>("RASProperties");
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
|
||||
scalar kappa = ras.kappa().value();
|
||||
scalar E = ras.E().value();
|
||||
scalar yPlusLam = ras.yPlusLam();
|
||||
const scalar kappa = rasModel.kappa().value();
|
||||
const scalar E = rasModel.E().value();
|
||||
scalar yPlusLam = rasModel.yPlusLam();
|
||||
|
||||
const scalarField& ry = patch().deltaCoeffs();
|
||||
|
||||
@ -159,7 +159,7 @@ void mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::evaluate
|
||||
yPlusLast = yPlus;
|
||||
yPlus = (kappaRe + yPlus)/(1.0 + log(E*yPlus));
|
||||
|
||||
} while(mag(ryPlusLam*(yPlus - yPlusLast)) > 0.01 && ++iter < 10 );
|
||||
} while (mag(ryPlusLam*(yPlus - yPlusLast)) > 0.01 && ++iter < 10 );
|
||||
|
||||
if (yPlus > yPlusLam)
|
||||
{
|
||||
|
||||
@ -120,10 +120,10 @@ void mutSpalartAllmarasWallFunctionFvPatchScalarField::evaluate
|
||||
const Pstream::commsTypes
|
||||
)
|
||||
{
|
||||
const RASModel& ras = db().lookupObject<RASModel>("RASProperties");
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
|
||||
scalar kappa = ras.kappa().value();
|
||||
scalar E = ras.E().value();
|
||||
const scalar kappa = rasModel.kappa().value();
|
||||
const scalar E = rasModel.E().value();
|
||||
|
||||
const scalarField& ry = patch().deltaCoeffs();
|
||||
|
||||
|
||||
@ -117,15 +117,15 @@ mutWallFunctionFvPatchScalarField
|
||||
|
||||
void mutWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
const RASModel& ras = db().lookupObject<RASModel>("RASProperties");
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
|
||||
const scalar Cmu = ras.Cmu().value();
|
||||
const scalar Cmu = rasModel.Cmu().value();
|
||||
const scalar Cmu25 = pow(Cmu, 0.25);
|
||||
const scalar kappa = ras.kappa().value();
|
||||
const scalar E = ras.E().value();
|
||||
const scalar yPlusLam = ras.yPlusLam();
|
||||
const scalar kappa = rasModel.kappa().value();
|
||||
const scalar E = rasModel.E().value();
|
||||
const scalar yPlusLam = rasModel.yPlusLam();
|
||||
|
||||
const scalarField& y = ras.y()[patch().index()];
|
||||
const scalarField& y = rasModel.y()[patch().index()];
|
||||
|
||||
const scalarField& rhow =
|
||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||
|
||||
@ -154,15 +154,15 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
||||
|
||||
void omegaWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
const RASModel& ras = db().lookupObject<RASModel>("RASProperties");
|
||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||
|
||||
const scalar Cmu = ras.Cmu().value();
|
||||
const scalar Cmu = rasModel.Cmu().value();
|
||||
const scalar Cmu25 = pow(Cmu, 0.25);
|
||||
|
||||
const scalar kappa = ras.kappa().value();
|
||||
const scalar yPlusLam = ras.yPlusLam();
|
||||
const scalar kappa = rasModel.kappa().value();
|
||||
const scalar yPlusLam = rasModel.yPlusLam();
|
||||
|
||||
const scalarField& y = ras.y()[patch().index()];
|
||||
const scalarField& y = rasModel.y()[patch().index()];
|
||||
|
||||
volScalarField& G = const_cast<volScalarField&>
|
||||
(db().lookupObject<volScalarField>(GName_));
|
||||
|
||||
@ -236,13 +236,13 @@ bool kEpsilon::read()
|
||||
{
|
||||
if (RASModel::read())
|
||||
{
|
||||
Cmu_.readIfPresent(coeffDict_);
|
||||
C1_.readIfPresent(coeffDict_);
|
||||
C2_.readIfPresent(coeffDict_);
|
||||
C3_.readIfPresent(coeffDict_);
|
||||
alphak_.readIfPresent(coeffDict_);
|
||||
alphaEps_.readIfPresent(coeffDict_);
|
||||
alphah_.readIfPresent(coeffDict_);
|
||||
Cmu_.readIfPresent(coeffDict());
|
||||
C1_.readIfPresent(coeffDict());
|
||||
C2_.readIfPresent(coeffDict());
|
||||
C3_.readIfPresent(coeffDict());
|
||||
alphak_.readIfPresent(coeffDict());
|
||||
alphaEps_.readIfPresent(coeffDict());
|
||||
alphah_.readIfPresent(coeffDict());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -171,7 +171,7 @@ public:
|
||||
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||
virtual void correct();
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read RASProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -325,18 +325,18 @@ bool kOmegaSST::read()
|
||||
{
|
||||
if (RASModel::read())
|
||||
{
|
||||
alphaK1_.readIfPresent(coeffDict_);
|
||||
alphaK2_.readIfPresent(coeffDict_);
|
||||
alphaOmega1_.readIfPresent(coeffDict_);
|
||||
alphaOmega2_.readIfPresent(coeffDict_);
|
||||
alphah_.readIfPresent(coeffDict_);
|
||||
gamma1_.readIfPresent(coeffDict_);
|
||||
gamma2_.readIfPresent(coeffDict_);
|
||||
beta1_.readIfPresent(coeffDict_);
|
||||
beta2_.readIfPresent(coeffDict_);
|
||||
betaStar_.readIfPresent(coeffDict_);
|
||||
a1_.readIfPresent(coeffDict_);
|
||||
c1_.readIfPresent(coeffDict_);
|
||||
alphaK1_.readIfPresent(coeffDict());
|
||||
alphaK2_.readIfPresent(coeffDict());
|
||||
alphaOmega1_.readIfPresent(coeffDict());
|
||||
alphaOmega2_.readIfPresent(coeffDict());
|
||||
alphah_.readIfPresent(coeffDict());
|
||||
gamma1_.readIfPresent(coeffDict());
|
||||
gamma2_.readIfPresent(coeffDict());
|
||||
beta1_.readIfPresent(coeffDict());
|
||||
beta2_.readIfPresent(coeffDict());
|
||||
betaStar_.readIfPresent(coeffDict());
|
||||
a1_.readIfPresent(coeffDict());
|
||||
c1_.readIfPresent(coeffDict());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ Description
|
||||
|
||||
The default model coefficients correspond to the following:
|
||||
@verbatim
|
||||
kOmegaSST
|
||||
kOmegaSSTCoeffs
|
||||
{
|
||||
alphaK1 0.85034;
|
||||
alphaK2 1.0;
|
||||
@ -285,7 +285,7 @@ public:
|
||||
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||
virtual void correct();
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read RASProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -116,7 +116,7 @@ public:
|
||||
//- Correct the laminar viscosity
|
||||
void correct();
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read RASProperties dictionary
|
||||
bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -270,12 +270,12 @@ bool realizableKE::read()
|
||||
{
|
||||
if (RASModel::read())
|
||||
{
|
||||
Cmu_.readIfPresent(coeffDict_);
|
||||
A0_.readIfPresent(coeffDict_);
|
||||
C2_.readIfPresent(coeffDict_);
|
||||
alphak_.readIfPresent(coeffDict_);
|
||||
alphaEps_.readIfPresent(coeffDict_);
|
||||
alphah_.readIfPresent(coeffDict_);
|
||||
Cmu_.readIfPresent(coeffDict());
|
||||
A0_.readIfPresent(coeffDict());
|
||||
C2_.readIfPresent(coeffDict());
|
||||
alphak_.readIfPresent(coeffDict());
|
||||
alphaEps_.readIfPresent(coeffDict());
|
||||
alphah_.readIfPresent(coeffDict());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ Description
|
||||
|
||||
The default model coefficients correspond to the following:
|
||||
@verbatim
|
||||
realizableKE
|
||||
realizableKECoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
A0 4.0;
|
||||
@ -186,7 +186,7 @@ public:
|
||||
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||
virtual void correct();
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read RASProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -70,13 +70,13 @@ autoPtr<turbulenceModel> turbulenceModel::New
|
||||
const basicThermo& thermophysicalModel
|
||||
)
|
||||
{
|
||||
word turbulenceModelTypeName;
|
||||
word modelName;
|
||||
|
||||
// Enclose the creation of the turbulencePropertiesDict to ensure it is
|
||||
// deleted before the turbulenceModel is created otherwise the dictionary
|
||||
// is entered in the database twice
|
||||
// Enclose the creation of the dictionary to ensure it is deleted
|
||||
// before the turbulenceModel is created otherwise the dictionary is
|
||||
// entered in the database twice
|
||||
{
|
||||
IOdictionary turbulencePropertiesDict
|
||||
IOdictionary dict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
@ -88,15 +88,13 @@ autoPtr<turbulenceModel> turbulenceModel::New
|
||||
)
|
||||
);
|
||||
|
||||
turbulencePropertiesDict.lookup("simulationType")
|
||||
>> turbulenceModelTypeName;
|
||||
dict.lookup("simulationType") >> modelName;
|
||||
}
|
||||
|
||||
Info<< "Selecting turbulence model type "
|
||||
<< turbulenceModelTypeName << endl;
|
||||
Info<< "Selecting turbulence model type " << modelName << endl;
|
||||
|
||||
turbulenceModelConstructorTable::iterator cstrIter =
|
||||
turbulenceModelConstructorTablePtr_->find(turbulenceModelTypeName);
|
||||
turbulenceModelConstructorTablePtr_->find(modelName);
|
||||
|
||||
if (cstrIter == turbulenceModelConstructorTablePtr_->end())
|
||||
{
|
||||
@ -105,7 +103,7 @@ autoPtr<turbulenceModel> turbulenceModel::New
|
||||
"turbulenceModel::New(const volScalarField&, "
|
||||
"const volVectorField&, const surfaceScalarField&, "
|
||||
"basicThermo&)"
|
||||
) << "Unknown turbulenceModel type " << turbulenceModelTypeName
|
||||
) << "Unknown turbulenceModel type " << modelName
|
||||
<< endl << endl
|
||||
<< "Valid turbulenceModel types are :" << endl
|
||||
<< turbulenceModelConstructorTablePtr_->toc()
|
||||
|
||||
@ -67,7 +67,7 @@ DeardorffDiffStress::DeardorffDiffStress
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"ck",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.094
|
||||
)
|
||||
),
|
||||
@ -76,7 +76,7 @@ DeardorffDiffStress::DeardorffDiffStress
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"cm",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
4.13
|
||||
)
|
||||
)
|
||||
|
||||
@ -124,7 +124,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ GenEddyVisc::GenEddyVisc
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"ce",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
1.048
|
||||
)
|
||||
),
|
||||
|
||||
@ -122,7 +122,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ GenSGSStress::GenSGSStress
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"ce",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
1.048
|
||||
)
|
||||
),
|
||||
@ -61,7 +61,7 @@ GenSGSStress::GenSGSStress
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"couplingFactor",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.0
|
||||
)
|
||||
),
|
||||
|
||||
@ -130,7 +130,7 @@ public:
|
||||
// This is the additional term due to the filtering of the NSE.
|
||||
virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ LESModel::LESModel
|
||||
|
||||
turbulence_(lookup("turbulence")),
|
||||
printCoeffs_(lookupOrDefault<Switch>("printCoeffs", false)),
|
||||
coeffDict_(subDict(type + "Coeffs")),
|
||||
coeffDict_(subDictPtr(type + "Coeffs")),
|
||||
|
||||
k0_("k0", dimVelocity*dimVelocity, SMALL),
|
||||
delta_(LESdelta::New("delta", U.mesh(), *this))
|
||||
@ -95,13 +95,13 @@ autoPtr<LESModel> LESModel::New
|
||||
transportModel& transport
|
||||
)
|
||||
{
|
||||
word LESModelTypeName;
|
||||
word modelName;
|
||||
|
||||
// Enclose the creation of the turbulencePropertiesDict to ensure it is
|
||||
// deleted before the turbulenceModel is created otherwise the dictionary
|
||||
// is entered in the database twice
|
||||
// Enclose the creation of the dictionary to ensure it is deleted
|
||||
// before the turbulenceModel is created otherwise the dictionary is
|
||||
// entered in the database twice
|
||||
{
|
||||
IOdictionary turbulencePropertiesDict
|
||||
IOdictionary dict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
@ -113,13 +113,13 @@ autoPtr<LESModel> LESModel::New
|
||||
)
|
||||
);
|
||||
|
||||
turbulencePropertiesDict.lookup("LESModel") >> LESModelTypeName;
|
||||
dict.lookup("LESModel") >> modelName;
|
||||
}
|
||||
|
||||
Info<< "Selecting LES turbulence model " << LESModelTypeName << endl;
|
||||
Info<< "Selecting LES turbulence model " << modelName << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(LESModelTypeName);
|
||||
dictionaryConstructorTablePtr_->find(modelName);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
@ -127,7 +127,7 @@ autoPtr<LESModel> LESModel::New
|
||||
(
|
||||
"LESModel::select(const volVectorField&, const "
|
||||
"surfaceScalarField&, transportModel&)"
|
||||
) << "Unknown LESModel type " << LESModelTypeName
|
||||
) << "Unknown LESModel type " << modelName
|
||||
<< endl << endl
|
||||
<< "Valid LESModel types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
@ -163,7 +163,10 @@ bool LESModel::read()
|
||||
{
|
||||
if (regIOobject::read())
|
||||
{
|
||||
coeffDict_ = subDict(type() + "Coeffs");
|
||||
if (const dictionary* dictPtr = subDictPtr(type() + "Coeffs"))
|
||||
{
|
||||
coeffDict_ <<= *dictPtr;
|
||||
}
|
||||
|
||||
delta_().read(*this);
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ Description
|
||||
This class defines the basic interface for an incompressible flow SGS
|
||||
model, and encapsulates data of value to all possible models. In
|
||||
particular this includes references to all the dependent fields (U,
|
||||
phi), the physical viscosity nu, and the turbulenceProperties
|
||||
phi), the physical viscosity nu, and the LESProperties
|
||||
dictionary which contains the model selection and model coefficients.
|
||||
|
||||
SourceFiles
|
||||
@ -157,9 +157,10 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Access the dictionary which provides info. about choice of
|
||||
// models, and all related data (particularly model coefficients).
|
||||
inline dictionary& coeffDict()
|
||||
//- Const access to the coefficients dictionary,
|
||||
// which provides info. about choice of models,
|
||||
// and all related data (particularly model coefficients).
|
||||
inline const dictionary& coeffDict() const
|
||||
{
|
||||
return coeffDict_;
|
||||
}
|
||||
@ -248,7 +249,7 @@ public:
|
||||
// gradU calculated locally.
|
||||
void correct();
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read() = 0;
|
||||
};
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@ LRRDiffStress::LRRDiffStress
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"ck",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.09
|
||||
)
|
||||
),
|
||||
@ -76,7 +76,7 @@ LRRDiffStress::LRRDiffStress
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"c1",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
1.8
|
||||
)
|
||||
),
|
||||
@ -85,7 +85,7 @@ LRRDiffStress::LRRDiffStress
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"c2",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.6
|
||||
)
|
||||
)
|
||||
|
||||
@ -123,7 +123,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@ Smagorinsky::Smagorinsky
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"ck",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.094
|
||||
)
|
||||
)
|
||||
|
||||
@ -125,7 +125,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ Smagorinsky2::Smagorinsky2
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"cD2",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.02
|
||||
)
|
||||
)
|
||||
|
||||
@ -112,7 +112,7 @@ public:
|
||||
// This is the additional term due to the filtering of the NSE.
|
||||
virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -160,7 +160,7 @@ SpalartAllmaras::SpalartAllmaras
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"alphaNut",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
1.5
|
||||
)
|
||||
),
|
||||
@ -178,7 +178,7 @@ SpalartAllmaras::SpalartAllmaras
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"Cb1",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.1355
|
||||
)
|
||||
),
|
||||
@ -187,7 +187,7 @@ SpalartAllmaras::SpalartAllmaras
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"Cb2",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.622
|
||||
)
|
||||
),
|
||||
@ -196,7 +196,7 @@ SpalartAllmaras::SpalartAllmaras
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"Cv1",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
7.1
|
||||
)
|
||||
),
|
||||
@ -205,7 +205,7 @@ SpalartAllmaras::SpalartAllmaras
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"Cv2",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
5.0
|
||||
)
|
||||
),
|
||||
@ -214,7 +214,7 @@ SpalartAllmaras::SpalartAllmaras
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"CDES",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.65
|
||||
)
|
||||
),
|
||||
@ -223,7 +223,7 @@ SpalartAllmaras::SpalartAllmaras
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"ck",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.07
|
||||
)
|
||||
),
|
||||
@ -233,7 +233,7 @@ SpalartAllmaras::SpalartAllmaras
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"Cw2",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.3
|
||||
)
|
||||
),
|
||||
@ -242,7 +242,7 @@ SpalartAllmaras::SpalartAllmaras
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"Cw3",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
2.0
|
||||
)
|
||||
),
|
||||
|
||||
@ -181,7 +181,7 @@ public:
|
||||
//- Correct nuTilda and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -154,7 +154,7 @@ SpalartAllmarasIDDES::SpalartAllmarasIDDES
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"fwStar",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.424
|
||||
)
|
||||
),
|
||||
@ -163,7 +163,7 @@ SpalartAllmarasIDDES::SpalartAllmarasIDDES
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"cl",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
3.55
|
||||
)
|
||||
),
|
||||
@ -172,7 +172,7 @@ SpalartAllmarasIDDES::SpalartAllmarasIDDES
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"ct",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
1.63
|
||||
)
|
||||
)
|
||||
|
||||
@ -116,7 +116,7 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -105,12 +105,14 @@ void nuSgsWallFunctionFvPatchScalarField::evaluate
|
||||
const Pstream::commsTypes
|
||||
)
|
||||
{
|
||||
const LESModel& sgsModel
|
||||
= db().lookupObject<LESModel>("LESProperties");
|
||||
const LESModel& lesModel = db().lookupObject<LESModel>("LESProperties");
|
||||
|
||||
scalar kappa = readScalar(sgsModel.lookup("kappa"));
|
||||
|
||||
scalar E = readScalar(sgsModel.subDict("wallFunctionCoeffs").lookup("E"));
|
||||
// TODO: make these lookups optional (or more robust)?
|
||||
const scalar kappa = readScalar(lesModel.lookup("kappa"));
|
||||
const scalar E = readScalar
|
||||
(
|
||||
lesModel.subDict("wallFunctionCoeffs").lookup("E")
|
||||
);
|
||||
|
||||
const scalarField& ry = patch().deltaCoeffs();
|
||||
|
||||
|
||||
@ -132,7 +132,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -139,7 +139,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -139,7 +139,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -128,7 +128,7 @@ kOmegaSSTSAS::kOmegaSSTSAS
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"alphaK1",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.85034
|
||||
)
|
||||
),
|
||||
@ -137,7 +137,7 @@ kOmegaSSTSAS::kOmegaSSTSAS
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"alphaK2",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
1.0
|
||||
)
|
||||
),
|
||||
@ -146,7 +146,7 @@ kOmegaSSTSAS::kOmegaSSTSAS
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"alphaOmega1",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.5
|
||||
)
|
||||
),
|
||||
@ -155,7 +155,7 @@ kOmegaSSTSAS::kOmegaSSTSAS
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"alphaOmega2",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.85616
|
||||
)
|
||||
),
|
||||
@ -164,7 +164,7 @@ kOmegaSSTSAS::kOmegaSSTSAS
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"gamma1",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.5532
|
||||
)
|
||||
),
|
||||
@ -173,7 +173,7 @@ kOmegaSSTSAS::kOmegaSSTSAS
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"gamma2",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.4403
|
||||
)
|
||||
),
|
||||
@ -182,7 +182,7 @@ kOmegaSSTSAS::kOmegaSSTSAS
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"beta1",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.075
|
||||
)
|
||||
),
|
||||
@ -191,7 +191,7 @@ kOmegaSSTSAS::kOmegaSSTSAS
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"beta2",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.0828
|
||||
)
|
||||
),
|
||||
@ -200,7 +200,7 @@ kOmegaSSTSAS::kOmegaSSTSAS
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"betaStar",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.09
|
||||
)
|
||||
),
|
||||
@ -209,7 +209,7 @@ kOmegaSSTSAS::kOmegaSSTSAS
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"a1",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.31
|
||||
)
|
||||
),
|
||||
@ -218,7 +218,7 @@ kOmegaSSTSAS::kOmegaSSTSAS
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"c1",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
10.0
|
||||
)
|
||||
),
|
||||
@ -227,7 +227,7 @@ kOmegaSSTSAS::kOmegaSSTSAS
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"alphaPhi",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.666667
|
||||
)
|
||||
),
|
||||
@ -236,7 +236,7 @@ kOmegaSSTSAS::kOmegaSSTSAS
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"zetaTilda2",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
1.755
|
||||
)
|
||||
),
|
||||
@ -245,7 +245,7 @@ kOmegaSSTSAS::kOmegaSSTSAS
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"FSAS",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
1.25
|
||||
)
|
||||
),
|
||||
@ -258,7 +258,7 @@ kOmegaSSTSAS::kOmegaSSTSAS
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"Cmu",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.09
|
||||
)
|
||||
),
|
||||
|
||||
@ -244,7 +244,7 @@ public:
|
||||
// viscosity
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -111,7 +111,7 @@ public:
|
||||
// i.e. the additional term in the filtered NSE.
|
||||
virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -161,7 +161,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -137,7 +137,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ oneEqEddy::oneEqEddy
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"ck",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.094
|
||||
)
|
||||
)
|
||||
|
||||
@ -132,7 +132,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>& gradU);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -115,7 +115,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>&);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -78,7 +78,7 @@ spectEddyVisc::spectEddyVisc
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"cB",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
8.22
|
||||
)
|
||||
),
|
||||
@ -87,7 +87,7 @@ spectEddyVisc::spectEddyVisc
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"cK1",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
0.83
|
||||
)
|
||||
),
|
||||
@ -96,7 +96,7 @@ spectEddyVisc::spectEddyVisc
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"cK2",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
1.03
|
||||
)
|
||||
),
|
||||
@ -105,7 +105,7 @@ spectEddyVisc::spectEddyVisc
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"cK3",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
4.75
|
||||
)
|
||||
),
|
||||
@ -114,7 +114,7 @@ spectEddyVisc::spectEddyVisc
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"cK4",
|
||||
coeffDict(),
|
||||
coeffDict_,
|
||||
2.55
|
||||
)
|
||||
)
|
||||
|
||||
@ -122,7 +122,7 @@ public:
|
||||
//- Correct Eddy-Viscosity and related properties
|
||||
virtual void correct(const tmp<volTensorField>&);
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read LESProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
@ -49,12 +49,11 @@ addToRunTimeSelectionTable(LESdelta, vanDriestDelta, dictionary);
|
||||
|
||||
void vanDriestDelta::calcDelta()
|
||||
{
|
||||
const LESModel& sgsModel
|
||||
= mesh_.lookupObject<LESModel>("LESProperties");
|
||||
const LESModel& lesModel = mesh_.lookupObject<LESModel>("LESProperties");
|
||||
|
||||
const volVectorField& U = sgsModel.U();
|
||||
const volScalarField& nu = sgsModel.nu();
|
||||
tmp<volScalarField> nuSgs = sgsModel.nuSgs();
|
||||
const volVectorField& U = lesModel.U();
|
||||
const volScalarField& nu = lesModel.nu();
|
||||
tmp<volScalarField> nuSgs = lesModel.nuSgs();
|
||||
|
||||
volScalarField ystar
|
||||
(
|
||||
|
||||
@ -259,16 +259,16 @@ bool LRR::read()
|
||||
{
|
||||
if (RASModel::read())
|
||||
{
|
||||
Cmu_.readIfPresent(coeffDict_);
|
||||
Clrr1_.readIfPresent(coeffDict_);
|
||||
Clrr2_.readIfPresent(coeffDict_);
|
||||
C1_.readIfPresent(coeffDict_);
|
||||
C2_.readIfPresent(coeffDict_);
|
||||
Cs_.readIfPresent(coeffDict_);
|
||||
Ceps_.readIfPresent(coeffDict_);
|
||||
alphaEps_.readIfPresent(coeffDict_);
|
||||
Cmu_.readIfPresent(coeffDict());
|
||||
Clrr1_.readIfPresent(coeffDict());
|
||||
Clrr2_.readIfPresent(coeffDict());
|
||||
C1_.readIfPresent(coeffDict());
|
||||
C2_.readIfPresent(coeffDict());
|
||||
Cs_.readIfPresent(coeffDict());
|
||||
Ceps_.readIfPresent(coeffDict());
|
||||
alphaEps_.readIfPresent(coeffDict());
|
||||
|
||||
couplingFactor_.readIfPresent(coeffDict_);
|
||||
couplingFactor_.readIfPresent(coeffDict());
|
||||
|
||||
if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0)
|
||||
{
|
||||
|
||||
@ -169,7 +169,7 @@ public:
|
||||
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||
virtual void correct();
|
||||
|
||||
//- Read turbulenceProperties dictionary
|
||||
//- Read RASProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user