functionObject file format
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?
|
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 |
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 :)
|
Hi Anton,
I think they hard-coded things this way, because the normal writers are for volumes only :( Best regards, Bruno |
Sorry, I didn't quite get that. Can you explain what you mean with volumes only and normal writers?
|
Quote:
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". |
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 |
Nice! I should have looked deeper into this :)
|
All times are GMT -4. The time now is 13:48. |