CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Binary or Ascii?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By haakon

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 4, 2013, 19:33
Default Binary or Ascii?
  #1
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 156
Rep Power: 17
dancfd is on a distinguished road
Hello all,

My hard disk is starting to run out of space, so I began to experiment with compressing the results and using binary instead of ascii by changing the appropriate controlDict tags. I noticed that ascii was the largest, binary was slightly smaller, then binary compressed, but the smallest was ascii compressed. I would like to know why binary would be selected - is it more accurate than ascii with writePrecision less than some integer?

Thanks,

Dan
dancfd is offline   Reply With Quote

Old   May 5, 2013, 05:19
Default
  #2
Senior Member
 
Join Date: Dec 2011
Posts: 111
Rep Power: 20
haakon will become famous soon enough
The binary format store raw binary data, as they are stred in computer memory. I guess it is stored in 64 bits precision, independent on the writePrecision setting. The other option would have been to store it in 32 bit precision when writePrecision is below some threshold. However I am not sure about this behaviour. If someone knows, please inform us.

I guess that one really good reason for choosing binary write without compression, is that the compression costs when it comes to CPU usage and performance. Writing raw binary data is the cheapest when it comes to CPU cycles, and I guess that the final size compared to compressed ASCII is comparable (say within 10-20 percent of each other).

All in all I never use compression... If I want to save space I compress the case folders as whole when I am finished analysing and post-processing.
K.Lau likes this.
haakon is offline   Reply With Quote

Old   May 6, 2013, 22:26
Default
  #3
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 156
Rep Power: 17
dancfd is on a distinguished road
Hello Hakon,

Thanks for your response! I will try that option.

Regards,

Dan
dancfd 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
[Technical] binary or ascii stl? Calobra OpenFOAM Meshing & Mesh Conversion 15 February 10, 2012 11:59
Converting Binary to Ascii.. vishwa OpenFOAM 1 February 25, 2010 16:07
binary heavier than ascii Schag OpenFOAM 2 July 22, 2009 09:38
Error to re-open fluent case file J.Gimbun FLUENT 0 April 27, 2006 09:42
Sliding mesh error Karl Kevala FLUENT 4 February 21, 2001 16:52


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