BUG: Corrected transportModel handling in Peclet function object

This commit is contained in:
andy
2013-07-19 12:00:18 +01:00
parent 06162eb354
commit a6f17edeeb

View File

@ -129,7 +129,6 @@ void Foam::Peclet::end()
// Do nothing - only valid on write // Do nothing - only valid on write
} }
void Foam::Peclet::timeSet() void Foam::Peclet::timeSet()
{ {
// Do nothing - only valid on write // Do nothing - only valid on write
@ -163,16 +162,32 @@ void Foam::Peclet::write()
nuEff = model.nuEff(); nuEff = model.nuEff();
} }
else if (mesh.foundObject<transportModel>("transportProperties")) else if (mesh.foundObject<dictionary>("transportProperties"))
{ {
const transportModel& model = const dictionary& model =
mesh.lookupObject<transportModel>("transportProperties"); mesh.lookupObject<dictionary>("transportProperties");
nuEff = model.nu(); nuEff =
tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"nuEff",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar(model.lookup("nu"))
)
);
} }
else else
{ {
FatalErrorIn("void Foam::wallShearStress::write()") FatalErrorIn("void Foam::Peclet::write()")
<< "Unable to determine the viscosity" << "Unable to determine the viscosity"
<< exit(FatalError); << exit(FatalError);
} }