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

Fluent data to foam

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 3 Post By volker1
  • 1 Post By volker1
  • 1 Post By volker1

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 18, 2016, 05:40
Default Fluent data to foam
  #1
Senior Member
 
harshawardhank
Join Date: Mar 2014
Posts: 209
Rep Power: 13
harsha_kulkarni is on a distinguished road
Hello Foamers

Can you provide the detailed procedure for converting fluentdata to foam for further processing in OpenFOAM
harsha_kulkarni is offline   Reply With Quote

Old   November 22, 2016, 05:10
Default
  #2
New Member
 
Volker
Join Date: Aug 2014
Location: Germany
Posts: 16
Rep Power: 11
volker1 is on a distinguished road
Hi,

here is a tutorial based example:
http://www.cfd-online.com/Forums/ope...tml#post412947

if you are interested in the complete story read:
http://www.cfd-online.com/Forums/ope...am-format.html

if you need something that compiles and runs with OF version 4 try the zipfile
Attached Files
File Type: zip fluentDataToFoam_V4.1.zip (10.8 KB, 155 views)
Bashar, lukasf and Jieren like this.

Last edited by volker1; November 23, 2016 at 03:17. Reason: removed <tmp> in code
volker1 is offline   Reply With Quote

Old   August 21, 2018, 13:05
Default
  #3
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 225
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by volker1 View Post
Hi,

here is a tutorial based example:
http://www.cfd-online.com/Forums/ope...tml#post412947

if you are interested in the complete story read:
http://www.cfd-online.com/Forums/ope...am-format.html

if you need something that compiles and runs with OF version 4 try the zipfile
Can I compile it in OF5?
gu1 is offline   Reply With Quote

Old   August 22, 2018, 01:52
Default
  #4
New Member
 
Volker
Join Date: Aug 2014
Location: Germany
Posts: 16
Rep Power: 11
volker1 is on a distinguished road
Hi,

for me it at least compiled with exactly the same warnings for version 4.1, 5.0 and 6.0.
Did not verify the executables however.
Note that this converter was not designed for the current binary FLUENT format but for the ASCII output files of earlier versions!
volker1 is offline   Reply With Quote

Old   August 22, 2018, 08:05
Default
  #5
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 225
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by volker1 View Post
Hi,

for me it at least compiled with exactly the same warnings for version 4.1, 5.0 and 6.0.
Did not verify the executables however.
Note that this converter was not designed for the current binary FLUENT format but for the ASCII output files of earlier versions!
Exactly, I was able to compile it in OF5.
Have you ever used this tool?! Did you notice any changes in the velocity field when compared to the results obtained by Fluent?
I did the tutorial recommended by Bruno (cavity) ... and there was a disparity of results.
gu1 is offline   Reply With Quote

Old   August 23, 2018, 02:01
Default
  #6
New Member
 
Volker
Join Date: Aug 2014
Location: Germany
Posts: 16
Rep Power: 11
volker1 is on a distinguished road
Hi,
I do not work with FLUENT but I considered to work with FLUENT results from others as background fields. So I am sorry I cannot help on the FLUENT side at all.

As fluentDataToFoam is a converter my test was first to convert a few OF cases (including the cavity tutorial) to FLUENT with the reverse converter foamDataToFluent that should be part of OF4.1. Then back to OF with fluentDataToFoam.
Then I compared the original and twice converted data and found it identical. This is what good converters should do, right?
BTW, the same procedure with the CGNS format converters will result in some smearing of data due to a node vs. cell center issue.

