- changed milestone to 1.6
Redundant pressure boundary condition in Stokes demo
In demo-stokes_taylor_hood.py, the Stokes problem is solved with the following boundary conditions
$u = u_0 $ on $\Gamma_D$ and $\nabla u\cdot n + p n = 0$ on $\Gamma_N$
These are reflected in the weak form as neither the bilinear nor the linear forms include any surface terms. The velocity boundary conditions are set strongly with
bc0 = DirichletBC(W.sub(0), ...)
bc1 = DirichletBC(W.sub(0), ...)
Later in the code, pressure is enforced strongly on $\Gamma_N$ with
bc2 = DirichletBC(W.sub(1), zero, sub_domains, 2)
and the problem is solved with all three boundary conditions. I believe there is no need to use the pressure boundary condition as the stress prescibed on $\Gamma_N$ is already included weakly in the form. The problem solves fine without it
# Output without pressure bc
Norm of velocity coefficient vector: 82.6968599618892
Norm of pressure coefficient vector: 4147.69457577137
# Output with pressure bc
Norm of velocity coefficient vector: 82.699892467548
Norm of pressure coefficient vector: 4146.57536645252
Note that if this is found a bug, it should be fixed also in the remaing Stokes demos, stokes-iterative, stokes-mini and stokes-stabilized.
Comments (6)
-
-
@mirok, can you propose a pull request?
-
reporter Yes, I'll make one by the end of this week.
-
-
assigned issue to
-
assigned issue to
-
- changed status to resolved
Fix issue
#328: Redundant pressure boundary condition in Stokes demo→ <<cset 997bb10b5f02>>
-
- removed milestone
Removing milestone: 1.6 (automated comment)
- Log in to comment