View Issue Details

IDProjectCategoryView StatusLast Update
0002352OpenFOAMBugpublic2016-11-25 14:04
Reporterchris Assigned Tohenry  
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version14.04
Fixed in Versiondev 
Summary0002352: Misleading warning from postProcess
DescriptionWhen you run postProcess and it is missing an object from the database the warning message from fieldExpression.C line 123 is:

if (!calc())
{
    Warning
        << "functionObject " << type() << ": Cannot find required field "
        << fieldName_ << endl;

The message can be misleading if the calc() function has a condition for failure that is not simply where fieldName_ does not exist on the database.
Steps To Reproducerun
cp -r $FOAM_TUTORIALS/compressible/sonicFoam/laminar/forwardStep .
cd forwardStep
blockMesh
sonicFoam
postProcess -func MachNo
Additional InformationHow about change the Warning to something like:

    Warning
        << "functionObject " << type() << ": Cannot find required field "
        << fieldName_ << " or model in object registry." << nl
        << "Try re-running using the solver with -postProcess option, e.g. for simpleFoam" << nl
        << " simpleFoam -postProcess ... "endl;
TagsNo tags attached.

Activities

henry

2016-11-25 12:07

manager   ~0007326

With a bit of refactoring it would be possible to issue warnings of the form:

Executing functionObjects
--> FOAM Warning : functionObjects::MachNo MachNo cannot find required object thermophysicalProperties of type fluidThermo

in a general way.

henry

2016-11-25 14:04

manager   ~0007327

Resolved in OpenFOAM-dev by commit 146f7e6beaf592e4b17f606fa9794436be6de32f

Issue History

Date Modified Username Field Change
2016-11-25 09:48 chris New Issue
2016-11-25 12:07 henry Note Added: 0007326
2016-11-25 14:04 henry Assigned To => henry
2016-11-25 14:04 henry Status new => resolved
2016-11-25 14:04 henry Resolution open => fixed
2016-11-25 14:04 henry Fixed in Version => dev
2016-11-25 14:04 henry Note Added: 0007327