CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Precision loss when post-processing with Paraview

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 15, 2021, 16:58
Default Precision loss when post-processing with Paraview
  #1
Senior Member
 
Join Date: Jul 2013
Posts: 124
Rep Power: 12
wildfire230 is on a distinguished road
Hi All,


I am having some interesting issues where I believe Paraview is losing precision with some of my data. A simple way to reproduce my case is to use funkySetFields to initialize two data sets as follows:

setC1
{
field C1; // Field to initialize
expression "exp(pos().x) + 1.0";
keepPatches true;
variables ();
}
setC2
{
field C2; // Field to initialize
expression "exp(pos().x)";
keepPatches true;
variables ();
}


You can see that I am initializing C1=exp(x)+1, and C2=exp(x).


My domain goes from x = -25 to +25, so that the exponential does become quite large, like 10^10. I am using a write precision of 16. Then, in Paraview, I take C1 - C2 using a calculator filter, and the result contains errors on the order of O(10), whereas if we really have 16 digits of precision, I believe the errors should be O(1e-5) in this case. Am I missing something? Does Paraview's calculator only do single-point precision??


EDIT: Ok, I have narrowed down the issue a bit. It seems that whenever you run "paraFoam", all the fields are loaded as type float. Is there any way to load as type double?? Alternately, is there a way to run foamToVTK and write as type double? It seems like this also defaults to float.




I would greatly appreciate any thoughts.


Best regards.

Last edited by wildfire230; June 16, 2021 at 08:06.
wildfire230 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
post processing discrete phase with paraview mighelone FLUENT 3 March 9, 2021 04:34
Bulk mean temperature in ansys post processing user9 ANSYS 2 May 22, 2020 23:25
Automated post processing using CFD Post shreyasr ANSYS 0 January 28, 2013 06:21
[OpenFOAM] is parallel processing available in parafoam for post processing? sachinlb ParaView 1 August 14, 2012 09:52
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 21:41


All times are GMT -4. The time now is 17:37.