CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

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

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 17, 2013, 05:38
Default display contour/map of differences for different field values (T, U, etc.)
  #1
Member
 
MSarkar
Join Date: Dec 2009
Posts: 99
Rep Power: 16
msarkar is on a distinguished road
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
msarkar is offline   Reply With Quote

Old   July 17, 2013, 13:18
Default
  #2
Senior Member
 
Reza
Join Date: Mar 2009
Location: Appleton, WI
Posts: 116
Rep Power: 17
triple_r is on a distinguished road
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.
triple_r is offline   Reply With Quote

Old   July 18, 2013, 03:24
Default
  #3
Member
 
MSarkar
Join Date: Dec 2009
Posts: 99
Rep Power: 16
msarkar is on a distinguished road
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?
msarkar is offline   Reply With Quote

Old   July 18, 2013, 11:55
Default
  #4
Senior Member
 
Reza
Join Date: Mar 2009
Location: Appleton, WI
Posts: 116
Rep Power: 17
triple_r is on a distinguished road
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.
triple_r is offline   Reply With Quote

Old   July 30, 2013, 09:10
Default
  #5
Member
 
MSarkar
Join Date: Dec 2009
Posts: 99
Rep Power: 16
msarkar is on a distinguished road
Quote:
Originally Posted by triple_r View Post
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
msarkar is offline   Reply With Quote

Old   July 30, 2013, 11:00
Default
  #6
Senior Member
 
Reza
Join Date: Mar 2009
Location: Appleton, WI
Posts: 116
Rep Power: 17
triple_r is on a distinguished road
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.
triple_r is offline   Reply With Quote

Old   August 29, 2013, 02:43
Default
  #7
Member
 
MSarkar
Join Date: Dec 2009
Posts: 99
Rep Power: 16
msarkar is on a distinguished road
Quote:
Originally Posted by triple_r View Post
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.
msarkar is offline   Reply With Quote

Old   August 29, 2013, 10:22
Default
  #8
Senior Member
 
Reza
Join Date: Mar 2009
Location: Appleton, WI
Posts: 116
Rep Power: 17
triple_r is on a distinguished road
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.
triple_r is offline   Reply With Quote

Old   August 30, 2013, 09:18
Default
  #9
Member
 
MSarkar
Join Date: Dec 2009
Posts: 99
Rep Power: 16
msarkar is on a distinguished road
Quote:
Originally Posted by triple_r View Post
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.
msarkar is offline   Reply With Quote

Old   August 30, 2013, 10:43
Default
  #10
Senior Member
 
Reza
Join Date: Mar 2009
Location: Appleton, WI
Posts: 116
Rep Power: 17
triple_r is on a distinguished road
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 :-)
triple_r is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
TimeVaryingMappedFixedValue irishdave OpenFOAM Running, Solving & CFD 32 June 16, 2021 07:55
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
[OpenFOAM] Display Vector Field for Axial Mesh Case with Circ Velocity sradl ParaView 1 October 22, 2010 06:48
How to input Magnetic Field values in ESTER Code? Amit Gupta Phoenics 0 September 21, 2006 14:38
Differences between VOF and phase field 2L Main CFD Forum 2 July 4, 2004 14:30


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