CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   corrupted mapFields results (https://www.cfd-online.com/Forums/openfoam-pre-processing/237159-corrupted-mapfields-results.html)

Tobermory July 3, 2021 06:00

corrupted mapFields results
 
2 Attachment(s)
I wonder if anyone else has seen this before. I have a simple blockMesh mesh that I have run a solver on, and now I am refining part of the mesh with refineMesh, then mapping the solution from the old mesh to the new using mapFields -consistent. Nothing extravagant so far, and no error messages from checkMesh so I think that the new mesh is fine; and no errors from mapFields.

My problem is that the resulting fields look like they have measles (see the attached pix for the p and T fields, which should be basically uniform) - sporadic cells have junk values ... always the same cells, so it is not random. I have tried renumbering the cells in the mesh - this has no effect.

Any ideas? Anyone seen this before?

Tobermory July 3, 2021 06:19

PS - I have tried all 3 mapMethods, and get exactly the same result. These rogue values are scattered through the mesh, not just at the boundaries.

Tobermory July 3, 2021 06:34

OK - it seems to be an issue with the Foundation v8 version of mapFields ... the results are fine if I use the ESI 2012 version of mapFields.

Tobermory July 3, 2021 07:01

Final post - I think I have solved my problem with the Foundation version.

In my haste, I had set up the new case (the one I wanted to map the results onto) without a proper, initial 0 folder. This seems to cause the Foundation version of mapFields internal issues for my case (but not for a simple tutorial case like the pitzDaily simpleFoam case) ... maybe because I have some complex funkySetBoundary field boundaries? Odd that it runs without complaint, but gives such random output.

Regardless, if I set up my case properly, with a properly defined 0 folder, then apply the mapFields -consistent to that, then I get a nice clean mapping. Maybe this thread is useful for others in the future.

Ship Designer July 5, 2021 14:46

Hi Tobermory, I found that the mapFields utility maps the fields to the time folder indicated by the startTime entry in controlDict. If that folder is missing, mapFields will execute without reporting errors but effectively map nothing or write anything to disk… This might explain why it worked as soon as you created the 0 folder. Maybe your controlDict was set to start at 0, but because that folder was missing, the fields weren't actually mapped. The measles were probably due to the numbering order of the cells, hence always in the same place.

I've also experienced mapping errors when mapping from decomposed cases, so I reconstruct them first if I need them as source for mapping.

Hope this helps.

Cheers, Claudio


All times are GMT -4. The time now is 15:03.