Hello,
Consider the boundary term dot(p_n*n, v)*ds on line 80 in this Fenics Navier Stokes Example. I wonder whether this term is identically zero, and thus can be omitted from F1.
In fact, at each time step one solves for p_ with the boundary condition (BC) that p_ is zero at the outflow:
bcp_outflow = DirichletBC(Q, Constant(0), outflow)
bcp = [bcp_outflow]
for n in range(num_steps):
[...]
# Step 2: Pressure correction step
b2 = assemble(L2)
[bc.apply(b2) for bc in bcp]
solve(A2, p_.vector(), b2, 'bicgstab', 'hypre_amg')
[...]
then p_ is stored into p_n with p_n.assign(p_).
At the later steps, p_n enters into the term dot(p_n*n, v)*ds of F1: given that p_n vanishes on the outflow, dot(p_n*n, v)*ds vanishes also on the outflow. Also, given that we impose Dirichlet BCs on the velocity on the inflow and on the walls, v vanishes on the inflow and on the walls, i.e., everywhere.
Is this right?