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

mapFields

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 1, 2019, 02:39
Post mapFields
  #1
Senior Member
 
Zander Meiring
Join Date: Jul 2018
Posts: 125
Rep Power: 8
yambanshee is on a distinguished road
Good day!


I am trying to make use of map fields to map a corse mesh onto a finer mesh. While within the directory of the finer mesh, I run the command
Code:
mapFields -consistent ../corse
however I get an error message as follows:



Code:
Source time: 30000
Target time: 30000
Create meshes

Source mesh size: 877765    Target mesh size: 4381120

--> FOAM Warning : 
    From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const
    in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 75
    No base point for face 354002, 4(30691 131004 131005 30692), produces a valid tet decomposition.
This is printed 100 times with different points followed by

Code:
Consistently creating and mapping fields for time 30000

    interpolating p
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigSegv::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  ? at ??:?
#4  ? at ??:?
#5  ? at ??:?
#6  ? at ??:?
#7  ? at ??:?
#8  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#9  ? at ??:?

before crashing. The two meshes are identical domains with the the only difference being the cell count. Both meshes are hex made with blockMesh, and their checkmesh outputs are attached bellow. I would greatly appreciate a response!


Regards
Attached Files
File Type: txt corse_checkMesh.txt (3.4 KB, 5 views)
File Type: txt mid_checkMesh.txt (3.5 KB, 3 views)
yambanshee is offline   Reply With Quote

Old   February 1, 2019, 12:31
Default
  #2
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 15
clapointe is on a distinguished road
As far as I know, the consistent flag expects the two cases to be identical. I am not sure how identical it expects them to be (does this include mesh size?). Have you tried without it?

Caelan
clapointe is offline   Reply With Quote

Old   February 1, 2019, 18:27
Default
  #3
Member
 
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15
lebc is on a distinguished road
Which version of OF are you using?

I had issues with mapFields some time ago and I found out that the version I compiled had a bug that was corrected right after the release, I fixed it and it worked!

I can share with you the command I use, I have the same domain, but different mesh sizes.

Best Regards,
Luis
lebc is offline   Reply With Quote

Old   February 4, 2019, 06:24
Default
  #4
New Member
 
Loek
Join Date: Oct 2018
Posts: 14
Rep Power: 8
Loekatoni is on a distinguished road
Dear Luis,


Could you share the command? I'm having the same problem as OP and possibly your command will also fix my problem.


Sincerely,
Loek
Loekatoni is offline   Reply With Quote

Old   February 4, 2019, 23:57
Default
  #5
Member
 
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15
lebc is on a distinguished road
Hi Loek,


The issue I had was in the file calculateMeshToMesh0Addressing.C, in the path /src/sampling/meshToMesh0, line 159.


It was like this:
Code:
            if (fromPatch.empty())
            {
                WarningInFunction
                    << "Source patch " << fromPatch.name()
                    << " has no faces. Not performing mapping for it."
                    << endl;
                boundaryAddressing_[patchi] = -1;
After the fix, it is like this:
Code:
            if (fromPatch.empty())
            {
                WarningInFunction
                    << "Source patch " << fromPatch.name()
                    << " has no faces. Not performing mapping for it."
                    << endl;
                boundaryAddressing_[patchi].setSize(toPatch.size());
                boundaryAddressing_[patchi] = -1;
Check this file, if it is not like the second code I put here, this is your issue, you will have to make this again. I can help you if you don know how to do it, just don't do it in the original OF installation folder.


In case your file is correct, go to your target folder and run the command:


Code:
mapFields path/to/source -sourceTime latestTime -parallelSource -parallelTarget -consistent >map_log
If you are not running a parallel case, just remove the options parallellSource and parallelTarget. If you don want to save a log file, remove >map_log


You may need to create some dummy files in the target folder, give it a try and tell me if it doesn't work.


Best Regards,
Luis
lebc is offline   Reply With Quote

Old   February 5, 2019, 04:13
Default
  #6
New Member
 
Loek
Join Date: Oct 2018
Posts: 14
Rep Power: 8
Loekatoni is on a distinguished road
Dear Luis,


Thanks for your quick reply. I checked the file and the line you added was already there. So I will need to look for another fix.


Thanks for the help.


Best regards,
Loek
Loekatoni is offline   Reply With Quote

Old   February 6, 2019, 18:26
Default
  #7
Member
 
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15
lebc is on a distinguished road
Hi,

Have you tried the command I suggested you? Did it give you the same result?

BR,
Luis
lebc is offline   Reply With Quote

Old   February 7, 2019, 04:19
Default
  #8
New Member
 
Loek
Join Date: Oct 2018
Posts: 14
Rep Power: 8
Loekatoni is on a distinguished road
Hi Luis,


I have tried it and I also already responded to your message thanks for the interest.


Sincerely,
Loek
Loekatoni is offline   Reply With Quote

Old   February 8, 2019, 02:05
Default
  #9
Senior Member
 
Zander Meiring
Join Date: Jul 2018
Posts: 125
Rep Power: 8
yambanshee is on a distinguished road
I am using openFoam 5 and I need to make use of the consistent flag, as my two meshes are the same domain with only a different cell count: which is what the consistent flag deals with.


What fixed my problem was to make use of the utility mapFieldsPar, which works the exact same as the normal mapFields utility, but with some extra functionality and less instability.
yambanshee is offline   Reply With Quote

Old   April 15, 2019, 01:07
Default
  #10
Senior Member
 
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 8
calf.Z is on a distinguished road
Quote:
Originally Posted by lebc View Post
Hi,

Have you tried the command I suggested you? Did it give you the same result?

BR,
Luis
Hi,

I use the command mapFields path / to / source -sourceTime latestTime -parallelSource -parallelTarget -consistent and it's running without errors.

But I cannot see any changes in my target case. These fields should be mapped into the target case, but I did not see it. When I run it , the error is :cannot find file "/home/dyfluid/OpenFOAM/dyfluid5.x/run/cavity_mapfieldtest/processor0/0.5/p"

Thank you.
calf.Z is offline   Reply With Quote

Old   April 16, 2019, 01:46
Default
  #11
Member
 
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15
lebc is on a distinguished road
You have to create the folders corresponding to the time step you are mapping on each target processor folder, and you also need to create a dummy file for each field you are mapping.


What you can do is copy the fields from time 0 to a folder with the latestTimeStep in each processor.
lebc 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 13:48
Personalization of mapFields and libsampling - Compilation issues saimat OpenFOAM Programming & Development 3 June 29, 2016 09:56
mapFields for 3D praveensrikanth91 OpenFOAM Pre-Processing 3 February 17, 2015 06:23
Strange random behaviour of mapFields blaise OpenFOAM Pre-Processing 0 November 3, 2014 10:37
The -parallel parameter of mapFields utility in OpenFOAM v2.3.0 shuoxue OpenFOAM Pre-Processing 1 April 28, 2014 06:59


All times are GMT -4. The time now is 18:14.