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
I am using P2 for velocity and P1 for pressure, where
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 outletbc2 = 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