FunctionSpace for a Stokes problem

Asked by Dupront

Hi,

The Stokes demo works fine the the following spaces

V = VectorFunctionSpace(mesh,"CG",3)
Q= FunctionSpace(mesh,"CG",2)

and

V = VectorFunctionSpace(mesh,"CG",2)
Q= FunctionSpace(mesh,"CG",1)

Now if I want order 1 for V what should be Q ?
Thank you

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Dupront
Solved:
Last query:
Last reply:
Revision history for this message
Martin Sandve Alnæs (martinal) said :
#1

Use 'DG' instead of 'CG' to allow 0 degree.

Martin

On 27 August 2012 14:51, Dupront <email address hidden> wrote:
> New question #206936 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/206936
>
> Hi,
>
> The Stokes demo works fine the the following spaces
>
> V = VectorFunctionSpace(mesh,"CG",3)
> Q= FunctionSpace(mesh,"CG",2)
>
> and
>
> V = VectorFunctionSpace(mesh,"CG",2)
> Q= FunctionSpace(mesh,"CG",1)
>
> Now if I want order 1 for V what should be Q ?
> Thank you
>
>
> --
> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.

Revision history for this message
Dupront (michel-dupront) said :
#2

I tried that but it did not work.

It ran but u/p.vector().norm("l2") were both nan.

I used the demo demo_stokes_taylor-hood.py
in which I only changed the FunctionSpace degree (V->"CG", 1 / Q-> "DG", 0)

Thanks

Revision history for this message
Marie Rognes (meg-simula) said :
#3

The mixed space CG_1^d x DG_0 is not stable (as in does not satisfy the inf-sup condition) for the Stokes equations..., so a sensible solution is not expected.

Revision history for this message
Kent-Andre Mardal (kent-and) said :
#4

Stokes is not stable for
V = VectorFunctionSpace(mesh,"CG",1)
Q= FunctionSpace(mesh,"DG",0)

or

V = VectorFunctionSpace(mesh,"CG",1)
Q= FunctionSpace(mesh,"CG",1)

However, you can use stabilization or the Mini element if you want first
order elements for the velocity.
See the stokes-mini and stokes-stabilized demos.

Kent

On 27 August 2012 14:51, Dupront <email address hidden>wrote:

> New question #206936 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/206936
>
> Hi,
>
> The Stokes demo works fine the the following spaces
>
> V = VectorFunctionSpace(mesh,"CG",3)
> Q= FunctionSpace(mesh,"CG",2)
>
> and
>
> V = VectorFunctionSpace(mesh,"CG",2)
> Q= FunctionSpace(mesh,"CG",1)
>
> Now if I want order 1 for V what should be Q ?
> Thank you
>
>
> --
> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.
>

Revision history for this message
Dupront (michel-dupront) said :
#5

V = VectorFunctionSpace(mesh,"CG",1)
Q= FunctionSpace(mesh,"DG",0)
For this one too

ok !
I will have a look at the other examples.
Many thanks to everybody for these prompt answers !