View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001375||OpenFOAM||[All Projects] Bug||public||2014-08-15 20:44||2015-01-01 14:02|
|Fixed in Version|
|Summary||0001375: foamToEnsight -parallel does not convert extra fields added by pressureTools|
|Description||After running a parallel case in simpleFoam and using the pressureTools function object to export static pressure at output time, "foamToEnsight -parallel" skips the static(p) field for all time steps. However, if you run foamToEnsight -parallel -latestTime, it converts the static(p) field properly.|
|Steps To Reproduce||1. )Take any simpleFoam tutorial case and add the pressure tools entry to the controlDict. Set pressureTools to output static pressure at the outputTime.|
2. )Run the case in parallel until it outputs data
3. )Run foamToEnsight -parallel... it will not convert the static(p) field.
4. )Run foamToEnsight -parallel -fields '("static(p)")'... it still will not convert the static(p) field.
5. )Run foamToEnsight -parallel -latestTime, it converts the static(p) field properly.
|Additional Information||I believe foamToEnsight gets its field list from the first time directory it converts, and then applies it to all other time directories regardless of whether additional fields are written out in latter time directories. The 0 directory will not contain extra post-processed fields, therefore they get skipped in latter directories.|
I think the expected behavior would be to have foamToEnsight interrogate each time directory for a list of field names before exporting.
|Tags||No tags attached.|
I was curious about this and went to inspect the source code for foamToEnsight. So what happens is that this converter does this on purpose, in the file "checkData.H". The comment right at the start of that file states: «ignore special fields or fields that we don't handle»
The code in that file will explicitly check if the requested field exists on all time snapshots that are to be processed. This seems to have been done like this by design, possibly because Ensight at that time was unable to load fields only for particular time snapshots.
If you use the "-time" option properly, i.e. with a range, you should be able to make it consistent in the export procedure, for example, by skipping the time snapshot 0:
foamToEnsight -time '1e-10:'
||Bruno, thanks for your workaround. This does allow me to skip only the zero directory while still being able to convert all time directories after it (and therefore the custom fields). I still think the current code is counter intuitive and could be refined, but if this is the intended functionality (considering the current capability of EnSight), you may close this ticket.|