Asymmetric Error - Cahn-Hilliard

69 views
Skip to first unread message

Aiden Huffman

unread,
Dec 6, 2023, 4:52:02 PM12/6/23
to deal.II User Group
Hi Everyone,

I want to thank Luca for his reponse to an earlier post, helped me figure out a bit about inheritence in C++.

I am having issues with a new iteration on a Cahn-Hilliard solver I wrote. I am trying to use the block Schur decomposition illustrated in several tutorials but I get this strange asymmetric error. I am implementing a linearly stabilised splitting scheme from here (sec 3.2.5):
Screenshot from 2023-12-06 16-17-58.png
where F'(phi^n) = (phi^n)^3 - 2phi^n and yields the following block structure
Screenshot from 2023-12-03 18-04-56.png
However, I get this strange accumulating error along the diagonal which the -1 phase drifting down and to the left. I've included a quick snapshot of the asymmetric error at the phase transition:
cahn-hilliard-sol-snap1.png cahn-hilliard-sol-snap2.png
I thought I was incorrectly applying boundary conditions when doing the Schur complement but trying to solve the system directly as I've done in the current version of main.cpp resulted in the same error.

I've also tried forgoing the finite element system completely but I am having trouble correctly applying the boundary conditions through the linear operator classes. So I figured I should stick to one question, on my most successful implementation.

Any suggestions on how to debug this, or if people have had similar issues working with finite element systems would be awesome

Kind Regards,
Aiden
block_assembly_snippet.png
main.cpp

Aiden Huffman

unread,
Dec 7, 2023, 1:44:59 PM12/7/23
to deal.II User Group
I'll never admit to how long I stared at this to find the error, but make sure you're distributing in the correct place in your assembly.

Thanks to anyone who took a peek!

Cheers,
Aiden

Reply all
Reply to author
Forward
0 new messages