snappyHexMesh in parallel
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 |
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. |
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 |
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. |
mpirun app, foamJob script and RunParallel function
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.
|
Sorry, but I don't know the real reason. I only use foamJob with snappyHexMesh and with simpleFoam solver.
|
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? |
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 ... |
How did you run the solver after parallel meshing ?
|
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 |
Quote:
Thank you for your help! |
Quote:
|
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. |
snappyHexMesh in parallel
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.... |
allrun in parallel
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 |
parallel snappyHexMesh
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 |
1 Attachment(s)
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 |
Quote:
Cheers, Albert |
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 |
2 Attachment(s)
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! |
All times are GMT -4. The time now is 11:53. |