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

Binary or Ascii?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 4, 2013, 18:33
Default Binary or Ascii?
  #1
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 151
Rep Power: 8
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, 04:19
Default
  #2
Senior Member
 
Håkon Strandenes
Join Date: Dec 2011
Location: Norway
Posts: 111
Rep Power: 10
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.
haakon is offline   Reply With Quote

Old   May 6, 2013, 21:26
Default
  #3
Senior Member
 
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 151
Rep Power: 8
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

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
binary or ascii stl? Calobra OpenFOAM Meshing Format & General Technical 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 08:38
Error to re-open fluent case file J.Gimbun FLUENT 0 April 27, 2006 08:42
Sliding mesh error Karl Kevala FLUENT 4 February 21, 2001 16:52


All times are GMT -4. The time now is 09:44.