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

MapFields does not work

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By zebu83

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 23, 2005, 07:05
Default HI, remove all Patches with
  #1
Senior Member
 
Markus Hartinger
Join Date: Mar 2009
Posts: 102
Rep Power: 17
hartinger is on a distinguished road
HI,

remove all Patches with zero faces in it from the 'boundary' file in the polymesh directory and try.

Pierre (colleague, who can't be bothered to register)
hartinger is offline   Reply With Quote

Old   September 23, 2005, 08:18
Default Hi Markus/Pierre, I have g
  #2
New Member
 
Max
Join Date: Mar 2009
Posts: 24
Rep Power: 17
didomenico is on a distinguished road
Hi Markus/Pierre,
I have good & bad news:
- your trick works, that means the mapFields goes to the end w/o problems;
- nothing is written in the target directory! It is the same behaviour I get without -consistent flag.
In my boundary files I have just a wall, inlet/outlet and wedge (two different patches) faces.
Have you suggestion how I can debug further?
Thanks
Massimiliano
didomenico is offline   Reply With Quote

Old   September 23, 2005, 12:41
Default Right then, well it worked for
  #3
Member
 
Pierre Le Fur
Join Date: Mar 2009
Location: UK
Posts: 60
Rep Power: 17
pierre is on a distinguished road
Right then, well it worked for me following these steps:
i.e if mapping
from SourceCase/500/ to TargetCase/500/
- make sure the latter dir exists
- In the target case, make sure that no previous internal Fields are written, specify instead for example for variable U
internalField uniform (0.569 0 0); (no list size specified)
- pray to the CFD god

I couldn't explain why it works rather than another way, but I trust that doensn't bother you that much right now.

Pierre
pierre is offline   Reply With Quote

Old   September 23, 2005, 12:46
Default Have a look at the source code
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Have a look at the source code: it's all to do with how you specify which time directory from the source case you want to map and where you want to put the results. If you use things like startTime or latestTime, it's easy to get confused...

Nothing wrong with the code as far as I know.

Enjoy,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   September 26, 2005, 04:20
Default Hi Hrvoje, you were right,
  #5
New Member
 
Max
Join Date: Mar 2009
Posts: 24
Rep Power: 17
didomenico is on a distinguished road
Hi Hrvoje,
you were right, nothing wrong with the code. It was my fault: in the targetDir the controlDict had a false startTime (0.0091 instead 0.00091). I can only say that an error message (like "restart directory not found") could help me to find the problem
Anyway, this was a good reason to compile OpenFoam in debug mode and look inside it...
Just a last question: each time I run blockMesh defaultFaces patch is created (with 0 faces) and this is a problem for mapFields (see the first message). How can I avoid it?
Thanks
Massimiliano
didomenico is offline   Reply With Quote

Old   September 26, 2005, 05:33
Default A zero sized patch defaultFace
  #6
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
A zero sized patch defaultFaces is kept if mergePatchPairs option is used.

There used to be a reason for this but I forgot why...
mattijs is offline   Reply With Quote

Old   December 14, 2007, 15:34
Default Hi all, I'm trying to do a
  #7
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Hi all,

I'm trying to do a mapfields from one case to another. Only the mesh has been refined, so that geometry is essentially the same. Here is the excerpt from mapFields:

/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4.1 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : mapFields . re65 . re65new -consistent
Date : Dec 10 2007
Time : 07:57:15
Host : moondance
PID : 6167
Root :
Case :
Nprocs : 1
Source: "." "re65"
Target: "." "re65new"

Create databases as time

Source time: 110
Target time: 110
Create meshes

Source mesh size: 3653328 Target mesh size: 29226624

It has been at this state for about 4 days now. Is this normal when working with such mesh sizes? The machine running mapFields has eight 2.8 GHz opteron processors with 128GB memory.
msrinath80 is offline   Reply With Quote

Old   May 11, 2008, 05:53
Default Hi Srinath, No, this is not n
  #8
Senior Member
 
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 17
markc is on a distinguished road
Hi Srinath,
No, this is not normal.
Something else: I have the experience that using consistent on refined meshes is not always ok. Especially when there are curved areas near the boundaries the domain might have been changed, causing mapfields to fail on consistent. However switching it off and supplying a patch map list works perfect. Also if you interpolate to a case with different boundary conditions, the latter works.

Brgds
Mark
markc is offline   Reply With Quote

Old   November 17, 2008, 03:18
Default Hi all, I need to use the c
  #9
Senior Member
 
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18
openfoam_user is on a distinguished road
Hi all,

I need to use the command 'mapFields' between a coarse emsh and a medium mesh. I have used the 'rasInterFoam' solver until time t = 0.094 sec.

The case with the coarse mesh has run on 10 processors. The case with the medium mesh will run on 10 processors.

Could someone tell me the command to map the 'coarse' solution on the 'medium' grid. Thanks.

Regards,

Stephane.
openfoam_user is offline   Reply With Quote

Old   July 22, 2009, 08:55
Default
  #10
Member
 
Marco Turchi
Join Date: Jul 2009
Location: Pesaro, Italy
Posts: 31
Rep Power: 17
zebu83 is on a distinguished road
First of all you have to run "blockMesh", for the new mesh.

Then, probably, the command you are looking for is:

Quote:
mapFields ../"coarse mesh directory"/ -consistent (if the geometry is the same)
You have to modify also "controlDict", for example: in "starTime" you have to put the initial time step that you want "mapFields" start to map the new file. If your previous simulation stop at t = 10 s (for example) and you want to refine mesh and restart from it, you must change "starTime" in "controlDict" (change 0 in 10 or vice versa).
You have to specify also the reference case directory.

I hope it is useful!

MT
XU0207 likes this.
zebu83 is offline   Reply With Quote

Old   December 4, 2012, 20:12
Default
  #11
Senior Member
 
Join Date: Nov 2012
Posts: 171
Rep Power: 14
hz283 is on a distinguished road
Hi All,

Can I ask you a question about the utility mapFields?

My question is as follows: I got the simulation results with structured meshes. Now I generated the unstructured meshes (totally the same geometry but on one wall a small inlet is newly generated). I list all other boundaries except that wall in patchMap list. All other procedures are followed by the friends posted in this forum. The mapped field file is generated, but the internal flow fields are completely wrong. This is not what I want.

Can I only map the internal flow field from structured to an unstructured meshes? Those boundary values are obtained through the boundary treatment as specified in the target case?

Thanks.

-hz
hz283 is offline   Reply With Quote

Old   December 5, 2012, 08:58
Default
  #12
Member
 
Marco Turchi
Join Date: Jul 2009
Location: Pesaro, Italy
Posts: 31
Rep Power: 17
zebu83 is on a distinguished road
Hi,

what do you mean with "the internal flow fields are completely wrong"?
Have you the possibility to run the new geometry?

Perhaps you can use mapField to have an initial (wrong) flow field, then run some coarse cases and then refined the mesh (untill you want or you have the capacity).

I hope it is useful, otherwise ask!
zebu83 is offline   Reply With Quote

Old   December 5, 2012, 09:33
Default
  #13
Senior Member
 
Join Date: Nov 2012
Posts: 171
Rep Power: 14
hz283 is on a distinguished road
Hi Zebu83,

I am sorry, I did not express this clearly. In the source mesh, the flow field is fully developed. This is the reason why I would like to map this to my new unstructured meshes. I want to start based on this results. However, when I mapped the results to the target case, they are completely different. I tried the following several ways:

1, leave the patchMap and cuttingPatches lists blank
2, leave the cuttingPatches blank, and write some of the boundary in patchMap

The mapped results are always the one I mentioned above. In fact, I would like to only the internal fields, because the boundary values can be calculated directly according to the specification in the target case (unstructured meshes).

Thank you very much.

hz
hz283 is offline   Reply With Quote

Old   September 22, 2014, 04:14
Default
  #14
New Member
 
sandy
Join Date: Aug 2011
Posts: 13
Rep Power: 15
vishwakarma is on a distinguished road
Hi OpenFOAM users,

In regard to mapfields usage, it needs to be mentioned that the target fields files SHOULD NOT have the entry in the form of nonuniform list. If it is please make it uniform with a single value and let mapFields create the non uniform field based on source fields.

Thanks
Sandy
vishwakarma 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 only on internal fields cosimobianchini OpenFOAM Pre-Processing 5 May 5, 2020 07:08
MapFields Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Pre-Processing 18 September 28, 2017 12:06
MapFields failure or incorrect mesh jvn OpenFOAM Pre-Processing 19 November 29, 2012 07:13
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 01:05.