I think I found something wrong in my code, but I don't know how to fix it... 

It's to do with the way I implement the symmetric velocity gradient term, D = grad(v)+ grad(v)^T , please see attached pdf for description.

Also the full code can be found on https://bitbucket.org/fryderyk216/navierstokes/


Thanks



From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Fryderyk Wilczynski <scfw@leeds.ac.uk>
Sent: 22 April 2016 14:58
To: firedrake
Subject: Re: [firedrake] Pressure outlet boundary condition in plane poiseuille flow
 

I am using P2 for velocity and P1 for pressure, where


P1 = FunctionSpace(mesh, "Lagrange", 1)
P2 = VectorFunctionSpace(mesh, "Lagrange", 2)

thanks

From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Colin Cotter <colin.cotter@imperial.ac.uk>
Sent: 22 April 2016 14:31
To: firedrake
Subject: Re: [firedrake] Pressure outlet boundary condition in plane poiseuille flow
 
What kind of finite element spaces are you using?

all the best
--cjc

On 22 April 2016 at 12:51, Fryderyk Wilczynski <scfw@leeds.ac.uk> wrote:

Hi all,


I trying to test 2d incompressible navier-stokes code, using plane poiseuille flow test case .

I am solving steady state system on a square domain. No-slip on top and bottom walls. Velocity inlet on the left where I specify Dirichlet parabolic profile ("x[1]*(1-x[1])", "0.0"). On the right boundary I specify zero constant pressure. 

noslip = Constant((0, 0))
inlet = Function(P2).interpolate(Expression(("x[1]*(1-x[1])", "0.0")))
bc0 = DirichletBC(W.sub(0), inlet, 1)
bc1 = DirichletBC(W.sub(1), 0, 2) # zero pressure outlet
bc2 = DirichletBC(W.sub(0), noslip, 3)
bc3 = DirichletBC(W.sub(0), noslip, 4)


I expect the exact to be  v = ( y (1 - y), 0) - (unidirectional flow).


However, I think I must have set that outlet condition up incorrectly as I get vertical flow near the outlet. Is this a common issue? or a sign that there's some bug in my formulation?


Thanks, 

Fryderyk







--