Added zero gradient evaluation of wall function fields when called in absence of G

This commit is contained in:
Hrvoje Jasak 2011-03-20 22:03:20 +00:00
parent 0cec9c01fd
commit bbea318a26
4 changed files with 36 additions and 0 deletions

View file

@ -174,6 +174,15 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs()
return;
}
// If G field is not present, execute zero gradient evaluation
// HJ, 20/Mar/2011
if (!db().foundObject<volScalarField>(GName_))
{
zeroGradientFvPatchScalarField::updateCoeffs();
return;
}
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalar Cmu25 = pow(Cmu_, 0.25);

View file

@ -179,6 +179,15 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs()
return;
}
// If G field is not present, execute zero gradient evaluation
// HJ, 20/Mar/2011
if (!db().foundObject<volScalarField>(GName_))
{
zeroGradientFvPatchScalarField::evaluate();
return;
}
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
const scalarField& y = rasModel.y()[patch().index()];

View file

@ -169,6 +169,15 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs()
return;
}
// If G field is not present, execute zero gradient evaluation
// HJ, 20/Mar/2011
if (!db().foundObject<volScalarField>(GName_))
{
zeroGradientFvPatchScalarField::evaluate();
return;
}
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
const scalarField& y = rasModel.y()[patch().index()];

View file

@ -174,6 +174,15 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs()
return;
}
// If G field is not present, execute zero gradient evaluation
// HJ, 20/Mar/2011
if (!db().foundObject<volScalarField>(GName_))
{
zeroGradientFvPatchScalarField::evaluate();
return;
}
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
const scalarField& y = rasModel.y()[patch().index()];