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

compare results from two meshes

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 19, 2015, 07:08
Default compare results from two meshes
  #1
sgr
New Member
 
Simon Grützner
Join Date: Apr 2015
Posts: 6
Rep Power: 2
sgr is on a distinguished road
Hello FOAMers,

i have a problem at hand, which I have not been able to solve yet. I built an OpenFOAM case and then used refine mesh to create a second case. Now, I want to compare both results in Paraview. Here I was wondering, if it is at all possible to calculate absolute values of the difference between results from the coarser mesh and those from the finer one for every cell and at every time step in Paraview. This should look something like

u_diff = abs( u_case1 - u_case2).

I am not sure, if I have to use something like mapFields before, to map the data of the coarser mesh onto the finer one, and if so, how it is done for every time step?

I really appreciate any help on that matter.

Best regards,

sgr.
sgr is offline   Reply With Quote

Old   June 25, 2015, 06:45
Default
  #2
New Member
 
Join Date: Aug 2011
Posts: 22
Rep Power: 5
Kojote is on a distinguished road
Hi

I have a way but it is perhaps not the best.

1. Patch the results of case A to Mesh B. (mapFields) in case mesh is not 100% identical
2. Do FoamToVTK
3. In Paraview you can now do A-B using the python calculator.
Select both vtk files and then do
inputs[0].CellData['Results']-inputs[1].CellData['Results']

Br

Christian
Kojote is offline   Reply With Quote

Old   June 26, 2015, 12:17
Default
  #3
sgr
New Member
 
Simon Grützner
Join Date: Apr 2015
Posts: 6
Rep Power: 2
sgr is on a distinguished road
Hello Christian,

thank you very much for your response, it is the first i got at any of my threads. So thank you for that:-)

I tried mapFields a couple days ago but I ran in some difficulties, I was not able to solve and which I do not really understand, yet. But perhaps you can help me with that.

I have to regions in my domain, named plate and air, since I want to do a conjugated heat transfer analysis between a hot gas stream and a plate. Therefore I used the chtMultiRegionFoam. I basically started from the chtMultiRegionHeater tutorial and adapted the geometry, accordingly. If i use mapFields on the region air, it only returns the values on the boundary and NOT the internalFields, which i am interested most.

I used the following command

mapFields -consistent -sourceRegion air -targetRegion air

and defined the source Time through in the target case's controlDict. Do you have an Idea, what could be the problem here or did you perhaps ran into similar problems at one time?

I already tried doing all the operations i did for my case - except the multiregion feature- with the libCavityCase, where mapFields worked fine.

Best Regards,
Simon

ps. I can sent you my caseDir if you like but i had to change chtMultiRegionFoam solver such that I had to uncomment one include in the beginning.
sgr is offline   Reply With Quote

Old   June 29, 2015, 09:37
Default
  #4
New Member
 
Join Date: Aug 2011
Posts: 22
Rep Power: 5
Kojote is on a distinguished road
Hi Simon

are the meshes 100% the same, else i don't think you can use "-consistent"

mapFields -consistent -sourceRegion air -targetRegion air


I use "-consistent" for filling sims when i enlarge the domain with a higher bath Level. Then my meshes are 100% the same. So if you did not yet try without these Option.

Hope that will help else i have no clou what the Problem could be.

i use always an empty map file, too. (i am using 2.3.X and 3.1-ext)

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object mapFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
patchMap ( );
cuttingPatches ( );


Br

Christian
Kojote is offline   Reply With Quote

Old   July 1, 2015, 06:38
Default
  #5
sgr
New Member
 
Simon Grützner
Join Date: Apr 2015
Posts: 6
Rep Power: 2
sgr is on a distinguished road
Hello Christian,

thank you again for your answer. I already tried what you recommended, but it did not work either. And since the second case is just the first one, but with a refined mesh, they should be 100% the same. I do not have a clue, either.

I now decided to use "sample" to read out some data and use those to compare the data sets. It it not what I hoped for, but at least something.

Thank you again for your posts.

Have a nice day

Simon
sgr is offline   Reply With Quote

Reply

Tags
calculater, paraview, refine mesh

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing Air numerical results with water experimental results cristian2009es Main CFD Forum 1 July 2, 2014 18:11
[Paraview] Compare results with reference maximsch2 OpenFOAM Paraview & paraFoam 1 January 29, 2011 14:21
Different results from similar quality cfx and ICEM meshes Nick R CFX 3 January 17, 2011 08:48
Results compare Star cd V4.06 and 3.26 Andrea CD-adapco 2 November 11, 2008 04:03
Is that a circle Results from interFoam sega OpenFOAM Paraview & paraFoam 2 May 8, 2008 02:49


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