CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

How can i make a parallel programming in OpenFOAM?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2014, 10:15
Default How can i make a parallel programming in OpenFOAM?
  #1
Member
 
Jignesh
Join Date: Aug 2011
Location: India
Posts: 68
Rep Power: 15
jignesh_thaker2007 is on a distinguished road
Send a message via Yahoo to jignesh_thaker2007
Hello Friends

I am trying to solved the two-phase pipe flow problem in OpenFOAM by using interFOAM solver but it will take to much time because grid is around 1000000.
I want to go for parallel programming but i dont know how can i do that?
please anybody explain me how can i go for parallel programming in OpenFOAM.

I am using Inter I5 computer which has 4 core only. But when i solved my problem than it used only one core. I want to use all four core of the computer so i have to go for parallel programming.

I drew geometry and did meshing in gambit and than import in to the openFOAM.

Please anybody explain how i go ahead with parallel programming in OpenFOAM?
jignesh_thaker2007 is offline   Reply With Quote

Old   July 1, 2014, 10:44
Default
  #2
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 23
Lieven will become famous soon enough
Hi Jignesh,

I would recommend you to have a look at the section 3.11 of the openfoam user guide http://www.openfoam.org/docs/user/. This is a step-by-step explanation of running a job in parallel. Anyway, here is a short summary:

Code:
renumberMesh -overwrite
decomposePar
foamJob -p simpleFoam
This is for simpleFoam but this is purely as example. Change it to the solver you need. The 'renumberMesh' is simply there to improve the efficiency of the simulation.

You also need to add a decomposeParDict to system which looks like
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

numberOfSubdomains 3;

method          scotch;

// ************************************************************************* //
Note that you could use all 4 processors, but this will jam your system since the operating system won't have a processor for itself. So I recommend you to use 3 at max.

Cheers,

Lieven
Lieven is offline   Reply With Quote

Old   July 2, 2014, 10:15
Default
  #3
Member
 
Jignesh
Join Date: Aug 2011
Location: India
Posts: 68
Rep Power: 15
jignesh_thaker2007 is on a distinguished road
Send a message via Yahoo to jignesh_thaker2007
Thanx for your kind reply

Now my code is working in parallel but please inform me how i postprocess it
because i dont know how it will work in paraFOAM

does it work same as single core or i have to make some modifications?
jignesh_thaker2007 is offline   Reply With Quote

Old   July 2, 2014, 10:37
Default
  #4
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 23
Lieven will become famous soon enough
You can either postProcess every core separately by browsing to the corresponding processor folder and open paraFoam. Or you can use the reconstructPar utility to "undecompose" the case and post-process the case on one processor.
Lieven is offline   Reply With Quote

Reply


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
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 10:04
unable to run in parallel with OpenFOAM 2.2 on CentOS einatlev OpenFOAM Running, Solving & CFD 9 June 26, 2014 01:24
The -parallel parameter of mapFields utility in OpenFOAM v2.3.0 shuoxue OpenFOAM Pre-Processing 1 April 28, 2014 06:59
using #calc in parallel with openFOAM 2.2.2 Pascal_doran OpenFOAM Bugs 5 April 8, 2014 13:44
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 15:25


All times are GMT -4. The time now is 14:50.