CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: snappyHexMesh and Others

ReconstructParMesh after parallel snappyHexMesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 27, 2013, 14:08
Default ReconstructParMesh after parallel snappyHexMesh
  #1
New Member
 
Join Date: Feb 2013
Posts: 6
Rep Power: 4
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, 19:27
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,488
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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, 14:19
Default
  #3
New Member
 
Join Date: Feb 2013
Posts: 6
Rep Power: 4
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, 15:53
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,488
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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, 06:35
Default
  #5
New Member
 
Join Date: Feb 2013
Posts: 6
Rep Power: 4
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, 08:43
Default
  #6
New Member
 
Join Date: Feb 2013
Posts: 6
Rep Power: 4
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 09:18.
kawechel is offline   Reply With Quote

Old   March 2, 2013, 06:47
Default
  #7
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,488
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SnappyHexMesh in Parallel problem swifty OpenFOAM Meshing & Mesh Conversion 5 February 24, 2015 09:31
snappyHexMesh in parallel shailesh.nitk OpenFOAM Native Meshers: snappyHexMesh and Others 18 January 6, 2014 07:13
SnappyHexMesh OF-1.6-ext crashes on a parallel run norman1981 OpenFOAM Bugs 5 December 7, 2011 13:48
snappyHexMesh in parallel with cyclics tonyuprm OpenFOAM 1 June 29, 2011 10:43
Parallel mesh generation using snappyHexMesh aki_yafuji OpenFOAM Mesh Utilities 0 December 25, 2010 04:49


All times are GMT -4. The time now is 23:00.