Commit a6f17ede authored by andy's avatar andy
Browse files

BUG: Corrected transportModel handling in Peclet function object

parent 06162eb3
......@@ -129,7 +129,6 @@ void Foam::Peclet::end()
// Do nothing - only valid on write
}
void Foam::Peclet::timeSet()
{
// Do nothing - only valid on write
......@@ -163,16 +162,32 @@ void Foam::Peclet::write()
nuEff = model.nuEff();
}
else if (mesh.foundObject<transportModel>("transportProperties"))
else if (mesh.foundObject<dictionary>("transportProperties"))
{
const transportModel& model =
mesh.lookupObject<transportModel>("transportProperties");
const dictionary& model =
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
{
FatalErrorIn("void Foam::wallShearStress::write()")
FatalErrorIn("void Foam::Peclet::write()")
<< "Unable to determine the viscosity"
<< exit(FatalError);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment