diff --git a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C index 72244ea4b1..91e5eb7f04 100644 --- a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C +++ b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C @@ -222,6 +222,13 @@ void Foam::wallShearStress::write() tmp Reff; if (phi.dimensions() == dimMass/dimTime) { + if (!mesh.foundObject("turbulenceModel")) + { + FatalErrorIn("void Foam::wallShearStress::write()") + << "Unable to find compressible turbulence model in the " + << "database" << exit(FatalError); + } + const cmpModel& model = mesh.lookupObject("turbulenceModel"); @@ -229,6 +236,13 @@ void Foam::wallShearStress::write() } else { + if (!mesh.foundObject("turbulenceModel")) + { + FatalErrorIn("void Foam::wallShearStress::write()") + << "Unable to find incompressible turbulence model in the " + << "database" << exit(FatalError); + } + const icoModel& model = mesh.lookupObject("turbulenceModel");