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

parallel run for conjugateHeatFoam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 26, 2011, 09:21
Default parallel run for conjugateHeatFoam
  #1
Member
 
Elisabet Mas de les Valls
Join Date: Mar 2009
Location: Barcelona, Spain
Posts: 64
Rep Power: 17
elisabet is on a distinguished road
Dear all,

I wish to run a parallel case with conjugateHeatFoam (OF-1.5-dev), but neither 'decomposePar' nor a manually decomposition works.

Does anyone have some experience or suggestions on it?

I would really appreciate some help....

Elisabet
elisabet is offline   Reply With Quote

Old   January 26, 2011, 12:02
Default
  #2
Senior Member
 
Nakul
Join Date: Apr 2010
Location: India
Posts: 147
Rep Power: 16
nakul is on a distinguished road
Hi,

Please elaborate exactly what problems are you facing? Have you made the file decomposeparDict? What error message do you get on running decomposePar?
nakul is offline   Reply With Quote

Old   January 26, 2011, 18:07
Default
  #3
Member
 
Elisabet Mas de les Valls
Join Date: Mar 2009
Location: Barcelona, Spain
Posts: 64
Rep Power: 17
elisabet is on a distinguished road
Ok, I've taken a very simple case of a square channel aligned with x axis and two solid walls (at y+ and y- locations). Fluid domain is defined at the main folder and corresponds to region0, while solid domain is linked and located at '0', 'constant' and 'system' folders under the name 'solid', as defined in the tutorial example.

The case runs perfectly without parallelisation.

In order to run the case in parallel, I first tried with the definition of the decomposeParDict at the main 'system' folder and run 'decomposePar', following the classical procedure in other solvers. However, an error was found. The output is rewritten here:

Code:
Create time

Time = 0
Create mesh for region region0

Calculating distribution of cells
Selecting decompositionMethod simple

Finished decomposition in 0.02 s

Calculating original mesh data

Distributing cells to processors

Distributing faces to processors

Calculating processor boundary addressing

Distributing points to processors

Constructing processor meshes

Processor 0
    Number of cells = 10080
    Number of faces shared with processor 1 = 672
    Number of processor patches = 1
    Number of processor faces = 672
    Number of boundary faces = 2232

Processor 1
    Number of cells = 10080
    Number of faces shared with processor 0 = 672
    Number of processor patches = 1
    Number of processor faces = 672
    Number of boundary faces = 2232

Number of processor faces = 672
Max number of processor patches = 1
Max number of faces between processors = 672

Processor 0: field transfer



    request for polyMesh solid from objectRegistry conjugateHeat_parallel failed
    available objects of type polyMesh are

1
(
region0
)


    From function objectRegistry::lookupObject<Type>(const word&) const
    in file lnInclude/objectRegistryTemplates.C at line 142.

FOAM aborting

Aborted
Hope it helps to understand the problem....

elisabet
elisabet is offline   Reply With Quote

Old   January 26, 2011, 18:13
Default
  #4
Member
 
Elisabet Mas de les Valls
Join Date: Mar 2009
Location: Barcelona, Spain
Posts: 64
Rep Power: 17
elisabet is on a distinguished road
Oh, by the way, I decompose the domain in 2 subdomains along x axis.
elisabet is offline   Reply With Quote

Old   January 27, 2011, 01:28
Default
  #5
Senior Member
 
Nakul
Join Date: Apr 2010
Location: India
Posts: 147
Rep Power: 16
nakul is on a distinguished road
Hi

By reading this message

"request for polyMesh solid from objectRegistry conjugateHeat_parallel failed
available objects of type polyMesh are"

it seems to me that decomposePar is unable to split your solid region over two processors. As it can work only with mesh your solid region is coming in way.

I have never tried parallelisation of regions with solid boundary before and this is what I have understood based upon my understanding of decompoPar. Try searching this forum for ways to split meshes with solid regions or try splitting your mesh in such a way that solid region doesn't get split.
nakul is offline   Reply With Quote

Old   January 27, 2011, 04:53
Default
  #6
