mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: wallShearStress function object - added error handling for when turb model is not present
This commit is contained in:
@ -222,6 +222,13 @@ void Foam::wallShearStress::write()
|
|||||||
tmp<volSymmTensorField> Reff;
|
tmp<volSymmTensorField> Reff;
|
||||||
if (phi.dimensions() == dimMass/dimTime)
|
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 =
|
const cmpModel& model =
|
||||||
mesh.lookupObject<cmpModel>("turbulenceModel");
|
mesh.lookupObject<cmpModel>("turbulenceModel");
|
||||||
|
|
||||||
@ -229,6 +236,13 @@ void Foam::wallShearStress::write()
|
|||||||
}
|
}
|
||||||
else
|
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 =
|
const icoModel& model =
|
||||||
mesh.lookupObject<icoModel>("turbulenceModel");
|
mesh.lookupObject<icoModel>("turbulenceModel");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user