mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
promoted omega0 and omegaSmall to RASModel to be consistent with epsilon0 and epsilon0
- removed Cmu from kOmegaSST models - not used - general tidying up
This commit is contained in:
@ -125,6 +125,8 @@ RASModel::RASModel
|
||||
k0_("k0", dimVelocity*dimVelocity, SMALL),
|
||||
epsilon0_("epsilon", k0_.dimensions()/dimTime, SMALL),
|
||||
epsilonSmall_("epsilonSmall", epsilon0_.dimensions(), SMALL),
|
||||
omega0_("omega", dimless/dimTime, SMALL),
|
||||
omegaSmall_("omegaSmall", omega0_.dimensions(), SMALL),
|
||||
|
||||
y_(mesh_)
|
||||
{}
|
||||
@ -204,6 +206,8 @@ bool RASModel::read()
|
||||
k0_.readIfPresent(*this);
|
||||
epsilon0_.readIfPresent(*this);
|
||||
epsilonSmall_.readIfPresent(*this);
|
||||
omega0_.readIfPresent(*this);
|
||||
omegaSmall_.readIfPresent(*this);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -80,22 +80,47 @@ protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Turbulence on/off flag
|
||||
Switch turbulence_;
|
||||
|
||||
//- Flag to print the model coeffs at run-time
|
||||
Switch printCoeffs_;
|
||||
|
||||
//- Model coefficients dictionary
|
||||
dictionary coeffDict_;
|
||||
|
||||
dictionary wallFunctionDict_;
|
||||
dimensionedScalar kappa_;
|
||||
dimensionedScalar E_;
|
||||
dimensionedScalar Cmu_;
|
||||
dimensionedScalar Prt_;
|
||||
// Wall function properties
|
||||
|
||||
//- Wall function dictionary
|
||||
dictionary wallFunctionDict_;
|
||||
|
||||
dimensionedScalar kappa_;
|
||||
|
||||
dimensionedScalar E_;
|
||||
|
||||
dimensionedScalar Cmu_;
|
||||
|
||||
dimensionedScalar Prt_;
|
||||
|
||||
//- Value of y+ at the edge of the laminar sublayer
|
||||
scalar yPlusLam_;
|
||||
|
||||
//- Lower limit of k
|
||||
dimensionedScalar k0_;
|
||||
|
||||
//- Lower limit of epsilon
|
||||
dimensionedScalar epsilon0_;
|
||||
|
||||
//- Small epsilon value used to avoid divide by zero
|
||||
dimensionedScalar epsilonSmall_;
|
||||
|
||||
//- Lower limit for omega
|
||||
dimensionedScalar omega0_;
|
||||
|
||||
//- Small omega value used to avoid divide by zero
|
||||
dimensionedScalar omegaSmall_;
|
||||
|
||||
//- Near wall distance boundary field
|
||||
nearWallDist y_;
|
||||
|
||||
|
||||
@ -193,6 +218,19 @@ public:
|
||||
return epsilonSmall_;
|
||||
}
|
||||
|
||||
//- Return the value of omega0 which epsilon is not allowed to be
|
||||
// less than
|
||||
const dimensionedScalar& omega0() const
|
||||
{
|
||||
return omega0_;
|
||||
}
|
||||
|
||||
//- Return the value of omegaSmall which is added to epsilon when
|
||||
// calculating nut
|
||||
const dimensionedScalar& omegaSmall() const
|
||||
{
|
||||
return omegaSmall_;
|
||||
}
|
||||
|
||||
//- Allow k0 to be changed
|
||||
dimensionedScalar& k0()
|
||||
@ -212,6 +250,17 @@ public:
|
||||
return epsilonSmall_;
|
||||
}
|
||||
|
||||
//- Allow omega0 to be changed
|
||||
dimensionedScalar& omega0()
|
||||
{
|
||||
return omega0_;
|
||||
}
|
||||
|
||||
//- Allow omegaSmall to be changed
|
||||
dimensionedScalar& omegaSmall()
|
||||
{
|
||||
return omegaSmall_;
|
||||
}
|
||||
|
||||
//- Return kappa for use in wall-functions
|
||||
dimensionedScalar kappa() const
|
||||
|
||||
@ -208,19 +208,6 @@ kOmegaSST::kOmegaSST
|
||||
)
|
||||
),
|
||||
|
||||
omega0_("omega0", dimless/dimTime, SMALL),
|
||||
omegaSmall_("omegaSmall", dimless/dimTime, SMALL),
|
||||
|
||||
Cmu_
|
||||
(
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"Cmu",
|
||||
coeffDict_,
|
||||
0.09
|
||||
)
|
||||
),
|
||||
|
||||
y_(mesh_),
|
||||
|
||||
k_
|
||||
@ -350,7 +337,6 @@ bool kOmegaSST::read()
|
||||
betaStar_.readIfPresent(coeffDict_);
|
||||
a1_.readIfPresent(coeffDict_);
|
||||
c1_.readIfPresent(coeffDict_);
|
||||
Cmu_.readIfPresent(coeffDict_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -56,7 +56,6 @@ Description
|
||||
@verbatim
|
||||
kOmegaSST
|
||||
{
|
||||
Cmu 0.09;
|
||||
alphaK1 0.85034;
|
||||
alphaK2 1.0;
|
||||
alphaOmega1 0.5;
|
||||
@ -96,7 +95,7 @@ namespace RASModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class kOmega Declaration
|
||||
Class kOmegaSST Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class kOmegaSST
|
||||
@ -105,36 +104,38 @@ class kOmegaSST
|
||||
{
|
||||
// Private data
|
||||
|
||||
dimensionedScalar alphaK1_;
|
||||
dimensionedScalar alphaK2_;
|
||||
// Model coefficients
|
||||
|
||||
dimensionedScalar alphaOmega1_;
|
||||
dimensionedScalar alphaOmega2_;
|
||||
dimensionedScalar alphaK1_;
|
||||
dimensionedScalar alphaK2_;
|
||||
|
||||
dimensionedScalar alphah_;
|
||||
dimensionedScalar alphaOmega1_;
|
||||
dimensionedScalar alphaOmega2_;
|
||||
|
||||
dimensionedScalar gamma1_;
|
||||
dimensionedScalar gamma2_;
|
||||
dimensionedScalar alphah_;
|
||||
|
||||
dimensionedScalar beta1_;
|
||||
dimensionedScalar beta2_;
|
||||
dimensionedScalar gamma1_;
|
||||
dimensionedScalar gamma2_;
|
||||
|
||||
dimensionedScalar betaStar_;
|
||||
dimensionedScalar beta1_;
|
||||
dimensionedScalar beta2_;
|
||||
|
||||
dimensionedScalar a1_;
|
||||
dimensionedScalar c1_;
|
||||
dimensionedScalar betaStar_;
|
||||
|
||||
dimensionedScalar omega0_;
|
||||
dimensionedScalar omegaSmall_;
|
||||
dimensionedScalar a1_;
|
||||
dimensionedScalar c1_;
|
||||
|
||||
dimensionedScalar Cmu_;
|
||||
|
||||
//- Wall distance
|
||||
// Note: different to wall distance in parent RASModel
|
||||
wallDist y_;
|
||||
|
||||
volScalarField k_;
|
||||
volScalarField omega_;
|
||||
volScalarField mut_;
|
||||
volScalarField alphat_;
|
||||
// Fields
|
||||
|
||||
volScalarField k_;
|
||||
volScalarField omega_;
|
||||
volScalarField mut_;
|
||||
volScalarField alphat_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
|
||||
@ -115,6 +115,8 @@ RASModel::RASModel
|
||||
k0_("k0", dimVelocity*dimVelocity, SMALL),
|
||||
epsilon0_("epsilon", k0_.dimensions()/dimTime, SMALL),
|
||||
epsilonSmall_("epsilonSmall", epsilon0_.dimensions(), SMALL),
|
||||
omega0_("omega0", dimless/dimTime, SMALL),
|
||||
omegaSmall_("omegaSmall", omega0_.dimensions(), SMALL),
|
||||
|
||||
y_(mesh_)
|
||||
{}
|
||||
@ -250,6 +252,8 @@ bool RASModel::read()
|
||||
k0_.readIfPresent(*this);
|
||||
epsilon0_.readIfPresent(*this);
|
||||
epsilonSmall_.readIfPresent(*this);
|
||||
omega0_.readIfPresent(*this);
|
||||
omegaSmall_.readIfPresent(*this);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -77,21 +77,45 @@ protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Turbulence on/off flag
|
||||
Switch turbulence_;
|
||||
|
||||
//- Flag to print the model coeffs at run-time
|
||||
Switch printCoeffs_;
|
||||
|
||||
//- Model coefficients dictionary
|
||||
dictionary coeffDict_;
|
||||
|
||||
dictionary wallFunctionDict_;
|
||||
dimensionedScalar kappa_;
|
||||
dimensionedScalar E_;
|
||||
dimensionedScalar Cmu_;
|
||||
// Wall function properties
|
||||
|
||||
//- Wall function dictionary
|
||||
dictionary wallFunctionDict_;
|
||||
|
||||
dimensionedScalar kappa_;
|
||||
|
||||
dimensionedScalar E_;
|
||||
|
||||
dimensionedScalar Cmu_;
|
||||
|
||||
//- Value of y+ at the edge of the laminar sublayer
|
||||
scalar yPlusLam_;
|
||||
|
||||
//- Lower limit of k
|
||||
dimensionedScalar k0_;
|
||||
|
||||
//- Lower limit of epsilon
|
||||
dimensionedScalar epsilon0_;
|
||||
|
||||
//- Small epsilon value used to avoid divide by zero
|
||||
dimensionedScalar epsilonSmall_;
|
||||
|
||||
//- Lower limit for omega
|
||||
dimensionedScalar omega0_;
|
||||
|
||||
//- Small omega value used to avoid divide by zero
|
||||
dimensionedScalar omegaSmall_;
|
||||
|
||||
//- Near wall distance boundary field
|
||||
nearWallDist y_;
|
||||
|
||||
|
||||
@ -183,6 +207,20 @@ public:
|
||||
return epsilonSmall_;
|
||||
}
|
||||
|
||||
//- Return the value of omega0 which epsilon is not allowed to be
|
||||
// less than
|
||||
const dimensionedScalar& omega0() const
|
||||
{
|
||||
return omega0_;
|
||||
}
|
||||
|
||||
//- Return the value of omegaSmall which is added to epsilon when
|
||||
// calculating nut
|
||||
const dimensionedScalar& omegaSmall() const
|
||||
{
|
||||
return omegaSmall_;
|
||||
}
|
||||
|
||||
//- Allow k0 to be changed
|
||||
dimensionedScalar& k0()
|
||||
{
|
||||
@ -201,6 +239,18 @@ public:
|
||||
return epsilonSmall_;
|
||||
}
|
||||
|
||||
//- Allow omega0 to be changed
|
||||
dimensionedScalar& omega0()
|
||||
{
|
||||
return omega0_;
|
||||
}
|
||||
|
||||
//- Allow omegaSmall to be changed
|
||||
dimensionedScalar& omegaSmall()
|
||||
{
|
||||
return omegaSmall_;
|
||||
}
|
||||
|
||||
//- Return kappa for use in wall-functions
|
||||
dimensionedScalar kappa() const
|
||||
{
|
||||
|
||||
@ -101,9 +101,6 @@ kOmega::kOmega
|
||||
)
|
||||
),
|
||||
|
||||
omega0_("omega0", dimless/dimTime, SMALL),
|
||||
omegaSmall_("omegaSmall", dimless/dimTime, SMALL),
|
||||
|
||||
k_
|
||||
(
|
||||
IOobject
|
||||
@ -271,7 +268,7 @@ void kOmega::correct()
|
||||
|
||||
|
||||
// Re-calculate viscosity
|
||||
nut_ == k_/omega_;
|
||||
nut_ == k_/(omega_ + omegaSmall_);
|
||||
nut_.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
|
||||
@ -90,10 +90,6 @@ class kOmega
|
||||
dimensionedScalar alphaOmega_;
|
||||
|
||||
|
||||
dimensionedScalar omega0_;
|
||||
dimensionedScalar omegaSmall_;
|
||||
|
||||
|
||||
// Fields
|
||||
|
||||
volScalarField k_;
|
||||
|
||||
@ -198,19 +198,6 @@ kOmegaSST::kOmegaSST
|
||||
)
|
||||
),
|
||||
|
||||
omega0_("omega0", dimless/dimTime, SMALL),
|
||||
omegaSmall_("omegaSmall", dimless/dimTime, SMALL),
|
||||
|
||||
Cmu_
|
||||
(
|
||||
dimensioned<scalar>::lookupOrAddToDict
|
||||
(
|
||||
"Cmu",
|
||||
coeffDict_,
|
||||
0.09
|
||||
)
|
||||
),
|
||||
|
||||
y_(mesh_),
|
||||
|
||||
k_
|
||||
@ -331,7 +318,6 @@ bool kOmegaSST::read()
|
||||
betaStar_.readIfPresent(coeffDict_);
|
||||
a1_.readIfPresent(coeffDict_);
|
||||
c1_.readIfPresent(coeffDict_);
|
||||
Cmu_.readIfPresent(coeffDict_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -57,7 +57,6 @@ Description
|
||||
@verbatim
|
||||
kOmegaSST
|
||||
{
|
||||
Cmu 0.09;
|
||||
alphaK1 0.85034;
|
||||
alphaK2 1.0;
|
||||
alphaOmega1 0.5;
|
||||
@ -103,33 +102,33 @@ class kOmegaSST
|
||||
{
|
||||
// Private data
|
||||
|
||||
dimensionedScalar alphaK1_;
|
||||
dimensionedScalar alphaK2_;
|
||||
// Model coefficients
|
||||
dimensionedScalar alphaK1_;
|
||||
dimensionedScalar alphaK2_;
|
||||
|
||||
dimensionedScalar alphaOmega1_;
|
||||
dimensionedScalar alphaOmega2_;
|
||||
dimensionedScalar alphaOmega1_;
|
||||
dimensionedScalar alphaOmega2_;
|
||||
|
||||
dimensionedScalar gamma1_;
|
||||
dimensionedScalar gamma2_;
|
||||
dimensionedScalar gamma1_;
|
||||
dimensionedScalar gamma2_;
|
||||
|
||||
dimensionedScalar beta1_;
|
||||
dimensionedScalar beta2_;
|
||||
dimensionedScalar beta1_;
|
||||
dimensionedScalar beta2_;
|
||||
|
||||
dimensionedScalar betaStar_;
|
||||
dimensionedScalar betaStar_;
|
||||
|
||||
dimensionedScalar a1_;
|
||||
dimensionedScalar c1_;
|
||||
|
||||
dimensionedScalar omega0_;
|
||||
dimensionedScalar omegaSmall_;
|
||||
|
||||
dimensionedScalar Cmu_;
|
||||
dimensionedScalar a1_;
|
||||
dimensionedScalar c1_;
|
||||
|
||||
//- Wall distance field
|
||||
// Note: different to wall distance in parent RASModel
|
||||
wallDist y_;
|
||||
|
||||
volScalarField k_;
|
||||
volScalarField omega_;
|
||||
volScalarField nut_;
|
||||
// Fields
|
||||
|
||||
volScalarField k_;
|
||||
volScalarField omega_;
|
||||
volScalarField nut_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
|
||||
Reference in New Issue
Block a user