writePrecision has any effect in accuracy?
does writePrecision has any effect on results or its only for representation of numbers to the user? which value is better?
Code:
writePrecision 10; |
I think it does. Since the NS equ is non-linear, it will amplify the errors if they are introduced due to precision, particularly if you are solving a problem with turbulence.
|
In my understanding it has no effect on the internal accuracy during the solution process. The effects described in the previous post should only occur when starting from a state that has been written to disk with a lower precision.
|
thanks both Hrushi and Cutter
then if I improve writePrecision from 10 to 12 for example does the results become more accurate(because of more significant figures)? or it produce some amplifying errors in return? my case is unsteady turbulent and compressible,which value you suggest? |
you should always use binary format and then the writePrecision is just for presentation and has no effect.
If you have ascii format and perform a parallel calculation you should be aware that the processore to processor communication is streamed via the Pstream library and thus the precision can be influential, but Im not sure. |
Hi Niklas
thanks,I need to make some changes in variables(around each 500000 iterations)in groovyBC during run so it seems I can't use binary files unless there is a way to convert binary files need to change to ascii ones so that performing modifications can be done. how can see which value is specified for Pstream? what value is better in your opinion? what may be its other effects? it causes to take more space on disc and more run time too? |
i suggest you perform a simple parallel run test on one of the tutorials and
test with 2 different values on writePrecision for instance 3 and 12 if the results differ...then you know |
OK
does it account for all the digits or digits after points? for example if a number is 12345.111 and writePrecision be 5 it will included in calculations with 12345? isn't there away so that we can specify number of digits after "."? |
Quote:
|
4 Attachment(s)
Hi
It seems a bit tricky.in variables like pressure and temperature that a multi-diagonal matrix is solved for them it seems that writePrecision has not much effect BUT in rho that is calculated from other fields by perfect gas equation it is important. I tested rhoCentralFoam/forwardStep for two different writePrecisions 2 and 12. these are writePrecisions 2; results: |
4 Attachment(s)
due to limitation of numbers of attachments(5) I put writePrecision=5 results here.
correct if my conclusion isn't true. I appreciate for other comments and experiments.:) |
All times are GMT -4. The time now is 03:11. |