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

MapFields only on internal fields

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes
  • 8 Post By aboth
  • 1 Post By Adriana Correia

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 12, 2007, 06:37
Default Hi all, I would like to map
  #1
Member
 
cosimo bianchini
Join Date: Mar 2009
Location: Florence, Tuscany, Italy
Posts: 88
Rep Power: 17
cosimobianchini is on a distinguished road
Send a message via Skype™ to cosimobianchini
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
Cosimo
__________________
Cosimo Bianchini

Ergon Research s.r.l.
Via Panciatichi, 92
50127 Florence - ITALY
Tel: +39 055 0763716
Mob: +39 320 9460153
e-mail: cosimo.bianchini@ergonresearch.it
URL: www.ergonresearch.it
cosimobianchini is offline   Reply With Quote

Old   June 23, 2015, 10:49
Default
  #2
sgr
New Member
 
Simon Grützner
Join Date: Apr 2015
Posts: 7
Rep Power: 11
sgr is on a distinguished road
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,

Simon
sgr is offline   Reply With Quote

Old   December 1, 2015, 07:23
Default
  #3
Member
 
SM
Join Date: Dec 2010
Posts: 97
Rep Power: 16
canopus is on a distinguished road
The question in still unanswered!
Is there a way for mapping only values on the
Code:
internalField
and not boundary values?
canopus is offline   Reply With Quote

Old   December 1, 2015, 07:25
Default
  #4
sgr
New Member
 
Simon Grützner
Join Date: Apr 2015
Posts: 7
Rep Power: 11
sgr is on a distinguished road
I have not found a way and stopped looking, but am still interested in a solution, of course.

Regards.
sgr is offline   Reply With Quote

Old   June 14, 2017, 02:38
Default
  #5
New Member
 
Ambrus Both
Join Date: Mar 2017
Location: Delft
Posts: 1
Rep Power: 0
aboth is on a distinguished road
Hello,

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:

Code:
mapFields ../../014LuLaw188/baseCase/ -sourceTime 0.05 -mapMethod mapNearest -targetRegion region0
with a mapFieldsDict file with blank patchMap and cuttingPatches entries
E.g.:
Code:
cp ~/OpenFOAM/OpenFOAM-2.3.x/tutorials/lagrangian/DPMFoam/Goldschmidt/system/mapFieldsDict ./system/
The important part is the
Code:
-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:

Code:
find ./ -type f -readable -writable -exec sed -i "s/nan/0/g" {} \;
aboth is offline   Reply With Quote

Old   May 5, 2020, 07:08
Default Field reinitialization in bynary with mapFields utility
  #6
New Member
 
Adriana Ferreira
Join Date: Sep 2018
Posts: 6
Rep Power: 8
Adriana Correia is on a distinguished road
Hello everyone,

The solution of Ambrus worked well for me.

In my case, I needed to do a field reinitialization by keeping the internal field and changing the boundary conditions. I had the same geometry with the same mesh refinement but as my files were in binary (to keep the double-precision) I couldn't change the boundaries manually, so the workaround I found was:

1. create the new files (p and U for example) with the desired boundary conditions
2. map the internal field from a previous case according to Ambrus instructions

I hope it may be useful if someone faces the same problem as me.

Best regards.
Wowbagger likes this.
Adriana Correia is offline   Reply With Quote

Reply


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
MapFields Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Pre-Processing 18 September 28, 2017 12:06
MapFields does not work hartinger OpenFOAM Pre-Processing 13 September 22, 2014 04:14
[Commercial meshers] TGridFluent mesh with internal by prism layer and internal face for diagnostic sponiar OpenFOAM Meshing & Mesh Conversion 2 March 30, 2009 16:02
MapFields turbulent pipe flow anita OpenFOAM Pre-Processing 5 July 4, 2008 00:29
MapFields cpplabs OpenFOAM Running, Solving & CFD 3 February 17, 2008 06:08


All times are GMT -4. The time now is 13:02.