If you have a (considerable) disparity of results between OF and FLUENT calculation results of the cavity case (I assume that's what you did and compared?) it probably comes from the calculation. Use identical models and properties data and moreover fixed, equal time steps for both. I remember that I found small differences already for different OF versions with basically the same input files.
gu1 likes this.
volker1 is offline   Reply With Quote

Old   August 24, 2018, 13:15
Default
  #7
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 225
Rep Power: 10
gu1 is on a distinguished road
I ran the tutorial described by Bruno (cavity), on the link shared by you. When converting the Fluent field to OF (still in the cavity tutorial), I noticed that the results did not look alike, based on the analysis done in ParaView ... I believe that maybe I could have done something wrong in the tutorial procedure.

I also do not work with Fluent, but I want to import a turbulent field for OF analysis.

Here's my utility compilation log, kindly ask me to judge whether the build was correct:

https://paste.ubuntu.com/p/kMWrWZNGrM/

Is the field distortion problem related to these Warnings?
Do you know the solution for them?!
gu1 is offline   Reply With Quote

Old   August 28, 2018, 03:01
Default
  #8
New Member
 
Volker
Join Date: Aug 2014
Location: Germany
Posts: 16
Rep Power: 11
volker1 is on a distinguished road
Hi,
I do not understand some things here:
- How is your FLUENT result related to the cavity tutorial? Why should it look alike?
- Where does it come from at all if you do not work with FLUENT?

Or did you also just try to convert the cavity tutorial from OF to FLUENT and back and this did not work properly? As I wrote above that worked for me in spite of the warnings. Your warnings seem the same warnings that I got.

There are two FLUENT to OF mesh converters: fluent3DMeshToFoam and fluentMeshToFoam. The cavity tutorial is 2D, so maybe this is an issue, too. Just try both and see what happens.
volker1 is offline   Reply With Quote

Old   August 28, 2018, 14:05
Default
  #9
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 225
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by volker1 View Post
Or did you also just try to convert the cavity tutorial from OF to FLUENT and back and this did not work properly?
Yes, I did this... and the results were not the same.

My intention is to bring a turbulent field obtained in Fluent to OF ... but for this, I need to ensure that the tool works.
gu1 is offline   Reply With Quote

Old   August 29, 2018, 03:46
Default
  #10
New Member
 
Volker
Join Date: Aug 2014
Location: Germany
Posts: 16
Rep Power: 11
volker1 is on a distinguished road
Hi
I tried it out again by download of my zipfile, compilation with V5.0 and application on the V5.0 cavity case for time 0.1. For the tutorial I just did "Allrun" and then picked up everything I need for conversion elsewhere.
With regard to the instructions by Bruno in the link there is a slight change (already for V4.1):
postProcess -func "components(U)" replaces: foamCalc components U
Guess you found this out yourself to come that far at all.

My findings are:
The tools works perfect ("diff" reports no changes) for the internal fields of U und p.
However foamDataToFluent writes numeric values into the boundary fields instead of "zeroGradient" or whatever. But I suppose this is the best foamDataToFluent could do. I did however not check if this numeric data of boundary fields in the fluent *.dat files is reasonable and properly transferred to OF by fluentDataToFoam.
I noticed that pressure dimensions are wrong after re-conversion to OF. Probably an easy fix in the converter source or just edit the "p" files.

So I confirm again the FLUENT converters basically work fine for the internal fields also in V5.0.
So the converters should not cause a data distortion problem after converting twice.

BTW, if you look at the frontAndBack patch in paraView, I agree that p and U look distorted so the boundary fields are obviously not treated properly. Maybe this is your issue?
If you only check "internalMesh" in "Mesh Parts" in ParaView things look much better!
gu1 likes this.
volker1 is offline   Reply With Quote

Old   August 29, 2018, 08:48
Default
  #11
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 225
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by volker1 View Post
Hi
I tried it out again by download of my zipfile, compilation with V5.0 and application on the V5.0 cavity case for time 0.1. For the tutorial I just did "Allrun" and then picked up everything I need for conversion elsewhere.
With regard to the instructions by Bruno in the link there is a slight change (already for V4.1):
postProcess -func "components(U)" replaces: foamCalc components U
Guess you found this out yourself to come that far at all.

My findings are:
The tools works perfect ("diff" reports no changes) for the internal fields of U und p.
However foamDataToFluent writes numeric values into the boundary fields instead of "zeroGradient" or whatever. But I suppose this is the best foamDataToFluent could do. I did however not check if this numeric data of boundary fields in the fluent *.dat files is reasonable and properly transferred to OF by fluentDataToFoam.
I noticed that pressure dimensions are wrong after re-conversion to OF. Probably an easy fix in the converter source or just edit the "p" files.

So I confirm again the FLUENT converters basically work fine for the internal fields also in V5.0.
So the converters should not cause a data distortion problem after converting twice.

BTW, if you look at the frontAndBack patch in paraView, I agree that p and U look distorted so the boundary fields are obviously not treated properly. Maybe this is your issue?
If you only check "internalMesh" in "Mesh Parts" in ParaView things look much better!
I'll repeat the tutorial and come up with new information on the results I get.
I would like to point out that I am not criticizing the application, but rather questioning whether you have had problems similar to mine...
gu1 is offline   Reply With Quote

Old   September 1, 2018, 06:57
Default
  #12
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 225
Rep Power: 10
gu1 is on a distinguished road
I performed new tests using my Fluent exported data and worked perfectly.
gu1 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
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 13:41
Fluent crash on writing data file after thousand iterations Chuck87 FLUENT 0 September 2, 2015 16:17
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 13:06
How to update polyPatchbs localPoints liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 17:27


All times are GMT -4. The time now is 16:34.