|
[Sponsors] |
February 1, 2019, 02:39 |
mapFields
|
#1 |
Senior Member
Zander Meiring
Join Date: Jul 2018
Posts: 125
Rep Power: 8 |
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 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. 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 |
|
February 1, 2019, 12:31 |
|
#2 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
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 |
|
February 1, 2019, 18:27 |
|
#3 |
Member
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15 |
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 |
|
February 4, 2019, 06:24 |
|
#4 |
New Member
Loek
Join Date: Oct 2018
Posts: 14
Rep Power: 8 |
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 |
|
February 4, 2019, 23:57 |
|
#5 |
Member
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15 |
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; 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; 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 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 |
|
February 5, 2019, 04:13 |
|
#6 |
New Member
Loek
Join Date: Oct 2018
Posts: 14
Rep Power: 8 |
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 |
|
February 6, 2019, 18:26 |
|
#7 |
Member
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15 |
Hi,
Have you tried the command I suggested you? Did it give you the same result? BR, Luis |
|
February 7, 2019, 04:19 |
|
#8 |
New Member
Loek
Join Date: Oct 2018
Posts: 14
Rep Power: 8 |
Hi Luis,
I have tried it and I also already responded to your message thanks for the interest. Sincerely, Loek |
|
February 8, 2019, 02:05 |
|
#9 |
Senior Member
Zander Meiring
Join Date: Jul 2018
Posts: 125
Rep Power: 8 |
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. |
|
April 15, 2019, 01:07 |
|
#10 | |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 8 |
Quote:
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. |
||
April 16, 2019, 01:46 |
|
#11 |
Member
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15 |
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. |
|
|
|
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 |