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:
andy
2009-01-22 10:42:48 +00:00
parent 0b859cba7d
commit 8ccd361f56
10 changed files with 158 additions and 86 deletions

View File

@ -125,6 +125,8 @@ RASModel::RASModel
k0_("k0", dimVelocity*dimVelocity, SMALL), k0_("k0", dimVelocity*dimVelocity, SMALL),
epsilon0_("epsilon", k0_.dimensions()/dimTime, SMALL), epsilon0_("epsilon", k0_.dimensions()/dimTime, SMALL),
epsilonSmall_("epsilonSmall", epsilon0_.dimensions(), SMALL), epsilonSmall_("epsilonSmall", epsilon0_.dimensions(), SMALL),
omega0_("omega", dimless/dimTime, SMALL),
omegaSmall_("omegaSmall", omega0_.dimensions(), SMALL),
y_(mesh_) y_(mesh_)
{} {}
@ -204,6 +206,8 @@ bool RASModel::read()
k0_.readIfPresent(*this); k0_.readIfPresent(*this);
epsilon0_.readIfPresent(*this); epsilon0_.readIfPresent(*this);
epsilonSmall_.readIfPresent(*this); epsilonSmall_.readIfPresent(*this);
omega0_.readIfPresent(*this);
omegaSmall_.readIfPresent(*this);
return true; return true;
} }

View File

@ -80,22 +80,47 @@ protected:
// Protected data // Protected data
//- Turbulence on/off flag
Switch turbulence_; Switch turbulence_;
//- Flag to print the model coeffs at run-time
Switch printCoeffs_; Switch printCoeffs_;
//- Model coefficients dictionary
dictionary coeffDict_; dictionary coeffDict_;
dictionary wallFunctionDict_; // Wall function properties
dimensionedScalar kappa_;
dimensionedScalar E_;
dimensionedScalar Cmu_;
dimensionedScalar Prt_;
//- 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_; scalar yPlusLam_;
//- Lower limit of k
dimensionedScalar k0_; dimensionedScalar k0_;
//- Lower limit of epsilon
dimensionedScalar epsilon0_; dimensionedScalar epsilon0_;
//- Small epsilon value used to avoid divide by zero
dimensionedScalar epsilonSmall_; 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_; nearWallDist y_;
@ -193,6 +218,19 @@ public:
return epsilonSmall_; 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 //- Allow k0 to be changed
dimensionedScalar& k0() dimensionedScalar& k0()
@ -212,6 +250,17 @@ public:
return epsilonSmall_; 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 //- Return kappa for use in wall-functions
dimensionedScalar kappa() const dimensionedScalar kappa() const

View File

@ -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_), y_(mesh_),
k_ k_
@ -350,7 +337,6 @@ bool kOmegaSST::read()
betaStar_.readIfPresent(coeffDict_); betaStar_.readIfPresent(coeffDict_);
a1_.readIfPresent(coeffDict_); a1_.readIfPresent(coeffDict_);
c1_.readIfPresent(coeffDict_); c1_.readIfPresent(coeffDict_);
Cmu_.readIfPresent(coeffDict_);
return true; return true;
} }

View File

@ -56,7 +56,6 @@ Description
@verbatim @verbatim
kOmegaSST kOmegaSST
{ {
Cmu 0.09;
alphaK1 0.85034; alphaK1 0.85034;
alphaK2 1.0; alphaK2 1.0;
alphaOmega1 0.5; alphaOmega1 0.5;
@ -96,7 +95,7 @@ namespace RASModels
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class kOmega Declaration Class kOmegaSST Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class kOmegaSST class kOmegaSST
@ -105,36 +104,38 @@ class kOmegaSST
{ {
// Private data // Private data
dimensionedScalar alphaK1_; // Model coefficients
dimensionedScalar alphaK2_;
dimensionedScalar alphaOmega1_; dimensionedScalar alphaK1_;
dimensionedScalar alphaOmega2_; dimensionedScalar alphaK2_;
dimensionedScalar alphah_; dimensionedScalar alphaOmega1_;
dimensionedScalar alphaOmega2_;
dimensionedScalar gamma1_; dimensionedScalar alphah_;
dimensionedScalar gamma2_;
dimensionedScalar beta1_; dimensionedScalar gamma1_;
dimensionedScalar beta2_; dimensionedScalar gamma2_;
dimensionedScalar betaStar_; dimensionedScalar beta1_;
dimensionedScalar beta2_;
dimensionedScalar a1_; dimensionedScalar betaStar_;
dimensionedScalar c1_;
dimensionedScalar omega0_; dimensionedScalar a1_;
dimensionedScalar omegaSmall_; dimensionedScalar c1_;
dimensionedScalar Cmu_;
//- Wall distance
// Note: different to wall distance in parent RASModel
wallDist y_; wallDist y_;
volScalarField k_; // Fields
volScalarField omega_;
volScalarField mut_; volScalarField k_;
volScalarField alphat_; volScalarField omega_;
volScalarField mut_;
volScalarField alphat_;
// Private member functions // Private member functions

View File

@ -115,6 +115,8 @@ RASModel::RASModel
k0_("k0", dimVelocity*dimVelocity, SMALL), k0_("k0", dimVelocity*dimVelocity, SMALL),
epsilon0_("epsilon", k0_.dimensions()/dimTime, SMALL), epsilon0_("epsilon", k0_.dimensions()/dimTime, SMALL),
epsilonSmall_("epsilonSmall", epsilon0_.dimensions(), SMALL), epsilonSmall_("epsilonSmall", epsilon0_.dimensions(), SMALL),
omega0_("omega0", dimless/dimTime, SMALL),
omegaSmall_("omegaSmall", omega0_.dimensions(), SMALL),
y_(mesh_) y_(mesh_)
{} {}
@ -250,6 +252,8 @@ bool RASModel::read()
k0_.readIfPresent(*this); k0_.readIfPresent(*this);
epsilon0_.readIfPresent(*this); epsilon0_.readIfPresent(*this);
epsilonSmall_.readIfPresent(*this); epsilonSmall_.readIfPresent(*this);
omega0_.readIfPresent(*this);
omegaSmall_.readIfPresent(*this);
return true; return true;
} }

View File

@ -77,21 +77,45 @@ protected:
// Protected data // Protected data
//- Turbulence on/off flag
Switch turbulence_; Switch turbulence_;
//- Flag to print the model coeffs at run-time
Switch printCoeffs_; Switch printCoeffs_;
//- Model coefficients dictionary
dictionary coeffDict_; dictionary coeffDict_;
dictionary wallFunctionDict_; // Wall function properties
dimensionedScalar kappa_;
dimensionedScalar E_;
dimensionedScalar Cmu_;
//- Wall function dictionary
dictionary wallFunctionDict_;
dimensionedScalar kappa_;
dimensionedScalar E_;
dimensionedScalar Cmu_;
//- Value of y+ at the edge of the laminar sublayer
scalar yPlusLam_; scalar yPlusLam_;
//- Lower limit of k
dimensionedScalar k0_; dimensionedScalar k0_;
//- Lower limit of epsilon
dimensionedScalar epsilon0_; dimensionedScalar epsilon0_;
//- Small epsilon value used to avoid divide by zero
dimensionedScalar epsilonSmall_; 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_; nearWallDist y_;
@ -183,6 +207,20 @@ public:
return epsilonSmall_; 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 //- Allow k0 to be changed
dimensionedScalar& k0() dimensionedScalar& k0()
{ {
@ -201,6 +239,18 @@ public:
return epsilonSmall_; 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 //- Return kappa for use in wall-functions
dimensionedScalar kappa() const dimensionedScalar kappa() const
{ {

View File

@ -101,9 +101,6 @@ kOmega::kOmega
) )
), ),
omega0_("omega0", dimless/dimTime, SMALL),
omegaSmall_("omegaSmall", dimless/dimTime, SMALL),
k_ k_
( (
IOobject IOobject
@ -271,7 +268,7 @@ void kOmega::correct()
// Re-calculate viscosity // Re-calculate viscosity
nut_ == k_/omega_; nut_ == k_/(omega_ + omegaSmall_);
nut_.correctBoundaryConditions(); nut_.correctBoundaryConditions();
} }

View File

@ -90,10 +90,6 @@ class kOmega
dimensionedScalar alphaOmega_; dimensionedScalar alphaOmega_;
dimensionedScalar omega0_;
dimensionedScalar omegaSmall_;
// Fields // Fields
volScalarField k_; volScalarField k_;

View File

@ -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_), y_(mesh_),
k_ k_
@ -331,7 +318,6 @@ bool kOmegaSST::read()
betaStar_.readIfPresent(coeffDict_); betaStar_.readIfPresent(coeffDict_);
a1_.readIfPresent(coeffDict_); a1_.readIfPresent(coeffDict_);
c1_.readIfPresent(coeffDict_); c1_.readIfPresent(coeffDict_);
Cmu_.readIfPresent(coeffDict_);
return true; return true;
} }

View File

@ -57,7 +57,6 @@ Description
@verbatim @verbatim
kOmegaSST kOmegaSST
{ {
Cmu 0.09;
alphaK1 0.85034; alphaK1 0.85034;
alphaK2 1.0; alphaK2 1.0;
alphaOmega1 0.5; alphaOmega1 0.5;
@ -103,33 +102,33 @@ class kOmegaSST
{ {
// Private data // Private data
dimensionedScalar alphaK1_; // Model coefficients
dimensionedScalar alphaK2_; dimensionedScalar alphaK1_;
dimensionedScalar alphaK2_;
dimensionedScalar alphaOmega1_; dimensionedScalar alphaOmega1_;
dimensionedScalar alphaOmega2_; dimensionedScalar alphaOmega2_;
dimensionedScalar gamma1_; dimensionedScalar gamma1_;
dimensionedScalar gamma2_; dimensionedScalar gamma2_;
dimensionedScalar beta1_; dimensionedScalar beta1_;
dimensionedScalar beta2_; dimensionedScalar beta2_;
dimensionedScalar betaStar_; dimensionedScalar betaStar_;
dimensionedScalar a1_; dimensionedScalar a1_;
dimensionedScalar c1_; dimensionedScalar c1_;
dimensionedScalar omega0_;
dimensionedScalar omegaSmall_;
dimensionedScalar Cmu_;
//- Wall distance field
// Note: different to wall distance in parent RASModel
wallDist y_; wallDist y_;
volScalarField k_; // Fields
volScalarField omega_;
volScalarField nut_; volScalarField k_;
volScalarField omega_;
volScalarField nut_;
// Private member functions // Private member functions