CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Pre-Processing (
-   -   MapFields only on internal fields (

cosimobianchini April 12, 2007 05:37

Hi all, I would like to map
Hi all,
I would like to map results from a mesh to another one with the same geometry but different boundary partitions (the number and the names of the patches do not correspond). However I'm not interested in mapping boundaryFields but only the internalFields.
I was not able to make mapFields work without the -consistent option.
Is there a way for mapping only values on the internalMesh?
Thanks a lot

sgr June 23, 2015 09:49

Hi Cosimo,

did you come up with an answer or a work around to your post? I have a case, where I refined certain regions using refineMesh. If I use mapFields to map field variables of the coarse Mesh on to the refined one, the internal Fields are not mapped. It is just the boundary conditions that are.

I dearly hope for a reply. Best regards,


canopus December 1, 2015 07:23

The question in still unanswered!
Is there a way for mapping only values on the

and not boundary values?

sgr December 1, 2015 07:25

I have not found a way and stopped looking, but am still interested in a solution, of course.


aboth June 14, 2017 01:38


I think I found a way to do this. I know it is late for you, but for future reference I leave this here:

I use:


mapFields ../../014LuLaw188/baseCase/ -sourceTime 0.05 -mapMethod mapNearest -targetRegion region0
with a mapFieldsDict file with blank patchMap and cuttingPatches entries

cp ~/OpenFOAM/OpenFOAM-2.3.x/tutorials/lagrangian/DPMFoam/Goldschmidt/system/mapFieldsDict ./system/
The important part is the

-targetRegion region0
Apparently region0 is the default name for the internal region if you do not specify names in blockMeshDict. (I do not have info on the default name used by other mesh generators.)

For me the mapping created some nan entries, and some programs cannot deal with this, so I substituted them with 0 by executing the following line in the 0 directory:


find ./ -type f -readable -writable -exec sed -i "s/nan/0/g" {} \;

All times are GMT -4. The time now is 19:50.