Subject: [FFC-dev] Stokes flow problem

From: Brandon Chabaud <[email-masked]>
Date: Wed, 27 May 2009 14:49:36 -0500

Hello,

I am trying to solve a Stokes flow type problem under the constraint that
the integral over the domain of the pressure is zero.  None of the pde demos
have an example of this.  How do I impose this condition in fenics?  Thanks.

---

From: Anders Logg <[email-masked]>
Date: Thu, 28 May 2009 22:57:38 +0200

On Wed, May 27, 2009 at 02:49:36PM -0500, Brandon Chabaud wrote:
> Hello,
> 
> I am trying to solve a Stokes flow type problem under the constraint that the
> integral over the domain of the pressure is zero.  None of the pde demos have
> an example of this.  How do I impose this condition in fenics?  Thanks.

Have you tried using the normalize() function in DOLFIN? It subtracts
the average of a vector from a vector so it has zero mean value. You
can use that on the right-hand side for the pressure to ensure that
the system has a solution and then again on the solution to obtain a
solution with zero mean value if necessary.

-- 
Anders

---

From: Andy Ray Terrel <[email-masked]>
Date: Wed, 3 Jun 2009 15:27:21 -0500

Wouldn't that ignore the coupling in solving Stokes to begin with?

You want to be able to add an integral operator perhaps something like
the mass matrix (m) with a constant function m(1, p). Added to the
problem.

-- Andy

On Thu, May 28, 2009 at 3:57 PM, Anders Logg <[email-masked]> wrote:
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkoe+sIACgkQTuwUCDsYZdGsAgCfXuKWIibVGlWumi6JZ8KMNGvW
> q44An3uPwKuLe9Ooob1v1qdxJDAd+Rub
> =FRiq
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> FFC-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/ffc-dev
>
>

---

From: Jed Brown <[email-masked]>
Date: Thu, 04 Jun 2009 11:50:24 +0200

> the mass matrix (m) with a constant function m(1, p). Added to the

I suppose you could do this, but it adds a lot of nonzeros (a dense row
and column) and it's really not necessary.  This leaves two choices:

1. "Pin" pressure at one node and "normalize" (peculiar word choice)
the result.

2. Inform the Krylov solver that constant pressure is in the null space
of the operator.  See KSPSetNullSpace in PETSc, Trilinos must support
this as well.  This option is usually preferable unless you need to use
a direct solver.

Jed

---

From: Andy Ray Terrel <[email-masked]>
Date: Thu, 4 Jun 2009 21:34:40 -0500

Okay thanks for the response!

-- Andy