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

[snappyHexMesh] SnappyHex on a decomposed case

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

Like Tree2Likes
  • 2 Post By hayes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 13, 2013, 03:06
Default SnappyHex on a decomposed case
  #1
Pj.
Member
 
Luca
Join Date: Mar 2013
Posts: 68
Rep Power: 13
Pj. is on a distinguished road
Hi everybody,

this is my first post, so I introduce myself: I`m an engineering student attending the last year of master degree at the Politecnico of Milan.

I am having some troubles with the parallel computing of snappyHex.

I need to use both snappyHexMesh and decomposePar. If I run snappyHex and then decomposePar there are not problem. In the boundary condition of p,U etc I`ve already inserted the XXX_patch0 that snappy hex will create. So after I`ve "snapped" it, I can decompose it and solve it.

Instead if I want to run snappyHex on multiple cores I have to decompose the case first. But the files p,U etc in the folders processorX "lose" the boundary conditions XXX_patch0. So, when i do the snappyHex and then i lauch the case, it gives me the error

keyword spires_patch0 is undefined in dictionary "/[...]/B0fine/processor0/0/p::boundaryField"

while it is

keyword spires_patch0 is undefined in dictionary "/[...]/B0fine/0/p::boundaryField"

how can i say to decomposePar to keep those boundary condition even if it doesn-t sees them in the blockmesh boundary file?

thank you very much

Last edited by Pj.; March 14, 2013 at 22:34.
Pj. is offline   Reply With Quote

Old   March 13, 2013, 05:47
Default
  #2
New Member
 
Join Date: Feb 2012
Posts: 6
Rep Power: 14
hayes is on a distinguished road
Hi Luca,

the problem is, after the meshing with snappyHexMesh there are no information about your stl patches within the processor directories (processor0, processor1, ...) yet. So what you can do is reconstruct the mesh back into one master mesh, remove the processor folders and decompose again. After these commands it should run without any problems:

blockMesh
decomposePar
mpirun --hostfile YOURHOSTFILE -np ... snappyHexMesh -overwrite -parallel
reconstructParMesh -constant
rm -r processor*
decomposePar
mpirun --hostfile YOURHOSTFILE -np ... simpleFoam -parallel

Best regards,
Chris
JR22 and Pavlord like this.
hayes is offline   Reply With Quote

Old   March 13, 2013, 08:02
Default
  #3
Pj.
Member
 
Luca
Join Date: Mar 2013
Posts: 68
Rep Power: 13
Pj. is on a distinguished road
I'll try this tomorrow, but I don't understand: if during the first decomposePar the boundary conditions on XXX_patch0 get lost, when does it get recovered in the proces you showed me? Is it the "-constant" option of reconstructParMesh?
Pj. is offline   Reply With Quote

Old   March 13, 2013, 11:46
Default
  #4
New Member
 
Join Date: Feb 2012
Posts: 6
Rep Power: 14
hayes is on a distinguished road
the mesh that first gets decomposed is the one created by blockMesh. SO no patch exists other than specified in your boundaryDict. And consequently during decomposePar on this background mesh there is no need for decomposePar to copy any initial boundary information for patches that do not exist yet.

After snappyHexMesh the stl surface is included as a patch, but still without boundary information in 0 for the new patch.
hayes is offline   Reply With Quote

Old   March 13, 2013, 22:04
Default
  #5
Pj.
Member
 
Luca
Join Date: Mar 2013
Posts: 68
Rep Power: 13
Pj. is on a distinguished road
Oh... so during the decomposePar it looks if the boundary conditions in 0/* are useful, since it doesn't sees any XXX_patchX it discards those boundary condition.

The second time it reads again the boundary conditions in 0/* and since now those patches exists it keeps them.

Am I correct?

Anyway I'm trying right now. I will see...
Pj. is offline   Reply With Quote

Old   March 14, 2013, 22:34
Default
  #6
Pj.
Member
 
Luca
Join Date: Mar 2013
Posts: 68
Rep Power: 13
Pj. is on a distinguished road
I did what you said and it worked perfectly.

I`ve to say that I`m a bit surprised that in the decomposeParDict there isn`t an option to say it to keep all boundary conditions that appear in the 0 forlder fields, even those that refer to patches that are not (yet) in the constant/polyMesh/boundary file.

That would save all this kind of work around.

Anyway the problem has been solved so everythig is fine.

Thank you very much for the very fast help,

Bye
Pj. is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
sample decomposed case Phicau OpenFOAM Post-Processing 1 August 17, 2018 19:33
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 9 August 16, 2015 14:53
Simple channel case using cyclicAMI will not converge cbcoutinho OpenFOAM Running, Solving & CFD 3 August 4, 2015 12:28
[OpenFOAM] ParaView 4.10 and OpenFOAM 2.3.0 Multiregion and decomposed case romant ParaView 3 April 7, 2014 15:42
Error reading new case montag dp FLUENT 5 September 15, 2011 06:00


All times are GMT -4. The time now is 11:06.