Debugging Second-Order Scheme for Allen-Cahn Equation

42 views
Skip to first unread message

Zoe

unread,
Jan 6, 2025, 12:57:48 PM1/6/25
to deal.II User Group

Hi, everyone

I hope you had a wonderful holiday season, and I appreciate your interest in my topic.

I am currently using deal.II to implement a "second-order scheme" for solving the Allen-Cahn equation, based on the approach from the paper An unconditionally energy stable second-order finite element method for solving the Allen–Cahn equation. I have uploaded my code to GitHub for anyone interested.

Screenshot 2025-01-06 at 18.26.06.png

Screenshot 2024-11-22 at 19.05.03.png

For testing purposes, I’m using the function as the exact solution, so the corresponding forcing term is modified to:

Screenshot 2025-01-06 at 18.54.48.png

and the initial condition is .

However, I'm encountering an issue where the results do not match expectations. I tried debugging by modifying the term to:

Screenshot 2024-12-19 at 20.24.00.png

and while this change produced more accurate results, they only exhibit first-order accuracy instead of the desired second-order accuracy.

Screenshot 2025-01-03 at 12.14.45.png

I would greatly appreciate any insights or suggestions you might have regarding this issue. Here are a few things I suspect could be contributing to the problem:

  1. Time Integration Scheme: I may not be implementing the second-order time-stepping correctly, especially in handling the nonlinear terms.
  2. Finite Element Discretization: I’m currently using standard linear elements, but I wonder if higher-order elements are needed for this scheme to achieve second-order accuracy.
  3. Energy Stability: There could be issues with maintaining energy stability in the scheme, which might be affecting the overall accuracy.

If anyone has experience with this kind of problem or has suggestions on potential fixes (perhaps related to time-stepping or nonlinear term handling), I would be incredibly grateful.

Thank you so much for your time and help. Looking forward to your feedback!

Best regards

Zoe

Wolfgang Bangerth

unread,
Jan 8, 2025, 6:46:54 PM1/8/25
to dea...@googlegroups.com

Zoe:
These sorts of issues often take a bit of time to debug. But here are a few
questions:


> I would greatly appreciate any insights or suggestions you might have
> regarding this issue. Here are a few things I suspect could be contributing to
> the problem:
>
> 1. *Time Integration Scheme*: I may not be implementing the second-order
> time-stepping correctly, especially in handling the nonlinear terms.

In that case, what happens if you choose a solution that is time-independent?
Do you obtain the expected convergence rate?


> 2. *Finite Element Discretization*: I’m currently using standard linear
> elements, but I wonder if higher-order elements are needed for this scheme
> to achieve second-order accuracy.

What happens if you choose a higher-order element?


> 3. *Energy Stability*: There could be issues with maintaining energy
> stability in the scheme, which might be affecting the overall accuracy.

Have you tried computing the energy in the (numerical) solution to test
whether that is an issue?

Best
Wolfgang

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


Reply all
Reply to author
Forward
0 new messages