Difference of two temperature fields between two openFOAM projects

Hi there,
I am new to the functionality of the paraview program. I have two projects ng12 and ng6 with the same geometry but the number of elements in the grid is different. In this case, how can we obtain data on the difference between the two temperature fields of these projects to determine the error?
I uploaded two projects to disk.

I couldn’t download your data because I don’t have permissions. The usual way to compare data on two volumes occupying the same space but with different grids is to first run Resample With Dataset to first interpolate the fields from one grid to the other. You can then use the Append Attributes to combine the fields of two (or more) pipeline objects into the same dataset. Finally, you can use the Calculator filter to compute difference metrics between the two fields.

You can find more information about this process in other posts such as this one: Superposition effect - #17 by Kenneth_Moreland

I set the file permissions.
Could you please try again?

The link might be wrong. I still sends me to a login page and then a request for permissions.

<https:// drive. google. com/drive/folders/1Wnqunp_T-K5_lU4exNFQDgB25Fu2ztDa>

Maybe this will work?

No. Once I remove the spaces I think I get the same response, which is this page:

At any rate, does my suggestion to use Resample With Dataset and then Append Attributes work?


After performing the Append Attributes, I cannot apply the calculator.
I changed the access rights for the google drive again. Maybe this will work?

Press Apply in the properties panel

I finally was able to download your data. Here are some notes.

  1. I note that you are using an old version of ParaView (5.11). I suggest updating to the latest version. I note that there are some improvements with the OpenFoam reader. I’m using ParaView 6.2 for this response.
  2. My previous instructions for combining field information really only works for point data. Make sure the Create cell-to-point filtered data option is on in the reader when loading the data.
  3. Because your meshes are (more or less) a sampled cylinder, the circular bounds do not match up exactly. Thus, when you apply Resample With Dataset, some of the points of your

Here are step-by-step instructions. (I am using the files ng4.foam and ng6.foam. Use any pair you like.)

  1. Open the ng4.foam file. Select Create cell-to-point filtered data and then Apply.
  2. Repeat for ng6.foam.
  3. Select ng4.foam and create a Resample With Dataset filter.
    a. In the Change Input Dialog box, make sure ng4.foam is set as the Source Data Arrays input.
    b. Select Destination Mesh and select ng6.foam as that input.
    c. Click OK on that dialog and then Apply in the properties panel.
  4. Select both ng6.foam and one of the ResampleWithDataset1 items in the pipeline browser and add the Append Attributes filter. Apply it.
  5. Add the Threshold filter to the Append Attributes to remove those points that were just outside the ng4.foam data.
    a. Change Scalars to vtkValidPointMask.
    b. Change Threshold Method to Above Upper Threshold.
    c. Change Upper Threshold to 1.
    d. Apply
  6. Use the Calculator filter to compute the difference between the values of the two meshes. For example, the expression abs(p-p_input_1) computes the difference of the p fields in the two meshes.

Here is a state file and screen shot of me applying that to your data.

compare-fields.pvsm (911.2 KB)

There are other ways to get the fields to a common mesh. For example, you could apply the Resample To Image filter to both readers and append the attributes of those, but I leave that as an exercise to the user.

An excellent result—that’s exactly what I needed! Thank you so much, everything worked out!

Could you please tell me how to plot the difference in parameters (in my case, I calculated the temperature difference) across the entire parameter field volume as a function of a cylindrical coordinate?
I think something like what I’ve shown in my drawing should happen. My drawing shows a cross-section, but I want to achieve this for the entire volume of the cylinder.

This sounds like a new topic that should be opened on a different discussion.

It could also use more explanation. I don’t understand how you expect a 1D plot cover the entire volume.