### (Deleted) Issue with outflow in navier-stokes in component formulation

20
views
0
7 weeks ago by

I'm trying to understand the fenics component syntax and am playing around with the 2D Navier-Stokes syntax

a = ( u*u*u_t.dx(0) + v*u*u_t.dx(1) +   # Momentum eq for u
0.001*( 2*u.dx(0)*u_t.dx(0) + u.dx(1)*u_t.dx(1) + u.dx(1)*v_t.dx(0) ) +
-1*u.dx(0)*p_t +
u*v*v_t.dx(0) + v*v*v_t.dx(1) +   # Momentum eq for v
0.001*( 2*v.dx(1)*v_t.dx(1) + v.dx(0)*u_t.dx(1) + v.dx(0)*v_t.dx(0) ) +
-1*v.dx(1)*p_t +
p*u_t.dx(0) + p*v_t.dx(1) )*dx    # Continuity eq
​

When using a fully developed profile and testing on a rectangular everything is fine (keeps the flow profile) until the outflow where it assumes a flat (constant) profile which seems odd (using neutral Neumann outflow). However, when I comment out the convective terms (just use Stokes) works and gives a nice parabolic profile at the outflow.

bc0 = DirichletBC(V.sub(0), Constant(0), 0)
bc1 = DirichletBC(V.sub(1), Constant(0), 0)
bc2 = DirichletBC(V.sub(0), Constant(0), 2)
bc3 = DirichletBC(V.sub(1), Constant(0), 2)
bc4 = DirichletBC(V.sub(0), Expression("4*0.3*(x[1]*(0.41-x[1]))/pow(0.41,2)", degree=2), 3)
bc5 = DirichletBC(V.sub(1), Constant(0), 3)
​

Can anyone see if there might be anything obvious wrong here?

https://imgur.com/a/LN8GMFI
Community: FEniCS Project