# [petsc-users] Two DMDAs for conjugate heat transfer

Matthew Knepley knepley at gmail.com
Tue Apr 15 12:57:38 CDT 2014

```On Tue, Apr 15, 2014 at 12:09 PM, Xiao, Jianjun (IKET) <jianjun.xiao at kit.edu
> wrote:

> Dear Barry,
>
> Yes, I have structured grid.
>
> Say, we totally have one million cells (100*100*100). 100,000 cells are
> solid cells, and the shape of the solid is irregular. The other cells are
> fluid cells.
>
> In principle, we could use one DMDA. And give the property to each cell.
> It means the code knows which cell is solid and which is fluid. Then the
> problem of load balancing occurs: if all  the solid cells accumulates, say
> at a corner, the work load will not be balanced.
>

Why would it not be balanced? You divide cells equally, and compute
whatever equations you need on each cell.

Matt

> Maybe you have some other good ideas. Thank you
>
> JJ
> ________________________________________
> From: Barry Smith [bsmith at mcs.anl.gov]
> Sent: Tuesday, April 15, 2014 6:30 PM
> To: Xiao, Jianjun (IKET)
> Cc: petsc-users at mcs.anl.gov
> Subject: Re: [petsc-users] Two DMDAs for conjugate heat transfer
>
>    DMDA are for structured grids. That is each DMDA represents a
> structured grid. Do you have fluid everywhere and solid everywhere or are
> some cells fluid and some cells solid?
>
>    Barry
>
>
>
> On Apr 15, 2014, at 11:12 AM, Xiao, Jianjun (IKET) <jianjun.xiao at kit.edu>
> wrote:
>
> > Dear developers,
> >
> > I am writing a CFD code to simulate the conjugate heat transfer. I would
> like to use two DMDAs: one is for the fluid cells, and the other one is for
> the solid cells.
> >
> > Here are the questions:
> >
> > 1.  Is it possible to have two different DMDAs for such a purpose? How
> the data in these two DMDAs communicate with each other? Are there any
> similar examples?
> >
> > 2.  How to deal with the load balancing if DMDA is used? Or it is simply
> impossible?
> >
> > Thank you.
> >
> > Best regards
> > JJ
>
>

--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their