added updated() check and calling ancestor updateCoeffs()

This commit is contained in:
andy 2009-08-03 15:43:45 +01:00
parent f6ba88b32c
commit 53e81535d8
5 changed files with 35 additions and 0 deletions

View File

@ -111,10 +111,17 @@ alphatWallFunctionFvPatchScalarField
void alphatWallFunctionFvPatchScalarField::updateCoeffs() void alphatWallFunctionFvPatchScalarField::updateCoeffs()
{ {
if (updated())
{
return;
}
const scalarField& mutw = const scalarField& mutw =
patch().lookupPatchField<volScalarField, scalar>(mutName_); patch().lookupPatchField<volScalarField, scalar>(mutName_);
operator==(mutw/Prt_); operator==(mutw/Prt_);
fixedValueFvPatchScalarField::updateCoeffs();
} }

View File

@ -169,6 +169,11 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField
void epsilonWallFunctionFvPatchScalarField::updateCoeffs() void epsilonWallFunctionFvPatchScalarField::updateCoeffs()
{ {
if (updated())
{
return;
}
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalar Cmu25 = pow(Cmu_, 0.25); const scalar Cmu25 = pow(Cmu_, 0.25);
@ -224,6 +229,8 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs()
} }
} }
fixedInternalValueFvPatchField<scalar>::updateCoeffs();
// TODO: perform averaging for cells sharing more than one boundary face // TODO: perform averaging for cells sharing more than one boundary face
} }

View File

@ -169,6 +169,11 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
void omegaWallFunctionFvPatchScalarField::updateCoeffs() void omegaWallFunctionFvPatchScalarField::updateCoeffs()
{ {
if (updated())
{
return;
}
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
const scalarField& y = rasModel.y()[patch().index()]; const scalarField& y = rasModel.y()[patch().index()];
@ -222,6 +227,8 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs()
} }
} }
fixedInternalValueFvPatchField<scalar>::updateCoeffs();
// TODO: perform averaging for cells sharing more than one boundary face // TODO: perform averaging for cells sharing more than one boundary face
} }

View File

@ -164,6 +164,11 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField
void epsilonWallFunctionFvPatchScalarField::updateCoeffs() void epsilonWallFunctionFvPatchScalarField::updateCoeffs()
{ {
if (updated())
{
return;
}
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
const scalarField& y = rasModel.y()[patch().index()]; const scalarField& y = rasModel.y()[patch().index()];
@ -213,6 +218,8 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs()
} }
} }
fixedInternalValueFvPatchField<scalar>::updateCoeffs();
// TODO: perform averaging for cells sharing more than one boundary face // TODO: perform averaging for cells sharing more than one boundary face
} }

View File

@ -164,6 +164,11 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
void omegaWallFunctionFvPatchScalarField::updateCoeffs() void omegaWallFunctionFvPatchScalarField::updateCoeffs()
{ {
if (updated())
{
return;
}
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
const scalarField& y = rasModel.y()[patch().index()]; const scalarField& y = rasModel.y()[patch().index()];
@ -212,6 +217,8 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs()
} }
} }
fixedInternalValueFvPatchField<scalar>::updateCoeffs();
// TODO: perform averaging for cells sharing more than one boundary face // TODO: perform averaging for cells sharing more than one boundary face
} }