Hello everyone,
I am solving the Stokes equations using Raviart–Thomas elements in deal.II. When the boundary conditions are homogeneous Dirichlet, everything works fine and I observe the expected convergence behavior.
However, when I switch to inhomogeneous Dirichlet boundary conditions, I encounter problems: although I apply ``VectorTools::project_boundary_values_div_conforming(...)`` to set the boundary values, the pressure error does not converge.
Has anyone experienced a similar issue, or could point me to the right way of handling inhomogeneous Dirichlet conditions for the Stokes problem with RT elements? Am I missing an additional step to make the pressure converge?
Any advice or references would be very much appreciated.
Thanks in advance!
Problem / setup:
I follow the paper “Multigrid methods for H(div)-conforming discontinuous Galerkin methods for the Stokes equations”.
Finite elements: RT_k-DGQ_k (so an H(div)-conforming RT velocity, DG pressure).
Solver: FGMRES for the global linear system; multigrid used as a preconditioner; the multigrid smoother is a multilevel Schwarz method.
PDE form: I use the stress-tensor form of the Stokes equations (same form as in deal.II step-22). But I think under the divergence-free condition these two forms should be equivalent.
Boundary conditions: I implement inhomogeneous Dirichlet boundary conditions. Nitsche’s method is applied in the weak form for enforcing the velocity BCs. In setup_system() I also apply
Pressure: I did not apply any extra constraint or projection in the weak form — the pressure block is assembled directly from the weak formulation (no extra stabilization there).
About the pressure constant / mean value:
Before computing the error I tried to remove the mean pressure via
However ``mean_pressure`` turned out to be very small (at least much smaller than the pressure error I observe), so this subtraction did not practically change the results.
Observed behaviour: (The penalty parameters follow the choice in step-74)
With homogeneous Dirichlet BCs everything behaves as expected (convergence rates ok).
With inhomogeneous Dirichlet BCs the pressure L2 error does not converge (velocity behaves better only in RT1)
======================= RT1-DGQ1 ========================
cells uL2 uH1 pL2
4 2.067e-01 - 3.128e+00 - 2.055e+00 -
16 5.324e-02 1.96 1.596e+00 0.97 4.447e-01 2.21
64 1. 307e-02 2.03 7.968e-01 1.00 1.170e-01 1.93
256 3.256e-03 2.01 3.983e-01 1.00 4.811e-02 1.28
1024 8.195e-04 1.99 1.997e-01 1.00 2.965e-02 0.70
4096 2.086e-04 1.97 1.005e-01 0.99 2.049e-02 0.53
16384 5.409e-05 1.95 5.090e-02 0.98 1.444e-02 0.51
======================= RT2-DGQ2 ==========================
cells uL2 uH1 pL2
4 3.405e-02 - 6.559e-01 - 4.237e-01 -
16 4.760e-03 2.84 1.666e-01 1.98 6.974e-02 2.60
64 7.869e-04 2.60 5.200e-02 1.68 4.539e-02 0.62
256 2.285e-04 1.78 2.778e-02 0.90 4.671e-02 -0.04
1024 8.213e-05 1.48 1.923e-02 0.53 3.686e-02 0.34
4096 2.966e-05 1.47 1.371e-02 0.49 2.707e-02 0.45
16384 1.061e-05 1.48 9.751e-03 0.49 1.944e-02 0.48