View Issue Details

IDProjectCategoryView StatusLast Update
0004226OpenFOAMContributionpublic2025-03-23 20:44
Reporterjoseneto Assigned Tohenry  
PrioritynoneSeverityfeatureReproducibilityalways
Status closedResolutionno change required 
PlatformGNU/LinuxOSOtherOS Version(please specify)
Product Version12 
Summary0004226: Improve postProcess error messages
DescriptionRecently I faced the problem described in this post:

https://www.cfd-online.com/Forums/openfoam/246302-openfoam-9-cannot-use-postprocess-calculate-machno.html

It's not necessarily a bug, but I think it would be really good to have a better error message in the postProcess utility when the solver needs to be specified. The functions that requires the solver specification is also not clear.
Steps To ReproduceRun postProcess -func "MachNo(U)" after completing a case, the error message is:

Time = 149s

Reading fields:
    volVectorFields: U

Executing functionObjects
--> FOAM Warning : functionObjects::MachNo MachNo(U) failed to execute.
TagsNo tags attached.

Activities

henry

2025-03-23 20:44

manager   ~0013549

postProcess cannot know why a functionObject failed, only that it failed, also it does not know if a functionObject requires the solver to be specified or alternatively if other fields should be specified.

Clearly the Mach number cannot be calculated from the velocity field U only so the additional fields required must be specified one way or another and postProcess does not know that and cannot inform you with an appropriate error message. In the current implementation of MachNo the thermo package is required and the easiest way of providing that is with the solver option.

It would be possible to add documentation to all the functionObjects to indicate how they should be used in different contexts including with the postProcess utility but this is a sizeable task and increases the maintenance overhead both of which would require additional funding.

Issue History

Date Modified Username Field Change
2025-03-22 23:00 joseneto New Issue
2025-03-23 20:44 henry Note Added: 0013549
2025-03-23 20:44 henry Assigned To => henry
2025-03-23 20:44 henry Status new => closed
2025-03-23 20:44 henry Resolution open => no change required