CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   conversion in .dat (http://www.cfd-online.com/Forums/openfoam/103246-conversion-dat.html)

lyna June 14, 2012 13:46

conversion fluent
 
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 June 15, 2012 08:44

conversion fluent
 
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

wyldckat June 16, 2012 07:35

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

lyna June 18, 2012 13:07

conversion in .dat
 
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

wyldckat June 18, 2012 16:20

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... :confused:

Best regards,
Bruno

lyna July 12, 2012 11:37

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

wyldckat July 13, 2012 04:25

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

lyna July 13, 2012 04:39

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

wyldckat July 14, 2012 19:13

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


All times are GMT -4. The time now is 22:07.