solverInfo functionObject: writeResidualFields only works for pressure and not for other fields
Summary
The problem is encountered with the functionObject 'solverInfo'. The residuals are written as volScalarField only for p and not for other variables like e.g. U, k or omega.
Steps to reproduce
The bug can be reproduced, for example by running the LES motorbike tutorial by adding 'U' in the fields in file "system/stabilizationSchemes" (in the original file only U is present):
residuals { type solverInfo; libs ("libutilityFunctionObjects.so"); writeResidualFields true; writeControl outputTime; fields (p U); }
Example case
What is the current bug behaviour?
The residuals are written as volScalarField only for p and not for other variables like e.g. U, k or omega. Actually, if another variables than p, e.g. k, is present in the field list it is initialized for the different patches only but the cell values are not written to the file in the corresponding time directory.
What is the expected correct behavior?
The functionObject should write all listed fields as volScalarField in each cell.
Relevant logs and/or images
Environment information
- OpenFOAM version :v1906
- Operating system :Ubuntu 16.04
- Hardware info :
- Compiler :
Possible fixes
## Reattaching the author to the issue ticket: @marluc ##