CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Transforming results to OpenFOAM format (http://www.cfd-online.com/Forums/openfoam-post-processing/117119-transforming-results-openfoam-format.html)

astein May 2, 2013 10:25

Transforming results to OpenFOAM format
 
Dear Foamers,

do you know any option to transform results (e.g. from CFX, CGNS, Tecplot) to the OpenFOAM format?
I'd like to postprocess some results with OpenFOAM tools, however I could not find a way to transform the results.

Running cgnsToFoam converts the mesh, but the not the results themselvers.

Any help is welcome, thanks a lot in advance!

wyldckat May 2, 2013 10:37

Greetings astein,

Since that's rarely used, there are very few ways to convert results from other applications to OpenFOAM.

The only one I know about is fluentDataToFoam and it's part of Extend's variant OpenFOAM 1.6-ext: http://www.cfd-online.com/Forums/ope...of2-1-1-a.html

And don't forget that you already need to have the mesh ready on the OpenFOAM case, otherwise there is no mesh to place the results inside it...

And the big question is: if you have Tecplot, why do you want to use OpenFOAM for post-processing data?

Best regards,
Bruno

astein May 2, 2013 11:13

Thanks for your fast answerand the hint to fluentDataToFoam!
With "postprocessing", I meant stuff like doing further compuations on the mesh based on given results. I have those methods available in OpenFOAM, but would like to run them on CFX results.

Regarding fluentDataToFoam, I just gave it a try: I imported the .res file in Fluent and saved as a .cas - is that correct? (I tried both, binary and ASCII)

starting fluentDataToFoam in a correct Foam case with
"fluentDataToFoam testcase2.cas" for the ASCII-dat,
starts working, but stops with:
#################################
--> FOAM FATAL IO ERROR:
Attempt to get back from bad stream

file: IStringStream.sourceFile at line 0.

From function void Istream::getBack(token&)
in file db/IOstreams/IOstreams/Istream.C at line 39.

FOAM exiting
#################################

Any hints for this problem or other ideas to transform the results?

wyldckat May 2, 2013 11:25

I guess you didn't read carefully that whole thread...
Check this post, which is referenced on the first thread I had mentioned: http://www.cfd-online.com/Forums/ope...tml#post412947 post #4

astein May 2, 2013 11:40

Thanks again for your fast reply!

I'm trying to use the utility in a working 1.6-ext, having fluentDataToFoam compiled correctly - therefore I wouldn't expect any problems on this side.

I guess, my major problem is to convert the given results from CFX->fluent. I don't really know the fluent files, by I am not sure my .cas-file contains the results at all.
Do you know a procedure to obtain a fluent result file from a .res?

Regards!

mbeaudoin May 2, 2013 13:06

> Running cgnsToFoam converts the mesh, but the not the results themselvers.

Nope.

cgnsToFoam will convert the mesh AND the solution fields. This is why we wrote this utility in the first place...

cgnsToFoam -help

Martin

Quote:

Originally Posted by astein (Post 424691)
Dear Foamers,

do you know any option to transform results (e.g. from CFX, CGNS, Tecplot) to the OpenFOAM format?
I'd like to postprocess some results with OpenFOAM tools, however I could not find a way to transform the results.

Running cgnsToFoam converts the mesh, but the not the results themselvers.

Any help is welcome, thanks a lot in advance!


astein May 3, 2013 03:54

Martin - thanks for that small but important hint :-)

The tool however ignores some of the (scalar) quantities I'd like to take over, because it doesn't know them. I couldn't find an option to convert the quantites anyway - did I overlook such an option? The alternative is to dig in the source code an add addtional quantites, right? Or do you even have a special version for this issue?

Regards & thanks a lot!

mbeaudoin May 3, 2013 12:25

> The tool however ignores some of the (scalar) quantities I'd like to take over, because it doesn't know them

The tool has no "knowledge" of specific fields. No quantity (scalar) names are hardcoded either.

cgnsToFoam just scans for solutions stored in the CGNS file, and convert them to OpenFOAM.

Just make sure your CGNS solutions are stored at the nodes (vertex) of the mesh, and not at the face centers or cell centers. You might have to tweak the configuration of your CGNS exporter for that.

Martin

Quote:

Originally Posted by astein (Post 424879)
Martin - thanks for that small but important hint :-)

The tool however ignores some of the (scalar) quantities I'd like to take over, because it doesn't know them. I couldn't find an option to convert the quantites anyway - did I overlook such an option? The alternative is to dig in the source code an add addtional quantites, right? Or do you even have a special version for this issue?

Regards & thanks a lot!



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