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

functionObject file format

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

Like Tree1Likes
  • 1 Post By akidess

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 18, 2012, 13:36
Default functionObject file format
  #1
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
I can't seem to find a way to save the output of the functionObject "cuttingPlane" into a binary file. The default seems to be ASCII, which wastes disk space. Does anyone know if it's possible to change the file format?
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   February 18, 2012, 16:47
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Anton,

Nope! According to the code at "OpenFOAM-2.1.x/src/sampling/sampledSurface/writers", it's all hard coded as ASCII only. There is a proxy system, but it only sends the surface points to the writer.

The closest you can get is pack things via another functionObject: http://openfoamwiki.net/index.php/Ti...ect_systemCall - this way you even pick the format you want well, compression only

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 20, 2012, 07:55
Default
  #3
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Thanks Bruno! It's funny it's hard-coded to ASCII, because the writer classes do support binary files (at least src/conversion/ensight does). So for now I just hard-coded binary instead of ASCII, and it works fine
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   February 20, 2012, 09:52
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Anton,

I think they hard-coded things this way, because the normal writers are for volumes only

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 22, 2012, 15:19
Default
  #5
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Sorry, I didn't quite get that. Can you explain what you mean with volumes only and normal writers?
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   February 22, 2012, 16:48
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by akidess View Post
Sorry, I didn't quite get that. Can you explain what you mean with volumes only and normal writers?
The idea I was trying to convey is as follows: the simulation cases done with OpenFOAM usually focus only on the volume mesh and the patches. When we want to generate a sampled surface, even when directly coded in a solver or utility, the resulting surface data isn't as good looking as the volume mesh.

Here's an example of what I'm talking about: http://www.cfd-online.com/Forums/ope...tml#post343937
If you read the whole thread, you'll understand that the sampled surface cannot be represented as nicely as a patch surface, simply because said sampled surface is only represented by points!

I think this is why the functionObject "cuttingPlane" is using dedicated and hard-coded surface writers, instead of using an already existing "driver".
__________________
wyldckat is offline   Reply With Quote

Old   February 24, 2012, 06:25
Default
  #7
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Actually, I just noticed that the sample 'sampleDict' changed between 2.0.x and 2.1.x. The latter now includes an entry

Code:
 39 // optionally define extra controls for the output formats
 40 formatOptions
 41 {
 42     ensight
 43     {
 44         format  binary;
 45     }
 46 }
which is exactly what I was looking for!
wyldckat likes this.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.

Last edited by akidess; February 24, 2012 at 07:44. Reason: formatting
akidess is offline   Reply With Quote

Old   February 24, 2012, 09:51
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Nice! I should have looked deeper into this
__________________
wyldckat is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
2.0.x on Mac OSX niklas OpenFOAM Installation 74 March 28, 2012 17:46
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 12:44
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 flakid OpenFOAM Installation 16 December 28, 2010 09:48
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


All times are GMT -4. The time now is 13:28.