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

conversion in .dat

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 14, 2012, 13:46
Default conversion fluent
  #1
Member
 
lynda
Join Date: Oct 2009
Posts: 41
Rep Power: 7
lyna is on a distinguished road
hi
to convert in my results in ''file.dat'' , I used the conversion to fluent, I managed to do this step. then I opened Fluent 3ddp and reading file.msh and case, then I have to save my results in format file.dat was using "export-ASCII", the problem is, I did not find VOF function called phi in OpenFOAM , Please tell me how I find this phi, I need it.
If there is another proposal to work only on OpenFOAM and have the results directly in extension .dat without using other software, please give it to me.
Thanks
Lyna

Last edited by lyna; June 15, 2012 at 08:44.
lyna is offline   Reply With Quote

Old   June 15, 2012, 08:44
Default conversion fluent
  #2
Member
 
lynda
Join Date: Oct 2009
Posts: 41
Rep Power: 7
lyna is on a distinguished road
hi
to convert in my results in ''file.dat'' , I used the conversion to fluent, I managed to do this step. then I opened Fluent 3ddp and reading file.msh and case, then I have to save my results in format file.dat was using "export-ASCII", the problem is, I did not find VOF function called phi in OpenFOAM , Please tell me how I find this phi, I need it.
If there is another proposal to work only on OpenFOAM and have the results directly in extension .dat without using other software, please give it to me.
Thanks
Lyna
lyna is offline   Reply With Quote

Old   June 16, 2012, 07:35
Default
  #3
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
Greetings Lyna,

Instead of posting the exact same thing again, you could've done a simple "bump" post: http://en.wikipedia.org/wiki/Bump_%28Internet%29

Anyway, it's difficult to understand the exact problem you're having. I can only figure out that:
  1. There is a ".dat" file involved. But I can't understand what exactly that file really is?
    1. Is that file meant to be generated by Fluent?
    2. Or you want OpenFOAM to generate that file?
    3. What is the format of that particular file? Is it a standard Fluent file?
  2. Was the "phi" field generated in Fluent and you want it to be read in OpenFOAM?
  3. Are you trying to convert both mesh and data from Fluent to OpenFOAM, is that it?
  4. Or are you trying to convert both mesh and data from OpenFOAM to Fluent?
  5. Last but not least, which OpenFOAM version are you using?
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   June 18, 2012, 13:07
Default conversion in .dat
  #4
Member
 
lynda
Join Date: Oct 2009
Posts: 41
Rep Power: 7
lyna is on a distinguished road
hi bruno

I trying to convert both mesh and data from OpenFOAM to Fluent.
I used OpenFOAM 1.7.1 version .

I explain why I need to convert the results of OpenFOAM to fluent.
because I want to draw for example the average pressure along the pipe, the shear stress ....... etc, these results are not given by OpenFOAM,
So I have to convert them into fluent just to convert these files to .dat files.
after I have recuperated and stored in ASCII format .dat. This makes my reading of these results by another program in Fortran language that can read and calculate the parameters I want.

Thanks
Lyna
lyna is offline   Reply With Quote

Old   June 18, 2012, 16:20
Default
  #5
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 Lyna,

OK, the problem is that "phi" is a "surfaceScalarField", which is a kind of field not exported by foamDataToFluent; it only exports "volScalarFields" and "volVectorFields".

You have several options:
  • Create your own variant of foamDataToFluent, which also exports "surfaceScalarFields".
  • Convert the "surfaceScalarFields" to "volScalarFields".
  • Export the "surfaceScalarFields" to VTK, open in ParaView and export to CSV.
Assuming you want the last option:
  1. Export to VTK:
    Code:
    foamToVTK -surfaceFields
  2. Open in ParaView the file "VTK/surfaceFields/surfaceFields_0.vtk".
  3. Then on ParaView, with the "surfaceFields_0.vtk" selected, choose on the menu "File -> Save Data" then save as CSV.
  4. It will ask the mode of export, for which you can choose the default option.
Hopefully Fluent can read CSV files, or you can convert yourself the CSV file to the ".dat" file...

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   July 12, 2012, 11:37
Default
  #6
Member
 
lynda
Join Date: Oct 2009
Posts: 41
Rep Power: 7
lyna is on a distinguished road
Hi Bruno

to get my results (x, Y, U, V, P, Phi) format. cvs (x, Y, U, V, P, Phi)
Please, give me your opinion, what is the correct method is as follows:

Once paraFoam launches, select all variables that
one wishes to extract and export data (by selecting the option
points)

is what I get correct values ​​of the variable phi (surfaceScalarFields question which we have already spoken).
Thanks
Lynda
lyna is offline   Reply With Quote

Old   July 13, 2012, 04:25
Default
  #7
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
Greetings Lynda,

By what you describe, it doesn't look like you understood the steps I described. The idea is to ignore the fields that paraFoam gives you at the start; instead, open the file "VTK/surfaceFields/surfaceFields_0.vtk" and export that one to CSV!

The file that ends with ".OpenFOAM" can be removed from the "pipeline browser" in ParaView, because it does not have the "phi" field.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   July 13, 2012, 04:39
Default
  #8
Member
 
lynda
Join Date: Oct 2009
Posts: 41
Rep Power: 7
lyna is on a distinguished road
Hi
it's good I have done all the steps you had to explain before, I'll correct values ​​of phi, points0, point1, Point 2, that is to say phi, x, y, z, however, I will also have null values ​​u0 speeds, U1, U2, therefore there is a problem.

thanks
Lynda
lyna is offline   Reply With Quote

Old   July 14, 2012, 19:13
Default
  #9
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 Lynda,

It took me longer to answer this time because I needed time to look into this. Apparently it was necessary to interpolate the U field to a surface vector field, so it can be present in the same level of data as the "phi" field.

So, instead of simply telling you that you need to use "fvc::interpolate", I've built a nice little toolkit for interpolating and reconstructing fields:
I can't go into more details right now, but you should be able to use this if you read the instructions carefully from those two pages, particularly from the wiki page.

Best regards,
Bruno
wyldckat 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
Pointwise segment file or .dat file example RuiVO Pointwise & Gridgen 3 October 23, 2014 11:36
Mesh conversion exits prematurely (Salome to OF) DMcP OpenFOAM 0 July 14, 2011 02:07
Several problems with the mesh conversion utility when converting the meshes from Gridgen su_junwei OpenFOAM Meshing & Mesh Conversion 2 July 26, 2008 23:58
problem with reading the .dat file,error object:#f Paulina FLUENT 6 November 7, 2006 16:49
ACCESS VIOLATION error opening a .dat file DavidSF FLUENT 12 April 8, 2005 15:37


All times are GMT -4. The time now is 20:05.