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

vtk or .dat

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 23, 2019, 10:27
Default vtk or .dat
  #1
Member
 
Ilan
Join Date: Dec 2018
Posts: 52
Rep Power: 7
Magistrane is on a distinguished road
Hello Foamers,

I am trying to couple OF with another program. As first step, i am trying to convert the vtk files i got from post processing (vorticity) to another .dat format.

For that, I call a awk function.

The input is :

Code:
Something
double
data1 data2 data3
data1 data2 data3
...
polygons
Something
vorticity
vort1 vort2 vort3
vort1 vort2 vort3
end of the file
Expected output :

Code:
data1 data2 data3 vort1 vort2 vort3
data1 data2 data3 vort1 vort2 vort3
I have 2 questions : 1) can i ask openfoam to give me post processed files in another format ?
2) If not, is someone able to help me with the awk program ?
For now, i can only get some values using :

Code:
{if ($3 ~ /double/) 
{start_pos=NR;
print start_pos;}
if ($0 ~ /POLYGON/) 
{end_pos=NR;
print end_pos;}
if ($0 ~ /vorticity/) 
{start_vorticity=NR;
print start_vorticity;}
Thank you for your help,

Have a good day !
Magistrane 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
Inconsistencies in reading .dat file during run time in new injection model Scram_1 OpenFOAM 0 March 23, 2018 22:29
Write crashed .cas & .dat for Fluent yonpanman FLUENT 0 February 9, 2017 08:59
[General] Creating VTK image compatible to Paraview Visualizer het ParaView 0 January 7, 2016 08:20
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 03:23
Installing OpenFoam141dev vtk errors cvv OpenFOAM Installation 0 February 11, 2009 02:54


All times are GMT -4. The time now is 02:24.