Skip to content
Snippets Groups Projects
Commit d6aae983 authored by andy's avatar andy
Browse files

ENH: wallShearStress function object - added error handling for when turb model is not present

parent 2412f20f
Branches
Tags
No related merge requests found
......@@ -222,6 +222,13 @@ void Foam::wallShearStress::write()
tmp<volSymmTensorField> Reff;
if (phi.dimensions() == dimMass/dimTime)
{
if (!mesh.foundObject<cmpModel>("turbulenceModel"))
{
FatalErrorIn("void Foam::wallShearStress::write()")
<< "Unable to find compressible turbulence model in the "
<< "database" << exit(FatalError);
}
const cmpModel& model =
mesh.lookupObject<cmpModel>("turbulenceModel");
......@@ -229,6 +236,13 @@ void Foam::wallShearStress::write()
}
else
{
if (!mesh.foundObject<icoModel>("turbulenceModel"))
{
FatalErrorIn("void Foam::wallShearStress::write()")
<< "Unable to find incompressible turbulence model in the "
<< "database" << exit(FatalError);
}
const icoModel& model =
mesh.lookupObject<icoModel>("turbulenceModel");
......
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