added coeffsDict name to printCoeffs() and consistency update

This commit is contained in:
andy
2008-06-17 16:26:42 +01:00
parent 2b59f6d6c7
commit e46a010ad2
5 changed files with 34 additions and 16 deletions

View File

@ -45,7 +45,8 @@ void LESmodel::printCoeffs()
{ {
if (printCoeffs_) if (printCoeffs_)
{ {
Info<< LESmodelProperties_; Info<< type() << "Coeffs" << nl
<< LESmodelProperties_;
} }
} }

View File

@ -43,7 +43,8 @@ void LESmodel::printCoeffs()
{ {
if (printCoeffs_) if (printCoeffs_)
{ {
Info<< LESmodelProperties_; Info<< type() << "Coeffs" << nl
<< LESmodelProperties_;
} }
} }

View File

@ -93,12 +93,12 @@ void LRRDiffStress::correct(const tmp<volTensorField>& tgradU)
forAll(B_, celli) forAll(B_, celli)
{ {
B_[celli].component(tensor::XX) = B_[celli].component(symmTensor::XX) =
max(B_[celli].component(tensor::XX), k0().value()); max(B_[celli].component(symmTensor::XX), k0().value());
B_[celli].component(tensor::YY) = B_[celli].component(symmTensor::YY) =
max(B_[celli].component(tensor::YY), k0().value()); max(B_[celli].component(symmTensor::YY), k0().value());
B_[celli].component(tensor::ZZ) = B_[celli].component(symmTensor::ZZ) =
max(B_[celli].component(tensor::ZZ), k0().value()); max(B_[celli].component(symmTensor::ZZ), k0().value());
} }
K = 0.5*tr(B_); K = 0.5*tr(B_);

View File

@ -47,7 +47,8 @@ void turbulenceModel::printCoeffs()
{ {
if (printCoeffs_) if (printCoeffs_)
{ {
Info<< turbulenceModelCoeffs_; Info<< type() << "Coeffs" << nl
<< turbulenceModelCoeffs_;
} }
} }
@ -87,8 +88,15 @@ turbulenceModel::turbulenceModel
printCoeffs_(lookupOrDefault<Switch>("printCoeffs", false)), printCoeffs_(lookupOrDefault<Switch>("printCoeffs", false)),
turbulenceModelCoeffs_(subDict(type + "Coeffs")), turbulenceModelCoeffs_(subDict(type + "Coeffs")),
kappa_(readScalar(subDict("wallFunctionCoeffs").lookup("kappa"))), kappa_
E_(readScalar(subDict("wallFunctionCoeffs").lookup("E"))), (
subDict("wallFunctionCoeffs").lookupOrAddDefault<scalar>
(
"kappa",
0.4187
)
),
E_(subDict("wallFunctionCoeffs").lookupOrAddDefault<scalar>("E", 9.0)),
yPlusLam_(yPlusLam(kappa_, E_)), yPlusLam_(yPlusLam(kappa_, E_)),
k0_("k0", dimVelocity*dimVelocity, SMALL), k0_("k0", dimVelocity*dimVelocity, SMALL),
@ -123,7 +131,7 @@ tmp<scalarField> turbulenceModel::yPlus(const label patchNo) const
if (typeid(curPatch) == typeid(wallFvPatch)) if (typeid(curPatch) == typeid(wallFvPatch))
{ {
scalar Cmu(turbulenceModelCoeffs_.lookup("Cmu")); scalar Cmu(readScalar(turbulenceModelCoeffs_.lookup("Cmu")));
Yp = pow(Cmu, 0.25) Yp = pow(Cmu, 0.25)
*y_[patchNo] *y_[patchNo]

View File

@ -45,7 +45,8 @@ void turbulenceModel::printCoeffs()
{ {
if (printCoeffs_) if (printCoeffs_)
{ {
Info<< turbulenceModelCoeffs_; Info<< type() << "Coeffs" << nl
<< turbulenceModelCoeffs_;
} }
} }
@ -83,8 +84,15 @@ turbulenceModel::turbulenceModel
printCoeffs_(lookupOrDefault<Switch>("printCoeffs", false)), printCoeffs_(lookupOrDefault<Switch>("printCoeffs", false)),
turbulenceModelCoeffs_(subDict(type + "Coeffs")), turbulenceModelCoeffs_(subDict(type + "Coeffs")),
kappa_(readScalar(subDict("wallFunctionCoeffs").lookup("kappa"))), kappa_
E_(readScalar(subDict("wallFunctionCoeffs").lookup("E"))), (
subDict("wallFunctionCoeffs").lookupOrAddDefault<scalar>
(
"kappa",
0.4187
)
),
E_(subDict("wallFunctionCoeffs").lookupOrAddDefault<scalar>("E", 9.0)),
yPlusLam_(yPlusLam(kappa_, E_)), yPlusLam_(yPlusLam(kappa_, E_)),
k0_("k0", dimVelocity*dimVelocity, SMALL), k0_("k0", dimVelocity*dimVelocity, SMALL),
@ -123,7 +131,7 @@ tmp<scalarField> turbulenceModel::yPlus(const label patchNo) const
if (typeid(curPatch) == typeid(wallFvPatch)) if (typeid(curPatch) == typeid(wallFvPatch))
{ {
scalar Cmu(turbulenceModelCoeffs_.lookup("Cmu")); scalar Cmu(readScalar(turbulenceModelCoeffs_.lookup("Cmu")));
Yp = pow(Cmu, 0.25)*y_[patchNo] Yp = pow(Cmu, 0.25)*y_[patchNo]
*sqrt(k()().boundaryField()[patchNo].patchInternalField()) *sqrt(k()().boundaryField()[patchNo].patchInternalField())