|
[Sponsors] |
May 23, 2012, 02:37 |
snappyHexMesh in parallel
|
#1 |
New Member
Shailesh Kumar Gupta
Join Date: May 2009
Posts: 9
Rep Power: 17 |
Hi,
I can run SnappyHexMesh in serial. I would like to know how to run snappyHexMesh in parallel. I have gone through the docs http://www.openfoam.org/docs/user/ru...s-parallel.php. If I have mesh that can be broken broken into pieces and allocated to separate processors for solution using with decomposePar then we can run mpi to solve the solution. If I want to generate SnappyHexMesh in parallel. Could you please tell me What steps I need to follow to run snappyHexMesh in parallel. Best regards, Shailesh |
|
May 23, 2012, 03:37 |
|
#2 |
Member
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 14 |
Hi,
I don't know your study but I think that you can do these steps : - decomposePar - foamJob -parallel -screen snappyHexMesh - reconstructParMesh -time 1 (it reconstructs the "castellatedMesh" step) - reconstructParMesh -time 2 (it reconstructs the "snap" step) - reconstructParMesh -time 3 (it reconstructs the "addLayers" step) To know how many "time" file you should reconstruct, you can open the file "processor0" in your case and see how many "time" file you have. May be it's not the best solution, but it works for me. |
|
May 24, 2012, 03:22 |
|
#3 |
New Member
Shailesh Kumar Gupta
Join Date: May 2009
Posts: 9
Rep Power: 17 |
Dear Rider,
I would like to thank you for your reply. I am able to run snappyHexMesh in parallel. I am using -latestTime to know how many "time" file should reconstruct. reconstructParMesh -latestTime -mergeTol 1E-06 -noZero I think this will help to re construct mesh. Thank you again for your help. Best regards, Shailesh |
|
May 24, 2012, 04:01 |
|
#4 |
Member
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 14 |
Your welcome.
Yes, I use latestTime too. But, I tell you to look how may "time's files" you have to understand how the command ligne works . Best regards, Rider. Last edited by Rider; May 24, 2012 at 07:45. |
|
May 25, 2012, 07:02 |
mpirun app, foamJob script and RunParallel function
|
#5 |
New Member
Shailesh Kumar Gupta
Join Date: May 2009
Posts: 9
Rep Power: 17 |
We can run snappyHexMesh in parallel using with mpirun app or foamJob script or RunParallel function. I would like to know the difference between mpirun app, foamJob script and RunParallel function and which one would be better option to run SHM in parallel.
|
|
May 29, 2012, 06:50 |
|
#6 |
Member
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 14 |
Sorry, but I don't know the real reason. I only use foamJob with snappyHexMesh and with simpleFoam solver.
|
|
May 29, 2012, 07:17 |
|
#7 |
New Member
Shailesh Kumar Gupta
Join Date: May 2009
Posts: 9
Rep Power: 17 |
Thank you Rider for your reply.
I have tried with mpirun and foamJob to run SHM in parallel. i could not able to find the difference between them. I was using only np #2 in my machine only. I want to run solver in parallel with decomposed mesh. I need to reconstruct mesh and again decompose to run for solver. Can I run directly on the decomposed mesh ? How can I assign fields to the decomposed meshes that I have generated with snappyhexmesh in parallel? |
|
May 29, 2012, 07:24 |
|
#8 |
Member
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 14 |
I'm in the same case, I need to reconstruct mesh and again decompose to run for solver .
Currenlty, I don't find a solution to this porblem. But I did the different step with a script, it's less boring ... |
|
May 29, 2012, 07:36 |
|
#9 |
New Member
Shailesh Kumar Gupta
Join Date: May 2009
Posts: 9
Rep Power: 17 |
How did you run the solver after parallel meshing ?
|
|
May 29, 2012, 07:43 |
|
#10 |
Member
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 14 |
I use this method :
- blockMesh - decomposePar - foamJob -parallel -screen snappyHexMesh - reconstructParMesh -latestTime - "I use linux command lines to copy my boundary condition in the latestTime's file" - decoposePar - foamJob -parallel -screen simpleFoam - reconstructParMesh -latestTime Last edited by Rider; May 29, 2012 at 08:02. |
|
May 29, 2012, 09:58 |
|
#11 |
Senior Member
|
||
May 29, 2012, 10:04 |
|
#12 |
Member
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 14 |
||
November 30, 2012, 08:48 |
|
#13 |
New Member
Case Bakker
Join Date: Mar 2011
Location: Cape Town, South Africa
Posts: 5
Rep Power: 15 |
try using the command
snappyHexMesh -overwrite in order to not have to copy the files from the last time folder back to the original "0" folder. |
|
September 17, 2013, 06:48 |
snappyHexMesh in parallel
|
#14 |
New Member
Join Date: Jul 2013
Posts: 1
Rep Power: 0 |
Hi everyone,
Im currently running sHM in parallel for rather large meshes. If I want to actually use the generated mesh for a simulation, I have to reconstructParMesh the latest mesh and then decompose it again for the actual run (so that initial fields etc are correctly assigned). Is there anyway around these two steps (i.e. reconstructParMesh and decomposePar)? Since the mesh is already decomposed for sHM I figure it should be possible to use this decomposition for the actual run as well without doing the lengthy reconstruction followed by lengthy decomposition. I have seen Rider etc having the same question on a previous thread, but no solution was yet given. Thanks a lot for any suggestions.... |
|
December 23, 2013, 01:38 |
allrun in parallel
|
#15 | |
Member
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 73
Rep Power: 15 |
hi
i'am back on openFoam after flew months break. here to give a example of my "allrun_in_parallel" script: Quote:
i hope it's help Laurent Last edited by laurent98; December 23, 2013 at 17:36. |
||
January 5, 2014, 23:26 |
parallel snappyHexMesh
|
#16 |
New Member
Albert Pinto
Join Date: May 2013
Posts: 16
Rep Power: 13 |
Hello All,
Pardon me for the slightly different question: I have tried the LTSInterFoam wigleyHull example on a single processor and it works. I then tried doing the same run in parallel. Here are the steps I followed: [1.] ran blockMesh [2.] copied 0/alpha1.org to 0/alpha1 [3.] changed system/decomposeParDict by commenting "method simple;" and adding the line "method scotch;" I then ran decomposePar to get the four partitions. [4.] I commented "method scotch;" in decomposeParDict and replaced it with "method ptscotch;" I then ran snappyHexMesh -parallel -overwrite on 4 processors. [5.] I then ran setFields -parallel on 4 processors. I saw the following problem in step [5.]: [0] --> FOAM FATAL IO ERROR: [0] Cannot find patchField entry for hull_wall [1] [0] I then checked the processor{0,1,2,3}/0/alpha1.gz files and I found that these files do not have the hull_wall entry hull_wall { type zeroGradient; } that is present in the original (before mesh partition) 0/alpha1 file! It is very likely that I am missing something in going from sequential to parallel. Could any of you please let me know where I am going wrong? Cheers, Albert |
|
January 6, 2014, 04:08 |
|
#17 |
Member
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 73
Rep Power: 15 |
hi Albert,
i am not a specialist, but may be you should reconstruct before doing setFields here my allrun files hope this will help you cheers LL |
|
January 6, 2014, 04:37 |
|
#18 | |
New Member
Albert Pinto
Join Date: May 2013
Posts: 16
Rep Power: 13 |
Quote:
Cheers, Albert |
||
January 6, 2014, 07:13 |
|
#19 |
Member
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 73
Rep Power: 15 |
hi Albert,
no pb happy to help if i can. just if i didn t make mistake, in motobike there is no need of setFields because there is no alpha1 variable. with air and water you must set the value of alpha, i thought it could be done even on a decomposed case but i didn't find how... so since now between shm and the solver i reconstruct, setfields and decompose... a+ LL |
|
November 25, 2018, 09:32 |
|
#20 |
New Member
Sergio
Join Date: Nov 2018
Posts: 2
Rep Power: 0 |
Hello,
I am able to run snappyhexmesh in serial without problems, but when I try running in parallel, it fails to snap to edges and doesn't add layers. Does someone what the problem could be? I attached the mesh that resulted from the serial and parallel runs, the snappyhexmeshDict which was the same for both and the log from the parallel run. I am counting on you, forum Thanks very much in advance! EDIT: Nevermind, changing the type of the front and back planes from empty to patch fixed it! Last edited by SAI_; November 25, 2018 at 14:57. |
|
Tags |
snappyhexmesh parallel |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error running openfoam in parallel | fede32 | OpenFOAM Programming & Development | 5 | October 4, 2018 17:38 |
[snappyHexMesh] SnappyHexMesh in parallel missing 0 folder | libindaniel2000 | OpenFOAM Meshing & Mesh Conversion | 0 | May 26, 2016 23:46 |
[snappyHexMesh] SnappyHexMesh in Parallel problem | swifty | OpenFOAM Meshing & Mesh Conversion | 10 | November 6, 2015 05:40 |
Explicitly filtered LES | saeedi | Main CFD Forum | 16 | October 14, 2015 12:58 |
snappyHexMesh in parallel with AMI | louisgag | OpenFOAM Pre-Processing | 8 | September 15, 2014 03:57 |