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

Problem with fluentDataToFoam (from OF 1.6 ex) in OF 2.1.1

Register Blogs Community New Posts Updated Threads Search

Like Tree17Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 9, 2015, 17:16
Default
  #21
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Isabel,

If you had provided images of what you're seeing, I would have been able to accurately diagnose the issue.

Since you didn't, I'll have to guess :
  1. You're not looking at the same data type in ParaView, as the one you're seeing in Fluent.
  2. Or you want to see the surface of the mesh, and instead you're seeing the internal mesh.
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 10, 2015, 04:16
Default
  #22
Senior Member
 
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 17
isabel is on a distinguished road
Excuse me I did not provide images.

This is the pressure field that I have in the original Fluent files:




And this is the pressure field that I read in OpenFOAM after fluentDataToFoam conversion:




The internal pressure is Ok, but the pressure at boundary conditions is not the same in OpenFOAM and Fluent

This is my zoneToPatchName file:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class wordList;
location "constant/polyMesh";
object zoneToPatchName;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

/*
(45 (2 fluid fluid)())
(45 (3 wall wall)())
(45 (4 wall symmetry)())
(45 (5 wall outlet)())
(45 (6 wall inlet)())
(45 (8 interior default-interior)())
*/

9
(
dummy //foam 0 - no fluent correspondence
dummy //foam 1 - fluent 1
fluid //foam 2 - fluent 2
wall //foam 3 - fluent 3
symmetry //foam 4 - fluent 4
outlet //foam 5 - fluent 5
inlet //foam 6 - fluent 6
dummy //foam 7 - fluent 7
default-interior //foam 8 - fluent 8
);




After fluentDataToFoam conversion, the content of zoneToPatchName file changes to this:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.0 |
| \\ / A nd | Web: http://www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class wordList;
location "constant/polyMesh";
object zoneToPatchName;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


9
(
unknown
unknown
unknown
wall
symmetry
outlet
inlet
unknown
default-interior
)


// ************************************************** *********************** //
isabel is offline   Reply With Quote

Old   April 12, 2015, 16:56
Default
  #23
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Isabel,

I don't have much experience with converting Fluent data to OpenFOAM data, therefore I'm not familiar with any usual issues that can occur in these cases.

Nonetheless, try using foamToVTK like this:
Code:
foamToVTK -noPointValues
to export the data into VTK files. Then open the respective VTK files in ParaView, without point data. If my guess is correct, the problem has to do with how you're looking at the values.

Beyond that, I suggest you try a simpler test case. If the simpler test case has the same problems, please share the complete test case, so that I or anyone else can look into this.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   April 16, 2015, 03:55
Default
  #24
Senior Member
 
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 17
isabel is on a distinguished road
Thank you very much. Now it works.
isabel is offline   Reply With Quote

Old   October 25, 2016, 04:43
Default Problem with fluentDataToFoam (from OF 1.6 ex) in OF 2.3.1
  #25
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23
vasava will become famous soon enough
Has anyone tried to compile and use fluentDataToFoam with openFoam 2.3.1?

I managed to compile fluentDataToFoam but no luck with any mapping yet. I have case and data files made with Fluent V17.2.

I keep getting the long list of corrupted double-link list.
Code:
*** glibc detected *** fluentDataToFoam: corrupted double-linked list: 0x00000000010f43a0 ***
I am following instruction given by Bruno Santos.

Any clues or suggestions?
vasava is offline   Reply With Quote

Old   February 26, 2021, 09:55
Default Caution for Fluent cases in which only the mesh was replaced
  #26
Senior Member
 
Lukas Fischer
Join Date: May 2018
Location: Germany, Munich
Posts: 117
Rep Power: 8
lukasf is on a distinguished road
Great explanation Bruno.



However, note that this does not work if you load the .msh file into an existing Fluent .cas file. What happens is then that the Zone Section ID's in the .cas and .msh do not (have to) match.



For the .dat file the ID's of the .cas are the important ID's for the zoneToPatchName file.
lukasf is offline   Reply With Quote

Old   June 27, 2022, 12:24
Default
  #27
