<div>Hi,</div>
<div> </div>
<div>somone suggested that I treat that face as a dirichlet boundary condition. after 1 or a few iterations, the face value will be updated and it will be repeated until covergerence. I wonder if that is possible as well?
</div>
<div> </div>
<div>It'll make the job much easier, although the iteration may take longer...<br><br><br> </div>
<div><span class="gmail_quote">On 2/1/07, <b class="gmail_sendername">Barry Smith</b> <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>The glueing might be able to be handled by using periodic for that<br>dimension of the DA you create. But this gets tricky if you have any
<br>nodes that have "an extra degree of freedom".<br><br> Barry<br><br><br>On Wed, 31 Jan 2007, Berend van Wachem wrote:<br><br>> Hi Ben,<br>><br>> The challenge in your problem is how you "glue" the C grid in the back;
<br>> there you will need to do some additional scattering. I would set-up<br>> the IS for this, and then use that to scatter the values<br>> into "ghostcells" which will be present on the block(s).<br>
><br>> Berend.<br>><br>> > Thank you Berend! I'll go through DA again. I'm also looking at<br>> > HYPRE. Its way of creating grids and linking them seems intuitive.<br>> > Btw, is there a mailing list for HYPRE similar to PETSc to discuss
<br>> > problems? I find that their explanation are quite brief.<br>> ><br>> > I tried to install HYPRE 2.0 on windows using cygwin but it failed.<br>> > I then install it as an external software thru PETSc. I think it's
<br>> > installing HYPRE 1.0 or something. But similarly, there's illegal<br>> > operation.<br>> ><br>> > Installing HYPRE 2.0 on my school's linux worked, though there's<br>> > seems to be some minor error. So what's the best way to employ
<br>> > multigird? Is it to install as an external software thru PETSc or<br>> > just use HYPRE on its own?<br>> ><br>> > Btw, it will be great if you can send me parts of your code<br>> > regarding DA.
<br>> ><br>> > Thank you very much!<br>> ><br>> > On 1/26/07, Berend van Wachem <<a href="mailto:berend@tfd.chalmers.se">berend@tfd.chalmers.se</a>> wrote:<br>> > > Hi,<br>> > >
<br>> > > I am not an expert - but have used PETSc for both structured and<br>> > > unstructured grids.<br>> > ><br>> > > When you use an unstructured code for a structured grid, there is
<br>> > > additional overhead (addressing, connectivity) which is redundant;<br>> > > this information is not required for solving on a structured grid.<br>> > > I would say this is maximum a 10% efficiency loss for bigger
<br>> > > problems - it does not affect solving the matrix, only in<br>> > > gathering your coefficients. I would not rewrite my CFD code for<br>> > > this.<br>> > ><br>> > > If you only deal with structured grids, using the PETSc DA
<br>> > > framework should work for you - you are not saving all<br>> > > connectivity. The DA framework is not difficult at all, according<br>> > > to my opinion. Look at a few examples that come with PETSc. I use
<br>> > > a block structured solver - using multiple DA's within one<br>> > > problem. Let me know if you are interested in this, and I can send<br>> > > you parts of code.<br>> > >
<br>> > > Multigrid is certainly possible (I would reccomend through HYPRE,<br>> > > discussed on the mailinglist, although I still have problems with<br>> > > it), but the question is how efficient it will be for your CFD
<br>> > > problem. For an efficient multigrid in CFD, it is important to<br>> > > consider the coefficient structure arising from the momentum<br>> > > equations - the grouping of cells should occur following the
<br>> > > advection term. Only then will you achieve linear scaling with the<br>> > > problem size. For instance, consider a rotating flow in a square<br>> > > box. Most multigrid algorithms will group cells in "squares" which
<br>> > > will not lead to a significant improvement, as the flow<br>> > > (advection, pressure grad) does not move in these squares. In<br>> > > fact, to have an efficient multigrid algorithm, the cels should be
<br>> > > grouped along the circular flow. As this cannot be seen directly<br>> > > from the pressure coefficients, I doubt any "automatic" multigrid<br>> > > algorithm (in Hypre or Petsc) would be able to capture this, but
<br>> > > don't quote me on it - I am not 100% sure. So concluding, if you<br>> > > want to do efficient multigridding for CFD, you will need to point<br>> > > out which cells are grouped into which structure, based upon the
<br>> > > upwind advection coefficients.<br>> > ><br>> > > Good luck,<br>> > ><br>> > > Berend.<br>> > ><br>> > > > Hi,<br>> > > ><br>> > > > I was discussing with another user in another forum
<br>> > > > (<a href="http://cfd-online.com">cfd-online.com</a>)<br>> > ><br>> > > about<br>> > ><br>> > > > using PETSc in my cfd code. I am now using KSP to solve my<br>
> > > > momentum and poisson eqn by inserting values into the matrix. I<br>> > > > was told that using PETSc<br>> > > > this way is only for unstructured grids. It is very inefficient<br>
> > > > and much slower if I'm using it for my structured grid because I<br>> > > > am not<br>> > ><br>> > > exploiting<br>> > ><br>> > > > the regular structure of my grid.
<br>> > > ><br>> > > > Is that true? I'm solving flow around airfoil using c-grid.<br>> > > ><br>> > > > So how can I improve? Is it by using DA? I took a glance and it<br>
> > > > seems quite<br>> > > > complicated.<br>> > > ><br>> > > > Also, is multigrid available in PETSc? Chapter 7 discusses about<br>> > > > it but<br>> > >
<br>> > > it<br>> > ><br>> > > > seems very brief. Is there a more elaborate tutorial besides<br>> > > > that c examples?<br>> > > ><br>> > > > Hope someone can give me some ideas.
<br>> > > ><br>> > > > Thank you.<br>><br>><br><br></blockquote></div><br>