CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > 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 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: Delft, Netherlands
Posts: 919
Rep Power: 17
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.
*Help define the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oam-technology
akidess is offline   Reply With Quote

Old   February 18, 2012, 16:47
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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 online now   Reply With Quote

Old   February 20, 2012, 07:55
Default
  #3
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
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.
*Help define the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oam-technology
akidess is offline   Reply With Quote

Old   February 20, 2012, 09:52
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Anton,

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

Best regards,
Bruno
wyldckat is online now   Reply With Quote

Old   February 22, 2012, 15:19
Default
  #5
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
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.
*Help define the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oam-technology
akidess is offline   Reply With Quote

Old   February 22, 2012, 16:48
Default
  #6
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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: SurfaceFields on paraFoam
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 online now   Reply With Quote

Old   February 24, 2012, 06:25
Default
  #7
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
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.
*Help define the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oam-technology

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
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Nice! I should have looked deeper into this
wyldckat is online now   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
2.0.x on Mac OSX niklas OpenFOAM Installation on Windows, Mac and other Unsupported Platforms 74 March 28, 2012 16: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 08:45.