[petsc-users] [DMMG] Stokes Solver

domenico.borzacchiello at univ-st-etienne.fr domenico.borzacchiello at univ-st-etienne.fr
Fri Apr 8 02:59:52 CDT 2011


Hi,
I'm trying to implement a 3d stokes solver on a simple cartesian staggered
grid using the a MAC FV Discretisation. I'm following the example given in
/snes/examples/tutorials/ex30.c. As the stokes solver is ready I'll add
some more complex constitutive laws. For the moment I'm testing the solver
with just 1-level MG and I'd like a few clarification to know if what I'm
doing is correct.

- The solver solves for u v w p. I'm using a single DA with 4 DOFs and due
to the MAC arrangement I have some "extraboundary" nodes for u ( in the y
and z directions) v (x & z dir) w ( x & y dir) and p (x,y & z dir). If
what I'm getting from ex30.c is right I have to write a simple identity
for each of these nodes (i.e. p_extra = anyvalue) as they are not coupled
with the rest of the system. I'm doing the same for Dirichlet BCs nodes
(i.e. u = Ubound). Is this correct?

- How does Petsc deal with the pressure-velocity coupling? Is it correct
to try to solve the whole coupled system with DMMG as in ex30.c? At
present time I'm getting no convergence by running dmmgsolve (snes) with
all the default options on a very small system.

  0 SNES Function norm 7.128085632250e+00
Number of Newton iterations = 0
Number of Linear iterations = 0
Average Linear its / Newton = -nan
Converged Reason = -3

If I run the same case with a direct solver (pc_type lu) I'm basically
getting the same error:

RINFO(1) (local estimated flops for the elimination after analysis):
             [0] 5.42609e+08
      RINFO(2) (local estimated flops for the assembly after factorization):
             [0]  3.83582e+06
      RINFO(3) (local estimated flops for the elimination after
factorization):
             [0]  5.44162e+08
      INFO(15) (estimated size of (in MB) MUMPS internal data for running
numerical factorization):
             [0] 17
      INFO(16) (size of (in MB) MUMPS internal data used during numerical
factorization):
             [0] 17
      INFO(23) (num of pivots eliminated on this processor after
factorization):
             [0] 1372
Number of Newton iterations = 7
Number of Linear iterations = 88
Average Linear its / Newton = 1.257143e+01
Converged Reason = -3


Would you suggest anything to fix the problem? I'm double-checking the
user provided function in DMMGSetSNESLocal to see if I made any mistake
there.

Thank you in advance,
Domenico





More information about the petsc-users mailing list