Diffusion equation with DG fails with distorted mesh

34 views
Skip to first unread message

Gary Uppal

unread,
Apr 25, 2019, 4:50:28 PM4/25/19
to deal.II User Group
Hi,

I am trying to solve the diffusion equation with Discontinuous Galerkin elements. The solution looks good with a regular structured mesh, but if I distort the mesh, the solution blows up and does not converge. Is there an obvious reason this would happen? I later need a mesh with holes in it, so I cannot always use the structured mesh. 

I use the interior penalty method and get the diffusion matrix using MeshWorker as in Step-39. I compute the mass matrix and solve the diffusion equation with an implicit backward Euler method and am using periodic boundary conditions. Snapshots of the solution with structured and distorted meshes are shown below. Any help is appreciated!

Thank you,
Gary


no_distort.jpg distorted.jpg


Wolfgang Bangerth

unread,
Apr 25, 2019, 11:15:31 PM4/25/19
to dea...@googlegroups.com, Gary Uppal
Gary -- the wrong solutions happen on cells that are very nearly degenerate
(i.e., are almost triangular). The finite element theory says that the error
between the exact and the numerical solution is bounded by a constant times
some power of h, where the constant depends on the minimal and maximal angles
at the vertices of the cells. Theory then also predicts that this constant
goes to infinity if the maximal angle at one vertex comes close to 180 degrees
-- which is exactly what is happening in your case.

So choose a mesh that is less distorted and you should be fine.

Best
W.


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Doug

unread,
Apr 26, 2019, 4:50:23 AM4/26/19
to deal.II User Group
Prof. Bangerth,

I am encountering a similar "issue" regarding distorted grids. I am using DG for linear advection with a manufactured solution to verify the code.

I recover optimal convergence orders (p+1) for straight meshes when refining in h. I recover optimal orders (p+1) for a sine-transformed grid with some skewed angles up to around 45 degrees (as seen attached).

However, I lose my optimal (p+1) order as soon as I apply any small amount of random distortion to my final refined grid (see attached). Note that the distortion factor of 0.15 is used, but this loss of order also occurs for small distortion factors down to 0.01. Instead of (p+1), I may recover (p) or even (p-1). This only applies when the final grid is randomly distorted. If I start from a coarse-ish distorted grid (say 100 cells), and refine globally such that its children aren't distorted, I then recover my optimal orders again.

Since my distorted cell still have reasonable angles no matter its refinement level, degenerate cells wouldn't be an issue. Also, since I am not performing adaptive refinement, there are no hanging nodes such that the triangulation becomes irregular.

Would you know happen to know if some other condition is violated from random distortions such that error estimates do not hold?

Best regards,

Doug
Screenshot from 2019-04-26 04-26-26.png
Screenshot from 2019-04-26 04-32-57.png

Gary Uppal

unread,
Apr 26, 2019, 11:48:58 AM4/26/19
to dea...@googlegroups.com
Prof. Bangerth,

Thanks for the reply. I get problems on less distorted meshes as well. For example, in the mesh with a hole shown below.  I eventually need multiple holes and an advection term. Actually, the advection seems ok and I mainly get issues when the diffusion is large. If the distorted mesh is the issue, is there a better way to construct the geometry? Is there not a way to get better accuracy even with the distorted mesh? I've tried refining the mesh and lowering the time step, but that doesn't seem to change the results. 

Thank you,
Gary   
with_hole.jpg

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/ZSHIDbp7yfE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Doug

unread,
Apr 26, 2019, 1:47:21 PM4/26/19
to deal.II User Group
Hello Gary,

Since we have two independent implementation of DG, I am curious to know if you achieve optimal error convergence order of (p+1) on distorted grids for either linear advection, diffusion, or convection-diffusion. 

Best Regards,

Doug


On Friday, April 26, 2019 at 11:48:58 AM UTC-4, Gary Uppal wrote:
Prof. Bangerth,

