CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   display contour/map of differences for different field values (T, U, etc.) (http://www.cfd-online.com/Forums/main/120905-display-contour-map-differences-different-field-values-t-u-etc.html)

msarkar July 17, 2013 04:38

display contour/map of differences for different field values (T, U, etc.)
 
Hi All,

I simulated a case using OpenFOAM and Fluent both. From two contours of two simulations it is difficult to estimate the differences in values. I was wondering if it is possible to compute results differences to show where are the main discrepancies. Please tell me if we can display the map/contour of differences for different field values (T, U, etc.) and how to do that.

Any help would be appreciated.

regards
M Sarkar

triple_r July 17, 2013 12:18

Can you export the results from both software packages to a third party format that both support and try to compare the results in that software?

If you have used the same grid for both, then this could be very easy. If the grids are not the same, then probably you will need to map the results to a common grid, like a regular grid, and then compare the mapped results.

msarkar July 18, 2013 02:24

Hi Reza, thanks for your reply.

Yes, I can export both of them in Ensight format. After conversion in Ensight format how should I proceed? I do not have Ensight. I have Paraview, OpenFOAM and Fluent.

Mesh issue:
Same mesh was used for OpenFOAM and Fluent. However, the mesh was created using Gmsh (2D mesh with single cell in Z direction to meet OpenFOAM requirement) and converted into foam format. Again Foam mesh was converted to Fluent using foamMeshToFluent utility and after conversion I found that the mesh is 3D with one cell in Z direction. I need 2D mesh in Fluent. Is there any way to convert 2D mesh from OpenFOAM to Fluent?

triple_r July 18, 2013 10:55

Don't know if it is possible to convert an OpenFOAM mesh (which is 3D) to a 2D fluent mesh, but the other way is possible It seems. So, if you create your mesh in fluent (I guess in GAMBIT or ANSYS mesher or any other package that can create a fluent .msh file) even if it is 2D, you can convert it to a 3D OF mesh using fluentMeshToFoam utility, and it will automatically create a 3D mesh with one element thickness from a 2D mesh (not axi-symmetric though, only planar 2D).

Just looking at the documentation, there is a converter that lets you convert results from OF to fluent. Just take a look at:

http://www.openfoam.org/docs/user/fl...#x31-1930006.2

the two utilities are foamMeshToFluent and foamDataToFluent to probably create the .cas and .dat files respectively. If you have both cases in 3D mesh, and the same grid, then the comparison should be fairly easy, especially if you have access to the new CFD-post program that can read both CFX and FLUENT files, instead of working in FLUENT's native post-processor.

msarkar July 30, 2013 08:10

Quote:

Originally Posted by triple_r (Post 440580)
Don't know if it is possible to convert an OpenFOAM mesh (which is 3D) to a 2D fluent mesh, but the other way is possible It seems. So, if you create your mesh in fluent (I guess in GAMBIT or ANSYS mesher or any other package that can create a fluent .msh file) even if it is 2D, you can convert it to a 3D OF mesh using fluentMeshToFoam utility, and it will automatically create a 3D mesh with one element thickness from a 2D mesh (not axi-symmetric though, only planar 2D).

Just looking at the documentation, there is a converter that lets you convert results from OF to fluent. Just take a look at:

http://www.openfoam.org/docs/user/fl...#x31-1930006.2

the two utilities are foamMeshToFluent and foamDataToFluent to probably create the .cas and .dat files respectively. If you have both cases in 3D mesh, and the same grid, then the comparison should be fairly easy, especially if you have access to the new CFD-post program that can read both CFX and FLUENT files, instead of working in FLUENT's native post-processor.

Hi Reza,

Thanks for your input. I have paraview as post processor. Is it possible to display using paraview? if yes, how? Now I have 2D fluent results and 2D openfoam results using similar mesh (no. of cells and other stuff are same only patch names are different). I guess, I can convert both results in Ensight format. If it is not possible using paraview, suggest a post processing tool which can do this.

Regards
msarkar

triple_r July 30, 2013 10:00

If you want to use paraview to compare the data sets, use the foamToVTK tool to convert your data to VTK format. This will create a VTK subdirectory under the case directory and create a .vtk file that is readable by paraview.

Then you can use fluentDataToFoam to convert your fluent results to openFoam format, and probably you will have to run foamToVTK for the converted case as well.

Finally, you can just run paraview and open the .vtk files corresponding to the same time steps from both cases (just open one, and then another without closing the first). You can then use filters and/or transformations to compute the differences or visualize the two data sets at the same time.

I hope this helps.

msarkar August 29, 2013 01:43

Quote:

Originally Posted by triple_r (Post 442838)
If you want to use paraview to compare the data sets, use the foamToVTK tool to convert your data to VTK format. This will create a VTK subdirectory under the case directory and create a .vtk file that is readable by paraview.

Then you can use fluentDataToFoam to convert your fluent results to openFoam format, and probably you will have to run foamToVTK for the converted case as well.

Finally, you can just run paraview and open the .vtk files corresponding to the same time steps from both cases (just open one, and then another without closing the first). You can then use filters and/or transformations to compute the differences or visualize the two data sets at the same time.

I hope this helps.

Hi Reza,

Sorry for my late response. I was busy with some other stuff. however i came back to this issue again. I tried the specified tricks with two OpenFOAM case results but I could not do it. I loaded two two cases in paraview without closing the first one. If I go to Filters ---> Alphabetical ---> Transform, this (transform) option is not activated. So I could not try that. Is there other way or am I missing anything? Paraview can directly load OpenFOAM results. Is there any particular reason to convert foam results in vtk format?

My case has multiple regions and I am using latest OpenFOAM (OF-2.2.x). I do not have fluentDataToFoam utility. However, I tried with OF-1.6-ext also to convert Fluent Data but without any success. Could you please let me know the procedure to convert Fluent data to Foam data?

Any help would be appreciated.

triple_r August 29, 2013 09:22

Hi,

I didn't know you can load more than one cases at once, that is why I suggested converting them to VTK, because then you can use file -> open and point to those VTK files.

Anyhow, to transform, use the option under the display not filters. So, select the case that you want to transform in the pipeline browser, and then select the display tab, scroll all the way down, and there should be options for translate, scale, orientation, and origin. Play with those to have the two cases look as you want them to in the viewer.

I thought fluentDataToFoam utility comes with OpenFOAM by default. Maybe you haven't compiled it? I'll take a look and see if that is the case.

msarkar August 30, 2013 08:18

Quote:

Originally Posted by triple_r (Post 448729)
Hi,

I didn't know you can load more than one cases at once, that is why I suggested converting them to VTK, because then you can use file -> open and point to those VTK files.

Anyhow, to transform, use the option under the display not filters. So, select the case that you want to transform in the pipeline browser, and then select the display tab, scroll all the way down, and there should be options for translate, scale, orientation, and origin. Play with those to have the two cases look as you want them to in the viewer.

I thought fluentDataToFoam utility comes with OpenFOAM by default. Maybe you haven't compiled it? I'll take a look and see if that is the case.

Hi Reza,

To load more than one OpenFOAM case, you should have a empty file with .foam (x.foam) extension in that case directory. You can load same way as you mentioned for VTK.

Thanks a lot for your help. Transform worked for me. However, I wanted to display quantitative difference of field means if any tool can calculate the difference in value of T or U at each node for two cases and display that difference. Do you know any tool or utility which can do this? I know if both of them are OpenFOAM case, foamCalc can do that and we can display this using paraview. But if one case ran in OpenFOAM and another in Fluent, how to calculate the difference and display that? Is it possible if both cases are in Fluent format? If yes, how?

No, I don not have fluentDataToFoam utility with OF-2.2.x. If you have, please let me know how to compile this with OF-2.2.x.

triple_r August 30, 2013 09:43

You are right. I made a big mistake. The standard tool is foamDataToFluent which converts a foam case to Fluent data file. A tool that does the conversion other way around is not in the standard package (at least not in 2.1.1), but it is (or was) a part of 1.6-extend. Here is a post that shows you how to use it in OF 2.1.1:

http://www.cfd-online.com/Forums/ope...tml#post412947

However, you need to compile it first, and for that, you need to copy sources for the tool itself and some of the dependencies that don't exist anymore (like wordIOList.H and wordIOList.C) to the src directory, change the make file to include those dependencies, and then compile it.

After compiling the tool, follow the instructions in the post above to create the dictionary files necessary and then run the tool.Hopefully it will work :-)


All times are GMT -4. The time now is 02:51.