Evaluate when auxiliary fields are not present
This commit is contained in:
parent
b5d1c30299
commit
43674c372f
1 changed files with 20 additions and 0 deletions
|
@ -111,6 +111,26 @@ void buoyantPressureFvPatchScalarField::updateCoeffs()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If variables are not found, evaluate as zero gradient
|
||||||
|
// HJ, 17/Jan/2012
|
||||||
|
if
|
||||||
|
(
|
||||||
|
!db().foundObject<uniformDimensionedVectorField>("g")
|
||||||
|
|| !db().foundObject<volScalarField>(rhoName_)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
InfoIn
|
||||||
|
(
|
||||||
|
"void buoyantPressureFvPatchScalarField::updateCoeffs()"
|
||||||
|
) << "Fields required for evaluation not found for patch "
|
||||||
|
<< patch().name() << endl;
|
||||||
|
|
||||||
|
gradient() = 0;
|
||||||
|
fixedGradientFvPatchScalarField::updateCoeffs();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const uniformDimensionedVectorField& g =
|
const uniformDimensionedVectorField& g =
|
||||||
db().lookupObject<uniformDimensionedVectorField>("g");
|
db().lookupObject<uniformDimensionedVectorField>("g");
|
||||||
|
|
||||||
|
|
Reference in a new issue