Member
 
Elisabet Mas de les Valls
Join Date: Mar 2009
Location: Barcelona, Spain
Posts: 64
Rep Power: 17
elisabet is on a distinguished road
I've tried both things, without success.... that's why I decided to start a new threat.

When I split the domain avoiding to interact with the solid subdomain, 'decomposePar' provides the same error as before.

Any idea?

elisabet
elisabet is offline   Reply With Quote

Old   January 27, 2011, 15:54
Default it is possible but a lot of handish work
  #7
Senior Member
 
Jens Klostermann
Join Date: Mar 2009
Posts: 117
Rep Power: 17
jens_klostermann is on a distinguished road
Hi,

According to this thread http://hi.baidu.com/awacsljt/blog/it...4e6113aaf.html it is possible. And I just tried it myself and it works.

Make also sure to use the harmonic scheme for the laplacian on the fluid side as mentioned in this thread: http://www.cfd-online.com/Forums/ope...penfoam-8.html

Otherwise there also exist explicit coupling through the boundary chtXXXXMultiRegionFoam.

Jens
jens_klostermann is offline   Reply With Quote

Old   January 28, 2011, 09:32
Default
  #8
Member
 
Elisabet Mas de les Valls
Join Date: Mar 2009
Location: Barcelona, Spain
Posts: 64
Rep Power: 17
elisabet is on a distinguished road
Hi Jens,

First of all thank you for the hints.

I finally sorted out how to deal with parallel runs: it was so obvious.... but I didn't thought on it.... one just need to use the -region option with decomposePar !!!!

