CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] ReconstructParMesh after parallel snappyHexMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 27, 2013, 13:08
Default ReconstructParMesh after parallel snappyHexMesh
  #1
New Member
 
Join Date: Feb 2013
Posts: 6
Rep Power: 13
kawechel is on a distinguished road
Hi -

I have been running the simpleFoam motorbike tutorial in parallel using the following decomposition options:

1) decomposePar with scotch followed by snappyHexMesh with ptscotch
2) decomposePar with hierarchical followed by snappyHexMesh with hierarchical

I then reconstruct the mesh using reconstructParMesh, following by another decomposePar before I run potentialFoam and simpleFoam.

If I skip the reconstruction/decomposition step, I get the following error:

-------------
Create time

Create mesh for time = 0

Reading field p

[0]
[5]

[5] -[0] --> --> FOAM FATAL IO ERRO[0]
[6]kkeywfile: torBike_frt-fairing:001%1 is undefined in dictionary "OpenFOAM-2.1.1/run/tutorials/incompressible/simpleFoam/motorBikeParallel/processor
6/0/p::boundaryField

[6] OpenFOAM-2.1.1/run/tutorials/incompressible/simpleFoam/motorBikeParallel/processor5/0/p::boundaryField[0]
[0
[6] f
le: OpenFOAM-2.1.1/run/tutorials/incompressible/simpleFoam/motorBikeParallel/processor6/0/p::boundaryField26 t to lin58.
db/dictionary/dictionar

etc.
--------------

Can anyone explain to me why the reconstruction/decomposition step is necessary? I can sort of understand it when using scotch/ptscotch, but not if the method is hierarchical for both decomposePar and snappyHexMesh. For large meshes the reconstruction takes a long time, so if there is a way to go directly from snappyHexMesh to potentialFoam or simpleFoam, I'd like to understand how to do it!

Thanks,
kawechel
kawechel is offline   Reply With Quote

Old   February 27, 2013, 18:27
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings kawechel and welcome to the forum!

I'm too tired right now to try and explain this, but I suggest you the following threads/posts:
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 28, 2013, 13:19
Default
  #3
New Member
 
Join Date: Feb 2013
Posts: 6
Rep Power: 13
kawechel is on a distinguished road
Hi Bruno -

thanks for you message. I've read the post/thread, but am not really any the wiser.

Based on the pisoFoam motorbike tutorial, my script now looks like this:

Code:
./Allclean
. $WM_PROJECT_DIR/bin/tools/RunFunctions

cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
mkdir 0
cp -r 0.org 0 > /dev/null 2>&1

runApplication blockMesh

# decomposePar uses SCOTCH 
cp ./system/decomposeParDict.scotch ./system/decomposeParDict
runApplication decomposePar -force
mv log.decomposePar log.decomposePar.1

# snappyHexMesh uses PTSCOTCH
cp ./system/decomposeParDict.ptscotch ./system/decomposeParDict
runParallel snappyHexMesh 32 -overwrite -parallel

find . -type f -iname "*level*" -exec rm {} \;
ls -d processor* | xargs -i cp -r 0.org/* ./{}/0/ $1

runParallel renumberMesh 32 -overwrite

runParallel potentialFoam 32 -noFunctionObjects -writep -parallel

runParallel `getApplication` 32

runApplication reconstructParMesh -mergeTol 1e-6 -constant
runApplication reconstructPar
but unfortuantely I get errors from renumberMesh when I run this:

Code:
keyword procBoundary30to18 is undefined in dictionary "~/OpenFOAM-2.1.1/run/tutorials/incompressible/simpleFoam/motorBikeParallel/processor30/0/nut::boundaryField"
What am I missing? There is indeed no procBoundary keyword in any of the nut files, but how can I make sure it is there?

thanks,
kawechel
kawechel is offline   Reply With Quote

Old   February 28, 2013, 14:53
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi kawechel,

Then something is broken in your "0.org" folder, because inside the file "0.org/nut" you should have this:
Code:
"proc.*"
{
    type            processor;
}
That is the magic boundary condition that takes care of all processor boundaries.
If you look at the script code, the following line takes care of replacing the contents of the "0" folder on all processors, based on "0.org" (which stands for "0.original"):
Code:
ls -d processor* | xargs -i cp -r 0.org/* ./{}/0/ $1
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   March 1, 2013, 05:35
Default
  #5
New Member
 
Join Date: Feb 2013
Posts: 6
Rep Power: 13
kawechel is on a distinguished road
Hi Bruno -

Thanks for your help with this. I've no moved past the previous error, but am now encountering another issue:

Code:
Renumbering processor face decomposition map faceProcAddressing
--> FOAM FATAL ERROR: 
problem faceI:107 masterFaceI:0
From function renumberMesh
I am using the simpleFoam motorbike case and the only modifications I've made are the ones you suggested. What else am I missing?

thanks,
kawechel
kawechel is offline   Reply With Quote

Old   March 1, 2013, 07:43
Default
  #6
New Member
 
Join Date: Feb 2013
Posts: 6
Rep Power: 13
kawechel is on a distinguished road
Hi -

I briefly thought I had fixed the problem by reverting to running renumberMesh in serial, but that seems to end up only dealing with the mesh on processor 0...

Looking at faceProcAddressing in the processorX/constant/polyMesh files, I get blocks of negative numbers. Is that possibly the cause of the problem?

Grateful for any pointers in the right direction.

thanks,
Michele

Last edited by kawechel; March 1, 2013 at 08:18.
kawechel is offline   Reply With Quote

Old   March 2, 2013, 05:47
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Michele,

I'm a bit lost on your description, but if I understand you correctly, then on the script you've got on post #3, I would say that the first occurrence of this line:
Code:
cp -r 0.org 0 > /dev/null 2>&1
should not be there. The reason is because this line:
Code:
ls -d processor* | xargs -i cp -r 0.org/* ./{}/0/ $1
will make the necessary copies after the mesh has been generated.

Additionally, have you confirmed that your "0.org" folder is identical to the original version?

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply

Tags
parallel snappyhexmesh


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
[snappyHexMesh] SnappyHexMesh in parallel missing 0 folder libindaniel2000 OpenFOAM Meshing & Mesh Conversion 0 May 26, 2016 22:46
[snappyHexMesh] Problem with parallel run of snappyHexMesh Lorenzo92 OpenFOAM Meshing & Mesh Conversion 5 April 15, 2016 04:12
Running parallel case after parallel meshing with snappyHexMesh? Adam Persson OpenFOAM Running, Solving & CFD 0 August 31, 2015 22:04
snappyHexMesh in parallel Dadou OpenFOAM Pre-Processing 0 June 28, 2013 06:46
[snappyHexMesh] snappyHexMesh parallel run error dhruv OpenFOAM Meshing & Mesh Conversion 2 February 16, 2012 04:34


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