CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

How to mapfields

Register Blogs Community New Posts Updated Threads Search

Like Tree13Likes
  • 4 Post By Friendly
  • 9 Post By RobertHB

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 4, 2017, 03:06
Default How to mapfields
  #1
Member
 
Join Date: Jun 2017
Posts: 73
Rep Power: 8
Friendly is on a distinguished road
Hi,

I have two meshes (case 1 and case 2) of the same geometry, but case 2 has a refinement box in it. So now I want to map all fields (p,u,k,epsilon,nut) from case 1 to case 2 to decrease calculation time.

How do I execute the command? OpenFOAM Wiki says:

Code:
 mapFields <source root> <source case> <target root> <target case> [-consistent] [-parallelSource] [-parallelTarget]
So basicly it is:
Code:
mapFields Desktop/case1 Dekstop/case2 -???
But which of the following commands? It is the same geometry, but with different meshes.

Glad for any advice.


Greetings

Friendly
Friendly is offline   Reply With Quote

Old   December 4, 2017, 05:56
Default
  #2
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 11
RobertHB is on a distinguished road
Step 1: If you want to map your data from e.g. time 50 than you have to create a "50" folder in the target case.
Step 2: In the controlDict of the target case set "startTime" to whatever time you want to map (here: 50)
Step 3: From your target case folder run "mapFields /home/user/OpenFOAM/version/run/source". You can get the correct path by using "pwd" in the command line or "Ctrl+L" if you are in a Ubuntu desktop environment.

/edit: If i remember correctly the -consistent flag can be used if both cases (target and source) have the same dimensions and boundary conditions. Mesh refinement does not matter.
RobertHB is offline   Reply With Quote

Old   December 4, 2017, 14:21
Default
  #3
Member
 
Join Date: Jun 2017
Posts: 73
Rep Power: 8
Friendly is on a distinguished road
Thank you! It worked exactly as you said.
Friendly is offline   Reply With Quote

Old   August 31, 2021, 19:41
Default
  #4
Senior Member
 
qutadah
Join Date: Jun 2021
Location: USA
Posts: 101
Rep Power: 4
qutadah.r is on a distinguished road
i think we can just use following command:


mapFields -consistent -sourceTime "xx" /$Path_target_file


am I wrong?
qutadah.r 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 major bug alchem OpenFOAM Bugs 14 September 15, 2023 12:48
Personalization of mapFields and libsampling - Compilation issues saimat OpenFOAM Programming & Development 3 June 29, 2016 08:56
Strange random behaviour of mapFields blaise OpenFOAM Pre-Processing 0 November 3, 2014 09:37
The -parallel parameter of mapFields utility in OpenFOAM v2.3.0 shuoxue OpenFOAM Pre-Processing 1 April 28, 2014 05:59
Zero Pressure with mapFields ignacio OpenFOAM Running, Solving & CFD 0 May 24, 2013 09:43


All times are GMT -4. The time now is 08:12.