Thanks for the reply. I get problems on less distorted meshes as well. For example, in the mesh with a hole shown below.  I eventually need multiple holes and an advection term. Actually, the advection seems ok and I mainly get issues when the diffusion is large. If the distorted mesh is the issue, is there a better way to construct the geometry? Is there not a way to get better accuracy even with the distorted mesh? I've tried refining the mesh and lowering the time step, but that doesn't seem to change the results. 

Thank you,
Gary   
with_hole.jpg

To unsubscribe from this group and all its topics, send an email to dea...@googlegroups.com.

Wolfgang Bangerth

unread,
Apr 26, 2019, 2:10:37 PM4/26/19
to dea...@googlegroups.com
On 4/26/19 2:50 AM, Doug wrote:
>
> I recover optimal convergence orders (p+1) for straight meshes when
> refining in h. I recover optimal orders (p+1) for a sine-transformed
> grid with some skewed angles up to around 45 degrees (as seen attached).
>
> However, I lose my optimal (p+1) order as soon as I apply any small
> amount of random distortion to my final refined grid (see attached).
> Note that the distortion factor of 0.15 is used, but this loss of order
> also occurs for small distortion factors down to 0.01. Instead of (p+1),
> I may recover (p) or even (p-1). This only applies when the final grid
> is randomly distorted. If I start from a coarse-ish distorted grid (say
> 100 cells), and refine globally such that its children aren't distorted,
> I then recover my optimal orders again.

I don't know enough about DG theory to tell what this is from. But this
is true:
* for your example with the sine-transformed domain, if you refine
the mesh sufficiently many times, each cell will be getting closer and
closer to a parallelogram
* the same is the case for your initially-distorted then refined mesh.
As a matter of fact, that's a general theorem: Start with some mesh and
refine it sufficiently often, and all cells with tend to parallelograms.

Why does this matter? Because the mapping from the reference cell to a
parallelogram is linear, and consequently the derivative of the mapping
(which shows up in the convergence proofs of the finite element method)
will be a constant on every cell in the limit of h->0.

On the other hand, if you refine a mesh *and then distort them
randomly*, then the mapping will *never* be linear, and its gradient
never be constant on cells. It would not surprise me if this yielded
issues in the convergence theory that destroy your convergence order.
Indeed, I have seen statements like this in the literature, and it can
be solved by not using a bilinear mapping from the reference cell to the
real cell but just a linear mapping determined by 3 of the 4 vertices of
the cell. This would be bad for continuous finite elements because these
functions would not be continuous along two of the four edges, but that
really doesn't matter for DG methods :-)

I'm not enough of a theorist to tell you where to look for these kinds
of statements, but I'm not surprised by the behavior you describe either.

Wolfgang Bangerth

unread,
Apr 26, 2019, 2:12:53 PM4/26/19
to dea...@googlegroups.com
On 4/26/19 9:48 AM, Gary Uppal wrote:
>
> Thanks for the reply. I get problems on less distorted meshes as well.
> For example, in the mesh with a hole shown below.  I eventually need
> multiple holes and an advection term. Actually, the advection seems ok
> and I mainly get issues when the diffusion is large. If the distorted
> mesh is the issue, is there a better way to construct the geometry?

No, your mesh is reasonable. The question is not whether the error is
large on cells that are not squares (it may be -- the finite element
theory doesn't ever guarantee that the error is *small* on any given
cell of any given mesh), but whether you get the *correct convergence
order*. So looking at the solution on a single mesh is not a useful
strategy -- the question is how the error decays as you refine the mesh.

Gary Uppal

unread,
Apr 29, 2019, 3:52:17 PM4/29/19
to dea...@googlegroups.com
Hi Doug,

Sorry for the late reply, I haven't checked convergence rigorously. I've just been checking by eye to see if the solution diverges or not, and have seen that the advection does better than diffusion. I'll do some more rigorous error analysis this week probably and let you know if I get better convergence. As for my implementation, I've just taken the upwind DG scheme from tutorial step-12 and added the time evolution by adding a mass matrix and solving the implicit backwards Euler time discritization. 

Best,
Gary

Reply all
Reply to author
Forward
0 new messages