2
$\begingroup$

I am using interior penalty discontinuous Galerkin to solve a simple Laplace problem: \begin{align*} \nabla u=0 \end{align*} with prescribed 0 and 1 Dirichlet boundary conditions on opposite edges of a unit square. The other edges have 0 Neumann. enter image description here You'll see above that I have an image of the solution and it's gradient on the right.

The exact solution should be linear and it's gradient should be a constant value which is what I would get with continuous Galerkin. But with DG this isn't the case. I am getting some pollution of my solution and it's gradient at the corner. This won't happen if I defined continuous boundary conditions.

I need to integrate on the edge to queue for forces but the corner elements are causing me problems. I am using an edited version of step 74 of dealii for this and I can't impose BCs strongly in DG.

Any hints or tips on how to circumvent this issue? Other formulations and ways to impose BCs?

$\endgroup$
12
  • $\begingroup$ How did you get the plot on the right? Maybe it's just a post processing problem $\endgroup$
    – FEGirl
    Commented Jan 5, 2023 at 15:20
  • 1
    $\begingroup$ A more important question would be the scaling of the axis first. $\endgroup$
    – ConvexHull
    Commented Jan 5, 2023 at 15:51
  • $\begingroup$ Moreover, what is the polynomial degree in your calculation and how did you choose the penalties for the Inner- and the BC-sides? For accurate results, the penalties should be as high as possible, but less enough to prevent a bad condition number. Also be aware that DG does not even directly impose $C^0$ solutions, which makes the result in this particular case extremely sensitive on the penalties, especially with a high polynomial degree. $\endgroup$
    – ConvexHull
    Commented Jan 5, 2023 at 16:08
  • $\begingroup$ #bobinthebox The plot on the right is directly using the Paraview Gradient filter of the solution. I get the same looking solution if I were to use the in-built dealii functions @ConvexHull the gradients aren't too high. The gradient in the domain is at 1, and at the corners goes form 0.2 to 1.5. Polynomial degree=1, the penalties are the same ones used in dealii step 74. $\endgroup$ Commented Jan 5, 2023 at 16:34
  • 1
    $\begingroup$ Importantly, if you use polynomial degree 1, the exact solution is in the discrete solution space and the discrete solution needs to be exact. If it isn't, something is wrong. $\endgroup$ Commented Jan 6, 2023 at 6:04

2 Answers 2

4
$\begingroup$

I'm not familiar with deal.II. However, to show that DG is able to reproduce the constant gradient solution I will post some results with a different tool using IP. The penalty is about $\sigma\approx1\times10^8$, the polynomial degree is $P=1$.

Edit:

The solver is based on a "grad/div" or "strong-weak/weak" formulation. The system is assembled using the flux form and solved in primal form (applying the Schur complement). Using this approach all contributions in the system matrix from element-outside are set to zero using Neumann BC's. The matrix system is solved using direct LU.


Coarse mesh: 2x2 elements

a


Medium mesh: 8x8 elements

b


Fine mesh: 32x32 elements

enter image description here


$\endgroup$
4
  • $\begingroup$ Is there a term in the weak from associated with the zero Neumann BC? $\endgroup$ Commented Jan 11, 2023 at 8:58
  • $\begingroup$ @CuteCompute The solver is based on a "grad/div" or "strong-weak/weak" formulation. The system is assembled using the flux form and solved in primal form (applying the Schur complement). Using this approach all contributions in the system matrix from element-outside are set to zero using Neumann BC's. The matrix system is solved using direct LU. $\endgroup$
    – ConvexHull
    Commented Jan 11, 2023 at 17:05
  • $\begingroup$ Can you share a paper that best illustrates this formulation? $\endgroup$ Commented Jan 12, 2023 at 5:52
  • $\begingroup$ I think the methodology is quite standard. $\endgroup$
    – ConvexHull
    Commented Jan 13, 2023 at 21:39
0
$\begingroup$

I fixed it after help from the dealii user group. It was a coding error on my part. Thank you all for your inputs

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.