Senior Member
 
Lukas Fischer
Join Date: May 2018
Location: Germany, Munich
Posts: 117
Rep Power: 8
lukasf is on a distinguished road
Have you found a solution?


For me it works to create a .dat file with the averaged / mean fields using:

Code:
UMeanx 402;
UMeany 404;
UMeanz 406;
TMean 408;

The values of these scalars are correctly written to the .dat file but when I load the .dat file into fluent the values are wrong (the trend looks correct but the absolute values are way off).


Any suggestions?


Quote:
Originally Posted by Alhasan View Post
Hi Bruno,

That helped me a lot i have been playing with it for the past few days and i am not still able to figure which of the those numbers go for
pMean, PMean2Prime, UMean and UMean2Prime.

atleast for pMean and PMean2Prime i can guess XF_RF_DATA_PRESSURE_MEAN=400,
XF_RF_DATA_PRESSURE_RMS=401,

but for UMean and UMean2Prime (openFOAM has only one file) could it be
XF_RF_DATA_X_VELOCITY_MEAN=402,
XF_RF_DATA_X_VELOCITY_RMS=403,
XF_RF_DATA_Y_VELOCITY_MEAN=404,
XF_RF_DATA_Y_VELOCITY_RMS=405,
XF_RF_DATA_Z_VELOCITY_MEAN=406,
XF_RF_DATA_Z_VELOCITY_RMS=407,

i tired but no luck,
any wise suggestions

Kind Regards,
Hasan K.J
lukasf is offline   Reply With Quote

Old   October 24, 2022, 13:12
Default
  #28
Senior Member
 
Lukas Fischer
Join Date: May 2018
Location: Germany, Munich
Posts: 117
Rep Power: 8
lukasf is on a distinguished road
Here is a summary on how to use foamDataToFluent:

1. In more recent Ansys Fluent versions you need to change the data format from dat.h5 to .dat. Go to preferences/general and choose legacy as the Default Format for I/O.
In the Console (Text user inferface) type:
/file/binary-legacy-files?
no

Now you can export the .dat file by going to file/write/Data.


2. In your Fluent case go to boundary conditions:
click onto each patch to see the ID numbers. Afterwards prepare a list for the file zoneToPatchName with the corresponding ID numbers and patchnames.


Moreover, look at the cell zone conditions and also add the e.g. fluid id which is the "unknown" patchname in zoneToPatchName.


constant/polymesh/zoneToPatchName:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       wordList;
    location    "constant/polyMesh";
    object      zoneToPatchName;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

39
(
dummy
dummy
dummy
dummy
dummy
dummy
dummy
dummy
dummy
dummy
dummy
dummy
dummy
dummy
dummy
dummy
dummy
dummy
dummy
dummy
dummy
dummy
dummy
dummy
unknown
int_fluid
RIGHT_SIDE1
TOP1
INLET1
LEFT_SIDE1
OUTLET1
WALL_PIPE1
RIGHT_SIDE_PRESSURE_TANK1
LEFT_SIDE_PRESSURE_TANK1
PRESSURE_TANK_INLET1
PRESSURE_TANK_WALL1
PRESSURE_TANK_WALL_SLIP1
BOTTOM_WALL_DOWNSTREAM1
BOTTOM_WALL1
 );
3. The file system/foamDataToFluentDict is not needed here. It is needed for foamDataToFluent and not for fluentDataToFoam



4. Download the file (foamDataToFluent) and compile it.
Copy zoneToPatchName to constant/polyMesh/.


Set in the system/controlDict the startTime which equals the directory to which the data is converted to.


Then run the command: foamDataToFluent YourFluentDataName.dat
Krapf likes this.

Last edited by lukasf; October 28, 2022 at 04:17.
lukasf 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
UDF compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 05:43
Problem Importing Geometry ProE to CFX fatb0y CFX 3 January 14, 2012 20:42
Solve single but higher order equation by OF 1.6 suffering Problem alundilong OpenFOAM Programming & Development 0 December 23, 2010 14:53
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 07:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 20:13


All times are GMT -4. The time now is 21:53.