Commit 290e4018 authored by Andrew Heather's avatar Andrew Heather
Browse files

enabled lookupOrDefault on model coefficients

parent c52b20b1
......@@ -55,17 +55,23 @@ LRR::LRR
:
turbulenceModel(typeName, rho, U, phi, thermophysicalModel),
Cmu(turbulenceModelCoeffs_.lookup("Cmu")),
Clrr1(turbulenceModelCoeffs_.lookup("Clrr1")),
Clrr2(turbulenceModelCoeffs_.lookup("Clrr2")),
C1(turbulenceModelCoeffs_.lookup("C1")),
C2(turbulenceModelCoeffs_.lookup("C2")),
Cs(turbulenceModelCoeffs_.lookup("Cs")),
Ceps(turbulenceModelCoeffs_.lookup("Ceps")),
couplingFactor_(0.0),
alphaR(turbulenceModelCoeffs_.lookup("alphaR")),
alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")),
alphah(turbulenceModelCoeffs_.lookup("alphah")),
Cmu(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cmu", 0.09)),
Clrr1(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Clrr1", 1.8)),
Clrr2(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Clrr2", 0.6)),
C1(turbulenceModelCoeffs_.lookupOrDefault<scalar>("C1", 1.44)),
C2(turbulenceModelCoeffs_.lookupOrDefault<scalar>("C2", 1.92)),
Cs(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cs", 0.25)),
Ceps(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Ceps", 0.15)),
couplingFactor_
(
turbulenceModelCoeffs_.lookupOrDefault<scalar>("couplingFactor", 0.0)
),
alphaR(turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphaR", 1.22)),
alphaEps
(
turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphaEps", 0.76923)
),
alphah(turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphah", 1.0)),
R_
(
......@@ -121,21 +127,16 @@ LRR::LRR
{
# include "wallViscosityI.H"
if (turbulenceModelCoeffs_.found("couplingFactor"))
if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0)
{
turbulenceModelCoeffs_.lookup("couplingFactor") >> couplingFactor_;
if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0)
{
FatalErrorIn
(
"LRR::LRR"
"(const volVectorField& U, const surfaceScalarField& phi,"
"incompressibleTransportModel& lamTransportModel)"
) << "couplingFactor = " << couplingFactor_
<< " is not in range 0 - 1"
<< exit(FatalError);
}
FatalErrorIn
(
"LRR::LRR"
"(const volVectorField& U, const surfaceScalarField& phi,"
"incompressibleTransportModel& lamTransportModel)"
) << "couplingFactor = " << couplingFactor_
<< " is not in range 0 - 1" << nl
<< exit(FatalError);
}
}
......@@ -191,24 +192,31 @@ bool LRR::read()
{
if (turbulenceModel::read())
{
turbulenceModelCoeffs_.lookup("Cmu") >> Cmu;
turbulenceModelCoeffs_.lookup("Clrr1") >> Clrr1;
turbulenceModelCoeffs_.lookup("Clrr2") >> Clrr2;
turbulenceModelCoeffs_.lookup("C1") >> C1;
turbulenceModelCoeffs_.lookup("C2") >> C2;
turbulenceModelCoeffs_.lookup("Cs") >> Cs;
turbulenceModelCoeffs_.lookup("Ceps") >> Ceps;
turbulenceModelCoeffs_.lookup("alphaR") >> alphaR;
turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps;
turbulenceModelCoeffs_.lookup("alphah") >> alphah;
turbulenceModelCoeffs_.lookup("couplingFactor") >> couplingFactor_;
Cmu = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cmu", 0.09);
Clrr1 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Clrr1", 1.8);
Clrr2 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Clrr2", 0.6);
C1 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("C1", 1.44);
C2 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("C2", 1.92);
Cs = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cs", 0.25);
Ceps = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Ceps", 0.15);
alphaR = turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphaR", 1.22);
alphaEps = turbulenceModelCoeffs_.lookupOrDefault<scalar>
(
"alphaEps",
0.76923
);
alphah = turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphah", 1.0);
couplingFactor_ = turbulenceModelCoeffs_.lookupOrDefault<scalar>
(
"couplingFactor",
0.0
);
if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0)
{
FatalErrorIn("LRR::read()")
<< "couplingFactor = " << couplingFactor_
<< " is not in range 0 - 1"
<< " is not in range 0 - 1" << nl
<< exit(FatalError);
}
......
......@@ -57,19 +57,25 @@ LaunderGibsonRSTM::LaunderGibsonRSTM
:
turbulenceModel(typeName, rho, U, phi, thermophysicalModel),
Cmu(turbulenceModelCoeffs_.lookup("Cmu")),
Clg1(turbulenceModelCoeffs_.lookup("Clg1")),
Clg2(turbulenceModelCoeffs_.lookup("Clg2")),
C1(turbulenceModelCoeffs_.lookup("C1")),
C2(turbulenceModelCoeffs_.lookup("C2")),
Cs(turbulenceModelCoeffs_.lookup("Cs")),
Ceps(turbulenceModelCoeffs_.lookup("Ceps")),
C1Ref(turbulenceModelCoeffs_.lookup("C1Ref")),
C2Ref(turbulenceModelCoeffs_.lookup("C2Ref")),
couplingFactor_(0.0),
alphaR(turbulenceModelCoeffs_.lookup("alphaR")),
alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")),
alphah(turbulenceModelCoeffs_.lookup("alphah")),
Cmu(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cmu", 0.09)),
Clg1(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Clg1", 1.8)),
Clg2(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Clg2", 0.6)),
C1(turbulenceModelCoeffs_.lookupOrDefault<scalar>("C1", 1.44)),
C2(turbulenceModelCoeffs_.lookupOrDefault<scalar>("C2", 1.92)),
Cs(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cs", 0.25)),
Ceps(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Ceps", 0.15)),
C1Ref(turbulenceModelCoeffs_.lookupOrDefault<scalar>("C1Ref", 0.5)),
C2Ref(turbulenceModelCoeffs_.lookupOrDefault<scalar>("C2Ref", 0.3)),
couplingFactor_
(
turbulenceModelCoeffs_.lookupOrDefault<scalar>("couplingFactor", 0.0)
),
alphaR(turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphaR", 1.22)),
alphaEps
(
turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphaEps", 0.76923)
),
alphah(turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphah", 1.0)),
y_(mesh_),
......@@ -127,21 +133,16 @@ LaunderGibsonRSTM::LaunderGibsonRSTM
{
# include "wallViscosityI.H"
if (turbulenceModelCoeffs_.found("couplingFactor"))
if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0)
{
turbulenceModelCoeffs_.lookup("couplingFactor") >> couplingFactor_;
if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0)
{
FatalErrorIn
(
"LaunderGibsonRSTM::LaunderGibsonRSTM"
"(const volVectorField& U, const surfaceScalarField& phi,"
"incompressibleTransportModel& lamTransportModel)"
) << "couplingFactor = " << couplingFactor_
<< " is not in range 0 - 1"
<< exit(FatalError);
}
FatalErrorIn
(
"LaunderGibsonRSTM::LaunderGibsonRSTM"
"(const volVectorField& U, const surfaceScalarField& phi,"
"incompressibleTransportModel& lamTransportModel)"
) << "couplingFactor = " << couplingFactor_
<< " is not in range 0 - 1" << nl
<< exit(FatalError);
}
}
......@@ -197,26 +198,34 @@ bool LaunderGibsonRSTM::read()
{
if (turbulenceModel::read())
{
turbulenceModelCoeffs_.lookup("Cmu") >> Cmu;
turbulenceModelCoeffs_.lookup("Clg1") >> Clg1;
turbulenceModelCoeffs_.lookup("Clg2") >> Clg2;
turbulenceModelCoeffs_.lookup("C1") >> C1;
turbulenceModelCoeffs_.lookup("C2") >> C2;
turbulenceModelCoeffs_.lookup("Cs") >> Cs;
turbulenceModelCoeffs_.lookup("Ceps") >> Ceps;
turbulenceModelCoeffs_.lookup("C1Ref") >> C1Ref;
turbulenceModelCoeffs_.lookup("C2Ref") >> C2Ref;
turbulenceModelCoeffs_.lookup("alphaR") >> alphaR;
turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps;
turbulenceModelCoeffs_.lookup("alphah") >> alphah;
turbulenceModelCoeffs_.lookup("couplingFactor") >> couplingFactor_;
Cmu = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cmu", 0.09);
Clg1 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Clg1", 1.8);
Clg2 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Clg2", 0.6);
C1 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("C1", 1.44);
C2 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("C2", 1.92);
Cs = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cs", 0.25);
Ceps = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Ceps", 0.15);
C1Ref = turbulenceModelCoeffs_.lookupOrDefault<scalar>("C1Ref", 0.5);
C2Ref = turbulenceModelCoeffs_.lookupOrDefault<scalar>("C2Ref", 0.3);
alphaR = turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphaR", 1.22);
alphaEps = turbulenceModelCoeffs_.lookupOrDefault<scalar>
(
"alphaEps",
0.76923
);
alphah = turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphah", 1.0);
couplingFactor_ = turbulenceModelCoeffs_.lookupOrDefault<scalar>
(
"couplingFactor",
0.0
);
if (couplingFactor_ < 0.0 || couplingFactor_ > 1.0)
{
FatalErrorIn("LaunderGibsonRSTM::read()")
<< "couplingFactor = " << couplingFactor_
<< " is not in range 0 - 1"
<< " is not in range 0 - 1" << nl
<< exit(FatalError);
}
......
......@@ -52,7 +52,7 @@ tmp<volScalarField> LaunderSharmaKE::fMu() const
tmp<volScalarField> LaunderSharmaKE::f2() const
{
return
return
scalar(1)
- 0.3*exp(-min(sqr(rho_*sqr(k_)/(mu()*epsilon_)), scalar(50.0)));
}
......@@ -71,13 +71,16 @@ LaunderSharmaKE::LaunderSharmaKE
:
turbulenceModel(typeName, rho, U, phi, thermophysicalModel),
Cmu(turbulenceModelCoeffs_.lookup("Cmu")),
C1(turbulenceModelCoeffs_.lookup("C1")),
C2(turbulenceModelCoeffs_.lookup("C2")),
C3(turbulenceModelCoeffs_.lookup("C3")),
alphak(turbulenceModelCoeffs_.lookup("alphak")),
alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")),
alphah(turbulenceModelCoeffs_.lookup("alphah")),
Cmu(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cmu", 0.09)),
C1(turbulenceModelCoeffs_.lookupOrDefault<scalar>("C1", 1.44)),
C2(turbulenceModelCoeffs_.lookupOrDefault<scalar>("C2", 1.92)),
C3(turbulenceModelCoeffs_.lookupOrDefault<scalar>("C3", -0.33)),
alphak(turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphak", 1.0)),
alphaEps
(
turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphaEps", 0.76923)
),
alphah(turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphah", 1.0)),
k_
(
......@@ -176,12 +179,16 @@ bool LaunderSharmaKE::read()
{
if (turbulenceModel::read())
{
turbulenceModelCoeffs_.lookup("Cmu") >> Cmu;
turbulenceModelCoeffs_.lookup("C1") >> C1;
turbulenceModelCoeffs_.lookup("C2") >> C2;
turbulenceModelCoeffs_.lookup("C3") >> C3;
turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps;
turbulenceModelCoeffs_.lookup("alphah") >> alphah;
Cmu = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cmu", 0.09);
C1 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("C1", 1.44);
C2 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("C2", 1.92);
C3 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("C3", -0.33);
alphaEps = turbulenceModelCoeffs_.lookupOrDefault<scalar>
(
"alphaEps",
0.76923
);
alphah = turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphah", 1.0);
return true;
}
......
......@@ -55,15 +55,15 @@ RNGkEpsilon::RNGkEpsilon
:
turbulenceModel(typeName, rho, U, phi, thermophysicalModel),
Cmu(turbulenceModelCoeffs_.lookup("Cmu")),
C1(turbulenceModelCoeffs_.lookup("C1")),
C2(turbulenceModelCoeffs_.lookup("C2")),
C3(turbulenceModelCoeffs_.lookup("C3")),
alphak(turbulenceModelCoeffs_.lookup("alphak")),
alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")),
alphah(turbulenceModelCoeffs_.lookup("alphah")),
eta0(turbulenceModelCoeffs_.lookup("eta0")),
beta(turbulenceModelCoeffs_.lookup("beta")),
Cmu(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cmu", 0.0845)),
C1(turbulenceModelCoeffs_.lookupOrDefault<scalar>("C1", 1.42)),
C2(turbulenceModelCoeffs_.lookupOrDefault<scalar>("C2", 1.68)),
C3(turbulenceModelCoeffs_.lookupOrDefault<scalar>("C3", -0.33)),
alphak(turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphak", 1.39)),
alphaEps(turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphaEps", 1.39)),
alphah(turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphah", 1.0)),
eta0(turbulenceModelCoeffs_.lookupOrDefault<scalar>("eta0", 4.38)),
beta(turbulenceModelCoeffs_.lookupOrDefault<scalar>("beta", 0.012)),
k_
(
......@@ -164,15 +164,19 @@ bool RNGkEpsilon::read()
{
if (turbulenceModel::read())
{
turbulenceModelCoeffs_.lookup("Cmu") >> Cmu;
turbulenceModelCoeffs_.lookup("C1") >> C1;
turbulenceModelCoeffs_.lookup("C2") >> C2;
turbulenceModelCoeffs_.lookup("C3") >> C3;
turbulenceModelCoeffs_.lookup("alphak") >> alphak;
turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps;
turbulenceModelCoeffs_.lookup("alphah") >> alphah;
turbulenceModelCoeffs_.lookup("eta0") >> eta0;
turbulenceModelCoeffs_.lookup("beta") >> beta;
Cmu = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cmu", 0.0845);
C1 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("C1", 1.42);
C2 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("C2", 1.68);
C3 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("C3", -0.33);
alphak = turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphak", 1.39);
alphaEps = turbulenceModelCoeffs_.lookupOrDefault<scalar>
(
"alphaEps",
1.39
);
alphah = turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphah", 1.0);
eta0 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("eta0", 4.38);
beta = turbulenceModelCoeffs_.lookupOrDefault<scalar>("beta", 0.012);
return true;
}
......@@ -210,7 +214,7 @@ void RNGkEpsilon::correct()
volScalarField eta = sqrt(mag(S2))*k_/epsilon_;
volScalarField eta3 = eta*sqr(eta);
volScalarField R =
volScalarField R =
((eta*(-eta/eta0 + scalar(1)))/(beta*eta3 + scalar(1)));
# include "wallFunctionsI.H"
......
......@@ -115,16 +115,16 @@ SpalartAllmaras::SpalartAllmaras
:
turbulenceModel(typeName, rho, U, phi, thermophysicalModel),
alphaNut(turbulenceModelCoeffs_.lookup("alphaNut")),
alphah(turbulenceModelCoeffs_.lookup("alphah")),
alphaNut(turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphaNut", 1.5)),
alphah(turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphah", 1.0)),
Cb1(turbulenceModelCoeffs_.lookup("Cb1")),
Cb2(turbulenceModelCoeffs_.lookup("Cb2")),
Cb1(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cb1", 0.1355)),
Cb2(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cb2", 0.622)),
Cw1(Cb1/sqr(kappa_) + alphaNut*(1.0 + Cb2)),
Cw2(turbulenceModelCoeffs_.lookup("Cw2")),
Cw3(turbulenceModelCoeffs_.lookup("Cw3")),
Cv1(turbulenceModelCoeffs_.lookup("Cv1")),
Cv2(turbulenceModelCoeffs_.lookup("Cv2")),
Cw2(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cw2", 0.3)),
Cw3(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cw3", 2.0)),
Cv1(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cv1", 7.1)),
Cv2(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cv2", 5.0)),
nuTilda_
(
......@@ -214,16 +214,20 @@ bool SpalartAllmaras::read()
{
if (turbulenceModel::read())
{
turbulenceModelCoeffs_.lookup("alphaNut") >> alphaNut;
turbulenceModelCoeffs_.lookup("alphah") >> alphah;
alphaNut = turbulenceModelCoeffs_.lookupOrDefault<scalar>
(
"alphaNut",
1.5
);
alphah = turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphah", 1.0);
turbulenceModelCoeffs_.lookup("Cb1") >> Cb1;
turbulenceModelCoeffs_.lookup("Cb2") >> Cb2;
Cb1 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cb1", 0.1355);
Cb2 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cb2", 0.622);
Cw1 = Cb1/sqr(kappa_) + alphaNut*(1.0 + Cb2);
turbulenceModelCoeffs_.lookup("Cw2") >> Cw2;
turbulenceModelCoeffs_.lookup("Cw3") >> Cw3;
turbulenceModelCoeffs_.lookup("Cv1") >> Cv1;
turbulenceModelCoeffs_.lookup("Cv2") >> Cv2;
Cw2 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cw2", 0.3);
Cw3 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cw3", 2.0);
Cv1 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cv1", 7.1);
Cv2 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cv2", 5.0);
return true;
}
......
......@@ -54,13 +54,16 @@ kEpsilon::kEpsilon
:
turbulenceModel(typeName, rho, U, phi, thermophysicalModel),
Cmu(turbulenceModelCoeffs_.lookup("Cmu")),
C1(turbulenceModelCoeffs_.lookup("C1")),
C2(turbulenceModelCoeffs_.lookup("C2")),
C3(turbulenceModelCoeffs_.lookup("C3")),
alphak(turbulenceModelCoeffs_.lookup("alphak")),
alphaEps(turbulenceModelCoeffs_.lookup("alphaEps")),
alphah(turbulenceModelCoeffs_.lookup("alphah")),
Cmu(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cmu", 0.09)),
C1(turbulenceModelCoeffs_.lookupOrDefault<scalar>("C1", 1.44)),
C2(turbulenceModelCoeffs_.lookupOrDefault<scalar>("C2", 1.92)),
C3(turbulenceModelCoeffs_.lookupOrDefault<scalar>("C3", -0.33)),
alphak(turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphak", 1.0)),
alphaEps
(
turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphaEps", 0.76923)
),
alphah(turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphah", 1.0)),
k_
(
......@@ -162,13 +165,17 @@ bool kEpsilon::read()
{
if (turbulenceModel::read())
{
turbulenceModelCoeffs_.lookup("Cmu") >> Cmu;
turbulenceModelCoeffs_.lookup("C1") >> C1;
turbulenceModelCoeffs_.lookup("C2") >> C2;
turbulenceModelCoeffs_.lookup("C3") >> C3;
turbulenceModelCoeffs_.lookup("alphak") >> alphak;
turbulenceModelCoeffs_.lookup("alphaEps") >> alphaEps;
turbulenceModelCoeffs_.lookup("alphah") >> alphah;
Cmu = turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cmu", 0.09);
C1 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("C1", 1.44);
C2 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("C2", 1.92);
C3 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("C3", -0.33);
alphak = turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphak", 1.0);
alphaEps = turbulenceModelCoeffs_.lookupOrDefault<scalar>
(
"alphaEps",
0.76923
);
alphah = turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphah", 1.0);
return true;
}
......@@ -232,7 +239,7 @@ void kEpsilon::correct()
+ fvm::div(phi_, k_)
- fvm::laplacian(DkEff(), k_)
==
G
G
- fvm::SuSp((2.0/3.0)*rho_*divU, k_)
- fvm::Sp(rho_*epsilon_/k_, k_)
);
......
......@@ -97,23 +97,32 @@ kOmegaSST::kOmegaSST
:
turbulenceModel(typeName, rho, U, phi, thermophysicalModel),
alphaK1(turbulenceModelCoeffs_.lookup("alphaK1")),
alphaK2(turbulenceModelCoeffs_.lookup("alphaK2")),
alphaOmega1(turbulenceModelCoeffs_.lookup("alphaOmega1")),
alphaOmega2(turbulenceModelCoeffs_.lookup("alphaOmega2")),
alphah(turbulenceModelCoeffs_.lookup("alphah")),
gamma1(turbulenceModelCoeffs_.lookup("gamma1")),
gamma2(turbulenceModelCoeffs_.lookup("gamma2")),
beta1(turbulenceModelCoeffs_.lookup("beta1")),
beta2(turbulenceModelCoeffs_.lookup("beta2")),
betaStar(turbulenceModelCoeffs_.lookup("betaStar")),
a1(turbulenceModelCoeffs_.lookup("a1")),
c1(turbulenceModelCoeffs_.lookup("c1")),
alphaK1
(
turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphaK1", 0.85034)
),
alphaK2(turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphaK2", 1.0)),
alphaOmega1
(
turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphaOmega1", 0.5)
),
alphaOmega2
(
turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphaOmega2", 0.85616)
),
alphah(turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphah", 1.0)),
gamma1(turbulenceModelCoeffs_.lookupOrDefault<scalar>("gamma1", 0.5532)),
gamma2(turbulenceModelCoeffs_.lookupOrDefault<scalar>("gamma2", 0.4403)),
beta1(turbulenceModelCoeffs_.lookupOrDefault<scalar>("beta1", 0.075)),
beta2(turbulenceModelCoeffs_.lookupOrDefault<scalar>("beta2", 0.0828)),
betaStar(turbulenceModelCoeffs_.lookupOrDefault<scalar>("betaStar", 0.09)),
a1(turbulenceModelCoeffs_.lookupOrDefault<scalar>("a1", 0.31)),
c1(turbulenceModelCoeffs_.lookupOrDefault<scalar>("c1", 10.0)),
omega0_("omega0", dimless/dimTime, SMALL),
omegaSmall_("omegaSmall", dimless/dimTime, SMALL),
Cmu(turbulenceModelCoeffs_.lookup("Cmu")),
Cmu(turbulenceModelCoeffs_.lookupOrDefault<scalar>("Cmu", 0.09)),
y_(mesh_),
......@@ -216,19 +225,43 @@ bool kOmegaSST::read()
{
if (turbulenceModel::read())
{
turbulenceModelCoeffs_.lookup("alphaK1") >> alphaK1;
turbulenceModelCoeffs_.lookup("alphaK2") >> alphaK2;
turbulenceModelCoeffs_.lookup("alphaOmega1") >> alphaOmega1;
turbulenceModelCoeffs_.lookup("alphaOmega2") >> alphaOmega2;
turbulenceModelCoeffs_.lookup("alphah") >> alphah;
turbulenceModelCoeffs_.lookup("gamma1") >> gamma1;
turbulenceModelCoeffs_.lookup("gamma2") >> gamma2;
turbulenceModelCoeffs_.lookup("beta1") >> beta1;
turbulenceModelCoeffs_.lookup("beta2") >> beta2;
turbulenceModelCoeffs_.lookup("betaStar") >> betaStar;
turbulenceModelCoeffs_.lookup("a1") >> a1;
turbulenceModelCoeffs_.lookup("c1") >> c1;
turbulenceModelCoeffs_.lookup("Cmu") >> Cmu;
alphaK1 = turbulenceModelCoeffs_.lookupOrDefault<scalar>
(
"alphaK1",
0.85034
);
alphaK2 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphaK2", 1.0);
alphaOmega1 = turbulenceModelCoeffs_.lookupOrDefault<scalar>
(
"alphaOmega1",
0.5
);
alphaOmega2 = turbulenceModelCoeffs_.lookupOrDefault<scalar>
(
"alphaOmega2",
0.85616
);
alphah = turbulenceModelCoeffs_.lookupOrDefault<scalar>("alphah", 1.0);
gamma1 = turbulenceModelCoeffs_.lookupOrDefault<scalar>
(
"gamma1",
0.5532
);
gamma2 = turbulenceModelCoeffs_.lookupOrDefault<scalar>
(
"gamma2",
0.4403
);
beta1 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("beta1", 0.075);
beta2 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("beta2", 0.0828);
betaStar = turbulenceModelCoeffs_.lookupOrDefault<scalar>
(
"betaStar",
0.09
);
a1 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("a1", 0.31);
c1 = turbulenceModelCoeffs_.lookupOrDefault<scalar>("c1", 10.0);