So, the required steps are (within the structure of the conjugateHeatFoam tutorial case):
  1. First change the boundary file in order to avoid the 'regionCouple' type (just write 'patch' instead of 'regionCouple', for example). This step has to be done in the main 'polyMesh' folder and the solid one.
  2. Modify the initial map accordingly for both main region (region0) and others (solid). For example, modifying 'regionCoupling' by 'fixedValue'.
  3. Define 'decomposeParDict' for the main 'system' folder and the solid one.
  4. Run 'decomposePar' and 'decomposePar -region solid'
  5. Correct 'boundary' files and initial maps for all processors, including main domain and solid domain.
  6. Run in parallel as usual: 'mpirun -np # conjugateHeatFoam -parallel > log &' (where # are the number of processors)
  7. In order to reconstruct the meshes run 'reconstructPar' and 'reconstructPar -region solid'
  8. In order to visualize: 'foamToVTK' and 'foamToVTK -region solid' and, execute 'paraview'. Load both cases and click on 'group Datasets' in 'filter' menu.
Hope it helps!!!!


By the way:
Quote:
Make also sure to use the harmonic scheme for the laplacian on the fluid side
It is still not clear to me in which Laplacian should I use 'harmonic' scheme (among the ones for the fluid region). In the ones that include a couple patch or just the opposite ones?

Thanks!


Elisabet
elisabet is offline   Reply With Quote

Old   January 31, 2011, 01:47
Default
  #9
Senior Member
 
Jens Klostermann
Join Date: Mar 2009
Posts: 117
Rep Power: 17
jens_klostermann is on a distinguished road
Quote:
Originally Posted by elisabet View Post

By the way:
It is still not clear to me in which Laplacian should I use 'harmonic' scheme (among the ones for the fluid region). In the ones that include a couple patch or just the opposite ones?

Elisabet
Hi Elisabet,

i don't get you question, but maybe this makes it clear:

according to http://www.cfd-online.com/Forums/ope...penfoam-8.html
you need to set the laplacian scheme in fvSchemes for the energy equation. Otherwise the temperature gradient at the coupled boundary will be wrong.

laplacianSchemes
{
laplacian(DT,T) Gauss harmonic corrected;
}

Jens
jens_klostermann is offline   Reply With Quote

Old   January 31, 2011, 06:46
Default
  #10
Member
 
Elisabet Mas de les Valls
Join Date: Mar 2009
Location: Barcelona, Spain
Posts: 64
Rep Power: 17
elisabet is on a distinguished road
Hi Jens,

Thanks for the answer. It's everything clear now.

Sorry if I was not very explicit in my question. I call uncoupled variables those that need to be solved in a single domain (velocity and pressure) and coupled ones those that have to be solved with coupled domains (temperature for conjugateHeatFoam).

Thank you very much!!

elisabet
elisabet is offline   Reply With Quote

Old   February 4, 2011, 16:02
Default
  #11
Senior Member
 
Jens Klostermann
Join Date: Mar 2009
Posts: 117
Rep Power: 17
jens_klostermann is on a distinguished road
Hi Elisabet,

Did you have luck with you parallel setup?

The reason I am asking:
-fluid (region0) decomposed and solid UNdecomposed runs fine with some speedup,
-fluid (region0) decomposed and solid decomposed gives me an error as soon as the energy equation (T+T) gets solved.

So I think it is because of the region coupling (e.g. attach detach)? But I don't know - maybe Hrv knows?

Jens
jens_klostermann is offline   Reply With Quote

Old   February 7, 2011, 09:00
Default
  #12
Member
 
Elisabet Mas de les Valls
Join Date: Mar 2009
Location: Barcelona, Spain
Posts: 64
Rep Power: 17
elisabet is on a distinguished road
Hi Jens,

I definitely had luck with my parallel simulation. At least, until now....

Quote:
Originally Posted by jens_klostermann View Post
-fluid (region0) decomposed and solid UNdecomposed runs fine with some speedup,
From my experience, this first option is not right enough, at least for my case: I have a square fluid channel with the top and bottom walls. I don't really remember now which was the problem, but the obtained temperature field looked non-physical.


Quote:
Originally Posted by jens_klostermann View Post
-fluid (region0) decomposed and solid decomposed gives me an error as soon as the energy equation (T+T) gets solved.

So I think it is because of the region coupling (e.g. attach detach)? But I don't know - maybe Hrv knows?
I'm sure Hrv can provide much more information than me, but try to attach/detach the solid domain in the same manner as the fluid domain (see attach/detachPatches.H in the source folder), as suggested in: http://www.cfd-online.com/Forums/openfoam-solving/57892-integrated-conjugate-heat-transfer-solver-openfoam-3.html#post179753

I guess this is the unique (relevant) code modification I've done.

Hope it helps!

elisabet
elisabet is offline   Reply With Quote

Old   February 10, 2011, 09:54
Default
  #13
Senior Member
 
Jens Klostermann
Join Date: Mar 2009
Posts: 117
Rep Power: 17
jens_klostermann is on a distinguished road
Since I use the OF-1.6.ext version the "bug" (which is http://www.cfd-online.com/Forums/ope...tml#post179753) was already gone. However I know where the code breaks right here:

Code:
 // Add fluid equation
        TEqns.set
        (
            0,
            new fvScalarMatrix
            (
                fvm::ddt(T)
              + fvm::div(phi, T)
              - fvm::laplacian(DT, T)
            )
        );
in solveEnergy.H

So I guess I need to digg further, maybe Hrv can push me further?

Jens
jens_klostermann is offline   Reply With Quote

Old   February 27, 2012, 21:09
Default
  #14
New Member
 
Join Date: Oct 2010
Posts: 27
Rep Power: 15
albem is on a distinguished road
Hi

I am trying to decompose the domain 2 rectangular domains, the first one is fluid an the second one is a rectangular solid domain immersed in the fluid, centered, this solid domain occupies 1/2 of the fluid domain in both directions, I decomposed the domain in the same number of processors, but unfortunately the boundaries do not match in the same the regionCoupling for solid and liquid do not match for some of the processors,

Should I decompose both domains in different numbers of processors, in such a way that boundaries match?

Any help is welcome,

Thank you

Alberto
albem is offline   Reply With Quote

Old   February 28, 2012, 05:42
Default decomposePar in parallel
  #15
Member
 
Elisabet Mas de les Valls
Join Date: Mar 2009
Location: Barcelona, Spain
Posts: 64
Rep Power: 17
elisabet is on a distinguished road
Hi Alberto,

Since now, when I need to decompose a case with more than one domain, I must move to version 1.7.x to correctly decompose the case (with -region option, of course). Afterwards, I can return to my version (based on 1.6-ext) and run the case. I have experienced no problems with reconstruct tool.

The error obtained when I decomposed the main case with OF-1.6-ext was something about a missing region, as far as I remember.

I would appreciate to know other alternatives, if someone has experience on it!!!

regards,

elisabet
elisabet is offline   Reply With Quote

Old   May 22, 2012, 19:01
Default
  #16
New Member
 
Join Date: Oct 2010
Posts: 27
Rep Power: 15
albem is on a distinguished road
Hello Foamers

I am trying to use decomposePar for the geometry sketched below, fluid domain with a solid domain which length is a third of the liquid length, until now I can only run conjugateHeatFoam solver using 2 processor for the liquid and 2 for the solid (x-direction), is there a way to use at least 6 for the liquid and 2 for the solid, I have found the instruction



globalFaceZones ( nameofzone1 nameofzone2 );

but I do not know how it works or if it is useful for my problem,

Please let me know your opinion about this problem

Any help is welcome.

Thanks in advance.

Alberto
Attached Images
File Type: png liquid_solid_decompose.png (7.1 KB, 33 views)
albem is offline   Reply With Quote

Old   November 27, 2014, 22:37
Red face the step 7 is wrong!
  #17
New Member
 
liuke
Join Date: Apr 2013
Posts: 20
Rep Power: 13
liuke870915 is on a distinguished road
Quote:
Originally Posted by elisabet View Post
Hi Jens,

First of all thank you for the hints.

I finally sorted out how to deal with parallel runs: it was so obvious.... but I didn't thought on it.... one just need to use the -region option with decomposePar !!!!

So, the required steps are (within the structure of the conjugateHeatFoam tutorial case):
  1. First change the boundary file in order to avoid the 'regionCouple' type (just write 'patch' instead of 'regionCouple', for example). This step has to be done in the main 'polyMesh' folder and the solid one.
  2. Modify the initial map accordingly for both main region (region0) and others (solid). For example, modifying 'regionCoupling' by 'fixedValue'.
  3. Define 'decomposeParDict' for the main 'system' folder and the solid one.
  4. Run 'decomposePar' and 'decomposePar -region solid'
  5. Correct 'boundary' files and initial maps for all processors, including main domain and solid domain.
  6. Run in parallel as usual: 'mpirun -np # conjugateHeatFoam -parallel > log &' (where # are the number of processors)
  7. In order to reconstruct the meshes run 'reconstructPar' and 'reconstructPar -region solid'
  8. In order to visualize: 'foamToVTK' and 'foamToVTK -region solid' and, execute 'paraview'. Load both cases and click on 'group Datasets' in 'filter' menu.
Hope it helps!!!!


By the way:
It is still not clear to me in which Laplacian should I use 'harmonic' scheme (among the ones for the fluid region). In the ones that include a couple patch or just the opposite ones?

Thanks!


Elisabet
when I run reconstructPar, there is a same error as decomposePar,like "Attempt to cast type wall to type lduInterface"
liuke870915 is offline   Reply With Quote

Reply

Tags
conjugateheatfoam, parallel

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
Parallel Run on dynamically mounted partition braennstroem OpenFOAM Running, Solving & CFD 14 October 5, 2010 14:43
Unable to run OF in parallel on a multiple-node cluster quartzian OpenFOAM 3 November 24, 2009 13:37
serial run fine, but parallel run diverged phsieh2005 OpenFOAM Running, Solving & CFD 2 October 6, 2009 08:33
Parallel run diverges, serial does not SammyB OpenFOAM Running, Solving & CFD 1 May 10, 2009 03:28
Run in parallel a 2mesh case cosimobianchini OpenFOAM Running, Solving & CFD 2 January 11, 2007 06:33


All times are GMT -4. The time now is 15:02.