View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001921||OpenFOAM||[All Projects] Bug||public||2015-11-20 06:55||2015-11-20 13:24|
|Fixed in Version|
|Summary||0001921: Invalid writeFormat and timeFormat in functions subDict in controlDict|
|Description||The timeFormat and writeFormat set in controlDict seem not valid for data output by functionObject. Those controls are not available independently for each function object. The format is hard-coded to a specific format as E-notation, leading the very large number fuzzy.|
|Tags||No tags attached.|
Last edited: 2015-11-20 07:54
faceSource and cellSource. my question post on cfdonline:http://www.cfd-online.com/Forums/openfoam-solving/162270-writeformat-timeformat-functions-subdict-controldict.html
for example, in the result file, it gives time 1.065053e+09. however what i need is the exact time (say 1065052800). this is confused with 1065053000. the timeFormat set in controlDict is fixed and the timePrecision is 0. but this setting seems invalid for the functionObjects.
||It would be useful if you could provide "steps to reproduce" here.|
@henry: I had taken a look back then when the reporter posted about this in the forum thread. It's the format that is hard coded :(
void Foam::functionObjectFile::initStream(Ostream& os) const
||I believe that for reproducing the problem is just a matter of running the tutorial "multiphase/interFoam/ras/waterChannel" with the "writePrecision" and "timePrecision" cranked up to 12, which will not affect the output from the function object "inletFlux".|
@Bruno: I am surprised the reporter did not provide the steps to reproduce the problem; it would have saved some time and effort from others.
The simplest option would be to apply the timeFormat and writeFormat from controlDict to the functionObjects which also provides consistent output. Or is there a need to support different output formatting for all functionObjects or even for each functionObject separately?
@henry: I am quite sorry for the delay and non-clarification. it's due to my poor English,
@Bruno: thanks for your help with the problem.
now it is clarified. I think there is a need to support different output formatting for each functionObject separately, just like the entry with the keyword timeStart and timeEnd.
thanks for the attention.
I think at least the time should be formatted in the same manner as Time::timeName() to ensure uniqueness and consistency. Maybe the write precision of the data could be changed per functionObject but again I would expect that whatever is specified in controlDict should be sufficent and suitable for all scalar output.
I will push the use of Time::timeName() in functionObject shortly.
||Resolved in OpenFOAM-dev by commit 016aad0d720846d09b67bbc039e44e5bd89475fd|
|2015-11-20 07:31||henry||Note Added: 0005634|
||Note Added: 0005635|
||Note Edited: 0005635||View Revisions|
|2015-11-20 07:57||henry||Note Added: 0005636|
|2015-11-20 10:15||wyldckat||Note Added: 0005638|
|2015-11-20 10:20||wyldckat||Note Added: 0005639|
|2015-11-20 11:15||henry||Note Added: 0005640|
||Note Added: 0005641|
|2015-11-20 11:35||henry||Note Added: 0005642|
|2015-11-20 13:24||henry||Note Added: 0005643|
|2015-11-20 13:24||henry||Status||new => resolved|
|2015-11-20 13:24||henry||Resolution||open => fixed|
|2015-11-20 13:24||henry||Assigned To||=> henry|